Unable to locate package python2, hook install fails in bionic 18.04.6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-haproxy |
Fix Released
|
Critical
|
Haw Loeung |
Bug Description
haproxy-62
hook install fails here:
unit-haproxy-0: 21:36:50 WARNING unit.haproxy/
That's since we have
root@juju-
Ubuntu 18.04.6 LTS \n \l
and here's the excerpt from hook install code. One release ago it would work. But not now and it fails trying to install not existing package python2
if awk -v bionic="18.04.5" -v distrib=
then
# Install missing python-yaml and python-apt packages
apt-get install -y python2 python-yaml python-apt
juju-log 'Invoking python-based install hook'
python2 hooks/hooks.py install
else
# Install missing python-yaml and python-apt packages
apt-get install -y python-yaml python-apt
juju-log 'Invoking python-based install hook'
python hooks/hooks.py install
fi
Related branches
- Paul Collins: Approve (lgtm)
- Canonical IS Reviewers: Pending requested
- The Canonical Sysadmins: Pending requested
-
Diff: 12 lines (+1/-2)1 file modifiedhooks/install (+1/-2)
- Joel Sing (community): Approve (+1)
- Canonical IS Reviewers: Pending requested
-
Diff: 11 lines (+1/-1)1 file modifiedhooks/install (+1/-1)
- Tom Haddon: Approve
- Paul Collins: Approve (lgtm)
-
Diff: 36 lines (+7/-17)1 file modifiedhooks/install (+7/-17)
Changed in charm-haproxy: | |
status: | New → In Progress |
importance: | Undecided → Critical |
assignee: | nobody → Haw Loeung (hloeung) |
Changed in charm-haproxy: | |
status: | In Progress → Fix Released |
The python2 is missing in bionic. version2. 7.15)
beside the above statement will work incorrectly, comparing these strings seems not right way to do it. It compares their length
for example 20.04 >= 18.04.5 will give falls and will work on focal as there's python2 package
but 18.04.6 >= 18.04.5 will be true ,but there's not python2 package in bionic, only python package(