[pve-devel] [PATCH manager] fix #1430: ceph init: allow to specify separate cluster network
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Nov 27 11:09:33 CET 2018
On 11/27/18 10:39 AM, Tim Marx wrote:
>
>> Thomas Lamprecht <t.lamprecht at proxmox.com> hat am 26. November 2018 um 19:02 geschrieben:
>>
>>
>> On 11/19/18 1:14 PM, Thomas Lamprecht wrote:
>>> 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.",
>
> Maybe a hint would encourage some people to use it. Now we have two almost identical descriptions for network & cluster-network. Anybody reading this has to know the difference between "all ceph related traffic" and "ceph cluster traffic" to get the meaning.
> You could write something like:
> "Declare a separate cluster network, OSDs will route heartbeat, object replication and recovery traffic over it."
> If you mention the security aspect as described in the ceph docs, it would be even better IMO, but maybe too long for an API description.
> What do you think?
>
Agree, but that's for the documentation or at least for the verbose description
field. Anybody a bit more familiar with ceph knows the difference between cluster
and public traffic, ceph docs also refer to it with this names, IIRC, so if you use
'cluster traffic' then people can easily find the correct docs when searching for it.
But your suggestion works OK for me, for more we either should use verbose_description
and for even more we've pve-docs which can then also explain why/when it's useful, etc.
If we integrate this in the WebUI sometimes we we'll have a help button to the docs then
anyway.
>
>>> + 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();
>>>
More information about the pve-devel
mailing list