fix(xo-server/worker): forget remote after use (#4079)
Fixes xoa-support#1378 Fixes xoa-support#1384 Fixes xoa-support#1399
This commit is contained in:
parent
851bcf9816
commit
0938804947
@ -2,7 +2,7 @@
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [Remote] Benchmarks (read and write rate speed) added when remote is tested [#3991](https://github.com/vatesfr/xen-orchestra/issues/3991) (PR [#4015](https://github.com/vatesfr/xen-orchestra/pull/4015))
|
||||
- [Remotes] Benchmarks (read and write rate speed) added when remote is tested [#3991](https://github.com/vatesfr/xen-orchestra/issues/3991) (PR [#4015](https://github.com/vatesfr/xen-orchestra/pull/4015))
|
||||
- [Cloud Config] Support both NoCloud and Config Drive 2 datasources for maximum compatibility (PR [#4053](https://github.com/vatesfr/xen-orchestra/pull/4053))
|
||||
- [Advanced] Configurable cookie validity (PR [#4059](https://github.com/vatesfr/xen-orchestra/pull/4059))
|
||||
- [Plugins] Display number of installed plugins [#4008](https://github.com/vatesfr/xen-orchestra/issues/4008) (PR [#4050](https://github.com/vatesfr/xen-orchestra/pull/4050))
|
||||
@ -10,6 +10,7 @@
|
||||
### Bug fixes
|
||||
|
||||
- [Home] Always sort the items by their names as a secondary sort criteria [#3983](https://github.com/vatesfr/xen-orchestra/issues/3983) (PR [#4047](https://github.com/vatesfr/xen-orchestra/pull/4047))
|
||||
- [Remotes] Fixes `spawn mount EMFILE` error during backup
|
||||
- Properly redirect to sign in page instead of being stuck in a refresh loop
|
||||
|
||||
### Released packages
|
||||
|
@ -1,5 +1,6 @@
|
||||
// @flow
|
||||
|
||||
import defer from 'golike-defer'
|
||||
import { type Remote, getHandler } from '@xen-orchestra/fs'
|
||||
import { mergeVhd as mergeVhd_ } from 'vhd-lib'
|
||||
|
||||
@ -12,7 +13,8 @@ global.Promise = require('bluebird')
|
||||
// $FlowFixMe
|
||||
const config: Object = JSON.parse(process.env.XO_CONFIG)
|
||||
|
||||
export async function mergeVhd(
|
||||
export const mergeVhd = defer(async function(
|
||||
$defer: any,
|
||||
parentRemote: Remote,
|
||||
parentPath: string,
|
||||
childRemote: Remote,
|
||||
@ -21,9 +23,11 @@ export async function mergeVhd(
|
||||
const parentHandler = getHandler(parentRemote, config.remoteOptions)
|
||||
const childHandler = getHandler(childRemote, config.remoteOptions)
|
||||
|
||||
// DO NOT forget the handlers as it they are still in use in the main process
|
||||
await parentHandler.sync()
|
||||
$defer.call(parentHandler, 'forget')
|
||||
|
||||
await childHandler.sync()
|
||||
$defer.call(childHandler, 'forget')
|
||||
|
||||
return mergeVhd_(parentHandler, parentPath, childHandler, childPath)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user