JuJu fails installing a unit (Failure: exceptions.KeyError: 'JUJU_ENV_UUID')
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Invalid
|
Undecided
|
Unassigned |
Bug Description
First thing first, thank you all to make such great FLOSS softwares !
I am deploying my own set of charms into a cluster handled by Canonical MAAS.
I want to deploy two services (charms) into the same physical machine, thanks to juju-jitsu I can do it with the deploy-to method.
The deployment of the 1st service was successful and I waited until this services is successfully installed to deploy the 2nd one (as I known that install hooks can fight for resources, e.g. apt-get). ... And then, juju failed.
Desktop
--------------
juju 0.7 (from PPA) running on Ubuntu 13.04 amd64.
$ uname -a
Linux TECW7W02-Ubuntu 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Server n°0
-----------------
$ juju ssh 0
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-51-generic x86_64)
$ uname -a
Linux nnqrp 3.2.0-51-generic #77-Ubuntu SMP Wed Jul 24 20:18:19 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Part of the debug-log
-------
$ juju debug-log
(... bootstrap and setup of 1st service ...)
2013-08-14 10:05:02,028 Machine:0: juju.agents.machine DEBUG: Units changed old:set(
2013-08-14 10:05:02,028 Machine:0: juju.agents.machine DEBUG: Starting service unit: webui/0 ...
2013-08-14 10:05:02,077 Machine:0: unit.deploy DEBUG: Downloading charm local:precise/
2013-08-14 10:05:03,591 Machine:0: unit.deploy DEBUG: Using <juju.machine.
2013-08-14 10:05:03,591 Machine:0: unit.deploy DEBUG: Starting service unit webui/0...
2013-08-14 10:05:04,056 unit:webui/0: hook.executor DEBUG: started
2013-08-14 10:05:04,062 unit:webui/0: statemachine DEBUG: unitworkflowstate: transition install (None -> installed) {}
2013-08-14 10:05:04,062 unit:webui/0: statemachine DEBUG: unitworkflowstate: execute action do_install
2013-08-14 10:05:04,077 unit:webui/0: hook.output DEBUG: Cached relation hook contexts: []
2013-08-14 10:05:04,081 unit:webui/0: hook.executor DEBUG: Running hook: /var/lib/
2013-08-14 10:05:04,082 unit:webui/0: hook.executor DEBUG: Hook error: /var/lib/
2013-08-14 10:05:04,082 unit:webui/0: twisted ERROR: Unhandled error in Deferred:
2013-08-14 10:05:04,083 unit:webui/0: twisted ERROR: Unhandled Error
Traceback (most recent call last):
Failure: exceptions.
2013-08-14 10:05:04,215 Machine:0: unit.deploy INFO: Started service unit webui/0
The status
-----------------
$ juju status
2013-08-14 10:17:48,034 INFO Connecting to environment...
2013-08-14 10:17:48,833 INFO Connected to environment.
machines:
0:
agent-state: running
dns-name: nnqrp.master
instance-id: /MAAS/api/
instance-state: unknown
services:
orchestra:
charm: local:precise/
exposed: true
relations: {}
units:
orchestra/0:
machine: 0
open-ports:
- 5000/tcp
- 27017/tcp
- 5672/tcp
webui:
charm: local:precise/
exposed: true
relations: {}
units:
webui/0:
machine: 0
open-ports: []
2013-08-14 10:17:48,916 INFO 'status' command finished successfully
we recommend people use juju-core instead of pyjuju at this time for new deployments, pyjuju isn't under active development. the issue your having is due to divergence of the environment juju version and the version the charm depends on. To resolve with pyjuju you'll need to enable the juju-origin: ppa setting on the environments.yaml