juju bootstrap silently fails with invalid origin, creates impression of working setup that fails in unpredictable ways

Bug #1052088 reported by Peter Petrakis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Triaged
Low
Unassigned

Bug Description

In following the getting started guide:
https://juju.ubuntu.com/docs/getting-started.html

I decided to take a slightly different path seeing that I was using an
existing precise-server, and juju was already in the repository, I didn't
add the ppa and continued with the instructions.

When I got to ~/.juju/environments.yaml I saw the "ppa" line and
changed it to universe, as that's where juju lives according to apt-cache.

default: sample
environments:
  sample:
    type: local
    control-bucket: juju-a14dfae3830142d9ac23c499395c2785999
    admin-secret: 6608267bbd6b447b8c90934167b2a294999
    default-series: precise
    juju-origin: universe
    data-dir: /home/ppetraki/Sandbox/juju-local

# vim:ts=2:sw=2:et:

juju bootstrap completed with out error. In fact all the commands prescribed
to create the wordpress instance completed without error.

Juju status reported a "pending" state for my instances with no public ip
addresses. I was quite puzzled.

I sought help on #juju and found it. After destroying the environment
and recreating the steps with the debug log running we discovered a
fatal error.

Reading package lists...
+ setup_networking
+ apt-get install -o Dpkg::Options::= --force-confnew --force-yes -fuy resolvconf
Reading package lists...
Building dependency tree...
Reading state information...
resolvconf is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
+ cat
/tmp/juju-create8LcGCo: line 28: /etc/resolvconf/run/resolv.conf: No such file or directory
+ cat
+ cat
+ setup_juju
+ '[' '!' -e /var/lib/juju ']'
+ mkdir /var/lib/juju
+ '[' '!' -e /var/log/juju ']'
+ mkdir /var/log/juju
+ '[' universe = ppa ']'
+ '[' universe = proposed ']'
+ [[ universe = lp:* ]]
+ '[' universe = distro ']'
+ echo 'Unknown juju origin policy universe: expected [ppa|branch|disto]'
Unknown juju origin policy universe: expected [ppa|branch|disto]
+ exit 1

2012-09-17 11:05:29,684 Machine:0: juju.agents.machine DEBUG: Units changed old:set(['wordpress-db/0']) new:set(['wordpress/0', 'wordpress-db/0'])
2012-09-17 11:05:29,684 Machine:0: juju.agents.machine DEBUG: Starting service unit: wordpress/0 ...
2012-09-17 11:05:29,760 Machine:0: unit.deploy DEBUG: Downloading charm cs:precise/wordpress-7 to /home/ppetraki/Sandbox/juju-local/ppetraki-sample/charms
...

If it wasn't for the fact that the error logs showed the enum set for valid
origin values I wouldn't have known what to set it to, without resorting to google etc.

<jimbaker> ppetraki, juju bootstrap should have immediately rejected a bad juju-origin. it didn't. instead you saw the error in the log
<ppetraki> jimbaker, ok, so I'll file a bug on that
<jimbaker> i just tried with ec2
 and same thing

Also, in retrospect, I noticed that there is no annotated default environments.yaml file provided
with juju. It's customary with UNIX to provide an annotated config file or at least a manpage describing
the config file to avoid things like this from even happening to begin with and provide ready reference to
solve said issue without leaving the console.

Tags: precise
Revision history for this message
Peter Petrakis (peter-petrakis) wrote :
Changed in juju:
status: New → Confirmed
Curtis Hovey (sinzui)
Changed in juju:
importance: Undecided → Low
status: Confirmed → Triaged
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.