[Ubuntu-ha] [Bug 1810583] Re: Daily cron restarts network on unattended updates but keepalived .service is not restarted as a dependency

2019-03-20 Thread Karl Stenerud
There is a fix upstream for this issue in keepalived 2.0. I'm looking
into what would be required to backport the fix. In the meantime, there
is a workaround that I hope will be sufficient for your needs, as
discovered by https://chr4.org/blog/2019/01/21/make-keepalived-play-
nicely-with-netplan-slash-systemd-network/

You'll need to create a dummy interface, and then assign the virtual IP
to that. Here's an example using a VM, which will generate a virtual ip
of x.y.z.3. You can set your own last quad by changing the last part of
the sed command '\1.3/g' to .4 or .215 or whatever:

multipass launch daily:bionic --name tester && multipass exec tester --
sudo su

Inside the VM:

apt update && apt dist-upgrade -y && apt install -y keepalived &&
echo "vrrp_instance VI_1 {
virtual_router_id 33
state MASTER
interface ens3

virtual_ipaddress {
$(ip addr | grep 'inet ' | grep global | head -1 | sed 's/.*inet 
\([0-9]*\.[0-9]*\.[0-9]*\)\..*/\1.3/g') dev keepalived0
}
}" >/etc/keepalived/keepalived.conf &&
echo "[NetDev]
Name=keepalived0
Kind=dummy" >/lib/systemd/network/90-keepalived.netdev &&
service systemd-networkd restart &&
service keepalived start

# There will be a new IP address x.y.z.3/32 added to keepalived0
ip addr

# Restart networkd. The IP address doesn't get destroyed like it did in the bug 
report
systemctl restart systemd-networkd
ip addr

# Restart keepalived. The IP address gets rebuild the same as before
systemctl restart keepalived
ip addr

-- 
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to keepalived in Ubuntu.
https://bugs.launchpad.net/bugs/1810583

Title:
  Daily cron restarts network on unattended updates but keepalived
  .service is not restarted as a dependency

Status in keepalived package in Ubuntu:
  Triaged
Status in networkd-dispatcher package in Ubuntu:
  Invalid

Bug description:
  [Impact]

  If systemd-networkd is restarted, any VRRP from keepalived are not
  restored.

  [Test Case]

  multipass launch daily:bionic --name tester && multipass exec tester
  -- sudo su

  apt update && apt dist-upgrade -y && apt install -y keepalived &&
  echo "vrrp_instance VI_1 {
  virtual_router_id 33
  state MASTER
  interface ens3

  virtual_ipaddress {
  $(ip addr | grep 'inet ' | grep global | head -1 | sed 's/.*inet 
\([0-9]*\.[0-9]*\.[0-9]*\)\..*/\1.3/g')
  }
  }" >/etc/keepalived/keepalived.conf &&
  service keepalived start &&

  # There will be a new IP address x.x.x.3/32 added to ens3
  ip addr

  # Restart networkd. The IP address won't come back
  systemctl restart systemd-networkd
  ip addr

  # Restart keepalived. The IP address will come back
  systemctl restart keepalived
  ip addr

  [Regression Potential]

  TODO

  [Original Description]

  Description: Ubuntu 18.04.1 LTS
  Release: 18.04
  ii keepalived 1:1.3.9-1ubuntu0.18.04.1 amd64 Failover and monitoring daemon 
