From: Ian Jackson Subject: Re: [PATCH OSSTEST RFC] Osstest/Debian.pm: Use Fqdn hostprop when collecting host keys Date: Fri, 1 May 2015 14:51:13 +0100 Message-ID: <21827.34001.74893.628888@mariner.uk.xensource.com> References: <1430487758-21972-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1430487758-21972-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 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. Merging these two may be a bit awkward (and involve more code than just duplicating the logic), given their different environments, so I won't block your fixup for this. Thanks, Ian.