diff --git a/playbooks/common-tasks/os-lxc-container-setup.yml b/playbooks/common-tasks/os-lxc-container-setup.yml index 1d9a67cc3b..394d4f3168 100644 --- a/playbooks/common-tasks/os-lxc-container-setup.yml +++ b/playbooks/common-tasks/os-lxc-container-setup.yml @@ -29,10 +29,15 @@ - name: Set default bind mounts set_fact: - lxc_default_bind_mounts: - - bind_dir_path: "/var/log" - mount_path: "/openstack/log/{{ inventory_hostname }}" - when: lxc_default_bind_mounts is undefined + lxc_default_bind_mounts: [] + when: + - lxc_default_bind_mounts is undefined + +- name: Set default bind mounts (bind var/log) + set_fact: + lxc_default_bind_mounts: '{{ lxc_default_bind_mounts | default([{"bind_dir_path": "/var/log", "mount_path": "/openstack/log/{{ inventory_hostname }}"}]) }}' + when: + - default_bind_mount_logs | bool - name: Ensure mount directories exists file: diff --git a/playbooks/inventory/group_vars/all.yml b/playbooks/inventory/group_vars/all.yml index a60058d54b..6c54c26d05 100644 --- a/playbooks/inventory/group_vars/all.yml +++ b/playbooks/inventory/group_vars/all.yml @@ -26,6 +26,9 @@ ssh_delay: 5 # Options are 'present' and 'latest' package_state: "latest" +# Set "/var/log" to be a bind mount to the physical host. +default_bind_mount_logs: true + # Ensure that the package state matches the global setting ceph_client_package_state: "{{ package_state }}" galera_client_package_state: "{{ package_state }}" diff --git a/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml b/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml index a69ff3f8a6..1df901ab62 100644 --- a/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml +++ b/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml @@ -38,17 +38,27 @@ with_items: - "{{ diff_result.stdout_lines }}" when: diff_result.stdout != "" - + - name: Check result for emptiness debug: msg="All new env.d files are placed in the stock repo. No new changes" when: diff_result.stdout == "" - + - name: Update OpenStack variable names command: "{{ upgrade_scripts }}/migrate_openstack_vars.py {{ item }} {{ (item | basename)[:-4] }}" args: creates: "/etc/openstack_deploy.NEWTON/VARS_MIGRATED_{{ (item | basename)[:-4] }}" with_fileglob: - "/etc/openstack_deploy/user_*.yml" + + - name: Write vars required for upgrade from Mitaka + lineinfile: + dest: /etc/openstack_deploy/user_variables.yml + regexp: "^{{ item.key }}" + line: "{{ item.key }}: {{ item.value }}" + state: present + with_items: + - key: "default_bind_mount_logs" + value: false vars: upgrade_scripts: "{{ playbook_dir }}/../scripts" repo_root_dir: "{{ playbook_dir }}/../../../"