virsh rbd secret uuid is not set properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
puppet-nova |
Fix Released
|
Undecided
|
Giulio Fidente |
Bug Description
Hello there,
While setting up Nova Compute + RBD, we have to provide the libvirt_
This value has to be defined in nova.conf, and then a virsh secret has to be created and the virsh value for this secret has to be set.
The first two steps works well but the last step is never executed. Why ? That is quite simple.
The 3rd step is defined in rbd.pp, lines 78 to 82:
exec { 'set-secret-value virsh':
command => "/usr/bin/virsh secret-set-value --secret $(cat /etc/nova/
unless => "/usr/bin/virsh secret-list | grep ${libvirt_
require => Exec['get-or-set virsh secret']
}
We can see that Puppet will set the value, unless the secret-list returns our secret. And it will Always return something, because the step 2 created it. The appropriate unless command should instead verify if a value has been set to this secret :
exec { 'set-secret-value virsh':
command => "/usr/bin/virsh secret-set-value --secret $(cat /etc/nova/
unless => "/usr/bin/virsh secret-get-value ${libvirt_
require => Exec['get-or-set virsh secret']
}
Changed in puppet-nova: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/161122
Review: https:/