Linux Terminal Server Project

thin client can't boot if it has set PRINTER_0_DEVICE in lts.conf

Reported by Gelu N. on 2012-05-08
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
LTSP
Medium
Alkis Georgopoulos
ltsp (Debian)
Fix Released
Unknown
ltsp (Ubuntu)
Undecided
Unassigned
Precise
High
Stéphane Graber
Quantal
Undecided
Unassigned

Bug Description

[IMPACT]

After upgrade LTSP server and client images (new client chroot from scratch) from 11.10 to 12.04.

[TESTCASE]
If in lts.conf is configured a local printer:
Code:

[MAC]
PRINTER_0_DEVICE=/dev/lp0 (orPRINTER_0_DEVICE=anythingelse)

the client with MAC can't boot and it stops after "Begin: Running /scripts/init-bottom ... done."

On server in /var/log/syslog:
Code:

dhcpd: DHCPDISCOVER from [MAC] via eth0
.....
dhcpd: DHCPACK on 192.168.0.60 to [MAC] via eth0
nbd_server[2071]: connect from 192.168.0.60, assigned file is /opt/ltsp/images/i386.img
nbd_server[2071]: Can't open authorization file (null) (Bad address).
nbd_server[2071]: Authorized client
nbd_server[32636]: Starting to serve
nbd_server[32636]: Size of exported file/device is 687316992

and stops here without the message "Disconnect request received" as is expected on normal boot of a thin client.

If I put in comment PRINTER_0_DEVICE in lts.conf everything is just fine and that terminal boot ok.

[Regression Potential]

* None that i can see.

Gelu N. (gelu) wrote :

I reported this bug in the wrong place? Or is nobody concerned about the bugs here? Is anyone kind enough to answer me? Because it is frustrating to no longer use printers connected to terminal after upgrade.
There are two more problems after upgrade, one with USB scanners, one with reported free space on USB sticks, but do not know whether to detailing, because it seems that no one answer here.

Gelu N. (gelu) wrote :

I solved my problem. Bug still exists.

I noticed that the terminal freezes when running /usr/sbin/jetpipe. So I modified /opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/50-jetpipe
to:
echo ${${DEVICE}JETPIPE_ARGS}${PORT} > /etc/jetargs
instead of:
/usr/sbin/jetpipe ${JETPIPE_ARGS jetpipe}${DEVICE}${PORT}.

Then I made ​​a script / opt/ltsp/i386/etc/init.d/myjetpipe:

#! / bin / sh
argsfile = "/ etc / jetargs"
if [-f "$argsfile '] THEN
   JETARGS read-r < "$argsfile"
   /usr/sbin/jetpipe $JETARGS
fi

which, of course, is started by RCFILE_XX =/etc/init.d/myjetpipe of lts.conf

I solved the problem with scanners too: saned daemon must be run on terminal as root instead as user saned. The problem with reported free space on USB sticks still have not solved.
I know that this does not solve the bugs, but I just did some tricks to solve my problems. I put it here, maybe help others.

And I still had a question: dude, is anyone here?

Ben D. (bendi) wrote :

I have had what appears to be the same problem and I can confirm that commenting out PRINTER_0_DEVICE in lts.conf allows the thin client to boot, but of course means it cannot print.

I tried your solution but it does not appeared to have worked for me, I was hoping that you could check the script you posted to see whether it is exactly correct. For example, on the third line the second quote is a single as opposed to a double, and should there be a space after "read" on the third line?

Thank you Gelu and I hope that I'm not the only one who has read this bug and that someone will look into fixing it.

Gelu N. (gelu) wrote :

Hi there, Ben!

Yes, code was broken by this web form. I uploaded the two scripts on one webserver.

Download the scripts from: http://www.ilinc.ro/ltsp-bug.tgz .

Extract:
50-jetpipe from .tgz to /opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/50-jetpipe
and
myjetpipe to opt/ltsp/i386/etc/init.d/myjetpipe

Insert a line: RCFILE_XX =/etc/init.d/myjetpipe in your lts.conf (where XX is 01 for example if is first custom script).

Then do "ltsp-update-image --arch i386"

I tested just two hours ago, since I upgraded ltsp chroot and 05-jetpipe was overwritten. Now I need to recover the saned daemon problem too.

Ben D. (bendi) wrote :

Thank you for your reply. I updated the files to be the same as the files you provided and although the client started, it would not boot. It appeared that Jetpipe was not running which implied that the "myjetpipe" file was not executing. The permissions allowed execution of the file so that was not the issue. In the end, I used this script instead (which includes a fair amount of debugging messages) which solved the problem:

#!/bin/bash
echo “Running myjetpipe” > /etc/rcfile.log
argsfile=/etc/jetargs
if [ -f “$argsfile ]
then
 read -r JETARGS < $argsfile
 echo “Running jetpipe with $JETARGS” >> /etc/rcfile.log
 /usr/sbin/jetpipe $JETARGS
 if [ $? -ne 0 ]
 then
  echo “Error running jetpipe” >> /etc/rcfile.log
 fi
fi

It all works fine now, and thank you Gelu again for your help and I hope this will help any others who are experiencing the same problem.

- Ben

Phil Davey (pd213) wrote :

Edit /opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/50-jetpipe

Change:
/usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT}
to
/usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT} &

(ie put an & at the end of the line)

That fixes it for me.

Alkis Georgopoulos (alkisg) wrote :
Changed in ltsp:
assignee: nobody → Alkis Georgopoulos (alkisg)
importance: Undecided → Medium
status: New → Fix Committed
Alek_A (ackbeat) wrote :

Thanks a lot for posting this, guys!
The same issue.
It boots now at least!
Let's see if it able to print...

Alek_A (ackbeat) wrote :

Yes, it is able to print now! Thanks!

Marc Gariépy (mgariepy) wrote :

We would need to sru this patch in both precise and quantal.

http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/2395

Marc Gariépy (mgariepy) on 2012-10-06
description: updated
Changed in ltsp:
status: Fix Committed → Fix Released
Changed in ltsp (Ubuntu Quantal):
status: New → Fix Released
Changed in ltsp (Ubuntu Precise):
status: New → Fix Committed
status: Fix Committed → In Progress
assignee: nobody → Stéphane Graber (stgraber)
importance: Undecided → Critical
importance: Critical → High
Stéphane Graber (stgraber) wrote :

Package uploaded to precise-proposed queue.

Hello Gelu, or anyone else affected,

Accepted ltsp into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ltsp/5.3.7-0ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ltsp (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Marc Gariépy (mgariepy) wrote :

hello, just tested the package and it works as expected.

thanks for the upload

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltsp - 5.3.7-0ubuntu2.3

---------------
ltsp (5.3.7-0ubuntu2.3) precise-proposed; urgency=low

  * Fix ltsp-shutdown, ltsp-restart and ltsp-cluster-info to use TryExec and
    the correct gnome-session script. (LP: #1062947)
  * Re-order ltsp-update-image to the tftp after the image. (LP: #1048689)
  * Fix jetpipe to do the daemoning itself rather than use the non-working
    python-daemon code. (LP: #996533)
 -- Stephane Graber <email address hidden> Sat, 06 Oct 2012 14:28:11 -0400

Changed in ltsp (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in ltsp (Debian):
status: Unknown → Confirmed
Changed in ltsp (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.