-
Notifications
You must be signed in to change notification settings - Fork 295
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
⚠️ webhook: prevent changes to an already set VSphereVM.spec.biosUUID #2146
⚠️ webhook: prevent changes to an already set VSphereVM.spec.biosUUID #2146
Conversation
76478c5
to
16c421b
Compare
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.
@chrischdi
Code change looks good to me, only got a question here, is there any possibility that user may need to update the biosUUID, for instance, after the VM is moved to another host maybe due to disaster recovery, and the VM will get a new biosUUID as described https://docs.vmware.com/en/VMware-Workstation-Pro/17/com.vmware.ws.using.doc/GUID-533B2C4F-7BD5-41EB-8392-2B9FE687AE50.html#GUID-533B2C4F-7BD5-41EB-8392-2B9FE687AE50
Good point. We were thinking that nobody should mess with this field when discussing it. |
16c421b
to
6c9436b
Compare
The linked doc is for vmware workstation, which is not the target platform. Also it states
So this only applies if explicitly "copied" got selected. However in the vCenter / esx case: Moving to another host does not change the UUID (otherwise e.g. vMotion would be broken). So from my perspective the uuid should not get changed, also not in disaster recovery (except if you have to recreate the vmx file, because the biosUUID is stored there). /hold To wait for other opinions on this. |
Thx for the additional context. Sounds fine to me Probably good enough to for now play it safe and then potentially change the webhook if new use cases emerge (assuming we are not already aware of some) |
6c9436b
to
5d20500
Compare
/lgtm Let's keep the hold a bit for the discussion |
LGTM label has been added. Git tree hash: e0635c9509dd1de883fb145d891692b498db4241
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
For all intent purposes, a new UUID constitutes a new machine identity, and we should treat that as a new machine. I'm therefore OK with this change. |
/unhold |
What this PR does / why we need it:
This PR improves the validation for VSphereVM objects by adjusting the webhook to:
VSphereVM.spec.biosUUID
if it is not already setWhich issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Identified during discussions around #2102