no useful error message when bootstrap fails due to ssh key issues

Bug #1998123 reported by Heather Lanigan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

$ juju bootstrap aws
Creating Juju controller "aws-us-east-1" on aws/us-east-1
Looking for packaged Juju agent version 3.1-beta1 for amd64
No packaged binary found, preparing local Juju agent binary
Launching controller instance(s) on aws/us-east-1...
 - i-09f709d2cd34962a6 (arch=amd64 mem=4G cores=2)
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to x.x.x.x:22
Attempting to connect to x.x.x.x:22
ERROR failed to bootstrap model: cancelled
$

My bootstrap failed with no indication why.

It wasn't until trying again with debug I found the answer:

10:46:44 DEBUG juju.provider.common bootstrap.go:650 connection attempt for x.x.x.x failed: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0664 for '/home/ubuntu/.local/share/juju/ssh/juju_id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/ubuntu/.local/share/juju/ssh/juju_id_rsa": bad permissions
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/ubuntu/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/ubuntu/.ssh/id_rsa": bad permissions
ubuntu@x.x.x.x: Permission denied (publickey).

Juju should provide a reasonable error message when bootstrap fails.

Tags: bootstrap
description: updated
description: updated
summary: - no error when bootstrap fails due to ssh key issues
+ no useful error message when bootstrap fails due to ssh key issues
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.