[ClusterLabs] Running shell command on remote node via corosync messaging infrastructure

Christine Caulfield ccaulfie at redhat.com
Mon Jan 4 08:45:39 EST 2021



On 04/01/2021 13:19, Klaus Wenninger wrote:
> On 1/4/21 1:50 PM, Christine Caulfield wrote:
>>
>>
>> On 04/01/2021 09:21, Klaus Wenninger wrote:
>>> On 1/4/21 8:36 AM, Christine Caulfield wrote:
>>>>
>>>>
>>>> On 18/12/2020 20:41, Andrei Borzenkov wrote:
>>>>> 18.12.2020 21:54, Ken Gaillot пишет:
>>>>>> On Fri, 2020-12-18 at 17:51 +0000, Animesh Pande wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> Is there a tool that would allow for commands to be run on remote
>>>>>>> nodes in the cluster through the corosync messaging layer? I have a
>>>>>>> cluster configured with multiple corosync communication rings
>>>>>>> (public
>>>>>>> network and private network). I would like to be able to run a
>>>>>>> command on the remote node through corosync layer even when the
>>>>>>> communication ring associated with the public network goes down but
>>>>>>> the private network communication ring is still connected.
>>>>>>>
>>>>>>> Please let me know if there is such a tool provided by corosync that
>>>>>>> I can use.
>>>>>>>
>>>>>>> Thank you for your time!
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Animesh
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> No, there is not. I'm assuming you're using "remote" in the
>>>>>> conventional sense and not for Pacemaker Remote nodes, but the answer
>>>>>> is no either way. :)
>>>>>>
>>>>>> Of course, you can configure sshd to listen on the cluster interface.
>>>>>
>>>>> What do you call "cluster interface"? As I understand the question,
>>>>> the
>>>>> idea is to use redundancy of corosync communication. Is it possible to
>>>>> configure virtual interface on top of corosync rings?
>>>>>
>>>>
>>>>
>>>> Yes there is. It's called the 'nozzle' device and works in corosync >=
>>>> 3.0.2.
>>>>
>>>> It creates a pseudo device that passes all traffic through the knet
>>>> transport, so you get the redundancy of multiple links transparently.
>>>> You don't get join/leave up/down notifications like CPG (because it's
>>>> an interface not an API) but you can use the API if you need those.
>>> Talking of this ... would it be possible / make sense to translate that
>>> to something
>>> that trigger if/link up/down somehow? (up as long as there is at least
>>> one member
>>> apart from the local node or something)
>>>
>>
>> I'm not really sure how that would work. Forging ICMP notifications
>> sounds a bit messy and we can't take the I/F down just for one node
>> going down as that would be very anti-social.
> Was aware that it needs some algorithm that is a bit more sophisticated.
> ('up as long as there is at least one member apart from the local node
> or something' was my crude first idea)
> Anyway probably quite useless for anything else than point-to-point
> connections. Hmm ... similar as with layer 1 indication.
> The ICMP idea might of course be something to think about but sounds
> like significant effort and duplication of IP-stack-stuff - unless there are
> interfaces I'm not aware of. Are switches doing anything similar? (L3
> probably)
> Haven't tried ... How does it handle DHCP expires while isolated?
> 
> Just thought it might be fun to think about possibilities ...


oh it is! I would be interested to hear what users actually want from 
this sort of interaction.

DHCP isn't involved here, corosync.conf provides the IP address for the 
nodes on the internal network (using the nodeid as the LSB/LSW)


Chrissie
>>
>> ISTM that some code would be needed to interpret what was going on for
>> any such situation so you might as well use CPG or quorum libraries in
>> that instance. The main point of libnozzle is that applications can
>> run unchanged.
> That was the idea behind making it look like layer 1 going away or something
> already handled by existing applications/services/...
> 
> Klaus
>>
>> Chrissie
>>
>>> Klaus
>>>>
>>>> I'm not sure if it's supported in pcs yet, but you just add the
>>>> information too corosync.conf (on all nodes):
>>>>
>>>> nozzle {
>>>>       name: noz01
>>>>       ipaddr 192.168.10.0
>>>>       ipprefix: 24
>>>> }
>>>>
>>>> See corosync.conf(5) for more information.
>>>>
>>>>
>>>> Chrissie
>>>>
>>>>
>>>>>> If you give the cluster interface on each node a unique name in
>>>>>> DNS (or
>>>>>> hosts or whatever), you can ssh to that name.
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Manage your subscription:
>>>>> https://lists.clusterlabs.org/mailman/listinfo/users
>>>>>
>>>>> ClusterLabs home: https://www.clusterlabs.org/
>>>>>
>>>>
>>>> _______________________________________________
>>>> Manage your subscription:
>>>> https://lists.clusterlabs.org/mailman/listinfo/users
>>>>
>>>> ClusterLabs home: https://www.clusterlabs.org/
>>>
>>
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>>
>> ClusterLabs home: https://www.clusterlabs.org/
> 



More information about the Users mailing list