Discussion:
[pve-devel] [PATCH manager v2] fix #1430: ceph init: allow to specify separate cluster network
Thomas Lamprecht
2018-11-27 14:37:32 UTC
Permalink
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 <***@proxmox.com>
---

changes v1 -> v2:
* use a more expressive and user friendlier description for the new property as
suggested by Tim

[0]: https://pve.proxmox.com/pipermail/pve-devel/2018-November/034769.html

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();
--
2.19.2
Wolfgang Bumiller
2018-11-28 08:31:40 UTC
Permalink
applied
Post by Thomas Lamprecht
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/
---
* use a more expressive and user friendlier description for the new property as
suggested by Tim
[0]: https://pve.proxmox.com/pipermail/pve-devel/2018-November/034769.html
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();
--
2.19.2
Loading...