From 85d9cf4956e51902509bdc2ac31cf213f5489d76 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Wed, 23 Jan 2019 00:23:02 +0000 Subject: [PATCH] Revert "post_deploy: support python3 for undercloud scripts." This reverts commit 1143714b340cc5a3c9ed422af54fc12993067005. So we're actually changing this out in packaging. It'll fail if you deploy from code, but the fedora version of the package should end up with /usr/bin/python3. This is why we didn't hit this in CI. https://review.rdoproject.org/r/#/c/18465/ Change-Id: Ibad6ff84b33ae3d6011c87028fe02695eea69482 --- extraconfig/post_deploy/clouds_yaml.py | 2 +- extraconfig/post_deploy/standalone_post.yaml | 7 +----- .../undercloud_ctlplane_network.py | 2 +- extraconfig/post_deploy/undercloud_post.py | 2 +- extraconfig/post_deploy/undercloud_post.yaml | 25 +++---------------- 5 files changed, 7 insertions(+), 31 deletions(-) diff --git a/extraconfig/post_deploy/clouds_yaml.py b/extraconfig/post_deploy/clouds_yaml.py index bda3238c74..308fec9459 100755 --- a/extraconfig/post_deploy/clouds_yaml.py +++ b/extraconfig/post_deploy/clouds_yaml.py @@ -1,4 +1,4 @@ -#!/usr/bin/env $PYTHON +#!/usr/bin/env python import os import yaml diff --git a/extraconfig/post_deploy/standalone_post.yaml b/extraconfig/post_deploy/standalone_post.yaml index 34f431a938..8f6814d011 100644 --- a/extraconfig/post_deploy/standalone_post.yaml +++ b/extraconfig/post_deploy/standalone_post.yaml @@ -98,12 +98,7 @@ resources: - name: region_name - name: user_name - name: user_domain_name - config: - str_replace: - template: - {get_file: ./clouds_yaml.py} - params: - $PYTHON: {get_param: PythonInterpreter} + config: {get_file: ./clouds_yaml.py} CloudsYamlDeployment: type: OS::Heat::SoftwareDeployments diff --git a/extraconfig/post_deploy/undercloud_ctlplane_network.py b/extraconfig/post_deploy/undercloud_ctlplane_network.py index 4bf37e6f1a..387a1d0adb 100755 --- a/extraconfig/post_deploy/undercloud_ctlplane_network.py +++ b/extraconfig/post_deploy/undercloud_ctlplane_network.py @@ -1,4 +1,4 @@ -#!/usr/bin/env $PYTHON +#!/usr/bin/env python import json import netaddr diff --git a/extraconfig/post_deploy/undercloud_post.py b/extraconfig/post_deploy/undercloud_post.py index 9cff7ee5d5..dc0d107539 100755 --- a/extraconfig/post_deploy/undercloud_post.py +++ b/extraconfig/post_deploy/undercloud_post.py @@ -1,4 +1,4 @@ -#!/usr/bin/env $PYTHON +#!/usr/bin/env python import json import os diff --git a/extraconfig/post_deploy/undercloud_post.yaml b/extraconfig/post_deploy/undercloud_post.yaml index 2280291e4d..8fbd568eda 100644 --- a/extraconfig/post_deploy/undercloud_post.yaml +++ b/extraconfig/post_deploy/undercloud_post.yaml @@ -75,10 +75,6 @@ parameters: type: string default: 'undercloud' description: Cloud name for the clouds.yaml - PythonInterpreter: - type: string - description: The python interpreter to use for python and ansible actions - default: /usr/bin/python conditions: @@ -160,12 +156,7 @@ resources: - name: region_name - name: user_name - name: user_domain_name - config: - str_replace: - template: - {get_file: ./clouds_yaml.py} - params: - $PYTHON: {get_param: PythonInterpreter} + config: {get_file: ./clouds_yaml.py} CloudsYamlDeployment: type: OS::Heat::SoftwareDeployments @@ -203,12 +194,7 @@ resources: group: script inputs: - name: config - config: - str_replace: - template: - {get_file: ./undercloud_post.py} - params: - $PYTHON: {get_param: PythonInterpreter} + config: {get_file: ./undercloud_post.py} UndercloudPostPyDeployment: type: OS::Heat::SoftwareDeployments @@ -234,12 +220,7 @@ resources: group: script inputs: - name: config - config: - str_replace: - template: - {get_file: ./undercloud_ctlplane_network.py} - params: - $PYTHON: {get_param: PythonInterpreter} + config: {get_file: ./undercloud_ctlplane_network.py} UndercloudCtlplaneNetworkDeployment: type: OS::Heat::SoftwareDeployments