Skip to content

librbd/migration/NativeFormat: support specifying mon_host and key via spec - #67968

Merged
idryomov merged 4 commits into
ceph:mainfrom
leonidc:prepare_import_migr_new_way
Jul 2, 2026
Merged

idryomov merged 4 commits into
ceph:mainfrom
leonidc:prepare_import_migr_new_way

Conversation

@leonidc

@leonidc leonidc commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

migration:
-take secret_key from spec and store in KV
-take mon_host from the spec
-ignore source keyring, source ceph.conf - bypass them
-use random uuid as key for store secret key
-added validations of the schems in try_get_secret_key
TBC
-keyring-file, conf-file and cluster-name are excluded from the
spec for the new schema

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@leonidc
leonidc requested a review from a team as a code owner March 24, 2026 06:26
@github-actions github-actions Bot added the rbd label Mar 24, 2026
@leonidc
leonidc requested a review from idryomov March 24, 2026 06:26
@caroav
caroav requested a review from bill-scales May 10, 2026 12:03

@bill-scales bill-scales left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally looks good, I think there's 1 bug and a couple of places where you probably shouldn't be logging the secret key plus a couple of nits.

Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
@leonidc
leonidc force-pushed the prepare_import_migr_new_way branch from 86512cf to 9354b58 Compare May 18, 2026 10:49
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
@leonidc
leonidc force-pushed the prepare_import_migr_new_way branch 2 times, most recently from e502e88 to 29859e8 Compare June 18, 2026 05:32
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/api/Migration.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
@leonidc
leonidc force-pushed the prepare_import_migr_new_way branch from 29859e8 to 844c4a9 Compare June 18, 2026 15:11
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/api/Migration.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
@leonidc
leonidc force-pushed the prepare_import_migr_new_way branch from 7d34b9d to 94af871 Compare June 21, 2026 07:20
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
@leonidc
leonidc force-pushed the prepare_import_migr_new_way branch from 94af871 to faeae8a Compare June 25, 2026 16:17
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
Comment thread src/librbd/migration/NativeFormat.cc Resolved
@leonidc
leonidc force-pushed the prepare_import_migr_new_way branch from faeae8a to f7b32a7 Compare June 28, 2026 06:52
@leonidc

leonidc commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

@idryomov , I think that implemented all your last requests except the one that changes place of
auto remote_cct = common_preinit(iparams, CODE_ENVIRONMENT_LIBRARY, 0)
since new way migration stops working after that. I think it because iparams did not include cluster name
that is a log :
2026-06-28T09:22:48.063+0300 7fce7ca74b00 5 librbd::migration::NativeFormat: create_image_ctx: found mon host in source spec: [v2:127.0.0.1:6820,v1:127.0.0.1:6821]
2026-06-28T09:22:48.063+0300 7fce7ca74b00 5 librbd::migration::NativeFormat: create_image_ctx: found key ref in source spec: config://rbd/migration/native/FOO
2026-06-28T09:22:48.064+0300 7fce7ca74b00 5 librbd::migration::NativeFormat: create_image_ctx: going to connect to remote cluster
2026-06-28T09:22:48.065+0300 7fce3f7fe640 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2,1]
2026-06-28T09:22:48.066+0300 7fce7ca74b00 -1 librbd::migration::NativeFormat: create_image_ctx: failed to connect to remote cluster: (13) Permission denied

@leonidc
leonidc requested a review from idryomov June 28, 2026 07:42
@idryomov

Copy link
Copy Markdown
Contributor

@idryomov , I think that implemented all your last requests except the one

There is also one whitespace nit, I commented in that thread to bump it.

that changes place of auto remote_cct [...]

I commented in respective thread. Let's keep the discussion there so that it's clear which comments belong where and that the thread can be meaningfully resolved later.

