Public bug reported:

I have 2 systemd-nspawn containers running on an ubuntu 18.04 server used for 
an internal test automation service.
They each use a private network using the nethork-veth option and expose a 
single port.
The host system runs nginx and routes traffic to the two containers.

After running apt upgrade the container ports were no longer reachable
from the outside causing the server to repond with HTTP 502 bad gateway
on the host.

To resolve the situation I had to restart the two containers running:
- machinectl stop helvetest-prod
- machinectl start helvetest-prod
- machinestl stop helvetest-dev
- machinectl start helvetest-dev

Everything was fine after that.

The two containers are run as instances of the built-in systemd-nspawn@ service.
I use the following nspawn configuration:


root@helvetest:/etc/systemd/nspawn# ls -lrth
total 8.0K
-rw-r--r-- 1 root root 92 Apr 11 07:09 helvetest-dev.nspawn
-rw-r--r-- 1 root root 92 Apr 12 11:34 helvetest-prod.nspawn


root@helvetest:/etc/systemd/nspawn# cat helvetest-prod.nspawn 
[Files]
BindReadOnly=/etc/systemd/network

[Network]
VirtualEthernet=yes
Port=tcp:6640:6640


root@helvetest:/etc/systemd/nspawn# cat helvetest-dev.nspawn 
[Files]
BindReadOnly=/etc/systemd/network

[Network]
VirtualEthernet=yes
Port=tcp:5540:5540


Host details

# lsb_release -rd
Description:    Ubuntu Bionic Beaver (development branch)
Release:        18.04

Partial apt upgrade logs

Preparing to unpack .../libnss-systemd_237-3ubuntu8_amd64.deb ...
Unpacking libnss-systemd:amd64 (237-3ubuntu8) over (237-3ubuntu7) ...
Preparing to unpack .../libnss-mymachines_237-3ubuntu8_amd64.deb ...
Unpacking libnss-mymachines:amd64 (237-3ubuntu8) over (237-3ubuntu7) ...
Preparing to unpack .../systemd-container_237-3ubuntu8_amd64.deb ...
Unpacking systemd-container (237-3ubuntu8) over (237-3ubuntu7) ...
Preparing to unpack .../libsystemd0_237-3ubuntu8_amd64.deb ...
Unpacking libsystemd0:amd64 (237-3ubuntu8) over (237-3ubuntu7) ...
Setting up libsystemd0:amd64 (237-3ubuntu8) ...

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: systemd-container 237-3ubuntu8
ProcVersionSignature: Ubuntu 4.15.0-13.14-generic 4.15.10
Uname: Linux 4.15.0-13-generic x86_64
ApportVersion: 2.20.9-0ubuntu4
Architecture: amd64
Date: Mon Apr 16 08:53:20 2018
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: Confirmed


** Tags: amd64 apport-bug bionic uec-images

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1764338

Title:
  systemd-nspawn container networking lost after systemd-container
  upgrade

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  I have 2 systemd-nspawn containers running on an ubuntu 18.04 server used for 
an internal test automation service.
  They each use a private network using the nethork-veth option and expose a 
single port.
  The host system runs nginx and routes traffic to the two containers.

  After running apt upgrade the container ports were no longer reachable
  from the outside causing the server to repond with HTTP 502 bad
  gateway on the host.

  To resolve the situation I had to restart the two containers running:
  - machinectl stop helvetest-prod
  - machinectl start helvetest-prod
  - machinestl stop helvetest-dev
  - machinectl start helvetest-dev

  Everything was fine after that.

  The two containers are run as instances of the built-in systemd-nspawn@ 
service.
  I use the following nspawn configuration:

  
  root@helvetest:/etc/systemd/nspawn# ls -lrth
  total 8.0K
  -rw-r--r-- 1 root root 92 Apr 11 07:09 helvetest-dev.nspawn
  -rw-r--r-- 1 root root 92 Apr 12 11:34 helvetest-prod.nspawn

  
  root@helvetest:/etc/systemd/nspawn# cat helvetest-prod.nspawn 
  [Files]
  BindReadOnly=/etc/systemd/network

  [Network]
  VirtualEthernet=yes
  Port=tcp:6640:6640

  
  root@helvetest:/etc/systemd/nspawn# cat helvetest-dev.nspawn 
  [Files]
  BindReadOnly=/etc/systemd/network

  [Network]
  VirtualEthernet=yes
  Port=tcp:5540:5540

  
  Host details

  # lsb_release -rd
  Description:  Ubuntu Bionic Beaver (development branch)
  Release:      18.04

  Partial apt upgrade logs

  Preparing to unpack .../libnss-systemd_237-3ubuntu8_amd64.deb ...
  Unpacking libnss-systemd:amd64 (237-3ubuntu8) over (237-3ubuntu7) ...
  Preparing to unpack .../libnss-mymachines_237-3ubuntu8_amd64.deb ...
  Unpacking libnss-mymachines:amd64 (237-3ubuntu8) over (237-3ubuntu7) ...
  Preparing to unpack .../systemd-container_237-3ubuntu8_amd64.deb ...
  Unpacking systemd-container (237-3ubuntu8) over (237-3ubuntu7) ...
  Preparing to unpack .../libsystemd0_237-3ubuntu8_amd64.deb ...
  Unpacking libsystemd0:amd64 (237-3ubuntu8) over (237-3ubuntu7) ...
  Setting up libsystemd0:amd64 (237-3ubuntu8) ...

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: systemd-container 237-3ubuntu8
  ProcVersionSignature: Ubuntu 4.15.0-13.14-generic 4.15.10
  Uname: Linux 4.15.0-13-generic x86_64
  ApportVersion: 2.20.9-0ubuntu4
  Architecture: amd64
  Date: Mon Apr 16 08:53:20 2018
  SourcePackage: systemd
  UpgradeStatus: No upgrade log present (probably fresh install)

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to