Browse Source

Ignore libvirt start if running chrooted

The use case is when running oooq from a
privileged container. For examle, running in
Centos container on the Ubuntu virthost.
Services can't be restarted in such a container
unless you run it as a VM (with init as pid 1).
So oooq can't pass the libvirt startup task and
proceed with undercloud deployment. This is
controlled by a new var 'chrooted'. Defaults to
False.

Partial-bug: #1676373
Change-Id: If221a6a8bda496862da6249c46c2bedd955b6eac
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
tags/2.1.0
Bogdan Dobrelya 2 years ago
parent
commit
a4e1ea67f6
2 changed files with 3 additions and 1 deletions
  1. 2
    0
      roles/parts/libvirt/defaults/main.yml
  2. 1
    1
      roles/parts/libvirt/tasks/main.yml

+ 2
- 0
roles/parts/libvirt/defaults/main.yml View File

@@ -10,3 +10,5 @@ libvirt_packages:
10 10
 # The name of the libvirt service.
11 11
 libvirtd_service: libvirtd
12 12
 
13
+# If running in chroot-like environments (containers)
14
+chrooted: false

+ 1
- 1
roles/parts/libvirt/tasks/main.yml View File

@@ -27,4 +27,4 @@
27 27
     state: running
28 28
     enabled: true
29 29
   become: true
30
-
30
+  when: not chrooted|bool

Loading…
Cancel
Save