Skip to content

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

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

liewegas merged 1 commit into
ceph:masterfrom
liewegas:fix-44798

Conversation

@liewegas

Copy link
Copy Markdown
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 [email protected]

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 <[email protected]>

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

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
Copy Markdown
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