Comment 12 for bug 1930203

Revision history for this message
Rafael Lopez (rafael.lopez) wrote :

Have verified that the -proposed package fixes the bug, details below.

### launch focal vm, install tang
lxc launch ubuntu:focal tangtest --vm
(ssh to vm)
sudo apt update
sudo apt upgrade
sudo apt install tang
systemctl status tangd.socket (active, enabled)

### confirm issue - rebooted vm until tang did not start, check logs for systemd job deleted messages
ubuntu@tangtest:~$ sudo systemctl status tangd.socket
● tangd.socket - Tang Server socket
     Loaded: loaded (/lib/systemd/system/tangd.socket; enabled; vendor preset: enabled)
     Active: inactive (dead)
     Listen: [::]:80 (Stream)
   Accepted: 0; Connected: 0;
ubuntu@tangtest:~$
ubuntu@tangtest:~$ grep 'Job' /var/log/syslog
Jun 5 00:53:24 tangtest kernel: systemd[1]: sockets.target: Job tangd.socket/start deleted to break ordering cycle starting with sockets.target/start
ubuntu@tangtest:~$

### added focal-proposed repository, install proposed tang
ubuntu@tangtest:~$ sudo apt-cache policy tang
tang:
  Installed: 7-1build1
  Candidate: 7-1ubuntu0.1
  Version table:
     7-1ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu focal-proposed/universe amd64 Packages
 *** 7-1build1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

