• Julien Muchembled's avatar
    master: check backup master behaves properly when upstream master is unreachable · f49bf829
    Julien Muchembled authored
    This fixes the following assertion failure:
    
    PACKET #0x021d Ping                           > M1 (10.0.114.64:14001)
    INFO   timeout for #0x0000021d with <ClientConnection(uuid=M1, address=10.0.114.64:14001, closed=0, handler=BackupHandler) at 2955590>
    DEBUG  connection closed for <ClientConnection(uuid=M1, address=10.0.114.64:14001, closed=1, handler=BackupHandler) at 2955590>
    ERROR  upstream master is down: connection lost
    ERROR  Pre-mortem data:
    ERROR  Traceback (most recent call last):
    ERROR    File "neo/master/app.py", line 134, in run
    ERROR      self._run()
    ERROR    File "neo/master/app.py", line 154, in _run
    ERROR      self.playPrimaryRole()
    ERROR    File "neo/master/app.py", line 344, in playPrimaryRole
    ERROR      self.backup_app.provideService()
    ERROR    File "neo/master/backup_app.py", line 129, in provideService
    ERROR      conn.close()
    ERROR    File "neo/lib/connection.py", line 541, in close
    ERROR      assert not self.isPending()
    ERROR  AssertionError
    f49bf829
connection.py 25.4 KB