From 2eaa4e1aa0364d1015b41a242b36c728b180e9e0 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 18 Dec 2023 01:45:23 +0900 Subject: [PATCH] inspector: Prepare to use ironic-inspector user by default Currently even ironic-inspector services use the ironic keystone user though the ironic-inspector keystone user is created. This adds a warning message to make users aware of the future change to use the own service user. Change-Id: I62b7cf88496a811f4068244d7a3fb563a53aa1d6 --- manifests/inspector/authtoken.pp | 4 ++++ manifests/inspector/ironic.pp | 4 ++++ manifests/inspector/service_catalog.pp | 4 ++++ manifests/inspector/swift.pp | 4 ++++ ...tch-to-ironic-inspector-user-702ad9a5eb605583.yaml | 11 +++++++++++ 5 files changed, 27 insertions(+) create mode 100644 releasenotes/notes/switch-to-ironic-inspector-user-702ad9a5eb605583.yaml diff --git a/manifests/inspector/authtoken.pp b/manifests/inspector/authtoken.pp index fc4597f5..034f06a7 100644 --- a/manifests/inspector/authtoken.pp +++ b/manifests/inspector/authtoken.pp @@ -237,6 +237,10 @@ class ironic::inspector::authtoken( include ironic::deps + if $username == 'ironic' { + warning('The default username will be changed to ironic-inspector in a future release') + } + keystone::resource::authtoken { 'ironic_inspector_config': * => $params; diff --git a/manifests/inspector/ironic.pp b/manifests/inspector/ironic.pp index 1b050a81..995f4332 100644 --- a/manifests/inspector/ironic.pp +++ b/manifests/inspector/ironic.pp @@ -76,6 +76,10 @@ class ironic::inspector::ironic ( $retry_interval = $facts['os_service_default'], ) { + if $username == 'ironic' { + warning('The default username will be changed to ironic-inspector in a future release') + } + if is_service_default($system_scope) { $project_name_real = $project_name $project_domain_name_real = $project_domain_name diff --git a/manifests/inspector/service_catalog.pp b/manifests/inspector/service_catalog.pp index 7c94e8a1..c391319d 100644 --- a/manifests/inspector/service_catalog.pp +++ b/manifests/inspector/service_catalog.pp @@ -68,6 +68,10 @@ class ironic::inspector::service_catalog ( include ironic::deps + if $username == 'ironic' { + warning('The default username will be changed to ironic-inspector in a future release') + } + if is_service_default($system_scope) { $project_name_real = $project_name $project_domain_name_real = $project_domain_name diff --git a/manifests/inspector/swift.pp b/manifests/inspector/swift.pp index 36a05caf..372808cf 100644 --- a/manifests/inspector/swift.pp +++ b/manifests/inspector/swift.pp @@ -78,6 +78,10 @@ class ironic::inspector::swift ( $delete_after = $facts['os_service_default'], ) { + if $username == 'ironic' { + warning('The default username will be changed to ironic-inspector in a future release') + } + if is_service_default($system_scope) { $project_name_real = $project_name $project_domain_name_real = $project_domain_name diff --git a/releasenotes/notes/switch-to-ironic-inspector-user-702ad9a5eb605583.yaml b/releasenotes/notes/switch-to-ironic-inspector-user-702ad9a5eb605583.yaml new file mode 100644 index 00000000..5e451520 --- /dev/null +++ b/releasenotes/notes/switch-to-ironic-inspector-user-702ad9a5eb605583.yaml @@ -0,0 +1,11 @@ +--- +upgrade: + - | + Default value of the username parameters in the following classes will be + changed from ``ironic`` to ``ironic-inspector`` in a future release. Set + the username parameters explicitly to keep using the ``ironic`` user. + + - ``ironic::inspector::authtoken`` + - ``ironic::inspector::ironic`` + - ``ironic::inspector::service_catalog`` + - ``ironic::inspector::swift``