### tested upgrade from pre-enabled state (result - unit is active, enabled and symlinks correct)
ubuntu@tangtest:~$ sudo apt install tang
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  tang
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.5 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/universe amd64 tang amd64 7-1ubuntu0.1 [15.5 kB]
Fetched 15.5 kB in 1s (11.8 kB/s)
(Reading database ... 76087 files and directories currently installed.)
Preparing to unpack .../tang_7-1ubuntu0.1_amd64.deb ...
Unpacking tang (7-1ubuntu0.1) over (7-1build1) ...
Setting up tang (7-1ubuntu0.1) ...
Created symlink /etc/systemd/system/sockets.target.wants/tangd.socket → /lib/systemd/system/tangd.socket.
tangd-keygen.service is a disabled or a static unit not running, not starting it.
tangd-update.service is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.9.1-1) ...
ubuntu@tangtest:~$ sudo systemctl status tangd.socket
● tangd.socket - Tang Server socket
     Loaded: loaded (/lib/systemd/system/tangd.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Mon 2023-06-05 00:58:19 UTC; 15s ago
   Triggers: ● tangd@0.service
     Listen: [::]:80 (Stream)
   Accepted: 0; Connected: 0;
      Tasks: 0 (limit: 1153)
     Memory: 0B
     CGroup: /system.slice/tangd.socket

Jun 05 00:58:19 tangtest systemd[1]: Listening on Tang Server socket.
ubuntu@tangtest:~$ ls -l /etc/systemd/system/multi-user.target.wants/tangd.socket
ls: cannot access '/etc/systemd/system/multi-user.target.wants/tangd.socket': No such file or directory
ubuntu@tangtest:~$ ls -l /etc/systemd/system/sockets.target.wants/tangd.socket
lrwxrwxrwx 1 root root 32 Jun 5 00:58 /etc/systemd/system/sockets.target.wants/tangd.socket -> /lib/systemd/system/tangd.socket
ubuntu@tangtest:~$

### reboot, checked unit status and logs (result - unit active, enabled and no job cancelled entries)
ubuntu@tangtest:~$ systemctl status tangd.socket
● tangd.socket - Tang Server socket
     Loaded: loaded (/lib/systemd/system/tangd.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Mon 2023-06-05 01:07:26 UTC; 2min 1s ago
   Triggers: ● tangd@0.service
     Listen: [::]:80 (Stream)
   Accepted: 0; Connected: 0;
      Tasks: 0 (limit: 1153)
     Memory: 0B
     CGroup: /system.slice/tangd.socket

Jun 05 01:07:26 tangtest systemd[1]: Listening on Tang Server socket.
ubuntu@tangtest:~$
ubuntu@tangtest:~$ grep 'Job' /var/log/syslog
Jun 5 00:53:24 tangtest kernel: systemd[1]: sockets.target: Job tangd.socket/start deleted to break ordering cycle starting with sockets.target/start
ubuntu@tangtest:~$
(only old job deleted entry from pre-upgrade version)

### test upgrade from pre-disabled state (result - unit active, disabled and symlinks correctly missing)
ubuntu@tangtest:~$ sudo systemctl status tangd.socket
● tangd.socket - Tang Server socket
     Loaded: loaded (/lib/systemd/system/tangd.socket; disabled; vendor preset: enabled)
     Active: active (listening) since Mon 2023-06-05 01:13:12 UTC; 25s ago
     Listen: [::]:80 (Stream)
   Accepted: 0; Connected: 0;
      Tasks: 0 (limit: 1153)
     Memory: 52.0K
     CGroup: /system.slice/tangd.socket

Jun 05 01:13:12 tangtest systemd[1]: Listening on Tang Server socket.
ubuntu@tangtest:~$ sudo apt install tang
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  tang
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.5 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/universe amd64 tang amd64 7-1ubuntu0.1 [15.5 kB]
Fetched 15.5 kB in 1s (14.0 kB/s)
(Reading database ... 76087 files and directories currently installed.)
Preparing to unpack .../tang_7-1ubuntu0.1_amd64.deb ...
Unpacking tang (7-1ubuntu0.1) over (7-1build1) ...
Setting up tang (7-1ubuntu0.1) ...
tangd-keygen.service is a disabled or a static unit not running, not starting it.
tangd-update.service is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.9.1-1) ...
ubuntu@tangtest:~$ sudo systemctl status tangd.socket
● tangd.socket - Tang Server socket
     Loaded: loaded (/lib/systemd/system/tangd.socket; disabled; vendor preset: enabled)
     Active: active (listening) since Mon 2023-06-05 01:14:03 UTC; 6s ago
   Triggers: ● tangd@0.service
     Listen: [::]:80 (Stream)
   Accepted: 0; Connected: 0;
      Tasks: 0 (limit: 1153)
     Memory: 0B
     CGroup: /system.slice/tangd.socket

Jun 05 01:14:03 tangtest systemd[1]: Listening on Tang Server socket.
ubuntu@tangtest:~$ ls -l /etc/systemd/system/multi-user.target.wants/tangd.socket
ls: cannot access '/etc/systemd/system/multi-user.target.wants/tangd.socket': No such file or directory
ubuntu@tangtest:~$ ls -l /etc/systemd/system/sockets.target.wants/tangd.socket
ls: cannot access '/etc/systemd/system/sockets.target.wants/tangd.socket': No such file or directory
ubuntu@tangtest:~$

### reboot, check unit does not start when disabled
ubuntu@tangtest:~$ sudo systemctl status tangd.socket
● tangd.socket - Tang Server socket
     Loaded: loaded (/lib/systemd/system/tangd.socket; disabled; vendor preset: enabled)
     Active: inactive (dead)
     Listen: [::]:80 (Stream)
   Accepted: 0; Connected: 0;
ubuntu@tangtest:~$

### install tang fresh from -proposed (result - unit active, enabled, symlinks correct)
ubuntu@tangtest:~$ sudo apt install tang
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  tang
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.5 kB of archives.
After this operation, 67.6 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/universe amd64 tang amd64 7-1ubuntu0.1 [15.5 kB]
Fetched 15.5 kB in 1s (18.1 kB/s)
Selecting previously unselected package tang.
(Reading database ... 76073 files and directories currently installed.)
Preparing to unpack .../tang_7-1ubuntu0.1_amd64.deb ...
Unpacking tang (7-1ubuntu0.1) ...
Setting up tang (7-1ubuntu0.1) ...
Created symlink /etc/systemd/system/sockets.target.wants/tangd.socket → /lib/systemd/system/tangd.socket.
tangd-keygen.service is a disabled or a static unit, not starting it.
tangd-update.path is a disabled or a static unit, not starting it.
tangd-update.service is a disabled or a static unit, not starting it.
Processing triggers for man-db (2.9.1-1) ...
ubuntu@tangtest:~$ sudo systemctl status tang
Unit tang.service could not be found.
ubuntu@tangtest:~$ sudo systemctl status tangd.socket
● tangd.socket - Tang Server socket
     Loaded: loaded (/lib/systemd/system/tangd.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Mon 2023-06-05 02:04:00 UTC; 6s ago
   Triggers: ● tangd@0.service
     Listen: [::]:80 (Stream)
   Accepted: 0; Connected: 0;
      Tasks: 0 (limit: 1153)
     Memory: 0B
     CGroup: /system.slice/tangd.socket

Jun 05 02:04:00 tangtest systemd[1]: Listening on Tang Server socket.
ubuntu@tangtest:~$ ls -l /etc/systemd/system/sockets.target.wants/tangd.socket
lrwxrwxrwx 1 root root 32 Jun 5 02:03 /etc/systemd/system/sockets.target.wants/tangd.socket -> /lib/systemd/system/tangd.socket
ubuntu@tangtest:~$ ls -l /etc/systemd/system/multi-user.target.wants/tangd.socket
ls: cannot access '/etc/systemd/system/multi-user.target.wants/tangd.socket': No such file or directory
ubuntu@tangtest:~$