Confusing messages when trying edge channel

Bug #2065396 reported by Nobuto Murata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
Triaged
Medium
Unassigned

Bug Description

How to reproduce:

$ sudo snap install openstack --channel 2023.2/edge
openstack (2023.2/edge) 2023.2 from Canonical✓ installed

$ sunbeam prepare-node-script | bash -x && newgrp snap_daemon

$ sunbeam cluster bootstrap --accept-defaults

⠏ Deploying Sunbeam Machine ... terraform apply failed:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # juju_application.sunbeam-machine will be created
  + resource "juju_application" "sunbeam-machine" {
      + config = {
          + "http_proxy" = ""
          + "https_proxy" = ""
          + "no_proxy" = ""
        }
      + constraints = (known after apply)
      + id = (known after apply)
      + model = "controller"
      + name = "sunbeam-machine"
      + placement = (known after apply)
      + principal = (known after apply)
      + trust = false
      + units = 0

      + charm {
          + base = "ubuntu@22.04"
          + channel = "2023.2/stable"
          + name = "sunbeam-machine"
          + revision = (known after apply)
          + series = (known after apply)
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
juju_application.sunbeam-machine: Creating...

Error: Client Error

  with juju_application.sunbeam-machine,
  on main.tf line 29, in resource "juju_application" "sunbeam-machine":
  29: resource "juju_application" "sunbeam-machine" {

Unable to create application, got error: selecting releases: charm or bundle
not found for channel "2023.2/stable", base "amd64/ubuntu/22.04"
available releases are:
  channel "latest/edge": available bases are: ubuntu@22.04
  channel "2024.1/edge": available bases are: ubuntu@22.04
  channel "2023.2/candidate": available bases are: ubuntu@22.04
  channel "2023.2/beta": available bases are: ubuntu@22.04
  channel "2023.2/edge": available bases are: ubuntu@22.04

Error: Command '['/snap/openstack/504/bin/terraform', 'apply', '-auto-approve', '-no-color']' returned non-zero exit status 1.

And indeed, there is no release for the channel.

$ juju info sunbeam-machine
...
channels: |
  latest/stable: –
  latest/candidate: –
  latest/beta: –
  latest/edge: 1 2023-06-08 (1) 15MB amd64 ubuntu@22.04
  2024.1/stable: –
  2024.1/candidate: –
  2024.1/beta: –
  2024.1/edge: 17 2024-05-09 (17) 17MB amd64 ubuntu@22.04
  2023.2/stable: –
  2023.2/candidate: 14 2024-03-25 (14) 17MB amd64 ubuntu@22.04
  2023.2/beta: ↑
  2023.2/edge: 14 2024-03-12 (14) 17MB amd64 ubuntu@22.04

Revision history for this message
Nobuto Murata (nobuto) wrote :

Trying 2024.1/edge is a little bit better but it suggests undocumented -m/--manifest flag.

$ sunbeam prepare-node-script | bash -x
...

+ grep -E 'HTTPS?_PROXY' /etc/environment
+ curl -s -m 10 -x '' api.charmhub.io
+ sudo snap connect openstack:ssh-keys
+ sudo snap install --channel 3.4/stable juju
juju (3.4/stable) 3.4.2 from Canonical** installed
+ mkdir -p /home/ubuntu/.local/share
+ mkdir -p /home/ubuntu/.config/openstack
++ snap list openstack --unicode=never --color=never
++ grep openstack
+ snap_output='openstack 2024.1 503 2024.1/edge canonical** -'
++ awk -v col=4 '{print $col}'
+ track=2024.1/edge
+ [[ 2024.1/edge =~ edge ]]
+ risk=edge
+ [[ edge != \s\t\a\b\l\e ]]
+ echo 'You'\''re deploying from edge channel,' ' to test edge charms, you must provide the edge manifest.'
You're deploying from edge channel, to test edge charms, you must provide the edge manifest.
+ sudo snap set openstack deployment.risk=edge
Snap has been automatically configured to deploy from edge channel.
Override by passing a custom manifest with -m/--manifest.
+ echo 'Snap has been automatically configured to deploy from' 'edge channel.'
+ echo 'Override by passing a custom manifest with -m/--manifest.'

Revision history for this message
Nobuto Murata (nobuto) wrote :

> You're deploying from edge channel, to test edge charms, you must provide the edge manifest.
> Snap has been automatically configured to deploy from edge channel.
> Override by passing a custom manifest with -m/--manifest.

So it wasn't an error necessarily since the script itself is completed to run and deployment.risk=edge is set by the script. It's going to be more of a feedback to improve the user/developer facing messages there.

Nobuto Murata (nobuto)
summary: - Trying edge simply fails
+ Confusing messages when trying edge channel
Revision history for this message
James Page (james-page) wrote :

UX only in newer channels - 2023.1 will receive this when we rebase.

Changed in snap-openstack:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
James Page (james-page) wrote :

FWIW it took us a while to figure out a reasonable approach to automatically setting the risk level that the openstack snap should be using for the deployment generally.

Revision history for this message
James Page (james-page) wrote :
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.