Closed a-c-dream closed 7 months ago
Seemingly your screenshot shows that your golang code isn't compiled correctly. Any mistake in your implementation?
As I said above, I only modified /kube-scheduler-simulator/simulator/scheduler/config/plugin.go
and simulator/config.yaml
What's in the picture is the modified part.If you don't make these two changes you can build and run normally, but with the above changes the build fails!
The following diagram shows the normal operation without modifying these two parts.
Can you push your change into your fork repo so that I can reproduce your problem
I have forked the repo. The URL is https://github.com/a-c-dream/kube-scheduler-simulator
In simulator/scheduler/config/plugin.go, you forgot to import the nodenumber package. See https://github.com/kubernetes-sigs/kube-scheduler-simulator/pull/342
As you can see, I am a novice in go, I tried to import nodenumber
by following the path below but it doesn't work. Please guide me how to import nodenumber
package, thanks a lot!
@a-c-dream like - https://github.com/a-c-dream/kube-scheduler-simulator/pull/1/files
First of all, thanks to your guide, I imported the package and it successfully built. But unfortunately, now it doesn't work properly. It won't schedule after creating a new pod. It also doesn't respond when I click on the settings button, and I found the following error in the network packet.
Can you update your fork repo with your current implementation (that you was able to build) and give me the steps to reproduce the issue?
and how did you run up your simulator?
sudo make docker_build_and_up
@a-c-dream you have to revert this change in simulator/config.yaml. The container doesn't have this scheduler config file. https://github.com/kubernetes-sigs/kube-scheduler-simulator/compare/master...a-c-dream:kube-scheduler-simulator:master#diff-6c17503c0a94d95e3b3186d67743562aadb4307b8f044673147a0f2d60fabc98
make docker_build_server
make docker_up_local
It makes the simulator work in my laptop.
Thank you very much for your help, it's now up and running!
Here's some of the process, hopefully it'll be a little helpful to anyone who encounters this problem later on.
Revert the simulator/config.yaml
change
Build and run it, then set nodeNumber to be enabled in the web UI.
I still have an issue.
I have built the simulator by "sudo make docker_build_and_up " with configuration above without specifying the KubeSchedulerConfigPath. But I still get 500 error code
no worries, I've figured it out.
I've looked at #311 but it doesn't solve the problem. @yz2001zzx Did you solve your problem? I had the same problem as you. I also modified /kube-scheduler-simulator/simulator/scheduler/config/plugin.go and I also modified simulator/config.yaml like @tmishina said but when I add NodeNumber in Web UI I still I get error code 500. Is it possible that I have to rebuild after modifying it, but when I rebuild I get the error @sanposhiho Can you offer some solutions?