@leonidc
leonidc force-pushed the prepare_import_migr_new_way branch 2 times, most recently from 0ccf8b4 to e0dbc2d Compare June 29, 2026 08:00
@idryomov idryomov changed the title prepare RBD import migration , new way librbd/migration/NativeFormat: support specifying mon_host and key via spec Jul 1, 2026
@idryomov
idryomov force-pushed the prepare_import_migr_new_way branch from e0dbc2d to 47d74ac Compare July 1, 2026 14:04
@idryomov
idryomov requested a review from a team as a code owner July 1, 2026 14:04
@idryomov

idryomov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

I have addressed remaining whitespace nits, added some integration tests and updated documentation.

@idryomov

idryomov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor
The following tests FAILED:
	213 - mgr-dashboard-frontend-unittests (Failed)

@idryomov

idryomov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@idryomov

idryomov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

jenkins test windows

leonidc and others added 4 commits July 1, 2026 21:53
…a spec

migration:
           -take  secret_key from spec
           -take  mon_host from the spec
           -ignore source keyring, source ceph.conf - bypass them
           -added validations of the new way schema
           -get key from the KV DB if key in spec  is actually key-ref

Fixes: https://tracker.ceph.com/issues/68177
Signed-off-by: Leonid Chernin <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
Currently client.admin is passed for client_name and that doesn't
exercise client_name handling much as client.admin is the default.

When deploying multiple clusters the ceph task distributes keyrings
with only the key for the initial monitor and client.admin key.  Other
keys (e.g. client.0) are present only on their respective clusters, so
client.0's key for cluster2 needs to be obtained on cluster1 explicitly
with "ceph auth get".

Signed-off-by: Ilya Dryomov <[email protected]>
@idryomov

idryomov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

make check failed again the same way, I'm going to rebase.

@idryomov
idryomov force-pushed the prepare_import_migr_new_way branch from 47d74ac to c7fddec Compare July 1, 2026 19:56
@idryomov

idryomov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

make check is blocked:

  ● NvmeofSubsystemsComponent › should mark only current group as selected

    TypeError: component.updateGroupSelectionState is not a function

      166 |     component.gwGroups = [{ content: 'default' }, { content: 'foo' }] as any;
      167 |
    > 168 |     component.updateGroupSelectionState();
          |               ^
      169 |
      170 |     expect(component.gwGroups).toEqual([
      171 |       { content: 'default', selected: false },

      at src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.spec.ts:168:15
      at _ZoneDelegate.invoke (node_modules/zone.js/bundles/zone.umd.js:416:32)
      at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (node_modules/zone.js/bundles/zone-testing.umd.js:2176:43)
      at _ZoneDelegate.invoke (node_modules/zone.js/bundles/zone.umd.js:415:38)
      at ZoneImpl.run (node_modules/zone.js/bundles/zone.umd.js:147:47)
      at Object.wrappedFunc (node_modules/zone.js/bundles/zone-testing.umd.js:450:38)

  ● NvmeofSubsystemsComponent › should clear selected group and refresh subsystem list

    <spyOn> : getSubsystems() method does not exist
    Usage: spyOn(<object>, <methodName>)

      176 |   it('should clear selected group and refresh subsystem list', () => {
      177 |     component.group = 'default';
    > 178 |     const getSubsystemsSpy = spyOn(component, 'getSubsystems');
          |                              ^
      179 |
      180 |     component.onGroupClear();
      181 |

      at SpyRegistry.spyOn (node_modules/jest-jasmine2/build/jasmine/spyRegistry.js:97:15)
      at src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.spec.ts:178:30
      at _ZoneDelegate.invoke (node_modules/zone.js/bundles/zone.umd.js:416:32)
      at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (node_modules/zone.js/bundles/zone-testing.umd.js:2176:43)
      at _ZoneDelegate.invoke (node_modules/zone.js/bundles/zone.umd.js:415:38)
      at ZoneImpl.run (node_modules/zone.js/bundles/zone.umd.js:147:47)
      at Object.wrappedFunc (node_modules/zone.js/bundles/zone-testing.umd.js:450:38)

[...]

The following tests FAILED:
	213 - mgr-dashboard-frontend-unittests (Failed)

@idryomov

idryomov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@idryomov

idryomov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

jenkins test windows

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.

3 participants