Merge "Ask for confirmation during overcloud deprovision"

This commit is contained in:
Zuul 2024-02-05 10:50:10 +00:00 committed by Gerrit Code Review
commit e469e99eba
3 changed files with 29 additions and 1 deletions

View File

@ -29,8 +29,23 @@
ironic_retries: 6
ironic_retry_interval: 5
seed_host: "{{ groups['seed'][0] }}"
vars_prompt:
- name: confirm_deprovision
prompt: |
The following hosts will be deprovisioned:
{{ play_hosts | join(', ') }}
If you want to proceed type: yes
default: "no"
private: false
gather_facts: no
tasks:
- name: Fail if deprovision is not confirmed
assert:
that: confirm_deprovision == 'yes'
msg: >
Deprovision has not been confirmed. You must either type 'yes' when
prompted, or set ``confirm_deprovision=yes``.
- name: Check the ironic node's initial provision state
command: >
docker exec bifrost_deploy

View File

@ -181,7 +181,9 @@ Deprovisioning The Cloud
.. note::
This step will power down the overcloud hosts and delete their nodes'
instance state from the seed's ironic service.
instance state from the seed's ironic service. This command will print a
list of hosts which will be deprovisioned, you must type ``yes`` to confirm.
To automatically confirm, pass the variable ``-e confirm_deprovision=yes``.
To deprovision the overcloud::

View File

@ -0,0 +1,11 @@
---
features:
- |
``kayobe overcloud deprovision`` now requires confirmation before any hosts
are deprovisioned. Automatic confirmation can still be achieved by setting
``confirm_deprovision`` to ``yes``.
upgrade:
- |
``kayobe overcloud deprovision`` now requires confirmation before any hosts
are deprovisioned. Automatic confirmation can still be achieved by setting
``confirm_deprovision`` to ``yes``.