Re: Keepalived-devel Digest, Vol 120, Issue 3
John Gallagher <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
Maybe this I am missing something and I have not checked your config on my servers but look at your brackets :
virtual_server 12.34.56.78 80 {
delay_loop 20
lb_algo wlc
lb_kind NAT
nat_mask 255.255.255.0
persistence_timeout 0
protocol TCP
alpha
real_server 10.0.0.100 80 {
weight 1
MISC_CHECK {
misc_path "/root/bin/check_hosts.sh 10.0.0.100"
misc_timeout 5
}
}
} <<<<<<<<<<<<<<< is this one closing the Virtual Server? It would seem that is is and therefore the real server statements below are not associated with the virtual server.
John
==========================
John Gallagher
CIO Systems of Silicon Valley
Tel. 650-641-3176
Fax 408-331-6923
http://www.ciosystems.com <blocked::blocked::http://www.ciosystems.com/>
On 7/19/16, 2:45 AM, "[email protected]" <[email protected]> wrote:
Send Keepalived-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Keepalived-devel digest..."
Today's Topics:
1. Re: Only one misc_check possible (several configured per VIP)
(Bernd)
2. Re: SNMPd can register from one keepalived only (Quentin Armitage)
3. Re: SNMPd can register from one keepalived only (Vincent Bernat)
4. Re: SNMPd can register from one keepalived only (Quentin Armitage)
5. Re: SNMPd can register from one keepalived only (Vincent Bernat)
----------------------------------------------------------------------
Message: 1
Date: Mon, 18 Jul 2016 13:31:08 +0200
From: Bernd <[email protected]>
Subject: Re: [Keepalived-devel] Only one misc_check possible (several
configured per VIP)
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Am 2016-07-15 13:13, schrieb Bernd:
> Hi,
Hi again,
I verified that this behaviour is still continuing running 1.2.23.
Best,
Bernd
> I've got a weird experience here (snippet from config):
>
> virtual_server 12.34.56.78 80 {
> delay_loop 20
> lb_algo wlc
> lb_kind NAT
> nat_mask 255.255.255.0
> persistence_timeout 0
> protocol TCP
> alpha
>
> real_server 10.0.0.100 80 {
> weight 1
> MISC_CHECK {
> misc_path "/root/bin/check_hosts.sh 10.0.0.100"
> misc_timeout 5
> }
> }
> }
>
> real_server 10.0.0.101 80 {
> weight 1
> MISC_CHECK {
> misc_path "/root/bin/check_hosts.sh 10.0.0.101"
> misc_timeout 5
> }
> }
> }
>
> real_server 10.0.0.102 80 {
> weight 1
> MISC_CHECK {
> misc_path "/root/bin/check_hosts.sh 10.0.0.102"
> misc_timeout 5
> }
> }
> }
> }
>
> However, only the first appearance is being used (10.0.0.100); if I
> comment out .100, it works for .101, but not for .102. If I comment out
> .101, it works for .102...
>
> I verified this using tcpdump - no packet going to the second or third
> rs configured.
>
> Any idea what could cause this? Tried 1.2.13 from CentOS base repo as
> well as a self-built 1.2.19
>
> Best regards,
>
> Bernd
------------------------------
Message: 2
Date: Mon, 18 Jul 2016 23:44:15 +0100
From: Quentin Armitage <[email protected]>
Subject: Re: [Keepalived-devel] SNMPd can register from one keepalived
only
To: ?ukasz Margiela <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On Mon, 2016-07-18 at 09:30 +0000, ?ukasz Margiela wrote:
> Hi,
>
>
>
> I'm struggling with a problem when I run multiple keepalived in
> separated network namespaces. The first keepalived registers
> flawlessly and I can query it without any problem, but when the second
> one starts I get tons of errors like:
>
> duplicate registration: MIB modules AgentX subagent 11, session
> 0xef45d0, subsession 0xf07cd0 and AgentX subagent 15, session
> 0xf11540, subsession 0xf4f180 (oid .1.3.6.1.4.1.9586.100.5.3.4.1.26)
>
>
> After that I still can snmpwalk on KEEPALIVED-MIB::vrrp and get
> informations about the first one.
>
>
> Note that it doesn't matter which of keepalived starts first. The one
> which will start first, will get registered.
>
>
>
>
> I'm starting my keepalived with:
>
> keepalived -f /run/conf/keepalived.conf -D -x -n -l
>
>
> (each network namespace has separated /run directory)
>
I've never used network namespaces, so my comments are based on reading
information available on the internet.
First of all, keepalived isn't network namespace aware (I like the look
of the network namespaces so I'll make provide a patch to make it
namespace aware). On the basis that it isn't currently namespace aware,
it appears to me that you need to run it as follows:
ip netns exec NETNS_NAME1 keepalived -f /run/conf/keepalived.conf -D -x
-n -l
and the second instance as:
ip netns exec NETNS_NAME2 keepalived -f /run/conf/keepalived.conf -D -x
-n -l
You will also need to run separate instances of snmpd for each instance
of keepalived, since the same MIB cannot be registered by difference sub
agents with the same instance of snmpd.
By default, keepalived communicates with snmpd via the Unix domain
socket /var/agentx/master. Since the keepalived instances are already in
separate network namespaces, it might be simplest to specify:
snmp_socket udp:127.0.0.1:161
in the global section of the keepalived configurations so that
keepalived uses network communication with snmpd, which of course will
be in the separate network namespaces. 2 instances of snmpd will need to
be run prior to running the keepalvied instances, using ip netns
NETNS_NAME1 snmpd ... and ip netns NETNS_NAME2 snmpd ... (or use nsenter
for the keepalived processes to run in the same network namespaces as
the snmpd instances).
An alternative would be to use different unix domain sockets,
e.g. /var/agentx/master1 and /var/agentx/master2 (specified with the -x
option to snmpd) and configured in keepalived with "snmp_socket
unix:/var/agentx/master1" etc in the global section of the keepalived
configs.
A further option might be to run each instance of snmpd in a separate
IPC namespace, and then use nsenter to run the keepalived processes in
the same IPC namespaces as the snmpd processes.
I hope that helps, and that some of the above works.
Quentin Armitage
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 3
Date: Tue, 19 Jul 2016 08:04:49 +0200
From: Vincent Bernat <[email protected]>
Subject: Re: [Keepalived-devel] SNMPd can register from one keepalived
only
To: Quentin Armitage <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
? 19 juillet 2016 00:44 CEST, Quentin Armitage <[email protected]>?:
> By default, keepalived communicates with snmpd via the Unix domain
> socket /var/agentx/master. Since the keepalived instances are already
> in separate network namespaces, it might be simplest to specify:
> snmp_socket udp:127.0.0.1:161
> in the global section of the keepalived configurations so that
> keepalived uses network communication with snmpd, which of course will
> be in the separate network namespaces. 2 instances of snmpd will need
> to be run prior to running the keepalvied instances, using ip netns
> NETNS_NAME1 snmpd ... and ip netns NETNS_NAME2 snmpd ... (or use
> nsenter for the keepalived processes to run in the same network
> namespaces as the snmpd instances).
I doubt that a master agent will listen to subagent on the main
socket. The proper port for AgentX protocol is 705 (and should be
enabled in snmpd.conf as well).
> An alternative would be to use different unix domain sockets, e.g.
> /var/agentx/master1 and /var/agentx/master2 (specified with the -x
> option to snmpd) and configured in keepalived with "snmp_socket
> unix:/var/agentx/master1" etc in the global section of the keepalived
> configs.
>
> A further option might be to run each instance of snmpd in a separate
> IPC namespace, and then use nsenter to run the keepalived processes in
> the same IPC namespaces as the snmpd processes.
I think that IPC namespaces doesn't cover unix sockets, only SysV IPC
(semaphores, shared memory and message queue).
--
Make it clear before you make it faster.
- The Elements of Programming Style (Kernighan & Plauger)
------------------------------
Message: 4
Date: Tue, 19 Jul 2016 10:30:14 +0100
From: Quentin Armitage <[email protected]>
Subject: Re: [Keepalived-devel] SNMPd can register from one keepalived
only
To: Vincent Bernat <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On Tue, 2016-07-19 at 08:04 +0200, Vincent Bernat wrote:
> ? 19 juillet 2016 00:44 CEST, Quentin Armitage <[email protected]> :
>
> > By default, keepalived communicates with snmpd via the Unix domain
> > socket /var/agentx/master. Since the keepalived instances are already
> > in separate network namespaces, it might be simplest to specify:
> > snmp_socket udp:127.0.0.1:161
> > in the global section of the keepalived configurations
>
> I doubt that a master agent will listen to subagent on the main
> socket. The proper port for AgentX protocol is 705 (and should be
> enabled in snmpd.conf as well).
>
Thanks for the correction. When I configure "snmp_socket
udp:127.0.0.1:705" in keepalived.conf, and "agentxsocket
udp:127.0.0.1:705" in snmpd.conf the initialisation seems to work fine
and there is udp traffic to/from port 705. However, if I try using
snmpwalk to get the snmp data, there is no traffic from udp port 705,
and snmpwalk reports that it times out. Is there something that
keepalived is not setting that is needed for snmpd to talk back to
keepalived?
> > An alternative would be to use different unix domain sockets, e.g.
> > /var/agentx/master1 and /var/agentx/master2 (specified with the -x
> > option to snmpd) and configured in keepalived with "snmp_socket
> > unix:/var/agentx/master1" etc in the global section of the keepalived
> > configs.
> >
> > A further option might be to run each instance of snmpd in a separate
> > IPC namespace, and then use nsenter to run the keepalived processes in
> > the same IPC namespaces as the snmpd processes.
>
> I think that IPC namespaces doesn't cover unix sockets, only SysV IPC
> (semaphores, shared memory and message queue).
So at the moment probably the best solution is it have one
snmpd/keepalived pair configured to use unix:/var/agentx/master (the
default), and the other to use unix:/var/agentx/master1. I have tested
this latter configuration with one snmpd and one keepalived and it
appears to work.
Quentin Armitage
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 5
Date: Tue, 19 Jul 2016 11:45:40 +0200
From: Vincent Bernat <[email protected]>
Subject: Re: [Keepalived-devel] SNMPd can register from one keepalived
only
To: Quentin Armitage <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
? 19 juillet 2016 11:30 CEST, Quentin Armitage <[email protected]>?:
> Thanks for the correction. When I configure "snmp_socket
> udp:127.0.0.1:705" in keepalived.conf, and "agentxsocket
> udp:127.0.0.1:705" in snmpd.conf the initialisation seems to work fine
> and there is udp traffic to/from port 705. However, if I try using
> snmpwalk to get the snmp data, there is no traffic from udp port 705,
> and snmpwalk reports that it times out. Is there something that
> keepalived is not setting that is needed for snmpd to talk back to
> keepalived?
Well, I don't think that anything else is needed. You can check the
nsModuleTable to see what Net-SNMP thinks about that.
--
Terminate input by end-of-file or marker, not by count.
- The Elements of Programming Style (Kernighan & Plauger)
------------------------------
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
------------------------------
_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
End of Keepalived-devel Digest, Vol 120, Issue 3
************************************************
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev