mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-11-09 17:06:13 -06:00
fix(backup) error footer1 !== footer2 (#8882)
* fix(vhd-lib): remove unused parent locator * fix(vhd-lig): improve error messages one wrong end footer
This commit is contained in:
committed by
GitHub
parent
e1ce9eca7b
commit
ea6410e711
@@ -17,6 +17,8 @@
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
[Backup]: fix error footer1 !== footer2 (PR [#8882](https://github.com/vatesfr/pull/8882))
|
||||
|
||||
### Packages to release
|
||||
|
||||
> When modifying a package, add it here with its release type.
|
||||
@@ -34,9 +36,10 @@
|
||||
<!--packages-start-->
|
||||
|
||||
- @vates/nbd-client patch
|
||||
- @xen-orchestra/vmware-explorer patch
|
||||
- @xen-orchestra/web minor
|
||||
- @xen-orchestra/web-core minor
|
||||
- @xen-orchestra/vmware-explorer patch
|
||||
- vhd-lib patch
|
||||
- xo-server minor
|
||||
- xo-web minor
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ exports.VhdFile = class VhdFile extends VhdAbstract {
|
||||
await vhd.readHeaderAndFooter(checkSecondFooter)
|
||||
} catch (err) {
|
||||
await vhd.dispose()
|
||||
err.size = await handler.getSizeOnDisk().catch(() => -1)
|
||||
throw err
|
||||
}
|
||||
return {
|
||||
@@ -207,7 +208,11 @@ exports.VhdFile = class VhdFile extends VhdAbstract {
|
||||
|
||||
if (checkSecondFooter) {
|
||||
const size = await this._handler.getSize(this._path)
|
||||
assert(bufFooter.equals(await this._read(size - FOOTER_SIZE, FOOTER_SIZE)), 'footer1 !== footer2')
|
||||
const endFooter = await this._read(size - FOOTER_SIZE, FOOTER_SIZE)
|
||||
assert(
|
||||
bufFooter.equals(endFooter),
|
||||
`footer1 !== footer2 ${bufFooter.toString('base64')} !== ${endFooter.toString('base64')}`
|
||||
)
|
||||
}
|
||||
|
||||
this.footer = footer
|
||||
|
||||
@@ -19,12 +19,10 @@ module.exports = async function chain(parentHandler, parentPath, childHandler, c
|
||||
}
|
||||
footer.diskType = DISK_TYPES.DIFFERENCING
|
||||
}
|
||||
await childVhd.readBlockAllocationTable()
|
||||
|
||||
const parentName = relativeFromFile(childPath, parentPath)
|
||||
header.parentUuid = parentVhd.footer.uuid
|
||||
header.parentUnicodeName = parentName
|
||||
await childVhd.setUniqueParentLocator(parentName)
|
||||
await childVhd.writeHeader()
|
||||
await childVhd.writeFooter()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user