Vnc ca/key/cert must persist in case container restarts
In rare situations when libvirt crashes it restarts in new container, but since mv was used originally ca/key/cert are not in /tmp and this resulits in them being absent by the final destination /etc/pki/libvirt-vnc. Switching to cp solves the problem. Since /tmp is a local for the pod volume there must be no concerns related to keeping those files in that directory. Change-Id: Idf3cc886b5b627e4a7c21e5158ccd2956efbd437 Signed-off-by: Alexey Odinokov <aodinokov@mirantis.com>
This commit is contained in:
@@ -19,9 +19,9 @@ set -ex
|
||||
# NOTE(mnaser): This will move the VNC certificates into the expected location.
|
||||
if [ -f /tmp/vnc.crt ]; then
|
||||
mkdir -p /etc/pki/libvirt-vnc
|
||||
mv /tmp/vnc.key /etc/pki/libvirt-vnc/server-key.pem
|
||||
mv /tmp/vnc.crt /etc/pki/libvirt-vnc/server-cert.pem
|
||||
mv /tmp/vnc-ca.crt /etc/pki/libvirt-vnc/ca-cert.pem
|
||||
cp /tmp/vnc.key /etc/pki/libvirt-vnc/server-key.pem
|
||||
cp /tmp/vnc.crt /etc/pki/libvirt-vnc/server-cert.pem
|
||||
cp /tmp/vnc-ca.crt /etc/pki/libvirt-vnc/ca-cert.pem
|
||||
fi
|
||||
|
||||
if [ -n "$(cat /proc/*/comm 2>/dev/null | grep -w libvirtd)" ]; then
|
||||
|
||||
7
releasenotes/notes/libvirt-f81d6fc0b0094209.yaml
Normal file
7
releasenotes/notes/libvirt-f81d6fc0b0094209.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
libvirt:
|
||||
- |
|
||||
Keeping vnc ca/key/cert in /tmp so in case container (not pod) restarts
|
||||
it could copy them one again to the proper place. This allows to handle
|
||||
libvirt crashes properly without restarting libvirt pods.
|
||||
...
|
||||
Reference in New Issue
Block a user