Charm revision 30 (currrent latest/stable) is not compatible with Ubuntu bionic

Bug #2024012 reported by Pedro Castillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hw-health-charm
Fix Released
High
Ashley James

Bug Description

After updating the hw-health charm revision 24 to 30 on an Ubuntu bionic machine, the upgrade failed because the charm doesn't work with python 3.6 anymore, which is the default python version for Ubuntu bionic.

Here is the traceback from `juju debug-log`:
```bash
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm pip requires Python '>=3.7' but the running Python is 3.6.9
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm Traceback (most recent call last):
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm File "/var/lib/juju/agents/unit-hw-health-38/charm/hooks/upgrade-charm", line 8, in <module>
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm basic.bootstrap_charm_deps()
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm File "lib/charms/layer/basic.py", line 202, in bootstrap_charm_deps
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm _update_if_newer(pip, pre_install_pkgs)
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm File "lib/charms/layer/basic.py", line 367, in _update_if_newer
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm pkg], env=_get_subprocess_env())
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm raise CalledProcessError(retcode, cmd)
unit-hw-health-38: 16:55:22 WARNING unit.hw-health/38.upgrade-charm subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-hw-health-38/.venv/bin/pip', 'install', '-U', '--no-index', '-f', 'wheelhouse', 'pip']' returned non-zero exit status 1.
unit-hw-health-38: 16:55:22 ERROR juju.worker.uniter.operation hook "upgrade-charm" (via explicit, bespoke hook script) failed: exit status 1
```

The charm supposedly supports Ubuntu bionic, but the Python version running in bionic by default (`3.6.9`) doesn't work with the charm.

Tags: bseng-1285

Related branches

Eric Chen (eric-chen)
Changed in charm-hw-health:
importance: Undecided → High
status: New → Triaged
tags: added: bseng-1285
Ashley James (dashmage)
Changed in charm-hw-health:
assignee: nobody → Ashley James (dashmage)
Revision history for this message
Ashley James (dashmage) wrote (last edit ):

Local test environment:
1. Deploy ubuntu bionic series.

$ juju deploy ubuntu --series bionic ubuntu-bionic

2. Deploy hw-health rev 24 and rev 30 (rev 30 is from latest/stable channel)

$ juju deploy hw-health --revision 24 --channel latest/stable hw-health-old
$ juju deploy hw-health

Upon trying to reproduce the issue, these are my findings:
1. When trying to relate hw-health rev 30 charm with ubuntu-bionic, I'm facing the same error as presented in the bug report.
2. When trying to relate the hw-health rev 24 charm with ubuntu-bionic, the hw-health charm is stuck in `maintenance` phase with the message "Installing freeipmi,libipc-run-perl". The agent is idle and there are no logs in juju debug-logs as well.

We could possibly deprecate bionic (along with xenial 16.04) since bionic is already EOL and there doesn't seem to be an easy way to fix the python version dependency for pip (the error appears from the lower level install/upgrade hook code).

Eric Chen (eric-chen)
Changed in charm-hw-health:
status: Triaged → Fix Committed
Chi Wai CHAN (raychan96)
Changed in charm-hw-health:
milestone: none → 23.07
Ashley James (dashmage)
Changed in charm-hw-health:
status: Fix Committed → 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.