manual add-cloud should be more descriptive about the endpoint requirements

Bug #1749302 reported by Kevin W Monroe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Anastasia

Bug Description

It is not obvious that I need to provide an ssh string when adding a manual cloud:

-----
$ juju version
2.3.2-xenial-amd64

$ juju add-cloud
Cloud Types
  maas
  manual
  openstack
  oracle
  vsphere

Select cloud type: manual

Enter a name for your manual cloud: foo

Enter the controller's hostname or IP address: 192.168.1.32

Cloud "foo" successfully added
You may bootstrap with 'juju bootstrap foo'
-----

The cloud is happily accepted, but it should have verified that the juju client could actually ssh to that endpoint before accepting the cloud. A subsequent bootstrap of the above might fail like this:

-----
$ juju bootstrap foo --debug
15:27:45 INFO juju.cmd supercommand.go:56 running juju [2.3.2 gc go1.9.2]
15:27:45 DEBUG juju.cmd supercommand.go:57 args: []string{"/snap/juju/3230/bin/juju", "bootstrap", "foo", "--debug"}
15:27:45 INFO cmd cloudcredential.go:51 no credentials found, checking environment
15:27:45 DEBUG juju.cmd.juju.commands bootstrap.go:826 authenticating with region "" and credential "default" ()
15:27:45 DEBUG juju.cmd.juju.commands bootstrap.go:954 provider attrs: map[]
15:27:46 INFO cmd authkeys.go:114 Adding contents of "/home/kwmonroe/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
15:27:46 DEBUG juju.cmd.juju.commands bootstrap.go:1010 preparing controller with config: map[resource-tags: proxy-ssh:false agent-metadata-url: logforward-enabled:false max-action-results-size:5G enable-os-upgrade:true update-status-hook-interval:5m uuid:10c927c4-b3ba-4d51-8325-a94ecf4ebe93 apt-mirror: logging-config: name:controller no-proxy:127.0.0.1,localhost,::1 firewall-mode:instance egress-subnets: cloudinit-userdata: http-proxy: image-metadata-url: apt-http-proxy: development:false max-status-history-age:336h apt-no-proxy: default-series:xenial ssl-hostname-verification:true net-bond-reconfigure-delay:17 https-proxy: container-networking-method: apt-https-proxy: disable-network-management:false ignore-machine-addresses:false agent-stream:released transmit-vendor-metrics:true type:manual image-stream:released apt-ftp-proxy: test-mode:false ftp-proxy: automatically-retry-hooks:true provisioner-harvest-mode:destroyed max-status-history-size:5G max-action-results-age:336h fan-config: authorized-keys:ssh-rsa <dont-hack-me> juju-client-key
 enable-os-refresh-update:true]
15:27:46 INFO juju.environs.manual.sshprovisioner sshprovisioner.go:43 initialising "192.168.1.32", user ""
15:27:46 DEBUG juju.utils.ssh ssh.go:305 using OpenSSH ssh client
15:27:47 DEBUG juju.utils.ssh ssh.go:305 using OpenSSH ssh client
kwmonroe@192.168.1.32's password:
-----

It's stuck here asking for a password for my local user, but i don't have creds to that machine for the 'kwmonroe' user. This is confusing. I think instead of this:

-----
Enter the controller's hostname or IP address: 192.168.1.32
-----

The add-cloud prompt should say something like this:

-----
Enter the ssh connection string to connect to this controller: my_user@192.168.1.32
-----

I would like it to be obvious that the juju client needs to ssh over to the remote machine. Asking for a "hostname or IP address" implies that juju will figure out what to do with that ip later. The reality is that you need to give add-cloud an ssh connection string if you want bootstrap to succeed.

Revision history for this message
Peter Matulis (petermatulis) wrote :

There should also be clarity on how SSH keys are used to make the connection.

tags: added: docteam
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

For the juju add-model prompt, I know we don't have much space to work with. There's also a Juju Docs issue where we can expand on manual cloud bits. Pasting here for reference:

https://github.com/juju/docs/issues/2445

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

^^ s/add-model/add-cloud

John A Meinel (jameinel)
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
tags: added: ui
tags: added: credentials
Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against develop https://github.com/juju/juju/pull/10454 changes the prompt to "Enter the ssh connection string for controller, username@<hostname or IP> or <hostname or IP>:".

Changed in juju:
status: Triaged → In Progress
assignee: nobody → Anastasia (anastasia-macmood)
Changed in juju:
status: In Progress → Fix Committed
milestone: none → 2.7-beta1
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.