summaryrefslogtreecommitdiffstats
path: root/src/mon/ConfigMap.cc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common/options: pass name as rvalue referenceMax Kellermann2024-10-091-1/+1
| | | | Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
* mon/ConfigMap: push kv parsing logic into add_option()Sage Weil2023-10-161-0/+57
| | | | | | | | | | | | Push shared code into ConfigMap from mon + mgr. Pass in a function to fetch the Option*, since in the mon case it may come from somewhere other than g_conf. Signed-off-by: Sage Weil <sage@newdream.net> (cherry picked from commit d8ccd221549cdd28702932deb148f075cb6d88b3) Fixed conflict: `mopt.localized_name = name;` is added to add_option() (due to 3821722e5660437298a7c0f41e1061d363090103)
* mon/ConfigMap: use ValueSource type for generate_entity_map()Sage Weil2023-10-161-2/+2
| | | | | | | | | | Changes from original commit: - switch to unordered map - use nullptr instead of 0 Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Matan Breizman <mbreizma@redhat.com> (cherry picked from commit e36da92118eac4d2af11d8a8a1795e7b08d08874)
* mon/ConfigMonitor: Show localized name in "config dump --format json" outputSridhar Seshasayee2023-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The "ceph config dump" command without the json formatted output shows the localized option names and their values. An example of a normalized vs localized option is shown below: Normalized: mgr/dashboard/ssl_server_port (maintaned within Option struct) Localized: mgr/dashboard/x/ssl_server_port (maintained in mon store) But the "ceph config dump --format json*" output showed the normalized option names which was not consistent with the "config dump" output. The output of the command along with variations for pretty printing must show the same content. This commit introduces a new member within the ConfigMap's MaskedOption struct called "localized_name". This is initialized to the localized name as part of ConfigMonitor::load_config() method. The MaskedOption::dump() used for the json formatting is modified to display the localized_name instead of the normalized name. Fixes: https://tracker.ceph.com/issues/62379 Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
* mon/ConfigMap: factor out parse_key helperSage Weil2021-02-171-0/+17
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* neorados: Create new libraryAdam C. Emerson2020-05-151-1/+1
| | | | | | | This library is UNSTABLE and I reserve the right to change its interface at any time for any reason. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* mon: Build ceph-mon without using namespace declarations in headersAdam C. Emerson2020-03-221-0/+29
| | | | | | | This is part of a series of commits to clean up using namespace at top level in headers. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* mon/ConfigMonitor: always prefix global config keys with global/Sage Weil2020-01-221-0/+1
| | | | | | | | | | | | | | | | This avoids some ambiguity. For instance, we cannot trivially tell if config/mgr/module/option is an option called module/option that we don't understand that's in the mgr section, or a mgr/module/option option in global. In any case, it's simpler to have a universal prefix. Also, this aligns the storage schema with what assimilate-conf does (it adds global/ for the global section). Fixes: https://tracker.ceph.com/issues/43296 Signed-off-by: Sage Weil <sage@redhat.com>
* Revert "Merge pull request #16715 from adamemerson/wip-I-Object!"Sage Weil2019-11-221-1/+1
| | | | | | | | | This reverts commit 669453138d89e0f797a1bd37f38a2d68e6aac366, reversing changes made to 36f5fcbb97eb2b1bceb526331eb3464f460fc701. Signed-off-by: Sage Weil <sage@redhat.com> - conflicts due to code rearrangement in 14b0db908f652032c358e419ffa90f5676698d0e
* Merge pull request #16715 from adamemerson/wip-I-Object!Casey Bodley2019-11-191-1/+1
|\ | | | | | | | | | | osdc/Objecter: Boost.Asio (I object!) Reviewed-by: Josh Durgin <jdurgin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com>
| * RADOS: Create new libraryAdam C. Emerson2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | This library is UNSTABLE and I reserve the right to change its interface at any time for any reason. Also its name is unstable and will likely change at some point. Or not. I don't know. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* | mon/ConfigMap: search nested sectionsSage Weil2019-11-011-4/+15
|/ | | | | | | | For an entity a.b.c.d, search all dot-delineated prefix sections. This enables you to establish a hierarchical set of options for clients, such as radosgw daemons. Signed-off-by: Sage Weil <sage@redhat.com>
* common/config,mon/ConfigMap: use transparent comparatorKefu Chai2019-03-221-1/+1
| | | | | | | use transparent comparator as the comparator in the map of settings, so we can find the values in a map<string,string> by string_view. Signed-off-by: Kefu Chai <kchai@redhat.com>
* mon: let ConfigMap::generate_entity_map() return the mapKefu Chai2019-03-221-3/+5
| | | | | | | | | | C++17 enforces copy elision, so no need to pass the output parameter by reference/pointer anymore. also, it would be easier if we change the output's type by putting something like auto output = config.generate_entity_map(...) Signed-off-by: Kefu Chai <kchai@redhat.com>
* mon/ConfigMonitor: add 'config generate-minimal-conf' commandSage Weil2019-01-111-0/+18
| | | | | | | Generate a minimal ceph.conf that should be sufficient for any client or server-side node. Signed-off-by: Sage Weil <sage@redhat.com>
* mon/ConfigMap: dump more in json form of 'config dump'Sage Weil2018-09-011-0/+3
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* Merge PR #21010 into masterPatrick Donnelly2018-05-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | * refs/pull/21010/head: common: refactor for array size common: Use ARRAY_SIZE macro common: compress return logic common: Remove multiple assignment common: Remove unnecessary semicolon common: addr_parsing: Cleanup and Refactor Code Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
| * common: refactor for array sizePatrick Donnelly2018-04-301-1/+1
| | | | | | | | Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
* | mon/ConfigMap: add ConfigChangeSetSage Weil2018-03-171-0/+40
|/ | | | Signed-off-by: Sage Weil <sage@redhat.com>
* mon/ConfigMonitor: include LEVEL column in config dump|getSage Weil2018-03-061-2/+2
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* mon/ConfigMap: const * to Option, so we don't have to copy itSage Weil2018-03-061-3/+3
| | | | | | | | 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>
* mon/ConfigMap: some improvementsSage Weil2018-03-061-12/+21
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* mon/ConfigMap: move option mask parsing into helperSage Weil2018-03-061-17/+59
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* mon/ConfigMap: parsed cluster-wide configSage Weil2018-03-061-0/+119
Breaks down options by global, type, daemon, and can filter options by crush location. Signed-off-by: Sage Weil <sage@redhat.com>