logrotate fails on LXC

Bug #1801910 reported by Marco Bertorello
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
logrotate (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

daily, I receive this alert from logrotate script in cron.daily:

/etc/cron.daily/logrotate:
Failed to kill unit rsyslog.service: Input/output error
error: error running non-shared postrotate script for /var/log/syslog of '/var/log/syslog
'
run-parts: /etc/cron.daily/logrotate exited with return code 1

My ubuntu is a LXC running on top of ProxmoxVE.

the problem occour when logrotate script call /usr/lib/rsyslog/rsyslog-rotate that has this call:

systemctl kill -s HUP rsyslog.service

I already checked my disks status (because the input/output error) but them are ok.

The same issue is present also in another LXC, ubuntu also this one, running on another node of the same cluster

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: logrotate 3.11.0-0.1ubuntu1
ProcVersionSignature:

Uname: Linux 4.15.18-7-pve x86_64
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
Date: Tue Nov 6 10:26:37 2018
ProcEnviron:
 LANG=C
 SHELL=/bin/bash
 TERM=xterm
 XDG_RUNTIME_DIR=<set>
 PATH=(custom, no user)
SourcePackage: logrotate
UpgradeStatus: No upgrade log present (probably fresh install)

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in logrotate (Ubuntu):
status: New → Confirmed
Revision history for this message
Phan Van Cuong (cuongphan) wrote :

I have met same case with you also I'm using proxmox. Should like the image of Proxmox provided for us diffent a bit with normal OS. My laptop using Ubuntu 18.04 but no problem with the rsyslog. It still is version rsyslogd 8.32.0.

Rsyslog is included in all major distributions. So you do not necessarily need to take care of where packages can be found - they are “just there”. Unfortunately, the distros provide often rather old versions. This is especially the case for so-called enterprise distributions.

So to fix this, I have still newest version of rsyslog then the issue has solved.

sudo apt-get install -y software-properties-common # Provide add-apt-repository
sudo add-apt-repository ppa:adiscon/v8-stable
sudo apt-get update
sudo apt-get install rsyslog

Let's run again:
# /etc/cron.daily/logrotate

Revision history for this message
Marco Bertorello (virdb) wrote : Re: [Bug 1801910] Re: logrotate fails on LXC

Il 14/01/2019 10:15, Phan Van Cuong ha scritto:
> I have met same case with you also I'm using proxmox. Should like the
> image of Proxmox provided for us diffent a bit with normal OS. My laptop
> using Ubuntu 18.04 but no problem with the rsyslog. It still is version
> rsyslogd 8.32.0.
>
> Rsyslog is included in all major distributions. So you do not
> necessarily need to take care of where packages can be found - they are
> “just there”. Unfortunately, the distros provide often rather old
> versions. This is especially the case for so-called enterprise
> distributions.
>
> So to fix this, I have still newest version of rsyslog then the issue
> has solved.
>
> sudo apt-get install -y software-properties-common # Provide add-apt-repository
> sudo add-apt-repository ppa:adiscon/v8-stable
> sudo apt-get update
> sudo apt-get install rsyslog
>
> Let's run again:
> # /etc/cron.daily/logrotate

Hi Phan,

I checked my setup,

on the proxmox machine rsyslog is old: 8.24.0-1 (same version than
debian stretch).

on the guest, rsyslog is up to date: 8.32.0-1ubuntu4 (bionic)

Do you mean I have to upgrade rsyslog on the host (proxmox)?

In this case, this should be a proxmox's bug, right?

Thanks alot and best regards

--
Marco Bertorello
https://www.marcobertorello.it

Revision history for this message
Phan Van Cuong (cuongphan) wrote :

Hi Marco,

In my opinion, I think we should install rsyslog above on the container. You could create a new image for ubuntu 18.04 for never do it again.

Like what I said, could be it happened on the image of Proxmox, so you should install the newest package of rsyslog on the container.

By default, Ubuntu 18.04 rsyslogd version is rsyslogd 8.32.0.

This is a result after upgrade:

$ rsyslogd -version
rsyslogd 8.40.0, compiled with:
 PLATFORM: x86_64-pc-linux-gnu
 PLATFORM (lsb_release -d):
 FEATURE_REGEXP: Yes
 GSSAPI Kerberos 5 support: No
 FEATURE_DEBUG (debug build, slow code): No
 32bit Atomic operations supported: Yes
 64bit Atomic operations supported: Yes
 memory allocator: system default
 Runtime Instrumentation (slow code): No
 uuid support: Yes
 systemd support: Yes
 Number of Bits in RainerScript integers: 64

See https://www.rsyslog.com for more information.

Revision history for this message
Marco Bertorello (virdb) wrote :

Il 15/01/2019 04:48, Phan Van Cuong ha scritto:
> Hi Marco,
>
> In my opinion, I think we should install rsyslog above on the container.
> You could create a new image for ubuntu 18.04 for never do it again.
>
> Like what I said, could be it happened on the image of Proxmox, so you
> should install the newest package of rsyslog on the container.
>
> By default, Ubuntu 18.04 rsyslogd version is rsyslogd 8.32.0.
>
> This is a result after upgrade:
>
> $ rsyslogd -version
> rsyslogd 8.40.0, compiled with:
> PLATFORM: x86_64-pc-linux-gnu
> PLATFORM (lsb_release -d):
> FEATURE_REGEXP: Yes
> GSSAPI Kerberos 5 support: No
> FEATURE_DEBUG (debug build, slow code): No
> 32bit Atomic operations supported: Yes
> 64bit Atomic operations supported: Yes
> memory allocator: system default
> Runtime Instrumentation (slow code): No
> uuid support: Yes
> systemd support: Yes
> Number of Bits in RainerScript integers: 64
>
> Seehttps://www.rsyslog.com for more information.

Hi Phan,
I confirm your solution.
thanks alot and best regards

--
Marco Bertorello

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.