in ltsp, initramfs-tools/scripts/ltsp_nbd does not respect the parameter "nbdserver"

Bug #925165 reported by Zrin Ziborski
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
Fix Released
Low
Alkis Georgopoulos
ltsp (Ubuntu)
Fix Released
Low
Alkis Georgopoulos

Bug Description

Package: ltsp-server
Version: 5.2.16-0ubuntu7
Maintainer: Stephane Graber <email address hidden>
Release: 11.10 (oneiric)

AFAIU, (/opt/ltsp/.../usr/share/) initramfs-tools/scripts/ltsp_nbd
should respect the "nbdserver" parameter -
the relevant part of the function mountroot() should be amended to
something like

    if [ -n "${nbdroot}" ]; then
        # <host>:<port>
        NBD_ROOT_SERVER=$( echo "${nbdroot}" | sed 's/:.*//')
        NBD_ROOT_PORT=$( echo "${nbdroot}" | sed 's/.*://')
    else
        if [ -n "${nbdserver}" ]; then
                NBD_ROOT_SERVER="${nbdserver}"
        else
                NBD_ROOT_SERVER="${ROOTSERVER}"
        fi
        if [ -n "$nbdname" ]; then
            NBD_ROOT_NAME=${nbdname}
        else
            NBD_ROOT_PORT=${nbdport:-"2000"}
        fi
    fi

The logic behind mountroot() and scripts/ltsp_nbd probably needs
more thorough review and fixing.

best regards,

Tags: nbdserver
description: updated
Revision history for this message
Stéphane Graber (stgraber) wrote :

Done in rev1997

=== modified file 'client/initramfs/scripts/ltsp_nbd'
--- client/initramfs/scripts/ltsp_nbd 2011-11-27 04:24:07 +0000
+++ client/initramfs/scripts/ltsp_nbd 2012-02-01 23:38:00 +0000
@@ -38,7 +38,11 @@
         NBD_ROOT_HOST=$( echo "${nbdroot}" | sed 's/:.*//')
         NBD_ROOT_PORT=$( echo "${nbdroot}" | sed 's/.*://')
     else
- NBD_ROOT_HOST="${ROOTSERVER}"
+ if [ -n "${nbdserver}" ]; then
+ NBD_ROOT_HOST="${nbdserver}"
+ else
+ NBD_ROOT_HOST="${ROOTSERVER}"
+ fi
         if [ -n "$nbdname" ]; then
             NBD_ROOT_NAME=${nbdname}
         else

Changed in ltsp:
status: New → Fix Committed
Changed in ltsp (Ubuntu):
status: New → Fix Committed
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Fixed in LTSP 5.3. ltsp_nbd was removed in favor of local-top/nbd.

Changed in ltsp (Ubuntu):
assignee: nobody → Alkis Georgopoulos (alkisg)
importance: Undecided → Low
status: Fix Committed → Fix Released
Changed in ltsp:
assignee: nobody → Alkis Georgopoulos (alkisg)
importance: Undecided → Low
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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