Skip to content

Commit 044b065

Browse files
authored
Merge pull request #500 from stackhpc/upstream/master-2025-12-01
Synchronise master with upstream
2 parents 9a85417 + 1b7b9f2 commit 044b065

File tree

15 files changed

+191
-53
lines changed

15 files changed

+191
-53
lines changed

ansible/inventory/group_vars/all/inspector

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,24 @@ inspector_rule_ipmi_credentials:
119119
description: "Set IPMI driver_info if no credentials"
120120
conditions:
121121
- args:
122-
value: "{node.driver_info.ipmi_username}"
123-
regex: '\\{node\\.driver_info\\.ipmi_username\\}'
122+
# If value matches itself as a regex, this is becaused interpolation
123+
# failed which means the ipmi_username key was not set.
124+
value: "{node.driver_info[ipmi_username]}"
125+
regex: "{node\\.driver_info\\[ipmi_username\\]}"
124126
op: "matches"
125127
- args:
126-
value: "{node.driver_info.ipmi_password}"
127-
regex: '\\{node\\.driver_info\\.ipmi_password\\}'
128+
value: "{node.driver_info[ipmi_password]}"
129+
regex: "{node\\.driver_info\\[ipmi_password\\]}"
128130
op: "matches"
129131
sensitive: "true"
130132
actions:
131133
- op: "set-attribute"
132134
args:
133-
path: "driver_info/ipmi_username"
135+
path: "/driver_info/ipmi_username"
134136
value: "{{ inspector_rule_var_ipmi_username }}"
135137
- op: "set-attribute"
136138
args:
137-
path: "driver_info/ipmi_password"
139+
path: "/driver_info/ipmi_password"
138140
value: "{{ inspector_rule_var_ipmi_password }}"
139141

140142
# Deployment kernel referenced by inspector rule.
@@ -145,13 +147,13 @@ inspector_rule_deploy_kernel:
145147
description: "Set deploy kernel"
146148
conditions:
147149
- args:
148-
value: "{node.driver_info.deploy_kernel}"
149-
regex: '\\{node\\.driver_info\\.deploy_kernel\\}'
150+
value: "{node.driver_info[deploy_kernel]}"
151+
regex: "{node\\.driver_info\\[deploy_kernel\\]}"
150152
op: "matches"
151153
actions:
152154
- op: "set-attribute"
153155
args:
154-
path: "driver_info/deploy_kernel"
156+
path: "/driver_info/deploy_kernel"
155157
value: "{{ inspector_rule_var_deploy_kernel }}"
156158

157159
# Deployment ramdisk referenced by inspector rule.
@@ -162,13 +164,13 @@ inspector_rule_deploy_ramdisk:
162164
description: "Set deploy ramdisk"
163165
conditions:
164166
- args:
165-
value: "{node.driver_info.deploy_ramdisk}"
166-
regex: '\\{node\\.driver_info\\.deploy_ramdisk\\}'
167+
value: "{node.driver_info[deploy_ramdisk]}"
168+
regex: "{node\\.driver_info\\[deploy_ramdisk\\]}"
167169
op: "matches"
168170
actions:
169171
- op: "set-attribute"
170172
args:
171-
path: "driver_info/deploy_ramdisk"
173+
path: "/driver_info/deploy_ramdisk"
172174
value: "{{ inspector_rule_var_deploy_ramdisk }}"
173175

174176
# Ironic inspector rule to set serial root device hint.
@@ -177,27 +179,29 @@ inspector_rule_root_hint_serial:
177179
conditions:
178180
- args:
179181
value: "{node.properties[root_device]}"
180-
regex: "\\{node\\.properties\\[root_device\\]\\}"
182+
regex: "{node\\.properties\\[root_device\\]}"
181183
op: "matches"
184+
- args:
185+
value: "{plugin_data[root_disk][serial]}"
186+
op: "!is-empty"
182187
actions:
183188
- op: "set-attribute"
184189
args:
185-
path: "properties/root_device/name"
186-
value: "{plugin_data[root_disk][by_path]}"
187-
190+
path: "/properties/root_device/serial"
191+
value: "{plugin_data[root_disk][serial]}"
188192

