Skip to content

Commit 7107470

Browse files
committed
ceph-volume: fix generic activation with raw osds
Typical failure: ``` Running command: /usr/bin/ceph-authtool --gen-print-key Running command: /usr/bin/ceph-authtool --gen-print-key --> Failed to activate via raw: activate() takes 1 positional argument but 5 were given Running command: /usr/bin/ceph-authtool --gen-print-key Running command: /usr/bin/ceph-authtool --gen-print-key --> Failed to activate via LVM: could not find osd.0 with osd_fsid 1e764f4a-db4b-4b41-86eb-468efe4c3f44 --> Failed to activate via simple: 'Namespace' object has no attribute 'json_config' --> Failed to activate any OSD(s) ``` 04c93a1 seems to have broken it. This commit fixes it. Fixes: https://tracker.ceph.com/issues/67873 Signed-off-by: Guillaume Abrioux <[email protected]>
1 parent 73c1934 commit 7107470

File tree

1 file changed

+7
-9
lines changed
  • src/ceph-volume/ceph_volume/activate

1 file changed

+7
-9
lines changed

src/ceph-volume/ceph_volume/activate/main.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def main(self):
2727
)
2828
parser.add_argument(
2929
'--osd-uuid',
30-
help='OSD UUID to activate'
30+
help='OSD UUID to activate',
31+
dest='osd_fsid'
3132
)
3233
parser.add_argument(
3334
'--no-systemd',
@@ -44,11 +45,8 @@ def main(self):
4445

4546
# first try raw
4647
try:
47-
raw_activate = RAWActivate([])
48-
raw_activate.activate(None,
49-
self.args.osd_id,
50-
self.args.osd_uuid,
51-
not self.args.no_tmpfs)
48+
raw_activate = RAWActivate(self.args)
49+
raw_activate.activate()
5250
return
5351
except Exception as e:
5452
terminal.info(f'Failed to activate via raw: {e}')
@@ -58,10 +56,10 @@ def main(self):
5856
lvm_activate = LVMActivate(argparse.Namespace(
5957
no_tmpfs=self.args.no_tmpfs,
6058
no_systemd=self.args.no_systemd,
61-
osd_fsid=self.args.osd_uuid))
59+
osd_fsid=self.args.osd_fsid))
6260
lvm_activate.activate(None,
6361
self.args.osd_id,
64-
self.args.osd_uuid)
62+
self.args.osd_fsid)
6563
return
6664
except Exception as e:
6765
terminal.info(f'Failed to activate via LVM: {e}')
@@ -71,7 +69,7 @@ def main(self):
7169
SimpleActivate([]).activate(
7270
argparse.Namespace(
7371
osd_id=self.args.osd_id,
74-
osd_fsid=self.args.osd_uuid,
72+
osd_fsid=self.args.osd_fsid,
7573
no_systemd=self.args.no_systemd,
7674
)
7775
)

0 commit comments

Comments
 (0)