Skip to content

Commit

Permalink
Improving error message incase of version mismatch (vmware-archive#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuklanirdesh82 committed Aug 4, 2017
1 parent 0adb1aa commit 481d4d2
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 @@ -1628,12 +1628,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 481d4d2

Please # to comment.