dalgibbard/citrix_xenserver_patcher

patcher gives error like #28

thctlo opened this issue · 2 comments

Hai, patcher.py isnt working for my anymore.
My problem is the same als #28 , but i have everything in lower case.

./patcher.py -e ./XS62_exclusions.py
Getting host list using: /opt/xensource/bin/xe host-list name-label=grep "^HOSTNAME=" /etc/sysconfig/network | awk -F= '{print$2}' params=uuid --minimal
Detected HOST UUID:
Error: Failed to obtain HOSTUUID from XE CLI

manualy running :
xe host-list name-label=grep "^HOSTNAME=" /etc/sysconfig/network | awk -F= '{print$2}' params=uuid --minimal
gives back nothing.
but running :
xe host-list --minimal gives back the UUID.

changing the line :
get_host_uuid_cmd = str(xecli) + str(' host-list name-label=grep "^HOSTNAME=" /etc/sysconfig/network | awk -F= \'{print$2}\' params=uuid --minimal')

to
get_host_uuid_cmd = str(xecli) + str(' host-list --minimal')

fixed it for me.

I'd be interested to know how the hostname defined within XenServer became different to the hostname defined in the sysconfig; ideally we need to find a source of truth for this. Using xe CLI for it returns all hosts in a pool with this method IIRC. Could anyone confirm that also?

I've redefined #28 to match the requirements of this issue also; so will close this one.