TypeError: '<' not supported between instances of 'str' and 'int' when checking snapd version

Bug #1887678 reported by Michael Skalka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Layer
New
Undecided
Unassigned

Bug Description

Found during this test run: https://solutions.qa.canonical.com/qa/testRun/00e23a09-e2eb-4b09-ae41-41429c8f197f

On the prometheus charm. Full logs can be found in the `juju-crashdump-kubernetes` file in the `artifacts` link at the bottom of the test-run page.

From /var/log/juju/unit-prometheus-0.log:

2020-07-15 00:56:55 ERROR juju-log Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-prometheus-0/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 73, in main
    hookenv._run_atstart()
  File "/var/lib/juju/agents/unit-prometheus-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1332, in _run_atstart
    callback(*args, **kwargs)
  File "/var/lib/juju/agents/unit-prometheus-0/charm/reactive/snap.py", line 294, in configure_snap_store_proxy
    ensure_snapd_min_version('2.30')
  File "/var/lib/juju/agents/unit-prometheus-0/charm/reactive/snap.py", line 259, in ensure_snapd_min_version
    if snapd_version < LooseVersion(min_version):
  File "/usr/lib/python3.6/distutils/version.py", line 52, in __lt__
    c = self._cmp(other)
  File "/usr/lib/python3.6/distutils/version.py", line 337, in _cmp
    if self.version < other.version:
TypeError: '<' not supported between instances of 'str' and 'int'

2020-07-15 00:56:55 DEBUG install Traceback (most recent call last):
2020-07-15 00:56:55 DEBUG install File "/var/lib/juju/agents/unit-prometheus-0/charm/hooks/install", line 22, in <module>
2020-07-15 00:56:55 DEBUG install main()
2020-07-15 00:56:55 DEBUG install File "/var/lib/juju/agents/unit-prometheus-0/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 73, in main
2020-07-15 00:56:55 DEBUG install hookenv._run_atstart()
2020-07-15 00:56:55 DEBUG install File "/var/lib/juju/agents/unit-prometheus-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1332, in _run_atstart
2020-07-15 00:56:55 DEBUG install callback(*args, **kwargs)
2020-07-15 00:56:55 DEBUG install File "/var/lib/juju/agents/unit-prometheus-0/charm/reactive/snap.py", line 294, in configure_snap_store_proxy
2020-07-15 00:56:55 DEBUG install ensure_snapd_min_version('2.30')
2020-07-15 00:56:55 DEBUG install File "/var/lib/juju/agents/unit-prometheus-0/charm/reactive/snap.py", line 259, in ensure_snapd_min_version
2020-07-15 00:56:55 DEBUG install if snapd_version < LooseVersion(min_version):
2020-07-15 00:56:55 DEBUG install File "/usr/lib/python3.6/distutils/version.py", line 52, in __lt__
2020-07-15 00:56:55 DEBUG install c = self._cmp(other)
2020-07-15 00:56:55 DEBUG install File "/usr/lib/python3.6/distutils/version.py", line 337, in _cmp
2020-07-15 00:56:55 DEBUG install if self.version < other.version:
2020-07-15 00:56:55 DEBUG install TypeError: '<' not supported between instances of 'str' and 'int'

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.