Fix the problem at #1740 when it loads all snapshots in the primary storage - #2808
Conversation
…mary storage While checking a problem with @mike-tutkowski at PR apache#1740, we noticed that the method `org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl.getSnapshots(long, DataStoreRole)` was not loading the snapshots in `snapshot_store_ref` table according to their storage role. Instead, it would return a list of all snapshots (even if they are not in the storage role sent as a parameter) saying that they are in the storage that was sent as parameter.
|
@mike-tutkowski can you take a look at this PR? This is the follow-up of that #1740 |
|
The code LGTM. Also, I have run the particular managed-storage test suite (this one only contains two tests) that initially led me to #1740 and both tests in it passed: test_online_migrate_volume_from_nfs_storage_to_managed_storage (TestOnlineStorageMigration.TestOnlineStorageMigration) ... === TestName: test_online_migrate_volume_from_nfs_storage_to_managed_storage | Status : SUCCESS === Ran 2 tests in 472.520s OK |
|
Thanks @mike-tutkowski ! |
|
looks good |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2254 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2936)
|
Description
While checking a problem with @mike-tutkowski at PR #1740, we noticed that the method
org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl.getSnapshots(long, DataStoreRole)was not loading the snapshots insnapshot_store_reftable according to their storage role. Instead, it would return a list of all snapshots (even if they are not in the storage role sent as a parameter) saying that they are in the storage that was sent as parameter.Types of changes
How Has This Been Tested?
Manually and unit tests
Checklist:
Testing