[ 
https://issues.apache.org/jira/browse/MESOS-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14698534#comment-14698534
 ] 

Steve Hoffman edited comment on MESOS-2986 at 8/17/15 1:38 PM:
---------------------------------------------------------------

Yea, the 0.22.1 version of this code while ugly, just checked the major version 
number rather than creating a Version class which assumes there are just 3 
number digits -- which clearly everybody doesn't follow (as in the FC case)
{code}
  foreach (string line, strings::split(output.get(), "\n")) {
    line = strings::trim(line);
    if (strings::startsWith(line, "Client version: ")) {
      line = line.substr(strlen("Client version: "));
      vector<string> version = strings::split(line, ".");
      if (version.size() < 1) {
        return Error("Failed to parse Docker version '" + line + "'");
      }
      Try<int> major = numify<int>(version[0]);
      if (major.isError()) {
        return Error("Failed to parse Docker major version '" +
                     version[0] + "'");
      } else if (major.get() < 1) {
        break;
      }
      return new Docker(path);
    }
  }
{code}
At this point in time do we still need a check here?  Would anybody be using 
pre 1.0 docker with mesos?  You could just dump the check outright...

Also,when this is fixed, can we get a patch to the 0.22.1 RPM?


was (Author: hoffman60613):
Yea, the 0.22.1 version of this code while ugly, just checked the major version 
number rather than creating a Version class which assumes there are just 3 
number digits -- which clearly everybody doesn't follow (as in the FC case)
{code}
  foreach (string line, strings::split(output.get(), "\n")) {
    line = strings::trim(line);
    if (strings::startsWith(line, "Client version: ")) {
      line = line.substr(strlen("Client version: "));
      vector<string> version = strings::split(line, ".");
      if (version.size() < 1) {
        return Error("Failed to parse Docker version '" + line + "'");
      }
      Try<int> major = numify<int>(version[0]);
      if (major.isError()) {
        return Error("Failed to parse Docker major version '" +
                     version[0] + "'");
      } else if (major.get() < 1) {
        break;
      }
      return new Docker(path);
    }
  }
{code}
At this point in time do we still need a check here?  Would anybody be using 
pre 1.0 docker with mesos?  You could just dump the check outright...

> Docker version output is not compatible with Mesos
> --------------------------------------------------
>
>                 Key: MESOS-2986
>                 URL: https://issues.apache.org/jira/browse/MESOS-2986
>             Project: Mesos
>          Issue Type: Bug
>          Components: docker
>            Reporter: Isabel Jimenez
>            Assignee: Isabel Jimenez
>              Labels: mesosphere
>             Fix For: 0.23.0
>
>
> We currently use docker version to get Docker version, in Docker master 
> branch and soon in Docker 1.8 [1] the output for this command changes. The 
> solution for now will be to use the unchanged docker --version output, in the 
> long term we should consider stop using the cli and use the API instead. 
> [1] https://github.com/docker/docker/pull/14047



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to