[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST PATCH] standalone-reset: Check for SSH keys.



Hi.  I found this patch in the git branch you passed me.  I'm not sure
if you intended this patch for upstream, but it has your s-o-b so I
guess so.  For reasons that will become clear I have chosen to
git-send-email it to myself, so that I may reply.

Ian Jackson writes ("[OSSTEST PATCH] standalone-reset: Check for SSH keys."):
> From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> 
> If TestHostKeypairPath is not set then check for $HOME/.ssh/id_rsa
> key. OSSTest picks those keys up if TestHostKeypairPath is not
> defined.

I don't think this is really true.  I searched for TestHostKeypairPath
and there are two use sites: TestSupport::authorized_keys, which
although it processes a number or inputs, seems to expect all of them
to exist - since it calls get_filecontents on all of them.  And,
ts-host-install, which tries to copy it to the host and again has no
fallback.

But maybe I am confused.  If so then:

>  keypair=`getconfig TestHostKeypairPath`
> -ensure_key "$keypair" -t rsa -b 1024
> +if [ -n "$keypair" ]; then
> +     ensure_key "$keypair" -t rsa -b 1024
> +else
> +     [ -e "$HOME/.ssh/id_rsa" ] || exit 1
> +fi

this is probably not right.  In the error case, this will exit nonzero
without printing a message to stderr.  I suggest something like
    ls "$HOME/.ssh/id_rsa" >/dev/null
(And, of course, the set of things checked as an alternative should be
the same as that used elsewhere in osstest.  So we do need to find the
fallback code...)

For now I am going to drop this patch from my version of your branch.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.