Skip to content

Commit

Permalink
Merge pull request #54040 from dixudx/fix_kubelet_runtime_version_par…
Browse files Browse the repository at this point in the history
…sing

Automatic merge from submit-queue (batch tested with PRs 54040, 52503). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

falls back to parse Docker runtime version as generic if not semver

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54039

**Special notes for your reviewer**:
/assign @tallclair @vishh 

**Release note**:

```release-note
falls back to parse Docker runtime version as generic if not semver
```
  • Loading branch information
Kubernetes Submit Queue committed Oct 17, 2017
2 parents 4b0511d + 8f61376 commit 86f7e27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/kubelet/kuberuntime/kuberuntime_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ func (m *kubeGenericRuntimeManager) Type() string {
}

func newRuntimeVersion(version string) (*utilversion.Version, error) {
return utilversion.ParseSemantic(version)
if ver, err := utilversion.ParseSemantic(version); err == nil {
return ver, err
}
return utilversion.ParseGeneric(version)
}

func (m *kubeGenericRuntimeManager) getTypedVersion() (*runtimeapi.VersionResponse, error) {
Expand Down

0 comments on commit 86f7e27

Please sign in to comment.