File: oci-fixup-compute-node

package info (click to toggle)
openstack-cluster-installer 21
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,212 kB
  • sloc: php: 9,235; sh: 2,936; makefile: 14
file content (21 lines) | stat: -rwxr-xr-x 521 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -e
set -x

systemctl restart virtlogd
sleep 2
systemctl restart libvirtd
sleep 2

LIBVIRT_SECRET=$(cat /etc/ceph/ceph.client.openstack.keyring | grep key | awk '{print $3}')
LIBVIRT_UUID=$(xpath -e "//secret/uuid/text()" /etc/nova/secret.xml 2> /dev/null)

TMP_FILE=$(mktemp)
virsh secret-list >${TMP_FILE}
if ! grep -q ${LIBVIRT_UUID} ${TMP_FILE} ; then
	virsh secret-define --file /etc/nova/secret.xml
	virsh secret-set-value --secret ${LIBVIRT_UUID} ${LIBVIRT_SECRET}
fi

systemctl restart nova-compute