FRR deb packaging regression

Bug #1991812 reported by Alessandro Ratti
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
frr (Ubuntu)
Fix Released
High
Andreas Hasenack
Focal
Fix Released
Undecided
Andreas Hasenack
Jammy
Fix Released
Undecided
Andreas Hasenack
Kinetic
Fix Released
Undecided
Andreas Hasenack

Bug Description

[ Impact ]
Due to the previous frr bug #1958162, or perhaps other reasons, some users might have chosen to handle frr logging in a different way. If that change includes removing the syslog user from the system, then the current frr package will have a failure in postinst when it tries to adjust the ownership of log files to this syslog user.

The fix here is to gate that postinst chown action on the existence of the syslog user. If this user does not exist, we assume that this system is handling logging in some other way and won't attempt to change ownership of logfiles to syslog.

The added change is a valid sanity check, and is minimal in nature in the sense that it doesn't try to further complicate the logging adjustments in postinst. It should have been done in the previous change, but it was thought to be a corner case to not have the syslog user installed. Turns out it's quite possible and doable. One could argue it's still an exceptional case, but since the consequences are really bad (package fails to install), it's worth it fixing.

[ Test Plan ]
The test plan is a bit destructive, as it includes removing the syslog user.

a) Specific test for this bug
# remove rsyslog
sudo apt update && sudo apt remove rsyslog -y

# remove the syslog user
sudo userdel syslog

