-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Deployment plan fixes for VM with last host, and last host in maintenance #12062
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
base: 4.20
Are you sure you want to change the base?
Deployment plan fixes for VM with last host, and last host in maintenance #12062
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12062 +/- ##
============================================
+ Coverage 16.18% 16.24% +0.06%
- Complexity 13301 13401 +100
============================================
Files 5657 5658 +1
Lines 498473 499275 +802
Branches 60501 60601 +100
============================================
+ Hits 80663 81128 +465
- Misses 408830 409100 +270
- Partials 8980 9047 +67
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR fixes deployment planning logic for VMs with last host by ensuring the last host is considered only when it exists and is not in maintenance mode. When users explicitly request last host consideration and the host doesn't exist or is in maintenance, deployment now fails with a clear error message.
Key Changes:
- Added validation to check if last host exists and is not in maintenance before attempting deployment
- When
ConsiderLastHostis explicitly set to "true", deployment now fails with an exception if the last host is unavailable - Fixed minor logging inconsistencies and typos across multiple files
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java | Core logic changes to validate last host existence and maintenance state, with error handling when explicitly requested; also fixed a typo in a log message |
| server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java | Minor log message formatting improvements for migration attempts (removed extra space) |
| server/src/main/java/com/cloud/resource/ResourceManagerImpl.java | Updated log message format for consistency during maintenance operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@sureshanaparti 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. |
5ec03de to
6aa828b
Compare
|
@blueorangutan package |
|
@sureshanaparti 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15747 |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@sureshanaparti 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15770 |
DaanHoogland
left a comment
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.
clgtm, only possible snatch may be afinity, but on the other hand, it is only a “when all else fails” scenario. We should be good like this.
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
|
[SF] Trillian test result (tid-14829)
|
- Consider last host when it is not in maintenance - Fail deployment when user requests for last host consideration and last host doesn't exists or in maintenance
da2b6d9 to
51cf988
Compare
|
@blueorangutan package |
|
@sureshanaparti 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15887 |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14901)
|
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@sureshanaparti @abh1sar does this need (any kind of) testing ? |
|
@sureshanaparti are you planning to address the latest comments from @abh1sar ? |
|
@blueorangutan package |
|
@sureshanaparti 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16564 |
Description
This PR includes the following deployment plan fixes for VM with last host, and last host in maintenance.
Fixes #12045
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested with 4 x KVM hosts on a single cluster. Able to put a host in maintenance when 2 hosts are already in maintenance. VMs choose the available host for migration, and VMs are not stopped.
All Hosts are Up =>
Host 2 in Maintenance =>
Host 4 in Maintenance =>
Host 1 in Maintenance =>
How did you try to break this feature and the system with this change?