cloud-init output not redirected to a file

Bug #1278922 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned
1.2
Won't Fix
Wishlist
Unassigned
1.4
Won't Fix
Wishlist
Unassigned

Bug Description

When debugging an enlistment, commissionig or curtin install, output of programs run by cloud-init is important.
By default in ubuntu images < 14.04, output of commands cloud-init runs go only to /dev/console.

since it seems quite common that we do not log a nodes /dev/console, the next best option is getting /var/log/cloud-init-output.log in the image.

Right now it seems we're only doing that for enlistment.

We need to make sure that the following cloud-config is passed into cloud-init in commissioning and curtin stages:
 output: {all: '| tee -a /var/log/cloud-init-output.log'}

This is less ideal than collecting consoles as /var/log/ will be on the tmpfs and thus writes will consume real memory.

This is the shorter path to somethign sane than getting cloud-init output going to rsyslog and back to maas.

Raphaël Badin (rvb)
summary: - maas should redirect cloud-init output to file whenever possible
+ cloud-init output not redirected to a file
Changed in maas:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Julian Edwards (julian-edwards) wrote :

> By default in ubuntu images < 14.04, output of commands cloud-init runs go only to /dev/console

Is this another way of saying that this doesn't/won't happen in 14.04 when released?

Revision history for this message
Scott Moser (smoser) wrote :

< 14.04: default is to stdout
14.04: default is "| tee -a /var/log/cloud-init-output.log"

Changed in maas:
status: Triaged → Invalid
importance: Wishlist → Undecided
Revision history for this message
Scott Moser (smoser) wrote :

so for my own reference later, to do this to an image easily, you can do:

img="/var/lib/maas/ephemeral/precise/ephemeral/amd64/20131010/disk.img"
echo "output: {all: '| tee -a /var/log/cloud-init-output.log'}" |
  sudo mount-image-callback $img -- sh -c 'tee $MOUNTPOINT/etc/cloud/cloud.cfg.d/99-output.cfg'

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.