Fix of revert RBD snapshots - #5544
Conversation
|
@slavkap code looks good, but shouldn't this extra check only occurs if |
|
@DaanHoogland, thanks for the review! If you ask me, the right solution is first to check if the snapshot is on the primary storage and, if it's not there, to check on secondary. From what I saw in all of the storage plugins, the snapshots are kept on primary storage always. For me checking the value of
|
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 1482 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2299)
|
@slavkap , are you doing / planning that? or creating a ticket for it? |
|
@sureshanaparti @nvazquez @DaanHoogland what's the concensus here, is this good to merge? |
not yet @rhtyd |
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@sureshanaparti, I have to make some changes in the unit tests, that's why I converted it as a draft |
|
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian. SL-JID 1518 |
|
@blueorangutan package |
|
@slavkap a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@slavkap can you re-target to 'main' pls. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 1520 |
|
Hi @slavkap should this be targetted for 4.17 or 4.16.1? |
|
Hi @rhtyd, I guess that it will be better to get in 4.16.1. Later today I'll change the target branch |
|
@blueorangutan test centos7 vmware-67u3 |
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian test result (tid-3230)
|
|
@blueorangutan test keepEnv |
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Verified snapshot operations with PowerFlex and NFS. Minor suggestions on error messages. rest all LGTM. |
If snapshot is taken only on Primary storage with the option "snapshot.backup.to.secondary" set to true, when you set this option to false the revert will fail. Added check if the snapshot is not on Secondary to check for it on Primary
Will check first if the snapshot is on Primary storage, if not will return Image as data store
34568ca to
d4e0ecc
Compare
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2541 |
|
@blueorangutan test centos7 xcpng82 |
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + xcpng82) has been kicked to run smoke tests |
|
Trillian test result (tid-3267)
|
test failure ^^^ is unrelated to the PR changes. |
* Fix of revert RBD snapshots If snapshot is taken only on Primary storage with the option "snapshot.backup.to.secondary" set to true, when you set this option to false the revert will fail. Added check if the snapshot is not on Secondary to check for it on Primary * Check if snapshot is on primary storage Will check first if the snapshot is on Primary storage, if not will return Image as data store * Fix unit tests * removed unused method's params * Formatted error message and added the snapshot ID to it * Return to the old logic, the fix will only apply to RBD * Formatted Exception's messages
Description
If a snapshot is taken only on Primary storage with the option "snapshot.backup.to.secondary" disabled, and after this when you enable the option the revert will fail. Added check if there isn't a snapshot on Secondary storage to check for it on Primary.
Types of changes
Bug Severity
How Has This Been Tested?
4.15 and main with KVM hypervisors
set
snapshot.backup.to.secondarytofalsetake one or more snapshots
set
snapshot.backup.to.secondarytotruetry to revert the snapshot. The operation will fail with "snapshot [snapshot ID] does not exists in data store"