"python-hosts" missing dependency

Bug #2019733 reported by Giuseppe Petralia
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
userdir-ldap-charms
Fix Released
Medium
Unassigned

Bug Description

On Jammy install fails with python_hosts module missing

```
2023-05-15 14:03:37 WARNING unit.ud-ldap-standalone/1.install logger.go:60 Traceback (most recent call last):
2023-05-15 14:03:37 WARNING unit.ud-ldap-standalone/1.install logger.go:60 File "/var/lib/juju/agents/unit-ud-ldap-standalone-1/charm/hooks/install.real", line 26, in <module>
2023-05-15 14:03:37 WARNING unit.ud-ldap-standalone/1.install logger.go:60 import utils
2023-05-15 14:03:37 WARNING unit.ud-ldap-standalone/1.install logger.go:60 File "/var/lib/juju/agents/unit-ud-ldap-standalone-1/charm/hooks/utils.py", line 23, in <module>
2023-05-15 14:03:37 WARNING unit.ud-ldap-standalone/1.install logger.go:60 from python_hosts.hosts import Hosts, HostsEntry
2023-05-15 14:03:37 WARNING unit.ud-ldap-standalone/1.install logger.go:60 ModuleNotFoundError: No module named 'python_hosts.hosts'
2023-05-15 14:03:37 ERROR juju.worker.uniter.operation runhook.go:180 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2023-05-15 14:04:49 DEBUG unit.ud-ldap-standalone/1.install logger.go:60 Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
```

workaround is to run on the unit

pip install python-hosts

tags: added: bseng-1193
Paul Collins (pjdc)
Changed in charm-userdir-ldap:
status: New → Confirmed
Revision history for this message
Paul Collins (pjdc) wrote :

There was an attempted fix for this committed for bug 2012099, but the results don't appear in the charmhub-published version on edge (15) perhaps because the fix was implemented via a Makefile, which charmcraft.yaml (and therefore the Launchpad builders) do not invoke.

I'm currently running from a local charm generated with "make build", which works nicely.

The suggested workaround is not ideal for most of our environments because egress traffic is strictly filtered.

Eric Chen (eric-chen)
tags: added: good-first-bug
Eric Chen (eric-chen)
Changed in charm-userdir-ldap:
importance: Undecided → Medium
Revision history for this message
Eric Chen (eric-chen) wrote :
Changed in charm-userdir-ldap:
status: Confirmed → Fix Released
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.