CLOUDSTACK-8599: [VMware] Successful migration was reported as failure when vCenter session timed out#2092
CLOUDSTACK-8599: [VMware] Successful migration was reported as failure when vCenter session timed out#2092sateesh-chodapuneedi merged 1 commit intomasterapache/cloudstack:masterfrom unknown repositoryCopy head branch name to clipboard
Conversation
| throw new RuntimeException("vCenter task failed due to " + we.getLocalizedMessage()); | ||
|
|
||
| // Since task cancellation is asynchronous, wait for the task to be cancelled | ||
| Object[] result = waitForValues(task, new String[] {"info.state", "info.error"}, new String[] {"state"}, |
There was a problem hiding this comment.
Should there be a check for length of result to avoid array-bound exceptions when accessing result[0], result[1] etc.
There was a problem hiding this comment.
@rhtyd The properties list to filter in the above waitForValues() are "info.state" and "info.error". The result size returned from waitForValues() would be same as the properties list size, which is 2 and so the result Object array would hold two objects: result[0], result[1].
There was a problem hiding this comment.
@sureshanaparti I see that however my comment aimed to encourage defensive programming. Maybe now the code works, but it can still improve upon overall elegance and include additional checks to defend future bugs [1].
There was a problem hiding this comment.
@rhtyd ok. will check and update. Thanks for the review.
There was a problem hiding this comment.
@rhtyd Updated the code. Please take a look. Thanks.
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-728 |
|
@blueorangutan test centos7 vmware-55u3 |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-55u3) has been kicked to run smoke tests |
|
Trillian test result (tid-1101)
|
|
Above test failures are not related to this PR. |
ACS CI BVT RunSumarry: Link to logs Folder (search by build_no): https://www.dropbox.com/sh/r2si930m8xxzavs/AAAzNrnoF1fC3auFrvsKo_8-a?dl=0 Failed tests:
Skipped tests: Passed test suits: |
… when vCenter session timed out
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-965 |
|
@blueorangutan test centos7 vmware-55u3 |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-55u3) has been kicked to run smoke tests |
|
Trillian test result (tid-1389)
|
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1061 |
|
@blueorangutan test centos7 vmware-55u3 |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-55u3) has been kicked to run smoke tests |
|
Trillian test result (tid-1472)
|
|
LGTM, test failures not related to this PR. Additional review requested @niteshsarda @nitin-maharana @karuturi @sureshanaparti and others |
|
code LGTM, IMHO hard to have a test case for it. |
|
Merging this based on 2 LGTMs and test results confirmation from @rhtyd and @resmo. Thanks. |
[VMware] Successful migration was reported as failure when vCenter session timed out.
This closes #544