-
Notifications
You must be signed in to change notification settings - Fork 452
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
r/virtual_machine: Current limitations and roadmap for disk device management and vMotion #295
Comments
Further details on this. In light of this, I want to get away from using file name to track virtual disks and switch to another scheme, discussed below.
This has been confirmed by manual testing. As such, the stop-gap for now will be to block all storage vMotions where the disk name does not match the standard vSphere naming convention of We will target 1.2 for removing this limitation, where Plan, to recap: 1.1.x
1.2.0/1.3.0
2.0.0
Some notes:
|
This commit adds restrictions to storage vMotion: * Externally-attached disks cannot be migrated. * Disk names must match the standard vSphere naming convention based on the current name of the virtual machine. * Linked clones are blocked from being migrated at this time. The latter two restrictions will be lifted once #295 is fully realized and we are tracking disks via a label/UUID combination.
Now that 1.1.1 is out and we've mitigated this, I've removed the "bug" label from this so that it's classified as an enhancement, and it will be taken care of in the next set of changes for possibly 1.2 or 1.3. |
Next checklist!
|
Just an update that this is moving along and is looking pretty positive. General behaviour for transitioning is looking stable during smoke testing. Our acceptance tests will need to be updated mostly, and we will probably add a couple specifically for the transition and move some cases that were error cases before to expect success instead. But otherwise I'm pretty excited about how this is looking 👍 |
#363 was merged, so this is pretty much done. Everything works as intended and nothing out of the ordinary came out of the smoke tests, except an unrelated issue for which a fix has been submitted as #371. One last thing I'm testing before we commit to a release is what happens when someone does something like add multiple disks with the same UUID. Again, this should never happen during regular operation, but in the event it can happen, we need to be prepared via some sort of fail-safe.
|
Alright, all three of these operations are safe in terms of not destroying data, and ultimately providing errors when Terraform detects a UUID conflict in the read cycle. The differences in the above three scenarios lies in where Terraform fails:
The errors resemble something like:
This seems to be safe, and as we established internally in #304 Terraform should not be working any harder than normal to work with situations that should never happen during normal operation (such as a user doing major modifications on the back end to a virtual machine outside of Terraform). The only issue I could see coming up is the possible rendering of the state un-correctable after the latter two scenarios, but these are edge cases, and the only one that we could possibly track is the last one, with heavy effort on Terraform's part to check not just state and the current devices on the virtual machine, but comparing the UUIDs of all disks to be attached as well, which is not something we currently handle right now anyway. As everything in this issue is mainly complete, save removal of the name attribute completely (which will be done closer to around 2.0 and will have a separate issue associated with it), I'm closing this issue now! |
NOTE: Read update for more details on current plans
This is something we need to block across the board - running storage vMotion on a linked clone does not necessarily work anyway, but there are situations where it can function (so long as vSphere has determined that it can properly link the disks).
However, upon migration of these disks, The filename of the backings will change to a delta disk filename, removing the original name from the snapshot chain. Worse, the new filename gets saved to state. The next plan will look something like:
This means that the disk will be deleted, with the disk being completely destroyed.
At this point in time I can't think of a good way to 100% support this and in the spirit of making sure the provider is as safe as possible we need to be able to block this completely.
1.1.x mitigation steps
CustomizeDiff
Block in apply (if possible) NOTE: This is not necessary withCustomizeDiff
The text was updated successfully, but these errors were encountered: