net-tools package missing after series-upgrade following charm upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Keepalived Charm |
Fix Released
|
Undecided
|
Adam Dyess |
Bug Description
After performing a series upgrade from bionic to focal, the net-tools package got removed and thus broke the post-series-upgrade hook of the keepalived charm (revision 98). Please see attached log.
The reason for this is because prior to the series upgrade a charm upgrade was performed to go from revision 28 to 98.
In revision 28, net-tools is not being installed:
@when_not(
def install_
''' Install keepalived package '''
status_
apt_
apt_
set_
While it is since revision 71:
@when_not(
def install_
''' Install keepalived package '''
status.
apt_
apt_
set_
However, the upgrade_charm hook does not clear the flag 'keepalived.
@hook('
def upgrade_charm():
clear_
=> perhaps we just need to add clear_flag(
Changed in charm-keepalived: | |
status: | In Progress → Fix Committed |
milestone: | none → 1.24 |
Changed in charm-keepalived: | |
status: | Fix Committed → Fix Released |
I wouldn't suppose changing the `upgrade-charm` hook is appropriate to address a series-upgrade issue. Perhaps clearing the 'keepalived. package. installed' flag during the "post-series- upgrade" hook is more appropriate
The reactive bits are setup to only reconfigure keepalived when it's installed, but not started. This should force an apt install of keepalived and net-tools before anything reconfigure occurs.
Proposal: https:/ /github. com/charmed- kubernetes/ charm-keepalive d/pull/ 16