Post by Erich FochtHmm, this seems to be correct according to the logic of the code. I am attempting
a deployment over an ssh tunnel, therefore the address where the request comes
from is 127.0.0.1 (through the tunnel).
E.
Good catch Erich! A fix could be to just append the real IP of the
imaged node in the rsync log entry, more exactly in the "fake"
imaging_complete filename. If the appended IP exists trust it, otherwise
fallback to the previous way taking the IP from the rsync source address
(to provide also backward compatibility).
Something like the following (untested). What do you think?
-Andrea
Index: etc/autoinstallscript.template
===================================================================
--- etc/autoinstallscript.template (revision 4365)
+++ etc/autoinstallscript.template (working copy)
@@ -540,7 +540,7 @@
#
# Tell the image server we are done
#
-rsync $IMAGESERVER::scripts/imaging_complete > /dev/null 2>&1
+rsync $IMAGESERVER::scripts/imaging_complete_$IPADDR > /dev/null 2>&1
logmsg "Imaging completed"
#
################################################################################
Index: sbin/si_netbootmond
===================================================================
--- sbin/si_netbootmond (revision 4365)
+++ sbin/si_netbootmond (working copy)
@@ -112,12 +112,18 @@
# Get individual field values for this line
my @array = split(/\s+/);
- if ("$array[5]" eq "scripts/imaging_complete") {
+ if ($array[5] =~ /scripts\/imaging_complete_?([\.0-9]+)?/) {
- my $client_ip = $array[8];
- $client_ip =~ s/\(//g;
- $client_ip =~ s/\)//g;
+ my $client_ip;
+ if (defined($1)) {
+ $client_ip = $1;
+ } else {
+ $client_ip = $array[8];
+ $client_ip =~ s/\(//g;
+ $client_ip =~ s/\)//g;
+ }
+
# diagnostic output
#print "Configuring $client_ip for local booting.\n";
create_no_boot_symlink($client_ip);