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
mon: centralized config #20172
mon: centralized config #20172
Conversation
|
jenkins render docs |
|
jenkins render docs |
src/mgr/MgrClient.cc
Outdated
| @@ -327,6 +329,9 @@ void MgrClient::send_report() | |||
| } | |||
|
|
|||
| report->osd_health_metrics = std::move(osd_health_metrics); | |||
|
|
|||
| cct->_conf->get_config_bl(&report->config_bl); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a bit much to send this on every report from every service: the value_bl part in md_config_t is already sorta-stateful and explicitly reset when changes are made, so get_config_bl could return a bool to indicate whether anything changed (i.e. whether value_bl was rewritten), and then this function would only include the config in the report in that situation.
src/mon/MonCommands.h
Outdated
| " name=who,type=CephString" \ | ||
| " name=name,type=CephString" \ | ||
| " name=value,type=CephString", \ | ||
| "Cet a configuration option for one or more entities", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Cet/Set/
ab95d08
to
bbe1e8a
Compare
54a683c
to
a74f765
Compare
|
retest this please |
|
@tchaikov @ktdreyer I may need some help here. The make check build is failing with a compilation error that I can't reproduce locally (on multiple xenial boxes). And the error doesn't make any sense to me--the code is identical to that in several other mon/*.cc files that build just fine. Any ideas? |
|
Nevermind, I fixed it! Used cmdmap_t instead of the raw type and it seemed to resolve it (somehow one variant added a std::less<void> template arg). |
|
jenkins render docs |
Pass --no-mon-config so we don't get failed to fetch mon config (--no-mon-config to skip) instead. Signed-off-by: Sage Weil <sage@redhat.com>
Some of these cases make sense to fetch mon configs, but we are deprecating ceph-disk anyway, and the tests currently make use of ceph-disk in places that do not have a mon_host defined via a ceph.conf or other environment. This avoids breaking those test cases without any real impact on users (which will either use ceph-volume or presumably remain in a legacy config environment). Signed-off-by: Sage Weil <sage@redhat.com>
Return success if the mons are pre-mimic (and thus have no config). Signed-off-by: Sage Weil <sage@redhat.com>
The normal timeouts automatically apply during the authenticate() stage, but not to the explicit wait for a config. If we don't get that quickly we shoudl retry another monitor because it is possible we will connect to an out-of-quorum (or otherwise unresponsive) mon. Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Seems to resolve a build error on some compilers! Meh. Signed-off-by: Sage Weil <sage@redhat.com>
…option If we are looking at a new value from the mon and comparing it to what we already have active, compare the non-meta-substituted form. This way a value from the mon that can't update at runtime but we have already set to the same value will not be falsely flagged as ignored. Signed-off-by: Sage Weil <sage@redhat.com>
Common_init_finish does start_service_thread and does set_safe_to_start_threads() on the cct, which switches us to 'runtime' mode where we can't accept many config options. Do that *after* we fetch our config from the mon so that we can accept+set runtime options (and not complain to stderr about it). Signed-off-by: Sage Weil <sage@redhat.com>
The keyfile arg might be - (stdin), which we can only read once. Ensure that we consume it once by intercepting the CLI value early and inserting the value into the 'key' option. This robs future code of the knowledge that the key came from --keyfile and not --key, but avoids the issue of multiple users (notably, KeyRing.cc and the OSD mkfs code). Remove the - special case from OSD at the same time, since it can no longer be reached (unless something other than the CLI specified '-', but neither ceph.conf nor the mon config make sense here). Signed-off-by: Sage Weil <sage@redhat.com>
…mons These qualify as 'daemon', but their path is usually not unique. Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
It's possible that we successfully set active_con *and* time out the cond WaitUntil. Only set the error if we don't have a connection; if we set it *and* time out then let's call it success. Signed-off-by: Sage Weil <sage@redhat.com>
This is what OSDMonitor and MDSMonitor do. Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
| @@ -906,6 +842,67 @@ fi | |||
|
|
|||
| if [ $CEPH_NUM_MON -gt 0 ]; then | |||
| start_mon | |||
|
|
|||
| echo Populating config ... | |||
| cat <<EOF | $CEPH_BIN/ceph -c ceph.conf config assimilate-conf -i - | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this breaks clusters started w/ mstart.sh since you assume the cluster config is located at ceph.conf instead of $conf_fn, which in turn breaks qa/workunits/rbd/rbd_mirror.sh on a dev box.
| OSD_SECRET=$($CEPH_BIN/ceph-authtool --gen-print-key) | ||
| echo "{\"cephx_secret\": \"$OSD_SECRET\"}" > dev/osd$osd/new.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... also broken here w/ the hard-coded dev instead of $CEPH_DEV_DIR
Signed-off-by: John Spray <john.spray@redhat.com> (cherry picked from commit bd80cf9) Signed-off-by: Ernesto Puerta <epuertat@redhat.com> As Centralized Config feature (PR ceph#20172) has not been backported to Luminous, `set_store` and `get_store` methods are just wrappers around `set_config` and `get_config`, respectively.
Signed-off-by: John Spray <john.spray@redhat.com> (cherry picked from commit bd80cf9) Signed-off-by: Ernesto Puerta <epuertat@redhat.com> As Centralized Config feature (PR ceph#20172) has not been backported to Luminous, `set_store` and `get_store` methods are just wrappers around `set_config` and `get_config`, respectively.
Signed-off-by: John Spray <john.spray@redhat.com> (cherry picked from commit bd80cf9) Signed-off-by: Ernesto Puerta <epuertat@redhat.com> As Centralized Config feature (PR ceph#20172) has not been backported to Luminous, `set_store` and `get_store` methods are just wrappers around `set_config` and `get_config`, respectively. Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Signed-off-by: John Spray <john.spray@redhat.com> (cherry picked from commit bd80cf9) Signed-off-by: Ernesto Puerta <epuertat@redhat.com> As Centralized Config feature (PR ceph#20172) has not been backported to Luminous, `set_store` and `get_store` methods are just wrappers around `set_config` and `get_config`, respectively. Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Signed-off-by: John Spray <john.spray@redhat.com> (cherry picked from commit bd80cf9) Signed-off-by: Ernesto Puerta <epuertat@redhat.com> As Centralized Config feature (PR ceph#20172) has not been backported to Luminous, `set_store` and `get_store` methods are just wrappers around `set_config` and `get_config`, respectively. Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Signed-off-by: John Spray <john.spray@redhat.com> (cherry picked from commit bd80cf9) Signed-off-by: Ernesto Puerta <epuertat@redhat.com> As Centralized Config feature (PR ceph#20172) has not been backported to Luminous, `set_store` and `get_store` methods are just wrappers around `set_config` and `get_config`, respectively. Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Signed-off-by: John Spray <john.spray@redhat.com> (cherry picked from commit bd80cf9) Signed-off-by: Ernesto Puerta <epuertat@redhat.com> As Centralized Config feature (PR ceph#20172) has not been backported to Luminous, `set_store` and `get_store` methods are just wrappers around `set_config` and `get_config`, respectively. Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
FUTURE TODO (later PR)
TODO