[Bug 905419] Re: cloud-init messages going to syslog, not cloud-init.log
Scott Moser
smoser at ubuntu.com
Mon Dec 19 17:13:36 UTC 2011
I'm moving this to package rsyslog, I've verified that this is a regression caused by using rsyslog from precise (5.8.6-1ubuntu3).
The issue is fixed and demonstrable by:
$ url="https://launchpad.net/ubuntu/+archive/primary/+files/rsyslog_5.8.1-1ubuntu2_amd64.deb"
$ wget "$url" -O "${url##*/}"
$ sudo dpkg -i "${url##*/}"
$ sudo cloud-init start
After the above, a message from 'cloud-init start' will be in /var/log
/cloud-init.log. Running that otherwise would put the mangled message
in /var/log/syslog.
** Description changed:
on boot of a precise image, I did not see messages in /var/log/cloud-
init.log as expected.
I noticed that some of them are in /var/log/syslog:
Dec 16 16:41:30 server-3393 d-init-cfg[INFO]: cloud-init-cfg ['all', 'config']
Dec 16 16:41:30 server-3393 it__.py[DEBUG]: handling mounts with freq=None and args=[]
Dec 16 16:41:30 server-3393 SourceEc2.py[DEBUG]: unable to convert swap to a device
Dec 16 16:41:30 server-3393 kernel: [ 83.058563] kjournald starting. Commit interval 5 seconds
Dec 16 16:41:30 server-3393 it__.py[DEBUG]: handling ssh-import-id with freq=None and args=[]
Dec 16 16:41:30 server-3393 sh_import_id.py[DEBUG]: importing ssh ids. cmd = ['sudo', '-Hu', 'ubuntu', 'ssh-import-id', 'smoser']
+ I'm not sure where the beginning of those log statements are going.
- I'm not sure where the beginning of those log statements are going.
+ cloud-init uses python logging, and places the following content in /etc/rsyslog.d/21-cloudinit.conf:
+ # Log cloudinit generated log messages to file
+ :syslogtag, isequal, "[CLOUDINIT]" /var/log/cloud-init.log
+
+ # comment out the following line to allow CLOUDINIT messages through.
+ # Doing so means you'll also get CLOUDINIT messages in /var/log/syslog
+ & ~
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cloud-init 0.6.2-0ubuntu1
ProcVersionSignature: User Name 3.2.0-4.10-virtual 3.2.0-rc5
Uname: Linux 3.2.0-4-virtual x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Fri Dec 16 17:29:28 2011
Ec2AMI: ami-00000102
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
- PATH=(custom, user)
- LANG=en_US.UTF-8
- SHELL=/bin/bash
+ PATH=(custom, user)
+ LANG=en_US.UTF-8
+ SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
** Package changed: cloud-init (Ubuntu) => rsyslog (Ubuntu)
** Tags added: regression-release
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rsyslog in Ubuntu.
https://bugs.launchpad.net/bugs/905419
Title:
cloud-init messages going to syslog, not cloud-init.log
Status in “rsyslog” package in Ubuntu:
Confirmed
Bug description:
on boot of a precise image, I did not see messages in /var/log/cloud-
init.log as expected.
I noticed that some of them are in /var/log/syslog:
Dec 16 16:41:30 server-3393 d-init-cfg[INFO]: cloud-init-cfg ['all', 'config']
Dec 16 16:41:30 server-3393 it__.py[DEBUG]: handling mounts with freq=None and args=[]
Dec 16 16:41:30 server-3393 SourceEc2.py[DEBUG]: unable to convert swap to a device
Dec 16 16:41:30 server-3393 kernel: [ 83.058563] kjournald starting. Commit interval 5 seconds
Dec 16 16:41:30 server-3393 it__.py[DEBUG]: handling ssh-import-id with freq=None and args=[]
Dec 16 16:41:30 server-3393 sh_import_id.py[DEBUG]: importing ssh ids. cmd = ['sudo', '-Hu', 'ubuntu', 'ssh-import-id', 'smoser']
I'm not sure where the beginning of those log statements are going.
cloud-init uses python logging, and places the following content in /etc/rsyslog.d/21-cloudinit.conf:
# Log cloudinit generated log messages to file
:syslogtag, isequal, "[CLOUDINIT]" /var/log/cloud-init.log
# comment out the following line to allow CLOUDINIT messages through.
# Doing so means you'll also get CLOUDINIT messages in /var/log/syslog
& ~
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cloud-init 0.6.2-0ubuntu1
ProcVersionSignature: User Name 3.2.0-4.10-virtual 3.2.0-rc5
Uname: Linux 3.2.0-4-virtual x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Fri Dec 16 17:29:28 2011
Ec2AMI: ami-00000102
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/905419/+subscriptions
More information about the foundations-bugs
mailing list