From 7519b8485108ed57b35a9d229ae75f7e52be5a64 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 27 Nov 2018 15:37:32 +0100 Subject: [PATCH] fix #1430: ceph init: allow to specify separate cluster network Allow to specify a separate cluster network when initializing ceph. Ceph docs[0] imply a possibility for performance increase and enhanced security in environments where the public network serves not fully trusted peers, which could else provoke a DOS to the cluster traffic[0]. Make this optional, but if passed `network` is required too. [0]: http://docs.ceph.com/docs/luminous/rados/configuration/network-config-ref/ Signed-off-by: Thomas Lamprecht --- PVE/API2/Ceph.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm index d74bd016..3f2bb11d 100644 --- a/PVE/API2/Ceph.pm +++ b/PVE/API2/Ceph.pm @@ -829,6 +829,14 @@ __PACKAGE__->register_method ({ optional => 1, maxLength => 128, }, + 'cluster-network' => { + description => "Declare a separate cluster network, OSDs will route" . + "heartbeat, object replication and recovery traffic over it", + type => 'string', format => 'CIDR', + requires => 'network', + optional => 1, + maxLength => 128, + }, size => { description => 'Targeted number of replicas per object', type => 'integer', @@ -920,6 +928,10 @@ __PACKAGE__->register_method ({ $cfg->{global}->{'cluster network'} = $param->{network}; } + if ($param->{'cluster-network'}) { + $cfg->{global}->{'cluster network'} = $param->{'cluster-network'}; + } + PVE::CephTools::write_ceph_config($cfg); PVE::CephTools::setup_pve_symlinks();