public inbox for gfs2@lists.linux.dev
 help / color / mirror / Atom feed
From: christine caulfield <ccaulfie@redhat.com>
To: Alexander Aring <aahringo@redhat.com>,
	Heming Zhao <heming.zhao@suse.com>
Cc: teigland@redhat.com, jfriesse@redhat.com, nicholas.yang@suse.com,
	glass.su@suse.com, gfs2@lists.linux.dev,
	Roger Zhou <ZZhou@suse.com>
Subject: Re: [PATCH v2 1/1] dlm_controld: support corosync3/knet multi-link
Date: Thu, 9 Jan 2025 15:38:49 +0000	[thread overview]
Message-ID: <f5caa22f-7b4b-4633-89c8-fb373508bf03@redhat.com> (raw)
In-Reply-To: <CAK-6q+jRn+fXdby1tCQSoayO4HfpKKQkfUOH6SGJ75ujbNn1ug@mail.gmail.com>



On 09/01/2025 15:34, Alexander Aring wrote:
> Hi Heming,
> 
> On Wed, Jan 8, 2025 at 9:26 PM Heming Zhao <heming.zhao@suse.com> wrote:
>>
>> On 1/8/25 23:54, Alexander Aring wrote:
>>> Hi,
>>>
>>> On Mon, Jan 6, 2025 at 11:59 PM Heming Zhao <heming.zhao@suse.com> wrote:
>>>>
>>>> On 1/7/25 02:11, Alexander Aring wrote:
>>>>> Hi Heming,
>>>>>
>>>>> On Tue, Dec 24, 2024 at 3:42 AM Heming Zhao <heming.zhao@suse.com> wrote:
>>>>>>
>>>>>> The totem.rrp_mode config item was obsolete in corosync3. And
>>>>>> this patch gives dlm_controld the ability to detect multiple
>>>>>> links.
>>>>>>
>>>>>> The corosync and dlm network protocol relationship table:
>>>>>>
>>>>>>     -------------+-----------------------+---------------------
>>>>>>                  | totem.transport=udpu  | totem.transport=udp
>>>>>>                  +-----------------------+---------------------
>>>>>>     corosync 2.x |            |          |      multicast
>>>>>>                  |   1-ring   | 2-ring   |---------------------
>>>>>>                  |            |          |  default  | 2-ring
>>>>>>     -------------+------------+----------+---------------------
>>>>>>        dlm       |     tcp    | sctp     |   tcp     | sctp
>>>>>>     -------------+------------+----------+---------------------
>>>>>>
>>>>>>     -------------+----------------------------+----------------------
>>>>>>                  | totem.transport = udpu/udp | totem.transport=knet
>>>>>>     corosync 3.x |----------------------------+----------------------
>>>>>>                  |      1-ring                | 1-link  | multi-links
>>>>>>     -------------+----------------------------+---------+-----------
>>>>>>        dlm       |       tcp                  |  tcp    | sctp
>>>>>>     -------------+----------------------------+---------+-----------
>>>>>>
>>>>>> At last, this patch should be work with updated kernel dlm module.
>>>>>
>>>>> I am not getting why the network protocol configuration has anything
>>>>> to do with the corosync configuration.
>>>>> I know that we currently get the address configurations from corosync
>>>>> but with this patch we are forced to use SCTP when corosync provides
>>>>> more than one "ring" configuration?
>>>>
>>>> Yes. this patch will force dlm to change to SCTP when corosync provides
>>>> more than one "ring".
>>>>
>>>> The reason:
>>>> (without this patch) When a user sets up multi-links on corosync3
>>>> and corosync.conf with an incorrect or missing rrp_mode,
>>>> dlm_tcp_listen_validate() will trigger 'dlm_local_count > 1' and report
>>>> an error.
>>>> Please note, rrp_mode is obsolete; the dlm_daemon will fail to read this
>>>> config item in the further. Therefore, the network protocol will
>>>> always be TCP.
>>>>
>>>>>
>>>>> Even with corosync3 it should be possible to use corosync in SCTP
>>>>> (multiple rings) and the kernel dlm using TCP only, would this not be
>>>>> possible with dlm_controld then?
>>>>
>>>> Only one case for above case: corosync3 on single-link.
>>>> A new patch is needed for dlm to work over TCP when corosync3 in SCTP
>>>> (multi-link mode). i.e. dlm_tcp_listen_validate() shouldn't return
>>>> -EINVAL when 'dlm_local_count > 1'.
>>>>
>>>
>>> I think we should change that condition then.
>>>
>>>> A key point for dlm is that there is no way to get the corosync version.
>>>> This patch is compatible with corosync2 env. In corosync2, the user must
>>>> correctly config rrp_mode when using 2-ring.
>>>>
>>>
>>> So far I looked into it, it is anyway for detecting a protocol
>>> according to some Corosync functionality it should still be possible
>>> to always force dlm_controld using a different protocol by setting the
>>> right config values/parameters.
>>
>> Yes, I forgot the config item 'protocol=[detect|tcp|sctp]', which can bypass
>> the detection phase when its value is "tcp|sctp". But in general, dlm.conf
>> is seldom used.
>>
>> Unfortunately, corosync doesn't provide the api.
>> ref: https://github.com/corosync/corosync/issues/771
> 
> I have the following scenario in my head with detect_protocol().
> 
> Currently, if somebody uses knet with UDP and has multiple


Just a quick intervention here. If corosync is using knet, then it 
doesn't matter if knet's protocol is UDP or SCTP, it can still provide 
up to 8 links. There is no point in you checking that value (also, 
different links can use different protocols).

Yes, check corosync's transport: key for knet/udp/udpu - THAT will tell 
you whether multi-link is available.


So, the logic goes:

multilink = false
if totem.rrp_mode == 1 then multilink = true
if totem.transport == 'knet' then multilink = true

That should cover it.

Chrissie



> "nodelist.node.0.ring%d_addr" defined in Corosync but does not set
> "totem.rrp_mode" and there is no "protocol" setting in dlm.conf or as
> a parameter (it will use detect_protocol()"), then the DLM kernel will
> use TCP.
> 
> After your patch the behaviour will be changed and the DLM kernel will
> use SCTP with the same configuration as before?
> 
> - Alex
> 


  reply	other threads:[~2025-01-09 15:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-24  8:42 [PATCH 0/1] dlm_tools: support corosync3/knet multi-link Heming Zhao
2024-12-24  8:42 ` [PATCH v2 1/1] dlm_controld: " Heming Zhao
2025-01-06 18:11   ` Alexander Aring
2025-01-07  4:59     ` Heming Zhao
2025-01-08 15:54       ` Alexander Aring
2025-01-09  2:26         ` Heming Zhao
2025-01-09 15:34           ` Alexander Aring
2025-01-09 15:38             ` christine caulfield [this message]
2025-01-10 14:28             ` Heming Zhao
2025-01-10 14:43               ` christine caulfield
2025-01-13  3:12                 ` Heming Zhao
2025-01-17 15:11                   ` Alexander Aring
2025-01-17 15:16                     ` christine caulfield
2025-02-18 11:46                       ` Heming Zhao
2025-02-18 16:35                         ` Alexander Aring
2025-02-20  3:56                           ` Heming Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5caa22f-7b4b-4633-89c8-fb373508bf03@redhat.com \
    --to=ccaulfie@redhat.com \
    --cc=ZZhou@suse.com \
    --cc=aahringo@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=glass.su@suse.com \
    --cc=heming.zhao@suse.com \
    --cc=jfriesse@redhat.com \
    --cc=nicholas.yang@suse.com \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox