M->N upgrade causes container reboot due to bind mounts

Bug #1665084 reported by Logan V
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Invalid
Medium
Unassigned

Bug Description

The Mitaka upgrade playbooks set a default_bind_mount_logs: false entry to prevent a reboot of all the containers due to the log bind mount change.

However the containers all reboot anyway because of a change in the bind mount syntax deployed to the lxc config for the other non-log bind mounts.

Example old entry:
lxc.mount.entry = /openstack/lsn-d6045_galera_container-174f0faa var/lib/mysql none bind 0 0

another entry is appended to the lxc config for this container:
lxc.mount.entry = /openstack/lsn-d6045_galera_container-174f0faa var/lib/mysql none bind,create=dir 0 0

So the result is the bind mount is specified twice (once with ",create=dir" and once without) in the container config, and the change also triggers a container restart.

The old entry was managed here:
https://github.com/openstack/openstack-ansible/blob/stable/mitaka/playbooks/galera-install.yml#L36-L37

And the new one is managed here:
https://github.com/openstack/openstack-ansible/blob/master/playbooks/common-tasks/os-lxc-container-setup.yml#L47-L58

Revision history for this message
Logan V (loganv) wrote :

Typoed the first line line of the bug report, this is the NEWTON upgrade being performed.

Revision history for this message
Logan V (loganv) wrote :

Looks like this affects the following playbooks:

playbooks/os-neutron-install.yml: - "lxc.mount.entry=/lib/modules lib/modules none bind 0 0"
playbooks/os-glance-install.yml: - "lxc.mount.entry=/openstack/{{ container_name }} var/lib/glance/images none bind 0 0"
playbooks/repo-server.yml: - "lxc.mount.entry=/openstack/{{ container_name }} var/www none bind 0 0"
playbooks/galera-install.yml: - "lxc.mount.entry=/openstack/{{ container_name }} var/lib/mysql none bind 0 0"

Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

Adding a regexp to the lineinfile would avoid the duplicate lines, while the serialization here: https://review.openstack.org/#/c/426928/ would avoid the mess of the massive restart.

Changed in openstack-ansible:
status: New → Confirmed
tags: added: low-hanging-fruit
Changed in openstack-ansible:
importance: Undecided → Medium
Revision history for this message
Mohammed Naser (mnaser) wrote :

Old release

Changed in openstack-ansible:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.