Guest OS rules#10098
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #10098 +/- ##
=============================================
- Coverage 18.08% 3.51% -14.57%
=============================================
Files 6037 464 -5573
Lines 542546 40158 -502388
Branches 66431 7561 -58870
=============================================
- Hits 98126 1413 -96713
+ Misses 433404 38555 -394849
+ Partials 11016 190 -10826
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:
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
4835d26 to
796ecb1
Compare
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@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 ✖️ debian ✖️ suse15. SL-JID 13624 |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13720 |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13731 |
|
@BryanMLima can you look at the conflicts? |
I will take a look this week, apologies for disappearing 😅 . |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@BryanMLima Since this is for the 4.22.1 release, could you retarget the PR to the 4.22 branch? |
|
Hi @BryanMLima is this PR ready? can you resolve the conflicts (and rebase with 4.22 if this can be targeted for 4.22.1). |
ee9c893 to
fc78948
Compare
|
@blueorangutan package |
|
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17763 |
|
@blueorangutan package |
|
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
winterhazel
left a comment
There was a problem hiding this comment.
Tested manually.
In an environment with 2 hosts, host-1 and host-2:
- I configured
host-2's guest OS rule tovmGuestOs.toLowerCase().indexOf('ubuntu') !== -1.host-1's rule remained empty. - I deployed some VMs using Ubuntu and Macchinina templates.
- I verified that
host-2received only Ubuntu VMs, whilehost-1received both Ubuntu and Macchinina VMs. - I attempted to migrate the Macchinina VMs that were in
host-1, and validated that no hosts were returned as compatible, ashost-2only accepts Ubuntu VMs.
As this PR also affects GenericRuleHelper, I also validated that the flexible tags feature was still working:
- I configured
host-1's host tags totags.indexOf('test-tag') !== -1, and cleaned the guest OS rules of bothhost-1andhost-2.host-2's host tags remained empty. - I created two compute offerings, one without tags and another with the tag
test-tag. - I deployed some VMs using both compute offerings, and validated that
host-1only received VMs using the compute offering with thetest-tagtag.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17787 |
Description
Currently, ACS provides a feature that enables a guest OS preference for a specific host, prioritizing VMs based on its OS. However, this functionality allows VMs with different OSes to be deployed in a host with a Guest OS defined, as expected as it is only a preference configuration; this is not always desired. For example, keeping proprietary OS in the same host could reduce licensing costs.
This PR tackles this scenario, allowing JavaScript rules, using the JS interpreter introduced in #5909, to direct VMs to specific hosts based on their OS. Different from the guest OS preference, these guest OS rules will be strict. This new feature added a new field,
Guest OS as JS rulein the host edit view to allow users the creation of these rules.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
In a local lab with two hosts (
host-1andhost-2) I created the guest OS rulevmGuestOs.toLowerCase().indexOf("debian") != -1forhost-2, and deployed multiple VMs using templates and ISOs.host-2was filtered during the deployment.host-2and verified that it was not possible.host-1tohost-2and vice versa.How did you try to break this feature and the system with this change?
I tried to deploy VMs in the same lab without the guest OS rules defined and validated that the deployment of VMs were being done as expected.