"install" hook error caused by certifi library dropping python 3.5 supports

Bug #1979366 reported by Tianqi Xiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Telegraf Charm
Fix Released
Undecided
Tianqi Xiao

Bug Description

The telegraf charm is using requests python library when dealing with units with a public address (ex. percona-cluster). One of its dependencies, certifi library, has dropped python 3.5 support since version 2022.05.18. Consequently, the telegraf charm resulted in error state when running the "install" hook.

```
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install certifi requires Python '>=3.6' but the running Python is 3.5.2
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install Traceback (most recent call last):
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install File "/var/lib/juju/agents/unit-telegraf-0/charm/hooks/install", line 8, in <module>
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install basic.bootstrap_charm_deps()
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install File "lib/charms/layer/basic.py", line 226, in bootstrap_charm_deps
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install env=_get_subprocess_env())
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install raise CalledProcessError(retcode, cmd)
unit-telegraf-0: 18:30:25 WARNING unit.telegraf/0.install subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-telegraf-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'certifi==2022.6.15', 'netaddr==0.7.19', 'defusedxml==0.5.0', 'urllib3==1.24.3', 'insights-core==3.0.279', 'tenacity==5.0.3', 'pyaml==21.10.1', 'msgpack==1.0.3', 'CacheControl==0.12.6', 'six==1.16.0', 'Jinja2==2.11.3', 'PyYAML==5.3.1', 'chardet==3.0.4', 'pbr==5.9.0', 'lockfile==0.12.2', 'charms.reactive==1.5.0', 'charmhelpers==1.2.1', 'idna==2.8', 'redis==3.3.11', 'requests==2.21.0']' returned non-zero exit status 1
unit-telegraf-0: 18:30:26 ERROR juju.worker.uniter.operation hook "install" (via explicit, bespoke hook script) failed: exit status 1
```

So we need to limit the certifi version to ensure the python 3.5 support.

Related branches

Tianqi Xiao (txiao)
Changed in charm-telegraf:
assignee: nobody → Tianqi Xiao (txiao)
Revision history for this message
Tianqi Xiao (txiao) wrote :

The final decision on handling dependency issues in legacy series (e.g. xenial) is:
- Drop legacy series support in main development track
- Create a new branch and channel to track legacy series

Changed in charm-telegraf:
status: New → Fix Committed
milestone: none → 22.08
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.