'juju ssh <unit> ...' fails with Permission denied (publickey), for only one or two machines in a deployment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
High
|
Unassigned |
Bug Description
It appears that Juju fails to copy a public SSH key to one or two machines, even though it does to all of the other machines.
Here's a transcript from a failed test run that shows what I guess are the relevant details:
[...]
The following NEW packages will be installed:
[...]
juju juju-2.0 libalgorithm-
[...]
Get:119 http://
[...]
Setting up juju (1:2.0.
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Since Juju 2 is being run for the first time, downloading latest cloud information.
Fetching latest public cloud list...
Updated your list of public clouds with 1 cloud region added:
added cloud region:
- aws/us-east-2
Credentials updated for cloud "google".
Creating Juju controller "bundle-fv" on google/us-central1
Looking for packaged Juju agent version 2.0.0 for amd64
Launching controller instance(s) on google/
- juju-2eb287-0 (arch=amd64 mem=1.7G cores=1)
Fetching Juju GUI 2.2.1
Waiting for address
Attempting to connect to 104.198.213.7:22
Attempting to connect to 10.240.0.29:22
Logging to /var/log/
Running apt-get update
Running apt-get upgrade
Installing curl, cpu-checker, bridge-utils, cloud-utils, tmux
Fetching Juju agent version 2.0.0 for amd64
Installing Juju machine agent
Starting Juju machine agent (service jujud-machine-0)
Bootstrap agent now started
Contacting Juju controller at 10.240.0.29 to verify accessibility...
Bootstrap complete, "bundle-fv" controller now available.
Controller machines are in the "controller" model.
Initial model "default" added.
[...]
+ juju set-model-
[ juju deploy cs:~project-
Deploying charm "cs:~project-
Deploying charm "cs:xenial/
Deploying charm "cs:etcd-8"
Deploying charm "cs:xenial/
Deploying charm "cs:xenial/
Deploying charm "cs:trusty/
Deploying charm "cs:~project-
Deploying charm "cs:~project-
Deploying charm "cs:xenial/
Deploying charm "cs:xenial/
Deploying charm "cs:xenial/
Deploying charm "cs:xenial/
Related "nova-cloud-
Related "neutron-
Related "neutron-
Related "neutron-
Related "neutron-
Related "openstack-
Related "neutron-
Related "nova-compute:
Related "nova-compute:amqp" and "rabbitmq-
Related "nova-cloud-
Related "cinder:
Related "cinder:amqp" and "rabbitmq-
Related "glance:
Related "neutron-
Related "neutron-api:amqp" and "rabbitmq-
Related "neutron-
Related "nova-cloud-
Related "nova-cloud-
Related "nova-compute:
Related "glance:
Related "mysql:shared-db" and "keystone:
Related "nova-compute:
Related "glance:shared-db" and "mysql:shared-db"
Related "mysql:shared-db" and "cinder:shared-db"
Related "cinder:
Related "neutron-
Related "neutron-
Deploy of bundle completed.
+ juju add-unit nova-compute
+ wait_for_units 16 unit_ready 1800
[...]
+ juju status
Unit Workload Agent Machine Public address Ports Message
READY: bird/0* unknown idle 0 104.198.253.104 9905/tcp,9906/tcp
READY: cinder/0* active idle 1 104.154.89.222 8776/tcp Unit is ready
READY: etcd/0* active idle 2 104.197.159.19 2379/tcp (leader) cluster is healthy
READY: glance/0* active idle 0 104.198.253.104 9292/tcp Unit is ready
READY: keystone/0* active idle 3 130.211.117.245 5000/tcp Unit is ready
READY: mysql/0* unknown idle 4 104.155.162.37 3306/tcp
READY: neutron-api/0* active idle 5 130.211.126.27 9696/tcp Unit is ready
READY: nova-cloud-
READY: nova-compute/0* active idle 7 104.154.174.220 Unit is ready
READY: neutron-calico/0* unknown idle 104.154.174.220
READY: nova-compute/1 active idle 8 104.198.62.248 Unit is ready
READY: neutron-calico/1 unknown idle 104.198.62.248
READY: nova-compute/2 active idle 10 104.197.215.208 Unit is ready
READY: neutron-calico/2 unknown idle 104.197.215.208
READY: openstack-
READY: rabbitmq-server/0* active idle 0 104.198.253.104 5672/tcp Unit is ready
Machine State DNS Inst id Series AZ
0 started 104.198.253.104 juju-b51532-0 xenial us-central1-a
1 started 104.154.89.222 juju-b51532-1 xenial us-central1-b
2 started 104.197.159.19 juju-b51532-2 xenial us-central1-c
3 started 130.211.117.245 juju-b51532-3 xenial us-central1-f
4 started 104.155.162.37 juju-b51532-4 trusty us-central1-f
5 started 130.211.126.27 juju-b51532-5 xenial us-central1-a
6 started 104.198.17.14 juju-b51532-6 xenial us-central1-b
7 started 104.154.174.220 juju-b51532-7 xenial us-central1-a
8 started 104.198.62.248 juju-b51532-8 xenial us-central1-b
9 started 104.198.62.168 juju-b51532-9 xenial us-central1-c
10 started 104.197.215.208 juju-b51532-10 xenial us-central1-c
[...]
++ juju run --unit neutron-api/0 'unit-get private-address'
+ neutron_
++ juju run --unit keystone/0 'unit-get private-address'
+ keystone_
+ juju ssh openstack-
[...]
Connection to 104.198.62.168 closed.
+ juju ssh openstack-
[...]
Connection to 104.198.62.168 closed.
+ juju ssh openstack-
[...]
Connection to 104.198.62.168 closed.
+ computes=
+ for unit in '${computes}'
+ juju ssh nova-compute/0 'sudo service nova-api-metadata restart'
Permission denied (publickey).
+ for unit in '${computes}'
+ juju ssh nova-compute/1 'sudo service nova-api-metadata restart'
Connection to 104.198.62.248 closed.
+ for unit in '${computes}'
+ juju ssh nova-compute/2 'sudo service nova-api-metadata restart'
Connection to 104.197.215.208 closed.
[...]
Changed in juju: | |
assignee: | nobody → Alexis Bruemmer (alexis-bruemmer) |
Changed in juju: | |
assignee: | Alexis Bruemmer (alexis-bruemmer) → nobody |
To see the actual cause of the error, please run and paste the output of e.g `juju --debug ssh nova-compute/0 -v`