Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

investigate what happens when a machine with a duplicate name of an existing machine is created in a different namespace #808

Closed
chuckha opened this issue Jun 5, 2019 · 15 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Milestone

Comments

@chuckha
Copy link
Contributor

chuckha commented Jun 5, 2019

/kind bug

I think this is a bug and this issue is mostly here to remind me to look into this at some point and flesh out the actual bug details or close if it's not an issue.

When two machines share a name but not a namespace, does everything still work as expected?

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 5, 2019
@detiber
Copy link
Member

detiber commented Jun 6, 2019

I don't expect there to be issues as long as they do not also share the same "cluster" name. That said, we currently do not prevent multiple "clusters" existing in different namespaces, however that would definitely cause issues today.

@ncdc ncdc added this to the Next milestone Jul 15, 2019
@ashish-amarnath
Copy link
Contributor

This will be a problem based on how we, currently, look if a machine exists. Specifically, when we look for instances by tags. https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/release-0.3/pkg/cloud/aws/services/ec2/instances.go#L66
Even more specifically, that problem is
https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/release-0.3/pkg/cloud/aws/services/ec2/instances.go#L86-L88
This will not be an issue if the machines belong to a different cluster (and therefore a different VPC?).

@ncdc
Copy link
Contributor

ncdc commented Jul 17, 2019

I'm curious why we need to query for an instance by tags if we have instance ID?

@ashish-amarnath
Copy link
Contributor

We query by tags only when we don't find the instanceID
https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/release-0.3/pkg/cloud/aws/services/ec2/instances.go#L481

But when there is a naming conflict, I think, we'll end up w/ 2 machine objects being liked to the same instance ID.

@ncdc
Copy link
Contributor

ncdc commented Jul 18, 2019

Right, but why? 😄

IMHO, if a Machine does not have spec.providerID, we must do a create operation. If it does have spec.providerID, then we should be doing existence/health checks and setting the error state appropriately if the VM is not pending or running (+ maybe shutting down & stopped too).

@detiber
Copy link
Member

detiber commented Jul 18, 2019

@ncdc The reason for the check is in case we create the instance but we are not able to update the Machine object for some reason.

@ncdc
Copy link
Contributor

ncdc commented Jul 18, 2019

Ok, that's fair.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 16, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 15, 2019
@vincepri
Copy link
Member

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Nov 15, 2019
@randomvariable
Copy link
Member

/help

@k8s-ci-robot
Copy link
Contributor

@randomvariable:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Aug 14, 2020
@MarcusNoble
Copy link
Contributor

#969 seems to answer this question, is this issue still relevant?

@randomvariable
Copy link
Member

thanks @MarcusNoble .

/close
since that one supersedes.

Going to take to SIG Cloud Provider for further discussion.

@k8s-ci-robot
Copy link
Contributor

@randomvariable: Closing this issue.

In response to this:

thanks @MarcusNoble .

/close
since that one supersedes.

Going to take to SIG Cloud Provider for further discussion.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

9 participants