]> git.proxmox.com Git - pve-manager.git/commit
Fix #2053: OSD destroy only on specified node
authorDominic Jäger <d.jaeger@proxmox.com>
Mon, 11 Jan 2021 11:42:58 +0000 (12:42 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Apr 2021 14:42:12 +0000 (16:42 +0200)
commit220173e9c6431336926950b12297f069003d8b4f
tree32a3698bbe52cf7af4515fe0a7b50a9cbf6b6999
parent1226cd97f9e76c2093514c5c98d0b8a39b0994bc
Fix #2053: OSD destroy only on specified node

Allow destroying only OSDs that belong to the node that has been specified in
the API path.

So if
 - OSD 1 belongs to node A and
 - OSD 2 belongs to node B
then
 - pvesh delete nodes/A/ceph/osd/1 is allowed but
 - pvesh delete nodes/A/ceph/osd/2 is not

Destroying an OSD via GUI automatically inserts the correct node
into the API path.

pveceph automatically insert the local node into the API call, too.
Consequently, it can now only destroy local OSDs (fix #2053).
 - pveceph osd destroy 1 is allowed on node A but
 - pveceph osd destroy 2 is not

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
PVE/API2/Ceph/OSD.pm