vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
795 stars 265 forks source link

Improve XCP-ng updates display - Display when an host is upgrading #5835

Open benjamreis opened 3 years ago

benjamreis commented 3 years ago

We had some report on XCP-ng side that the XCP-ng display can be misleading and sometimes lead to a user breaking its install (see https://xcp-ng.org/forum/topic/4724/kernel-panic-after-latest-patches)

I've been playing around with the updater plugin and the update view in XO so here's what I can say:

The updater

The updater has a mechanism to not be ran twice, so it's possible to see if an update is ongoing:

[11:04 xcp-ng-findqbvm ~]# xe host-call-plugin host-uuid=d267d9b4-fa25-4106-9719-8d108d87b219  plugin=updater.py fn=check_update
{"error": "The updater plugin is busy (current operation: update)"}
[11:04 xcp-ng-findqbvm ~]# xe host-call-plugin host-uuid=d267d9b4-fa25-4106-9719-8d108d87b219  plugin=updater.py fn=update
{"error": "Update already in progress"}

But XO throw this:

pool.installPatches
{
  "hosts": [
    "d267d9b4-fa25-4106-9719-8d108d87b219"
  ]
}
{
  "message": "",
  "name": "Error",
  "stack": "Error: 
    at Xapi._xcpUpdate (file:///usr/local/lib/node_modules/xo-server/src/xapi/mixins/patching.mjs:323:15)
    at Object.installPatches (file:///usr/local/lib/node_modules/xo-server/src/api/pool.mjs:100:3)
    at Api.callApiMethod (file:///usr/local/lib/node_modules/xo-server/src/xo-mixins/api.mjs:304:20)"
}

IMHO an "host is upgrading" icon/message would be better.

Also I'm currently adding a XAPI task when an host is upgrading so that'd be helpful for XCP-ng 8.3+.

XO host updates view

Here's are some weird behavior I encountered while using XO to update my hosts:

=> an upgrading woudl solve all of the above issues if it prevents a user from rebooting, trying to install update on the hosts etc.

What do you think?

julien-f commented 3 years ago

All plugins now throw in case of errors.

List of plugins used by XO:

olivierlambert commented 5 months ago

To do in Q3, someone needs to be assigned.