# install frr
# without the fix, the installation will fail:
sudo apt install frr -y
(...)
Adding new user `frr' (UID 103) with group `frr' ...
Not creating home directory `/nonexistent'.
chown: invalid user: ‘syslog:adm’
(...)

Installing the fixed package will work.

b) Regression test
Let's also make sure we are not regressing bug #1958162.

b1) Upgrade
# On a fresh system, install frr from updates (i.e., not the version from proposed):

sudo apt update && sudo apt install frr -y

# restart frr to trigger some logging
sudo systemctl restart frr

ls -lah /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.4K Oct 28 17:41 /var/log/frr/frr.log

Now upgrade to the package in proposed and repeat the steps above (restart and check for updates in the log file):

$ sudo systemctl restart frr
$ l /var/log/frr/frr.log
-rw-r----- 1 syslog adm 2.8K Oct 28 17:43 /var/log/frr/frr.log

b2) Fresh install of proposed package
# On a fresh system, install frr from *proposed*:

sudo apt update && sudo apt install frr -y

# restart frr to trigger some logging
sudo systemctl restart frr

$ l /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.4K Oct 28 17:45 /var/log/frr/frr.log

[ Where problems could occur ]
We are now *not* taking action if the syslog user does not exist. That user not existing is a strong indication of local user changes, and this is probably the safest action. There is no guarantee that frr logging will be working in this case.

There might still be other ways out there users figured to adjust the logging of frr. Trying to cope with all of them can quickly become a complicated rabbit hole. We need to have the default install of ubuntu working well, and not break users who have added their own customizations.

[ Other Info ]
None at this time.

[Original Description]

Ubuntu released a few weeks ago version 7.2.1-1ubuntu0.1 of Frr for Focal.
It's a minor change that attempts to fix a permission issue due to the inability of rsyslog to write within /var/log/frr, owned by the user frr, whereas the user syslog own's the rsyslog's process.
In our setup, we replaced rsyslog with syslog-ng, whose process runs as root and we removed the user syslog.

The new Frr package fails the postinstall script while performing the chown of the /var/log/frr and its content, breaking apt and leaving the package half installed.
When our config mgmt system tries to fix the issue, it fails because apt returns a non-zero code and doesn't apply the configuration needed by Frr to work correctly.

This issue is valid not only for Focal but also for Ubuntu Jammy.

Related branches

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

At first glance, I suspect the simplest fix here is to check if the syslog user exists, before attempting to change ownership, and if that user does not exist, do nothing, assuming the local administrator handled it already in some other way.

Changed in frr (Ubuntu):
status: New → Triaged
importance: Undecided → High
tags: added: server-todo
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Alessandro, I suppose a workaround for your case would be to create the syslog user?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@Andreas - in addition we could try to create user syslog in postinst if not existing or check and behave differently if it is not existing - WDYT?

Revision history for this message
Alessandro Ratti (lord2y) wrote :

Andreas, this is something I've considered; however, I'd prefer adding to the postinstall script an if/else condition to skip the chown if the user syslog is not present.

Revision history for this message
Alessandro Ratti (lord2y) wrote :

Andreas, I attached a patch that should fix the issue.
I tried with Focal, either with or without the syslog user, and it works.
Let me know what you guys think.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I'm not sure... If the syslog user isn't present, that's a good sign that this installation was already modified somewhat by the admin, and us chowning the log files to syslog in postinst might be the wrong thing to do in that case.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

> Andreas, this is something I've considered; however, I'd prefer adding to the postinstall script an if/else condition to skip the chown if the user syslog is not present.

Sure, I meant as a workaround until the package is fixed, because right now, as you said, it's in a failed install state.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-attempt-to-fix-LP-1991812.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in frr (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: Triaged → In Progress
description: updated
Changed in frr (Ubuntu Focal):
status: New → Incomplete
status: Incomplete → In Progress
Changed in frr (Ubuntu Jammy):
status: New → In Progress
Changed in frr (Ubuntu Kinetic):
status: New → In Progress
Changed in frr (Ubuntu Focal):
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in frr (Ubuntu Jammy):
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in frr (Ubuntu Kinetic):
assignee: nobody → Andreas Hasenack (ahasenack)
description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

waiting for it to migrate in -devel before SRU

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package frr - 8.1-1ubuntu4

---------------
frr (8.1-1ubuntu4) lunar; urgency=medium

  * d/frr.postinst: don't change log ownership if the syslog user
    doesn't exist. Thanks to Alessandro Ratti
    <email address hidden> for the fix (LP: #1991812).

 -- Andreas Hasenack <email address hidden> Fri, 28 Oct 2022 11:35:27 -0300

Changed in frr (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Kinetic uploaded:
Uploading frr_8.1-1ubuntu3.1.dsc
Uploading frr_8.1-1ubuntu3.1.debian.tar.xz
Uploading frr_8.1-1ubuntu3.1_source.buildinfo
Uploading frr_8.1-1ubuntu3.1_source.changes

Jammy uploaded:
Uploading frr_8.1-1ubuntu1.3.dsc
Uploading frr_8.1-1ubuntu1.3.debian.tar.xz
Uploading frr_8.1-1ubuntu1.3_source.buildinfo
Uploading frr_8.1-1ubuntu1.3_source.changes

Focal uploaded:
Uploading frr_7.2.1-1ubuntu0.2.dsc
Uploading frr_7.2.1-1ubuntu0.2.debian.tar.xz
Uploading frr_7.2.1-1ubuntu0.2_source.buildinfo
Uploading frr_7.2.1-1ubuntu0.2_source.changes

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Alessandro, or anyone else affected,

Accepted frr into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/frr/8.1-1ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in frr (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in frr (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Alessandro, or anyone else affected,

Accepted frr into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/frr/8.1-1ubuntu1.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Alessandro, or anyone else affected,

Accepted frr into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/frr/7.2.1-1ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in frr (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Kinetic verification

a) Specific test for this bug
Reproducing the failure without the syslog user:

ubuntu@k-frr-packaging-regression:~$ id syslog
id: ‘syslog’: no such user

ubuntu@k-frr-packaging-regression:~$ sudo apt install frr -y
(...)
Adding system user `frr' (UID 103) ...
Adding new user `frr' (UID 103) with group `frr' ...
Not creating home directory `/nonexistent'.
chown: invalid user: ‘syslog:adm’
dpkg: error processing package frr (--configure):
 installed frr package post-installation script subprocess returned error exit status 1
(...)

ubuntu@k-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu3
  Candidate: 8.1-1ubuntu3
  Version table:
 *** 8.1-1ubuntu3 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages
        100 /var/lib/dpkg/status

Installing the package from proposed works:
ubuntu@k-frr-packaging-regression:~$ sudo apt install frr
(...)
Setting up frr (8.1-1ubuntu3.1) ...
addgroup: The group `frrvty' already exists as a system group. Exiting.
addgroup: The group `frr' already exists as a system group. Exiting.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
The system user `frr' already exists. Exiting.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu3.1) ...
Processing triggers for man-db (2.10.2-2) ...
ubuntu@k-frr-packaging-regression:~$

