[pve-devel] [PATCH manager] fix #1430: ceph init: allow to specify separate cluster network

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Nov 19 13:14:10 CET 2018


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 <t.lamprecht at proxmox.com>
---
 PVE/API2/Ceph.pm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index 8584cb51..6699607e 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -830,6 +830,14 @@ __PACKAGE__->register_method ({
 		optional => 1,
 		maxLength => 128,
 	    },
+	    'cluster-network' => {
+		description => "Use specific network for ceph cluster traffic. ".
+		    "If this is set, the `network` parameter is required and denotes public traffic.",
+		type => 'string', format => 'CIDR',
+		requires => 'network',
+		optional => 1,
+		maxLength => 128,
+	    },
 	    size => {
 		description => 'Targeted number of replicas per object',
 		type => 'integer',
@@ -921,6 +929,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();
-- 
2.19.1





More information about the pve-devel mailing list