no attribute 'is_container'

Bug #1714224 reported by extraymond@gmail.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PostgreSQL Charm
Fix Released
Undecided
Stuart Bishop

Bug Description

Hi! I've noticed that if I tro to unrelate the postgresql charm and gogs charm it got things wrong.

The debug-log says that:

unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken Traceback (most recent call last):
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken File "/var/lib/juju/agents/unit-postgresql-0/charm/hooks/db-relation-broken", line 19, in <module>
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken main()
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken File "/usr/local/lib/python3.5/dist-packages/charms/reactive/__init__.py", line 77, in main
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken hookenv._run_atstart()
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken File "/usr/local/lib/python3.5/dist-packages/charmhelpers/core/hookenv.py", line 984, in _run_atstart
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken callback(*args, **kwargs)
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken File "/var/lib/juju/agents/unit-postgresql-0/charm/reactive/snap.py", line 105, in ensure_snapd
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken if host.is_container() and not shutil.which('squashfuse'):
unit-postgresql-0: 19:19:15 DEBUG unit.postgresql/0.db-relation-broken AttributeError: module 'charmhelpers.core.host' has no attribute 'is_container'

Revision history for this message
Stuart Bishop (stub) wrote :

Something very odd happened here.

Did you have gogs and PostgreSQL installed in the same machine? Or subordinate charms installed onto the PostgreSQL application?

That particular code path is first called on installation (one of the first things that happens after charms.reactive bootstraps). For it to fail later, during the db-relation hook, indicates that the version of charmh-elpers installed by charms.reactive during initial setup has been destroyed, or the environment altered somehow so the wrong version of charm-helpers is being found.

Changed in postgresql-charm:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for PostgreSQL Charm because there has been no activity for 60 days.]

Changed in postgresql-charm:
status: Incomplete → Expired
Revision history for this message
Stuart Bishop (stub) wrote :

A similar issue was discovered where charms.reactive subordinate charms could downgrade dependencies, breaking the principal charm. PostgreSQL has been updated with better isolation to avoid this sort of victimization, and this should also solve this bug report no matter the root cause.

Changed in postgresql-charm:
status: Expired → Fix Released
assignee: nobody → Stuart Bishop (stub)
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.