ubuntu@k-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu3.1
  Candidate: 8.1-1ubuntu3.1
  Version table:
 *** 8.1-1ubuntu3.1 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu3 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

And a fresh install of the proposed package in the same scenario works right away:

ubuntu@k-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: (none)
  Candidate: 8.1-1ubuntu3.1
  Version table:
     8.1-1ubuntu3.1 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic-proposed/main amd64 Packages
     8.1-1ubuntu3 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

ubuntu@k-frr-packaging-regression:~$ id syslog
id: ‘syslog’: no such user

ubuntu@k-frr-packaging-regression:~$ sudo apt install frr
(...)
Setting up frr (8.1-1ubuntu3.1) ...
Adding group `frrvty' (GID 110) ...
Done.
Adding group `frr' (GID 116) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 103) ...
Adding new user `frr' (UID 103) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu3.1) ...
Processing triggers for man-db (2.10.2-2) ...
Processing triggers for libc-bin (2.36-0ubuntu4) ...
ubuntu@k-frr-packaging-regression:~$

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Still kinetic verification

b) Regression test

b1) Upgrade

Installed frr from updates:
(...)
Setting up frr (8.1-1ubuntu3) ...
Adding group `frrvty' (GID 116) ...
Done.
Adding group `frr' (GID 121) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 111) ...
Adding new user `frr' (UID 111) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu3) ...
Processing triggers for rsyslog (8.2208.0-1ubuntu2) ...
Processing triggers for man-db (2.10.2-2) ...
Processing triggers for libc-bin (2.36-0ubuntu4) ...

ubuntu@k-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu3
  Candidate: 8.1-1ubuntu3
  Version table:
 *** 8.1-1ubuntu3 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages
        100 /var/lib/dpkg/status

Restarted and we have fresh logs:
ubuntu@k-frr-packaging-regression:~$ sudo systemctl restart frr
ubuntu@k-frr-packaging-regression:~$ ls -lah /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.5K Dec 7 14:44 /var/log/frr/frr.log
ubuntu@k-frr-packaging-regression:~$

Upgrading to frr from proposed:
(...)
Setting up frr (8.1-1ubuntu3.1) ...
addgroup: The group `frrvty' already exists as a system group. Exiting.
addgroup: The group `frr' already exists as a system group. Exiting.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
The system user `frr' already exists. Exiting.
Setting up frr-pythontools (8.1-1ubuntu3.1) ...
Processing triggers for man-db (2.10.2-2) ...
Processing triggers for rsyslog (8.2208.0-1ubuntu2) ...
ubuntu@k-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu3.1
  Candidate: 8.1-1ubuntu3.1
  Version table:
 *** 8.1-1ubuntu3.1 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu3 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

Restart and we have even fresher logs:
ubuntu@k-frr-packaging-regression:~$ sudo systemctl restart frr
ubuntu@k-frr-packaging-regression:~$ l /var/log/frr/frr.log
-rw-r----- 1 syslog adm 3.0K Dec 7 14:45 /var/log/frr/frr.log
ubuntu@k-frr-packaging-regression:~$

Logging keeps working, no regression.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Final kinetic test

b2) Fresh install of proposed package
(...)
Setting up frr (8.1-1ubuntu3.1) ...
Adding group `frrvty' (GID 116) ...
Done.
Adding group `frr' (GID 121) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 111) ...
Adding new user `frr' (UID 111) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu3.1) ...
Processing triggers for rsyslog (8.2208.0-1ubuntu2) ...
Processing triggers for man-db (2.10.2-2) ...
Processing triggers for libc-bin (2.36-0ubuntu4) ...
ubuntu@k-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu3.1
  Candidate: 8.1-1ubuntu3.1
  Version table:
 *** 8.1-1ubuntu3.1 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu3 500
        500 http://br.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

Logging is working fine:
ubuntu@k-frr-packaging-regression:~$ sudo systemctl restart frr

ubuntu@k-frr-packaging-regression:~$ l /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.5K Dec 7 14:49 /var/log/frr/frr.log

Kinetic verification succeeded.

tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Download full text (3.8 KiB)

Jammy verification

a) Specific test for this bug

Reproducing the bug with jammy packages, and no syslog user

ubuntu@j-frr-packaging-regression:~$ id syslog
id: ‘syslog’: no such user

ubuntu@j-frr-packaging-regression:~$ sudo apt install frr -y
(...)
Setting up frr (8.1-1ubuntu1.2) ...
Adding group `frrvty' (GID 111) ...
Done.
Adding group `frr' (GID 116) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 104) ...
Adding new user `frr' (UID 104) with group `frr' ...
Not creating home directory `/nonexistent'.
chown: invalid user: ‘syslog:adm’
dpkg: error processing package frr (--configure):
 installed frr package post-installation script subprocess returned error exit status 1

ubuntu@j-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu1.2
  Candidate: 8.1-1ubuntu1.2
  Version table:
 *** 8.1-1ubuntu1.2 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu1 500
        500 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Updating to the proposed package fixes the installation:
(...)
Preparing to unpack .../frr_8.1-1ubuntu1.3_amd64.deb ...
Unpacking frr (8.1-1ubuntu1.3) over (8.1-1ubuntu1.2) ...
Setting up frr (8.1-1ubuntu1.3) ...
addgroup: The group `frrvty' already exists as a system group. Exiting.
addgroup: The group `frr' already exists as a system group. Exiting.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
The system user `frr' already exists. Exiting.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu1.2) ...
Processing triggers for man-db (2.10.2-1) ...

ubuntu@j-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu1.3
  Candidate: 8.1-1ubuntu1.3
  Version table:
 *** 8.1-1ubuntu1.3 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu1.2 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     8.1-1ubuntu1 500
        500 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Fresh install of the proposed package on a system without the syslog user also works:
ubuntu@j-frr-packaging-regression:~$ id syslog
id: ‘syslog’: no such user
ubuntu@j-frr-packaging-regression:~$ sudo apt install frr -y
(...)
Setting up frr (8.1-1ubuntu1.3) ...
Adding group `frrvty' (GID 111) ...
Done.
Adding group `frr' (GID 116) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 104) ...
Adding new user `frr' (UID 104) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8...

Read more...

Revision history for this message
Alessandro Ratti (lord2y) wrote :

I tested it on my end on Focal:

$ dpkg-query --show frr
frr 7.2.1-1

$ id syslog
id: ‘syslog’: no such user

$ apt-cache policy frr
frr:
  Installed: 7.2.1-1
  Candidate: 7.2.1-1ubuntu0.2
  Version table:
     7.2.1-1ubuntu0.2 500
        500 http://ch.archive.ubuntu.com/ubuntu focal-proposed/universe amd64 Packages
 *** 7.2.1-1 500
        500 http://ch.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

$ sudo apt-get install frr
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  frr-doc
The following packages will be upgraded:
  frr
1 upgraded, 0 newly installed, 0 to remove and 159 not upgraded.
Need to get 2,350 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ch.archive.ubuntu.com/ubuntu focal-proposed/universe amd64 frr amd64 7.2.1-1ubuntu0.2 [2,350 kB]
Fetched 2,350 kB in 0s (75.3 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 100330 files and directories currently installed.)
Preparing to unpack .../frr_7.2.1-1ubuntu0.2_amd64.deb ...
Unpacking frr (7.2.1-1ubuntu0.2) over (7.2.1-1) ...
Setting up frr (7.2.1-1ubuntu0.2) ...
Installing new version of config file /etc/logrotate.d/frr ...
addgroup: The group `frrvty' already exists as a system group. Exiting.
addgroup: The group `frr' already exists as a system group. Exiting.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
The system user `frr' already exists. Exiting.
Processing triggers for systemd (245.4-4ubuntu3.17) ...

It works!
I'll repeat the test on Jammy, but I'm confident it'll work there too.
Thanks @Andreas.

When can I see this uploaded to (focal|jammy)-updates?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

> When can I see this uploaded to (focal|jammy)-updates?

Thanks for the test Alessandro. I'll complete the jammy one soon.

As to when this will be released, it needs to be green in this report: https://people.canonical.com/~ubuntu-archive/pending-sru.html, and have aged 7 days or more.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Still jammy verification

b) Regression test
b1) Upgrade
frr from updates, restart, show logging is working:
(...)
Setting up frr (8.1-1ubuntu1.2) ...
Adding group `frrvty' (GID 116) ...
Done.
Adding group `frr' (GID 121) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 111) ...
Adding new user `frr' (UID 111) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu1.2) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

ubuntu@j-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu1.2
  Candidate: 8.1-1ubuntu1.2
  Version table:
 *** 8.1-1ubuntu1.2 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu1 500
500 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

ubuntu@j-frr-packaging-regression:~$ sudo systemctl restart frr

ubuntu@j-frr-packaging-regression:~$ ls -lah /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.5K Dec 7 20:17 /var/log/frr/frr.log

Update to proposed:
(...)
Setting up frr (8.1-1ubuntu1.3) ...
addgroup: The group `frrvty' already exists as a system group. Exiting.
addgroup: The group `frr' already exists as a system group. Exiting.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
The system user `frr' already exists. Exiting.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...

ubuntu@j-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu1.3
  Candidate: 8.1-1ubuntu1.3
  Version table:
 *** 8.1-1ubuntu1.3 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu1.2 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     8.1-1ubuntu1 500
        500 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Restart and show logging is still working (log file increased size):

ubuntu@j-frr-packaging-regression:~$ sudo systemctl restart frr

ubuntu@j-frr-packaging-regression:~$ ls -lah /var/log/frr/frr.log
-rw-r----- 1 syslog adm 3.0K Dec 7 20:18 /var/log/frr/frr.log

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Still jammy verification

b) Regression test
b1) Upgrade
frr from updates, restart, show logging is working:
(...)
Setting up frr (8.1-1ubuntu1.2) ...
Adding group `frrvty' (GID 116) ...
Done.
Adding group `frr' (GID 121) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 111) ...
Adding new user `frr' (UID 111) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu1.2) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

ubuntu@j-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu1.2
  Candidate: 8.1-1ubuntu1.2
  Version table:
 *** 8.1-1ubuntu1.2 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu1 500
500 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

ubuntu@j-frr-packaging-regression:~$ sudo systemctl restart frr

ubuntu@j-frr-packaging-regression:~$ ls -lah /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.5K Dec 7 20:17 /var/log/frr/frr.log

Update to proposed:
(...)
Setting up frr (8.1-1ubuntu1.3) ...
addgroup: The group `frrvty' already exists as a system group. Exiting.
addgroup: The group `frr' already exists as a system group. Exiting.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
The system user `frr' already exists. Exiting.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...

ubuntu@j-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu1.3
  Candidate: 8.1-1ubuntu1.3
  Version table:
 *** 8.1-1ubuntu1.3 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu1.2 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     8.1-1ubuntu1 500
        500 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Restart and show logging is still working (log file increased size):
