Hook error when using commit-or-branch config

Bug #1777515 reported by Alexandre Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Discourse Charm
New
Undecided
Unassigned

Bug Description

When using the config "commit-or-branch" the install or upgrade phases fail due to a non-existing discourse directory. The directory keeps changing at every run so it's not possible to bypass it by renaming the directory and trying again.

Trace:

2018-06-18 20:28:59 ERROR juju-log Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-discourse-5/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 72, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-discourse-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 382, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-discourse-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 358, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-discourse-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 180, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-discourse-5/charm/reactive/git_deploy.py", line 51, in git_deploy_avail
    update_to_commit(config('commit-or-branch'), deploy_dir=new_deploy_dir)
  File "lib/charms/layer/git_deploy.py", line 49, in update_to_commit
    res = check_call(git_pull, shell=True)
  File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cd /srv/discourse/2018061820281518 && GIT_SSH=/var/lib/juju/agents/unit-discourse-5/charm/files/wrap_ssh.sh git pull' returned non-zero exit status 1.

2018-06-18 20:28:59 DEBUG install Traceback (most recent call last):
2018-06-18 20:28:59 DEBUG install File "/var/lib/juju/agents/unit-discourse-5/charm/hooks/install", line 19, in <module>
2018-06-18 20:28:59 DEBUG install main()
2018-06-18 20:28:59 DEBUG install File "/var/lib/juju/agents/unit-discourse-5/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 72, in main
2018-06-18 20:28:59 DEBUG install bus.dispatch(restricted=restricted_mode)
2018-06-18 20:28:59 DEBUG install File "/var/lib/juju/agents/unit-discourse-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 382, in dispatch
2018-06-18 20:28:59 DEBUG install _invoke(other_handlers)
2018-06-18 20:28:59 DEBUG install File "/var/lib/juju/agents/unit-discourse-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 358, in _invoke
2018-06-18 20:28:59 DEBUG install handler.invoke()
2018-06-18 20:28:59 DEBUG install File "/var/lib/juju/agents/unit-discourse-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 180, in invoke
2018-06-18 20:28:59 DEBUG install self._action(*args)
2018-06-18 20:28:59 DEBUG install File "/var/lib/juju/agents/unit-discourse-5/charm/reactive/git_deploy.py", line 51, in git_deploy_avail
2018-06-18 20:28:59 DEBUG install update_to_commit(config('commit-or-branch'), deploy_dir=new_deploy_dir)
2018-06-18 20:28:59 DEBUG install File "lib/charms/layer/git_deploy.py", line 49, in update_to_commit
2018-06-18 20:28:59 DEBUG install res = check_call(git_pull, shell=True)
2018-06-18 20:28:59 DEBUG install File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
2018-06-18 20:28:59 DEBUG install raise CalledProcessError(retcode, cmd)
2018-06-18 20:28:59 DEBUG install subprocess.CalledProcessError: Command 'cd /srv/discourse/2018061820281518 && GIT_SSH=/var/lib/juju/agents/unit-discourse-5/charm/files/wrap_ssh.sh git pull' returned non-zero exit status 1.
2018-06-18 20:28:59 ERROR juju.worker.uniter.operation runhook.go:113 hook "install" failed: exit status 1
2018-06-18 20:28:59 INFO juju.worker.uniter resolver.go:100 awaiting error resolution for "install" hook

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.