Charm looks for JUJU_ENV_UUID but that does not exist in juju 2 models
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
landscape-client-charm |
Fix Released
|
High
|
Adam Collard | ||
landscape-client (Juju Charms Collection) |
Fix Released
|
High
|
Adam Collard | ||
swift-proxy (Juju Charms Collection) |
Fix Released
|
High
|
James Page | ||
swift-storage (Juju Charms Collection) |
Fix Released
|
High
|
James Page |
Bug Description
In juju 1, the environment UUID is set in the JUJU_ENV_UUID shell variable, and the landscape-client charm uses that.
With juju 2, however, that variable is replaced by JUJU_MODEL_UUID.
The landscape-clientc charm, to be compatible with both juju major versions, needs to check for both these variables.
When deployed with juju 1, this backtrace happens at registration time:
2016-04-20 13:17:05,486 ERROR [MainThread] Error running event handler landscape.
Traceback (most recent call last):
File "/usr/lib/
results.
File "/usr/lib/
self.
File "/usr/lib/
message_id = self._message_
File "/usr/lib/
message = schema.
File "/usr/lib/
return super(Message, self).coerce(value)
File "/usr/lib/
% (k, value, self.schema[k], e))
InvalidError: Value of 'juju-info' key of dict {'tags': None, 'timestamp': 1461158225, 'api': '3.3', 'container-info': 'lxc', 'account_name': 'standalone', 'vm-info': '', 'registration_
environmentuuid is null
# cat /var/lib/
{"environment-
I guess this is another bug: the landscape-client charm should fail hard if it can't get the environment-uuid, as that is absolutely required.
Related branches
- Bogdana Vereha (community): Approve
- Alberto Donato (community): Approve
-
Diff: 101 lines (+34/-12)3 files modifiedhooks/hooks.py (+3/-1)
hooks/install.py (+1/-1)
hooks/test_hooks.py (+30/-10)
Changed in landscape-client (Juju Charms Collection): | |
importance: | Undecided → High |
tags: | added: bug-squad |
tags: | removed: kanban |
Changed in landscape-client-charm: | |
importance: | Undecided → High |
tags: | added: canonical-bootstack |
Changed in swift-storage (Juju Charms Collection): | |
milestone: | none → 16.07 |
Changed in swift-proxy (Juju Charms Collection): | |
milestone: | none → 16.07 |
Changed in landscape-client-charm: | |
status: | New → Triaged |
Changed in landscape-client (Juju Charms Collection): | |
status: | New → Triaged |
Changed in landscape-client-charm: | |
assignee: | nobody → Adam Collard (adam-collard) |
Changed in landscape-client (Juju Charms Collection): | |
assignee: | nobody → Adam Collard (adam-collard) |
status: | Triaged → In Progress |
Changed in landscape-client-charm: | |
status: | Triaged → In Progress |
Changed in landscape-client (Juju Charms Collection): | |
status: | In Progress → Invalid |
Changed in landscape-client-charm: | |
status: | In Progress → Invalid |
description: | updated |
Changed in landscape-client: | |
status: | New → In Progress |
importance: | Undecided → Medium |
importance: | Medium → High |
assignee: | nobody → Adam Collard (adam-collard) |
Changed in landscape-client (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Adam Collard (adam-collard) |
Changed in landscape-client-charm: | |
status: | Invalid → In Progress |
Changed in landscape-client (Juju Charms Collection): | |
status: | Invalid → In Progress |
Changed in landscape-client (Ubuntu): | |
status: | In Progress → Invalid |
Changed in landscape-client: | |
status: | In Progress → Invalid |
description: | updated |
Changed in swift-storage (Juju Charms Collection): | |
status: | Fix Committed → Fix Released |
Changed in swift-proxy (Juju Charms Collection): | |
status: | Fix Committed → Fix Released |
no longer affects: | landscape-client |
no longer affects: | landscape-client (Ubuntu) |
Changed in landscape-client-charm: | |
status: | In Progress → Fix Committed |
Changed in landscape-client (Juju Charms Collection): | |
status: | In Progress → Fix Committed |
And juju status remains happy throughout:
[Units] 443/tcp, 10000/tcp 10.0.100.150 client/ 3 unknown executing 2.0-beta4 10.0.100.150 client/ 0 unknown executing 2.0-beta4 10.0.100.115 client/ 2 unknown executing 2.0-beta4 10.0.100.140 client/ 1 unknown executing 2.0-beta4 10.0.100.29
ID WORKLOAD-STATUS JUJU-STATUS VERSION MACHINE PORTS PUBLIC-ADDRESS MESSAGE
haproxy/0 unknown idle 2.0-beta4 0 80/tcp,
landscape-
landscape-server/0 active idle 2.0-beta4 1 10.0.100.115
landscape-
postgresql/0 active idle 2.0-beta4 2 5432/tcp 10.0.100.140 Live master
landscape-
rabbitmq-server/0 active idle 2.0-beta4 3 5672/tcp 10.0.100.29 Unit is ready
landscape-
ubuntu/0 unknown idle 2.0-beta4 4 10.0.100.229