** Description changed:

+ [Impact]
+ 
+ If a user is tracking a process with PID > 32767 keepalived will not be
+ able to work as expected.
+ 
+ This bug was fixed upstream here:
+ 
https://github.com/acassen/keepalived/commit/23a5b8113bf0b8ec4718443df0406882e8e4d831
+ 
+ [Test Plan]
+ 
+ Launch a Focal VM and run the following commands:
+ 
+ # install keepalived and nginx
+ $ apt install -y nginx keepalived
+ 
+ # configure keepalived to track the nginx process
+ $ cat << EOF > /etc/keepalived/keepalived.conf
+ global_defs {
+     enable_script_security
+ }
+ vrrp_track_process track_nginx {
+     process nginx
+     weight 10
+     delay 1
+ }
+ vrrp_instance lb {
+     interface enp5s0
+     state MASTER
+     priority 100
+     virtual_router_id 50
+     authentication {
+         auth_type PASS
+         auth_pass password
+     }
+     track_process {
+         track_nginx
+     }
+     virtual_ipaddress {
+         10.191.226.19
+     }
+ }
+ EOF
+ $ systemctl restart keepalived
+ 
+ # stop nginx process to loose quorum
+ $ systemctl stop nginx
+ $ journalctl -u keepalived  | grep Quorum
+ Feb 07 20:13:04 keepalived-debug Keepalived_vrrp[3346]: Quorum lost for 
tracked process track_nginx
+ 
+ # start nginx process to gain quorum
+ $ systemctl start nginx
+ $ pidof nginx
+ 3282 3281
+ $ journalctl -u keepalived  | grep Quorum
+ Feb 07 20:13:04 keepalived-debug Keepalived_vrrp[3346]: Quorum lost for 
tracked process track_nginx
+ Feb 07 20:19:58 keepalived-debug Keepalived_vrrp[3346]: Quorum gained for 
tracked process track_nginx
+ 
+ # stop nginx process to loose quorum again
+ $ systemctl stop nginx
+ $ journalctl -u keepalived  | grep Quorum
+ Feb 07 20:13:04 keepalived-debug Keepalived_vrrp[3346]: Quorum lost for 
tracked process track_nginx
+ Feb 07 20:19:58 keepalived-debug Keepalived_vrrp[3346]: Quorum gained for 
tracked process track_nginx
+ Feb 07 20:21:39 keepalived-debug Keepalived_vrrp[3346]: Quorum lost for 
tracked process track_nginx
+ 
+ # start nginx process forcing its PID to be > 32767
+ $ echo 32767 > /proc/sys/kernel/ns_last_pid; systemctl start nginx
+ $ pidof nginx
+ 32773 32772
+ 
+ # quorum is not gained again
+ $ journalctl -u keepalived  | grep Quorum
+ Feb 07 20:13:04 keepalived-debug Keepalived_vrrp[3346]: Quorum lost for 
tracked process track_nginx
+ Feb 07 20:19:58 keepalived-debug Keepalived_vrrp[3346]: Quorum gained for 
tracked process track_nginx
+ Feb 07 20:21:39 keepalived-debug Keepalived_vrrp[3346]: Quorum lost for 
tracked process track_nginx
+ 
+ 
+ [Where problems could occur]
+ 
+ The upstream fix is quite straightforward but if a problem would occur
+ it would be manifested in any tracking process feature in keepalived.
+ Since keepalived is widely used in HA, this might be reflected in some
+ specific setups using keepalived.
+ 
+ [Original description]
+ 
  Keepalived doesn't regain quorum when using tracked process due to a bug in 
high numbered pids
  The upstream has already fixed in a patch release 2.0.20
  
  https://serverfault.com/questions/993432/keepalived-doesnt-gain-quorum-
  when-tracked-process-comes-up
  
  Could we please get the 2.0.20 released to 20.04

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1960036

Title:
  [SRU] Doesn't regain quorum when tracked process restarts with PID >
  32767

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/keepalived/+bug/1960036/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to