juju attach not working in k8s charms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Ian Booth |
Bug Description
The result expected with `juju attach` is supposed to change the "tuple" of the charm revision combined with each resource revision and trigger upgrade-charm as part of that change.
I am trying to do that, but the upgrade-charm isn't executed.
Before running the juju attach:
$ juju show-status-log ro-k8s/0
Time Type Status Message
10 Sep 2019 17:41:41Z workload maintenance fetching resource: ro-image
10 Sep 2019 17:42:02Z juju-unit executing running leader-elected hook
10 Sep 2019 17:42:04Z juju-unit executing running config-changed hook
10 Sep 2019 17:42:08Z juju-unit executing running mysql-relation-
10 Sep 2019 17:42:13Z juju-unit executing running mysql-relation-
10 Sep 2019 17:42:16Z juju-unit executing running ro-relation-joined hook
10 Sep 2019 17:42:21Z workload waiting Waiting for mysql to be ready
10 Sep 2019 17:42:21Z juju-unit executing running mysql-relation-
10 Sep 2019 17:42:26Z workload maintenance Configuring ro container
10 Sep 2019 17:42:28Z workload maintenance Sending RO configuration
10 Sep 2019 17:42:29Z workload waiting Waiting for mysql to be ready
10 Sep 2019 17:42:29Z juju-unit executing running ro-relation-changed hook
10 Sep 2019 17:42:31Z workload maintenance Sending RO configuration
10 Sep 2019 17:42:33Z workload waiting waiting for container
10 Sep 2019 17:42:33Z juju-unit executing running config-changed hook
10 Sep 2019 17:42:34Z juju-unit allocating Started container ro-k8s
10 Sep 2019 17:42:34Z workload waiting Started container ro-k8s
10 Sep 2019 17:42:35Z juju-unit executing running log-storage-
10 Sep 2019 17:43:01Z juju-unit idle
10 Sep 2019 17:43:01Z workload active ready
$ juju attach ro-k8s ro-image=
$ juju show-status-log ro-k8s/0
Time Type Status Message
10 Sep 2019 17:41:41Z workload maintenance fetching resource: ro-image
10 Sep 2019 17:42:02Z juju-unit executing running leader-elected hook
10 Sep 2019 17:42:04Z juju-unit executing running config-changed hook
10 Sep 2019 17:42:08Z juju-unit executing running mysql-relation-
10 Sep 2019 17:42:13Z juju-unit executing running mysql-relation-
10 Sep 2019 17:42:16Z juju-unit executing running ro-relation-joined hook
10 Sep 2019 17:42:21Z workload waiting Waiting for mysql to be ready
10 Sep 2019 17:42:21Z juju-unit executing running mysql-relation-
10 Sep 2019 17:42:26Z workload maintenance Configuring ro container
10 Sep 2019 17:42:28Z workload maintenance Sending RO configuration
10 Sep 2019 17:42:29Z workload waiting Waiting for mysql to be ready
10 Sep 2019 17:42:29Z juju-unit executing running ro-relation-changed hook
10 Sep 2019 17:42:31Z workload maintenance Sending RO configuration
10 Sep 2019 17:42:33Z workload waiting waiting for container
10 Sep 2019 17:42:33Z juju-unit executing running config-changed hook
10 Sep 2019 17:42:34Z juju-unit allocating Started container ro-k8s
10 Sep 2019 17:42:34Z workload waiting Started container ro-k8s
10 Sep 2019 17:42:35Z juju-unit executing running log-storage-
10 Sep 2019 17:43:01Z juju-unit idle
10 Sep 2019 17:43:01Z workload active ready
There's no upgrade-charm hook. And the charm hasn't upgraded with the new resource.
Changed in juju: | |
milestone: | none → 2.6.9 |
importance: | Undecided → High |
status: | New → Triaged |
tags: | added: k8s |
Changed in juju: | |
assignee: | nobody → Ian Booth (wallyworld) |
Changed in juju: | |
status: | Triaged → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
It works for normal file resources but not OCI image resources. It uses the fingerprint value of the resource to detect if there's been a change but for OCI image resources we don't have that. Looking at how we can make it work.