Loading cloudcontrol/node/host/__init__.py +3 −3 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ class RemoteShell(object): self.master, self.slave = pty.openpty() self.endpoint = FakePtySocket(self.master) self.proto = conn.create_tunnel(endpoint=self.endpoint, on_close=self.on_tunnel_close) on_shutdown=self.on_tunnel_shutdown) self.conn = conn try: self.process = subprocess.Popen( Loading @@ -114,7 +114,7 @@ class RemoteShell(object): ioctl(self.master, termios.TIOCSWINSZ, struct.pack('HHHH', row, col, xpixel, ypixel)) def on_tunnel_close(self, *args): def on_tunnel_shutdown(self, *args): # *args is for callback arguments (ignored) self.proto, proto = None, self.proto # prevents multiple calls to # close method Loading @@ -139,7 +139,7 @@ class RemoteShell(object): self.slave = None if self.proto is not None: try: self.proto.close() self.proto.shutdown() except Exception: logger.error('Error while trying to close RPC tunnel') self.proto = None Loading cloudcontrol/node/hypervisor/__init__.py +3 −3 Original line number Diff line number Diff line Loading @@ -503,13 +503,13 @@ class Handler(HostHandler): logger.error('Cannot create connection to VM console') raise def on_close(tun): def on_shutdown(tun): """Method of Tunnel protocol close callback.""" tun.endpoint.close() tun.cb_default_on_shutdown() vm.close_console() # connect as tunnel endpoint proto = conn.create_tunnel(endpoint=endpoint, on_close=on_close) proto = conn.create_tunnel(endpoint=endpoint, on_shutdown=on_shutdown) return proto.label def vm_disable_virtio_cache(self, name): Loading Loading
cloudcontrol/node/host/__init__.py +3 −3 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ class RemoteShell(object): self.master, self.slave = pty.openpty() self.endpoint = FakePtySocket(self.master) self.proto = conn.create_tunnel(endpoint=self.endpoint, on_close=self.on_tunnel_close) on_shutdown=self.on_tunnel_shutdown) self.conn = conn try: self.process = subprocess.Popen( Loading @@ -114,7 +114,7 @@ class RemoteShell(object): ioctl(self.master, termios.TIOCSWINSZ, struct.pack('HHHH', row, col, xpixel, ypixel)) def on_tunnel_close(self, *args): def on_tunnel_shutdown(self, *args): # *args is for callback arguments (ignored) self.proto, proto = None, self.proto # prevents multiple calls to # close method Loading @@ -139,7 +139,7 @@ class RemoteShell(object): self.slave = None if self.proto is not None: try: self.proto.close() self.proto.shutdown() except Exception: logger.error('Error while trying to close RPC tunnel') self.proto = None Loading
cloudcontrol/node/hypervisor/__init__.py +3 −3 Original line number Diff line number Diff line Loading @@ -503,13 +503,13 @@ class Handler(HostHandler): logger.error('Cannot create connection to VM console') raise def on_close(tun): def on_shutdown(tun): """Method of Tunnel protocol close callback.""" tun.endpoint.close() tun.cb_default_on_shutdown() vm.close_console() # connect as tunnel endpoint proto = conn.create_tunnel(endpoint=endpoint, on_close=on_close) proto = conn.create_tunnel(endpoint=endpoint, on_shutdown=on_shutdown) return proto.label def vm_disable_virtio_cache(self, name): Loading