default LTSP dhcpd.conf file wrongly configured

Bug #573207 reported by Lama on 2010-05-01
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Undecided
Unassigned

Bug Description

The default LTSP DHCP configuration file located at /etc/ltsp/dhcpd.conf has the .tmp extension added to the location of the image files LTSP uses to boot from. I reproduced this error on a fresh install of Ubuntu 10.04 i386 and AMD64. Its easily fixed by removing the .tmp extension, however clients will not boot at all if the image path is wrong. It appears for some reason the configuration file points to the temporary file instead of the default image path.

Default:

    option root-path "/opt/ltsp/i386.tmp";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386.tmp/pxelinux.0";
    } else {
        filename "/ltsp/i386.tmp/nbi.img";
    }
}

Needs to be:

    option root-path "/opt/ltsp/i386";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386/pxelinux.0";
    } else {
        filename "/ltsp/i386/nbi.img";
    }
}

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: ltsp-server-standalone 5.2.1-0ubuntu9
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic i686
Architecture: i386
Date: Sat May 1 20:53:22 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100427.1)
PackageArchitecture: all
ProcEnviron:
 LANG=nl_BE.utf8
 SHELL=/bin/bash
SourcePackage: ltsp

Lama (casperverbuyst) wrote :
Changed in ltsp (Ubuntu):
status: New → Confirmed
Ricardo Pérez López (ricardo) wrote :

Confirmed. Using Ubuntu 10.04 LTS alternate install CD, booting and then press F4 -> select "Install an LTSP server". This is what I have in my /etc/ltsp/dhcpd.conf (I don't manually changed it at all):

#
# Default LTSP dhcpd.conf config file.
#

authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.20 192.168.0.250;
    option domain-name "example.com";
    option domain-name-servers 192.168.0.1;
    option broadcast-address 192.168.0.255;
    option routers 192.168.0.1;
# next-server 192.168.0.1;
# get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
    option root-path "/opt/ltsp/i386.tmp";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386.tmp/pxelinux.0";
    } else {
        filename "/ltsp/i386.tmp/nbi.img";
    }
}

After removing the ".tmp" suffix from the above file, my LTSP clients began to start perfectly.

Ricardo Pérez López (ricardo) wrote :

Interestingly, the /etc/ltsp/dhcpd.conf file shipped with the ltsp-server-standalone package is right, i.e. it's exactly the same as above except of the .tmp suffix:

#
# Default LTSP dhcpd.conf config file.
#

authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.20 192.168.0.250;
    option domain-name "example.com";
    option domain-name-servers 192.168.0.1;
    option broadcast-address 192.168.0.255;
    option routers 192.168.0.1;
# next-server 192.168.0.1;
# get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
    option root-path "/opt/ltsp/i386";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386/pxelinux.0";
    } else {
        filename "/ltsp/i386/nbi.img";
    }
}

It seems like some script changed the file during the LTSP automatic installation & configuration.

Alkis Georgopoulos (alkisg) wrote :

Maybe the problem is in ltsp-client-builder.postinst:

# make sure /etc/dhcp3/dhcpd.conf is for the right architecture
LTSP_ARCH=$(ls -1 /target/opt/ltsp/images | sed "s/.img//g")
chroot /target sed "s/i386/$LTSP_ARCH/g" -i /etc/ltsp/dhcpd.conf

If for some reason the compressed image was named /opt/ltsp/images/i386.img.tmp, that would result in the dhcpd.conf you're seeing.
Maybe ltsp-update-image failed for some reason in your installation, and i386.img.tmp was never renamed to i386.img?

Rewriting the previous 2 lines this way may solve the problem (untested):
for f in /target/opt/ltsp/images/*; do
    LTSP_ARCH="${f/.*}";
    break;
done
if [ -n "$LTSP_ARCH" ] && [ "$LTSP_ARCH" != "i386" ]; then
    sed -i "s/i386/$LTSP_ARCH/g" /target/etc/ltsp/dhcpd.conf
fi

Alkis Georgopoulos (alkisg) wrote :

Sorry, ${f%%.*} instead of ${f/.*}:

for f in /target/opt/ltsp/images/*; do
    LTSP_ARCH="${f%%.*}"
    break
done
if [ -n "$LTSP_ARCH" ] && [ "$LTSP_ARCH" != "i386" ]; then
    sed -i "s/i386/$LTSP_ARCH/g" /target/etc/ltsp/dhcpd.conf
fi

Stéphane Graber (stgraber) wrote :

It definitely seems like something went wrong during the chroot build process in the installer.
I usually get that when I don't have enough space on my target filesystem.

Could you attach the content of your /var/log/installer/* ?

Changed in ltsp (Ubuntu):
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for ltsp (Ubuntu) because there has been no activity for 60 days.]

Changed in ltsp (Ubuntu):
status: Incomplete → Expired
gcc (chris+ubuntu-qwirx) wrote :
Changed in ltsp (Ubuntu):
status: Expired → Confirmed
gcc (chris+ubuntu-qwirx) wrote :
gcc (chris+ubuntu-qwirx) wrote :
gcc (chris+ubuntu-qwirx) wrote :
gcc (chris+ubuntu-qwirx) wrote :
gcc (chris+ubuntu-qwirx) wrote :
gcc (chris+ubuntu-qwirx) wrote :
gcc (chris+ubuntu-qwirx) wrote :
gcc (chris+ubuntu-qwirx) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers