nbd-server claims oldstyle exports not configured
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nbd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
[ubuntu 14.04]
Given the following config file:
---- /etc/nbd-
[generic]
# If you want to run everything as root rather than the nbd user, you
# may either say "root" in the two following lines, or remove them
# altogether. Do not remove the [generic] section, however.
user = nbd
group = nbd
includedir = /etc/nbd-
listenaddr = 10.10.0.241
oldstyle = true
# What follows are export definitions. You may create as much of them as
# you want, but the section header has to be unique.
[disk1]
exportname = /data/nbd/disk1.img
flush = true
fua = true
port = 20001
------------
When you restart nbd-server the following severe-sounding warning is reported:
------------
# service nbd-server restart
Restarting the Network Block Device server is pretty harsh on clients still using it.
waiting 5 seconds...You have been warned!
Restarting Network Block Device server: Stopping Network Block Device server: nbd-server.
** (process:19655): WARNING **: A port was specified, but oldstyle exports were not requested. This may not do what you expect.
** (process:19655): WARNING **: Please read 'man 5 nbd-server' and search for oldstyle for more info
nbd-server.
------------
However very clearly "oldstyle = true" has been set in the config. This config is definitely being read, because setting "oldstyle = blah" gives an error about invalid boolean.
Looking at source: it seems that glob_flags is not updated until after parse_cfile has returned:
servers = parse_cfile(
/* Update global variables with parsed values. This will be
* removed once we get rid of global configuration variables. */
glob_flags |= genconf.flags;
However this warning comes from within parse_cfile and based on the previous glob_flags setting.
}
And a process *is* running and listening on port 20001.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: nbd-server 1:3.7-1
ProcVersionSign
Uname: Linux 3.13.0-30-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
Date: Wed Jul 16 20:34:44 2014
InstallationDate: Installed on 2014-07-16 (0 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
ProcEnviron:
LANGUAGE=en_GB:en
TERM=xterm
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: nbd
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.