No debug-log with MAAS, 14.04 and juju-core 1.17.5

Bug #1294776 reported by James Page
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Andrew Wilkins
juju-core (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I don't get a debug-log (and no associated /var/log/juju/all-machines.log) when bootstrapping and running a Juju environment using the MAAS provider on Ubuntu 14.04.

Related branches

Revision history for this message
James Page (james-page) wrote :

rsyslog config is in place:

$ModLoad imfile

$InputFilePersistStateInterval 50
$InputFilePollInterval 5
$InputFileName /var/log/juju/machine-0.log
$InputFileTag juju-machine-0:
$InputFileStateFile machine-0
$InputRunFileMonitor

$ModLoad imtcp
$DefaultNetstreamDriver gtls
$DefaultNetstreamDriverCAFile /var/log/juju/ca-cert.pem
$DefaultNetstreamDriverCertFile /var/log/juju/rsyslog-cert.pem
$DefaultNetstreamDriverKeyFile /var/log/juju/rsyslog-key.pem
$InputTCPServerStreamDriverAuthMode anon
$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
$InputTCPServerRun 6514

# Messages received from remote rsyslog machines have messages prefixed with a space,
# so add one in for local messages too if needed.
$template JujuLogFormat,"%syslogtag:6:$%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"

$FileCreateMode 0644
:syslogtag, startswith, "juju-" /var/log/juju/all-machines.log;JujuLogFormat
& ~
$FileCreateMode 0640

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
tags: added: logging
tags: added: regression
Changed in juju-core:
importance: High → Critical
milestone: none → 1.17.6
Revision history for this message
Andrew Wilkins (axwalk) wrote :

James, if you still have the environment, can you please check if the bootstrap machine has got rsyslog-gnutls installed? And also list the output of ls -l /var/log/juju?

William Reade (fwereade)
Changed in juju-core:
assignee: nobody → Wayne Witzel III (wwitzel3)
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.17.6 → 1.17.7
Revision history for this message
Wayne Witzel III (wwitzel3) wrote :

Was the node you bootstrapped also running 14.04? I've tried with the 1.17.5 client and a 14.04 MAAS provider, bootstrapping a precise node and it generated the all-machines.log for me.

Revision history for this message
James Page (james-page) wrote :

The bootstrap node was running 14.04; I just tested this with the OpenStack provider as well, with a 14.04 bootstrap node, and I see exactly the same issue.

Revision history for this message
James Page (james-page) wrote :

ubuntu@james-page-bastion:~/openstack-charm-testing⟫ apt-cache policy rsyslog-gnutls
rsyslog-gnutls:
  Installed: (none)
  Candidate: 7.4.4-1ubuntu2
  Version table:
     7.4.4-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

Revision history for this message
James Page (james-page) wrote :

ubuntu@juju-jamespage-machine-0:~$ ls -l /var/log/juju/
total 4492
-rw------- 1 syslog syslog 879 Mar 21 12:19 ca-cert.pem
-rw-r--r-- 1 root root 4583341 Mar 21 12:26 machine-0.log
-rw------- 1 syslog syslog 830 Mar 21 12:19 rsyslog-cert.pem
-rw------- 1 syslog syslog 891 Mar 21 12:19 rsyslog-key.pem

Revision history for this message
James Page (james-page) wrote :

ubuntu@juju-jamespage-machine-0:~$ apt-cache policy rsyslog-gnutls
rsyslog-gnutls:
  Installed: 7.4.4-1ubuntu2
  Candidate: 7.4.4-1ubuntu2
  Version table:
 *** 7.4.4-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Andrew Wilkins (axwalk) wrote :

I just noticed that /var/log/juju is created owned by root. The local provider chowns the directory to syslog:adm, but really this should be done for all providers. I've moved the chown from local provider into the common cloud-init code in https://codereview.appspot.com/79310043/, which may fix this bug.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

I've reproduced this trivially on azure, and changing ownership makes no difference. I'll keep looking.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

BTW if anyone else wants to reproduce, just set, in environments.yaml:
    image-stream: daily
    default-series: trusty

Revision history for this message
Andrew Wilkins (axwalk) wrote :

I hadn't removed the spool file. If I remove it (/var/spool/rsyslog/machine-0) and restart rsyslog, I can get it to reliably write the file when the directory is owned by syslog:adm, and not when owned by root:root.

Changed in juju-core:
assignee: Wayne Witzel III (wwitzel3) → Andrew Wilkins (axwalk)
status: Triaged → In Progress
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Confirmed that all-machines.log is now created when bootstrapping off trunk.

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: maas-provider
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package juju-core - 1.17.7-0ubuntu1

---------------
juju-core (1.17.7-0ubuntu1) trusty; urgency=medium

  * New upstream point release, including fixes for:
    - no debug log with all providers on Ubuntu 14.04 (LP: #1294776).
  * d/control: Add cpu-checker dependency to juju-local (LP: #1297077).
 -- James Page <email address hidden> Fri, 28 Mar 2014 08:58:42 +0000

Changed in juju-core (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.