Re: ltsp_nbd: work around some udev/upstart issues?
Jim Mcquillan <[email protected]> Wed, 15 Sep 2010 07:38:55 -0400
| Newsgroups | gmane.linux.terminal-server.devel |
|---|---|
| Message-ID | <[email protected]> |
I like it too. I've got an office full of thin clients that seem to have a mind of their own, when it comes to booting. Sometimes they boot straight up, and sometimes you have to try 3 or 4 times until they behave. Even though your patch doesn't solve the root of the problem, at least it solves the symptoms, and in the end, that's all the user cares about. Jim. On 09/15/2010 06:43 AM, Gideon Romm wrote: > Alkis, > > You have my vote. I proposed this same patch about a year ago when > stephane was working on nbd-proxy and it was introducing issues. I > found that the patch only helped and did no harm. > > -Gadi > > On Wed, Sep 15, 2010 at 4:34 AM, Alkis Georgopoulos<[email protected]> wrote: >> I've had reports of fast clients not booting, possibly because of udev >> or upstart problems, and with the following patch they were solved. >> >> It just makes nbd-client retry connecting up to 10 times, if it fails. >> On the problematic clients, it succeeds on the 2-4 try. >> >> I don't have the experience to fix the udev/upstart problems, so I'm >> asking about policy, should I commit this? It shouldn't cause any harm, >> nfs too retries mounting if it fails... >> >> Cheers, >> Alkis >> >> >> === modified file 'client/initramfs/scripts/ltsp_nbd' >> --- client/initramfs/scripts/ltsp_nbd 2010-08-23 19:42:59 +0000 >> +++ client/initramfs/scripts/ltsp_nbd 2010-09-15 07:32:01 +0000 >> @@ -84,7 +84,19 @@ >> fi >> >> # Mount the root device >> - if nbd-client $NBD_CLIENT_ROOT_SERVER $NBD_ROOT_PORT /dev/nbd0 ; then >> + # Try up to 10 times with 2 sec interval because of udev/upstart bugs >> + i=0 >> + while [ $i -lt 10 ]; do >> + i=$(($i+1)) >> + if nbd-client $NBD_CLIENT_ROOT_SERVER $NBD_ROOT_PORT /dev/nbd0; then >> + i=20 >> + break >> + else >> + echo "Warning: failed to connect to NBD server $NBD_ROOT_SERVER:$NBD_ROOT_PORT, retrying..." >> + sleep 2 >> + fi >> + done >> + if [ $i -eq 20 ]; then >> eval $(fstype /dev/nbd0) >> if [ -z "$FSTYPE" ]; then >> echo "Warning: unable to detect filesystem, assuming squashfs." >> >> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _____________________________________________________________________ >> Ltsp-developer mailing list. To un-subscribe, or change prefs, goto: >> https://lists.sourceforge.net/lists/listinfo/ltsp-developer >> For additional LTSP help, try #ltsp channel on irc.freenode.net >> > > > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _____________________________________________________________________ Ltsp-developer mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-developer For additional LTSP help, try #ltsp channel on irc.freenode.net