snap-store-proxy settings not being correctly applied

Bug #1882868 reported by Chris Johnston
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Etcd Charm
Fix Released
Medium
Unassigned
Kubernetes Control Plane Charm
Fix Released
Medium
Unassigned
Kubernetes Worker Charm
Fix Released
Medium
Unassigned
Snap Layer
Fix Released
Undecided
Stuart Bishop

Bug Description

Charms using the snap layer are not properly applying snap-store-proxy configs from model-config. This appears to be caused by checking for the deprecated 'snap_proxy_url' which seems to have come from a couple of charms rather than 'snap_store_proxy_url' from the model-conifg. Repro:

$ juju add-model snap-test
$ juju model-config
...
snap-http-proxy default ""
snap-https-proxy default ""
snap-store-assertions controller |-
  type: store
  authority-id: canonical
  revision: 1
  store: fWH2JOYGcB0J5X0V5bmwvUc9lOswqn0m
  operator-id: 6KzCmN0esHnVQmCwxYPQg7rpJRht2CHn
  timestamp: 2020-05-05T14:57:12.150729Z
  url: http://<url>
  sign-key-sha3-384: ...

  ...
  ...
  ...
  ...
  ...
  ...
  ...
  ...
  ...
  ...
snap-store-proxy controller <id>
snap-store-proxy-url controller http://<url>
...

$ juju deploy cs:ubuntu
Located charm "cs:ubuntu-15".
Deploying charm "cs:ubuntu-15".

$ juju run --all -- sudo snap get core proxy -d
{
        "proxy": {
                "http": "",
                "https": "",
                "store": "<id>"
        }
}
$ juju deploy cs:canonical-livepatch
Located charm "cs:canonical-livepatch-35".
Deploying charm "cs:canonical-livepatch-35".
$ juju add-relation ubuntu canonical-livepatch
$ juju run --all -- sudo snap get core proxy -d
{
        "proxy": {
                "http": "",
                "https": "",
                "store": ""
        }
}
$ juju config canonical-livepatch snap_proxy_url="http://<url>"
$ juju run --all -- sudo snap get core proxy -d
{
        "proxy": {
                "http": "",
                "https": "",
                "store": "<id>"
        }
}

Revision history for this message
Cory Johns (johnsca) wrote :

This was re-reported at https://bugs.launchpad.net/layer-snap/+bug/1905009 with some more details.

Changed in layer-snap:
status: New → Confirmed
Changed in charm-etcd:
milestone: none → 1.20
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Stuart Bishop (stub) wrote :

Can we just drop all the deprecated snap proxy code now? Or do we need a Juju version check, running the deprecated code only for old Juju deployments? Latter requires keeping the config.yaml noise.

Revision history for this message
Stuart Bishop (stub) wrote :
Changed in layer-snap:
status: Confirmed → In Progress
assignee: nobody → Stuart Bishop (stub)
George Kraft (cynerva)
Changed in charm-etcd:
status: Confirmed → Triaged
milestone: 1.20 → 1.20+ck1
George Kraft (cynerva)
tags: added: backport-needed
George Kraft (cynerva)
Changed in charm-kubernetes-master:
milestone: none → 1.20+ck1
Changed in charm-kubernetes-worker:
milestone: none → 1.20+ck1
Changed in charm-kubernetes-master:
importance: Undecided → Medium
Changed in charm-kubernetes-worker:
importance: Undecided → Medium
Changed in charm-kubernetes-master:
status: New → Triaged
Changed in charm-kubernetes-worker:
status: New → Triaged
Stuart Bishop (stub)
Changed in layer-snap:
status: In Progress → Fix Released
George Kraft (cynerva)
Changed in charm-etcd:
status: Triaged → Fix Committed
Changed in charm-kubernetes-master:
status: Triaged → Fix Committed
Changed in charm-kubernetes-worker:
status: Triaged → Fix Committed
Revision history for this message
George Kraft (cynerva) wrote :
tags: removed: backport-needed
Changed in charm-etcd:
status: Fix Committed → Fix Released
Changed in charm-kubernetes-master:
status: Fix Committed → Fix Released
Changed in charm-kubernetes-worker:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.