Revert "Change build path from tmp to opt and disable COW"

This reverts commit 51fb5bb898.

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
This commit is contained in:
Jesse Pretorius (odyssey4me) 2018-06-29 11:12:40 +00:00
parent 51fb5bb898
commit 92aea73d38
2 changed files with 8 additions and 10 deletions

View File

@ -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

View File

@ -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"