[padb] r405 committed - Handle the case where compute nodes are using hostnames with domain na...
padb at googlecode.com
padb at googlecode.com
Sun Oct 31 20:37:12 GMT 2010
Revision: 405
Author: apittman at gmail.com
Date: Sun Oct 31 13:36:52 2010
Log: Handle the case where compute nodes are using hostnames with domain
names
set but the resource manager is supplying a host-list without domain names.
http://code.google.com/p/padb/source/detail?r=405
Modified:
/trunk/src/padb
=======================================
--- /trunk/src/padb Sat Oct 23 17:52:52 2010
+++ /trunk/src/padb Sun Oct 31 13:36:52 2010
@@ -9608,6 +9608,25 @@
if ( defined $cmd->{pd} ) {
my $hostname = $inner_conf{hostname};
+
+ # Check for this host having any processes, if it doesn't appear to on
first
+ # inspection then try removing any domain name from the hostname and see
if
+ # we have a match then. This allows for the case where hostnames are
reported
+ # the resource manager without domain names but hostnames are set with
domain
+ # names.
+ # Note this is probably not 'safe' for strict definitions of hostnames
and
+ # domain names but for clusters it's highly unlikely to have two nodes
with
+ # matching hostnames but different domains.
+
+ if ( not defined $cmd->{pd}{$hostname} ) {
+
+ my ($new_name) = split $PERIOD, $hostname;
+
+ if ( not defined $new_name ) {
+ return;
+ }
+ $hostname = $new_name;
+ }
foreach my $rank ( keys %{ $cmd->{pd}{$hostname} } ) {
register_target_process( $rank, $cmd->{pd}{$hostname}{$rank} );
}
More information about the padb-devel
mailing list