From 788d282960cf21c9687e85e721abd236db8699c8 Mon Sep 17 00:00:00 2001 From: Karthik S Date: Mon, 20 Jul 2020 11:42:26 +0000 Subject: [PATCH] Fixing the copy failure of derive_pci_passthrough_whitelist.py Copy operation in non-config download will run in the localhost within the overcloud node. In this case, the copy should use content rather than the absolute path. Change-Id: Ie35ab109d69ab5d2005f641ae48ee9272bf99c17 --- docker/services/neutron-sriov-agent.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docker/services/neutron-sriov-agent.yaml b/docker/services/neutron-sriov-agent.yaml index bcce398428..7703ac5fa5 100644 --- a/docker/services/neutron-sriov-agent.yaml +++ b/docker/services/neutron-sriov-agent.yaml @@ -141,9 +141,19 @@ outputs: owner: root group: root mode: 0750 + # in queens, ansible "host_tasks" are executed inside the overcloud node via os-collect-config + # in later versions (with config download), ansible is executed from the undercloud + # so in queens, abosolute path in the undercloud cannot be provided, instead file content is copied - name: derive pci passthrough whitelist copy: - src: /usr/share/openstack-tripleo-heat-templates/docker/services/derive_pci_passthrough_whitelist.py + content: + str_replace: + template: | + {% raw -%} + _DERIVE_CONTENT_ + {% endraw %} + params: + _DERIVE_CONTENT_: {get_file: ./derive_pci_passthrough_whitelist.py} dest: /var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py mode: 0700 - name: run derive_pci_passthrough_whitelist.py