Thanks, Lee, for reporting this.
I can reproduce this issue upgrading cloud-init from
24.4~3+really24.3.1-0ubuntu4 to 24.4-0ubuntu1 in Ubuntu Plucky:
```
# ls /etc/logrotate.d/cloud-init* -hal
-rw-r--r-- 1 root root 144 Sep 20 21:31 /etc/logrotate.d/cloud-init
-rw-r--r-- 1 root root 144 Nov 25 16:42 /etc/logrotate.d/cloud-init-base
root@p:/etc/logrotate.d# cat /etc/logrotate.d/cloud-init*
/var/log/cloud-init*.log
{
su root root
missingok
nocreate
notifempty
rotate 6
compress
delaycompress
size 1M
}
/var/log/cloud-init*.log
{
su root root
missingok
nocreate
notifempty
rotate 6
compress
delaycompress
size 1M
}
# sudo systemctl start logrotate.service
Job for logrotate.service failed because the control process exited with error
code.
See "systemctl status logrotate.service" and "journalctl -xeu
logrotate.service" for details.
# journalctl -eu logrotate.service --no-pager
Nov 29 13:20:27 p systemd[1]: Starting logrotate.service - Rotate log files...
Nov 29 13:20:27 p logrotate[3539]: error: cloud-init-base:1 duplicate log entry
for /var/log/cloud-init-output.log
Nov 29 13:20:27 p logrotate[3539]: error: found error in file cloud-init-base,
skipping
Nov 29 13:20:28 p systemd[1]: logrotate.service: Main process exited,
code=exited, status=1/FAILURE
Nov 29 13:20:28 p systemd[1]: logrotate.service: Failed with result 'exit-code'.
Nov 29 13:20:28 p systemd[1]: Failed to start logrotate.service - Rotate log
files.
```
24.4-0ubuntu1 is the first version introducing the split in metapackages
per cloud and the base one.
The issue is that on the upgrade path from the mentioned versions, the
latter one doesn't clean up `/etc/logrotate.d/cloud-init` and logrotate
is not happy about that.
As a workaround until the issue is fixed, it is safe to do:
`test -f /etc/logrotate.d/cloud-init-base && rm -v
/etc/logrotate.d/cloud-init`
to manually clean the duplicated logrotate config.
** Also affects: cloud-init (Ubuntu Plucky)
Importance: Undecided
Status: New
** Changed in: cloud-init (Ubuntu Plucky)
Status: New => Triaged
** Changed in: cloud-init (Ubuntu Plucky)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2089790
Title:
Duplicate logrotate configurations cause errors
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2089790/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs