From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH OSSTEST RFC] Osstest/Debian.pm: Use Fqdn hostprop when collecting host keys
Date: Fri, 1 May 2015 14:59:49 +0100 [thread overview]
Message-ID: <1430488789.15640.39.camel@citrix.com> (raw)
In-Reply-To: <21827.34001.74893.628888@mariner.uk.xensource.com>
On Fri, 2015-05-01 at 14:51 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST RFC] Osstest/Debian.pm: Use Fqdn hostprop when collecting host keys"):
> > Otherwise hosts which are not in the same DnsDomain are not processed,
> > resulting in log messages such as:
> >
> > 2015-05-01 10:06:19 Z skipping host key for nonexistent host marilith-n4.xs.citrite.net
> > 2015-05-01 10:06:20 Z skipping host key for nonexistent host lace-bug.xs.citrite.net
>
> Oops.
>
> > $hostsq->execute($flight);
> > while (my ($node) = $hostsq->fetchrow_array()) {
> > - my $longname= "$node.$c{TestHostDomain}";
> > + my %props;
> > + $mhostdb->get_properties($node, \%props);
> > + my $longname= $props{Fqdn} ? $props{Fqdn} : "$node.$c{TestHostDomain}";
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
>
> Although, there is very similar logic in selecthost() (see near
> $defaultfqdn). The code here in preseed_create lacks the check to see
> whether the hostname is the fqdn to start with.
That code is:
my $defaultfqdn = $name;
$defaultfqdn .= ".$c{TestHostDomain}" unless $defaultfqdn =~ m/\./;
$ho->{Fqdn} = get_host_property($ho,'fqdn',$defaultfqdn);
Perhaps for now I should write:
my $defaultfqdn = $node;
$defaultfqdn .= ".$c{TestHostDomain}" unless $defaultfqdn =~ m/\./;
my %props;
$mhostdb->get_properties($node, \%props);
my $longname= $props{Fqdn} ? $props{Fqdn} : $defaultfqdn;
?
> Merging these two may
> be a bit awkward (and involve more code than just duplicating the
> logic), given their different environments,
Mainly becuase here in preseed_create we lack a $ho object I think.
> so I won't block your fixup for this.
Thanks.
Ian.
next prev parent reply other threads:[~2015-05-01 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 13:42 [PATCH OSSTEST RFC] Osstest/Debian.pm: Use Fqdn hostprop when collecting host keys Ian Campbell
2015-05-01 13:51 ` Ian Jackson
2015-05-01 13:59 ` Ian Campbell [this message]
2015-05-01 14:05 ` Ian Jackson
2015-05-01 14:09 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430488789.15640.39.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.