• Julien Muchembled's avatar
    master: fix crash of backup master when disconnected from upstream while serving clients · 7e8ca9ec
    Julien Muchembled authored
    This fixes:
    
      Traceback (most recent call last):
        File "neo/master/app.py", line 172, in run
          self._run()
        File "neo/master/app.py", line 182, in _run
          self.playPrimaryRole()
        File "neo/master/app.py", line 314, in playPrimaryRole
          self.backup_app.provideService())
        File "neo/master/backup_app.py", line 101, in provideService
          app.changeClusterState(ClusterStates.STARTING_BACKUP)
        File "neo/master/app.py", line 474, in changeClusterState
          ) or not node.isClient(), (state, node)
      AssertionError: (<EnumItem STARTING_BACKUP (4)>, <ClientNode(uuid=C1, state=RUNNING, connection=<ServerConnection(nid=C1, address=127.0.0.1:52430, handler=ClientReadOnlyServiceHandler, fd=59, on_close=onConnectionClosed, server) at 7f38f5628390>) at 7f38f5628ad0>)
    7e8ca9ec
backup_app.py 17.1 KB