Bug #47617
closedrebuild_mondb: daemon-helper: command failed with exit status 1
0%
Description
/a/yuriw-2020-09-16_23:57:37-rados-wip-yuri8-testing-2020-09-16-2220-octopus-distro-basic-smithi/5441511/teuthology.log
monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2]
2020-09-17T00:50:33.095 INFO:tasks.ceph.mgr.x.smithi136.stderr:2020-09-17T00:50:33.092+0000 7f6d77253700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2]
2020-09-17T00:50:33.098 INFO:tasks.ceph.osd.0.smithi136.stderr:2020-09-17T00:50:33.096+0000 7f9c85103700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2]
2020-09-17T00:50:33.130 INFO:teuthology.orchestra.run.smithi136.stderr:admin_socket: exception getting command descriptions: [Errno 111] Connection refused
2020-09-17T00:50:33.132 DEBUG:teuthology.orchestra.run:got remote process result: 22
2020-09-17T00:50:33.133 INFO:tasks.rebuild_mondb.ceph_manager:waiting on admin_socket for osd-0, ['dump_ops_in_flight']
2020-09-17T00:50:33.302 INFO:tasks.ceph.osd.0.smithi136.stderr:2020-09-17T00:50:33.300+0000 7f9c85904700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2]
2020-09-17T00:50:33.466 INFO:tasks.ceph.osd.0.smithi136.stderr:failed to fetch mon config (--no-mon-config to skip)
...
exception getting command descriptions: [Errno 111] Connection refused
2020-09-17T00:55:15.939 DEBUG:teuthology.orchestra.run:got remote process result: 22
tasks.rebuild_mondb.ceph_manager:waiting on admin_socket for osd-0,
osd 0 log:
2020-09-17T00:49:32.184+0000 7fa16a8e7700 1 --2- v2:172.21.15.136:6806/12987 >> [v2:172.21.15.136:3301/0,v1:172.21.15.136:6790/0] conn(0x5591a00f8800 0x559│
│2020-09-17T00:49:32.184+0000 7fa1787ef700 10 NetHandler reconnect reconnect: Connection refused
nothing noteworthy
NO Updated by Neha Ojha about 6 years ago
Deepika:
/a/yuriw-2020-09-16_23:57:37-rados-wip-yuri8-testing-2020-09-16-2220-octopus-distro-basic-smithi/5441511 and /a/yuriw-2020-11-10_16:01:13-rados-wip-yuri7-testing-2020-11-09-0731-nautilus-distro-basic-smithi/5609404 are different issues.
Simplest way to differentiate between the two is, https://pulpito.ceph.com/yuriw-2020-11-10_16:01:13-rados-wip-yuri7-testing-2020-11-09-0731-nautilus-distro-basic-smithi/5609404/ failed because of a warning in the logs (MGR_MODULE_ERROR) and https://pulpito.ceph.com/yuriw-2020-09-16_23:57:37-rados-wip-yuri8-testing-2020-09-16-2220-octopus-distro-basic-smithi/5441511/ with timeout.
NO Updated by Neha Ojha over 5 years ago
/a/sage-2021-04-12_21:28:18-rados-wip-sage4-testing-2021-04-12-1414-octopus-distro-basic-smithi/6042248
NO Updated by Neha Ojha over 5 years ago
/a/sage-2021-04-12_21:28:18-rados-wip-sage4-testing-2021-04-12-1414-octopus-distro-basic-smithi/6042248
2021-04-11T15:40:06.650 INFO:tasks.ceph.osd.0:Started 2021-04-11T15:40:06.651 DEBUG:teuthology.orchestra.run.smithi089:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 0 ceph --cluster ceph --admin-daemon /var/run/ceph/ceph-osd.0.asok dump_ops_in_flight 2021-04-11T15:40:06.719 INFO:tasks.ceph.osd.0.smithi089.stderr:2021-04-11T15:40:06.716+0000 7fef0e5ad700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2] 2021-04-11T15:40:06.719 INFO:tasks.ceph.osd.0.smithi089.stderr:failed to fetch mon config (--no-mon-config to skip) 2021-04-11T15:40:06.720 INFO:tasks.ceph.mgr.x.smithi089.stderr:2021-04-11T15:40:06.717+0000 7f3015f87700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2] 2021-04-11T15:40:06.720 INFO:tasks.ceph.mgr.x.smithi089.stderr:2021-04-11T15:40:06.717+0000 7f3015786700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2] 2021-04-11T15:40:06.759 INFO:teuthology.orchestra.run.smithi089.stderr:admin_socket: exception getting command descriptions: [Errno 111] Connection refused 2021-04-11T15:40:06.761 DEBUG:teuthology.orchestra.run:got remote process result: 22 2021-04-11T15:40:06.762 INFO:tasks.rebuild_mondb.ceph_manager:waiting on admin_socket for osd-0, ['dump_ops_in_flight'] 2021-04-11T15:40:06.905 INFO:tasks.ceph.osd.0.smithi089.stderr:daemon-helper: command failed with exit status 1
NO Updated by Neha Ojha over 5 years ago
- Subject changed from monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2] to rebuild_mondb: daemon-helper: command failed with exit status 1
- Description updated (diff)
- Backport set to pacific, octopus
KS Updated by Konstantin Shalygin over 2 years ago
- Backport deleted (
pacific, octopus)
NM Updated by Nitzan Mordechai 3 months ago
/a/skanta-2026-08-24_07:43:11-rados-wip-bharath7-testing-20260824.042435-main-distro-default-trial/509051
Hit what looks like the same failure in a recent rados/singleton/all/rebuild-mondb run, and I think I found the actual cause.
_rebuild_db() in qa/tasks/rebuild_mondb.py rebuilds the mon auth db by handing ceph-monstore-tool rebuild a keyring that only has caps for mon. and client.admin.
osd.* keys survive the rebuild fine because ceph-monstore-tool reconstructs the OSD/PG state straight from the OSDs' own store data.
But client.* and mgr.* identities have no OSD-side representation, they only ever existed in the mon's auth service, so if they're not explicitly in that keyring, they're just gone after the rebuild.
Every non-admin client/mgr that tries to auth afterward gets handle_auth_bad_method and dies.
In that job it showed up two ways:
mgr.x throwing handle_auth_bad_method ... (13) Permission denied right at mon revival.
The radosbench step that runs against client.0 after rebuild_mondb failing outright (failed to fetch mon config), since client.0's key was never in the keyring passed to rebuild.
That matches the admin-socket/auth symptoms described here for OSD/mgr, so I think it's the same underlying gap, just tripped by different roles depending on what the test exercises afterward.
Suggested fix - before calling ceph-monstore-tool rebuild, also import each client's and mgr's existing keyring file into the keyring being fed to the rebuild, so their real (already-granted) caps survive instead of being dropped:
--- a/qa/tasks/rebuild_mondb.py
+++ b/qa/tasks/rebuild_mondb.py
@@ -132,6 +132,28 @@ def _rebuild_db(ctx, manager, cluster_name, mon, mon_id, keyring_path):
'--cap', 'osd', 'allow *',
'--cap', 'mds', 'allow *',
'--cap', 'mgr', 'allow *'])
+ # client and mgr keys (e.g. client.0 used by radosbench, mgr.x) have
+ # no OSD-side representation, unlike osd.* keys which get reconstructed
+ # by ceph-monstore-tool from the OSDs' own store data. They live in
+ # their own keyring files and would otherwise be silently dropped from
+ # the rebuilt auth db; pull them into keyring_path so the rebuild
+ # preserves them
+ is_client = teuthology.is_type('client')
+ for role in ctx.cluster.only(is_client).remotes.get(mon, []):
+ _, _, client_id = teuthology.split_role(role)
+ client_keyring = '/etc/ceph/{0}.client.{1}.keyring'.format(
+ cluster_name, client_id)
+ mon.run(args=['sudo',
+ 'ceph-authtool', keyring_path,
+ '--import-keyring', client_keyring])
+ is_mgr = teuthology.is_type('mgr')
+ for role in ctx.cluster.only(is_mgr).remotes.get(mon, []):
+ _, _, mgr_id = teuthology.split_role(role)
+ mgr_keyring = '/var/lib/ceph/mgr/{0}-{1}/keyring'.format(
+ cluster_name, mgr_id)
+ mon.run(args=['sudo',
+ 'ceph-authtool', keyring_path,
+ '--import-keyring', mgr_keyring])
mon.run(args=['sudo', '-u', 'ceph',
'CEPH_ARGS=--no-mon-config',
'ceph-monstore-tool', mon_store_dir,
NM Updated by Nitzan Mordechai 3 months ago
/a/skanta-2026-08-24_07:43:11-rados-wip-bharath7-testing-20260824.042435-main-distro-default-trial/509051
RZ Updated by Radoslaw Zarzynski 3 months ago
Yeah, the RCA makes sense.
LF Updated by Laura Flores 3 months ago
I opened a new ticket here: #79946
LF Updated by Laura Flores 3 months ago
- Status changed from New to Duplicate
LF Updated by Laura Flores 3 months ago
- Is duplicate of Bug #79946: After rebuilding the mondb, authentication starts failing added