189193
# Ironic inspector rule to set the interface on which the node PXE booted.
190194
inspector_rule_set_pxe_interface_mac:
191195
description: "Set node PXE interface MAC address"
192196
conditions:
193197
- args:
194198
value: "{plugin_data[boot_interface]}"
195-
regex: "'\\{plugin_data\\[boot_interface\\]\\}'"
199+
regex: "{plugin_data\\[boot_interface\\]}"
196200
op: "!matches"
197201
actions:
198202
- op: "set-attribute"
199203
args:
200-
path: "extra/pxe_interface_mac"
204+
path: "/extra/pxe_interface_mac"
201205
value: "{plugin_data[boot_interface]}"
202206

203207
# Name of network interface to use for LLDP referenced by switch port
@@ -255,7 +259,7 @@ inspector_rule_lldp_switch_port_desc_to_name:
255259
actions:
256260
- op: "set-attribute"
257261
args:
258-
path: "name"
262+
path: "/name"
259263
value: "{{ _inspector_rule_switch_port_description_path }}"
260264

261265
# Ironic inspector rule to save system vendor manufacturer data in the node's
@@ -264,17 +268,17 @@ inspector_rule_save_system_vendor_manufacturer:
264268
description: "Save system vendor manufacturer data in Ironic node metadata"
265269
conditions:
266270
- args:
267-
value: "{inventory.system_vendor}"
268-
regex: "\\{inventory\\.system_vendor\\}"
271+
value: "{inventory[system_vendor]}"
272+
regex: "{inventory\\[system_vendor\\]}"
269273
op: "!matches"
270274
- args:
271-
value: "{inventory.system_vendor.manufacturer}"
272-
regex: "\\{inventory\\.system_vendor\\.manufacturer\\}"
275+
value: "{inventory[system_vendor][manufacturer]}"
276+
regex: "{inventory\\[system_vendor\\]\\[manufacturer\\]}"
273277
op: "!matches"
274278
actions:
275279
- op: "set-attribute"
276280
args:
277-
path: "extra/system_vendor/manufacturer"
281+
path: "/extra/system_vendor/manufacturer"
278282
value: "{inventory[system_vendor][manufacturer]}"
279283

280284
# Ironic inspector rule to save system vendor serial number in the node's
@@ -283,17 +287,17 @@ inspector_rule_save_system_vendor_serial_number:
283287
description: "Save system vendor serial number in Ironic node metadata"
284288
conditions:
285289
- args:
286-
value: "{inventory.system_vendor}"
287-
regex: "\\{inventory\\.system_vendor\\}"
290+
value: "{inventory[system_vendor]}"
291+
regex: "{inventory\\[system_vendor\\]}"
288292
op: "!matches"
289293
- args:
290-
value: "{inventory.system_vendor.serial_number}"
291-
regex: "\\{inventory\\.system_vendor\\.serial_number\\}"
294+
value: "{inventory[system_vendor][serial_number]}"
295+
regex: "{inventory\\[system_vendor\\]\\[serial_number\\]}"
292296
op: "!matches"
293297
actions:
294298
- op: "set-attribute"
295299
args:
296-
path: "extra/system_vendor/serial_number"
300+
path: "/extra/system_vendor/serial_number"
297301
value: "{inventory[system_vendor][serial_number]}"
298302

299303
# Ironic inspector rule to save system vendor product name in the node's
@@ -302,17 +306,17 @@ inspector_rule_save_system_vendor_product_name:
302306
description: "Save system vendor product name in Ironic node metadata"
303307
conditions:
304308
- args:
305-
value: "{inventory.system_vendor}"
306-
regex: "\\{inventory\\.system_vendor\\}"
309+
value: "{inventory[system_vendor]}"
310+
regex: "{inventory\\[system_vendor\\]}"
307311
op: "!matches"
308312
- args:
309-
value: "{inventory.system_vendor.product_name}"
310-
regex: "\\{inventory\\.system_vendor\\.product_name\\}"
313+
value: "{inventory[system_vendor][product_name]}"
314+
regex: "{inventory\\[system_vendor\\]\\[product_name\\]}"
311315
op: "!matches"
312316
actions:
313317
- op: "set-attribute"
314318
args:
315-
path: "extra/system_vendor/product_name"
319+
path: "/extra/system_vendor/product_name"
316320
value: "{inventory[system_vendor][product_name]}"
317321

