Change default log bind mount to be optional
The default log bind mount will cause service disruption as containers will need to be rebooted on top of the fact that some services will not start until log directories are created for the service to write to. While this is not an issue on greenfield it is a problem on all upgrades. Closes-Bug: #1625722 Change-Id: Ic2345012be9d6b46a33da6bd03ccc397d5655a50 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
ee40a8ad6e
commit
d98eb49edc
@ -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:
|
||||
|
@ -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 }}"
|
||||
|
@ -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 }}/../../../"
|
||||
|
Loading…
Reference in New Issue
Block a user