[2.1] rackd tftp logging leaks a lot of python-isms

Bug #1633726 reported by Mark Shuttleworth
6
This bug affects 1 person
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(filename=b'bootx64.efi', mode=b'octet', options=OrderedDict([(b'tsize', b'0'), (b'blksize', b'1468')]))>
2016-10-15 13:39:51 [-] RemoteOriginReadSession starting on 45360
2016-10-15 13:39:51 [-] Starting protocol <tftp.bootstrap.RemoteOriginReadSession object at 0x7f191969a5f8>
2016-10-15 13:39:51 [RemoteOriginReadSession (UDP)] Got error: <tftp.datagram.ERRORDatagram object at 0x7f191969a390>
2016-10-15 13:39:51 [-] (UDP Port 45360 Closed)
2016-10-15 13:39:51 [-] Stopping protocol <tftp.bootstrap.RemoteOriginReadSession object at 0x7f191969a5f8>
2016-10-15 13:39:51 [TFTP (UDP)] Datagram received from ('192.168.9.12', 1305): <RRQDatagram(filename=b'bootx64.efi', mode=b'octet', options=OrderedDict([(b'blksize', b'1468')]))>
2016-10-15 13:39:51 [-] RemoteOriginReadSession starting on 37988
2016-10-15 13:39:51 [-] Starting protocol <tftp.bootstrap.RemoteOriginReadSession object at 0x7f191969a978>
2016-10-15 13:39:51 [RemoteOriginReadSession (UDP)] Final ACK received, transfer successful
2016-10-15 13:39:51 [-] (UDP Port 37988 Closed)
2016-10-15 13:39:51 [-] Stopping protocol <tftp.bootstrap.RemoteOriginReadSession object at 0x7f191969a978>

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

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
Gavin Panella (allenap)
Changed in maas:
status: New → Triaged
Revision history for this message
Gavin Panella (allenap) wrote :

The linked branch fixed the noisy TFTP logging in 2.1 and later.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1633726] Re: [2.1] rackd tftp logging leaks a lot of python-isms

\o/ thank you

Changed in maas:
status: Fix Committed → 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.