Federico Simoncelli has uploaded a new change for review. Change subject: webadmin: avoid disconnect server on attach domain ......................................................................
webadmin: avoid disconnect server on attach domain During the "Import Domain" flow (mostly driven by the UI) the execution of AttachStorageDomainToPool and DisconnectStorageServerConnection were involved a race that in some cases resulted in the attach operation to fail (since the server was disconnected). Now after attachStorageToDataCenter we avoid postImportFileStorage (since the storage should remain connected), and we go straight to onFinish because any issue in AttachStorageDomainToPool is handled by the default error dialog. This fix is just removing the race between the calls and it's not intended to address other bugs that are present in the flow (for example what happens if the user closes the web browser during the chain of execution? who is cleaning up the storage connections? etc.) Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=994463 Change-Id: Ie880c25014c5292ad64ed94ad9c126fdd048d7bc Signed-off-by: Federico Simoncelli <fsimo...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/49/18649/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java index e097856..8e946ef 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java @@ -2077,8 +2077,10 @@ StoragePool dataCenter = (StoragePool) model.getDataCenter().getSelectedItem(); if (!dataCenter.getId().equals(StorageModel.UnassignedDataCenterId)) { storageListModel.attachStorageToDataCenter(sdToAdd1.getId(), dataCenter.getId()); + onFinish(storageListModel.context, true, storageListModel.storageModel, null); + } else { + postImportFileStorage(storageListModel.context, true, storageListModel.storageModel, null); } - postImportFileStorage(storageListModel.context, true, storageListModel.storageModel, null); } else { postImportFileStorage(storageListModel.context, false, storageListModel.storageModel, ""); //$NON-NLS-1$ -- To view, visit http://gerrit.ovirt.org/18649 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie880c25014c5292ad64ed94ad9c126fdd048d7bc Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches