problem with amulet and ssh

Stuart Bishop stuart.bishop at canonical.com
Fri Feb 13 17:38:27 UTC 2015


On 13 February 2015 at 09:42, Nicolás Pace <nicopace at gmail.com> wrote:
> Hi guys,
> I'm having a problem with amulet.
> i implemented a test with this chunk of code inside:
>
> logstash_indexer_agent = d.sentry.unit['logstash-indexer/0']
> curl_response = logstash_indexer_agent.run("curl
> http://127.0.0.1:9200/index/_search?size=1")[0]
> print(curl_response)
>
> that print is throwing this:
> http://paste.ubuntu.com/10197382/
>
> I found a fixed bug that appears to be similar to this one:
> https://bugs.launchpad.net/ubuntu-ci-services-itself/+bug/1283198
>
> Any idea what could it be?

Good timing. This one bit me enough times today that I linked the
original bug from 2011 to Amulet.
https://bugs.launchpad.net/juju/+bug/802117.

What is happening is juju pollutes both ~/.ssh/known_hosts and
~root/.ssh/known_hosts with provisioned host keys and they are never
cleaned up. When the IP addresses gets recycled, which seems to happen
a few times a day recently, all sorts of things start randomly
failing. Particularly test suites that need to 'juju ssh' or 'juju
run' stuff automatically.

The simple fix is having juju pass an option to ssh to not use the
user's known_hosts files, instead a file specific to the environment.
Extra points for having juju clean out keys when machines are
destroyed.

-- 
Stuart Bishop <stuart.bishop at canonical.com>



More information about the Juju mailing list