Description
Which jobs are flaking:
cmd/scheduler/app
Which test(s) are flaking:
TestServeHealthzAndMetrics
Reason for failure:
E0611 19:08:35.345640 77644 scheduler.go:284] Failed to serve healthz on 127.0.0.1:8082: listen tcp 127.0.0.1:8082: bind: address already in use
E0611 19:08:35.345723 77644 scheduler.go:284] Failed to serve metrics on 127.0.0.1:8083: listen tcp 127.0.0.1:8083: bind: address already in use
Anything else we need to know:
As the unit tests of both the cmd/scheduler
and cmd/descheduler
are using port 8082 and 8083, they seem to be affecting each other in some scenarios.
Scheduler:
karmada/cmd/scheduler/app/scheduler_test.go
Lines 69 to 70 in bd5692f
Descheduler:
karmada/cmd/descheduler/app/descheduler_test.go
Lines 69 to 70 in bd5692f
In fact, after I changed either of them to be 8084
and 8085
, unit tests are passing in my environment. I don't have a certain way to reproduce this issue as the unit tests are currently passing on my laptop but failing on my desktop unless I change the ports used in those unit tests.
In order to make unit tests more robust, I suggest using different ports in scheduler and descheduler unit tests. I'm happy to make this simple change if it looks good to you.
Thank you!