Merge pull request #54040 from dixudx/fix_kubelet_runtime_version_parsing

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
```
pull/6/head
Kubernetes Submit Queue 2017-10-17 13:18:12 -07:00 committed by GitHub
commit 86f7e2706a
1 changed files with 4 additions and 1 deletions

View File

@ -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) {