Liron Ar has posted comments on this change. Change subject: engine: Remove address from hotunplugged devices ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/26598/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java: Line 142: Line 143: private void updateDeviceIsPluggedProperty() { Line 144: VmDevice device = getVmDeviceDao().get(oldVmDevice.getId()); Line 145: device.setIsPlugged(!oldVmDevice.getIsPlugged()); Line 146: if (!device.getIsPlugged()) { if the vm is not down, clearing the address may cause to an issue when the vm will be started - consider the following case: 1. vm with plugged disk, whose address is A , vm is DOWN 2. device is deactivated, address being cleared 3. device being activated, no address 4. vm is started, the device is getting a new address Line 147: device.setAddress(""); Line 148: } Line 149: getVmDeviceDao().updateHotPlugDisk(device); Line 150: } Line 143: private void updateDeviceIsPluggedProperty() { Line 144: VmDevice device = getVmDeviceDao().get(oldVmDevice.getId()); Line 145: device.setIsPlugged(!oldVmDevice.getIsPlugged()); Line 146: if (!device.getIsPlugged()) { Line 147: device.setAddress(""); this won't work, updateHotPlugDisk() updates only the isplugged field. Line 148: } Line 149: getVmDeviceDao().updateHotPlugDisk(device); Line 150: } Line 151: -- To view, visit http://gerrit.ovirt.org/26598 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id5850fd4c15a230dbc27e8c22d47935083da21c2 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Xavi Francisco <xfran...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches