From e877ec3d2d1988e100d6fc6c69c9e7510f0b6e0e Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 11 Jul 2024 12:46:43 +0200 Subject: [PATCH] ironic: Make ironic-inspector optional It has been deprecated in 2024.2 cycle - see [1]. [1]: https://review.opendev.org/c/openstack/ironic-inspector/+/923170 Change-Id: I8b8dbb84d25078c533d9eaf80103609bc6fd5d48 --- ansible/group_vars/all.yml | 1 + ansible/roles/ironic/defaults/main.yml | 2 +- ansible/roles/ironic/tasks/bootstrap_service.yml | 4 +++- .../notes/deprecate-inspector-86fb3aa691099267.yaml | 10 ++++++++++ tests/test-ironic.sh | 2 -- 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/deprecate-inspector-86fb3aa691099267.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 90dbc53596..db1dde3ebb 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -901,6 +901,7 @@ enable_horizon_zun: "{{ enable_zun | bool }}" enable_influxdb: "{{ enable_cloudkitty | bool and cloudkitty_storage_backend == 'influxdb' }}" enable_ironic: "no" enable_ironic_dnsmasq: "{{ enable_ironic | bool }}" +enable_ironic_inspector: "no" enable_ironic_neutron_agent: "{{ enable_neutron | bool and enable_ironic | bool }}" enable_ironic_prometheus_exporter: "{{ enable_ironic | bool and enable_prometheus | bool }}" enable_iscsid: "{{ enable_cinder | bool and enable_cinder_backend_iscsi | bool }}" diff --git a/ansible/roles/ironic/defaults/main.yml b/ansible/roles/ironic/defaults/main.yml index 8f5d7bc9f2..92f6981195 100644 --- a/ansible/roles/ironic/defaults/main.yml +++ b/ansible/roles/ironic/defaults/main.yml @@ -36,7 +36,7 @@ ironic_services: ironic-inspector: container_name: ironic_inspector group: ironic-inspector - enabled: true + enabled: "{{ enable_ironic_inspector }}" image: "{{ ironic_inspector_image_full }}" privileged: True volumes: "{{ ironic_inspector_default_volumes + ironic_inspector_extra_volumes }}" diff --git a/ansible/roles/ironic/tasks/bootstrap_service.yml b/ansible/roles/ironic/tasks/bootstrap_service.yml index bb8a4e5e6e..b1ade0333d 100644 --- a/ansible/roles/ironic/tasks/bootstrap_service.yml +++ b/ansible/roles/ironic/tasks/bootstrap_service.yml @@ -43,7 +43,9 @@ volumes: "{{ ironic_inspector.volumes | reject('equalto', '') | list }}" run_once: True delegate_to: "{{ groups[ironic_inspector.group][0] }}" - when: inventory_hostname in groups[ironic_inspector.group] + when: + - inventory_hostname in groups[ironic_inspector.group] + - enable_ironic_inspector | bool - name: Running ironic-tftp bootstrap container vars: diff --git a/releasenotes/notes/deprecate-inspector-86fb3aa691099267.yaml b/releasenotes/notes/deprecate-inspector-86fb3aa691099267.yaml new file mode 100644 index 0000000000..99b595f456 --- /dev/null +++ b/releasenotes/notes/deprecate-inspector-86fb3aa691099267.yaml @@ -0,0 +1,10 @@ +--- +upgrade: + - | + ``enable_ironic_inspector`` is set to ``no`` by default, due to Ironic + Inspector project deprecation (and plans for removal). +deprecations: + - | + ``ironic-inspector`` deployment is deprecated for removal once + implementation in Ironic reaches feature parity. See + `Ironic Inspector deprecation notice `_ diff --git a/tests/test-ironic.sh b/tests/test-ironic.sh index 4b011669aa..b182dcc52d 100755 --- a/tests/test-ironic.sh +++ b/tests/test-ironic.sh @@ -21,8 +21,6 @@ function test_ironic_logged { openstack --os-cloud kolla-admin-system-internal baremetal driver list openstack baremetal node list openstack baremetal port list - # Ironic Inspector API - openstack baremetal introspection rule list openstack baremetal node show tk0 openstack baremetal node power off tk0