- things that identify monitors during startup
- things that identify auth key(s)
- things that only happy during mon mkfs
- things that are very specific to daemon forking/chdir/daemonize behavior
Signed-off-by: Sage Weil <sage@redhat.com>
If we override an option with the same value, show the OVERRIDES item
in parenthesis. (I tried "=$src" and "(=$src)" but neither looked any
better.)
Signed-off-by: Sage Weil <sage@redhat.com>
We want to take in the initial config for non-service daemons, too!
Restructure this so it makes more sense.
Signed-off-by: Sage Weil <sage@redhat.com>
These are biggish structs (lots of strings), so it's expensive to make
copies of Option when it is an immutable struct. However, we need to
handle arbitrary strings that we don't recognize, too.
Signed-off-by: Sage Weil <sage@redhat.com>
This allows the mgr daemons to register state with the active mgr just
like the rest of the cluster, including perfcounters and current config.
Signed-off-by: Sage Weil <sage@redhat.com>
We use the one on disk, and nobody consumes the option except ceph-volume/
ceph-disk during mkfs. Do not pollute the config space with a value that
isn't consumed.
Signed-off-by: Sage Weil <sage@redhat.com>
We could get very clever and avoid reparsing the full config every time
too, but that is a bit more work. Leave that as a TODO.
Signed-off-by: Sage Weil <sage@redhat.com>
This is a cli command to set a config option on the mgr. It doesn't
really belong because it only sets it on the mgr that happens to be
active. It was probably mixed up with the asok or tell command.
Added in 057b73d641
Signed-off-by: Sage Weil <sage@redhat.com>
This is not particularly efficient, but it works:
- connect to the monitor to get the monmap and config
- tear it all down
- proceed with normal startup (which presumably involves reconnecting
to the mon all over again).
This allows us to set config options that may affect the mon communication
itself, like ms_type.
Signed-off-by: Sage Weil <sage@redhat.com>
We need to allow crypto to be set up and torn down before a fork. Count
the init/shutdown cycles to make that safe.
Signed-off-by: Sage Weil <sage@redhat.com>
This is too complete a rewrite to reasonably break down into small steps,
and even if I could, it would be harder to review that way than to simply
review the new implementation. The semantics of the old one were so weird
that it's harder to reason about the change in behavior than to simply
review the new behavior.
That's my story, at least, and I'm sticking to it!
So, here are the highlights:
- $foo meta expansions are evaluated at get_val() time. This means the
weird bool arguments to set_val specifying whether things were expanded
are removed (they didn't make any sense unless you were thinking about the
old implementation).
- for every option, we track values from any inputs (config, mon,
override). At get_val() time, we pick the highest priority one.
- diff() is rewritten to be simple and to show you all of the above.
- internal interfaces are simplified, and in terms of Option::value_t
whenever possible.
- unit tests simplified somewhat based on the above.
Known issues:
- legacy values get pushed out in select cases. Notably if foo=$bar
and bar is updated, we do not update $foo (there is no dependency
tracking to do this efficiently).
Signed-off-by: Sage Weil <sage@redhat.com>