]> git.proxmox.com Git - pve-manager.git/commit
api: ceph: mon create: remove superfluous verification call
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 3 Apr 2023 09:35:16 +0000 (11:35 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 12 Apr 2023 11:26:49 +0000 (13:26 +0200)
commit16f3482b3422d808adbc932bb87a84ebba360d25
tree541cd980fb6fe11fe60fd0b6033aa25043b5d3ab
parent3e631cf444387ee62e5d3631a1c38de0899ae626
api: ceph: mon create: remove superfluous verification call

The pve_verify_cidr{,v4,v6} functions were originally intended for
the /etc/network/interfaces API endpoints and thus are a bit
restrictive. For example, as reported in the community forum[0],
pve_verify_cidr() does not consider '0::/0' and '0::/1' to be valid.

The error message in this scenario being
> value does not look like a valid CIDR network
is also confusing, as the first thought of users will be that it comes
from the passed-in monitor address.

The public networks are not written here and read from the Ceph config
and via a RADOS mon command, so no need to try and verify them. If
something really would go wrong during parsing, the
get_local_ip_from_cidr() call would complain afterwards.

[0]: https://forum.proxmox.com/threads/125226/

Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/API2/Ceph/MON.pm