Juju refresh from ch -> local charm fails with: unknown option "trust"

Bug #2017157 reported by Adam Dyess
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Harry Pidcock

Bug Description

I have installed the latest microk8s charm from charmhub, and wanted to make a change and try it out from a local charm:

Starting here:

Model Controller Cloud/Region Version SLA Timestamp
microk8s addyess-vsphere vsphere/Boston 3.1.0 unsupported 11:58:52-05:00

App Version Status Scale Charm Channel Rev Exposed Message
microk8s active 1 microk8s stable 35 no

Unit Workload Agent Machine Public address Ports Message
microk8s/1* active idle 1 10.246.154.140 80,443,16443/tcp

Machine State Address Inst id Base AZ Message
1 started 10.246.154.140 juju-dff66a-1 ubuntu@20.04 poweredOn

--------------------------------------------------------------------

❯ juju refresh microk8s --switch ./*.charm --debug --verbose
11:55:57 INFO juju.cmd supercommand.go:56 running juju [3.1.2 f43d417390caeba51beece481aa7441ce3388519 gc go1.20.2]
11:55:57 DEBUG juju.cmd supercommand.go:57 args: []string{"/snap/juju/22722/bin/juju", "refresh", "microk8s", "--switch", "./microk8s_ubuntu-20.04-amd64_ubuntu-22.04-amd64.charm", "--debug", "--verbose"}
11:55:57 INFO juju.juju api.go:86 connecting to API addresses: [10.246.154.195:17070]
11:55:57 DEBUG juju.api apiclient.go:1167 successfully dialed "wss://10.246.154.195:17070/model/fd392a78-3e4a-4312-8ee6-2761ffdff66a/api"
11:55:57 INFO juju.api apiclient.go:702 connection established to "wss://10.246.154.195:17070/model/fd392a78-3e4a-4312-8ee6-2761ffdff66a/api"
11:55:57 DEBUG juju.core.charm computedseries.go:60 series "focal, jammy" for charm "microk8s" with format 1, Kubernetes false
11:56:33 INFO cmd refresh.go:405 Added local charm "microk8s", revision 3, to the model
11:56:33 DEBUG juju.api monitor.go:35 RPC connection died
ERROR parsing config settings: unknown option "trust"
11:56:33 DEBUG cmd supercommand.go:548 error stack:
parsing config settings: unknown option "trust"
github.com/juju/juju/rpc.(*Conn).Call:178:
github.com/juju/juju/api.(*state).APICall:1266:
--------------------------------------------------------------------

Afterwards, the model isn't updated from the local version.

Here's a snippet of the controller log which mentions the same unknown option

--------------------------------------------------------------------
2023-04-20 17:03:45 DEBUG juju.state.pool.txnwatcher txnwatcher.go:488 txn watcher: charms fd392a78-3e4a-4312-8ee6-2761ffdff66a:local:focal/microk8s-5 #3
2023-04-20 17:03:45 DEBUG juju.apiserver request_notifier.go:113 [3486] API connection from 10.172.68.136:57578
2023-04-20 17:03:45 DEBUG juju.apiserver request_notifier.go:189 <- [3486] {"request-id":1,"type":"Admin","version":3,"request":"Login","params":"'params redacted'"}
2023-04-20 17:03:45 DEBUG juju.apiserver admin.go:474 model login: user admin has "superuser" for controller; "admin" for model fd392a78-3e4a-4312-8ee6-2761ffdff66a
2023-04-20 17:03:45 DEBUG juju.apiserver admin.go:409 model login: user-admin for fd392a78-3e4a-4312-8ee6-2761ffdff66a
2023-04-20 17:03:45 DEBUG juju.apiserver request_notifier.go:221 -> [3486] 19.547632ms {"request-id":1,"response":"'body redacted'"} Admin[""].Login
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:189 <- [3477] user-admin {"request-id":6,"type":"Charms","version":6,"request":"CharmInfo","params":"'params redacted'"}
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:221 -> [3477] user-admin 3.687401ms {"request-id":6,"response":"'body redacted'"} Charms[""].CharmInfo
2023-04-20 17:03:46 DEBUG juju.state.pool.txnwatcher txnwatcher.go:488 txn watcher: userLastLogin admin #0
2023-04-20 17:03:46 DEBUG juju.state.pool.txnwatcher txnwatcher.go:488 txn watcher: modelUserLastConnection fd392a78-3e4a-4312-8ee6-2761ffdff66a:admin #0
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:189 <- [3486] user-admin {"request-id":2,"type":"Client","version":6,"request":"FullStatus","params":"'params redacted'"}
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:189 <- [3477] user-admin {"request-id":7,"type":"Charms","version":6,"request":"CharmInfo","params":"'params redacted'"}
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:221 -> [3477] user-admin 3.176623ms {"request-id":7,"response":"'body redacted'"} Charms[""].CharmInfo
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:221 -> [3486] user-admin 25.824904ms {"request-id":2,"response":"'body redacted'"} Client[""].FullStatus
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:189 <- [3477] user-admin {"request-id":8,"type":"Application","version":17,"request":"SetCharm","params":"'params redacted'"}
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:221 -> [3477] user-admin 4.363981ms {"request-id":8,"error":"parsing config settings: unknown option \"trust\"","response":"'body redacted'"} Application[""].SetCharm
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:134 [3486] user-admin API connection terminated after 247.390241ms
2023-04-20 17:03:46 DEBUG juju.apiserver request_notifier.go:134 [3477] user-admin API connection terminated after 35.756538843s
2023-04-20 17:03:47 DEBUG juju.apiserver request_notifier.go:189 <- [6] unit-controller-0 {"request-id":65747,"type":"LeadershipService","version":2,"request":"ClaimLeadership","params":"'params redacted'"}
2023-04-20 17:03:48 DEBUG juju.apiserver request_notifier.go:221 -> [6] unit-controller-0 12.588039ms {"request-id":65747,"response":"'body redacted'"} LeadershipService[""].ClaimLeadership

--------------------------------------------------------------------

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 3.1.3
importance: Undecided → Critical
status: New → Triaged
John A Meinel (jameinel)
Changed in juju:
assignee: nobody → Harry Pidcock (hpidcock)
Changed in juju:
milestone: 3.1.3 → 3.1.4
Changed in juju:
milestone: 3.1.4 → 3.1.5
Changed in juju:
milestone: 3.1.5 → 3.1.6
Revision history for this message
Harry Pidcock (hpidcock) wrote :

I've looked into this, the problem I can see here is that the juju 3.1.1 client introduced the --trust option, when your controller is running juju 3.1.0 which doesn't support that option. Since you didn't specify it, this is fixed by https://github.com/juju/juju/pull/15796 which fixes https://bugs.launchpad.net/juju/+bug/2019924

Changed in juju:
status: Triaged → Fix Committed
Changed in juju:
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.