etherpad-lite fails to deploy, install hook running get-relation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
etherpad-lite (Juju Charms Collection) |
Fix Released
|
High
|
Erik B. Andersen |
Bug Description
This is using the local (LXC) environment, on a Saucy (13.10) machine.
The install hook fails.
Here is the output when running the hook again with debug hooks:
hooks/$
gpg: keyring `/tmp/tmpQiOWa6
gpg: keyring `/tmp/tmpQiOWa6
gpg: requesting key CA763386 from hkp server keyserver.
gpg: /tmp/tmpQiOWa6/
gpg: key CA763386: public key "Launchpad PPA for Onestone" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Get:18 http://
Get:19 http://
Get:20 http://
Get:21 http://
Get:22 http://
Ign http://
Get:23 http://
Get:24 http://
Get:25 http://
Get:26 http://
Get:27 http://
Get:28 http://
Get:29 http://
Get:30 http://
Get:31 http://
Ign http://
Get:32 http://
Get:33 http://
Get:34 http://
Get:35 http://
Get:36 http://
Get:37 http://
Get:38 http://
Get:39 http://
Get:40 http://
Get:41 http://
Get:42 http://
Get:43 http://
Get:44 http://
Get:45 http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 26.4 MB in 6s (4,358 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
abiword is already the newest version.
daemon is already the newest version.
bzr is already the newest version.
curl is already the newest version.
nodejs is already the newest version.
npm is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
Branched 4 revisions.
error: no relation id specified
Traceback (most recent call last):
File "hooks/install", line 177, in <module>
hooks.
File "/var/lib/
self.
File "hooks/install", line 124, in install
symlink(
File "/var/lib/
context = execution_
File "/var/lib/
context['rel'] = relation_get()
File "/var/lib/
return json.loads(
File "/usr/lib/
raise CalledProcessEr
subprocess.
e
It appears this happens because relation get is called and returns an error (which I think would be normal if you call it in an install hook?)
Related branches
- Marco Ceppi (community): Approve
-
Diff: 4665 lines (+588/-3619)28 files modifiedcharm-helpers.yaml (+6/-0)
hooks/charmhelpers/contrib/charmhelpers/IMPORT (+0/-4)
hooks/charmhelpers/contrib/charmhelpers/__init__.py (+0/-183)
hooks/charmhelpers/contrib/charmsupport/IMPORT (+0/-14)
hooks/charmhelpers/contrib/charmsupport/nrpe.py (+0/-217)
hooks/charmhelpers/contrib/charmsupport/volumes.py (+0/-156)
hooks/charmhelpers/contrib/hahelpers/IMPORT (+0/-7)
hooks/charmhelpers/contrib/hahelpers/apache_utils.py (+0/-196)
hooks/charmhelpers/contrib/hahelpers/ceph_utils.py (+0/-256)
hooks/charmhelpers/contrib/hahelpers/cluster_utils.py (+0/-130)
hooks/charmhelpers/contrib/hahelpers/haproxy_utils.py (+0/-55)
hooks/charmhelpers/contrib/hahelpers/utils.py (+0/-332)
hooks/charmhelpers/contrib/jujugui/IMPORT (+0/-4)
hooks/charmhelpers/contrib/jujugui/utils.py (+0/-602)
hooks/charmhelpers/contrib/openstack/IMPORT (+0/-9)
hooks/charmhelpers/contrib/openstack/nova/essex (+0/-43)
hooks/charmhelpers/contrib/openstack/nova/folsom (+0/-81)
hooks/charmhelpers/contrib/openstack/nova/nova-common (+0/-147)
hooks/charmhelpers/contrib/openstack/openstack-common (+0/-781)
hooks/charmhelpers/contrib/openstack/openstack_utils.py (+0/-228)
hooks/charmhelpers/core/hookenv.py (+153/-45)
hooks/charmhelpers/core/host.py (+133/-74)
hooks/charmhelpers/fetch/__init__.py (+194/-12)
hooks/charmhelpers/fetch/archiveurl.py (+48/-0)
hooks/charmhelpers/fetch/bzrurl.py (+49/-0)
hooks/charmhelpers/payload/__init__.py (+0/-1)
hooks/charmhelpers/payload/execd.py (+0/-40)
hooks/hooks.py (+5/-2)
affects: | charms → etherpad-lite (Juju Charms Collection) |
Changed in etherpad-lite (Juju Charms Collection): | |
assignee: | nobody → Erik B. Andersen (azendale) |
Changed in etherpad-lite (Juju Charms Collection): | |
status: | In Progress → Fix Committed |
Changed in etherpad-lite (Juju Charms Collection): | |
importance: | Undecided → High |
Changed in etherpad-lite (Juju Charms Collection): | |
status: | Fix Committed → Fix Released |
I changed the file charmhelpers/ core/hookenv. py 's definition of relation_get to this and it worked (deployed and the service was working after the deploy):
def relation_ get(attribute= None, unit=None, rid=None):
_args. append( '-r')
_args. append( rid) append( attribute or '-')
_args. append( unit) subprocess. check_output( _args)) CalledProcessEr ror as e:
print( repr(e) )
_args = ['relation-get', '--format=json']
if rid:
_args.
if unit:
try:
return json.loads(
except ValueError:
return None
except subprocess.
if e.returncode is 2:
return None
else:
raise e