-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CLOUDSTACK-8609. [VMware] VM is not accessible after a migration acro… #556
Conversation
…ss clusters. Once a VM is successfully started, don't delete the files associated with the unregistered VM, if the files are in a storage that is being used by the new VM. Attempt to unregister a VM in another DC, only if there is a host associated with a VM.
Who wants to step in and finish this work? It seems the original author is not able to finish it. If no one steps in, we'll have to close the PR without merging it so please help :-). |
This closes apache#577 This closes apache#566 This closes apache#562 This closes apache#561 This closes apache#556 This closes apache#555 This closes apache#554 This closes apache#548 This closes apache#544 This closes apache#540 This closes apache#508 This closes apache#384 This closes apache#372
This closes apache#577 This closes apache#566 This closes apache#562 This closes apache#561 This closes apache#556 This closes apache#555 This closes apache#554 This closes apache#548 This closes apache#544 This closes apache#540 This closes apache#384 This closes apache#372
This closes apache#577 This closes apache#566 This closes apache#562 This closes apache#561 This closes apache#556 This closes apache#555 This closes apache#554 This closes apache#548 This closes apache#544 This closes apache#540 This closes apache#384 This closes apache#372
skipDatastores.add(existingDatastore.getName()); | ||
} | ||
} | ||
deleteUnregisteredVmFiles(existingVmFileLayout, dcMo, true, skipDatastores); | ||
} |
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.
Hi, likitha.
Could you extract the code between lines 1770 - 1775 and 1776 - 1780 to methods with a little test case and Javadoc explaining what the methods do, the params that they use and what they return?
Another thing, how about you replace the logic in 'if's at lines 2272, 2283 and 2291 for a method with a little test case and a Javadoc, that receives 2 params, (List skipDatastores, String name ) and returns skipDatastores == null || !skipDatastores.contains(name).
Ty.
Could someone put this PR to test again? If it fails, it could be closed since the author seems to be inactive on github since September of the last year and the PR is very old. PS: This is just a suggestion. |
List<ObjectContent> ocs = _context.getService().retrieveProperties(_context.getPropertyCollector(), pfSpecArr); | ||
|
||
List<DatastoreMO> datastores = new ArrayList<DatastoreMO>(); | ||
if (ocs != null && ocs.size() > 0) { |
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.
Hi @likitha, you could use CollectionUtils.isEmpty for this conditional.
It returns true if the List is empty or null.
Thanks.
Documentation: https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/CollectionUtils.html#isEmpty%28java.util.Collection%29
tag:vmware-pickup |
ACS CI BVT RunSumarry: Link to logs Folder (search by build_no): https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0 Failed tests: Skipped tests: Passed test suits: |
Continued with the code changes here in a new PR #2091. |
closing as @sureshanaparti tookk this to #2091 |
… clusters (#2091) [VMware] VM is not accessible after migration across clusters. Once a VM is successfully started, don't delete the files associated with the unregistered VM, if the files are in a storage that is being used by the new VM. Attempt to unregister a VM in another DC, only if there is a host associated with a VM. This closes #556
Add and update translations for German Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
…ss clusters.
Once a VM is successfully started, don't delete the files associated with the unregistered VM, if the files are in a storage that is being used by the new VM.
Attempt to unregister a VM in another DC, only if there is a host associated with a VM.