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

Re: [Xen-devel] [PATCH v4 01/11] osstest: allow to disable the usage of a know_host file



On Wed, 2015-02-18 at 17:18 +0100, Roger Pau Monne wrote:

"known" in subject.

> This is only used by target_cmd_root and target_putfile_root and will be
> needed for mfsBSD which generates new keys on each boot.

AIUI this is an installer thing which runs from a ramdisk and hence has
no static host key, is that right?

I take it is has no preseeding like mechanisms then?


Would an alternative to plumbing this option all the way down be to
invoke ssh-keyscan after booting this mfsBSD to populate the
known_hosts?

> Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> ---
>  Osstest/TestSupport.pm | 25 ++++++++++++++++---------
>  1 file changed, 16 insertions(+), 9 deletions(-)
> 
> diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
> index 5ac66e5..d930e55 100644
> --- a/Osstest/TestSupport.pm
> +++ b/Osstest/TestSupport.pm
> @@ -374,14 +374,21 @@ sub remote_perl_script_done ($) {
>  
>  sub sshuho ($$) { my ($user,$ho)= @_; return "$user\@$ho->{Ip}"; }
>  
> -sub sshopts () {
> +sub sshopts {
> +    my ($disable_hosts) = @_;
> +    my $hosts = "tmp/t.known_hosts_$flight.$job";
> +
> +    if (defined $disable_hosts) {
> +        $hosts = "/dev/null";
> +    }

A more Perl-ish approach would be:
        $host = "/dev/null" if defined $disable_hosts;
(and I think the defined is optional there too).

Or perhaps $host = $disable_hosts ? "/dev/null" : "tmp/....";



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

 


Rackspace

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