Skip to content
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

rbd: support namespaces for image migration #24836

Merged
merged 1 commit into from
Nov 2, 2018
Merged

Conversation

dillaman
Copy link

Fixes: http://tracker.ceph.com/issues/26951
Signed-off-by: Jason Dillaman dillaman@redhat.com

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

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

Actually, I think RefreshReques::get_migration_info needs update to properly set namespace in parent_md->spec and migration_info.

@dillaman
Copy link
Author

@trociny Good catch -- added

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

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

Don't we want to add the namespace field to MigrationInfo structure? It will probably have never been used but the same it true for pool_id and image_id.

@dillaman
Copy link
Author

@trociny fixed

char *source_image_name;
char *source_image_id;
int64_t dest_pool_id;
char *dest_pool_namespace;
Copy link
Contributor

Choose a reason for hiding this comment

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

@dillaman need to update ctypedef struct rbd_image_migration_status_t in rbd.pyx:

zhuzha:~/ceph/ceph.ci/build% RBD_FEATURES=127 PYTHONPATH=../src/test/pybind:../src/pybind:./lib/cython_modules/lib.2 LD_LIBRARY_PATH=./lib nosetests -v test_rbd:TestMigration.test_migration
test_rbd.TestMigration.test_migration ... ERROR

======================================================================
ERROR: test_rbd.TestMigration.test_migration
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/ssd/ceph/ceph.ci/src/test/pybind/test_rbd.py", line 2041, in test_migration
    status = RBD().migration_status(ioctx, image_name)
  File "rbd.pyx", line 1413, in rbd.RBD.migration_status (/home/mgolub/ceph/ceph.ci/build/src/pybind/rbd/rbd.c:11588)
OSError: [errno 34] error getting migration status

Copy link
Author

Choose a reason for hiding this comment

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

Fixed -- and just learned that Cython doesn't validate the structs.

Fixes: http://tracker.ceph.com/issues/26951
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
trociny added a commit to trociny/ceph that referenced this pull request Nov 2, 2018
…ceph#24836 · ceph/ceph · GitHub

* wip-26951:
  rbd: support namespaces for image migration
@trociny trociny merged commit f59ec53 into ceph:master Nov 2, 2018
@dillaman dillaman deleted the wip-26951 branch November 2, 2018 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants