diff --git a/client_plugin/drivers/vfile/dockerops/dockerops.go b/client_plugin/drivers/vfile/dockerops/dockerops.go index ce22f4c86..8b3877dd3 100644 --- a/client_plugin/drivers/vfile/dockerops/dockerops.go +++ b/client_plugin/drivers/vfile/dockerops/dockerops.go @@ -577,7 +577,14 @@ func (d *DockerOps) CheckDockerVersion(requiredVersion string) (bool, error) { log.Errorf("Failed to get docker server version. Error: %v", err) return false, err } - v1, err := version.NewVersion(serverVersion.Version) + // serverVersion.Version read from docker has the format like this + // 17.06.0-ce + // need to extract the numeric part to compare + versionStr := strings.Split(serverVersion.Version, "-") + // dockerServersion only has the numeric part "17.06.0" + dockerServerVersion := versionStr[0] + log.Debugf("dockerServerVersion: %s", dockerServerVersion) + v1, err := version.NewVersion(dockerServerVersion) if err != nil { log.Errorf("Failed to create version comparison for %s. Error: %v", serverVersion.Version, err) return false, err diff --git a/client_plugin/drivers/vfile/vfile_driver.go b/client_plugin/drivers/vfile/vfile_driver.go index 8b66005d6..d3d4c86a0 100644 --- a/client_plugin/drivers/vfile/vfile_driver.go +++ b/client_plugin/drivers/vfile/vfile_driver.go @@ -58,7 +58,7 @@ const ( initError = "vFile volume driver is not fully initialized yet." mountError = "exit status 255" checkTicker = time.Second - requiredVersion = "17.06" + requiredVersion = "17.06.0" ) /* VolumeDriver - vFile plugin volume driver struct