fix(xo-server/patching): always pass xsCredentials to installPatches on XS (#7089)
Fixes Zammad#18284
Introduced by a30d962b1d
This commit is contained in:
parent
6afb87def1
commit
77d53d2abf
@ -16,6 +16,7 @@
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
- [Rolling Pool Update] After the update, when migrating VMs back to their host, do not migrate VMs that are already on the right host [Forum#7802](https://xcp-ng.org/forum/topic/7802) (PR [#7071](https://github.com/vatesfr/xen-orchestra/pull/7071))
|
||||
- [RPU] Fix "XenServer credentials not found" when running a Rolling Pool Update on a XenServer pool (PR [#7089](https://github.com/vatesfr/xen-orchestra/pull/7089))
|
||||
|
||||
### Packages to release
|
||||
|
||||
|
@ -493,7 +493,7 @@ export default {
|
||||
},
|
||||
|
||||
@decorateWith(deferrable)
|
||||
async rollingPoolUpdate($defer) {
|
||||
async rollingPoolUpdate($defer, { xsCredentials } = {}) {
|
||||
const isXcp = _isXcp(this.pool.$master)
|
||||
|
||||
if (this.pool.ha_enabled) {
|
||||
@ -530,7 +530,7 @@ export default {
|
||||
// On XS/CH, start by installing patches on all hosts
|
||||
if (!isXcp) {
|
||||
log.debug('Install patches')
|
||||
await this.installPatches()
|
||||
await this.installPatches({ xsCredentials })
|
||||
}
|
||||
|
||||
// Remember on which hosts the running VMs are
|
||||
|
@ -62,11 +62,14 @@ export default class Pools {
|
||||
}
|
||||
const patchesName = await Promise.all([targetXapi.findPatches(targetRequiredPatches), ...findPatchesPromises])
|
||||
|
||||
const { xsCredentials } = _app.apiContext.user.preferences
|
||||
|
||||
// Install patches in parallel.
|
||||
const installPatchesPromises = []
|
||||
installPatchesPromises.push(
|
||||
targetXapi.installPatches({
|
||||
patches: patchesName[0],
|
||||
xsCredentials,
|
||||
})
|
||||
)
|
||||
let i = 1
|
||||
@ -74,6 +77,7 @@ export default class Pools {
|
||||
installPatchesPromises.push(
|
||||
sourceXapis[sourceId].installPatches({
|
||||
patches: patchesName[i++],
|
||||
xsCredentials,
|
||||
})
|
||||
)
|
||||
}
|
||||
|
@ -686,7 +686,7 @@ export default class XenServers {
|
||||
$defer(() => app.loadPlugin('load-balancer'))
|
||||
}
|
||||
|
||||
await this.getXapi(pool).rollingPoolUpdate()
|
||||
await this.getXapi(pool).rollingPoolUpdate({ xsCredentials: app.apiContext.user.preferences.xsCredentials })
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user