juju 3.0 client cannot refresh --switch from cs to ch on 2.9 controller

Bug #2003971 reported by Heather Lanigan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

With a 2.9 juju client and controller

$ juju deploy cs:ubuntu csubuntu
Located charm "ubuntu" in charm-store, revision 21
Deploying "csubuntu" from charm-store charm "ubuntu", revision 21 in channel stable on xenial

If you then use a 3.0 juju client to refresh the charm:

$ juju refresh csubuntu --switch ch:ubuntu
ERROR series required for charm-hub charms (bad request)

17:08:29 TRACE juju.rpc.jsoncodec codec.go:227 -> {"request-id":6,"type":"Charms","version":5,"request":"ResolveCharms","params":{"resolve":[{"reference":"ch:ubuntu","charm-origin":{"source":"charm-hub","type":"","id":"","risk":"stable","architecture":"amd64","base":{"name":"ubuntu","channel":"16.04/stable"}},"switch-charm":true}]}}
17:08:29 TRACE juju.rpc.jsoncodec codec.go:121 <- {"request-id":6,"response":{"Results":[{"url":"ch:amd64/xenial/ubuntu-21","charm-origin":{"source":"charm-hub","type":"charm","id":"","risk":"stable","revision":21,"architecture":"amd64","base":{"name":"","channel":""},"series":"xenial","os":"ubuntu","channel":"16.04"},"supported-series":["xenial"]}]}}
17:08:29 INFO cmd refresher.go:336 Using channel "stable"
17:08:29 TRACE juju.rpc.jsoncodec codec.go:227 -> {"request-id":7,"type":"Charms","version":5,"request":"AddCharm","params":{"url":"ch:amd64/xenial/ubuntu-21","charm-origin":{"source":"charm-hub","type":"charm","id":"","risk":"stable","revision":21,"architecture":"amd64","base":{"name":"ubuntu","channel":"16.04/stable"}},"force":false}}
17:08:29 TRACE juju.rpc.jsoncodec codec.go:121 <- {"request-id":7,"error":"series required for charm-hub charms","error-code":"bad request","response":{}}

A 2.9 client succeeds:

$ juju refresh csubuntu --switch ch:ubuntu
Added charm-hub charm "ubuntu", revision 21 in channel stable, to the model

17:16:31 TRACE juju.rpc.jsoncodec codec.go:227 -> {"request-id":6,"type":"Charms","version":5,"request":"ResolveCharms","params":{"resolve":[{"reference":"ch:ubuntu","charm-origin":{"source":"charm-hub","type":"","id":"","risk":"stable","architecture":"amd64","base":{"name":"ubuntu","channel":"16.04/stable"},"series":"xenial","os":"ubuntu","channel":"16.04/stable"},"switch-charm":true}]}}
17:16:31 TRACE juju.rpc.jsoncodec codec.go:121 <- {"request-id":6,"response":{"Results":[{"url":"ch:amd64/xenial/ubuntu-21","charm-origin":{"source":"charm-hub","type":"charm","id":"","risk":"stable","revision":21,"architecture":"amd64","base":{"name":"","channel":""},"series":"xenial","os":"ubuntu","channel":"16.04"},"supported-series":["xenial"]}]}}
17:16:31 INFO cmd refresher.go:338 Using channel "stable"
17:16:31 TRACE juju.rpc.jsoncodec codec.go:227 -> {"request-id":7,"type":"Charms","version":5,"request":"AddCharm","params":{"url":"ch:amd64/xenial/ubuntu-21","charm-origin":{"source":"charm-hub","type":"charm","id":"","risk":"stable","revision":21,"architecture":"amd64","base":{"name":"ubuntu","channel":"16.04/stable"},"series":"xenial","os":"ubuntu","channel":"16.04/stable"},"force":false,"series":"xenial"}}
17:16:33 TRACE juju.rpc.jsoncodec codec.go:121 <- {"request-id":7,"response":{"charm-origin":{"source":"charm-hub","type":"charm","id":"DksXQKAQTZfsUmBAGanZAhpoS4dpmXel","hash":"7272c626e5ef67136c857230d76dc70ee27da626835a2467d91b9860aaac6865","risk":"stable","revision":21,"architecture":"amd64","base":{"name":"","channel":""},"series":"xenial","os":"ubuntu","channel":"16.04"}}}
17:16:33 INFO cmd refresh.go:441 Added charm-hub charm "ubuntu", revision 21 in channel stable, to the model

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

The 2.9 client includes series in the AddCharm params, while the 3.0 client does not.

At the very least, the 3.0 client error message is extremely misleading.

Changed in juju:
milestone: 2.9.40 → 2.9.41
Changed in juju:
milestone: 2.9.41 → 2.9.42
Changed in juju:
milestone: 2.9.42 → 2.9.43
Changed in juju:
milestone: 2.9.43 → 2.9.44
Changed in juju:
milestone: 2.9.44 → 2.9.45
Changed in juju:
milestone: 2.9.45 → 2.9.46
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.