[Pacemaker] Apparent error passing stonith resource parameters (external/libvirt)

Nathan Bird nathan at acceleration.net
Fri Aug 24 11:25:19 EDT 2012


On 08/24/2012 10:47 AM, Nathan Bird wrote:
> I'm trying to setup an external/libvirt stonith fencing 
> thingiemadoodle but ran into an error
>
> My pacemaker configuration is (read back out it looks the same):
>
> primitive p-fence-om0101 stonith:external/libvirt \
>   params hostlist="proxy1 mysql1" \
> hypervisor_uri="qemu+ssh://root@om01/system?keyfile=/root/.ssh/om01" \
>   op monitor interval="60"
> #there's also a location rule that is working fine
>
>
> If i just try to connect with libvirt that uri is correct. When the 
> stonith script runs though it is getting an incomplete value 
> "qemu+ssh://root@om01/system?keyfile" observed via log messages.
>
> Apparently the equal symbol '=' is causing a problem for the parameter 
> passing somewhere.
>
> When I read the external/libvirt plugin's code. It appears to rely on 
> the environment variable '$hypervisor_uri' and the log message 
> printing of this indicates that is invalid.
>
> I don't know where to look for who is filling that environment value; 
> any suggestions?

I worked around this by copying the resource file into a new one named 
after the hypervisor I'm trying to talk to and embedding the correct uri 
in the file.

Additionally I did a bit more bash quoting in the file, e.g.:
-    out=$($VIRSH -c $hypervisor_uri start $domain_id 2>&1)
+    out=$($VIRSH -c "$hypervisor_uri" start $domain_id 2>&1)

Though I'm confident that isn't the only issue as even with those quotes 
nothing works-- this script has the wrong value in that variable before 
we get to those lines.






More information about the Pacemaker mailing list