Need retry loop on authserver requests

Bug #1951266 reported by Colin Watson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.sshserver
Triaged
Low
Unassigned

Bug Description

We recently saw the following failure:

2021-11-17 13:50:59+0000 [QueryProtocol,client] b'ubuntu-kernel-ancillary-bot' failed auth b'publickey'
2021-11-17 13:50:59+0000 [QueryProtocol,client] Traceback (most recent call last):
        --- <exception caught here> ---
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/lazr/sshserver/auth.py", line 237, in _ebLogToBanner
            reason.trap(UserDisplayedUnauthorizedLogin)
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/python/failure.py", line 460, in trap
            self.raiseException()
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/python/failure.py", line 488, in raiseException
            raise self.value.with_traceback(self.tb)
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/conch/ssh/userauth.py", line 218, in _ebMaybeBadAuth
            reason.trap(error.NotEnoughAuthentication)
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/python/failure.py", line 460, in trap
            self.raiseException()
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/python/failure.py", line 488, in raiseException
            raise self.value.with_traceback(self.tb)
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/lazr/sshserver/auth.py", line 349, in _reportNoSuchUser
            failure.trap(xmlrpc.Fault)
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/python/failure.py", line 460, in trap
            self.raiseException()
          File "/srv/launchpad.net/production/txpkgupload-rev-7c86127c3ed6acd4e05faeed3b787bb9e9ac0180/env/lib/python3.5/site-packages/twisted/python/failure.py", line 488, in raiseException
            raise self.value.with_traceback(self.tb)
        twisted.internet.error.ConnectionDone: Connection was closed cleanly.

There's no obvious reason for this logged, but it's plausible that some kind of glitch caused a single authserver request from txpkgupload to fail. lazr.sshserver should have a short retry loop for this sort of thing rather than failing immediately.

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.