Skip to content

mgr: add mgr daemon to DaemonStateIndex with metadata (hostname) - #20875

Merged
jcsp merged 2 commits into
ceph:masterfrom
jan--f:mgr-server-list-hostname
Apr 24, 2018
Merged

jcsp merged 2 commits into
ceph:masterfrom
jan--f:mgr-server-list-hostname

Conversation

@jan--f

@jan--f jan--f commented Mar 13, 2018

Copy link
Copy Markdown
Contributor

This commit changes when (and how) the mgr daemons are added to the
DaemonStateIndex. A change in the mgr map now doesn't immediately
trigger the addition of a mgr daemon, but triggers a MetadataUpdate
operation so that the mgr daemon is added with metadata queried from the
mon (most notably the hostname). Depends on #20866.
Fixes: http://tracker.ceph.com/issues/23286

Signed-off-by: Jan Fajerski [email protected]

@tchaikov

Copy link
Copy Markdown
Contributor

retest this please

@jan--f

jan--f commented Mar 14, 2018

Copy link
Copy Markdown
Contributor Author

@tchaikov note thtat this PR needs #20866 merged to pass the test suite.

Comment thread src/mgr/DaemonServer.cc Outdated

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.

Funny indentation here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed...mixed indentation foo.

Comment thread src/mgr/DaemonServer.cc Outdated

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.

I think on the osd/mds path we do some checking of whether the metadata is already being fetched in DaemonStateIndex.updating, should do similar here to avoid firing off multiple requests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes indeed...I wasn't aware of potential races when two standby daemons get the new map. I'm wondering wouldn't it make sense to put the call to daemon_state.notify_updating() in the MetadataUpdate constructor? The updating flag is already cleared in MetadataUpdate.finish() so we might as well set as part of this class.

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.

Yeah, anything to move the calls into a common place is 👍

@jan--f
jan--f force-pushed the mgr-server-list-hostname branch 2 times, most recently from 159548e to fd55f37 Compare March 20, 2018 20:35
@tchaikov

Copy link
Copy Markdown
Contributor

retest this please

@jan--f

jan--f commented Apr 10, 2018

Copy link
Copy Markdown
Contributor Author

retest this please

Jan Fajerski added 2 commits April 10, 2018 11:49
Before updating metadata a call site should check if an update has
already been triggered. Adding the notify_update call to the constructor
makes sure the correct info for this check is present.

Signed-off-by: Jan Fajerski <[email protected]>
This commit changes when (and how) the mgr daemons are added to the
DaemonStateIndex. A change in the mgr map now doesn't immediately
trigger the addition of a mgr daemon, but triggers a MetadataUpdate
operation so that the mgr daemon is added with metadata queried from the
mon (most notably the hostname).
Fixes: http://tracker.ceph.com/issues/23286

Signed-off-by: Jan Fajerski <[email protected]>
@jan--f
jan--f force-pushed the mgr-server-list-hostname branch from c85ba96 to 5c9db72 Compare April 10, 2018 09:49
@jan--f

jan--f commented Apr 10, 2018

Copy link
Copy Markdown
Contributor Author

@jcsp any objections against moving forward with this?

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

Sorry for delay, this looks good. Will test and target for mimic.

@jcsp jcsp added this to the mimic milestone Apr 23, 2018
@jcsp jcsp added the needs-qa label Apr 23, 2018
@jcsp
jcsp merged commit 3f1693d into ceph:master Apr 24, 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