charmhelpers.contrib.network.ip needs to install python3-netifaces on xenial
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Fix Released
|
Undecided
|
Felipe Reyes |
Bug Description
charmhelpers.
But on Xenial, this package is called python3-netifaces. (python-netifaces exists. But it is for the wrong python version)
This is even more perfidious because one can not use the basic-layer apt dependencies to fix this. Because the import happens at load time of the hooks. Before any dependencies can be pulled from any other code.
I suppose a valid workaround is trying to install both versions of the package.
apt_install(
I'm pretty sure this problem exists for other packages which are pulled in by charmhelpers too.
Just a few lines below is python-netaddr. That one has the same problem for sure.
Cheers
Tilman Baumann
Related branches
- Stuart Bishop (community): Approve
-
Diff: 277 lines (+73/-18)10 files modifiedcharmhelpers/contrib/database/mysql.py (+5/-1)
charmhelpers/contrib/hardening/templating.py (+5/-1)
charmhelpers/contrib/mellanox/infiniband.py (+6/-1)
charmhelpers/contrib/network/ip.py (+16/-4)
charmhelpers/contrib/openstack/context.py (+4/-1)
charmhelpers/contrib/openstack/templating.py (+8/-2)
charmhelpers/contrib/python/packages.py (+9/-2)
tests/contrib/network/test_ip.py (+9/-2)
tests/contrib/openstack/test_os_templating.py (+4/-1)
tests/contrib/python/test_packages.py (+7/-3)
tags: | added: chamhelpers juju python3 |
Changed in charm-helpers: | |
assignee: | nobody → Felipe Reyes (freyes) |
Changed in charm-helpers: | |
status: | New → Fix Committed |
Changed in charm-helpers: | |
status: | Fix Committed → Fix Released |
Other modules use 'if six.PY2' to detect the Python version and install the correct package.