juju bootstrap silently fails with invalid origin, creates impression of working setup that fails in unpredictable ways
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Triaged
|
Low
|
Unassigned |
Bug Description
In following the getting started guide:
https:/
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/
changed it to universe, as that's where juju lives according to apt-cache.
default: sample
environments:
sample:
type: local
control-bucket: juju-a14dfae383
admin-secret: 6608267bbd6b447
default-series: precise
juju-origin: universe
data-dir: /home/ppetraki/
# 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-
+ 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(
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/
...
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.
Changed in juju: | |
importance: | Undecided → Low |
status: | Confirmed → Triaged |