Juju add-cloud fail when used manual cloud option

Bug #1994034 reported by Alex
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth

Bug Description

Juju 3.0.0: When trying to add-cloud with --local option and manual type of cloud it failed:

user@ubuntu:~$ juju add-cloud --client
Cloud Types
  lxd
  maas
  manual
  openstack
  vsphere

Select cloud type: manual

Enter a name for your manual cloud: cloud.name

Enter the ssh connection string for controller, username@<hostname or IP> or <hostname or IP>: sshuser@192.168.20.10
The authenticity of host '192.168.20.10 (192.168.20.10)' can't be established.
ECDSA key fingerprint is SHA256:PzCGig+73tmgn+IJ0IjoK4OsiNooA+IlW/tDD/3t2/Y.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Can't validate endpoint: Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts).
Load key "/home/user/.ssh/id_rsa": Permission denied
sshuser@192.168.20.10: Permission denied (publickey,password).

Enter the ssh connection string for controller, username@<hostname or IP> or <hostname or IP>:

Juju version: 3.0.0
OS: ubuntu 20.04.5

With Juju version 2.9.35 it's working as expected.

Thomas Miller (tlmiller)
Changed in juju:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Thomas Miller (tlmiller)
milestone: none → 3.0.1
Revision history for this message
Thomas Miller (tlmiller) wrote :

Hi Alex,

Thanks for reporting the issue. I have had a look at the bug and there does seem to be a problem here. To help me narrow down further as I have found a few potential issues are you able to confirm if you are running Juju from a snap and what OS you are on?

Revision history for this message
Alex (borsik) wrote :
Download full text (3.4 KiB)

Hi, yes I'm running Juju from snap:

iwsi@ubuntu:~$ snap list
Name Version Rev Tracking Publisher Notes
bare 1.0 5 latest/stable canonical✓ base
canonical-livepatch 10.2.3 146 latest/stable canonical✓ -
code d045a5ed 111 latest/stable vscode✓ classic
core 16-2.57.2 13886 latest/stable canonical✓ core
core18 20220831 2566 latest/stable canonical✓ base
core20 20220826 1623 latest/stable canonical✓ base
core22 20220902 310 latest/stable canonical✓ base
cpu-monitoring-webapp 1.0.1 147 latest/stable mauringo -
curl 7.84.0 1093 latest/stable woutervb -
gnome-3-34-1804 0+git.3556cb3 77 latest/stable/… canonical✓ -
gnome-3-38-2004 0+git.6f39565 119 latest/stable canonical✓ -
gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ -
helm 3.7.0 353 latest/stable snapcrafters classic
htop 3.2.1 3417 latest/stable maxiberta -
jq 1.5+dfsg-1 6 latest/stable mvo✪ -
juju 2.9.35 20892 2.9/stable canonical✓ classic
k9s 0.7.12 151 latest/stable derailed -
kubectl 1.22.15 2610 1.22/stable canonical✓ classic
links 2.21 60 latest/stable snapcrafters -
lxd 5.7-749a602 23853 latest/stable canonical✓ -
nmap 7.93 2721 latest/stable maxiberta -
postman 8.12.5 149 v8/stable postman-inc✓ -
redis-desktop-manager 2022.4.2+af3aeec8 626 latest/stable uglide -
snap-store 41.3-64-g512c0ff 599 latest/stable/… canonical✓ -
snapcraft 7.1.4 8210 latest/stable canonical✓ classic
snapd 2.57.4 17336 latest/stable canonical✓ snapd
vault 1.5.9 2012 1.5/stable canonical✓ -
vault-ui 1.9.3 x1 - - devmode
wireguard-ammp 0.0.20200121 95 latest/stable ammp -
iwsi@ubuntu:~$ ^C
iwsi@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

Interesting maybe will be also this (I saved it before revert to Juju 2.9.35):

root@ubuntu:/home/iwcadmin# sudo snap install juju --channel=2.9/stable --classic
snap "juju" is already installed, see 'snap help refresh'
root@ubuntu:/home/iwcadmin# snap list juju --all
Name Version Rev Tracking Publisher Notes
juju 2.9.35 20892 latest/stable canonical✓ disabled,classic
juju 3.0.0 21122 latest/stable canonical✓ ...

Read more...

Revision history for this message
Ian Booth (wallyworld) wrote :

The issue is that now that the snap is strictly confined, it no longer gets access to private ssh keys unless we get that enabled.

The current 3.0.1 edge snap has been built with the required "ssk-keys" interface but this needs to be manually enabled for now. "snap connect juju:ssh-keys".

We're working on a final solution.

Revision history for this message
Ian Booth (wallyworld) wrote :

The next juju snap will now have ssh-keys auto connected.

https://github.com/juju/juju/pull/14818

Changed in juju:
assignee: Thomas Miller (tlmiller) → Ian Booth (wallyworld)
status: Triaged → Fix Committed
Ian Booth (wallyworld)
Changed in juju:
milestone: 3.0.1 → 3.0.2
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.