dalgibbard / citrix_xenserver_patcher

Auto / Manual Patching tool for Citrix XenServer Boxes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in patch-apply uuid code

ways opened this issue · comments

Hi

When a patch had already been downloaded I get this:

# ./patcher.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: a091610e-e4f3-4935-93cb-1c2382f40707
Get patch list using: /opt/xensource/bin/xe patch-list hosts="a091610e-e4f3-4935-93cb-1c2382f40707" --minimal
The following Patches are pending installation:

uuid: 59a75271-12f9-4e6a-8ba2-325c2f5b0b47
 url: http://support.citrix.com/article/CTX141036
 timestamp: 2014-07-16T00:00:00Z
 name_label: XS62ESP1008
 patch_url: http://downloadns.citrix.com.edgesuite.net/akdlm/9491/XS62ESP1008.zip
 after_apply_guidance: restartHost
 name_description: Public Availability: security fixes to Xen

uuid: a24d94e1-326b-4eaa-8611-548a1b5f8bd5
 url: http://support.citrix.com/article/CTX141191
 timestamp: 2014-08-27T00:00:00Z
 name_label: XS62ESP1009
 patch_url: http://downloadns.citrix.com.edgesuite.net/9617/XS62ESP1009.zip
 after_apply_guidance: restartHost
 name_description: Public Availability: fixes to Dom0 kernel

NOTE: Installation of these items will require a reboot!
      You will be prompted to reboot at the end.


Would you like to install these items? [y/n]: y
Starting patching...
CD images are currently mounted to one or more VMs.
These must be unmounted before starting the patching process.

Would you like to auto-umount these now? [y/n]: y

Unmounting CD Images from VMs
Downloading: XS62ESP1008.zip
Download Size: 35501014 Bytes
   35501014  [100.00%]
Applying: XS62ESP1008
Uncompressing...
Internal Upload...
XE Error detected: The uploaded patch file already exists
uuid: 59a75271-12f9-4e6a-8ba2-325c2f5b0b47

Return code is: 1
Patch previously uploaded, attempting to reapply 59a75271-12f9-4e6a-8ba2-325c2f5b0b47
Applying Patch uuid: 59a75271-12f9-4e6a-8ba2-325c2f5b0b47
Patch failed, code: 1
Command failed: /opt/xensource/bin/xe patch-apply uuid=uuid: 59a75271-12f9-4e6a-8ba2-325c2f5b0b47 host-uuid=a091610e-e4f3-4935-93cb-1c2382f40707
Failed to apply patch: The uuid you supplied was invalid.
type: pool_patch
uuid: uuid:

Secondary check...
Patch apply failed for: XS62ESP1008.xsupdate

As you can see the line /opt/xensource/bin/xe patch-apply uuid=uuid: 59a75271-12f9-4e6a-8ba2-325c2f5b0b47 host-uuid=a091610e-e4f3-4935-93cb-1c2382f40707 has an "uuid: " too much. Works fine if run with that part removed.

I'll take a look this morning if all goes according to plan. Thanks for the feedback.

Are you running this on a XenServer which is part of a pool?

Yes, it is the only server in a pool.

Try commenting out line 251 which currently says:

uuid = error_block[1]

I've removed it and pushed the change to the master branch now anyway, as that just didn't look right to me :)
Please re-test when you get a moment.

Cool. I'd like to test, but the server is fully patched now. Will make sure to report back after updating another server or next time there's a patch for this one.

I'm pretty sure this issue has gone away now; i'll close this off, but feel free to re-open/re-raise if it reoccurs :)