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

Bug #1796967 reported by Narinder Gupta
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
landscape-client-charm
New
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

Revision history for this message
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.

Revision history for this message
Alvaro Uria (aluria) wrote :

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

tags: added: canonical-bootstack
Revision history for this message
Diko Parvanov (dparv) wrote :

workaround for this is easy: cp -r /usr/lib/python3/dist-packages/landscape/ /usr/lib/python2.7/dist-packages/

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.