318322
# Ironic inspector rule to save introspection data to the node.
@@ -322,11 +326,11 @@ inspector_rule_save_data:
322326
actions:
323327
- op: "set-attribute"
324328
args:
325-
path: "extra/introspection_data/inventory"
329+
path: "/extra/introspection_data/inventory"
326330
value: "{inventory}"
327331
- op: "set-attribute"
328332
args:
329-
path: "extra/introspection_data/plugin_data"
333+
path: "/extra/introspection_data/plugin_data"
330334
value: "{plugin_data}"
331335

332336
# Redfish rules
@@ -335,50 +339,50 @@ inspector_rule_redfish_credentials:
335339
description: "Set Redfish driver_info if no credentials"
336340
conditions:
337341
- args:
338-
value: "{node.driver_info.redfish_username}"
339-
regex: "\\{node\\.driver_info\\.redfish_username\\}"
342+
value: "{node.driver_info[redfish_username]}"
343+
regex: "{node\\.driver_info\\[redfish_username\\]}"
340344
op: "matches"
341345
- args:
342-
value: "{node.driver_info.redfish_password}"
343-
regex: "\\{node\\.driver_info\\.redfish_password\\}"
346+
value: "{node.driver_info[redfish_password]}"
347+
regex: "{node\\.driver_info\\[redfish_password\\]}"
344348
op: "matches"
345349
sensitive: true
346350
actions:
347351
- op: "set-attribute"
348352
args:
349-
path: "driver_info/redfish_username"
353+
path: "/driver_info/redfish_username"
350354
value: "{{ inspector_rule_var_redfish_username }}"
351355
- op: "set-attribute"
352356
args:
353-
path: "driver_info/redfish_password"
357+
path: "/driver_info/redfish_password"
354358
value: "{{ inspector_rule_var_redfish_password }}"
355359

356360
# Ironic inspector rule to set Redfish address.
357361
inspector_rule_redfish_address:
358362
description: "Set Redfish address"
359363
conditions:
360364
- args:
361-
value: "{node.driver_info.redfish_address}"
362-
regex: "\\{node\\.driver_info\\.redfish_address\\}"
365+
value: "{node.driver_info[redfish_address]}"
366+
regex: "{node\\.driver_info\\[redfish_address\\]}"
363367
op: "matches"
364368
actions:
365369
- op: "set-attribute"
366370
args:
367-
path: "driver_info/redfish_address"
371+
path: "/driver_info/redfish_address"
368372
value: "{inventory[bmc_address]}"
369373

370374
# Ironic inspector rule to set Redfish certificate authority.
371375
inspector_rule_redfish_verify_ca:
372376
description: "Set Redfish Verify CA"
373377
conditions:
374378
- args:
375-
value: "{node.driver_info.redfish_verify_ca}"
376-
regex: "\\{node\\.driver_info\\.redfish_verify_ca\\}"
379+
value: "{node.driver_info[redfish_verify_ca]}"
380+
regex: "{node\\.driver_info\\[redfish_verify_ca\\]}"
377381
op: "matches"
378382
actions:
379383
- op: "set-attribute"
380384
args:
381-
path: "driver_info/redfish_verify_ca"
385+
path: "/driver_info/redfish_verify_ca"
382386
value: "{{ inspector_rule_var_redfish_verify_ca }}"
383387

384388
# List of default ironic inspector rules.
@@ -421,4 +425,3 @@ inspector_rules: "{{ inspector_rules_default + inspector_rules_extra + (inspecto
421425
# Ansible group containing switch hosts to which the workaround should be
422426
# applied.
423427
inspector_dell_switch_lldp_workaround_group:
424-

ansible/kayobe-target-venv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
become: True
120120
when: kayobe_virtualenv is not defined
121121

122-
- name: Ensure kolla-ansible virtualenv has docker SDK for python installed
122+
- name: Ensure kayobe virtualenv has docker SDK for python installed
123123
pip:
124124
name: docker
125125
state: latest

ansible/network-connectivity.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
ping {{ remote_ip }} -c1 -M do {% if mtu %} -s {{ mtu | int - icmp_overhead_bytes }}{% endif %}
7070
with_items: "{{ network_interfaces }}"
7171
loop_control:
72-
label: "{{ remote_host }} on {{ item }}"
72+
label: "{{ remote_host | default('none', true) }} on {{ item }}"
7373
when:
7474
- remote_hosts | length > 0
7575
- remote_ip | length > 0
@@ -90,6 +90,6 @@
9090
# when check: remote_ip | length > 0, would pass, but remote_ip was ''
9191
# in the command. Assumption was that this was being evaluated once
9292
# for the when clause and then again for the command. Bug?
93-
remote_host: "{{ remote_hosts | random(seed=ansible_facts.date_time.iso8601) }}"
93+
remote_host: "{{ remote_hosts | random(seed=ansible_facts.date_time.iso8601) if remote_hosts | length > 0 else '' }}"
9494
remote_ip: "{{ lookup('cached', 'vars', item ~ '_ips', default={})[remote_host] | default('', true) }}"
9595
mtu: "{{ item | net_mtu }}"

