On February 24, 2020 12:01 pm, Dominik Csapak wrote: > according to rfc 1034[0], each label of a domain name can be 63 octets > so increase that limit in the api calls and in ceph_service_cmd > > users can now create ceph services on machines with hostnames > longer than 32 characters
why not have the same pattern like for monitor/.. creation? e.g., createmon has: pattern => '[a-zA-Z0-9]([a-zA-Z0-9\-]*[a-zA-Z0-9])?' unless I misread, MGR and MDS have the same pattern. > > 0: https://tools.ietf.org/html/rfc1034#section-3.1 > > Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> > --- > PVE/API2/Ceph.pm | 6 +++--- > PVE/Ceph/Services.pm | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm > index 391382f8..72d21c90 100644 > --- a/PVE/API2/Ceph.pm > +++ b/PVE/API2/Ceph.pm > @@ -424,7 +424,7 @@ __PACKAGE__->register_method ({ > type => 'string', > optional => 1, > default => 'ceph.target', > - pattern => '(ceph|mon|mds|osd|mgr)(\.[A-Za-z0-9\-]{1,32})?', > + pattern => '(ceph|mon|mds|osd|mgr)(\.[A-Za-z0-9\-]{1,63})?', > }, > }, > }, > @@ -475,7 +475,7 @@ __PACKAGE__->register_method ({ > type => 'string', > optional => 1, > default => 'ceph.target', > - pattern => '(ceph|mon|mds|osd|mgr)(\.[A-Za-z0-9\-]{1,32})?', > + pattern => '(ceph|mon|mds|osd|mgr)(\.[A-Za-z0-9\-]{1,63})?', > }, > }, > }, > @@ -526,7 +526,7 @@ __PACKAGE__->register_method ({ > type => 'string', > optional => 1, > default => 'ceph.target', > - pattern => '(mon|mds|osd|mgr)(\.[A-Za-z0-9\-]{1,32})?', > + pattern => '(mon|mds|osd|mgr)(\.[A-Za-z0-9\-]{1,63})?', > }, > }, > }, > diff --git a/PVE/Ceph/Services.pm b/PVE/Ceph/Services.pm > index 45eb6c3f..ac3d7ae7 100644 > --- a/PVE/Ceph/Services.pm > +++ b/PVE/Ceph/Services.pm > @@ -62,7 +62,7 @@ sub ceph_service_cmd { > my ($action, $service) = @_; > > my $pve_ceph_cfgpath = PVE::Ceph::Tools::get_config('pve_ceph_cfgpath'); > - if ($service && $service =~ > m/^(mon|osd|mds|mgr|radosgw)(\.([A-Za-z0-9\-]{1,32}))?$/) { > + if ($service && $service =~ > m/^(mon|osd|mds|mgr|radosgw)(\.([A-Za-z0-9\-]{1,63}))?$/) { > $service = defined($3) ? "ceph-$1\@$3" : "ceph-$1.target"; > } else { > $service = "ceph.target"; > -- > 2.20.1 > > > _______________________________________________ > pve-devel mailing list > pve-devel@pve.proxmox.com > https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > > _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel