-
Notifications
You must be signed in to change notification settings - Fork 207
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
Bug 1877281: [vSphere] Don't fail when tag is not found #667
Bug 1877281: [vSphere] Don't fail when tag is not found #667
Conversation
Is there a BZ related to this? Can you please ensure that there are unit tests to cover this at a minimum |
b360e92
to
5dceceb
Compare
We don't have a BZ, it's a jira ticket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the background of this ticket, but the UPI cluster needs to conform to some standard. It seems like they should supply the correct tagging on whatever it is they're doing rather than us not utilizing it. Cluster tags are important if you're running more than one cluster on the same set of infrastructure.
@michaelgugino What you say is true, do we require cluster tags for other providers' UPI? Do you know if that's documented somewhere? |
I skimmed through the vSphere UPI docs, I didn't see anything about tags. I am not sure how everything works in this provider. If we can able to query machines from vsphere on a unique basis (eg, every VM has a unique name that we know), we might be able to ignore the missing tags for clusterid. |
pkg/controller/vsphere/reconciler.go
Outdated
@@ -882,6 +882,16 @@ func (vm *virtualMachine) reconcileTags(ctx context.Context, session *session.Se | |||
|
|||
// checkAttachedTag returns true if tag is already attached to a vm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment needs to be updated
In vSphere we use the s.machine.UID or fallback to the s.machine.Name to find instances. As far as I'm aware the clusterID tag is only used by the installer to remove resources on a destroy command so this change seems safe. This would let UPI born clusters to work smoothly. I also agree with this though #667 (review) |
/retest |
/retitle Bug 1877281: [vSphere] Don't fail when tag is not found |
@alexander-demichev: This pull request references Bugzilla bug 1877281, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
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. |
5dceceb
to
6fc674c
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@alexander-demichev: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@alexander-demichev: All pull requests linked via external trackers have merged: Bugzilla bug 1877281 has been moved to the MODIFIED state. In response to this:
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. |
When a cluster that was first created via UPI the clusterID tag is missed in the vCenter.
This causes the machine controller to create the instances but failing and breaking the loop before being able to reconcile the status appropriately resulting in the machine resource having an inconsistent status which does not reflect reality.
github.com/vmware/govmomi
misses typed errors, so the only way to not fail reconciliation on not found tag is iterate through the list of all tags and try to find clusterID tag. We assume the tag is always present in IPI.