diff options
author | Guillaume Abrioux <gabrioux@ibm.com> | 2024-09-18 16:30:23 +0200 |
---|---|---|
committer | Guillaume Abrioux <gabrioux@ibm.com> | 2024-09-21 00:34:07 +0200 |
commit | 902a45a23c582e3f71d999145a843ad386c60bf9 (patch) | |
tree | b8bd48dace2906e10f8c865d9c1eb2d7f6d53170 /qa | |
parent | Merge pull request #59904 from mcv21/patch-2 (diff) | |
download | ceph-902a45a23c582e3f71d999145a843ad386c60bf9.tar.xz ceph-902a45a23c582e3f71d999145a843ad386c60bf9.zip |
qa: remove all bluestore signatures on devices
We must ensure BlueStore signatures are removed altogether since
multiple BlueStore label replications have been introduced.
Fixes: https://tracker.ceph.com/issues/68171
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
Diffstat (limited to 'qa')
-rw-r--r-- | qa/tasks/nvme_loop.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qa/tasks/nvme_loop.py b/qa/tasks/nvme_loop.py index 5b29c11f007..fef270ea085 100644 --- a/qa/tasks/nvme_loop.py +++ b/qa/tasks/nvme_loop.py @@ -67,6 +67,7 @@ def task(ctx, config): with contextutil.safe_while(sleep=1, tries=15) as proceed: while proceed(): + remote.run(args=['lsblk'], stdout=StringIO()) p = remote.run(args=['sudo', 'nvme', 'list', '-o', 'json'], stdout=StringIO()) new_devs = [] # `nvme list -o json` will return the following output: @@ -96,6 +97,7 @@ def task(ctx, config): vendor = device['ModelNumber'] if dev.startswith('/dev/') and vendor == 'Linux': new_devs.append(dev) + bluestore_zap(remote, dev) log.info(f'new_devs {new_devs}') assert len(new_devs) <= len(devs) if len(new_devs) == len(devs): @@ -128,3 +130,13 @@ def task(ctx, config): data=old_scratch_by_remote[remote], sudo=True ) + +def bluestore_zap(remote, device: str) -> None: + for offset in [0, 1073741824, 10737418240]: + remote.run(args=['sudo', 'dd', + 'if=/dev/zero', f'of={device}', + f'seek={offset}', 'bs=1', + 'count=4096'], stdout=StringIO()) + remote.run(args=['sudo', 'hexdump', '-n22', + '-C', f'-s{offset}', f'{device}'], + stdout=StringIO())
\ No newline at end of file |