Skip to content

Fix the problem at #1740 when it loads all snapshots in the primary storage - #2808

Merged
rafaelweingartner merged 2 commits into
apache:masterfrom
rafaelweingartner:fix1704
Aug 17, 2018
Merged

Fix the problem at #1740 when it loads all snapshots in the primary storage#2808
rafaelweingartner merged 2 commits into
apache:masterfrom
rafaelweingartner:fix1704

Conversation

@rafaelweingartner

Copy link
Copy Markdown
Member

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 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.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

How Has This Been Tested?

Manually and unit tests

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
    Testing
  • I have added tests to cover my changes.
  • All relevant new and existing integration tests have passed.
  • A full integration testsuite with all test that can run on my environment has passed.

…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.
@rafaelweingartner

Copy link
Copy Markdown
Member Author

@mike-tutkowski can you take a look at this PR? This is the follow-up of that #1740

@mike-tutkowski

Copy link
Copy Markdown
Member

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 ===
ok
test_online_migrate_volume_with_snapshot_from_nfs_storage_to_managed_storage (TestOnlineStorageMigration.TestOnlineStorageMigration) ... === TestName: test_online_migrate_volume_with_snapshot_from_nfs_storage_to_managed_storage | Status : SUCCESS ===
ok


Ran 2 tests in 472.520s

OK

@mike-tutkowski
mike-tutkowski self-requested a review August 15, 2018 22:09

@mike-tutkowski mike-tutkowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafaelweingartner

Copy link
Copy Markdown
Member Author

Thanks @mike-tutkowski !

@DaanHoogland

Copy link
Copy Markdown
Contributor

looks good
@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2254

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-2936)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 25829 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2808-t2936-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 67 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_vpc_privategw_restart_vpc_cleanup Failure 1220.96 test_privategw_acl.py
test_hostha_enable_ha_when_host_in_maintenance Error 3.62 test_hostha_kvm.py

@rafaelweingartner
rafaelweingartner merged commit 21c0225 into apache:master Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants