AttributeError: 'ACKDatagram' object has no attribute 'mode'

Bug #1682139 reported by Andres Rodriguez on 2017-04-12
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Andres Rodriguez
python-tx-tftp (Ubuntu)
Critical
Andres Rodriguez
Zesty
Undecided
Unassigned

Bug Description

The server raises an AttributeError when a non-existing file is
requested, by tftp localhost 1069 -c get foo for example:

$ bin/twistd.maas -n tftp -d $PWD -r -v
2012-06-28 14:18:58+0100 [-] Log opened.
2012-06-28 14:18:58+0100 [-] twistd 11.1.0 (.../bin/python2.7 2.7.3) starting up.
2012-06-28 14:18:58+0100 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2012-06-28 14:18:58+0100 [-] TFTP starting on 1069
2012-06-28 14:18:58+0100 [-] Starting protocol <tftp.protocol.TFTP instance at 0x1543d88>
2012-06-28 14:18:58+0100 [-] TFTP Listener started at 0.0.0.0:1069
2012-06-28 14:19:01+0100 [TFTP (UDP)] Datagram received from ('127.0.0.1', 45212): <RRQDatagram(filename=foo, mode=netascii)>
2012-06-28 14:19:01+0100 [TFTP (UDP)] Datagram received from ('127.0.0.1', 45212): <ACKDatagram(blocknum=1)>
2012-06-28 14:19:01+0100 [TFTP (UDP)] Unhandled Error
        Traceback (most recent call last):
          File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 69, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 586, in _doReadOrWrite
            why = selectable.doRead()
        --- <exception caught here> ---
          File "/usr/lib/python2.7/dist-packages/twisted/internet/udp.py", line 131, in doRead
            self.protocol.datagramReceived(data, addr)
          File ".../python-tx-tftp/tftp/protocol.py", line 40, in datagramReceived
            mode = datagram.mode.lower()
        exceptions.AttributeError: 'ACKDatagram' object has no attribute 'mode'

Changed in maas:
milestone: none → 2.2.0rc2
importance: Undecided → High
assignee: nobody → Andres Rodriguez (andreserl)
status: New → In Progress
Changed in python-tx-tftp (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Andres Rodriguez (andreserl)
status: New → Triaged
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed

Hello Andres, or anyone else affected,

Accepted python-tx-tftp into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-tx-tftp/0.1~bzr47-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-tx-tftp (Ubuntu Zesty):
status: New → Fix Committed
tags: added: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-tx-tftp - 0.1~bzr47-0ubuntu1

---------------
python-tx-tftp (0.1~bzr47-0ubuntu1) zesty; urgency=medium

  * New upstream revision that only includes bug fixes and changes made
    in previous Ubuntu packaging (lp:python-tfx-tftp) (LP: #1682187).
    - Include fixes to setup.py and tox (bzr43).
    - Include port to python3 (bzr44).
    - Mention object transfer in README (bzr45)
    - Fix handle non-RRQ/WRQ datagrams on default port (bzr46) (LP: #1682139)
    - Fix tracebacks that cause tftp to temporarily stop with
      missing 'stopListening', 'socket' (LP: #1376483, LP: #1381129)
  * debian/patches:
    - 04-setup-py-and-tox.patch: Drop, merged upstream (bzr43)
    - 05-python3-support.patch: Drop, merged upstream (bzr44)
    - 99-drop-trial.patch: Drop setuptools_trial, provided that it is not
      in the Ubuntu archive.

 -- Andres Rodriguez <email address hidden> Tue, 11 Apr 2017 11:03:56 -0400

Changed in python-tx-tftp (Ubuntu):
status: In Progress → Fix Released
Changed in maas:
status: Fix Committed → Fix Released

As part of a recent change in the Stable Release Update verification policy we would like to inform that for a bug to be considered verified for a given release a verification-done-$RELEASE tag needs to be added to the bug where $RELEASE is the name of the series the package that was tested (e.g. verification-done-xenial). Please note that the global 'verification-done' tag can no longer be used for this purpose.

Thank you!

The fix for this bug has been awaiting testing feedback in the -proposed repository for zesty for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers