Re: [ClusterLabs] Passing and binding to virtual IP in my service
What I had posted earlier was an approach to do N+1 Redundancy for my use-case (which could be different from yours). Attaching the same and the cib xml to this thread (Don't know if attachments are allowed.) There are some follow-up questions that I am posting on my other thread. Please check that. On Fri, Jan 8, 2016 at 1:41 PM, Solutions Solutions wrote: > hi Nikhil, > can you send me the N+1 redundancy configuration file,which you posted > earlier. > > On Thu, Jan 7, 2016 at 2:58 PM, Nikhil Utane > wrote: > >> Hi, >> >> I have my cluster up and running just fine. I have a dummy service that >> sends UDP packets out to another host. >> >> Resource Group: MyGroup >> ClusterIP (ocf::heartbeat:IPaddr2): Started node1 >> UDPSend(ocf::nikhil:UDPSend): Started node1 >> >> If I ping to the virtual IP from outside, the response goes via virtual >> IP. >> But if I initiate ping from node1, then it takes the actual (non-virtual >> IP). This is expected since I am not binding to the vip. (ping -I vip works >> fine). >> So my question is, how to pass the virtual IP to my UDPSend OCF agent so >> that it can then bind to the vip? This will ensure that all messages >> initiated by my UDPSend goes from vip. >> >> Out of curiosity, where is this virtual IP stored in the kernel? >> I expected to see a secondary interface ( for e.g. eth0:1) with the vip >> but it isn't there. >> >> -Thanks >> Nikhil >> >> ___ >> Users mailing list: Users@clusterlabs.org >> http://clusterlabs.org/mailman/listinfo/users >> >> Project Home: http://www.clusterlabs.org >> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf >> Bugs: http://bugs.clusterlabs.org >> >> > > ___ > Users mailing list: Users@clusterlabs.org > http://clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org > > Redundancy using Pacemaker & Corosync-External.docx Description: MS-Word 2007 document http://localhost/server-status"/> ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [ClusterLabs] Passing and binding to virtual IP in my service
hi Nikhil, can you send me the N+1 redundancy configuration file,which you posted earlier. On Thu, Jan 7, 2016 at 2:58 PM, Nikhil Utane wrote: > Hi, > > I have my cluster up and running just fine. I have a dummy service that > sends UDP packets out to another host. > > Resource Group: MyGroup > ClusterIP (ocf::heartbeat:IPaddr2): Started node1 > UDPSend(ocf::nikhil:UDPSend): Started node1 > > If I ping to the virtual IP from outside, the response goes via virtual IP. > But if I initiate ping from node1, then it takes the actual (non-virtual > IP). This is expected since I am not binding to the vip. (ping -I vip works > fine). > So my question is, how to pass the virtual IP to my UDPSend OCF agent so > that it can then bind to the vip? This will ensure that all messages > initiated by my UDPSend goes from vip. > > Out of curiosity, where is this virtual IP stored in the kernel? > I expected to see a secondary interface ( for e.g. eth0:1) with the vip > but it isn't there. > > -Thanks > Nikhil > > ___ > Users mailing list: Users@clusterlabs.org > http://clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org > > ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [ClusterLabs] Passing and binding to virtual IP in my service
Aah. Got it. Forgot about the ip addr command. Cool. So now I have the option to bind as well as use route command. Kristoffer answered about using attribute references so I should be all set. Thanks Guys. On Thu, Jan 7, 2016 at 4:12 PM, Jorge Fábregas wrote: > On 01/07/2016 05:28 AM, Nikhil Utane wrote: > > So my question is, how to pass the virtual IP to my UDPSend OCF agent so > > that it can then bind to the vip? This will ensure that all messages > > initiated by my UDPSend goes from vip. > > Hi, > > I don't know how ping -I does it (what system call it uses) but I think > you'll have to implement that if you want your program to source > connection from a particular virtual IP. > > As far as I know, the way this is usually done these days is by creating > routes. Something like: > > ip route change 192.168.14.0/24 dev eth0 src 192.168.14.4 > > > > Out of curiosity, where is this virtual IP stored in the kernel? > > I expected to see a secondary interface ( for e.g. eth0:1) with the vip > > but it isn't there. > > Well, in the old days we used to have a "virtual interface" (eth0:1, > eth0:2 etc) but the proper modern way is to use "virtual addresses" > within a single interface. The caveat is that you need to use the ip > command to show these virtual addresses (ifconfig is not aware of them): > > ip addr show > > You'll see there the notion of a primary IP and secondaries. The system > will initiate connection from the primary by default (unless you specify > a route like the one above). > > HTH, > Jorge > > ___ > Users mailing list: Users@clusterlabs.org > http://clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org > ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
Re: [ClusterLabs] Passing and binding to virtual IP in my service
On 01/07/2016 05:28 AM, Nikhil Utane wrote: > So my question is, how to pass the virtual IP to my UDPSend OCF agent so > that it can then bind to the vip? This will ensure that all messages > initiated by my UDPSend goes from vip. Hi, I don't know how ping -I does it (what system call it uses) but I think you'll have to implement that if you want your program to source connection from a particular virtual IP. As far as I know, the way this is usually done these days is by creating routes. Something like: ip route change 192.168.14.0/24 dev eth0 src 192.168.14.4 > Out of curiosity, where is this virtual IP stored in the kernel? > I expected to see a secondary interface ( for e.g. eth0:1) with the vip > but it isn't there. Well, in the old days we used to have a "virtual interface" (eth0:1, eth0:2 etc) but the proper modern way is to use "virtual addresses" within a single interface. The caveat is that you need to use the ip command to show these virtual addresses (ifconfig is not aware of them): ip addr show You'll see there the notion of a primary IP and secondaries. The system will initiate connection from the primary by default (unless you specify a route like the one above). HTH, Jorge ___ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org