From 0f0e696ae8d5b8b87c84fa8942c1b2c91e90b85e Mon Sep 17 00:00:00 2001 From: Betterme001 Date: Fri, 30 Mar 2018 11:23:52 +0800 Subject: [PATCH] fix the vms turn transient after libvirt pod restarts After libvirt pod restarts, the virtual machines created before turn transient ,then opetrate these vms ,nova-compute will throw exception. This is because that the directory /etc/libivrt/qemu in pod contains vitual machines xml files and it is temporary, the xmls files disappear after the pod restarts, so we mount it to hostpath /etc/libvirt/qemu. Change-Id: I48fd712c2b0565cb2cfe850482e8501f4e5022a4 Closed-bug: 1760003 --- libvirt/templates/daemonset-libvirt.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml index b861400e..2f279147 100644 --- a/libvirt/templates/daemonset-libvirt.yaml +++ b/libvirt/templates/daemonset-libvirt.yaml @@ -109,6 +109,8 @@ spec: mountPath: /etc/libvirt/qemu.conf subPath: qemu.conf readOnly: true + - name: etc-libvirt-qemu + mountPath: /etc/libvirt/qemu - mountPath: /lib/modules name: libmodules readOnly: true @@ -179,5 +181,8 @@ spec: - name: machine-id hostPath: path: /etc/machine-id + - name: etc-libvirt-qemu + hostPath: + path: /etc/libvirt/qemu {{ if $mounts_libvirt.volumes }}{{ toYaml $mounts_libvirt.volumes | indent 8 }}{{ end }} {{- end }}