Nir Soffer has posted comments on this change.

Change subject: vm.py: State saving in hotunplugDisk.
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/45077/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 2628
Line 2629
Line 2630
Line 2631
Line 2632
This should be done only if the disk was removed. There is no reason to remove 
a drive before it was actually removed.


Line 2648:         else:
Line 2649:             hooks.after_disk_hotunplug(driveXml, self.conf,
Line 2650:                                        params=drive.custom)
Line 2651:             self._cleanupDrives(drive)
Line 2652:             self.saveState()
If vdsm crash after  invoking detachDevice, the unplugged disk will still be in 
the recovery file, and the vm object after vdsm starts will contain the removed 
device. This is the reason we save state *before* operations in many places.

Please check that we update the vm object drives based on the real vm state, so 
stale drives are removed in this case.
Line 2653: 
Line 2654:         return {'status': doneCode, 'vmList': self.status()}
Line 2655: 
Line 2656:     def _readPauseCode(self):


-- 
To view, visit https://gerrit.ovirt.org/45077
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2cf18186cbba33d7e74fd15651ffec3149c98e1d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to