Skip to content

Commit cea564b

Browse files
authored
Merge pull request #399 from stackhpc/upstream/2024.1-2025-03-31
Synchronise 2024.1 with upstream
2 parents 67520b4 + aeea8b6 commit cea564b

File tree

7 files changed

+53
-25
lines changed

7 files changed

+53
-25
lines changed

ansible/roles/infra-vms/tasks/deploy.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
include_role:
55
name: jriguera.configdrive
66
vars:
7-
configdrive_os_family: "{{ vm_hostvars.infra_vm_os_family }}"
7+
configdrive_os_family: "{{ vm_os_family }}"
88
configdrive_uuid: "{{ vm_name | to_uuid }}"
99
# Must set configdrive_instance_dir when using a loop
1010
# https://github.com/jriguera/ansible-role-configdrive/blob/8438592c84585c86e62ae07e526d3da53629b377/tasks/main.yml#L17
@@ -16,13 +16,10 @@
1616
configdrive_volume_path: "{{ image_cache_path }}"
1717
configdrive_config_dir_delete: False
1818
configdrive_resolv:
19-
domain: "{{ vm_hostvars.resolv_domain | default }}"
20-
search: "{{ vm_hostvars.resolv_search | default }}"
21-
dns: "{{ vm_hostvars.resolv_nameservers | default([]) }}"
22-
configdrive_network_device_list: >
23-
{{ vm_hostvars.network_interfaces |
24-
map('net_configdrive_network_device', vm_hostvars.inventory_hostname) |
25-
list }}
19+
domain: "{{ vm_resolv_domain | default }}"
20+
search: "{{ vm_resolv_search | default }}"
21+
dns: "{{ vm_resolv_nameservers | default([]) }}"
22+
configdrive_network_device_list: "{{ vm_network_device_list }}"
2623

2724
- name: "[{{ vm_name }}] Set a fact containing the configdrive image path"
2825
set_fact:
@@ -56,7 +53,7 @@
5653
- name: "[{{ vm_name }}] Stat image files"
5754
stat:
5855
path: "{{ image_cache_path }}/{{ item.image | basename }}"
59-
with_items: "{{ vm_hostvars.infra_vm_volumes | selectattr('image', 'defined') }}"
56+
with_items: "{{ vm_volumes | selectattr('image', 'defined') }}"
6057
register: image_stat_result
6158

6259
- name: "[{{ vm_name }}] Fix image ownership"
@@ -75,7 +72,7 @@
7572
vm_configdrive_device: cdrom
7673
vm_configdrive_volume:
7774
name: "{{ vm_name }}-configdrive"
78-
pool: "{{ vm_hostvars.infra_vm_pool }}"
75+
pool: "{{ vm_pool }}"
7976
# Round size up to next multiple of 4096.
8077
capacity: "{{ (stat_result.stat.size + 4095) // 4096 * 4096 }}"
8178
device: "{{ vm_configdrive_device }}"
@@ -85,10 +82,10 @@
8582
libvirt_vm_image_cache_path: "{{ image_cache_path }}"
8683
libvirt_vms:
8784
- name: "{{ vm_name }}"
88-
boot_firmware: "{{ vm_hostvars.infra_vm_boot_firmware | default }}"
89-
machine: "{{ vm_hostvars.infra_vm_machine | default }}"
90-
memory_mb: "{{ vm_hostvars.infra_vm_memory_mb }}"
91-
vcpus: "{{ vm_hostvars.infra_vm_vcpus }}"
92-
volumes: "{{ vm_hostvars.infra_vm_volumes + [vm_configdrive_volume] }}"
93-
interfaces: "{{ vm_hostvars.infra_vm_interfaces }}"
85+
boot_firmware: "{{ vm_boot_firmware | default }}"
86+
machine: "{{ vm_machine | default }}"
87+
memory_mb: "{{ vm_memory_mb }}"
88+
vcpus: "{{ vm_vcpus }}"
89+
volumes: "{{ vm_volumes + [vm_configdrive_volume] }}"
90+
interfaces: "{{ vm_interfaces }}"
9491
console_log_enabled: true

