kubernetes-sigs / descheduler

Descheduler for Kubernetes
https://sigs.k8s.io/descheduler
Apache License 2.0
4.23k stars 645 forks source link

`failed to convert Descheduler minor version to float` on start #1419

Open der-eismann opened 1 month ago

der-eismann commented 1 month ago

What version of descheduler are you using?

descheduler version: 0.30.0

Does this issue reproduce with the latest release?

yes

Which descheduler CLI options are you using?

--kubeconfig container/config-staging --policy-config-file container/policy.yaml

Please provide a copy of your descheduler policy config file

apiVersion: "descheduler/v1alpha1"
kind: "DeschedulerPolicy"
nodeSelector: node.kubernetes.io/role=worker
evictLocalStoragePods: true
evictSystemCriticalPods: false
ignorePvcPods: false
strategies:
  "RemovePodsViolatingTopologySpreadConstraint":
    enabled: true
    params:
      includeSoftConstraints: true # soft = 'ScheduleAnyway' constraint
      nodeFit: true
      thresholdPriority: 200100 # only evict pods with 'default' pod priority

What k8s version are you using (kubectl version)?

kubectl version Output
$ kubectl version
Client Version: v1.30.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.0-eks-036c24b

What did you do?

Start the descheduler

What did you expect to see?

No warning

What did you see instead?

This on every start:

W0529 16:12:11.137539  715219 descheduler.go:248] failed to convert Descheduler minor version to float

I don't know why the GitVersion is used to parse here - it has a format of v20240519-v0.30.0. According to the docs of utilversion.ParseGeneric:

ParseGeneric parses a "generic" version string. The version string must consist of two or more dot-separated numeric fields (the first of which can't have leading zeroes), followed by arbitrary uninterpreted data (which need not be separated from the final numeric field by punctuation). For convenience, leading and trailing whitespace is ignored, and the version can be preceded by the letter "v". See also ParseSemantic.

The version it's trying to parse however is this (obtained from descheduler version - also see the double v):

v20240519-v0.30.0

My suggestion would be to either replace VERSION?=v$(shell date +%Y%m%d)-$(shell git describe --tags) in the Makefile with VERSION?=$(shell git describe --tags)-$(shell date +%Y%m%d) (but no idea what other implications that would have) or alternatively just parse versionInfo.Minor in the descheduler.go. But the way it is right now is just broken.

a7i commented 3 weeks ago

I may have tagged the release incorrectly. cc: @damemi

damemi commented 3 weeks ago

I don't see a git tag for v20240519-v0.30.0 in github, @a7i can you remember the order of the steps you did? In relation to https://github.com/kubernetes-sigs/descheduler/blob/master/docs/release-guide.md#release-process

That said we might be able to fix it by just tagging a new version. I don't know if we can delete the old k8s registry images but we might be able to

a7i commented 3 weeks ago

Yes, I followed those steps.

Looks like Descheduler version parsing broke in this commit https://github.com/kubernetes-sigs/descheduler/commit/dca2e58b8e705ad60b3c060f541e9d0a43238fe0

I can submit a fix soon

damemi commented 3 weeks ago

@a7i no worries, I wasn't implying that you didn't follow those steps. I just meant that we could trace back through that flowchart to try to figure out what could have happened :) looks like you've tracked it down though

der-eismann commented 3 weeks ago

Mega, thanks for the quick fix!