parent
e65b3200cd
commit
f06a937c9c
@ -10,6 +10,8 @@
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- [Servers] Fix deleting server on joining a pool [#2238](https://github.com/vatesfr/xen-orchestra/issues/2238) (PR [#3728](https://github.com/vatesfr/xen-orchestra/pull/3728))
|
||||
|
||||
### Released packages
|
||||
|
||||
- xen-api v0.22.0
|
||||
|
@ -1,4 +1,5 @@
|
||||
import createLogger from '@xen-orchestra/log'
|
||||
import { findKey } from 'lodash'
|
||||
import { ignoreErrors } from 'promise-toolbox'
|
||||
import { noSuchObject } from 'xo-common/api-errors'
|
||||
|
||||
@ -440,12 +441,12 @@ export default class {
|
||||
return this._stats.getSrStats(this.getXapi(srId), srId, granularity)
|
||||
}
|
||||
|
||||
async mergeXenPools(sourceId, targetId, force = false) {
|
||||
const sourceXapi = this.getXapi(sourceId)
|
||||
async mergeXenPools(sourcePoolId, targetPoolId, force = false) {
|
||||
const sourceXapi = this.getXapi(sourcePoolId)
|
||||
const {
|
||||
_auth: { user, password },
|
||||
_url: { hostname },
|
||||
} = this.getXapi(targetId)
|
||||
} = this.getXapi(targetPoolId)
|
||||
|
||||
// We don't want the events of the source XAPI to interfere with
|
||||
// the events of the new XAPI.
|
||||
@ -459,6 +460,8 @@ export default class {
|
||||
throw e
|
||||
}
|
||||
|
||||
await this.unregisterXenServer(sourceId)
|
||||
this.unregisterXenServer(
|
||||
findKey(this._xapis, candidate => candidate === sourceXapi)
|
||||
)::ignoreErrors()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user