vSPC: Handle VMOTION-ABORT.
VMOTION-ABORT is sent by the source host. It does not require any specific response or action, but we currently fail to recognize it, which causes the _source_ vSPC connection to be terminated, and that seems undesirable as the source should be fine -- it is the _destination_ which has failed and is expected to disconnect. This change handles it with a debug log message, but the side effect of handling it is that the connection is no longer terminated. Also fix the direction indicator for the debug message for VMOTION-PEER-OK. Change-Id: Id09ed363d6713c023323235a60d4c678c65079f1
This commit is contained in:
parent
206e36008f
commit
6de3cfdc08
@ -129,7 +129,7 @@ class VspcServer(object):
|
||||
socket = writer.get_extra_info('socket')
|
||||
peer = socket.getpeername()
|
||||
LOG.debug("<< %s VMOTION-PEER %s", peer, data)
|
||||
LOG.debug("<< %s VMOTION-PEER-OK %s", peer, data)
|
||||
LOG.debug(">> %s VMOTION-PEER-OK %s", peer, data)
|
||||
writer.write(IAC + SB + VMWARE_EXT + VMOTION_PEER_OK +
|
||||
async_telnet.AsyncTelnet.escape(data) + IAC + SE)
|
||||
yield from writer.drain()
|
||||
@ -138,6 +138,10 @@ class VspcServer(object):
|
||||
peer = socket.getpeername()
|
||||
LOG.debug("<< %s VMOTION-COMPLETE %s", peer, data)
|
||||
|
||||
def handle_vmotion_abort(self, socket, data):
|
||||
peer = socket.getpeername()
|
||||
LOG.debug("<< %s VMOTION-ABORT %s", peer, data)
|
||||
|
||||
@asyncio.coroutine
|
||||
def handle_do(self, writer, opt):
|
||||
socket = writer.get_extra_info('socket')
|
||||
@ -183,6 +187,8 @@ class VspcServer(object):
|
||||
yield from self.handle_vmotion_peer(writer, data[2:])
|
||||
elif vmw_cmd == VMOTION_COMPLETE:
|
||||
self.handle_vmotion_complete(socket, data[2:])
|
||||
elif vmw_cmd == VMOTION_ABORT:
|
||||
self.handle_vmotion_abort(socket, data[2:])
|
||||
else:
|
||||
LOG.error("Unknown VMware cmd: %s %s", vmw_cmd, data[2:])
|
||||
writer.close()
|
||||
|
Loading…
Reference in New Issue
Block a user