install hook fails on xenial and later without retry

Bug #1781177 reported by Tom Haddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
InfluxDB Charm
Fix Released
Undecided
Stuart Bishop

Bug Description

Currently the influxdb charm install fails without a retry because lib/influxdbcharmlib.py does 'import influxdb' at the top, which will fail the first time since the package is not installed. Then the reactive handler gets run, which apt installs the python3-influxdb package and imports it into the reative/influxdb namespace. But lib/influxdbcharmlib.py still does not have it imported. And then the handler checks its local 'has influx client' flag, calls a method in lib/inflxdbcharmlib.py, and the method fails because the module was never imported into that namespace.

The fix is to add 'influxdb' to wheelhouse.txt, pull out all the magic, and assume the import will work

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

Or drop trusty support and remove all the import magic; it becomes a simple package install.

Tom Haddon (mthaddon)
Changed in influxdb-charm:
assignee: nobody → Stuart Bishop (stub)
Stuart Bishop (stub)
Changed in influxdb-charm:
status: New → 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.