From: Guillaume Abrioux Date: Thu, 29 Jun 2023 08:19:37 +0000 (+0200) Subject: ceph-volume: fix raw activate by osd-id/osd-uuid X-Git-Tag: v19.1.1~207^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ec2e79409cace15a2b308c25f567ffc383b46f0;p=ceph.git ceph-volume: fix raw activate by osd-id/osd-uuid When activating a raw osd with `--osd-id` and `--osd-uuid` instead of passing the device, it ends up with a call to List.generate() passing `[None]` (which doesn't really make sense). When no devices are passed tp List.generate(), it needs to enter the first condition in order to build a list of all devices. Otherwise, that function starts iterating on an empty list which result in a failure (see corresponding tracker). Fixes: https://tracker.ceph.com/issues/61855 Signed-off-by: Guillaume Abrioux (cherry picked from commit b25e8e4ecc8f4187cf1f185e0e0f5a72aafe6a10) --- diff --git a/src/ceph-volume/ceph_volume/devices/raw/activate.py b/src/ceph-volume/ceph_volume/devices/raw/activate.py index 9323b18f980..38c74ef9829 100644 --- a/src/ceph-volume/ceph_volume/devices/raw/activate.py +++ b/src/ceph-volume/ceph_volume/devices/raw/activate.py @@ -82,7 +82,9 @@ class Activate(object): return self.args = parser.parse_args(self.argv) - devs = [self.args.device] + devs = [] + if self.args.device: + devs = [self.args.device] if self.args.block_wal: devs.append(self.args.block_wal) if self.args.block_db: