ubuntu-pro-client:3 duplicate log entry for /var/log/ubuntu-advantage-license-check.log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
After an upgrade from ubuntu-
The result is that when logrotate runs (on a daily timer) it has an error because two configurations for the same log files exist. This results in a "degraded" system status.
The fix is to use the `mv_conffile` maintscript to remove the old ubuntu-
[ Test Plan ]
We added a test to the ubuntu-pro-client integration test suite that covers this scenario. It upgrades to the new ubuntu-pro-client and then runs logrotate and checks that there are no errors. Because this is covered by the integration test suite, this bug will be verified as part of the verification process for LP: #2048921.
[ Where problems could occur ]
Touching conffiles is always risky. It could result in the removal of a needed config option or in an unnecessary debconf prompt on upgrade. I tested that user modifications were preserved on upgrade, but there is always the possibility that something could go wrong.
[ Original Description ]
Logrotate does not start due to misconfigured Ubuntu Pro:
$ sudo systemctl status logrotate | cat
× logrotate.service - Rotate log files
Loaded: loaded (/usr/lib/
Active: failed (Result: exit-code) since Mon 2024-02-26 15:10:44 CET; 9s ago
TriggeredBy: ● logrotate.timer
Docs: man:logrotate(8)
Process: 85798 ExecStart=
Main PID: 85798 (code=exited, status=1/FAILURE)
CPU: 69ms
Feb 26 15:10:44 workstation5 systemd[1]: Starting logrotate.service - Rotate log files...
Feb 26 15:10:44 workstation5 logrotate[85798]: error: ubuntu-pro-client:3 duplicate log entry for /var/log/
Feb 26 15:10:44 workstation5 logrotate[85798]: error: found error in file ubuntu-pro-client, skipping
Feb 26 15:10:44 workstation5 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Feb 26 15:10:44 workstation5 systemd[1]: logrotate.service: Failed with result 'exit-code'.
Feb 26 15:10:44 workstation5 systemd[1]: Failed to start logrotate.service - Rotate log files.
tags: | added: regression-proposed |
tags: | added: noble |
description: | updated |
description: | updated |
description: | updated |
/etc/logrotate.d$ grep -GHrn advantage advantage- tools:2: # of /var/log/ ubuntu- advantage* .log files. advantage- tools:3: /var/log/ ubuntu- advantage* .log { pro-client: 2:# of /var/log/ ubuntu- advantage* .log files. pro-client: 3:/var/ log/ubuntu- advantage* .log {
ubuntu-
ubuntu-
ubuntu-
ubuntu-