mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #48440 from Cynerva/gkk/snap-upgrades-restart-services
Automatic merge from submit-queue (batch tested with PRs 48439, 48440, 48394) Fix kubernetes charms not restarting services after snap upgrades **What this PR does / why we need it**: This fixes a problem where the Kubernetes charms don't restart services after upgrading snaps. This can cause certain fixes not to be picked up (for example https://github.com/juju-solutions/release/pull/10) **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note Fixed kubernetes charms not restarting services after snap upgrades ```
This commit is contained in:
commit
e1d9ab205a
@ -155,6 +155,7 @@ def install_snaps():
|
|||||||
hookenv.status_set('maintenance', 'Installing cdk-addons snap')
|
hookenv.status_set('maintenance', 'Installing cdk-addons snap')
|
||||||
snap.install('cdk-addons', channel=channel)
|
snap.install('cdk-addons', channel=channel)
|
||||||
set_state('kubernetes-master.snaps.installed')
|
set_state('kubernetes-master.snaps.installed')
|
||||||
|
remove_state('kubernetes-master.components.started')
|
||||||
|
|
||||||
|
|
||||||
@when('config.changed.channel')
|
@when('config.changed.channel')
|
||||||
|
@ -149,6 +149,7 @@ def install_snaps():
|
|||||||
hookenv.status_set('maintenance', 'Installing kube-proxy snap')
|
hookenv.status_set('maintenance', 'Installing kube-proxy snap')
|
||||||
snap.install('kube-proxy', channel=channel, classic=True)
|
snap.install('kube-proxy', channel=channel, classic=True)
|
||||||
set_state('kubernetes-worker.snaps.installed')
|
set_state('kubernetes-worker.snaps.installed')
|
||||||
|
set_state('kubernetes-worker.restart-needed')
|
||||||
remove_state('kubernetes-worker.snaps.upgrade-needed')
|
remove_state('kubernetes-worker.snaps.upgrade-needed')
|
||||||
remove_state('kubernetes-worker.snaps.upgrade-specified')
|
remove_state('kubernetes-worker.snaps.upgrade-specified')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user