Only use the host if its Resource State is Enabled.#2512
Only use the host if its Resource State is Enabled.#2512DaanHoogland merged 1 commit intoapache:4.11from
Conversation
|
@mike-tutkowski a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
| vmSnapshot = takeHypervisorSnapshot(volumeInfo); | ||
| } | ||
| catch (ResourceAllocationException ex) { | ||
| catch (Exception ex) { |
There was a problem hiding this comment.
@mike-tutkowski, Thanks for the fix. I think it would be better to capture the required exceptions with multiple catches instead of the parent Exception class. We can always put this at the end.
|
|
||
| SnapshotResult result = null; | ||
| SnapshotInfo snapshotOnPrimary = null; | ||
| SnapshotInfo snapshotOnPrimary; |
There was a problem hiding this comment.
I guess the removal of this may create NPE.
There was a problem hiding this comment.
This is an IntelliJ-recommended change. The IDE pointed out (correctly) that we did not need to assign null on this line because snapshotOnPrimary is later assigned a value regardless of the path the code takes.
There was a problem hiding this comment.
@DaanHoogland, My bad, wrong interpretation!! As @mike-tutkowski explained, that's redundant. Thanks!!
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1834 |
|
@mike-tutkowski bugfixes can be considered for 4.11 branch, if you think this is useful for 4.11/tls please change the base-branch to 4.11 (and rebase your branch against 4.11). Please also put this PR against a milestone, 4.11.1.0, or 4.12.0.0 as applicable. |
|
@rhtyd Sounds good, Rohit. I can change the base branch to 4.11 and rebase. I'll do that after I implement @nitin-maharana's suggestion around exception handling. |
78de206 to
041a0eb
Compare
|
@rhtyd @nitin-maharana @DaanHoogland I have rebased the code on top of 4.11 and changed the base branch of the PR. Also, @nitin-maharana: I was able to entirely remove that try/catch block. |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1847 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2435)
|
|
Just a quick comment on the five test failures: It seems unlikely that this PR caused them. Those are all networking related and this PR is mainly concerned with managed storage. |
|
@mike-tutkowski a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@DaanHoogland Quick question: Is it part of our process to forward merge these PRs to master or do I need to open a new PR for that? Thanks! |
|
I was going to mention that just now. No new PR should be required. We should merge forward. |
|
I think we are at more than ten now :s , gents |
|
but I think it doesn't hurt to gather a few before we merge forward. |
|
Really?! I normally follow PRs merge, but I only noticed the one yesterday and this one. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1854 |
This reverts commit e68f5ce.
Description
Update the StorageSystemSnapshotStrategy and StorageSystemDataMotionStrategy classes to only leverage a host when its Resource State is Enabled.
https://issues.apache.org/jira/browse/CLOUDSTACK-10345
Types of changes
How Has This Been Tested?
Checked to see if a host in maintenance mode is avoided
Checklist:
@blueorangutan package