From e34a775e04bde667b84e7a922c84eca4b803f426 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Tue, 23 Jun 2015 17:38:44 +0000 Subject: [PATCH] Revert "changed container bind mounts to use abspath" This reverts commit a6536b132c06231773525ba73398091b937b390f. Change-Id: I52f5084c72ebedf9346dc4078fa18019bb7ea511 --- playbooks/galera-install.yml | 2 +- playbooks/os-glance-install.yml | 2 +- playbooks/repo-server.yml | 2 +- .../tasks/container_create.yml | 28 ++++----- playbooks/rsyslog-install.yml | 2 +- scripts/gate-check-lint.sh | 2 +- scripts/run-upgrade.sh | 59 ------------------- 7 files changed, 19 insertions(+), 78 deletions(-) diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index 7aa642f7c9..a06b9a682c 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -24,7 +24,7 @@ container_command: | [[ ! -d "/var/lib/mysql" ]] && mkdir -p "/var/lib/mysql" container_config: - - "lxc.mount.entry=/openstack/{{ container_name }} /var/lib/mysql none bind 0 0" + - "lxc.mount.entry=/openstack/{{ container_name }} var/lib/mysql none bind 0 0" delegate_to: "{{ physical_host }}" when: is_metal == false or is_metal == "False" tags: diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 70b2a41efc..98f2bcee1f 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -24,7 +24,7 @@ container_command: | [[ ! -d "/var/lib/glance/images" ]] && mkdir -p "/var/lib/glance/images" container_config: - - "lxc.mount.entry=/openstack/{{ container_name }} /var/lib/glance/images none bind 0 0" + - "lxc.mount.entry=/openstack/{{ container_name }} var/lib/glance/images none bind 0 0" delegate_to: "{{ physical_host }}" when: is_metal == false or is_metal == "False" tags: diff --git a/playbooks/repo-server.yml b/playbooks/repo-server.yml index 4f92007ea3..34acb6ae4a 100644 --- a/playbooks/repo-server.yml +++ b/playbooks/repo-server.yml @@ -24,7 +24,7 @@ container_command: | [[ ! -d "/var/www" ]] && mkdir -p "/var/www" container_config: - - "lxc.mount.entry=/openstack/{{ container_name }} /var/www none bind 0 0" + - "lxc.mount.entry=/openstack/{{ container_name }} var/www none bind 0 0" delegate_to: "{{ physical_host }}" when: is_metal == false or is_metal == "False" tags: diff --git a/playbooks/roles/lxc_container_create/tasks/container_create.yml b/playbooks/roles/lxc_container_create/tasks/container_create.yml index 51218895bb..3d84aff377 100644 --- a/playbooks/roles/lxc_container_create/tasks/container_create.yml +++ b/playbooks/roles/lxc_container_create/tasks/container_create.yml @@ -37,6 +37,18 @@ tags: - lxc-container-vg-detect +- name: Container service directories + file: + path: "{{ item }}" + state: "directory" + with_items: + - "/openstack/{{ inventory_hostname }}" + - "/openstack/backup/{{ inventory_hostname }}" + - "/openstack/log/{{ inventory_hostname }}" + delegate_to: "{{ physical_host }}" + tags: + - lxc-container-directories + - name: Create container lxc_container: name: "{{ inventory_hostname }}" @@ -55,18 +67,6 @@ tags: - lxc-container-create -- name: Container service directories - file: - path: "{{ item }}" - state: "directory" - with_items: - - "/openstack/{{ inventory_hostname }}" - - "/openstack/backup/{{ inventory_hostname }}" - - "/openstack/log/{{ inventory_hostname }}" - delegate_to: "{{ physical_host }}" - tags: - - lxc-container-directories - - name: Load container service mounts and profile lxc_container: name: "{{ inventory_hostname }}" @@ -74,8 +74,8 @@ mkdir -p /var/backup mkdir -p /var/log/{{ properties.service_name }} container_config: - - "lxc.mount.entry=/openstack/backup/{{ inventory_hostname }} /var/backup none defaults,bind,rw 0 0" - - "lxc.mount.entry=/openstack/log/{{ inventory_hostname }} /var/log/{{ properties.service_name }} none defaults,bind,rw 0 0" + - "lxc.mount.entry=/openstack/backup/{{ inventory_hostname }} var/backup none defaults,bind,rw 0 0" + - "lxc.mount.entry=/openstack/log/{{ inventory_hostname }} var/log/{{ properties.service_name }} none defaults,bind,rw 0 0" - "lxc.aa_profile=lxc-openstack" when: properties.service_name is defined delegate_to: "{{ physical_host }}" diff --git a/playbooks/rsyslog-install.yml b/playbooks/rsyslog-install.yml index 54f97dcb73..d8c3327a46 100644 --- a/playbooks/rsyslog-install.yml +++ b/playbooks/rsyslog-install.yml @@ -32,7 +32,7 @@ container_command: | [[ ! -d "{{ storage_directory }}" ]] && mkdir -p "{{ storage_directory }}" container_config: - - "lxc.mount.entry=/openstack/{{ container_name }}/log-storage {{ storage_directory }} none bind 0 0" + - "lxc.mount.entry=/openstack/{{ container_name }}/log-storage {{ storage_directory.lstrip('/') }} none bind 0 0" delegate_to: "{{ physical_host }}" when: is_metal == false or is_metal == "False" tags: diff --git a/scripts/gate-check-lint.sh b/scripts/gate-check-lint.sh index 73ab0fb174..d8c18ae9f9 100755 --- a/scripts/gate-check-lint.sh +++ b/scripts/gate-check-lint.sh @@ -36,7 +36,7 @@ fi # Ignores the following rules due to how ansible modules work in general # F403 'from ansible.module_utils.basic import *' used; unable to detect undefined names # H303 No wildcard (*) import. -flake8 --ignore=F403,H303 $(grep -rln -e '^#!/usr/bin/env python' -e '^#!/bin/python' * | grep -v '.sh$') +flake8 --ignore=F403,H303 $(grep -rln -e '^#!/usr/bin/env python' -e '^#!/bin/python' * ) # Create keys if they don't already exist. diff --git a/scripts/run-upgrade.sh b/scripts/run-upgrade.sh index 975080df0d..e1542df709 100755 --- a/scripts/run-upgrade.sh +++ b/scripts/run-upgrade.sh @@ -365,61 +365,6 @@ cat > /tmp/fix_minor_adjustments.yml < /tmp/config-fix.py < /tmp/fix_host_things.yml < /tmp/fix_host_things.yml <