ansible/roles/infra-vms/tasks/destroy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
vars:
77
infra_vm_configdrive_volume:
88
name: "{{ vm_name }}-configdrive"
9-
pool: "{{ hostvars[vm_hostvars.infra_vm_hypervisor].infra_vm_pool }}"
9+
pool: "{{ vm_pool }}"
1010
libvirt_vms:
1111
- name: "{{ vm_name }}"
12-
boot_firmware: "{{ vm_hostvars.infra_vm_boot_firmware | default }}"
13-
memory_mb: "{{ vm_hostvars.infra_vm_memory_mb }}"
14-
vcpus: "{{ vm_hostvars.infra_vm_vcpus }}"
15-
volumes: "{{ vm_hostvars.infra_vm_volumes + [infra_vm_configdrive_volume] }}"
12+
boot_firmware: "{{ vm_boot_firmware | default }}"
13+
memory_mb: "{{ vm_memory_mb }}"
14+
vcpus: "{{ vm_vcpus }}"
15+
volumes: "{{ vm_volumes + [infra_vm_configdrive_volume] }}"
1616
state: "absent"
1717
become: True

ansible/roles/infra-vms/tasks/main.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,21 @@
1010
- name: "{{ infra_vm_action | capitalize }} infra VMs (loop)"
1111
include_tasks: "{{ infra_vm_action }}.yml"
1212
vars:
13-
vm_name: "{{ vm_hostvars.infra_vm_name }}"
14-
vm_hostvars: "{{ hostvars[vm_item] }}"
13+
vm_name: "{{ hostvars[vm_item].infra_vm_name }}"
14+
vm_os_family: "{{ hostvars[vm_item].infra_vm_os_family }}"
15+
vm_resolv_domain: "{{ hostvars[vm_item].resolv_domain }}"
16+
vm_resolv_search: "{{ hostvars[vm_item].resolv_search }}"
17+
vm_resolv_nameservers: "{{ hostvars[vm_item].resolv_nameservers }}"
18+
vm_network_device_list: "{{ hostvars[vm_item].network_interfaces |
19+
map('net_configdrive_network_device', hostvars[vm_item].inventory_hostname) |
20+
list }}"
21+
vm_volumes: "{{ hostvars[vm_item].infra_vm_volumes }}"
22+
vm_pool: "{{ hostvars[vm_item].infra_vm_pool }}"
23+
vm_boot_firmware: "{{ hostvars[vm_item].infra_vm_boot_firmware }}"
24+
vm_machine: "{{ hostvars[vm_item].infra_vm_machine }}"
25+
vm_memory_mb: "{{ hostvars[vm_item].infra_vm_memory_mb }}"
26+
vm_vcpus: "{{ hostvars[vm_item].infra_vm_vcpus }}"
27+
vm_interfaces: "{{ hostvars[vm_item].infra_vm_interfaces }}"
1528
loop: "{{ infra_vm_vms }}"
1629
when: (infra_vm_action == "deploy" and vm_name not in all_vms.list_vms) or infra_vm_action == "destroy"
1730
loop_control:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Bumps the MichaelRigart.interfaces role to v1.15.4 to fix compatibility
5+
with CentOS Stream 9 due to changes in the ``iproute`` package.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes an issue on boot where vgpu devices would fail to start due to a race
5+
condition in the startup logic. See
6+
`LP#2102153 <https://bugs.launchpad.net/kayobe/+bug/2102153>`__ for more
7+
details.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
Deploying and destroying infrastructure VMs is now significantly faster
5+
as only the required variables are passed to the relevant tasks as opposed
6+
to the entire collection of hostvars for each VM.

requirements.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ collections:
1010
- name: openstack.cloud
1111
version: '<3'
1212
- name: stackhpc.linux
13-
version: 1.3.0
13+
version: 1.3.1
1414
- name: stackhpc.network
1515
version: 1.0.0
1616
- name: stackhpc.openstack
@@ -25,7 +25,7 @@ roles:
2525
# There are no versioned releases of this role.
2626
version: acd08fd126d0e442ab8b3bc518e37761390d8c2f
2727
- src: MichaelRigart.interfaces
28-
version: v1.15.3
28+
version: v1.15.4
2929
- src: mrlesmithjr.chrony
3030
version: v0.1.4
3131
- src: mrlesmithjr.manage_lvm

0 commit comments

Comments
 (0)