standalone-reset: Check for SSH keys.
A message that is not in the archive (sent off-list or not yet received): [email protected]
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."):
Quoted 5 lines
From: Konrad Rzeszutek Wilk <[email protected]>
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:
Review
Quoted 7 lines
keypair=
getconfig TestHostKeypairPath(quoted diff) +5
-1-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
[email protected]
https://lists.xen.org/xen-devel