apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.1k stars 1.11k forks source link

Maintenance mode: Add host to deployment planner avoid list to fix local storage migration #9892

Open BartJM opened 2 weeks ago

BartJM commented 2 weeks ago

Description

This PR adds the host preparing for maintenance to the avoid list for the deployment planner.

Without adding the host to the avoid list the deployment planner will return the host preparing for maintenance when a vm has a local storage root disk and has the host preparing for maintenance as the last host.

Steps to reproduce

Actual behaviour

(qa6-4.19-upstream-54bd5b60-kvm-host1) Failed to prepare host for maintenance due to: Migration of the vm VM instance {"id":13,"instanceName":"i-2-13-VM","type":"User","uuid":"209d346b-b2e7-485f-a889-8462dd0078cc"}from host Host {"id":1,"name":"qa6-4.19-upstream-54bd5b60-kvm-host1","type":"Routing","uuid":"224ca458-90e6-4efb-8532-e5efc83df9f4"} to destination host Host {"id":1,"name":"qa6-4.19-upstream-54bd5b60-kvm-host1","type":"Routing","uuid":"224ca458-90e6-4efb-8532-e5efc83df9f4"} doesn't involve migrating the volumes.

Expected

Local storage vm live migrated to another host.

Types of changes

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

Bug Severity

Screenshots (if appropriate):

How Has This Been Tested?

Centos8 mbx env with host.maintenance.local.storage.strategy set to Migration.

Tested maintenance mode on a host with

  1. Local storage vm
  2. HA vm
  3. Local storage vm with ha data disk
  4. ha vm with ha datadisk
  5. Local storage vm with local data disk
  6. ha vm with local datadisk

5 and 6 result in an ErrorInMaintenance due to dest being null. Similar as described in https://github.com/apache/cloudstack/issues/9887. Without this patch these would still fail with the same error as described in actual behavior.

After creation of a ha vm with ha data disk maintenance was not possible. After manual migration to another host and back, migration did complete. Migration without selecting host also gave a no destination found error and also occurred without this patch so is unrelated.

How did you try to break this feature and the system with this change?

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 15.80%. Comparing base (8af08dd) to head (c460198). Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
...n/java/com/cloud/resource/ResourceManagerImpl.java 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9892 +/- ## ============================================ - Coverage 15.81% 15.80% -0.01% Complexity 12580 12580 ============================================ Files 5627 5627 Lines 492260 492262 +2 Branches 63955 60734 -3221 ============================================ - Hits 77832 77825 -7 - Misses 405905 405914 +9 Partials 8523 8523 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9892/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9892/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.04% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9892/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `16.63% <0.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

DaanHoogland commented 2 weeks ago

@blueorangutan package

blueorangutan commented 2 weeks ago

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

blueorangutan commented 2 weeks ago

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 11525

DaanHoogland commented 2 weeks ago

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 11525

this seems to have to do with github api limits. trying a build in the background.