Skip to content

Commit 5d24308

Browse files
Merge pull request #1412 from rebtoor/fix/nova-verify-ironic-post-adoption-guard
nova_verify, pre_launch_ironic: fix ironic post-adoption provisioning
2 parents b7d69fe + 2fe2c57 commit 5d24308

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

tests/roles/dataplane_adoption/tasks/nova_verify.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
when:
5959
- prelaunch_test_instance|bool
6060
- "'pre_launch_ironic.bash' in prelaunch_test_instance_scripts"
61+
- ironic_post_adoption_create_instance|bool
6162
ansible.builtin.shell: |
6263
{{ shell_header }}
6364
{{ oc_header }}

tests/roles/development_environment/files/pre_launch_ironic.bash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ else
132132
echo "Found $ACTIVE_NODES active node(s), skipping node management operations"
133133
fi
134134

135+
# Ensure quota has headroom for pre-adoption and post-adoption test instances
136+
CURRENT_QUOTA=$(${BASH_ALIASES[openstack]} quota show -c instances -f value)
137+
${BASH_ALIASES[openstack]} quota set --instances $((CURRENT_QUOTA + 2)) default
138+
135139
# Create test instance on baremetal
136140
if [[ "${PRE_LAUNCH_IRONIC_CREATE_INSTANCE,,}" != "false" ]]; then
137141
# Wait for nova to be aware of the node

tests/roles/ironic_adoption/defaults/main.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ ironic_retry_delay: 5
109109
ironic_post_adoption_manage_nodes: false
110110
ironic_post_adoption_inspect_nodes: false
111111
ironic_post_adoption_provide_nodes: false
112+
ironic_post_adoption_create_instance: true

0 commit comments

Comments
 (0)