Skip to content

Commit

Permalink
Improving error message incase of version mismatch between client and…
Browse files Browse the repository at this point in the history
  • Loading branch information
shuklanirdesh82 committed Aug 4, 2017
1 parent 0adb1aa commit cd4b6cc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions esx_service/vmdk_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1628,12 +1628,8 @@ def execRequestThread(client_socket, cartel, request):
client_protocol_version = int(req["version"]) if "version" in req else SERVER_PROTOCOL_VERSION
logging.debug("execRequestThread: client protocol version=%d", client_protocol_version)
if client_protocol_version != SERVER_PROTOCOL_VERSION:
if client_protocol_version < SERVER_PROTOCOL_VERSION:
reply_string = err("vSphere Docker Volume Service client version ({}) is older than server version ({}), "
"please update the client.".format(client_protocol_version, SERVER_PROTOCOL_VERSION))
else:
reply_string = err("vSphere Docker Volume Service client version ({}) is newer than server version ({}), "
"please update the server.".format(client_protocol_version, SERVER_PROTOCOL_VERSION))
reply_string = err("There is a mismatch between vDVS client version ({}) and server version ({}), "
"please make sure vDVS plugin and driver are from the same release version.".format(client_protocol_version, SERVER_PROTOCOL_VERSION))
send_vmci_reply(client_socket, reply_string)
logging.warning("executeRequest '%s' failed: %s", req["cmd"], reply_string)
return
Expand Down

0 comments on commit cd4b6cc

Please # to comment.