fix(xo-server/xapi): don't silently swallow errors on _callInstallationPlugin (#5809)
See xoa-support#3738
Introduced by a73acedc4d
This was done to prevent triggering an error when the pack was already
installed but a XENAPI_PLUGIN_FAILURE error can happen for other reasons
This commit is contained in:
@@ -962,10 +962,10 @@ export default class Xapi extends XapiBase {
|
||||
@synchronized()
|
||||
_callInstallationPlugin(hostRef, vdi) {
|
||||
return this.call('host.call_plugin', hostRef, 'install-supp-pack', 'install', { vdi }).catch(error => {
|
||||
if (error.code !== 'XENAPI_PLUGIN_FAILURE') {
|
||||
log.warn('_callInstallationPlugin', { error })
|
||||
if (error.code !== 'XENAPI_PLUGIN_FAILURE' || !error.params?.[2]?.includes?.('UPDATE_ALREADY_APPLIED')) {
|
||||
throw error
|
||||
}
|
||||
log.warn('_callInstallationPlugin', { error })
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user