Discussion:
[Sisuite-devel] wrong localboot file generated
Erich Focht
2007-12-11 15:30:45 UTC
Permalink
Hi,

systemimager-4.0.2 is generating a wrong localboot file in /tftpboot/pxelinux.cfg
after the deployment is finished. Instead of the file C0A83298 (192.168.50.152)
it has created 7F000001 (127.0.0.1) after the deployment. This is annoying as it
leads to a re-installation of the client.

Any hint where I can fix this?

Thanks & best regards,
Erich
Erich Focht
2007-12-11 16:24:09 UTC
Permalink
Hmm, 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.
Post by Erich Focht
Hi,
systemimager-4.0.2 is generating a wrong localboot file in /tftpboot/pxelinux.cfg
after the deployment is finished. Instead of the file C0A83298 (192.168.50.152)
it has created 7F000001 (127.0.0.1) after the deployment. This is annoying as it
leads to a re-installation of the client.
Any hint where I can fix this?
Thanks & best regards,
Erich
Andrea Righi
2007-12-12 13:50:49 UTC
Permalink
Post by Erich Focht
Hmm, 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);

Loading...