From 59377245030f6b3e6ba46b84d360b89ca6faa9d3 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Tue, 29 Aug 2017 15:26:28 +0800 Subject: [PATCH] Add ipc_mode=host for nova-compute conainer ipc_mode=host is required after enabled multipath in nova. Closes-Bug: #1713639 Depends-On: I0a1d85597999415cab11feb71a7fdfd7af3f7148 Change-Id: Ib0b8961a47b686b6c35456768bbbccc741cb7adf --- ansible/roles/nova/defaults/main.yml | 1 + ansible/roles/nova/handlers/main.yml | 1 + ansible/roles/nova/tasks/config.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/ansible/roles/nova/defaults/main.yml b/ansible/roles/nova/defaults/main.yml index 5ddf4e5a35..cc5a6a7927 100644 --- a/ansible/roles/nova/defaults/main.yml +++ b/ansible/roles/nova/defaults/main.yml @@ -111,6 +111,7 @@ nova_services: image: "{{ nova_compute_image_full }}" privileged: True enabled: "{{ not enable_nova_fake | bool }}" + ipc_mode: "host" volumes: - "{{ node_config_directory }}/nova-compute/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" diff --git a/ansible/roles/nova/handlers/main.yml b/ansible/roles/nova/handlers/main.yml index 42699947e8..89334c3c49 100644 --- a/ansible/roles/nova/handlers/main.yml +++ b/ansible/roles/nova/handlers/main.yml @@ -254,6 +254,7 @@ name: "{{ service.container_name }}" image: "{{ service.image }}" privileged: "{{ service.privileged | default(False) }}" + ipc_mode: "{{ service.ipc_mode | default(omit) }}" volumes: "{{ service.volumes|reject('equalto', '')|list }}" when: - action != "config" diff --git a/ansible/roles/nova/tasks/config.yml b/ansible/roles/nova/tasks/config.yml index 2af2fded29..fb17517330 100644 --- a/ansible/roles/nova/tasks/config.yml +++ b/ansible/roles/nova/tasks/config.yml @@ -166,6 +166,7 @@ name: "{{ item.value.container_name }}" image: "{{ item.value.image }}" pid_mode: "{{ item.value.pid_mode|default('') }}" + ipc_mode: "{{ item.value.ipc_mode|default(omit) }}" privileged: "{{ item.value.privileged|default(False) }}" volumes: "{{ item.value.volumes|reject('equalto', '')|list }}" register: check_nova_containers