From cf98ced1ecb9c490c73c6a2f558e36833641353f Mon Sep 17 00:00:00 2001 From: Michael Sherman Date: Wed, 25 Sep 2024 10:37:07 -0500 Subject: [PATCH] use swift backend for inspector --- kolla/defaults.yml | 2 ++ .../node_custom_config/ironic-inspector.conf | 25 +++++++++++++++++-- kolla/node_custom_config/ironic.conf | 2 +- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/kolla/defaults.yml b/kolla/defaults.yml index 8896a628..6dc0efd5 100644 --- a/kolla/defaults.yml +++ b/kolla/defaults.yml @@ -185,6 +185,8 @@ ironic_console_serial_speed: 115200n8 encoded_ironic_pxe_root_password: "{{ ironic_pxe_root_password | password_hash('md5') | regex_replace( '(\\$)', '$\\1') }}" ironic_kernel_append_params: nofb vga=normal console=tty0 console=ttyS0,{{ ironic_console_serial_speed }} rootpwd="{{ encoded_ironic_pxe_root_password }}" +ironic_inspector_store: database + # settings for ironic inspector # don't run standalone, always depend on glance+neutron+ironic. diff --git a/kolla/node_custom_config/ironic-inspector.conf b/kolla/node_custom_config/ironic-inspector.conf index 21365d1d..df99a2b7 100644 --- a/kolla/node_custom_config/ironic-inspector.conf +++ b/kolla/node_custom_config/ironic-inspector.conf @@ -25,7 +25,7 @@ update_pxe_enabled = true # The storage backend for storing introspection data. Possible values # are: 'none', 'database' and 'swift'. If set to 'none', introspection # data will not be stored. (string value) -store_data = database +store_data = "{{ ironic_inspector_store }}" # https://docs.openstack.org/ironic-inspector/2023.1/configuration/ironic-inspector.html#processing.processing_hooks # for choices, see https://docs.openstack.org/ironic-inspector/2023.1/user/usage.html#plugins @@ -34,4 +34,25 @@ processing_hooks = $default_processing_hooks,extra_hardware,lldp_basic,accelerat [capabilities] # Whether to store the boot mode (BIOS or UEFI). -boot_mode = true \ No newline at end of file +boot_mode = true + +{% if ironic_inspector_store == "swift" %} +[swift] +auth_url = {{ keystone_internal_url }} +auth_type = password +project_domain_id = {{ default_project_domain_id }} +user_domain_id = {{ default_user_domain_id }} +project_name = service +username = {{ ironic_inspector_keystone_user }} +password = {{ ironic_inspector_keystone_password }} +valid_interfaces = internal +region_name = {{ openstack_region_name }} + +# Default Swift container to use when creating objects. (string value) +container = ironic-inspector + +# Number of seconds that the Swift object will last before being +# deleted. (set to 0 to never delete the object). (integer value) +#delete_after = 0 + +{% endif %} diff --git a/kolla/node_custom_config/ironic.conf b/kolla/node_custom_config/ironic.conf index f8dbac61..d3624422 100644 --- a/kolla/node_custom_config/ironic.conf +++ b/kolla/node_custom_config/ironic.conf @@ -56,7 +56,7 @@ default_boot_option = local require_managed_boot = True # passed to ironic-python-agent, see : # https://docs.openstack.org/ironic-python-agent/latest/admin/how_it_works.html#inspection -extra_kernel_params = "ipa-inspection-collectors=default,pci-devices,dmi-decode,numa-topology,logs ipa-collect-lldp=1" +extra_kernel_params = "ipa-inspection-collectors=default,pci-devices,dmi-decode,numa-topology,extra-hardware,logs ipa-collect-lldp=1" [neutron] cleaning_network = "{{ ironic_cleaning_network }}"