[2.1] rackd tftp logging leaks a lot of python-isms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Gavin Panella | ||
2.1 |
Fix Released
|
Undecided
|
Gavin Panella |
Bug Description
The implementation of TFTPd used in rackd is in Python which is fine but should not be so visible in the logs. I see a lot of this:
2016-10-15 13:39:51 [TFTP (UDP)] Datagram received from ('192.168.9.12', 1304): <RRQDatagram(
2016-10-15 13:39:51 [-] RemoteOriginRea
2016-10-15 13:39:51 [-] Starting protocol <tftp.bootstrap
2016-10-15 13:39:51 [RemoteOriginRe
2016-10-15 13:39:51 [-] (UDP Port 45360 Closed)
2016-10-15 13:39:51 [-] Stopping protocol <tftp.bootstrap
2016-10-15 13:39:51 [TFTP (UDP)] Datagram received from ('192.168.9.12', 1305): <RRQDatagram(
2016-10-15 13:39:51 [-] RemoteOriginRea
2016-10-15 13:39:51 [-] Starting protocol <tftp.bootstrap
2016-10-15 13:39:51 [RemoteOriginRe
2016-10-15 13:39:51 [-] (UDP Port 37988 Closed)
2016-10-15 13:39:51 [-] Stopping protocol <tftp.bootstrap
I've no idea what the "Got error" piece means, especially since what is logged is a Python object handle and thus entirely useless to the reader :) As a guess, I think the tsize/0 is probably the problem, because right after this there is another protocol round with blksize/1468 that succeeds.
I *think this could be reduced to:
[date] [maas-tftpd] Failed to send binary 'bootx64.efi' to 192.168.9.12
[date] [maas-tftpd] Sent binary 'bootx64.efi' to 192.168.9.12
If we have good support for log levels (with CLI or UX to set the desired level), then a higher log level version might look like this:
[date] [maas-tftpd] Request from 192.168.9.12 for binary 'bootx84.efi' tsize=0
[date] [maas-tftpd] Failed to send binary 'bootx64.efi' to 192.168.9.12
[date] [maas-tftpd] Request from 192.168.9.12 for binary 'bootx84.efi' blksize=1468
[date] [maas-tftpd] Sent binary 'bootx64.efi' to 192.168.9.12
Related branches
- Mike Pontillo (community): Approve
-
Diff: 444 lines (+288/-27)7 files modifiedsrc/maasserver/tests/test_webapp.py (+12/-27)
src/provisioningserver/logger/__init__.py (+2/-0)
src/provisioningserver/logger/_tftp.py (+46/-0)
src/provisioningserver/logger/_twisted.py (+63/-0)
src/provisioningserver/logger/testing/__init__.py (+45/-0)
src/provisioningserver/logger/tests/test__tftp.py (+44/-0)
src/provisioningserver/logger/tests/test__twisted.py (+76/-0)
Changed in maas: | |
importance: | Undecided → Critical |
milestone: | none → 2.1.1 |
summary: |
- rackd tftp logging leaks a lot of python-isms + [2.1] rackd tftp logging leaks a lot of python-isms |
Changed in maas: | |
milestone: | 2.1.1 → 2.1.2 |
Changed in maas: | |
milestone: | 2.1.2 → 2.1.3 |
Changed in maas: | |
status: | New → Triaged |
Changed in maas: | |
status: | Fix Committed → Fix Released |
The linked branch fixed the noisy TFTP logging in 2.1 and later.