Skip to content

Commit

Permalink
rename callback beforeEvacuateHost=> beforeRebootHost
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Dec 19, 2023
1 parent 9895a9b commit a94dabd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/xo-server/src/xapi/mixins/patching.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ export default {
await this.installPatches({ xsCredentials })
}
},
beforeEvacuateHost: async host=>{
beforeRebootHost: async host=>{
if(isXcp){

await this.installPatches({ hosts: [host] })
Expand Down
6 changes: 3 additions & 3 deletions packages/xo-server/src/xapi/mixins/pool.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
},

@decorateWith(deferrable)
async rollingPullReboot($defer, { xsCredentials, beforeEvacuateAny, beforeEvacuateHost, ignoreHost } = {}){
async rollingPullReboot($defer, { xsCredentials, beforeEvacuateAny, beforeRebootHost, ignoreHost } = {}){
if (this.pool.ha_enabled) {
const haSrs = this.pool.$ha_statefiles.map(vdi => vdi.SR)
const haConfig = this.pool.ha_configuration
Expand Down Expand Up @@ -108,8 +108,8 @@ export default {
const getServerTime = async () => parseDateTime(await this.call('host.get_servertime', host.$ref)) * 1e3
log.debug(`Evacuate host ${hostId}`)
await this.clearHost(host)
if(beforeEvacuateHost){
await beforeEvacuateHost(host)
if(beforeRebootHost){
await beforeRebootHost(host)
}
const rebootTime = await getServerTime()
await this.callAsync('host.reboot', host.$ref)
Expand Down

0 comments on commit a94dabd

Please sign in to comment.