** Description changed: - The launch script for ipvsadm has a bug that prevents LVS from start in - synchronization mode. + [Impact] + + * the init script has an argument twice, which makes the service fail to + start + + * Without the fix the service is rather unusable as it can't be started + + [Test Case] + + * Needs a VM (no container) + $ sudo apt install ipvsadm + $ echo 'AUTO="true"' | sudo tee -a /etc/default/ipvsadm + $ echo 'DAEMON="master"' | sudo tee -a /etc/default/ipvsadm + $ sudo systemctl restart ipvsadm + $ systemctl status ipvsadm + + With the bug this will show the sevrice failing + [...] + Try `/sbin/ipvsadm -h' or '/sbin/ipvsadm --help' for more information. + ...fail! + + + [Regression Potential] + + * Even in the default config (just enabling it to run) this doesn't work. + Hence the risk should be next to none. + I can think of setups that "are meant to work" , but so far "didn't + start" now properly would start. For example if someone + configured the service but ignored that it failed to start. + I hope and expect that this is a rather unimportant risk, it actually + is the fix we are intending to make. + + [Other Info] + + * TBH it is in main for a dependency from keepalive but I wonder how much + that could be a sugegsts instead. But that is for the future. + + --- + + + The launch script for ipvsadm has a bug that prevents LVS from start in synchronization mode. How to reproduce. 1. Install ipvsadm on ubuntu server 16.04 and modify /etc/default/ipvsadm to lauch LVS in master mode (or backup): AUTO="true" DAEMON="master" - IFACE="eno1" + IFACE="eno1" SYNCID="0" - 2. Start "ipvsadm" service and check systemd unit log: + 2. Start "ipvsadm" service and check systemd unit log: # systemctl start ipvsadm - # journalctl -u ipvsadm + # journalctl -u ipvsadm What you expected to happen The log output without error: May 22 12:41:46 xxxxxxxxxxx systemd[1]: Starting LSB: ipvsadm daemon... May 22 12:41:46 xxxxxxxxxxx ipvsadm[4619]: * Clearing the current IPVS table... May 22 12:41:46 xxxxxxxxxxx ipvsadm[4619]: ...done. May 22 12:41:46 xxxxxxxxxxx ipvsadm[4619]: * Loading IPVS configuration... May 22 12:41:46 xxxxxxxxxxx ipvsadm[4619]: ...done. May 22 12:41:46 xxxxxxxxxxx ipvsadm[4619]: * Starting IPVS Connection Synchronization Daemon master May 22 12:41:46 xxxxxxxxxxx ipvsadm[4619]: ...done. - May 22 12:41:46 xxxxxxxxxxx systemd[1]: Started LSB: ipvsadm daemon. + May 22 12:41:46 xxxxxxxxxxx systemd[1]: Started LSB: ipvsadm daemon. - What happened instead: + What happened instead: May 22 12:32:59 xxxxxxx systemd[1]: Starting LSB: ipvsadm daemon... May 22 12:32:59 xxxxxxx ipvsadm[15743]: * Clearing the current IPVS table... May 22 12:32:59 xxxxxxx ipvsadm[15743]: ...done. May 22 12:32:59 xxxxxxx ipvsadm[15743]: * Loading IPVS configuration... May 22 12:32:59 xxxxxxx ipvsadm[15743]: ...done. May 22 12:32:59 xxxxxxx ipvsadm[15743]: * Starting IPVS Connection Synchronization Daemon master May 22 12:32:59 xxxxxxx ipvsadm[15743]: Try `/sbin/ipvsadm -h' or '/sbin/ipvsadm --help' for more information. May 22 12:32:59 xxxxxxx ipvsadm[15743]: ...fail! May 22 12:32:59 xxxxxxx ipvsadm[15743]: ...done. May 22 12:32:59 xxxxxxx systemd[1]: Started LSB: ipvsadm daemon. As you can see in log output, there is an message: "Try `/sbin/ipvsadm -h' or '/sbin/ipvsadm --help' for more information". This message relates to bug in script /etc/init.d/ipvsadm. Here a difference how script should be updated to get it work: --- /etc/init.d/ipvsadm 2019-05-22 12:41:34.429916226 +0000 +++ /root/ipvsadm 2019-05-22 11:18:04.307344255 +0000 @@ -29,16 +29,16 @@ - case $DAEMON in - master|backup) - log_daemon_msg "Starting IPVS Connection Synchronization Daemon" "$DAEMON" + case $DAEMON in + master|backup) + log_daemon_msg "Starting IPVS Connection Synchronization Daemon" "$DAEMON" - $IPVSADM --start-daemon $DAEMON --mcast-interface \ + $IPVSADM --syncid $SYNCID --start-daemon $DAEMON --mcast-interface \ - $IFACE --syncid $SYNCID || log_end_msg 1 - log_end_msg 0 - ;; - both) - log_daemon_msg "Starting IPVS Connection Synchronization Daemon" "master" + $IFACE --syncid $SYNCID || log_end_msg 1 + log_end_msg 0 + ;; + both) + log_daemon_msg "Starting IPVS Connection Synchronization Daemon" "master" - $IPVSADM --start-daemon master --mcast-interface \ + $IPVSADM --syncid $SYNCID --start-daemon master --mcast-interface \ - $IFACE --syncid $SYNCID || FAILURE=1 - log_progress_msg "backup" + $IFACE --syncid $SYNCID || FAILURE=1 + log_progress_msg "backup" - $IPVSADM --start-daemon backup --mcast-interface \ + $IPVSADM --syncid $SYNCID --start-daemon backup --mcast-interface \ - $IFACE --syncid $SYNCID || FAILURE=1 - if [ "$FAILURE" -eq 1 ] - then - + $IFACE --syncid $SYNCID || FAILURE=1 + if [ "$FAILURE" -eq 1 ] + then /root/ipvsadm - this is an original script from ipvsadm package - # lsb_release -rd Description: Ubuntu 16.04.6 LTS Release: 16.04 # apt-cache policy ipvsadm ipvsadm: - Installed: 1:1.28-3 - Candidate: 1:1.28-3 - Version table: - *** 1:1.28-3 500 - 500 http://nl.archive.ubuntu.com/ubuntu xenial/main amd64 Packages - 100 /var/lib/dpkg/status + Installed: 1:1.28-3 + Candidate: 1:1.28-3 + Version table: + *** 1:1.28-3 500 + 500 http://nl.archive.ubuntu.com/ubuntu xenial/main amd64 Packages + 100 /var/lib/dpkg/status
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1830033 Title: Connection synchronization daemon fails at start due to a bug in launch script To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ipvsadm/+bug/1830033/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs