Charm cannot be deployed, fails on install hook with gpg error

Bug #1365205 reported by Jeff Pihach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-gui
Fix Released
Undecided
Unassigned
mysql (Juju Charms Collection)
Invalid
Undecided
Unassigned

Bug Description

When deploying the recommended precise or trusty mysql charms on lxc or ec2 it fails in the install hook with:

2014-09-04 00:24:39 INFO install Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.niSJy48FrC --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv undefined
2014-09-04 00:24:39 INFO install gpg: "undefined" not a key ID: skipping
2014-09-04 00:24:39 INFO install Traceback (most recent call last):
2014-09-04 00:24:39 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/install", line 16, in <module>
2014-09-04 00:24:39 INFO install add_source(utils.config_get('source'), utils.config_get('key'))
2014-09-04 00:24:39 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/charmhelpers/fetch/__init__.py", line 188, in add_source
2014-09-04 00:24:39 INFO install key])
2014-09-04 00:24:39 INFO install File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
2014-09-04 00:24:39 INFO install raise CalledProcessError(retcode, cmd)
2014-09-04 00:24:39 INFO install subprocess.CalledProcessError: Command '['apt-key', 'adv', '--keyserver', 'hkp://keyserver.ubuntu.com:80', '--recv', u'undefined']' returned non-zero exit status 2
2014-09-04 00:24:39 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1

Revision history for this message
Charles Butler (lazypower) wrote :

I've validated the charm works in both trusty/precise variants on 3 of 6 substrates.

Local, AWS, and MAAS

Im' unable to reproduce this behavior.

Changed in mysql (Juju Charms Collection):
status: New → Incomplete
Revision history for this message
Jeff Pihach (hatch) wrote :

Simply doing
juju bootstrap
juju deploy mysql
Started the charm up without issue.

However I was able to reproduce the issue with the following steps:

I'm not sure if all of these steps are required, these were just the ones which would reproduce the failure 100%

Using 1.20.6-trusty-amd64 on ec2

juju bootstrap
juju deploy juju-gui --to=0
juju set juju-gui juju-gui-source="develop"

Once it spins up then open the GUI and log in

Search for 'Ghost' in the charm browser
Drag the Ghost charm to the canvas and click the Commit/Confirm buttons in the bottom right to get it spinning up
Now search for 'MySQL'
Drag the Trusty MySQL charm to the canvas and Commit/Confirm
Now relate the Ghost charm to the MySQL charm
Commit/Confirm

Now after a while the MySQL charm will fail with the previous error in it's install hook

Revision history for this message
Jeff Pihach (hatch) wrote :

Output from `juju run --service mysql 'config-get'`:

sql 'config-get'
binlog-format: MIXED
block-size: 5
ceph-osd-replication-count: 2
dataset-size: 80%
flavor: distro
ha-bindiface: eth0
ha-mcastport: 5411
key: undefined
max-connections: -1
nagios_context: juju
preferred-storage-engine: InnoDB
query-cache-size: 0
query-cache-type: "OFF"
rbd-name: mysql1
source: undefined
tuning-level: safest
vip: ""
vip_cidr: 24
vip_iface: eth0

Revision history for this message
Jeff Pihach (hatch) wrote :

  mysql:
    charm: cs:trusty/mysql-4
    exposed: false
    relations:
      cluster:
      - mysql
      db:
      - ghost
    units:
      mysql/0:
        agent-state: error
        agent-state-info: 'hook failed: "install"'
        agent-version: 1.20.7
        machine: "2"
        public-address: ec2-54-197-90-141.compute-1.amazonaws.com

Revision history for this message
Jeff Pihach (hatch) wrote :

This appears to be an issue with the develop branch of the Juju GUI setting config fields without a defined default as `undefined`

Changed in mysql (Juju Charms Collection):
status: Incomplete → Invalid
Changed in juju-gui:
status: New → Fix Released
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.