Closed ways closed 9 years ago
I've managed to actually replicate this, this morning, whilst trying to build out a test env. I'll look into it and report back.
I've totally scrapped trying to pull the host UUID via IPs - it's far too flaky/subject to change for my liking- and that's before IPv6 is even heavily used/taken into consideration.
I've replaced the checking method to use the Xenserver allocated hostname/name-label instead. So this issue should now be resolved.
I found with the newest version I'm still getting this error
me too
A new issue was raised relating to this, #64
[root@x ~]# ./patcher.py -l Error: Failed to obtain HOSTUUID from XE CLI
This may be related to having more than one IP on the host.
If I run the command that's failing I get: [root@x ~]# xe host-list address=
ip addr show | awk /"scope global"/\'{print$2}\' | awk -F/ \'{print$1}\' | head -n1
params=uuid --minimal awk: awk: '{print}' /scope global/'{print}'awk: ^ invalid char ''' in expressionawk: ^ invalid char ''' in expressionList of IPs: [root@x ~]# ip addr show | awk /"scope global"/{print$2} inet 10.47.77.78/24 brd 10.47.77.255 scope global xenbr1 inet 10.47.47.22/24 brd 10.47.47.255 scope global xenbr0 inet 10.253.1.161/24 brd 10.253.1.255 scope global xapi0
If I clean up the line I get: [root@x ~]# xe host-list address=
ip addr show | awk /"scope global"/{print$2} | awk -F/ {print$1} | head -n1
params=uuid --minimal [root@x ~]#Not all IPs will give a UUID: [root@xstest1005 ~]# xe host-list address=10.47.47.22 params=uuid --minimala091610e-e4f3-4935-93cb-1c2382f40707 [root@xstest1005 ~]# xe host-list address=10.47.77.78 params=uuid --minimal
So should we change how UUID is found, or add an optional parameter to set UUID?