Re: Runtime bindnet address change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Honza,

One more question is that does "config change" encompass ringid change too?
Here is the thought that I have:
You dont need to set the ringid in the corosync.conf, when the node comes up it can hear a broadcast solicitation for rings and then decide to join a ring based on the info it receives. In this case, it needs to dynamically set its ringid in its config and continues its service.

Thanks
Koushik


On 9 May 2013 06:23, Jan Friesse <jfriesse@xxxxxxxxxx> wrote:
Koushik,

Koushik Sampath napsal(a):
> I have been following this thread closely and wonder if my question too is
> related to this issue: http://www.spinics.net/lists/corosync/msg02542.html
>
> I have a cluster of machines which have to be set with the correct
> bindnetaddr in the totem.
>
> The problem is that when the machines are power cycled, they may or may not
> get the same IP and thus the bindnetaddr may change. Also, if the interface
> port cable is pulled out and pushed back in, there is a dynamic change in
> the bindnetaddr. Does corosync handle this dynamic change.
>

Question is, how much it is changed. If network remains same, corosync
can handle this automatically (just use  network address in bindnetaddr
instead of concrete IP, so let's say you have 192.168.1.0/255.255.255.0
network and node can get 192.168.1.1, 192.168.1.2, ..., just set
bindnetaddr to 192.168.1.0 and everything will work).

> I have a v2.2 client and digging in to the code, there is a function ptr
> used:
>
> void (*confchg_fn) (
>                 enum totem_configuration_type configuration_type,
>                 const unsigned int *member_list, size_t member_list_entries,
>                 const unsigned int *left_list, size_t left_list_entries,
>                 const unsigned int *joined_list, size_t joined_list_entries,
>                 const struct memb_ring_id *ring_id))
>
> Does the code monitor any change in the IP address so that the bindnetaddr
> is changed on the fly in the config?

Yes and no. Yes part is, that if you have bindnetaddr set to network
address, it will handle change (sadly not very correctly). No part is,
that dynamic change of cmap value of bindnetaddr is not supported.

Generally, I would recommend to:
- have "static" ip addresses for nodes
- have them stored in /etc/hosts


>
> I think there has to be a a thread which runs every so often that checks
> the bound IP address using "ip -o addr" and sets off a call to the
> confchg_fn in case the ip address changes.
>
> Thanks
> Koushik
>
>

Regards,
  Honza

>
> _______________________________________________
> discuss mailing list
> discuss@xxxxxxxxxxxx
> http://lists.corosync.org/mailman/listinfo/discuss
>


_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss

[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux