charm doesn't work on trusty

Bug #1864032 reported by Junien F
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Grafana Charm
Won't Fix
Medium
Alvaro Uria

Bug Description

Hi,

There's an issue with "requests" in the wheelhouse, on trusty, specifically :

requests requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*' but the running Python is 3.4.3

I tried installing python 3.5 and updating the shebang of the upgrade-charm hook, but then it failed because "ImportError: No module named 'apt_pkg'"

Either this should be fixed, or trusty should be dropped for supported series.

Thanks !

2020-02-20 11:50:00 INFO upgrade-charm Reading package lists...
2020-02-20 11:50:00 INFO upgrade-charm Building dependency tree...
2020-02-20 11:50:00 INFO upgrade-charm Reading state information...
2020-02-20 11:50:00 INFO upgrade-charm build-essential is already the newest version.
2020-02-20 11:50:00 INFO upgrade-charm python3-dev is already the newest version.
2020-02-20 11:50:00 INFO upgrade-charm python3-setuptools is already the newest version.
2020-02-20 11:50:00 INFO upgrade-charm python3-wheel is already the newest version.
2020-02-20 11:50:00 INFO upgrade-charm python3-yaml is already the newest version.
2020-02-20 11:50:00 INFO upgrade-charm python3-pip is already the newest version.
2020-02-20 11:50:00 INFO upgrade-charm 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2020-02-20 11:50:00 INFO upgrade-charm Reading package lists...
2020-02-20 11:50:01 INFO upgrade-charm Building dependency tree...
2020-02-20 11:50:01 INFO upgrade-charm Reading state information...
2020-02-20 11:50:01 INFO upgrade-charm 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2020-02-20 11:50:02 INFO upgrade-charm Ignoring indexes: https://pypi.python.org/simple
2020-02-20 11:50:02 INFO upgrade-charm Collecting pip
2020-02-20 11:50:03 INFO upgrade-charm Building wheels for collected packages: pip
2020-02-20 11:50:03 INFO upgrade-charm Running setup.py bdist_wheel for pip: started
2020-02-20 11:50:04 INFO upgrade-charm Running setup.py bdist_wheel for pip: finished with status 'done'
2020-02-20 11:50:04 INFO upgrade-charm Stored in directory: /root/.cache/pip/wheels/26/de/47/6a67c670fdbcef410864448110cda0ff38d7b42ca7f1f2cb47
2020-02-20 11:50:04 INFO upgrade-charm Successfully built pip
2020-02-20 11:50:04 INFO upgrade-charm Installing collected packages: pip
2020-02-20 11:50:04 INFO upgrade-charm Found existing installation: pip 8.1.2
2020-02-20 11:50:04 INFO upgrade-charm Uninstalling pip-8.1.2:
2020-02-20 11:50:04 INFO upgrade-charm Successfully uninstalled pip-8.1.2
2020-02-20 11:50:05 INFO upgrade-charm Successfully installed pip-18.1
2020-02-20 11:50:06 INFO upgrade-charm Looking in links: wheelhouse
2020-02-20 11:50:06 INFO upgrade-charm Collecting setuptools
2020-02-20 11:50:06 INFO upgrade-charm Requirement already up-to-date: setuptools-scm in /var/lib/juju/agents/unit-grafana-0/.venv/lib/python3.4/site-packages (1.17.0)
2020-02-20 11:50:06 INFO upgrade-charm Building wheels for collected packages: setuptools
2020-02-20 11:50:06 INFO upgrade-charm Running setup.py bdist_wheel for setuptools: started
2020-02-20 11:50:07 INFO upgrade-charm Running setup.py bdist_wheel for setuptools: finished with status 'done'
2020-02-20 11:50:07 INFO upgrade-charm Stored in directory: /root/.cache/pip/wheels/b6/43/c1/bbaf7f0af330714f247050bd64e5c5aa70eecf4c1ce3319ceb
2020-02-20 11:50:07 INFO upgrade-charm Successfully built setuptools
2020-02-20 11:50:07 INFO upgrade-charm Installing collected packages: setuptools
2020-02-20 11:50:07 INFO upgrade-charm Found existing installation: setuptools 39.0.1
2020-02-20 11:50:07 INFO upgrade-charm Uninstalling setuptools-39.0.1:
2020-02-20 11:50:07 INFO upgrade-charm Successfully uninstalled setuptools-39.0.1
2020-02-20 11:50:07 INFO upgrade-charm Successfully installed setuptools-41.6.0
2020-02-20 11:50:07 INFO upgrade-charm Looking in links: wheelhouse
2020-02-20 11:50:07 INFO upgrade-charm Processing ./wheelhouse/charms.reactive-1.3.0.tar.gz
2020-02-20 11:50:08 INFO upgrade-charm Processing ./wheelhouse/six-1.13.0.tar.gz
2020-02-20 11:50:08 INFO upgrade-charm Processing ./wheelhouse/netaddr-0.7.19.tar.gz
2020-02-20 11:50:09 INFO upgrade-charm Processing ./wheelhouse/Tempita-0.5.2.tar.gz
2020-02-20 11:50:09 INFO upgrade-charm Processing ./wheelhouse/PyYAML-5.2.tar.gz
2020-02-20 11:50:09 INFO upgrade-charm Processing ./wheelhouse/pyaml-19.12.0.tar.gz
2020-02-20 11:50:10 INFO upgrade-charm Processing ./wheelhouse/requests-2.22.0.tar.gz
2020-02-20 11:50:10 INFO upgrade-charm requests requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*' but the running Python is 3.4.3
2020-02-20 11:50:10 INFO upgrade-charm Traceback (most recent call last):
2020-02-20 11:50:10 INFO upgrade-charm File "/var/lib/juju/agents/unit-grafana-0/charm/hooks/upgrade-charm", line 8, in <module>
2020-02-20 11:50:10 INFO upgrade-charm basic.bootstrap_charm_deps()
2020-02-20 11:50:10 INFO upgrade-charm File "lib/charms/layer/basic.py", line 117, in bootstrap_charm_deps
2020-02-20 11:50:10 INFO upgrade-charm '-f', 'wheelhouse'] + glob('wheelhouse/*'))
2020-02-20 11:50:10 INFO upgrade-charm File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
2020-02-20 11:50:10 INFO upgrade-charm raise CalledProcessError(retcode, cmd)
2020-02-20 11:50:10 INFO upgrade-charm subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-grafana-0/.venv/bin/pip', 'install', '-U', '--ignore-installed', '--no-index', '-f', 'wheelhouse', 'wheelhouse/charms.reactive-1.3.0.tar.gz', 'wheelhouse/six-1.13.0
.tar.gz', 'wheelhouse/netaddr-0.7.19.tar.gz', 'wheelhouse/Tempita-0.5.2.tar.gz', 'wheelhouse/PyYAML-5.2.tar.gz', 'wheelhouse/pyaml-19.12.0.tar.gz', 'wheelhouse/requests-2.22.0.tar.gz', 'wheelhouse/MarkupSafe-1.1.1.tar.gz', 'wheelhouse/certifi-2019.11.28.tar.gz', 'wheelho
use/urllib3-1.25.7.tar.gz', 'wheelhouse/wheel-0.33.6.tar.gz', 'wheelhouse/setuptools-41.6.0.zip', 'wheelhouse/pip-18.1.tar.gz', 'wheelhouse/setuptools_scm-1.17.0.tar.gz', 'wheelhouse/charmhelpers-0.20.7.tar.gz', 'wheelhouse/chardet-3.0.4.tar.gz', 'wheelhouse/idna-2.8.tar
.gz', 'wheelhouse/Jinja2-2.10.3.tar.gz']' returned non-zero exit status 1
2020-02-20 11:50:10 ERROR juju.worker.uniter.operation runhook.go:107 hook "upgrade-charm" failed: exit status 1

Related branches

Alvaro Uria (aluria)
Changed in charm-grafana:
status: New → Confirmed
assignee: nobody → Alvaro Uria (aluria)
Revision history for this message
Alvaro Uria (aluria) wrote :

In order to fix the "requests" error, wheelhouse.txt would need to be updated to:
"""
requests<=2.21 # supports py34 (trusty)
"""

However, trusty support in LXD containers is broken since layer-snap was added [1]. I'm going to discuss if we should continue trusty support and figure out how we could test it (ie. on KVM?).

1. https://git.launchpad.net/layer-snap/tree/reactive/snap.py#n127

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

Trusty support is going to be removed on next release (stable/20.02), which is now merged into master.

Changed in charm-grafana:
status: Confirmed → Fix Committed
importance: Undecided → Medium
Alvaro Uria (aluria)
Changed in charm-grafana:
milestone: none → 20.02
Revision history for this message
Paul Collins (pjdc) wrote :

This bug is not fixed. "Won't Fix" seems like a more appropriate final status.

Also, FWIW, we're not using grafana in an LXD container.

Changed in charm-grafana:
status: Fix Committed → Confirmed
Alvaro Uria (aluria)
Changed in charm-grafana:
status: Confirmed → Won't Fix
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.