Sunbeam - Improve bootstrap error message when Juju 2.9.x is installed

Bug #2028045 reported by Michael C Jaeger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
Triaged
Low
Unassigned

Bug Description

Tried to install sunbeam in the workshop on the commercial sprint

When you go through the steps (see listing below), it says “juju is installed” and then for the next step “juju is not detected”.

I have juju 2.9.42 installed.

I guess it is because, the automatic update to juju 3.x cannot be performed (and I guess should not be performed), but I propose to give a warning message to first upgrade to juju 3.x when attempting at installing sunbeam. Otherwise it is confusing - as I tried to refresh, update, upgrade, restart, try again ...

Here is the log of my shell (see last three lines):

fossy@fossy-VirtualBox:~$ sunbeam prepare-node-script | bash -x && newgrp snap_daemon
++ lsb_release -sc
+ '[' jammy '!=' jammy ']'
++ whoami
+ USER=fossy
+ SUDO_ASKPASS=/bin/false
+ sudo -A whoami
+ grep NOPASSWD:ALL
+ sudo grep -r fossy /etc/sudoers /etc/sudoers.d
+ echo 'fossy ALL=(ALL) NOPASSWD:ALL'
+ sudo install -m 440 /tmp/90-fossy-sudo-access /etc/sudoers.d/90-fossy-sudo-access
+ rm -f /tmp/90-fossy-sudo-access
+ dpkg -s openssh-server
+ sudo snap connect openstack:ssh-keys
error: snap "snapd" has "auto-refresh" change in progress
+ sudo addgroup fossy snap_daemon
Adding user `fossy' to group `snap_daemon' ...
Adding user fossy to group snap_daemon
Done.
+ newgrp snap_daemon
Generating public/private rsa key pair.
Created directory '/home/fossy/.ssh'.
Your identification has been saved in /home/fossy/.ssh/id_rsa
Your public key has been saved in /home/fossy/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:uoy0IR63cCIx+h0YtbkmHxgGA3ftLb6TMqKiyqGvA6w fossy@fossy-VirtualBox
The key's randomart image is:
+---[RSA 4096]----+
|. . .. |
|.. . . |
|o .. . |
| o . oo . |
|+ + o. .S |
|o= = ... |
|=.O X .o |
|E+o&oO+. |
|X*+.*oo. |
+----[SHA256]-----+
# 10.0.2.15:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.0.2.15:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.0.2.15:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.0.2.15:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.0.2.15:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.1.126.0:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.1.126.0:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.1.126.0:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.1.126.0:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
# 10.1.126.0:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
snap "juju" is already installed, see 'snap help refresh'
fossy@fossy-VirtualBox:~$ sunbeam cluster bootstrap --accept-defaults
Error: Juju not detected: please install snap

Tags: sunbeam
description: updated
James Page (james-page)
Changed in snap-openstack:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Hua Zhang (zhhuabj) wrote :

I also hit this problem, I fix it by:

sudo snap remove juju
sunbeam prepare-node-script | bash -x && newgrp snap_daemon

Revision history for this message
Michael C Jaeger (mcjaeger) wrote (last edit ):

I agree, it can be fixed. I found it more being a usability issue for the sunbeam tutorial, because it is not covered (at the time I have done it) and then you re encountering confusing error messages ("juju is installed ... not installed") instead of: "Hi, your juju version is too old, please install a newer one"

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.