Merge "Remove symlinked git cache functionality"

This commit is contained in:
Zuul 2017-12-13 16:46:28 +00:00 committed by Gerrit Code Review
commit cd64f60df2
4 changed files with 0 additions and 74 deletions

View File

@ -68,49 +68,6 @@
register: _local_git_cache
when: repo_build_git_cache is defined
- name: Check if deployment host has the bind mount for the master repo container
local_action:
module: stat
path: "{{ repo_build_git_bind_mount }}"
register: _local_repo_bind_mount
when:
- inventory_hostname == groups['repo_all'][0]
- _local_git_cache.stat is defined
- _local_git_cache.stat.exists
- name: Check if the repo container bind mount is empty
local_action: command
ls -1A {{ repo_build_git_bind_mount }}
register: _local_repo_bind_mount_contents
when:
- _local_repo_bind_mount.stat is defined
- _local_repo_bind_mount.stat.exists
- not _local_repo_bind_mount.stat.islnk
- name: Remove the bind mounted git directory so we can symlink the cache folder to replace it
local_action:
module: file
path: "{{ repo_build_git_bind_mount }}"
state: absent
register: _local_repo_bind_mount_dir_remove
when:
- _local_repo_bind_mount.stat is defined
- _local_repo_bind_mount.stat.exists
- not _local_repo_bind_mount.stat.islnk
- _local_repo_bind_mount_contents.stdout_lines | length == 0
- name: Symlink the git cache into the repo container bind mount
local_action:
module: file
src: "{{ repo_build_git_cache }}"
dest: "{{ repo_build_git_bind_mount }}"
state: link
when:
- _local_git_cache.stat is defined
- _local_git_cache.stat.exists
- _local_repo_bind_mount.stat is defined
- _local_repo_bind_mount.stat.exists
- name: Synchronise the contents of the git cache to the repo server
synchronize:
src: "{{ repo_build_git_cache }}"
@ -118,8 +75,6 @@
when:
- _local_git_cache.stat is defined
- _local_git_cache.stat.exists
- _local_repo_bind_mount.stat is defined
- not _local_repo_bind_mount.stat.exists
roles:
- role: "repo_build"

View File

@ -31,24 +31,10 @@
when: repo_build_git_cache is defined
- include: common-tasks/os-lxc-container-setup.yml
static: no
vars:
list_of_bind_mounts:
- mount_path: "/openstack/{{ inventory_hostname }}"
bind_dir_path: "/var/www"
when: repo_build_git_cache is not defined or not _local_git_cache.stat.exists
- include: common-tasks/os-lxc-container-setup.yml
static: no
vars:
list_of_bind_mounts:
- mount_path: "/openstack/{{ inventory_hostname }}"
bind_dir_path: "/var/www"
- mount_path: "{{ repo_build_git_cache }}"
bind_dir_path: "{{ repo_build_git_cache }}"
when:
- repo_build_git_cache is defined
- _local_git_cache.stat.exists
- include: common-tasks/unbound-clients.yml
static: no

View File

@ -119,16 +119,6 @@
repo_build_pip_extra_indexes: "{{ fastest_wheel_mirror.stdout_lines }}"
when: not pip_conf_file.stat.exists
- name: Check whether the host has a git cache
stat:
path: /opt/git/openstack
register: _local_git_cache
- name: Set repo_build_git_cache fact
set_fact:
repo_build_git_cache: /opt/git/openstack
when: _local_git_cache.stat.exists
- name: Set the user_variables
config_template:
src: "{{ bootstrap_user_variables_template }}"

View File

@ -172,11 +172,6 @@ lxc_image_cache_server_mirrors:
cache_timeout: {{ cache_timeout }}
{% endif %}
{% if repo_build_git_cache is defined %}
## Git cache to use for the repo build process
repo_build_git_cache: {{ repo_build_git_cache }}
{% endif %}
# The container backing store is set to 'machinectl' to speed up the
# AIO build time. Options are: [machinectl, overlayfs, btrfs, zfs, dir, lvm]
lxc_container_backing_store: "machinectl"