[pve-devel] [PATCH manager] ceph: Allow specifying cluster network separately

Philip Abernethy p.abernethy at proxmox.com
Mon Sep 4 12:30:17 CEST 2017


We always recommend putting ceph-internal communication into a separate
cluster network. Now pveceph init allows specifying a separate cluster
network. The prior behaviour is retained, so -network sets both
networks and -cluster_network overrides the cluster network if it is
set.
---
 PVE/API2/Ceph.pm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index 7f709f55..9721ec56 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -783,7 +783,13 @@ __PACKAGE__->register_method ({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    network => {
-		description => "Use specific network for all ceph related traffic",
+		description => "Use specific network for all ceph related traffic.",
+		type => 'string', format => 'CIDR',
+		optional => 1,
+		maxLength => 128,
+	    },
+	    cluster_network => {
+		description => "Use specific network for all internal ceph traffic.",
 		type => 'string', format => 'CIDR',
 		optional => 1,
 		maxLength => 128,
@@ -879,6 +885,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.11.0





More information about the pve-devel mailing list