ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
493 stars 582 forks source link

VirtualDomain: the function of "virsh uri" #732

Open dmuhamedagic opened 8 years ago

dmuhamedagic commented 8 years ago

If the hypervisor parameter is not set, the we use the output of virsh uri. Is that necessary?

virsh blah vs virsh virsh uri blah

dmuhamedagic commented 8 years ago

Can somebody comment? Florian perhaps? Keisuke-san? BTW, the last line above should read $(virsh uri).

dmuhamedagic commented 8 years ago

@fghaas, @kskmori?

kskmori commented 8 years ago

virsh --connect=$(virsh uri) blah more preciously, anyway,

Yes, they look equivalent and redundant, but I would also think that it's not so harm. The return value of virsh uri is referred from other places in the RA when hypervisor is omitted so we need to run the command once anyway.

I do not have a strong opinion whether if it should be fixed or not, but I think we don't have to urgently unless it causes a serious problem. Any problem with it?

dmuhamedagic commented 8 years ago

On Fri, Jan 22, 2016 at 12:19:30AM -0800, Keisuke MORI wrote:

virsh --connect=$(virsh uri) blah more preciously, anyway,

Yes, they look equivalent and redundant, but I would also think that it's not so harm.

No harm, if virsh can connect to libvirtd.

The return value of virsh uri is referred from other places in the RA when hypervisor is omitted so we need to run the command once anyway.

Right, but it would sometimes be preferable that it doesn't happen too early. That was the reason I opened this. In case libvirtd isn't running, this call is going to fail.

I do not have a strong opinion whether if it should be fixed or not, but I think we don't have to urgently unless it causes a serious problem. Any problem with it?

Right now, after vacation, I cannot recall anymore the details. IIRC, it had to do with libvirtd not running, and then some or the other thing failing miserably. If this call to libvirtd is removed, then we could test for libvirtd not running and have the RA behave in a more meaningful way.

kskmori commented 8 years ago

IIRC, it had to do with libvirtd not running, and then some or the other thing failing miserably. If this call to libvirtd is removed, then we could test for libvirtd not running and have the RA behave in a more meaningful way.

I see, I wasn't aware what's going to be happened in such scenario. If something will be improved then it's a good reason to change.