Allon Mureinik has posted comments on this change.
Change subject: core: fix redundant storage server conn in db
......................................................................
Patch Set 4: I would prefer that you didn't submit this
(4 inline comments)
@Alissa - sorry for missing this when we originally talked, but I think the
@Internal annotation should be removed (see inline), otherwise, this poses a
potential security issue.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/DisconnectStorageServerConnectionCommand.java
Line 37: }
Line 38:
Line 39: return returnValue;
Line 40: }
Line 41:
@Michael - trying to see if I understand your point.
The general idea requires extracting this logic.
Do you think executeCommand() will look better like this?
protected void executeCommand() {
disconnectStorage();
setSucceeded(true);
}
Line 42: protected boolean disconnectStorage() {
Line 43: return Backend.getInstance()
Line 44: .getResourceManager()
Line 45: .RunVdsCommand(
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageServerConnectionCommand.java
Line 5: import org.ovirt.engine.core.bll.NonTransactiveCommandAttribute;
Line 6: import
org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase;
Line 7:
Line 8: @NonTransactiveCommandAttribute
Line 9: @InternalCommandAttribute
DisconnectStorageServerConnectionCommand, which
RemoveStorageServerConnectionCommand extends is internal - which seems like a
bug to me.
Let's remove @Internal from it, and then send this patch without it.
Line 10: public class RemoveStorageServerConnectionCommand<T extends
StorageServerConnectionParametersBase> extends
DisconnectStorageServerConnectionCommand {
Line 11:
Line 12: public RemoveStorageServerConnectionCommand(T parameters) {
Line 13: super(parameters);
....................................................
Commit Message
Line 6:
Line 7: core: fix redundant storage server conn in db
Line 8:
Line 9: Fix several problems related to "orphan" storage server connections in
Line 10: db.
throughout the commit message: s/db/DB/
Line 11: The redundant entries were inserted to db when
AddStorageServerConnectionCommand
Line 12: succeeded, but another command that ran after it failed. Adding a new
Line 13: command that in case of failure deletes the connection from db fixes
the
Line 14: problem.
Line 15: As part of the fix, added assignment of the connection id in UI in
Line 16: StorageListModel after it is created, because otherwise it
Line 17: would not know which connection to delete.
Line 18: The fix takes care of use cases of NFS, POSIX and local storage coming
Line 19: from UI.
IMHO, a blank line between each paragraph will cause the message to look better.
Line 20:
Line 21: Change-Id: Iea5468371514bd2c7bc043a6c5520e2864a09fe8
Line 22: Bug-Url: https://bugzilla.redhat.com/815083
--
To view, visit http://gerrit.ovirt.org/11936
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iea5468371514bd2c7bc043a6c5520e2864a09fe8
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches