Skip to content
Snippets Groups Projects
Commit 9c5e708f authored by Steven Dake's avatar Steven Dake
Browse files

Add pid_mode to libvirt

Libvirt requires pid_mode to Host to operate on Fedora Hosts.  Further
we will need this for libvirt upgrade.  I am not entirely sure why
libvirt running with pid=host gets things working, but it definately
has something to do with CentOS's libvirt's integration with systemd.

Nailing down the problem, the interface to the Docker module accepts only
None or "host".  There is no way to generate a None type except with !!null
in yml, but this does not work in the jinja2 parser.  As a result, one
solution is this conditional.  A better long term solution would be for
the Docker module to take some other argument to indicate None that can
be expressed in a string.

Change-Id: I54eb87e8ce8679bbf12f671527280c73e195b2e4
Closes-Bug: #1473270
parent 613cdfe9
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
container_image: "{{ docker_nova_libvirt_image_full }}"
container_name: "nova_libvirt"
container_privileged: "True"
container_pid: "True"
container_volumes:
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
......
......@@ -30,3 +30,28 @@
volumes: "{{ container_volumes }}"
volumes_from: "{{ container_volumes_from | default([]) }}"
run_once: "{{ run_once | default('False') }}"
when: not container_pid|default(False)
- name: Starting container(s)
docker:
command: "{{ container_command | default(None) }}"
detach: "{{ container_detach | default('True') }}"
env: "{{ container_environment | default({}) }}"
docker_api_version: "{{ docker_api_version }}"
image: "{{ container_image }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: "{{ container_name }}"
net: "host"
pid: "host"
password: "{{ docker_registry_password }}"
privileged: "{{ container_privileged | default('False') }}"
pull: "{{ docker_pull_policy }}"
registry: "{{ docker_registry }}"
restart_policy: "{{ container_restart_policy | default(docker_restart_policy) }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: "reloaded"
username: "{{ docker_registry_username }}"
volumes: "{{ container_volumes }}"
volumes_from: "{{ container_volumes_from | default([]) }}"
run_once: "{{ run_once | default('False') }}"
when: container_pid|default(False)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment