Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Commit

Permalink
Improving error message incase of version mismatch (#1103) (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuklanirdesh82 authored Aug 4, 2017
1 parent d7f4f77 commit e99700d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions esx_service/vmdk_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1642,12 +1642,11 @@ 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 (Docker plugin) protocol version
({}) and server (ESXi) protocol version ({}) which indicates different
versions of the product are installed on Guest and ESXi sides,
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 e99700d

Please # to comment.