mgr/rook: implement orch device zap in rook orchestrator#43138
mgr/rook: implement orch device zap in rook orchestrator#43138liewegas merged 1 commit intoceph:masterfrom
orch device zap in rook orchestrator#43138Conversation
leseb
left a comment
There was a problem hiding this comment.
You also need to address raw OSDs.
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
595d1cd to
4dda0b1
Compare
| ) | ||
| ) | ||
| ) | ||
| self.batchV1_api.create_namespaced_job('rook-ceph', body) |
From what I can tell |
sort out zapping raw devices from ceph-volume is on the todo list! |
Yeah but for now we could just |
|
Several doubts here, probably is just that for me is not clear the roadmap ahead...... for the moment , we only can create OSDs using PVs, and we do not have information about physical details of the devices, and we do not now if an specific device is used in a PV and for several PVCs. |
|
I think now i understand ... this is just to make possible the theutology test: |
4dda0b1 to
30342b3
Compare
Yeah for now it looks like this should just be used in teuthology.
I just went ahead and changed it to use |
30342b3 to
2840b01
Compare
|
jenkins test make check |
src/pybind/mgr/rook/module.py
Outdated
| self.rook_cluster.create_zap_job(host, path) | ||
| except Exception as e: | ||
| logging.error(e) | ||
| return OrchResult(None, "Unable to zap device" + str(e.with_traceback(None))) |
There was a problem hiding this comment.
| return OrchResult(None, "Unable to zap device" + str(e.with_traceback(None))) | |
| return OrchResult(None, "Unable to zap device " + str(e.with_traceback(None))) |
Or is OrchResult printing nicely already?
src/pybind/mgr/rook/rook_cluster.py
Outdated
| name="device-zap", | ||
| image="rook/ceph:master", | ||
| command=["bash"], | ||
| args=["-c", f"ceph-volume raw list | grep {path} && dd if=/dev/zero of=\"{path}\" bs=1M count=100 oflag=direct,dsync || ceph-volume lvm zap --destroy {path}"], |
There was a problem hiding this comment.
| args=["-c", f"ceph-volume raw list | grep {path} && dd if=/dev/zero of=\"{path}\" bs=1M count=100 oflag=direct,dsync || ceph-volume lvm zap --destroy {path}"], | |
| args=["-c", f"ceph-volume raw list {path} && dd if=/dev/zero of=\"{path}\" bs=1M count=100 oflag=direct,dsync || ceph-volume lvm zap --destroy {path}"], |
This should be the same. IIRC the list supports arguments.
There was a problem hiding this comment.
Also, I think count=1 is probably more than enough since the bluestore signature is 60 bytes only.
There was a problem hiding this comment.
One more thing, lvm zap supports OSD FSID and/or OSD ID as a parameter, I wonder if it's safer to use instead of passing the disk, just a thought.
|
2840b01 to
d4107b6
Compare
|
jenkins test make check |
| ) | ||
| ret.append(spec) | ||
| return ret | ||
| def create_zap_job(self, host: str, path: str) -> None: |
This commit implements orch device zap by creating a pod on the target host that mounts the /dev directory and runs either overwrites the first few blocks of the device with zeros if it's a raw device or if it's not a raw device it will use `ceph-volume lvm zap`. Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
d4107b6 to
22631ec
Compare
|
jenkins test api |
|
jenkins test api |
This PR implements orch device zap by creating a Batch job that
creates a pod on the target host that mounts the /dev directory and
runs
ceph-volume lvm zap --destroy <path>Signed-off-by: Joseph Sawaya jsawaya@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox