Merge "Enable metadata cleaning by default"

This commit is contained in:
Zuul 2020-07-20 10:08:45 +00:00 committed by Gerrit Code Review
commit be7f82e6c6
11 changed files with 42 additions and 18 deletions

View File

@ -153,6 +153,7 @@ def cmd_install(args):
use_public_urls=args.enable_keystone,
noauth_mode=not args.enable_keystone,
enabled_hardware_types=args.hardware_types,
cleaning_disk_erase=args.cleaning_disk_erase,
testing=args.testenv,
use_cirros=args.testenv,
use_tinyipa=args.testenv,
@ -212,6 +213,10 @@ def parse_args():
default='ipmi,redfish,manual-management',
help='a comma separated list of enabled bare metal '
'hardware types')
install.add_argument('--cleaning-disk-erase',
action='store_true', default=False,
help='enable full disk cleaning between '
'deployments (can take a lot of time)')
args = parser.parse_args()
if getattr(args, 'func', None) is None:

View File

@ -25,10 +25,6 @@ Command::
Note:
- Cleaning mode is explicitly disabled in the ``test-bifrost.yaml``
playbook due to the fact that is an IO-intensive operation that can
take a great deal of time.
- In order to cap requirements for installation, an ``upper_constraints_file``
setting is defined. This is consuming the ``UPPER_CONSTRAINTS_FILE`` env
var by default, to properly integrate with CI systems, and will default

View File

@ -384,14 +384,16 @@ to prompt for the sudo password::
ansible-playbook -K -vvvv -i inventory/target install.yaml
With regard to testing, ironic's node cleaning capability is disabled by
default as it can be an unexpected surprise for a new user that their test
node is unusable for however long it takes for the disks to be wiped.
With regard to testing, ironic's node cleaning capability is enabled by
default, but only metadata cleaning is turned on, as it can be an unexpected
surprise for a new user that their test node is unusable for however long it
takes for the disks to be wiped.
If you wish to enable cleaning, you can achieve this by passing the option
``-e cleaning=true`` to the command line or executing the command below::
If you wish to enable full cleaning, you can achieve this by passing the option
``-e cleaning_disk_erase=true`` to the command line or executing the command
below::
ansible-playbook -K -vvvv -i inventory/target install.yaml -e cleaning=true
ansible-playbook -K -vvvv -i inventory/target install.yaml -e cleaning_disk_erase=true
After you have performed an installation, you can edit
``/etc/ironic/ironic.conf`` to enable or disable cleaning as desired.

View File

@ -30,10 +30,11 @@ removes the previous contents of a node once it has been moved from an
active to available state, such as setting the provision state to deleted.
Bifrost disables this by default in order to allow initial users to not be
impacted by node cleaning operations upfront when they are testing and
evaluating bifrost. In the event of a production deployment, cleaning
should be enabled.
evaluating bifrost. Only metadata cleaning is enabled by default, but any
production environment should have full cleaning enabled.
cleaning: false
cleaning: true
cleaning_disk_erase: false
The ironic python client and openstacksdk libraries can be installed directly
from Git. The default is to utilize pip to install the current versions in pypi,
@ -319,7 +320,6 @@ Example Playbook
gather_facts: yes
roles:
- role: bifrost-ironic-install
cleaning: false
testing: true
network_interface: "virbr0"

View File

@ -1,7 +1,9 @@
---
# Cleaning turns on ironic conductor clean_nodes flag
# which causes the nodes to be wiped after deletion.
cleaning: false
cleaning: true
# Wipe all data from the disks rather than only the metadata.
cleaning_disk_erase: false
# Enable fast_track mode for ironic which allows skipping a power
# cycle

View File

@ -65,9 +65,15 @@ http_url = http://{{ internal_ip }}:{{ file_url_port }}/
http_root = {{ http_boot_folder }}
default_boot_option = local
fast_track = {{ fast_track }}
{% if cleaning_disk_erase | bool %}
erase_devices_priority = 10
erase_devices_metadata_priority = 0
{% else %}
erase_devices_priority = 0
erase_devices_metadata_priority = 10
{% endif %}
[conductor]
clean_nodes = {{ cleaning | lower }}
automated_clean = {{ cleaning | lower }}
deploy_kernel = {{ ipa_kernel_url }}
deploy_ramdisk = {{ ipa_ramdisk_url }}

View File

@ -100,7 +100,6 @@ Example Playbook
- role: bifrost-prep-for-install
when: not (skip_install | default(false) | bool)
- role: bifrost-ironic-install
cleaning: false
testing: true
License

View File

@ -1,3 +1,4 @@
---
ironic_url: "http://localhost:6385/"
noauth_mode: true
wait_for_node_undeploy: false

View File

@ -43,3 +43,4 @@
name: "{{ name | default() }}"
state: absent
instance_info: "{}"
wait: "{{ wait_for_node_undeploy }}"

View File

@ -47,7 +47,6 @@
roles:
- role: bifrost-keystone-install
- role: bifrost-ironic-install
cleaning: false
testing: true
# NOTE(TheJulia): While the next step creates a ramdisk, some elements
# do not support ramdisk-image-create as they invoke steps to cleanup
@ -132,6 +131,7 @@
gather_facts: no
roles:
- role: bifrost-unprovision-node-dynamic
wait_for_node_undeploy: true
- role: ironic-delete-dynamic
# The following tasks are intended to test DHCP functionality

View File

@ -0,0 +1,12 @@
---
features:
- |
Metadata cleaning is now enabled by default, set ``cleaning`` to ``false``
to disable completely.
- |
To enable full disk cleaning, set ``cleaning_disk_erase`` to ``true``.
upgrade:
- |
If you use ``cleaning=true`` to enable full disk cleaning, you need to
also set ``cleaning_disk_erase=true`` now. Omitting it will result in
only metadata cleaning enabled.