Charm may skip installation of required deb package
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-octavia-diskimage-retrofit |
Fix Released
|
High
|
Frode Nordahl |
Bug Description
The charm lists ``distro-info`` as a required package, however during a gate test we ended up with this situation:
2020-05-11 08:18:53 INFO juju-log Initializing Snap Layer
2020-05-11 08:18:53 DEBUG retrofit-image none
2020-05-11 08:18:54 DEBUG retrofit-image All snaps up to date.
2020-05-11 08:18:54 DEBUG juju-log Running action "retrofit-image"
2020-05-11 08:18:54 INFO juju-log DEPRECATION WARNING: Function action_get is being removed : moved to function_get()
2020-05-11 08:18:55 ERROR juju-log action "retrofit-image" failed: "[Errno 2] No such file or directory: 'distro-info': 'distro-info'" "Traceback (most recent call last):
File "/var/lib/
action(args)
File "/var/lib/
ch_
File "lib/charm/
series=
File "lib/charm/
output = subprocess.
File "/usr/lib/
**kwargs)
File "/usr/lib/
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/
restore_
File "/usr/lib/
raise child_exception
FileNotFoundError: [Errno 2] No such file or directory: 'distro-info': 'distro-info'
"
2020-05-11 08:18:55 INFO juju-log DEPRECATION WARNING: Function action_fail is being removed : moved to function_fail()
Looking at the reactive handlers of the charm:
charm.use_defaults(
'charm.
'config.
'update-
'upgrade-
)
@reactive.
def check_snap_
# Installation is handled by the ``snap`` layer, just update our status.
with charm.provide_
reactive.
While the above code was fine when the charm relied only on the snap to do its work, it does not guarantee that the now required ``distro-info`` package is installed in the system before it announces itself as being ready.
Changed in charm-octavia-diskimage-retrofit: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 20.05 |
Changed in charm-octavia-diskimage-retrofit: | |
assignee: | nobody → Frode Nordahl (fnordahl) |
status: | Triaged → In Progress |
Changed in charm-octavia-diskimage-retrofit: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. opendev. org/726795
Review: https:/