Skip to content

mgr/DaemonServer: fetch metadata for new daemons (e.g., mons)#34266

Merged
liewegas merged 1 commit intoceph:masterfrom
liewegas:fix-44798
Mar 30, 2020
Merged

mgr/DaemonServer: fetch metadata for new daemons (e.g., mons)#34266
liewegas merged 1 commit intoceph:masterfrom
liewegas:fix-44798

Conversation

@liewegas
Copy link
Member

We fetch metadata for mon/osd/mds daemons on startup. If a new one comes
along after we start up, we need to fetch it on demand. Otherwise,
notably, we will ignore any new mons added to the cluster:

  • mon.a starts
  • mgr starts, fetchs a's metadata
  • mon.b added
  • mon.b tries top open mgr connection, and is rejected each time

This can lead to follow-on badness when the mon tries to proxy mgr
commands or do other things.

Fix by fetching metadata on demand, like we already do in the report
path.

Fixes: https://tracker.ceph.com/issues/44798
Signed-off-by: Sage Weil sage@redhat.com

We fetch metadata for mon/osd/mds daemons on startup.  If a new one comes
along *after* we start up, we need to fetch it on demand.  Otherwise,
notably, we will ignore any new mons added to the cluster:

- mon.a starts
- mgr starts, fetchs a's metadata
- mon.b added
- mon.b tries top open mgr connection, and is rejected each time

This can lead to follow-on badness when the mon tries to proxy mgr
commands or do other things.

Fix by fetching metadata on demand, like we already do in the report
path.

Fixes: https://tracker.ceph.com/issues/44798
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas
Copy link
Member Author

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

ideally, we should break this commit into two. one to extract the code fetching metadata into fetch_missing_metadata(), another to call this method in fetch_missing_metadata(). also, i think it still makes sense to have ceph_abort(); if the key.type is not known.

@liewegas liewegas merged commit 4f4efde into ceph:master Mar 30, 2020
@liewegas
Copy link
Member Author

ideally, we should break this commit into two. one to extract the code fetching metadata into fetch_missing_metadata(), another to call this method in fetch_missing_metadata(). also, i think it still makes sense to have ceph_abort(); if the key.type is not known.

Sorry, didn't see this before. I didn't noticed this was nested inside conditional checking the type. I can add the abort back

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