-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor LiveMigrateDiskParameters & MoveOrCopyImageGroupParameters #623
Conversation
/ost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@barpavel did you check what would happen when trying to deserialize parameters that were persisted to command_entities in a previous version? theoretically such things should be cleared on engine upgrade but we saw it's not always the case. if that fails, we'd need to keep the old setters/getter as deprecated or specify somehow that the new setter/getter replaces the previous ones
Hi @ahadas,
|
Yes
I believe (b) but maybe (c) |
71729b3
to
edfc285
Compare
/ost |
Hi @ahadas ,
Results - all works as expected.
Results - in all 3 above cases I see the same behavior: LSM flow continues, disk is moved to a new Storage Domain, but the operation is stuck with an endless |
edfc285
to
0eb7e99
Compare
bef9836
to
63ca05c
Compare
/ost |
1 similar comment
/ost |
...common/src/main/java/org/ovirt/engine/core/common/action/MoveOrCopyImageGroupParameters.java
Show resolved
Hide resolved
3bacee7
to
506aa13
Compare
/ost |
...common/src/main/java/org/ovirt/engine/core/common/action/MoveOrCopyImageGroupParameters.java
Show resolved
Hide resolved
e6cb04b
to
842069c
Compare
842069c
to
eb6ce87
Compare
eb6ce87
to
1589e0e
Compare
/ost |
…Parameters" Add a clean and naming-consistent source Storage Domain ID support in the "MoveOrCopyImageGroupParameters" class. 1. Removing the unnecessary "getSourceStorageDomainId()" getter from "LiveMigrateDiskParameters" class and using "getSourceDomainId()" from its parent's "MoveOrCopyImageGroupParameters" class. 2. Improving the "setSourceDomainId()" method's parameter name. Background: Commands performing actions on 2 Storage Domains (source & destination) use "MoveOrCopyImageGroupParameters" or its subclasses. Until "MoveOrCopyImageGroupParameters" there was only 1 Storage Domain used - the one that the action was performed on. The support for source Storage Domain ID was added in "MoveOrCopyImageGroupParameters", while the already existing (in "StorageDomainParametersBase" superclass) Storage Domain ID was implicitly used as the destination Storage Domain ID. Some additional support to easier reference source & destination Storage Domains was added in "LiveMigrateDiskParameters". Still there were a few issues - a missing clear destination Storage Domain ID setter and also inconsistent naming between the classes. Refactoring the code to add the full and naming-consistent source & destination Storage Domains getters and setters in the "MoveOrCopyImageGroupParameters" class, thus those will be inherited by its subclasses (i.e., "LiveMigrateDiskParameters"). Signed-off-by: Pavel Bar <pbar@redhat.com>
…GroupParameters" Add a clean and naming-consistent destination Storage Domain ID support in the "MoveOrCopyImageGroupParameters" class. Actually hiding the usage of the data member from "StorageDomainParametersBase" superclass and wrapping it's getter & setter by the new ones. 1. Fix naming of the getter from "getTargetStorageDomainId()" to a more consistent "getDestDomainId()" and move it from "LiveMigrateDiskParameters" class to its parent's "MoveOrCopyImageGroupParameters". 2. Add a setter "setDestDomainId()" in "MoveOrCopyImageGroupParameters" class. 3. Refactoring code over multiple classes to use the above accessor & mutator. 4. Better and consistent names for "MoveOrCopyImageGroupParameters" Constructors. Background: Commands performing actions on 2 Storage Domains (source & destination) use "MoveOrCopyImageGroupParameters" or its subclasses. Until "MoveOrCopyImageGroupParameters" there was only 1 Storage Domain used - the one that the action was performed on. The support for source Storage Domain ID was added in "MoveOrCopyImageGroupParameters", while the already existing (in "StorageDomainParametersBase" superclass) Storage Domain ID was implicitly used as the destination Storage Domain ID. Some additional support to easier reference source & destination Storage Domains was added in "LiveMigrateDiskParameters". Still there were a few issues - a missing clear destination Storage Domain ID setter and also inconsistent naming between the classes. Refactoring the code to add the full and naming-consistent source & destination Storage Domains getters and setters in the "MoveOrCopyImageGroupParameters" class, thus those will be inherited by its subclasses (i.e., "LiveMigrateDiskParameters"). Signed-off-by: Pavel Bar <pbar@redhat.com>
1. "sourceStorageDomainId" --> "sourceDomainId" 2. "targetStorageDomainId" --> "destDomainId" 3. "target" --> "dest" / "destination" Signed-off-by: Pavel Bar <pbar@redhat.com>
1589e0e
to
1fb92cc
Compare
/ost |
Commands performing actions on 2 Storage Domains (source & destination) use
MoveOrCopyImageGroupParameters
or its subclasses.Until
MoveOrCopyImageGroupParameters
there was only 1 Storage Domain used - the one that the action was performed on.The support for source Storage Domain ID was added in
MoveOrCopyImageGroupParameters
, while the already existing (inStorageDomainParametersBase
superclass) Storage Domain ID was implicitly used as the destination Storage Domain ID.Some additional support to easier reference source & destination Storage Domains' IDs was added in
LiveMigrateDiskParameters
.Still there were a few issues - a missing clear destination Storage Domain ID setter and also inconsistent naming between the classes.
Refactoring the code to add the full and naming-consistent source & destination Storage Domains' IDs getters and setters in the
MoveOrCopyImageGroupParameters
class, which will be inherited by its subclasses (i.e.,LiveMigrateDiskParameters
).