TFTP server not listening on all interfaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Gavin Panella |
Bug Description
From discussion on bug 1051626:
On 13 June 2013 22:02, Tony Shireman <email address hidden> wrote:
> tl;dr - There seems to be an issue with the maas-pserv. It requires a
> service full-restart to begin functioning, allow nodes to commission and
> move to ready.
I think I know what this is. From maasserver.plugin:
# Create a UDP server individually for each discovered network
# interface, so that we can detect the interface via which we have
# received a datagram.
The address on which the TFTP was contacted is passed to the region
controller and is used when composing kernel arguments. However,
listening on all interfaces, specified by 0.0.0.0 iirc, gives 0.0.0.0
for the incoming address, which is not useful. The solution
implemented was to start a TFTP service (all running in the same
process) for each network interface.
This is done once, at start-up, so if pserv is started early, before
all interfaces on the machine are configured, it will miss them and
not start a service on that interface's address.
Assuming this is the cause, one solution here might be to use upstart
to automatically restart pserv when a network interface comes up or
down. Indeed, you may be able to formulate an upstart script to
respond to net-device-up and net-device-down, restarting maas-pserv
each time, to workaround this bug for now.
Another solution might be to periodically check network interfaces
within pserv, and start or stop TFTP services as necessary. The
upstart solution would respond more rapidly to change, but this
solution would avoid downtime.
Perhaps a combination would work well: the new (or modified
maas-pserv) upstart job could send SIGHUP to maas-pserv, which could
then rescan network interfaces.
Related branches
- Raphaël Badin (community): Approve
- Julian Edwards (community): Approve
-
Diff: 384 lines (+203/-58)5 files modifiedservices/pserv/run (+1/-0)
src/provisioningserver/plugin.py (+4/-16)
src/provisioningserver/tests/test_plugin.py (+14/-41)
src/provisioningserver/tests/test_tftp.py (+107/-0)
src/provisioningserver/tftp.py (+77/-1)
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Gavin Panella (allenap) |
Changed in maas: | |
status: | In Progress → Fix Committed |
milestone: | none → 14.04 |
Changed in maas: | |
status: | Fix Committed → Fix Released |