no bundle option to specify channel

Bug #1832873 reported by Rodrigo Barbieri
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Unassigned

Bug Description

When using the juju CLI, we can specify --channel=edge to deploy applications with their edge charm versions. Example below

1) Default behavior (stable)

$ juju add-model stable-test

$ juju deploy cs:~containers/kubernetes-master
Located charm "cs:~containers/kubernetes-master-684".
Deploying charm "cs:~containers/kubernetes-master-684".

# juju export-bundle

juju export-bundle
series: bionic
applications:
  kubernetes-master:
    charm: cs:~containers/kubernetes-master-684
    num_units: 1
    to:
    - "0"
machines:
  "0": {}

2) Edge channel behavior

$ juju add-model stable-test

$ juju deploy cs:~containers/kubernetes-master --channel=edge
Located charm "cs:~containers/kubernetes-master-691".
Deploying charm "cs:~containers/kubernetes-master-691".

$ juju export-bundle
series: bionic
applications:
  kubernetes-master:
    charm: cs:~containers/kubernetes-master-691
    num_units: 1
    to:
    - "0"
machines:
  "0": {}

As can be seen above, there is no need to specify the charm version when using the CLI, as the latest for each channel is picked up automatically.

This is not true when deploying bundles. See below:

$ cat test.yaml
series: bionic
applications:
  kubernetes-master:
    charm: cs:~containers/kubernetes-master
    num_units: 1
    to:
    - "0"
machines:
  "0": {}

$ $ juju deploy test.yaml
Resolving charm: cs:~containers/kubernetes-master
Executing changes:
- upload charm cs:~containers/kubernetes-master-684 for series bionic
- deploy application kubernetes-master on bionic using cs:~containers/kubernetes-master-684
  added resource cdk-addons
  added resource core
  added resource kube-apiserver
  added resource kube-controller-manager
  added resource kube-proxy
  added resource kube-scheduler
  added resource kubectl
- add new machine 0
- add unit kubernetes-master/0 to new machine 0
Deploy of bundle completed.

There is no documentation of an option such as "channel: edge" for the bundle (could be used right below the "series: bionic" option in the above example) to cause Juju to pick up the latest edge charm version when deploying bundles.

To deploy that bundle with edge, it is necessary to run:

$ juju deploy test.yaml --channel=edge
Resolving charm: cs:~containers/kubernetes-master
Executing changes:
- upload charm cs:~containers/kubernetes-master-691 for series bionic
- deploy application kubernetes-master on bionic using cs:~containers/kubernetes-master-691
  added resource cdk-addons
  added resource core
  added resource kube-apiserver
  added resource kube-controller-manager
  added resource kube-proxy
  added resource kube-scheduler
  added resource kubectl
- add new machine 0
- add unit kubernetes-master/0 to new machine 0
Deploy of bundle completed.

Therefore, this limitation forces the use of the Juju CLI parameter where this could be improved to be defined in the bundle.

Tags: seg
tags: added: seg
Revision history for this message
John A Meinel (jameinel) wrote :

I believe there are a few places where we wanted to avoid functionality in a bundle that you can do on a commandline (for example --force to ignore the series of a charm). I don't know if channel was intentionally restricted or whether it is just an omission.

Changed in juju:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Richard Harding (rharding) wrote :

I think this is an oversight of support for channels in the idea of bundles vs charms. It seems to be a lightly used feature that somehow just got missed.

Revision history for this message
Sandor Zeestraten (szeestraten) wrote :

I think this landed in #1677404

Revision history for this message
Richard Harding (rharding) wrote :

ah yea this should be fix committed at this point and released once we get GA out this week.

Changed in juju:
milestone: none → 2.7.0
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.