charm can not be deployed with ppa:landscape/18.03 on xenial

Bug #1796967 reported by Narinder Gupta on 2018-10-09
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
landscape-client-charm
Undecided
Unassigned

Bug Description

charm install issue with we are using ppa:landscape/18.03

2018-10-09 19:47:02 DEBUG juju.worker.uniter.operation executor.go:90 executing operation "run config-changed hook"
2018-10-09 19:47:02 DEBUG juju.worker.uniter agent.go:17 [AGENT-STATUS] executing: running config-changed hook
2018-10-09 19:47:03 DEBUG config-changed Traceback (most recent call last):
2018-10-09 19:47:03 DEBUG config-changed File "/var/lib/juju/agents/unit-landscape-client-2/charm/hooks/hooks.py", line 16, in <module>
2018-10-09 19:47:03 DEBUG config-changed from common import (
2018-10-09 19:47:03 DEBUG config-changed File "/var/lib/juju/agents/unit-landscape-client-2/charm/hooks/common.py", line 19, in <module>
2018-10-09 19:47:03 DEBUG config-changed from landscape.configuration import (
2018-10-09 19:47:03 DEBUG config-changed ImportError: No module named landscape.configuration
2018-10-09 19:47:03 ERROR juju.worker.uniter.operation runhook.go:114 hook "config-changed" failed: exit status 1
2018-10-09 19:47:03 DEBUG juju.machinelock machinelock.go:180 machine lock released for uniter (run config-changed hook)
2018-10-09 19:47:03 DEBUG juju.worker.uniter.operation executor.go:74 lock released

  landscape-client:
    charm: cs:xenial/landscape-client
    series: xenial
    options:
      account-name: "standalone"
      origin: ppa:landscape/18.03

  landscape-server:
    charm: *landscape-charm
    series: xenial
    bindings:
      "": *oam-space
    options:
      source: ppa:landscape/18.03
      key: 4652B4E6
    num_units: 3
    to:
    - 27
    - 32
    - 35

Pedro Guimarães (pguimaraes) wrote :

The issue here is that ppa:landscape/18.03 installs python3 libs whereas Juju uses Python 2.7 to execute its charms. So, we can see errors like:

 ImportError: No module named landscape.configuration

And when we search for landscape packages we find them under python3 dist-packages:

$ dpkg-query --listfiles landscape-client | grep configuration
/usr/lib/python3/dist-packages/landscape/client/configuration.py

The viable work-around is to pin on 17.03 as long as charms run on python 2.7.

Alvaro Uria (aluria) wrote :

This also affects origin="ppa:landscape/19.01", when deployed in Xenial.

tags: added: canonical-bootstack
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers