Charm install fails with hook failed: "website-relation-joined"

Bug #1996425 reported by Bas de Bruijne
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Landscape Charm
New
Undecided
Unassigned

Bug Description

Landscape-server latest/edge Rev. 58 fails to install with:

```
landscape-postgresql/0* active idle 2 10.246.167.128 5432/tcp Live master (12.12)
  canonical-livepatch/1 active idle 10.246.167.128 Running kernel 5.4.0-131.147-generic, patchState: nothing-to-apply (source version/commit f1e83ae)
  filebeat/1 active idle 10.246.167.128 Filebeat ready.
  landscape-client/0* maintenance idle 10.246.167.128 Need computer-title and juju-info to proceed
  logrotated/1 active idle 10.246.167.128 Unit is ready.
  nrpe/1 active idle 10.246.167.128 icmp,5666/tcp Ready
  ntp/1 active idle 10.246.167.128 123/udp chrony: Ready
  telegraf/1 active idle 10.246.167.128 9103/tcp Monitoring landscape-postgresql/0 (source version/commit d208a64)
landscape-rabbitmq-server/0* active idle 7 10.246.165.7 5672/tcp Unit is ready
  canonical-livepatch/3 active idle 10.246.165.7 Running kernel 5.4.0-131.147-generic, patchState: nothing-to-apply (source version/commit f1e83ae)
  filebeat/3 active idle 10.246.165.7 Filebeat ready.
  landscape-client/2 maintenance idle 10.246.165.7 Need computer-title and juju-info to proceed
  logrotated/3 active idle 10.246.165.7 Unit is ready.
  nrpe/3 active idle 10.246.165.7 icmp,5666/tcp Ready
  ntp/3 active idle 10.246.165.7 123/udp chrony: Ready
  telegraf/3 active idle 10.246.165.7 9103/tcp Monitoring landscape-rabbitmq-server/0 (source version/commit d208a64)
landscape-server-haproxy/0* maintenance idle 5 10.246.164.152 Configuring HAProxy
  canonical-livepatch/2 active idle 10.246.164.152 Running kernel 5.4.0-131.147-generic, patchState: nothing-to-apply (source version/commit f1e83ae)
  filebeat/2 active idle 10.246.164.152 Filebeat ready.
  landscape-client/1 maintenance idle 10.246.164.152 Need computer-title and juju-info to proceed
  logrotated/2 active idle 10.246.164.152 Unit is ready.
  nrpe/2 active idle 10.246.164.152 icmp,5666/tcp Ready
  ntp/2 active idle 10.246.164.152 123/udp chrony: Ready
  telegraf/2 active idle 10.246.164.152 9103/tcp Monitoring landscape-server-haproxy/0 (source version/commit d208a64)
landscape-server/0* error idle 6 10.246.167.51 hook failed: "website-relation-joined"
  canonical-livepatch/0* active idle 10.246.167.51 Running kernel 5.4.0-131.147-generic, patchState: nothing-to-apply (source version/commit f1e83ae)
  filebeat/0* active idle 10.246.167.51 Filebeat ready.
  logrotated/0* active idle 10.246.167.51 Unit is ready.
  nrpe/0* active idle 10.246.167.51 icmp,5666/tcp Ready
  ntp/0* active idle 10.246.167.51 123/udp chrony: Ready, OK: chronyd has only been running 231 seconds
  telegraf/0* active idle 10.246.167.51 9103/tcp Monitoring landscape-server/0 (source version/commit d208a64)
```
The charm configs are as described in https://docs.google.com/presentation/d/1FNQcxTUxRWLmOiz9R_j80wfKi8Gc6JOzZ7L9AlfT2VA/edit#slide=id.g1516ad5ef40_0_53

In the charmlog we see:

```
unit-landscape-server-0: 20:02:19 ERROR unit.landscape-server/0.juju-log website:79: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "./src/charm.py", line 569, in <module>
    main(LandscapeServerCharm)
  File "/var/lib/juju/agents/unit-landscape-server-0/charm/venv/ops/main.py", line 431, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-landscape-server-0/charm/venv/ops/main.py", line 142, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-landscape-server-0/charm/venv/ops/framework.py", line 316, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-landscape-server-0/charm/venv/ops/framework.py", line 784, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-landscape-server-0/charm/venv/ops/framework.py", line 857, in _reemit
    custom_handler(event)
  File "./src/charm.py", line 367, in _website_relation_joined
    with open(error_file_path, "rb") as error_file:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/canonical/landscape/canonical/landscape/offline/unauthorized-haproxy.html'
unit-landscape-server-0: 20:02:19 ERROR juju.worker.uniter.operation hook "website-relation-joined" (via hook dispatching script: dispatch) failed: exit status 1
```

Tags: cdo-qa
tags: added: cdo-qa
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.