The rsync fails in error when the -o option is used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Charm Tools |
New
|
Undecided
|
Unassigned |
Bug Description
While testing a Vagrant setup I wanted to view the output in a log directory.
We used the -o option on charm test like this:
sudo -u vagrant -H charm test -e local -o vagrant-log -v $test
The actual Amulet tests passed but when the tool went to get the logs rsync encountered a verification problem and the tests "failed" with this error:
juju-test.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.0]
juju-test.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.0]
juju-test.
juju-test INFO : Results: 0 passed, 1 failed, 0 errored
Included is the full stdout of what happened. Notice that the ssh keys are being generated and there is a warning that the keys are already generated:
vagrant provision
[default] Running provisioner: shell...
[default] Running: /tmp/vagrant-
stdin: is not a tty
Installing juju-local provider support
Ign http://
Ign http://
Hit http://
Ign http://
Hit http://
Ign http://
Hit http://
Ign http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:3 http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:4 http://
Get:5 http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Ign http://
Fetched 15.1 MB in 15s (950 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
juju-local is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
Generating public/private rsa key pair.
id_rsa already exists.
Overwrite (y/n)?
Running test-pre-setup script
+ dpkg -s amulet
Package: amulet
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 117
Maintainer: Marco Ceppi <email address hidden>
Architecture: all
Version: 1.2.1-0ubuntu1~
Provides: python3-amulet
Depends: python3, python3-yaml, python3-urllib3, python3-requests, python3-
Description: Testing harness for Juju Charms
+ '[' 0 -ne 0 ']'
+ sudo apt-get install -y python3-requests
Reading package lists...
Building dependency tree...
Reading state information...
python3-requests is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
running tests
juju-test INFO : Starting test run on local using Juju 1.17.3
Logging to /home/vagrant/
Starting MongoDB server (juju-db-
Bootstrapping Juju machine agent
Starting Juju machine agent (juju-agent-
2014-02-24 15:26:53 Starting deployment of local
2014-02-24 15:27:10 Deploying services...
2014-02-24 15:27:10 Deploying service lamp using local:precise/lamp
2014-02-24 15:27:11 Deploying service lamp-sentry using local:precise/
2014-02-24 15:27:12 Deploying service mysql using local:precise/mysql
2014-02-24 15:27:12 Deploying service mysql-sentry using local:precise/
2014-02-24 15:27:13 Deploying service relation-sentry using local:precise/
2014-02-24 15:27:20 Config specifies num units for subordinate: lamp-sentry
2014-02-24 15:27:20 Config specifies num units for subordinate: mysql-sentry
2014-02-24 15:29:14 Adding relations...
2014-02-24 15:29:14 Adding relation mysql:juju-info <-> mysql-sentry:
2014-02-24 15:29:14 Adding relation lamp:juju-info <-> lamp-sentry:
2014-02-24 15:29:14 Adding relation relation-
2014-02-24 15:29:14 Adding relation relation-
2014-02-24 15:30:14 Exposing service 'lamp'
2014-02-24 15:30:14 Exposing service 'lamp-sentry'
2014-02-24 15:30:14 Exposing service 'mysql-sentry'
2014-02-24 15:30:14 Exposing service 'relation-sentry'
2014-02-24 15:30:14 Deployment complete in 201.24 seconds
juju-test.
juju-test.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.0]
juju-test.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.0]
juju-test.
juju-test INFO : Results: 0 passed, 1 failed, 0 errored
Hi, on a fresh trusty install I'm getting a 'Permission denied (publickey).' instead of 'Host key verification failed':
$ juju test -v -o ./log test.conductor. 01-deploy. py WARNING : Failed to fetch logs for bootstrap node test.conductor DEBUG : Running the following: juju status -e local cc:30:c5: fa:77:62: 43:79:4c: 60:fe:85: 8b.
...
juju-
juju-
The authenticity of host '10.0.3.60 (10.0.3.60)' can't be established.
ECDSA key fingerprint is 9c:f3:ed:
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.3.60' (ECDSA) to the list of known hosts.
Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.0]
Juju 1.18.3, Amulet 1.5.0