Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

balloons: crash with AvailableResources.CPU: 0 #807

Open
marquiz opened this issue Apr 21, 2022 · 0 comments
Open

balloons: crash with AvailableResources.CPU: 0 #807

marquiz opened this issue Apr 21, 2022 · 0 comments
Assignees

Comments

@marquiz
Copy link
Contributor

marquiz commented Apr 21, 2022

Describe the bug

cri-resmgr crashes when balloons policy is activated with AvailableResources.CPU: 0.

Expected behavior

Print an error

To Reproduce

$ cat > conf.yaml << EOF
policy:
  Active: balloons
  AvailableResources:
    CPU: 0
EOF

$ sudo ./bin/cri-resmgr --force-config conf.yaml 
I0421 14:30:55.262892 4114117 control.go:243] registering controller rdt...
...
I0421 14:30:56.284591 4114117 balloons-policy.go:135] creating balloons policy...
I0421 14:30:56.284636 4114117 http.go:171] stopping HTTP server...
panic: interface conversion: policy.Constraint is resource.Quantity, not cpuset.CPUSet

goroutine 1 [running]:
github.com/intel/cri-resource-manager/pkg/cri/resource-manager/policy/builtin/balloons.CreateBalloonsPolicy(0x33acbe0)
	/home/marquiz/go/git/cri-resource-manager/pkg/cri/resource-manager/policy/builtin/balloons/balloons-policy.go:139 +0x789
github.com/intel/cri-resource-manager/pkg/cri/resource-manager/policy.NewPolicy({0x21b86f0, 0xc000c16900}, 0xc000e3fd58)
	/home/marquiz/go/git/cri-resource-manager/pkg/cri/resource-manager/policy/policy.go:252 +0x72e
github.com/intel/cri-resource-manager/pkg/cri/resource-manager.(*resmgr).setupPolicy(0xc00015e540)
	/home/marquiz/go/git/cri-resource-manager/pkg/cri/resource-manager/resource-manager.go:453 +0x3e5
github.com/intel/cri-resource-manager/pkg/cri/resource-manager.NewResourceManager()
	/home/marquiz/go/git/cri-resource-manager/pkg/cri/resource-manager/resource-manager.go:113 +0x193
main.main()
	/home/marquiz/go/git/cri-resource-manager/cmd/cri-resmgr/main.go:83 +0x4ee

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants