charm fails to deploy on bionic

Bug #1748433 reported by Tom Haddon
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Elasticsearch Charm
Fix Released
High
Aymen Frikha

Bug Description

To test bionic support, I built a charm that added bionic to metadata.yaml and ran it through our CI. This was against a model with three elasticsearch units.

I got the following error:

2018-02-09 12:01:41 DEBUG config-changed
2018-02-09 12:01:41 DEBUG config-changed PLAY [localhost] ***************************************************************
2018-02-09 12:01:41 DEBUG config-changed
2018-02-09 12:01:41 DEBUG config-changed TASK [Gathering Facts] *********************************************************
2018-02-09 12:01:41 DEBUG config-changed ok: [localhost]
2018-02-09 12:01:41 DEBUG config-changed
2018-02-09 12:01:41 DEBUG config-changed TASK [Add apt key.] ************************************************************
2018-02-09 12:01:42 DEBUG config-changed ok: [localhost]
2018-02-09 12:01:42 DEBUG config-changed
2018-02-09 12:01:42 DEBUG config-changed TASK [Add apt archive.] ********************************************************
2018-02-09 12:01:42 DEBUG config-changed ok: [localhost]
2018-02-09 12:01:42 DEBUG config-changed
2018-02-09 12:01:42 DEBUG config-changed TASK [Update ufw config to avoid error] ****************************************
2018-02-09 12:01:42 DEBUG config-changed changed: [localhost]
2018-02-09 12:01:42 DEBUG config-changed
2018-02-09 12:01:42 DEBUG config-changed TASK [Disable firewall only when explicitly configured to do so.] **************
2018-02-09 12:01:43 DEBUG config-changed ok: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Reset firewall] **********************************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Turn on fire wall with logging.] *****************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Open the firewall for all clients] ***************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost] => (item=relations["client"])
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Deny all other requests on 9200] *****************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Open the firewall for all peers] *****************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost] => (item=relations["peer"])
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Record current cluster health] *******************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Deny all incoming requests on 9300 once unit is part of cluster] *********
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Update elasticsearch.yml] ************************************************
2018-02-09 12:01:44 DEBUG config-changed fatal: [localhost]: FAILED! => {"changed": true, "failed": true, "msg": "Source /root/.ansible/tmp/ansible-tmp-1518177703.87-171782118040759/source not found"}
2018-02-09 12:01:44 DEBUG config-changed to retry, use: --limit @/var/lib/juju/agents/unit-elasticsearch-0/charm/playbook.retry
2018-02-09 12:01:44 DEBUG config-changed
2018-02-09 12:01:44 DEBUG config-changed PLAY RECAP *********************************************************************
2018-02-09 12:01:44 DEBUG config-changed localhost : ok=5 changed=1 unreachable=0 failed=1
2018-02-09 12:01:44 DEBUG config-changed
2018-02-09 12:01:44 DEBUG config-changed Traceback (most recent call last):
2018-02-09 12:01:44 DEBUG config-changed File "/var/lib/juju/agents/unit-elasticsearch-0/charm/hooks/config-changed", line 107, in <module>
2018-02-09 12:01:44 DEBUG config-changed hooks.execute(sys.argv)
2018-02-09 12:01:44 DEBUG config-changed File "/var/lib/juju/agents/unit-elasticsearch-0/charm/hooks/charmhelpers/contrib/ansible/__init__.py", line 229, in execute
2018-02-09 12:01:44 DEBUG config-changed self.playbook_path, tags=[hook_name], extra_vars=extra_vars)
2018-02-09 12:01:44 DEBUG config-changed File "/var/lib/juju/agents/unit-elasticsearch-0/charm/hooks/charmhelpers/contrib/ansible/__init__.py", line 161, in apply_playbook
2018-02-09 12:01:44 DEBUG config-changed subprocess.check_call(call, env=env)
2018-02-09 12:01:44 DEBUG config-changed File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
2018-02-09 12:01:44 DEBUG config-changed raise CalledProcessError(retcode, cmd)
2018-02-09 12:01:44 DEBUG config-changed subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'playbook.yaml', '--tags', 'config-changed']' returned non-zero exit status 2.
2018-02-09 12:01:44 ERROR juju.worker.uniter.operation runhook.go:107 hook "config-changed" failed: exit status 1

Related branches

James Hebden (ec0)
Changed in elasticsearch-charm:
status: New → Confirmed
importance: Undecided → High
Changed in elasticsearch-charm:
assignee: nobody → Aymen Frikha (aym-frikha)
Revision history for this message
Aymen Frikha (aym-frikha) wrote :

Ansible version changed from 2.0 to 2.5 and there is several changes in newer version. The default config of remote_tmp changed from " $HOME/.ansible/tmp" to "~/.ansible/tmp". In my opinion it's better that the charmhelper library handle this parameter to avoid any problem related to this in newer versions. I will submit a patch to charmhelpers shortly.

Revision history for this message
Aymen Frikha (aym-frikha) wrote :
Revision history for this message
Aymen Frikha (aym-frikha) wrote :
Changed in elasticsearch-charm:
status: Confirmed → Fix Committed
Changed in elasticsearch-charm:
status: Fix Committed → In Progress
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

See also merged pull request on charm-helpers: https://github.com/juju/charm-helpers/pull/181

Changed in elasticsearch-charm:
status: In Progress → Fix Committed
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

Not sure exactly what charm rev this landed in, but it is at least included in rev >= 30:

https://jujucharms.com/elasticsearch/

Setting Fix Released.

Changed in elasticsearch-charm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.