Set PrivateDevices=false for Galera

This patch sets the `galera_disable_privatedevices` variable in the
galera_server role. If galera is deployed with a container, the
PrivateDevices configuration will be disabled in MariaDB's systemd
unit file.

Related-Bug: 1697531
Change-Id: I3dce66a5fa94d8a1a27280244622ca68036e6ad1
This commit is contained in:
Major Hayden 2017-06-14 13:52:10 -05:00 committed by Jesse Pretorius (odyssey4me)
parent 28b646eb27
commit d10f52bb18
2 changed files with 18 additions and 0 deletions

View File

@ -22,3 +22,7 @@ galera_server_package_state: "{{ package_state }}"
galera_container_bind_mounts: galera_container_bind_mounts:
- bind_dir_path: "/var/lib/mysql" - bind_dir_path: "/var/lib/mysql"
mount_path: "/openstack/{{ inventory_hostname }}" mount_path: "/openstack/{{ inventory_hostname }}"
# Disable PrivateDevices for MariaDB on CentOS 7
# See https://bugs.launchpad.net/openstack-ansible/+bug/1697531 for details.
galera_disable_privatedevices: "{{ ((properties.is_metal | default(false)) | bool) | ternary('false', 'true') }}"

View File

@ -0,0 +1,14 @@
---
issues:
- |
OpenStack-Ansible sets a new variable, `galera_disable_privatedevices`,
that controls whether the `PrivateDevices` configuration in MariaDB's
systemd unit file is enabled.
If the `galera_server` role is deployed on a bare metal host, the MariaDB
default is maintained (`PrivateDevices=true`). If the `galera_server` role
is deployed within a container, the `PrivateDevices` configuration is set
to `true` to work around a systemd bug with a bind mounted `/dev/ptmx`.
See `Launchpad Bug 1697531 <https://bugs.launchpad.net/openstack-ansible/+bug/1697531>`_
for more details.