for LVS clusters

  (From unanswered
  https://answers.launchpad.net/ubuntu/+source/keepalived/+question/676267)

  Since two weeks we lost our keepalived VRRP address on on our of
  systems, closer inspection reveals that this was due to the daily
  cronjob.Apparently something triggered a udev reload (and last week
  the same seemed to happen) which obviously triggers a network restart.

  Are we right in assuming the below patch is the correct way (and
  shouldn't this be in the default install of the systemd service of
  keepalived).

  /etc/systemd/system/multi-user.target.wants/keepalived.service:
  --- keepalived.service.orig 2018-11-20 09:17:06.973924706 +0100
  +++ keepalived.service 2018-11-20 09:05:55.984773226 +0100
  @@ -4,6 +4,7 @@
   Wants=network-online.target
   # Only start if there is a configuration file
   ConditionFileNotEmpty=/etc/keepalived/keepalived.conf
  +PartOf=systemd-networkd.service

  Accompanying syslog:
  Nov 20 06:34:33 ourmachine systemd[1]: Starting Daily apt upgrade and clean 
activities...
  Nov 20 06:34:42 ourmachine systemd[1]: Reloading.
  Nov 20 06:34:44 ourmachine systemd[1]: message repeated 2 times: [ Reloading.]
  Nov 20 06:34:44 ourmachine systemd[1]: Starting Daily apt download 
activities...
  Nov 20 06:34:44 ourmachine systemd[1]: Stopping udev Kernel Device Manager...
  Nov 20 06:34:44 ourmachine systemd[1]: Stopped udev Kernel Device Manager.
  Nov 20 06:34:44 ourmachine systemd[1]: Starting udev Kernel Device Manager...
  Nov 20 06:34:44 ourmachine systemd[1]: Started udev Kernel Device Manager.
  Nov 20 06:34:45 ourmachine systemd[1]: Reloading.
  Nov 20 06:34:45 ourmachine systemd[1]: Reloading.
  Nov 20 06:35:13 ourmachine systemd[1]: Reexecuting.
  Nov 20 06:35:13 ourmachine systemd[1]: Stopped Wait for Network to be 
Configured.
  Nov 20 06:35:13 ourmachine systemd[1]: Stopping Wait for Network to be 
Configured...
  Nov 20 06:35:13 ourmachine systemd[1]: Stopping Network Service..

To manage notifications about this bug go to:

[Ubuntu-ha] [Bug 1677684] Re: /usr/bin/corosync-blackbox: 34: /usr/bin/corosync-blackbox: qb-blackbox: not found

2019-03-20 Thread Dan Streetman
** Tags removed: sts-sponsor

-- 
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to corosync in Ubuntu.
https://bugs.launchpad.net/bugs/1677684

Title:
  /usr/bin/corosync-blackbox: 34: /usr/bin/corosync-blackbox: qb-
  blackbox: not found

Status in corosync package in Ubuntu:
  Incomplete
Status in corosync source package in Trusty:
  Incomplete
Status in corosync source package in Xenial:
  Incomplete
Status in corosync source package in Zesty:
  Incomplete

Bug description:
  [Environment]

  Ubuntu Xenial 16.04
  Amd64

  [Test Case]

  1) sudo apt-get install corosync
  2) sudo corosync-blackbox.

  root@juju-niedbalski-xenial-machine-5:/home/ubuntu# dpkg -L corosync |grep 
black
  /usr/bin/corosync-blackbox

  Expected results: corosync-blackbox runs OK.

  Current results:

  $ sudo corosync-blackbox
  /usr/bin/corosync-blackbox: 34: /usr/bin/corosync-blackbox: qb-blackbox: not 
found

  [Impact]

   * Cannot run corosync-blackbox

  [Regression Potential]

  * None identified.

  [Fix]
  Make the package dependant of libqb-dev

  root@juju-niedbalski-xenial-machine-5:/home/ubuntu# dpkg -L libqb-dev | grep 
qb-bl
  /usr/sbin/qb-blackbox

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

___
Mailing list: https://launchpad.net/~ubuntu-ha
Post to : ubuntu-ha@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-ha] [Bug 1819046] Re: Systemd unit file reads settings from wrong path

2019-03-20 Thread Dan Streetman
** Tags removed: sts-sponsor sts-sponsor-ddstreet

-- 
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to pacemaker in Ubuntu.
https://bugs.launchpad.net/bugs/1819046

Title:
  Systemd unit file reads settings from wrong path

Status in pacemaker package in Ubuntu:
  Fix Released
Status in pacemaker source package in Xenial:
  Fix Committed

Bug description:
  [Impact]
  Systemd Unit file doesn't read any settings by default

  [Description]
  The unit file shipped with the Xenial pacemaker package tries to read 
environment settings from /etc/sysconfig/ instead of /etc/default/. The result 
is that settings defined in /etc/default/pacemaker are not effective.
  Since the /etc/default/pacemaker file is created with default values when the 
pacemaker package is installed, we should source that in the systemd unit file.

  [Test Case]
  1) Deploy a Xenial container:
  $ lxc launch ubuntu:xenial pacemaker
  2) Update container and install pacemaker:
  root@pacemaker:~# apt update && apt install pacemaker -y
  3) Change default pacemaker log location:
  root@pacemaker:~# echo "PCMK_logfile=/tmp/pacemaker.log" >> 
/etc/default/pacemaker
  4) Restart pacemaker service and verify that log file exists:
  root@pacemaker:~# systemctl restart pacemaker.service
  root@pacemaker:~# ls -l /tmp/pacemaker.log
  ls: cannot access '/tmp/pacemaker.log': No such file or directory

  After fixing the systemd unit, changes to /etc/default/pacemaker get picked 
up correctly:
  root@pacemaker:~# ls -l /tmp/pacemaker.log
  -rw-rw 1 hacluster haclient 27335 Mar  7 20:46 /tmp/pacemaker.log

  
  [Regression Potential]
  The regression potential for this should be very low, since the configuration 
file is already being created by default and other systemd unit files are using 
the /etc/default config. In case the file doesn't exist or the user removed it, 
the "-" prefix will gracefully ignore the missing file according to the 
systemd.exec manual [0].
  Nonetheless, the new package will be tested with autopkgtests and the fix 
will be validated in a reproduction environment.

  [0] https://www.freedesktop.org/software/systemd/man/systemd.exec.html

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

___
Mailing list: https://launchpad.net/~ubuntu-ha
Post to : ubuntu-ha@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help   : https://help.launchpad.net/ListHelp