From f555e6929fe6332f19a5c0f861fcf8ea2d6e8f62 Mon Sep 17 00:00:00 2001 From: Heitor Matsui Date: Thu, 6 Jan 2022 11:47:47 -0300 Subject: [PATCH] Adapt pci-irq helm chart for oslo_config The pci-irq-affinity-agent currently uses two mechanisms to store its configuration parameters, and this is being unified in [1] to use only oslo_config. As the agent uses a custom config file in a path not used by default by oslo_config, it will be needed to pass this path as argument when running the application, so this commit changes the helm chart to pass the agent config file with the "--config-file" argument used by oslo_config. [1] https://review.opendev.org/c/starlingx/utilities/+/822540 Test Plan: PASS: Verify that agent definition is created with the argument --config-file PASS: Verify that the agent command script runs without errors PASS: Verify that the health probe script runs without errors Regression: PASS: Verify that OpenStack applies successfully Story: 2009299 Task: 44214 Change-Id: Ibd9b8c9537ccd46351a4ec511a36c273ae0536b4 Signed-off-by: Heitor Matsui --- .../pci-irq-affinity-agent/templates/bin/_start.py.tpl | 2 +- .../pci-irq-affinity-agent/templates/bin/_start.sh.tpl | 2 +- .../helm-charts/pci-irq-affinity-agent/templates/daemonset.yaml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/bin/_start.py.tpl b/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/bin/_start.py.tpl index 950eb7136..91947c2c2 100644 --- a/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/bin/_start.py.tpl +++ b/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/bin/_start.py.tpl @@ -10,7 +10,7 @@ Startup script for PCI IRQ Affinity Agent. Usage example: -# python start.py +# python start.py --config-file /etc/pci_irq_affinity/config.ini """ diff --git a/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/bin/_start.sh.tpl b/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/bin/_start.sh.tpl index 61875d726..0b279bbea 100644 --- a/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/bin/_start.sh.tpl +++ b/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/bin/_start.sh.tpl @@ -7,4 +7,4 @@ # # Script to encapsulate the starting routines -python /tmp/start.py +python /tmp/start.py --config-file=/etc/pci_irq_affinity/config.ini diff --git a/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/daemonset.yaml b/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/daemonset.yaml index fc57dcdd6..bfddbb92d 100644 --- a/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/daemonset.yaml +++ b/stx-openstack-helm/stx-openstack-helm/helm-charts/pci-irq-affinity-agent/templates/daemonset.yaml @@ -60,6 +60,7 @@ spec: command: - python - /tmp/health-probe.py + - --config-file=/etc/pci_irq_affinity/config.ini initialDelaySeconds: 30 periodSeconds: 180 timeoutSeconds: 165 @@ -70,6 +71,7 @@ spec: command: - python - /tmp/health-probe.py + - --config-file=/etc/pci_irq_affinity/config.ini - --liveness-probe initialDelaySeconds: 60 periodSeconds: 60