dev/functions

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,47 @@ function overcloud_test_bounce_interface {
618618
run_kayobe overcloud host configure -t network
619619
}
620620

621+
function overcloud_inspection_rule_dump {
622+
echo "Listing inspection rules ..."
623+
openstack baremetal inspection rule list
624+
echo "Dumping inspection rules ..."
625+
openstack baremetal inspection rule list -c UUID -f value | xargs -L 1 openstack baremetal inspection rule show
626+
}
627+
628+
function overcloud_test_inspect {
629+
set -eu
630+
node=$1
631+
632+
environment_setup
633+
634+
source "${KOLLA_CONFIG_PATH:-/etc/kolla}/admin-openrc-system.sh"
635+
636+
overcloud_inspection_rule_dump
637+
638+
echo "Baremetal node: $node before inspection"
639+
openstack baremetal node show "$node"
640+
641+
# NOTE(wszumski): Switch to using kayobe playbooks to manage and inspect
642+
# when we switch to node registration
643+
644+
if [ "$(openstack baremetal node show -c provision_state -f value $node)" != "manageable" ]; then
645+
openstack baremetal node manage "$node" --wait
646+
fi
647+
648+
# Run inspection
649+
openstack baremetal node inspect "$node" --wait
650+
651+
echo "Baremetal node: $node after inspection"
652+
openstack baremetal node show $node
653+
openstack baremetal node inventory save $node
654+
655+
# Use Kayobe to save introspection data
656+
run_kayobe baremetal compute introspection data save --limit "baremetal-compute,controllers[0]" --output-dir /tmp/baremetal-compute-inspection-data
657+
658+
# Move back to available
659+
openstack baremetal node provide "$node" --wait
660+
}
661+
621662
function overcloud_test {
622663
set -eu
623664

dev/overcloud-test-inspect.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
set -o pipefail
5+
6+
PARENT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+
8+
source "${PARENT}/functions"
9+
10+
11+
function main {
12+
config_init
13+
overcloud_test_inspect tk0
14+
}
15+
16+
main

doc/source/contributor/releases.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,21 @@ Stable Releases
242242

243243
Stable branch releases should be made periodically for each supported stable
244244
branch, no less than once every 45 days.
245+
246+
Transitioning to Unmaintained
247+
=============================
248+
249+
When an OpenStack release transitions to `Unmaintained
250+
<https://docs.openstack.org/project-team-guide/stable-branches.html#maintenance-phases>`__,
251+
all references to ``stable/<openstack_release>`` need to be changed to
252+
``unmaintained/<openstack_release>``. This change needs to be made on the new
253+
unmaintained branch. For example, see
254+
https://review.opendev.org/c/openstack/kayobe/+/968298.
255+
256+
Transitioning to End of Life (EOL)
257+
==================================
258+
259+
When an OpenStack release transitions to `End of Life (EOL)
260+
<https://docs.openstack.org/project-team-guide/stable-branches.html#maintenance-phases>`__,
261+
upgrade jobs in later releases need to be removed. For example, see
262+
https://review.opendev.org/c/openstack/kayobe/+/968296.

doc/source/usage.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ Environment variable: ``ANSIBLE_VAULT_PASSWORD_FILE``
4848
password from a (plain text) file, with the path to that file being read
4949
from the environment.
5050

51+
Whilst the kolla passwords file ``kolla/passwords.yml`` should remain encrypted
52+
at all times it can be useful to view the contents of this file to acquire a
53+
password for a given service.
54+
This can be done with ``ansible-vault view`` however if an absolute path is not
55+
provided it will cause the command to fail.
56+
Therefore, to make reading the contents of this file easier for administrators
57+
it is possible to use ``kayobe overcloud passwords view`` which will
58+
temporarily decrypt and display the contents of ``kolla/passwords.yml`` for the
59+
active kayobe environment.
60+
5161
Limiting Hosts
5262
--------------
5363

0 commit comments

Comments
 (0)