Arik Hadas has uploaded a new change for review. Change subject: virt: hibernation - use r+ to open vm conf file ......................................................................
virt: hibernation - use r+ to open vm conf file Complementary part of Ic6799e07898155fd4a630bfaf4151ea9ccdcee49 for vm hibernation. Change-Id: I75bb6c69541678ea9b0ede4a917318075bfe25c6 Signed-off-by: Arik Hadas <aha...@redhat.com> Reviewed-on: https://gerrit.ovirt.org/48826 Reviewed-by: Nir Soffer <nsof...@redhat.com> Reviewed-by: Francesco Romani <from...@redhat.com> Continuous-Integration: Jenkins CI (cherry picked from commit 4bbda7aa8f53f14b6add488694e5f1f26fb27fc3) --- M vdsm/virt/migration.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/48915/1 diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index de1c4f2..7d8b374 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -231,7 +231,8 @@ fname = self._vm.cif.prepareVolumePath(self._dstparams) try: - with open(fname, "w") as f: + # Use r+ to avoid truncating the file, see BZ#1282239 + with open(fname, "r+") as f: pickle.dump(self._machineParams, f) finally: self._vm.cif.teardownVolumePath(self._dstparams) -- To view, visit https://gerrit.ovirt.org/48915 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75bb6c69541678ea9b0ede4a917318075bfe25c6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches