feature request: support ROOTSERVER again in local-top/nbd

Bug #696941 reported by Alkis Georgopoulos
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nbd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

local-top/nbd in my Lucid (2.9.14-2ubuntu1) contains the following:
if [ -z "$nbdsrv" ]
then
 nbdsrv=${ROOTSERVER}
fi

That allowed me to pass "root=/dev/nbd0 nbdroot=,2011" without having to declare the server IP in pxelinux.cfg/default, it was autodetected.

local-top/nbd from Natty (1:2.9.16-6ubuntu1) and from the current http://git.debian.org/?p=users/wouter/nbd.git do not fallback to using ROOTSERVER anymore, so I need to change my configuration every time my server IP changes.

Is it possible to re-include those 3 lines? :)
Thank you.

Tags: patch
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Attaching a patch that allows me again to only specify "root=/dev/nbd0 nbdroot=,2011" in pxelinux.cfg/default.

tags: added: patch
Revision history for this message
Wouter Verhelst (wouter-debian) wrote : Re: [Bug 696941] [NEW] feature request: support ROOTSERVER again in local-top/nbd

On Mon, Jan 03, 2011 at 07:44:23PM -0000, Alkis Georgopoulos wrote:
> Public bug reported:
>
> local-top/nbd in my Lucid (2.9.14-2ubuntu1) contains the following:
> if [ -z "$nbdsrv" ]
> then
> nbdsrv=${ROOTSERVER}
> fi
>
> That allowed me to pass "root=/dev/nbd0 nbdroot=,2011" without having to
> declare the server IP in pxelinux.cfg/default, it was autodetected.
>
> local-top/nbd from Natty (1:2.9.16-6ubuntu1) and from the current
> http://git.debian.org/?p=users/wouter/nbd.git do not fallback to using
> ROOTSERVER anymore, so I need to change my configuration every time my
> server IP changes.

Actually, what that version does is require you to specify:

nbdroot=dhcp

if you want to get anything from DHCP (and in that case, you must get
*everything* from DHCP); the format of the ROOTPATH variable should
then look like what the nbdroot parameter looks like if you don't use
nbdroot=dhcp). This is to avoid things going haywire if someone
specifies a root path for an root-on-NFS configuration but has NBD
installed, too (for swap, say). You can use this like so:

option root-path "nbd-server.example.com,2011,nbd0";

which I think is preferable over abusing ROOTSERVER (that has other
purposes too).

If there are some issues with that method, please let me know (but I'd
prefer not having to support 30 different types of booting nbd; the
script is complex enough as it is).

--
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
  http://www.schneier.com/blog/archives/2009/01/biometrics.html

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

A use case is when one is unable to define ROOTPATH with DHCP (e.g. all Greek schools use cheap routers as their DHCP servers) and is using a proxyDHCP server instead (https://help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP) in combination with IPAPPEND 3 in pxelinux.cfg/default.

Pxelinux then passes ip=<client-ip>:<rootserver>:<gateway>:<netmask> as kernel parameters and ipconfig uses those to assign to the NIC the same IP that it got in the PXE offer. It doesn't do a second DHCP request.

So maybe "if root=/dev/nbdX, then fallback to ROOTSERVER", to also allow for the root=/dev/nfs use case that you mentioned earlier?

OK, the teachers in those schools could probably configure a static IP with network-manager, but there are also teachers that use their laptops as LTSP servers and change 2-3 schools per week, it would help them there. If you think it's too rare a use case, then we'll work around it with an if-up script that updates pxelinux.cfg/default every time the ip changes, so it's not a big problem.

Thank you!

Revision history for this message
Wouter Verhelst (wouter-debian) wrote : Re: [Bug 696941] Re: feature request: support ROOTSERVER again in local-top/nbd

On Wed, Jan 05, 2011 at 10:59:33PM -0000, Alkis Georgopoulos wrote:
> A use case is when one is unable to define ROOTPATH with DHCP (e.g. all
> Greek schools use cheap routers as their DHCP servers) and is using a
> proxyDHCP server instead
> (https://help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP) in combination
> with IPAPPEND 3 in pxelinux.cfg/default.
>
> Pxelinux then passes ip=<client-ip>:<rootserver>:<gateway>:<netmask> as
> kernel parameters and ipconfig uses those to assign to the NIC the same
> IP that it got in the PXE offer. It doesn't do a second DHCP request.

OMFG, netbooting is a can of worms.

> So maybe "if root=/dev/nbdX, then fallback to ROOTSERVER", to also allow
> for the root=/dev/nfs use case that you mentioned earlier?

No, in that light it's a sensible request. I'll apply it.

Note that that won't happen until Debian squeeze releases, however, and
then you'll still need to get a request through to get nbd updated in
ubuntu.

Regards,

--
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
  http://www.schneier.com/blog/archives/2009/01/biometrics.html

Revision history for this message
Wouter Verhelst (wouter-debian) wrote :

On Thu, Jan 06, 2011 at 01:36:07AM +0100, Wouter Verhelst wrote:
> On Wed, Jan 05, 2011 at 10:59:33PM -0000, Alkis Georgopoulos wrote:
> > So maybe "if root=/dev/nbdX, then fallback to ROOTSERVER", to also allow
> > for the root=/dev/nfs use case that you mentioned earlier?
>
> No, in that light it's a sensible request. I'll apply it.

Er, that is, with the above constraint (if we're trying to boot off an
nbd device)

--
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
  http://www.schneier.com/blog/archives/2009/01/biometrics.html

Revision history for this message
Wouter Verhelst (wouter-debian) wrote :

On Thu, Jan 06, 2011 at 01:37:30AM +0100, Wouter Verhelst wrote:
> On Thu, Jan 06, 2011 at 01:36:07AM +0100, Wouter Verhelst wrote:
> > On Wed, Jan 05, 2011 at 10:59:33PM -0000, Alkis Georgopoulos wrote:
> > > So maybe "if root=/dev/nbdX, then fallback to ROOTSERVER", to also allow
> > > for the root=/dev/nfs use case that you mentioned earlier?
> >
> > No, in that light it's a sensible request. I'll apply it.
>
> Er, that is, with the above constraint (if we're trying to boot off an
> nbd device)

Or not, because that would remove some other flexibility. Hrm. This will
require some creative thinking.

--
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
  http://www.schneier.com/blog/archives/2009/01/biometrics.html

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Fix released in nbd-client 2.9.18-1~1.

Changed in nbd (Ubuntu):
status: New → 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.