Merge "Align with VINO CR bmhLabels"

This commit is contained in:
Zuul 2021-03-30 14:28:44 +00:00 committed by Gerrit Code Review
commit 0ff45e6ad4
2 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ def allocate_cores(nodes, flavors, exclude_cpu):
# address the case where previous != desired - delete previous, re-run
for node in nodes:
flavor = node['labels']['vmFlavor']
flavor = node['bmhLabels']['airshipit.org/k8s-role']
vcpus = flavors[flavor]['vcpus']
for num_node in range(0, node['count']):

View File

@ -5,7 +5,7 @@
- name: debug print virsh xml domain
debug:
msg: "{{ flavorTemplates[node.labels.vmFlavor]['domainTemplate'] }}"
msg: "{{ flavorTemplates[node['bmhLabels']['airshipit.org/k8s-role']]['domainTemplate'] }}"
loop: "{{ range(0,node.count)|list }}"
- name: get state of existing volumes
@ -14,7 +14,7 @@
register: vol_list
- name: write out domain volume request xml
copy: content="{{ flavorTemplates[node.labels.vmFlavor]['volumeTemplate'] }}" dest=/tmp/vol-{{item}}.xml
copy: content="{{ flavorTemplates[node['bmhLabels']['airshipit.org/k8s-role']]['volumeTemplate'] }}" dest=/tmp/vol-{{item}}.xml
loop: "{{ range(0,node.count)|list }}"
- name: create domain volume if it doesn't exist
@ -35,7 +35,7 @@
# to domains, so we must shell out here instead
- name: write out domain volume request xml
copy: content="{{ flavorTemplates[node.labels.vmFlavor]['domainTemplate'] }}" dest=/tmp/domain-{{item}}.xml
copy: content="{{ flavorTemplates[node['bmhLabels']['airshipit.org/k8s-role']]['domainTemplate'] }}" dest=/tmp/domain-{{item}}.xml
loop: "{{ range(0,node.count)|list }}"
- name: virsh define domain