ubuntu@j-frr-packaging-regression:~$ sudo systemctl restart frr
ubuntu@j-frr-packaging-regression:~$ ls -lah /var/log/frr/frr.log
-rw-r----- 1 syslog adm 3.0K Dec 7 20:18 /var/log/frr/frr.log

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Last step of jammy verification

b2) Fresh install of proposed package
(...)
Setting up frr (8.1-1ubuntu1.3) ...
Adding group `frrvty' (GID 116) ...
Done.
Adding group `frr' (GID 121) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 111) ...
Adding new user `frr' (UID 111) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu1.3) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

ubuntu@j-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 8.1-1ubuntu1.3
  Candidate: 8.1-1ubuntu1.3
  Version table:
 *** 8.1-1ubuntu1.3 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu1.2 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     8.1-1ubuntu1 500
        500 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Logging is fine:

ubuntu@j-frr-packaging-regression:~$ sudo systemctl restart frr

ubuntu@j-frr-packaging-regression:~$ l /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.5K Dec 7 20:26 /var/log/frr/frr.log

Repeating fresh install with proposed package in the scenario where the syslog user does not exist:
ubuntu@j-frr-packaging-regression:~$ id syslog
id: ‘syslog’: no such user
ubuntu@j-frr-packaging-regression:~$ sudo apt install frr -y
(...)
Setting up frr (8.1-1ubuntu1.3) ...
Adding group `frrvty' (GID 111) ...
Done.
Adding group `frr' (GID 116) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 104) ...
Adding new user `frr' (UID 104) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (8.1-1ubuntu1.3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

frr:
  Installed: 8.1-1ubuntu1.3
  Candidate: 8.1-1ubuntu1.3
  Version table:
 *** 8.1-1ubuntu1.3 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-1ubuntu1.2 500
        500 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     8.1-1ubuntu1 500
        500 http://br.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Jammy verification succeeded.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Focal formal verification following the test plan

a) Specific test for this bug
ubuntu@f-frr-packaging-regression:~$ id syslog
id: ‘syslog’: no such user
ubuntu@f-frr-packaging-regression:~$ sudo apt install frr -y
(...)
Setting up frr (7.2.1-1ubuntu0.1) ...
Adding group `frrvty' (GID 110) ...
Done.
Adding group `frr' (GID 115) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 104) ...
Adding new user `frr' (UID 104) with group `frr' ...
Not creating home directory `/nonexistent'.
chown: invalid user: ‘syslog:adm’
dpkg: error processing package frr (--configure):
 installed frr package post-installation script subprocess returned error exit status 1

Upgrading to the package from proposed fixes it:
ubuntu@f-frr-packaging-regression:~$ sudo apt install frr -y
(...)
Setting up frr (7.2.1-1ubuntu0.2) ...
addgroup: The group `frrvty' already exists as a system group. Exiting.
addgroup: The group `frr' already exists as a system group. Exiting.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
The system user `frr' already exists. Exiting.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (7.2.1-1ubuntu0.1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.19) ...

ubuntu@f-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 7.2.1-1ubuntu0.2
  Candidate: 7.2.1-1ubuntu0.2
  Version table:
 *** 7.2.1-1ubuntu0.2 500
        500 http://br.archive.ubuntu.com/ubuntu focal-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     7.2.1-1ubuntu0.1 500
        500 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
     7.2.1-1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Continuing formal focal verification

b) Regression test
b1) Upgrade

Starting from a working frr installed from focal-updates:
ubuntu@f-frr-packaging-regression:~$ sudo systemctl restart frr

ubuntu@f-frr-packaging-regression:~$ ls -lah /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.4K Dec 7 20:42 /var/log/frr/frr.log

ubuntu@f-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 7.2.1-1ubuntu0.1
  Candidate: 7.2.1-1ubuntu0.1
  Version table:
 *** 7.2.1-1ubuntu0.1 500
        500 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     7.2.1-1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

