You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interface relies on deprecated controller storage (canonical/operator#882). If a charm respects this deprecation notice and sets use_juju_for_storage=False then the state stored in self._stored.current_url (for example) can be lost.
To Reproduce
Deploy a charm which uses the ingress relation and amend the charm to echo the value of url property of the ingress requires interface. This should return a url. Build a new copy of the charm with use_juju_for_storage=False and upgrade the existing charm. The url property will now be None.
A more longwinded way:
$ git clone https://opendev.org/openstack/charm-placement-k8s
$ cd charm-placement-k8s/
$ juju download --series jammy --channel yoga/edge placement-k8s
$ mv placement*.charm placement-k8s.charm
$ tox -e func-smoke
...
$ juju status placement
Model Controller Cloud/Region Version SLA Timestamp
zaza-df54e5a6cf87 micro microk8s/localhost 2.9.34 unsupported 11:42:18Z
App Version Status Scale Charm Channel Rev Address Exposed Message
placement active 1 placement-k8s 0 10.152.183.48 no
Unit Workload Agent Address Ports Message
placement/0* active idle 10.1.124.51
$ mkdir /tmp/charm-tmp
$ unzip -d /tmp/charm-tmp placement-k8s.charm
$ sed -i -e 's/use_juju_for_storage=True/use_juju_for_storage=False/' /tmp/charm-tmp/src/charm.py
$ cd /tmp/charm-tmp
$ zip -r /tmp/placement.charm *
$ juju upgrade-charm --switch /tmp/placement.charm placement
$ juju status placement
Model Controller Cloud/Region Version SLA Timestamp
zaza-df54e5a6cf87 micro microk8s/localhost 2.9.34 unsupported 11:48:15Z
App Version Status Scale Charm Channel Rev Address Exposed Message
placement waiting 1 placement-k8s 1 10.152.183.48 no waiting for units to settle down
Unit Workload Agent Address Ports Message
placement/0* waiting idle 10.1.124.32 (ingress-internal) integration incomplete
This is because the placement charm checks the url property of the relation to check it is ready.
Environment
Running in microk8s. The library version is:
LIBAPI = 1
LIBPATCH = 5
Relevant log output
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Switching the charms from using juju controller storage breaks
the traefik relation due to a bug *1. This workaround bypasses
the broken cached url value.
*1 canonical/traefik-k8s-operator#140
Change-Id: I5137eb4eb94c3897c73e54e19ef73033857c135e
gboutry
pushed a commit
to canonical/sunbeam-charms
that referenced
this issue
Nov 6, 2023
Switching the charms from using juju controller storage breaks
the traefik relation due to a bug *1. This workaround bypasses
the broken cached url value.
*1 canonical/traefik-k8s-operator#140
Change-Id: I5137eb4eb94c3897c73e54e19ef73033857c135e
Bug Description
The interface relies on deprecated controller storage (canonical/operator#882). If a charm respects this deprecation notice and sets
use_juju_for_storage=False
then the state stored in self._stored.current_url (for example) can be lost.To Reproduce
Deploy a charm which uses the ingress relation and amend the charm to echo the value of
url
property of the ingress requires interface. This should return a url. Build a new copy of the charm withuse_juju_for_storage=False
and upgrade the existing charm. Theurl
property will now beNone
.A more longwinded way:
This is because the placement charm checks the url property of the relation to check it is ready.
Environment
Running in microk8s. The library version is:
LIBAPI = 1
LIBPATCH = 5
Relevant log output
Additional context
N/A
The text was updated successfully, but these errors were encountered: