After checked the latest code of fuel in fuel-library-master/files/fuel-ha-utils/ocf/ns_haproxy, I found it seems haproxy is started by the program, not pacemaker. Here is my understanding for the procedure:
1. create the haproxy network namespace.
2. start haproxy in the created namespace haproxy.
3. Create veth peer and setup the host and namespace's ip, route rules.
I don't know if my understanding is correct. And if this procedure is used by fuel to start haproxy, haproxy will not be started
by pacemaker? I didn't find any description in pacemaker that it supports running haproxy in a new namespace either.
Meanwhile, I tried the command to start haproxy but met problem:
ip netns exec test2 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid
[WARNING] 351/215752 (1018) : <debug> mode incompatible with <quiet>, <daemon> and <systemd>. Keeping <debug> only.
Available polling systems :
epoll : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result FAILED
Total: 3 (2 usable), will use epoll.
Using epoll() as the polling mechanism.
[WARNING] 351/215752 (1018) : Server galera_cluster/controller2 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 1 backup servers left. Running on backup. 0 sessions active, 0 requeued, 0 remaining in queue.
[WARNING] 351/215753 (1018) : Backup Server galera_cluster/controller3 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 351/215753 (1018) : proxy 'galera_cluster' has no server available!
After checked the latest code of fuel in fuel-library- master/ files/fuel- ha-utils/ ocf/ns_ haproxy, I found it seems haproxy is started by the program, not pacemaker. Here is my understanding for the procedure:
1. create the haproxy network namespace.
2. start haproxy in the created namespace haproxy.
3. Create veth peer and setup the host and namespace's ip, route rules.
I don't know if my understanding is correct. And if this procedure is used by fuel to start haproxy, haproxy will not be started
by pacemaker? I didn't find any description in pacemaker that it supports running haproxy in a new namespace either.
Meanwhile, I tried the command to start haproxy but met problem: haproxy. cfg -p /var/run/ haproxy. pid cluster/ controller2 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 1 backup servers left. Running on backup. 0 sessions active, 0 requeued, 0 remaining in queue. cluster/ controller3 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
ip netns exec test2 /usr/sbin/haproxy -f /etc/haproxy/
[WARNING] 351/215752 (1018) : <debug> mode incompatible with <quiet>, <daemon> and <systemd>. Keeping <debug> only.
Available polling systems :
epoll : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result FAILED
Total: 3 (2 usable), will use epoll.
Using epoll() as the polling mechanism.
[WARNING] 351/215752 (1018) : Server galera_
[WARNING] 351/215753 (1018) : Backup Server galera_
[ALERT] 351/215753 (1018) : proxy 'galera_cluster' has no server available!
Could you please help to explain them?
Thanks!