Upgrading to the package in focal-proposed, and logging keeps working:
ubuntu@f-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 7.2.1-1ubuntu0.2
  Candidate: 7.2.1-1ubuntu0.2
  Version table:
 *** 7.2.1-1ubuntu0.2 500
        500 http://br.archive.ubuntu.com/ubuntu focal-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     7.2.1-1ubuntu0.1 500
        500 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
     7.2.1-1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

Log file increased:
ubuntu@f-frr-packaging-regression:~$ sudo systemctl restart frr

ubuntu@f-frr-packaging-regression:~$ ls -lah /var/log/frr/frr.log
-rw-r----- 1 syslog adm 2.8K Dec 7 20:43 /var/log/frr/frr.log

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Final part of the focal formal verification

b2) Fresh install of proposed package
$ apt-cache policy frr
frr:
  Installed: 7.2.1-1ubuntu0.2
  Candidate: 7.2.1-1ubuntu0.2
  Version table:
 *** 7.2.1-1ubuntu0.2 500
        500 http://br.archive.ubuntu.com/ubuntu focal-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     7.2.1-1ubuntu0.1 500
        500 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
     7.2.1-1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

Logging is working fine:
ubuntu@f-frr-packaging-regression:~$ sudo systemctl restart frr

ubuntu@f-frr-packaging-regression:~$ l /var/log/frr/frr.log
-rw-r----- 1 syslog adm 1.3K Dec 7 20:45 /var/log/frr/frr.log

Repeating the same test in a new container, but without the syslog user present:

ubuntu@f-frr-packaging-regression:~$ id syslog
id: ‘syslog’: no such user
ubuntu@f-frr-packaging-regression:~$ sudo apt install frr -y
(...)
Setting up frr (7.2.1-1ubuntu0.2) ...
Adding group `frrvty' (GID 110) ...
Done.
Adding group `frr' (GID 115) ...
Done.
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `frr' (UID 104) ...
Adding new user `frr' (UID 104) with group `frr' ...
Not creating home directory `/nonexistent'.
Created symlink /etc/systemd/system/multi-user.target.wants/frr.service → /lib/systemd/system/frr.service.
Setting up frr-pythontools (7.2.1-1ubuntu0.2) ...
Processing triggers for systemd (245.4-4ubuntu3.19) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
ubuntu@f-frr-packaging-regression:~$ apt-cache policy frr
frr:
  Installed: 7.2.1-1ubuntu0.2
  Candidate: 7.2.1-1ubuntu0.2
  Version table:
 *** 7.2.1-1ubuntu0.2 500
        500 http://br.archive.ubuntu.com/ubuntu focal-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     7.2.1-1ubuntu0.1 500
        500 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
     7.2.1-1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

Focal verification succeeded.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package frr - 8.1-1ubuntu3.1

---------------
frr (8.1-1ubuntu3.1) kinetic; urgency=medium

  * d/frr.postinst: don't change log ownership if the syslog user
    doesn't exist. Thanks to Alessandro Ratti
    <email address hidden> for the fix (LP: #1991812).

 -- Andreas Hasenack <email address hidden> Fri, 28 Oct 2022 11:37:23 -0300

Changed in frr (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for frr has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package frr - 8.1-1ubuntu1.3

---------------
frr (8.1-1ubuntu1.3) jammy; urgency=medium

  * d/frr.postinst: don't change log ownership if the syslog user
    doesn't exist. Thanks to Alessandro Ratti
    <email address hidden> for the fix (LP: #1991812).

 -- Andreas Hasenack <email address hidden> Fri, 28 Oct 2022 11:38:34 -0300

Changed in frr (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package frr - 7.2.1-1ubuntu0.2

---------------
frr (7.2.1-1ubuntu0.2) focal; urgency=medium

  * d/frr.postinst: don't change log ownership if the syslog user
    doesn't exist. Thanks to Alessandro Ratti
    <email address hidden> for the fix (LP: #1991812).

 -- Andreas Hasenack <email address hidden> Fri, 28 Oct 2022 14:12:00 -0300

Changed in frr (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.