SUSE Cloud - missing cinder key on computes
Posted on Fri 17 November 2017 in openstack • 1 min read
2017-11-01 14:30:53.970 27835 ERROR nova.virt.libvirt.driver [instance: c5618826-98cb-4fd6-9d6f-b8899bd320b7] libvirtError: Secret not found: no secret with matching uuid '5b7c1b36-
9093-4a13-b14d-da8b8cbdd8a6'
2017-11-01 14:30:53.970 27835 ERROR nova.virt.libvirt.driver [instance: c5618826-98cb-4fd6-9d6f-b8899bd320b7]
2017-11-01 14:30:53.971 27835 ERROR nova.virt.block_device [req-9f046c95-fecf-46e5-874d-43b42da1e63f 62169e96ed4b485aa2dfb2ca3235305c 05f20019f1c94952937a7f34087f5471 - - -] [instan
ce: c5618826-98cb-4fd6-9d6f-b8899bd320b7] Driver failed to attach volume 9f33b42f-79ba-472f-8e10-9525f186cde1 at /dev/vdb
Unless you find a key on the compute like (something with crowbar-\$ID)
# virsh secret-list
UUID Usage
--------------------------------------------------------------------------------
5b7c1b36-9093-4a13-b14d-da8b8cbdd8a6 ceph crowbar-5b7c1b36-9093-4a13-b14d-da8b8cbdd8a6 secret
you can/have to fix it on your own:
#!/bin/bash
ID="5b7c1b36-9093-4a13-b14d-da8b8cbdd8a6"
# get cinder key from ceph cluster - ceph auth get-key client.cinder
CINDERKEY="AQA4cw1aa2tAAhAAxYl2l/lCaer3squRBdXBYg=="
FILE="$IDclient.cinder secret"
FILENAME="/tmp/secret.xml"
for host in 01 02 03 04 05; do
dest="compute${host}"
echo "Verifiy host $dest:"
if ! ssh $dest virsh secret-get-value $ID; then
echo "Create secret for cinder user."
ssh $dest "echo \"$FILE\" > $FILENAME"
ssh $dest virsh secret-define --file $FILENAME
ssh $dest virsh secret-set-value --secret $ID --base64 $CINDERKEY
fi
echo "ok!"
done