From 92aea73d38107a836a043aa8837621c79cdc4aae Mon Sep 17 00:00:00 2001 From: "Jesse Pretorius (odyssey4me)" Date: Fri, 29 Jun 2018 11:12:40 +0000 Subject: [PATCH] Revert "Change build path from tmp to opt and disable COW" This reverts commit 51fb5bb898be75d97ff5312e80e0bf381a29c810. It didn't make any difference to the issue it was trying to solve, so we should revert it because it changes the path of the builds from before without adding any more value. Change-Id: Id235766741398c54868c8b053d181c90e06f70db --- defaults/main.yml | 6 +++--- templates/venv-build-script.sh.j2 | 12 +++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 347f4ef..74875da 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -44,8 +44,8 @@ repo_build_release_tag: "untagged" repo_build_global_links_path: "{{ repo_build_base_path }}/links" repo_build_release_version_path: "os-releases/{{ repo_build_release_tag }}" repo_build_release_path: "{{ repo_build_base_path }}/{{ repo_build_release_version_path }}/{{ repo_build_os_distro_version }}" -repo_build_dir: "/opt/openstack-builder" -repo_build_output: "/opt/openstack-wheel-output" +repo_build_dir: "/tmp/openstack-builder" +repo_build_output: "/tmp/openstack-wheel-output" repo_build_git_dir: "{{ repo_build_base_path }}/openstackgit" repo_build_pool_dir: "{{ repo_build_base_path }}/pools/{{ repo_build_os_distro_version }}" @@ -88,7 +88,7 @@ repo_build_pip_default_index: "https://pypi.python.org/simple" repo_build_timeout: 120 repo_build_concurrency: "{{ (((ansible_processor_vcpus|default(1)) | int) > 4) | ternary(8, 4) }}" -repo_build_venv_build_dir: "/opt/openstack-venv-builder" +repo_build_venv_build_dir: "/tmp/openstack-venv-builder" repo_build_venv_dir: "{{ repo_build_base_path }}/venvs/{{ repo_build_release_tag }}/{{ repo_build_os_distro_version }}" # We use find-links here in order to prefer the locally diff --git a/templates/venv-build-script.sh.j2 b/templates/venv-build-script.sh.j2 index ca7a23f..39272f0 100644 --- a/templates/venv-build-script.sh.j2 +++ b/templates/venv-build-script.sh.j2 @@ -62,16 +62,13 @@ pushd "{{ repo_build_venv_dir }}" &>/dev/null [[ -d "${ROLE_VENV_PATH}" ]] && rm -rf "${ROLE_VENV_PATH}" # If the pip build directory already exists, remove it - [[ -d "/opt/${ROLE_VENV_FILE}" ]] && rm -rf "/opt/${ROLE_VENV_FILE}" + [[ -d "/tmp/${ROLE_VENV_FILE}" ]] && rm -rf "/tmp/${ROLE_VENV_FILE}" # Create the virtualenv shell ${VENV_CREATE_COMMAND} "${ROLE_VENV_PATH}" &>${ROLE_VENV_LOG} # Create the pip build directory - mkdir -p "/opt/${ROLE_VENV_FILE}" - - # Disable COW attributes on the build directory - chattr -R +C "/opt/${ROLE_VENV_FILE}" || true + mkdir -p "/tmp/${ROLE_VENV_FILE}" # Activate the python virtual environment for good measure source "${ROLE_VENV_PATH}/bin/activate" @@ -96,7 +93,7 @@ pushd "{{ repo_build_venv_dir }}" &>/dev/null ${ROLE_VENV_PATH}/bin/pip install \ --disable-pip-version-check \ --quiet --quiet \ - --build "/opt/${ROLE_VENV_FILE}" \ + --build "/tmp/${ROLE_VENV_FILE}" \ ${PIP_INSTALL_OPTIONS} \ ${PIP_INDEX_OPTIONS} \ ${ROLE_VENV_REQUIREMENTS} \ @@ -116,9 +113,10 @@ pushd "{{ repo_build_venv_dir }}" &>/dev/null # Delete working directories rm -rf "${ROLE_VENV_PATH}" - rm -rf "/opt/${ROLE_VENV_FILE}" + rm -rf "/tmp/${ROLE_VENV_FILE}" popd &>/dev/null # Output the end of the build echo "done" +