From 981db9012a0a0f62862080d2951c60503e4f472d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Mon, 22 Aug 2016 11:37:18 +0100 Subject: [PATCH] Remove pip.conf during upgrade on all hosts Because pip install role is used as meta of the repo_build, we have circular dependencies before anything could be done. This cleans up the hosts of the --isolated flags, and therefore can properly bootstrap pip. Change-Id: I85cba02628dc454947c0bb798764f5f3955dc48b Signed-off-by: Jean-Philippe Evrard (manual forward port) --- doc/source/upgrade-guide/manual-upgrade.rst | 15 +++++++-------- .../upgrade-guide/reference-upgrade-playbooks.rst | 10 +++++----- scripts/run-upgrade.sh | 1 + ...-pip-conf-removal.yml => pip-conf-removal.yml} | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) rename scripts/upgrade-utilities/playbooks/{repo-server-pip-conf-removal.yml => pip-conf-removal.yml} (97%) diff --git a/doc/source/upgrade-guide/manual-upgrade.rst b/doc/source/upgrade-guide/manual-upgrade.rst index 4c4b563545..92c3e8c669 100644 --- a/doc/source/upgrade-guide/manual-upgrade.rst +++ b/doc/source/upgrade-guide/manual-upgrade.rst @@ -156,19 +156,18 @@ This command is a subset of the host setup playbook, limited to the first member of the ``galera_all`` host group so that its container is restarted only after other Galera containers have been restarted in the previous step. -Cleanup ``pip.conf`` file in the ``repo_servers`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Cleanup ``pip.conf`` file +~~~~~~~~~~~~~~~~~~~~~~~~~ -If a ``pip.conf`` file exists within the repository server -infrastructure, it can cause build failures when upgrading -to Newton. This play removes the ``pip.conf`` file from the repository -servers. +The presence of ``pip.conf`` file can cause build failures when upgrading to +Newton. This play removes the ``pip.conf`` file on all the physical servers +and on the repo containers. -See :ref:`repo-server-pip-conf-removal` for more details. +See :ref:`pip-conf-removal` for more details. .. code-block:: console - # openstack-ansible "${UPGRADE_PLAYBOOKS}/repo-server-pip-conf-removal.yml" + # openstack-ansible "${UPGRADE_PLAYBOOKS}/pip-conf-removal.yml" Ensure hostname aliases are created for non-RFC1034/35 hostnames ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/source/upgrade-guide/reference-upgrade-playbooks.rst b/doc/source/upgrade-guide/reference-upgrade-playbooks.rst index 0e688e0170..01d3e7ec73 100644 --- a/doc/source/upgrade-guide/reference-upgrade-playbooks.rst +++ b/doc/source/upgrade-guide/reference-upgrade-playbooks.rst @@ -51,14 +51,14 @@ secrets move into the upgraded environment and generate appropriately. This adds only new secrets, such as those necessary for new services or new settings added to existing services. Values set previously are not changed. -.. _repo-server-pip-conf-removal: +.. _pip-conf-removal: -``repo-server-pip-conf-removal.yml`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``pip-conf-removal.yml`` +~~~~~~~~~~~~~~~~~~~~~~~~ The presence of ``pip.conf`` locks down all Python installations to packages -on the repo server. If ``pip.conf`` exists on the repo server, it creates a -circular dependency, causing build failures. +on the repo servers. If ``pip.conf`` exists on a repo server or a physical +node, it will cause a circular dependency issue and the upgrade will fail. .. _old-hostname-compatibility: diff --git a/scripts/run-upgrade.sh b/scripts/run-upgrade.sh index af04b8fbb5..09f94d1984 100755 --- a/scripts/run-upgrade.sh +++ b/scripts/run-upgrade.sh @@ -152,6 +152,7 @@ function main { RUN_TASKS+=("${UPGRADE_PLAYBOOKS}/deploy-config-changes.yml") RUN_TASKS+=("${UPGRADE_PLAYBOOKS}/user-secrets-adjustment.yml") RUN_TASKS+=("${UPGRADE_PLAYBOOKS}/db-collation-alter.yml") + RUN_TASKS+=("${UPGRADE_PLAYBOOKS}/pip-conf-removal.yml") # we don't want to trigger galera container restarts yet RUN_TASKS+=("setup-hosts.yml --limit '!galera_all'") # add new container config to galera containers but don't restart diff --git a/scripts/upgrade-utilities/playbooks/repo-server-pip-conf-removal.yml b/scripts/upgrade-utilities/playbooks/pip-conf-removal.yml similarity index 97% rename from scripts/upgrade-utilities/playbooks/repo-server-pip-conf-removal.yml rename to scripts/upgrade-utilities/playbooks/pip-conf-removal.yml index 4919249cee..bf29a6c6db 100644 --- a/scripts/upgrade-utilities/playbooks/repo-server-pip-conf-removal.yml +++ b/scripts/upgrade-utilities/playbooks/pip-conf-removal.yml @@ -14,7 +14,7 @@ # limitations under the License. - name: Remove pip.conf if found - hosts: repo_all + hosts: hosts:repo_all gather_facts: true user: root tasks: