-
Notifications
You must be signed in to change notification settings - Fork 6k
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
cephadm,servicemap: fix rbd-mirror, cephfs-mirror, rgw servicemap identification; adjust servicemap reporting #40220
Conversation
Broken by 8fa941b Signed-off-by: Sage Weil <sage@newdream.net>
7b46a6f
to
30d87f3
Compare
|
Registering by gid allows multiple radosgw instances to share an auth key/identity. Including the id in the metadata allows them to still be identified by name (even if not uniquely). Signed-off-by: Sage Weil <sage@newdream.net>
3f70cca
to
fec3a8e
Compare
- Do not list individual daemon ids as this won't scale for larger clusters - Do not contemplate multile daemons of the same type that register with different "daemon_type" -- not until we actually have any that do that. - Present counts by various groupings: distinct hosts and rgw zones to start. services: mon: 1 daemons, quorum a (age 4m) mgr: x(active, since 3m) osd: 1 osds: 1 up (since 3m), 1 in (since 3m) cephfs-mirror: 1 daemon active (1 hosts) rbd-mirror: 2 daemons active (1 hosts) rgw: 2 daemons active (1 hosts, 1 zones) Signed-off-by: Sage Weil <sage@newdream.net>
Like rbd-mirror, cephfs-mirror and rgw daemons register under their gid. Signed-off-by: Sage Weil <sage@newdream.net>
fec3a8e
to
2bd11c4
Compare
@lxbsz Is there a case where the same type of daemon will register with different |
No, |
rbd-mirror and cephfs-mirror were already doing the right thing (registering using the gid as the key). |
…unning. - Adapted code to changes introduced in: ceph#40220 - Improved error handling. - Increased test coverage. - Some refactoring. - Simplified documentation about setting default daemon host and port. Fixes: https://tracker.ceph.com/issues/49655 Signed-off-by: Alfonso Martínez <almartin@redhat.com>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit ensures that we get the daemon name from `state->metadata["id"]` if available, and otherwise use `key.name` like before. It restores the correct `ceph_daemon` label for RadosGW, and doesn't change anything for the other daemons. Fixes: https://tracker.ceph.com/issues/51120 Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 2db1aaa)
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 01b42c1)
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 2db1aaa)
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 01b42c1)
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since #40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 2db1aaa)
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before #40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 01b42c1)
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 2db1aaa)
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 01b42c1)
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
The `DaemonStateCollection` used to always contain the daemon name in its `DaemonKey`, but since ceph#40220 (or more specifically afc3375), the RadosGW registers with its instance ID instead (`rados.get_instance_id()`). As a result, the `ceph_rgw_*` metrics returned by `ceph-mgr` through the `prometheus` module have their `ceph_daemon` label include that ID instead of the daemon name, e.g. ``` ceph_rgw_req{ceph_daemon="rgw.127202"} ``` instead of ``` ceph_rgw_req{ceph_daemon="rgw.my-hostname.rgw0"} ``` This commit adds the daemon name from `state->metadata["id"]` if available, as `service.name` in the JSON document returned by `dump_server()`. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 2db1aaa)
In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the value before ceph#40220, we need to add the `instance_id` label to the `ceph_rgw_metadata` metric. This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric using the following PromQL query, for instance: ``` ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata ``` Signed-off-by: Benoît Knecht <bknecht@protonmail.ch> (cherry picked from commit 01b42c1)
id
key with their auth id/nameid
key, if present)ceph -s
summary code to count total daemons and groupings (distinct hosts, zones)