jinmeiliao commented on a change in pull request #5462: URL: https://github.com/apache/geode/pull/5462#discussion_r473447837
########## File path: geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/ConnectCommand.java ########## @@ -168,26 +168,27 @@ public ResultModel connect( return result; } - // since 1.14, only allow gfsh to connect to cluster that's older than 1.10 String remoteVersion = null; - String gfshVersion = gfsh.getVersion(); + String remoteGeodeSerializationVersion = null; try { remoteVersion = invoker.getRemoteVersion(); - int minorVersion = Integer.parseInt(versionComponent(remoteVersion, VERSION_MINOR)); - if (versionComponent(remoteVersion, VERSION_MAJOR).equals("1") && minorVersion >= 10 || - versionComponent(remoteVersion, VERSION_MAJOR).equals("9") && minorVersion >= 9) { - InfoResultModel versionInfo = result.addInfo("versionInfo"); - versionInfo.addLine("You are connected to a cluster of version: " + remoteVersion); - return result; - } + remoteGeodeSerializationVersion = getRemoteSerializationVersion(invoker); Review comment: This is fine, but if you just call the invoker method directly, and user gfsh.logToFile in the catch block, things should be fine too. The difference is that user won't see this "failed to get the remote version" message when they connect to pre-1.5 cluster, but they would still see "you can't use a xxx version gfsh to connect to this cluster" ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org