XAPI plugin for host updates
-
We started to work on a XAPI plugin that will help to:
- check for updates on a host
- update a host
Obviously, this is only a part of the whole logic to manage updates easily. The rest will be included into XO!
-
I tryed it and it worked. but my xo says " XS74E001 Public Availability: Security fixes to Xen May 8, 2018, 1:00 AM (19 days ago) restartHost". Do i have to install it on XCP-ng
? -
What did you try exactly?
edit: because today, if you see updates in XO for XCP-ng, it's because it's still using the old (XenServer) way to update and it doesn't work correctly (or doesn't mean to work) with XCP-ng.
-
i tryed https://github.com/xcp-ng/xcp-ng-updater/tree/master/SOURCES/etc/xapi.d/plugins. Servers are in XCP-NG Free/Libre Edition and, In XEN ORKESTRA I saw this patch for all hosts so i upgraded them succesfully and then left them to continue working.
-
Can you describe each steps you have done?
-
Copy updater.py in /etc/xapi.d/plugins/, Check and run script. Simply.
updater.log 2018-05-26 15:45:07 - [15517] - INFO - {'command': ['yum', 'update', '-y'], 'exit': 0, 'stderr': '', 'stdout': 'Loaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\nResolving Dependencies\n--> Running transaction check\n---> Package microcode_ctl.x86_64 2:2.1-16.xs2.1 will be updated\n---> Package microcode_ctl.x86_64 2:2.1-22.xs1 will be an update\n---> Package xen-dom0-libs.x86_64 0:4.7.4-4.1 will be updated\n---> Package xen-dom0-libs.x86_64 0:4.7.5-4.2 will be an update\n---> Package xen-dom0-tools.x86_64 0:4.7.4-4.1 will be updated\n---> Package xen-dom0-tools.x86_64 0:4.7.5-4.2 will be an update\n---> Package xen-hypervisor.x86_64 0:4.7.4-4.1 will be updated\n---> Package xen-hypervisor.x86_64 0:4.7.5-4.2 will be an update\n---> Package xen-libs.x86_64 0:4.7.4-4.1 will be updated\n---> Package xen-libs.x86_64 0:4.7.5-4.2 will be an update\n---> Package xen-tools.x86_64 0:4.7.4-4.1 will be updated\n---> Package xen-tools.x86_64 0:4.7.5-4.2 will be an update\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nUpdating:\n microcode_ctl x86_64 2:2.1-22.xs1 xcp-ng 1.2 M\n xen-dom0-libs x86_64 4.7.5-4.2 xcp-ng 547 k\n xen-dom0-tools x86_64 4.7.5-4.2 xcp-ng 1.1 M\n xen-hypervisor x86_64 4.7.5-4.2 xcp-ng 2.0 M\n xen-libs x86_64 4.7.5-4.2 xcp-ng 27 k\n xen-tools x86_64 4.7.5-4.2 xcp-ng 22 k\n\nTransaction Summary\n================================================================================\nUpgrade 6 Packages\n\nTotal download size: 4.9 M\nDownloading packages:\nDelta RPMs disabled because /usr/bin/applydeltarpm not installed.\n--------------------------------------------------------------------------------\nTotal 1.5 MB/s | 4.9 MB 00:03 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Updating : xen-hypervisor-4.7.5-4.2.x86_64 1/12 \n Updating : xen-libs-4.7.5-4.2.x86_64 2/12 \n Updating : xen-dom0-libs-4.7.5-4.2.x86_64 3/12 \n Updating : xen-tools-4.7.5-4.2.x86_64 4/12 \n Updating : xen-dom0-tools-4.7.5-4.2.x86_64 5/12 \n Updating : 2:microcode_ctl-2.1-22.xs1.x86_64 6/12 \n Cleanup : 2:microcode_ctl-2.1-16.xs2.1.x86_64 7/12 \n Cleanup : xen-dom0-tools-4.7.4-4.1.x86_64 8/12 \n Cleanup : xen-tools-4.7.4-4.1.x86_64 9/12 \n Cleanup : xen-libs-4.7.4-4.1.x86_64 10/12 \n Cleanup : xen-dom0-libs-4.7.4-4.1.x86_64 11/12 \n Cleanup : xen-hypervisor-4.7.4-4.1.x86_64 12/12 \n Verifying : xen-dom0-libs-4.7.5-4.2.x86_64 1/12 \n Verifying : 2:microcode_ctl-2.1-22.xs1.x86_64 2/12 \n Verifying : xen-hypervisor-4.7.5-4.2.x86_64 3/12 \n Verifying : xen-dom0-tools-4.7.5-4.2.x86_64 4/12 \n Verifying : xen-libs-4.7.5-4.2.x86_64 5/12 \n Verifying : xen-tools-4.7.5-4.2.x86_64 6/12 \n Verifying : xen-dom0-libs-4.7.4-4.1.x86_64 7/12 \n Verifying : xen-dom0-tools-4.7.4-4.1.x86_64 8/12 \n Verifying : xen-tools-4.7.4-4.1.x86_64 9/12 \n Verifying : 2:microcode_ctl-2.1-16.xs2.1.x86_64 10/12 \n Verifying : xen-hypervisor-4.7.4-4.1.x86_64 11/12 \n Verifying : xen-libs-4.7.4-4.1.x86_64 12/12 \n\nUpdated:\n microcode_ctl.x86_64 2:2.1-22.xs1 xen-dom0-libs.x86_64 0:4.7.5-4.2 \n xen-dom0-tools.x86_64 0:4.7.5-4.2 xen-hypervisor.x86_64 0:4.7.5-4.2 \n xen-libs.x86_64 0:4.7.5-4.2 xen-tools.x86_64 0:4.7.5-4.2 \n\nComplete!\n'}
-
I mean I know that, we did the script, but could you waited a bit (it's not finished yet ). Plus we are packaging in into RPM, then we'll create the UI in XO to use it. If you have access on the host, it would be faster to just
yum check-updates
and/oryum update
directlyThe concept is to expose it in XAPI for external tools (like XO) to update a whole pool at once
Anyway, glad to know we have some ultra early alpha testers
-
If our host is up to date, should we run the update script for XOCE and from SSH on the host?
I should mention that I have updated XOCE about a week ago and I notice that there is a Backup NG as a choice in the menu. -
I don't see the connection between updating Xen Orchestra from the source and XCP-ng.
-
@olivierlambert said in [Work in progress…] XAPI plugin for host updates:
I don't see the connection between updating Xen Orchestra from the source and XCP-ng.
Sorry. I should have read the entire thread. My mistake
-
Screenshot of a working piece of code:
-
Here it is: https://xen-orchestra.com/blog/xcp-ng-updates-from-xen-orchestra/
Available in XO for 5.20 release!
-
Nice feature, good job team
-
Will this feature come to debian?
-
I'm not sure to understand your question. What do you mean?