[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Nbd] nbd-server: about adding new exports dynamically



Hi

We are using NBD server in a LTSP-environment to serve terminal
images. However, we'd like to add new images/exports dynamically, but
currently NBD server does not support it without full restart and
breaking all existing connections.

I've written a patch which simply re-reads all configuration files on
SIGHUP and if there was a export which was not previously in the
export/server array, it appends it and starts serving. It does not
alter any of the existing exports, it only adds new ones. In our
environment, this is to make it safe (non-destructive) to use. In our
environment, it is non-destructive operation, because we make sure
that we only add new configuration fragments to /etc/nbd-server/conf.d
and make no other configuration changes. However, in its current form,
it is not non-destructive in general, because it calls parse_cfile()
which in turn modifies global variables. In my opinion, parse_cfile()
should be refactored to make it side-effect free.

Do you think the SIGHUP-based reconfiguration method is viable? If
not, what would be the better alternative?

Is it reasonable and acceptable to keep the reconfiguration procsess
non-destructive?

I'd like to see some kind of dynamic reconfiguration feature
implemented in NBD server. I am ready to make the effort to get this
feature implemented correctly and to get it upstream.

I'd really appreciate comments and feedback.

Best regards,

-- 
Tuomas



Reply to: