Allow deploy of VRs on dedicated resources#9531
Conversation
5da9945 to
7b05daf
Compare
|
@blueorangutan package |
|
@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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9531 +/- ##
============================================
+ Coverage 18.01% 18.89% +0.87%
- Complexity 16607 18226 +1619
============================================
Files 6029 6174 +145
Lines 542160 555230 +13070
Branches 66451 67775 +1324
============================================
+ Hits 97682 104886 +7204
- Misses 433461 438824 +5363
- Partials 11017 11520 +503
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12358 |
|
Hey @DaanHoogland, could we run the CI on this PR? |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12421)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
7b05daf to
e15e366
Compare
|
@blueorangutan package |
|
@nicoschmdt 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 13280 |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@GaOrtiga could you have a look at the conflicts? |
2bc25d1 to
e2197f0
Compare
|
@rajujith @sureshanaparti @winterhazel Sorry for the delay, this was on my backlog. I had to to some adjustments to address some use cases that were brought up, but now its ready for review/testing. |
|
@blueorangutan package |
|
@GaOrtiga 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 18113 |
DaanHoogland
left a comment
There was a problem hiding this comment.
clgtm, (one style remark)
…Impl.java Co-authored-by: dahn <daan.hoogland@gmail.com>
…Impl.java Co-authored-by: dahn <daan.hoogland@gmail.com>
|
@blueorangutan package |
|
@DaanHoogland 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 18276 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-16358) |
| ConfigKey.Kind.Select, | ||
| "random,firstfit,userdispersing,firstfitleastconsumed"); | ||
|
|
||
| ConfigKey<Boolean> allowRoutersOnDedicatedResources = new ConfigKey<>( |
There was a problem hiding this comment.
this may be not required.
in my opinion, the VR should always be allowed to deploy on resource dedicated to the owner of the VR
There was a problem hiding this comment.
Ok, I'll remove the config
|
|
||
| sql.append(ORDER_CLUSTERS_BY_AGGREGATE_CAPACITY_JOIN_1); | ||
| if (isVr && allowRoutersOnDedicatedResources) { | ||
| sql.append(ORDER_CLUSTERS_BY_AGGREGATE_CAPACITY_INCLUDE_DEDICATED_JOIN_CLAUSE.replace("ownerId", ownerId.toString())); |
There was a problem hiding this comment.
this is not elegant I think
There was a problem hiding this comment.
I think it is very elegant, like a pig on clogs . What do you suggest, @weizhouapache ?
There was a problem hiding this comment.
you can refer to
private static final String ORDER_CLUSTERS_BY_AGGREGATE_CAPACITY_JOIN_1 =
"JOIN host ON capacity.host_id = host.id " +
"LEFT JOIN (SELECT affinity_group.id, agvm.instance_id FROM affinity_group_vm_map agvm JOIN affinity_group ON agvm.affinity_group_id = affinity_group.id AND affinity_group.type='ExplicitDedication') AS ag ON ag.instance_id = ? " +
"LEFT JOIN dedicated_resources dr_pod ON dr_pod.pod_id IS NOT NULL AND dr_pod.pod_id = host.pod_id " +
"LEFT JOIN dedicated_resources dr_cluster ON dr_cluster.cluster_id IS NOT NULL AND dr_cluster.cluster_id = host.cluster_id " +
"LEFT JOIN dedicated_resources dr_host ON dr_host.host_id IS NOT NULL AND dr_host.host_id = host.id ";
There was a problem hiding this comment.
Using ? was my first option aswell, since it's how it's done elsewhere in the method, however, the values for ? are injected informing the order (how many ?s before it). Since this one is optional, it may or may not change the order of the remaining ? that come after it, thus, I'd have to add at least 3 more ifs to account for this possible change of order, which IMO ends up being even less elegant.
There was a problem hiding this comment.
that's ok, thanks for explanation.
Maybe we could use a placeholder syntax such as {{ ownerId }} to make it clear that this is a variable that will be replaced at runtime.
| private static final String ORDER_CLUSTERS_BY_AGGREGATE_CAPACITY_INCLUDE_DEDICATED_JOIN_CLAUSE = | ||
| "JOIN host ON capacity.host_id = host.id " + | ||
| "LEFT JOIN (SELECT affinity_group.id, agvm.instance_id FROM affinity_group_vm_map agvm JOIN affinity_group ON agvm.affinity_group_id = affinity_group.id AND affinity_group.type='ExplicitDedication') AS ag ON ag.instance_id = ? " + | ||
| "LEFT JOIN dedicated_resources dr_pod ON dr_pod.pod_id IS NOT NULL AND dr_pod.pod_id = host.pod_id AND dr_pod.account_id IS NOT NULL AND dr_pod.account_id != ownerId " + |
There was a problem hiding this comment.
what about resources dedicated to domain ?
There was a problem hiding this comment.
Dedication to domains is already being addressed in this query
There was a problem hiding this comment.
oh really ?
I couldn't even find a domain or domain_id field in the SQL query...
There was a problem hiding this comment.
I'll run a test, been a while since I altered this query, so I might be confusing
6afadba to
65524e3
Compare
Description
Currently, it is not possible to deploy VRs on dedicated resources, even if they are dedicated to the domain in which the VR will be created.
A new global configuration
allowRoutersOnDedicatedResourceshas been created to allow VRs to be deployed on hosts, clusters, pods and zones that are dedicated to their respective domains.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
With the configuration marked as true:
I marked the configuration as false and verified that I could not deploy VRs on any of the dedicated resources.