]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephadm: zap raw devices before OSD deployment 68414/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 22 Apr 2026 21:02:10 +0000 (23:02 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 23 Apr 2026 13:27:08 +0000 (15:27 +0200)
follow up on commit f3c938f5032885434dd2ab77f9b2e6bc05917f3c

```
2026-04-22T10:16:21.350 DEBUG:teuthology.orchestra.run.trial118:> sudo ceph-bluestore-tool zap-device --dev /dev/nvme3n1 --yes-i-really-really-mean-it
2026-04-22T10:16:21.358 INFO:teuthology.orchestra.run.trial118.stderr:sudo: ceph-bluestore-tool: command not found
```

ceph-bluestore-tool is not available on the host and must be run from within a container.

Instead, use `ceph-volume lvm zap` which internally calls `ceph-bluestore-tool zap-device`.

Fixes: https://tracker.ceph.com/issues/76238
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
qa/tasks/cephadm.py

index b868c37d411708e33f4ec9b9edc69fbef29d5f0c..6b08d8885e371d4388478e56f88d3fa967ae064a 100644 (file)
@@ -1184,23 +1184,28 @@ def ceph_osds(ctx, config):
             cur += 1
 
         if cur == 0:
-            if raw:
-                for remote, devs in devs_by_remote.items():
-                    for dev in devs:
-                        log.info(f'Zapping device {dev} on {remote.shortname} before raw OSD deployment')
-                        remote.run(
-                            args=[
-                                'sudo', 'ceph-bluestore-tool', 'zap-device',
-                                '--dev', dev,
-                                '--yes-i-really-really-mean-it',
-                            ],
-                            check_status=False,
-                        )
-                        remote.run(args=['sudo', 'wipefs', '--all', dev], check_status=False)
-                        remote.run(
-                            args=['sudo', 'dd', 'if=/dev/zero', f'of={dev}', 'bs=1M', 'count=10', 'conv=fsync'],
-                            check_status=False,
-                        )
+            for remote, devs in devs_by_remote.items():
+                for dev in devs:
+                    log.info(f'Zapping device {dev} on {remote.shortname} before OSD deployment')
+                    remote.run(
+                        args=[
+                            'sudo',
+                            ctx.cephadm,
+                            '--image', ctx.ceph[cluster_name].image,
+                            'ceph-volume',
+                            '-c', '/etc/ceph/{}.conf'.format(cluster_name),
+                            '-k', '/etc/ceph/{}.client.admin.keyring'.format(cluster_name),
+                            '--fsid', ctx.ceph[cluster_name].fsid,
+                            '--', 'lvm', 'zap', dev
+                        ],
+                        check_status=False,
+                     )
+                    remote.run(args=['sudo', 'wipefs', '--all', dev], check_status=False)
+                    remote.run(
+                        args=['sudo', 'dd', 'if=/dev/zero', f'of={dev}', 'bs=1M', 'count=10', 'conv=fsync'],
+                        check_status=False,
+                    )
+            _shell(ctx, cluster_name, remote, ['ceph', 'orch', 'device', 'ls', '--refresh'])
             osd_cmd = ['ceph', 'orch', 'apply', 'osd', '--all-available-devices']
             if raw:
                 osd_cmd.extend(['--method', 'raw'])