Commit 5cbe7b69 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #44681 from wwwtyro/rye/disable-upstream-docker

Automatic merge from submit-queue (batch tested with PRs 44722, 44704, 44681, 44494, 39732) prevent installation of docker from upstream **What this PR does / why we need it**: Disallows installation of upstream docker from PPA in the Juju kubernetes-worker charm. **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 Disallows installation of upstream docker from PPA in the Juju kubernetes-worker charm. ```
parents 3cc0e4b5 20c36e9c
...@@ -12,6 +12,9 @@ includes: ...@@ -12,6 +12,9 @@ includes:
- 'interface:kubernetes-cni' - 'interface:kubernetes-cni'
- 'interface:kube-dns' - 'interface:kube-dns'
- 'interface:kube-control' - 'interface:kube-control'
config:
deletes:
- install_from_upstream
options: options:
basic: basic:
packages: packages:
......
...@@ -39,7 +39,6 @@ from charmhelpers.core import hookenv, unitdata ...@@ -39,7 +39,6 @@ from charmhelpers.core import hookenv, unitdata
from charmhelpers.core.host import service_stop, service_restart from charmhelpers.core.host import service_stop, service_restart
from charmhelpers.contrib.charmsupport import nrpe from charmhelpers.contrib.charmsupport import nrpe
# Override the default nagios shortname regex to allow periods, which we # Override the default nagios shortname regex to allow periods, which we
# need because our bin names contain them (e.g. 'snap.foo.daemon'). The # need because our bin names contain them (e.g. 'snap.foo.daemon'). The
# default regex in charmhelpers doesn't allow periods, but nagios itself does. # default regex in charmhelpers doesn't allow periods, but nagios itself does.
...@@ -54,6 +53,10 @@ db = unitdata.kv() ...@@ -54,6 +53,10 @@ db = unitdata.kv()
@hook('upgrade-charm') @hook('upgrade-charm')
def upgrade_charm(): def upgrade_charm():
# Trigger removal of PPA docker installation if it was previously set.
set_state('config.changed.install_from_upstream')
hookenv.atexit(remove_state, 'config.changed.install_from_upstream')
cleanup_pre_snap_services() cleanup_pre_snap_services()
check_resources_for_upgrade_needed() check_resources_for_upgrade_needed()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment