acorn-io / runtime

A simple application deployment framework built on Kubernetes
https://docs.acorn.io/
Apache License 2.0
1.13k stars 100 forks source link

Panic when trying to create computeclass using kind:ClusterComputeClass and apiVersion: admin.acorn.io/v1 #2401

Closed sangee2004 closed 9 months ago

sangee2004 commented 9 months ago

acorn version - v0.10.0-rc2+e32a2709

Steps to reproduce the problem:

  1. Try to create a clustercomputeclass using the following yaml
kind: ClusterComputeClass
apiVersion: admin.acorn.io/v1
default: true
metadata:
  name: cc2
description: Large compute for linux on arm64
cpuScaler: 0.75
supportedRegions:
 - local
memory:
  default: 20M
  values:
  - 10M
  - 20M
  - 30M
  1. clustercomputeclass creation fails
    kubectl apply -f ccc.yaml
    Error from server (ServiceUnavailable): error when creating "ccc.yaml": the server is currently unable to handle the request (post clustercomputeclasses.admin.acorn.io)

Following error seen in api-server logs:

time="2024-01-10T00:18:11Z" level=error msg="Observed a panic: runtime error: invalid memory address or nil pointer dereference\ngoroutine 3781 [running]:\nk8s.io/apiserver/pkg/endpoints/handlers/finisher.finishRequest.func1.1()\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:105 +0x98\npanic({0x2f6a2c0?, 0x5ca3120?})\n\truntime/panic.go:914 +0x218\ngithub.com/acorn-io/runtime/pkg/server/registry/apigroups/admin/computeclass.(*ClusterValidator).Validate(0x4000a3ed40?, {0x3d1fd18?, 0x4001f254d0?}, {0x3cfe458?, 0x4000e66f00})\n\tgithub.com/acorn-io/runtime/pkg/server/registry/apigroups/admin/computeclass/validator.go:96 +0x380\ngithub.com/acorn-io/mink/pkg/strategy.(*CreateAdapter).Validate(0x4000255880, {0x3d1fd18, 0x4001f254d0}, {0x3cfe458, 0x4000e66f00})\n\tgithub.com/acorn-io/mink@v0.0.0-20230804175412-8d121aae112c/pkg/strategy/create.go:140 +0x2e8\nk8s.io/apiserver/pkg/registry/rest.BeforeCreate({0x3d33bf8?, 0x4000255880}, {0x3d1fd18, 0x4001f254d0}, {0x3cfe458, 0x4000e66f00})\n\tk8s.io/apiserver@v0.27.3/pkg/registry/rest/create.go:122 +0x184\ngithub.com/acorn-io/mink/pkg/strategy.(*CreateAdapter).Create(0x4000255880, {0x3d1fd18, 0x4001f254d0}, {0x3cfe458?, 0x4000e66f00}, 0x37a1328, 0x400248aea0)\n\tgithub.com/acorn-io/mink@v0.0.0-20230804175412-8d121aae112c/pkg/strategy/create.go:91 +0x178\nk8s.io/apiserver/pkg/endpoints/handlers.(*namedCreaterAdapter).Create(0x0?, {0x3d1fd18?, 0x4001f254d0?}, {0x4001f55200?, 0x3d25980?}, {0x3cfe458?, 0x4000e66f00?}, 0x3cfe458?, 0x4000e66f00?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/create.go:254 +0x48\nk8s.io/apiserver/pkg/endpoints/handlers.CreateResource.createHandler.func1.1()\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/create.go:183 +0xbc\nk8s.io/apiserver/pkg/endpoints/handlers.CreateResource.createHandler.func1.2()\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/create.go:209 +0x2dc\nk8s.io/apiserver/pkg/endpoints/handlers/finisher.finishRequest.func1()\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:117 +0x7c\ncreated by k8s.io/apiserver/pkg/endpoints/handlers/finisher.finishRequest in goroutine 3780\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:92 +0xa4\n\ngoroutine 3780 [running]:\nk8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP.func1.1()\n\tk8s.io/apiserver@v0.27.3/pkg/server/filters/timeout.go:110 +0x9c\npanic({0x2d8d4a0?, 0x4000f2f3d0?})\n\truntime/panic.go:914 +0x218\nk8s.io/apiserver/pkg/endpoints/handlers/finisher.(*result).Return(0x400315bc40?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:53 +0xf4\nk8s.io/apiserver/pkg/endpoints/handlers/finisher.finishRequest({0x3d1fd18, 0x4001f254d0}, 0x400248b080, 0x45d964b800, 0x37a25e8)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:126 +0x1c0\nk8s.io/apiserver/pkg/endpoints/handlers/finisher.FinishRequest({0x3d1fd18?, 0x4001f254d0?}, 0x3d1fd18?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:84 +0x38\nk8s.io/apiserver/pkg/endpoints/handlers.CreateResource.createHandler.func1({0x3d10aa0, 0x40009c25e0}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/create.go:193 +0x10d8\nk8s.io/apiserver/pkg/endpoints.(*APIInstaller).registerResourceHandlers.restfulCreateResource.func16(0x40009c25c0, 0x4000290000)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/installer.go:1276 +0x64\nk8s.io/apiserver/pkg/endpoints.(*APIInstaller).registerResourceHandlers.InstrumentRouteFunc.func17(0x40009c25c0, 0x4000290000)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/metrics/metrics.go:571 +0x160\ngithub.com/emicklei/go-restful/v3.(*Container).dispatch(0x4000abc480, {0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tgithub.com/emicklei/go-restful/v3@v3.10.2/container.go:299 +0x470\ngithub.com/emicklei/go-restful/v3.(*Container).Dispatch(...)\n\tgithub.com/emicklei/go-restful/v3@v3.10.2/container.go:204\nk8s.io/apiserver/pkg/server.director.ServeHTTP({{0x352ef4e?, 0x127ccd4?}, 0x4000abc480?, 0x4000934850?}, {0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/server/handler.go:146 +0x4a8\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.TrackCompleted.trackCompleted.func21({0x3d10aa0?, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:110 +0x134\nnet/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d10aa0?, 0x40009c2360?}, 0x4?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/endpoints/filters.WithAuthorization.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/authorization.go:64 +0x380\nnet/http.HandlerFunc.ServeHTTP(0xd5ac710db0?, {0x3d10aa0?, 0x40009c2360?}, 0xa952c0?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:84 +0x154\nnet/http.HandlerFunc.ServeHTTP(0x5cc3f00?, {0x3d10aa0?, 0x40009c2360?}, 0x6?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server/filters.WithMaxInFlightLimit.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/server/filters/maxinflight.go:197 +0x228\nnet/http.HandlerFunc.ServeHTTP(0x5d57280?, {0x3d10aa0?, 0x40009c2360?}, 0x181d4b4?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.TrackCompleted.trackCompleted.func23({0x3d10aa0?, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:110 +0x134\nnet/http.HandlerFunc.ServeHTTP(0x400315d208?, {0x3d10aa0?, 0x40009c2360?}, 0x400315d228?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithImpersonation.func4({0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/impersonation.go:50 +0x154\nnet/http.HandlerFunc.ServeHTTP(0x400315d838?, {0x3d10aa0?, 0x40009c2360?}, 0x4001cb0c80?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:84 +0x154\nnet/http.HandlerFunc.ServeHTTP(0x5d57280?, {0x3d10aa0?, 0x40009c2360?}, 0x181be14?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.TrackCompleted.trackCompleted.func24({0x3d10aa0?, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:110 +0x134\nnet/http.HandlerFunc.ServeHTTP(0x400315da68?, {0x3d10aa0?, 0x40009c2360?}, 0x4001cb0b80?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:84 +0x154\nnet/http.HandlerFunc.ServeHTTP(0x5d57280?, {0x3d10aa0?, 0x40009c2360?}, 0x181b014?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.TrackCompleted.trackCompleted.func26({0x3d10aa0?, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:110 +0x134\nnet/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d10aa0?, 0x40009c2360?}, 0x3ccc768?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/endpoints/filters.withAuthentication.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/authentication.go:105 +0x514\nnet/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d10aa0?, 0x40009c2360?}, 0x3cd6750?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1({0x3d10aa0, 0x40009c2360}, 0x4003414000)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:94 +0x2f4\nnet/http.HandlerFunc.ServeHTTP(0x0?, {0x3d10aa0?, 0x40009c2360?}, 0x3cfc310?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP.func1()\n\tk8s.io/apiserver@v0.27.3/pkg/server/filters/timeout.go:115 +0x68\ncreated by k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP in goroutine 3779\n\tk8s.io/apiserver@v0.27.3/pkg/server/filters/timeout.go:101 +0x180\n\ngoroutine 3779 [running]:\nk8s.io/apimachinery/pkg/util/runtime.logPanic({0x2d8d4a0?, 0x4000f2f440})\n\tk8s.io/apimachinery@v0.27.3/pkg/util/runtime/runtime.go:75 +0x7c\nk8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x4003142bf0, 0x1, 0x0?})\n\tk8s.io/apimachinery@v0.27.3/pkg/util/runtime/runtime.go:49 +0x78\npanic({0x2d8d4a0?, 0x4000f2f440?})\n\truntime/panic.go:914 +0x218\nk8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP(0x4000cbdcf8, {0x3d1b870, 0x400281dbc0}, 0xdf8475800?)\n\tk8s.io/apiserver@v0.27.3/pkg/server/filters/timeout.go:121 +0x2c8\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestDeadline.withRequestDeadline.func27({0x3d1b870, 0x400281dbc0}, 0x40035b5c00)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/request_deadline.go:100 +0x1a0\nnet/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d1b870?, 0x400281dbc0?}, 0x34864a0?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithWaitGroup.withWaitGroup.func28({0x3d1b870, 0x400281dbc0}, 0x2f04e20?)\n\tk8s.io/apiserver@v0.27.3/pkg/server/filters/waitgroup.go:86 +0x148\nnet/http.HandlerFunc.ServeHTTP(0x40035b5b00?, {0x3d1b870?, 0x400281dbc0?}, 0x40003e37c0?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithWarningRecorder.func13({0x3d1b870?, 0x400281dbc0}, 0x3575097?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/warning.go:35 +0xbc\nnet/http.HandlerFunc.ServeHTTP(0x3370a20?, {0x3d1b870?, 0x400281dbc0?}, 0x358f63b?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithCacheControl.func14({0x3d1b870, 0x400281dbc0}, 0x4003143188?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/cachecontrol.go:31 +0xa8\nnet/http.HandlerFunc.ServeHTTP(0x4003143168?, {0x3d1b870?, 0x400281dbc0?}, 0x1180?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithHTTPLogging.WithLogging.withLogging.func34({0x3d1b870, 0x400281dbc0}, 0x4003143208?)\n\tk8s.io/apiserver@v0.27.3/pkg/server/httplog/httplog.go:111 +0x78\nnet/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d1b870?, 0x400281dbc0?}, 0x3cd6750?)\n\tnet/http/server.go:2136 +0x38\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP(0x400085bc30, {0x3d10aa0?, 0x40009c2240}, 0x40035b5a00, {0x3ce42c0, 0x40009656b0})\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.42.1-0.20230601092337-0332bf5c0078/handler.go:217 +0xf44\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1({0x3d10aa0?, 0x40009c2240?}, 0xffff6471c070?)\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.42.1-0.20230601092337-0332bf5c0078/handler.go:81 +0x40\nnet/http.HandlerFunc.ServeHTTP(0x3d203b8?, {0x3d10aa0?, 0x40009c2240?}, 0xffffab6fb108?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithLatencyTrackers.func16({0x3d105f0?, 0x400364e898}, 0x2d01da0?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/webhook_duration.go:57 +0x134\nnet/http.HandlerFunc.ServeHTTP(0x40035b5800?, {0x3d105f0?, 0x400364e898?}, 0xffffab6fb108?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestInfo.func17({0x3d105f0, 0x400364e898}, 0xd5ac672828?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/requestinfo.go:39 +0x104\nnet/http.HandlerFunc.ServeHTTP(0x40035b5700?, {0x3d105f0?, 0x400364e898?}, 0xd5ac672828?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestReceivedTimestamp.withRequestReceivedTimestampWithClock.func31({0x3d105f0, 0x400364e898}, 0x4001bfe980?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/request_received_time.go:38 +0xac\nnet/http.HandlerFunc.ServeHTTP(0x4001b0e9a0?, {0x3d105f0?, 0x400364e898?}, 0x31c9100?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithMuxAndDiscoveryComplete.func18({0x3d105f0?, 0x400364e898?}, 0x40035b5700?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/mux_discovery_complete.go:52 +0xd0\nnet/http.HandlerFunc.ServeHTTP(0x1?, {0x3d105f0?, 0x400364e898?}, 0xf313345be009173?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithPanicRecovery.withPanicRecovery.func32({0x3d105f0?, 0x400364e898?}, 0x4001bfe988?)\n\tk8s.io/apiserver@v0.27.3/pkg/server/filters/wrap.go:74 +0x9c\nnet/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d105f0?, 0x400364e898?}, 0x40011f9200?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithAuditInit.withAuditInit.func33({0x3d105f0, 0x400364e898}, 0x551?)\n\tk8s.io/apiserver@v0.27.3/pkg/endpoints/filters/audit_init.go:63 +0x110\nnet/http.HandlerFunc.ServeHTTP(0x0?, {0x3d105f0?, 0x400364e898?}, 0x1f1a8?)\n\tnet/http/server.go:2136 +0x38\nk8s.io/apiserver/pkg/server.(*APIServerHandler).ServeHTTP(0xc15f966fe1b88bd3?, {0x3d105f0?, 0x400364e898?}, 0x27360?)\n\tk8s.io/apiserver@v0.27.3/pkg/server/handler.go:189 +0x30\nnet/http.serverHandler.ServeHTTP({0x4003143dc8?}, {0x3d105f0?, 0x400364e898?}, 0xffffab6fb5b8?)\n\tnet/http/server.go:2938 +0xbc\nnet/http.initALPNRequest.ServeHTTP({{0x3d1fd18?, 0x4001e15c20?}, 0x400188d500?, {0x4001cfda40?}}, {0x3d105f0, 0x400364e898}, 0x40035b5600)\n\tnet/http/server.go:3546 +0x1b4\ngolang.org/x/net/http2.(*serverConn).runHandler(0x100000005d57280?, 0x15af9e0?, 0x4002c21d40?, 0x4003143fb0?)\n\tgolang.org/x/net@v0.17.0/http2/server.go:2368 +0xc0\ncreated by golang.org/x/net/http2.(*serverConn).scheduleHandler in goroutine 363\n\tgolang.org/x/net@v0.17.0/http2/server.go:2303 +0x208\n" error="<nil>"
time="2024-01-10T00:18:11Z" level=error msg="apiserver panic'd" URI="/apis/admin.acorn.io/v1/clustercomputeclasses?fieldManager=kubectl-client-side-apply&fieldValidation=Strict" auditID=384cc84a-ae94-4a2d-8320-7f29819d8bdd error="<nil>" method=POST
http2: panic serving 10.42.0.1:58326: runtime error: invalid memory address or nil pointer dereference
goroutine 3781 [running]:
k8s.io/apiserver/pkg/endpoints/handlers/finisher.finishRequest.func1.1()
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:105 +0x98
panic({0x2f6a2c0?, 0x5ca3120?})
    runtime/panic.go:914 +0x218
github.com/acorn-io/runtime/pkg/server/registry/apigroups/admin/computeclass.(*ClusterValidator).Validate(0x4000a3ed40?, {0x3d1fd18?, 0x4001f254d0?}, {0x3cfe458?, 0x4000e66f00})
    github.com/acorn-io/runtime/pkg/server/registry/apigroups/admin/computeclass/validator.go:96 +0x380
github.com/acorn-io/mink/pkg/strategy.(*CreateAdapter).Validate(0x4000255880, {0x3d1fd18, 0x4001f254d0}, {0x3cfe458, 0x4000e66f00})
    github.com/acorn-io/mink@v0.0.0-20230804175412-8d121aae112c/pkg/strategy/create.go:140 +0x2e8
k8s.io/apiserver/pkg/registry/rest.BeforeCreate({0x3d33bf8?, 0x4000255880}, {0x3d1fd18, 0x4001f254d0}, {0x3cfe458, 0x4000e66f00})
    k8s.io/apiserver@v0.27.3/pkg/registry/rest/create.go:122 +0x184
github.com/acorn-io/mink/pkg/strategy.(*CreateAdapter).Create(0x4000255880, {0x3d1fd18, 0x4001f254d0}, {0x3cfe458?, 0x4000e66f00}, 0x37a1328, 0x400248aea0)
    github.com/acorn-io/mink@v0.0.0-20230804175412-8d121aae112c/pkg/strategy/create.go:91 +0x178
k8s.io/apiserver/pkg/endpoints/handlers.(*namedCreaterAdapter).Create(0x0?, {0x3d1fd18?, 0x4001f254d0?}, {0x4001f55200?, 0x3d25980?}, {0x3cfe458?, 0x4000e66f00?}, 0x3cfe458?, 0x4000e66f00?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/create.go:254 +0x48
k8s.io/apiserver/pkg/endpoints/handlers.CreateResource.createHandler.func1.1()
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/create.go:183 +0xbc
k8s.io/apiserver/pkg/endpoints/handlers.CreateResource.createHandler.func1.2()
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/create.go:209 +0x2dc
k8s.io/apiserver/pkg/endpoints/handlers/finisher.finishRequest.func1()
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:117 +0x7c
created by k8s.io/apiserver/pkg/endpoints/handlers/finisher.finishRequest in goroutine 3780
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:92 +0xa4

goroutine 3780 [running]:
k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP.func1.1()
    k8s.io/apiserver@v0.27.3/pkg/server/filters/timeout.go:110 +0x9c
panic({0x2d8d4a0?, 0x4000f2f3d0?})
    runtime/panic.go:914 +0x218
k8s.io/apiserver/pkg/endpoints/handlers/finisher.(*result).Return(0x400315bc40?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:53 +0xf4
k8s.io/apiserver/pkg/endpoints/handlers/finisher.finishRequest({0x3d1fd18, 0x4001f254d0}, 0x400248b080, 0x45d964b800, 0x37a25e8)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:126 +0x1c0
k8s.io/apiserver/pkg/endpoints/handlers/finisher.FinishRequest({0x3d1fd18?, 0x4001f254d0?}, 0x3d1fd18?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/finisher/finisher.go:84 +0x38
k8s.io/apiserver/pkg/endpoints/handlers.CreateResource.createHandler.func1({0x3d10aa0, 0x40009c25e0}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/handlers/create.go:193 +0x10d8
k8s.io/apiserver/pkg/endpoints.(*APIInstaller).registerResourceHandlers.restfulCreateResource.func16(0x40009c25c0, 0x4000290000)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/installer.go:1276 +0x64
k8s.io/apiserver/pkg/endpoints.(*APIInstaller).registerResourceHandlers.InstrumentRouteFunc.func17(0x40009c25c0, 0x4000290000)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/metrics/metrics.go:571 +0x160
github.com/emicklei/go-restful/v3.(*Container).dispatch(0x4000abc480, {0x3d10aa0, 0x40009c2360}, 0x4003414300)
    github.com/emicklei/go-restful/v3@v3.10.2/container.go:299 +0x470
github.com/emicklei/go-restful/v3.(*Container).Dispatch(...)
    github.com/emicklei/go-restful/v3@v3.10.2/container.go:204
k8s.io/apiserver/pkg/server.director.ServeHTTP({{0x352ef4e?, 0x127ccd4?}, 0x4000abc480?, 0x4000934850?}, {0x3d10aa0, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/server/handler.go:146 +0x4a8
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.TrackCompleted.trackCompleted.func21({0x3d10aa0?, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:110 +0x134
net/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d10aa0?, 0x40009c2360?}, 0x4?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/endpoints/filters.WithAuthorization.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/authorization.go:64 +0x380
net/http.HandlerFunc.ServeHTTP(0xd5ac710db0?, {0x3d10aa0?, 0x40009c2360?}, 0xa952c0?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:84 +0x154
net/http.HandlerFunc.ServeHTTP(0x5cc3f00?, {0x3d10aa0?, 0x40009c2360?}, 0x6?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server/filters.WithMaxInFlightLimit.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/server/filters/maxinflight.go:197 +0x228
net/http.HandlerFunc.ServeHTTP(0x5d57280?, {0x3d10aa0?, 0x40009c2360?}, 0x181d4b4?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.TrackCompleted.trackCompleted.func23({0x3d10aa0?, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:110 +0x134
net/http.HandlerFunc.ServeHTTP(0x400315d208?, {0x3d10aa0?, 0x40009c2360?}, 0x400315d228?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithImpersonation.func4({0x3d10aa0, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/impersonation.go:50 +0x154
net/http.HandlerFunc.ServeHTTP(0x400315d838?, {0x3d10aa0?, 0x40009c2360?}, 0x4001cb0c80?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:84 +0x154
net/http.HandlerFunc.ServeHTTP(0x5d57280?, {0x3d10aa0?, 0x40009c2360?}, 0x181be14?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.TrackCompleted.trackCompleted.func24({0x3d10aa0?, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:110 +0x134
net/http.HandlerFunc.ServeHTTP(0x400315da68?, {0x3d10aa0?, 0x40009c2360?}, 0x4001cb0b80?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:84 +0x154
net/http.HandlerFunc.ServeHTTP(0x5d57280?, {0x3d10aa0?, 0x40009c2360?}, 0x181b014?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.TrackCompleted.trackCompleted.func26({0x3d10aa0?, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:110 +0x134
net/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d10aa0?, 0x40009c2360?}, 0x3ccc768?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/endpoints/filters.withAuthentication.func1({0x3d10aa0, 0x40009c2360}, 0x4003414300)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/authentication.go:105 +0x514
net/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d10aa0?, 0x40009c2360?}, 0x3cd6750?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1({0x3d10aa0, 0x40009c2360}, 0x4003414000)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filterlatency/filterlatency.go:94 +0x2f4
net/http.HandlerFunc.ServeHTTP(0x0?, {0x3d10aa0?, 0x40009c2360?}, 0x3cfc310?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP.func1()
    k8s.io/apiserver@v0.27.3/pkg/server/filters/timeout.go:115 +0x68
created by k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP in goroutine 3779
    k8s.io/apiserver@v0.27.3/pkg/server/filters/timeout.go:101 +0x180

goroutine 3779 [running]:
golang.org/x/net/http2.(*serverConn).runHandler.func1()
    golang.org/x/net@v0.17.0/http2/server.go:2361 +0x13c
panic({0x2d8d4a0?, 0x4000f2f440?})
    runtime/panic.go:914 +0x218
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x400315cbf0, 0x1, 0x0?})
    k8s.io/apimachinery@v0.27.3/pkg/util/runtime/runtime.go:56 +0xe0
panic({0x2d8d4a0?, 0x4000f2f440?})
    runtime/panic.go:914 +0x218
k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP(0x4000cbdcf8, {0x3d1b870, 0x400281dbc0}, 0xdf8475800?)
    k8s.io/apiserver@v0.27.3/pkg/server/filters/timeout.go:121 +0x2c8
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestDeadline.withRequestDeadline.func27({0x3d1b870, 0x400281dbc0}, 0x40035b5c00)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/request_deadline.go:100 +0x1a0
net/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d1b870?, 0x400281dbc0?}, 0x34864a0?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithWaitGroup.withWaitGroup.func28({0x3d1b870, 0x400281dbc0}, 0x2f04e20?)
    k8s.io/apiserver@v0.27.3/pkg/server/filters/waitgroup.go:86 +0x148
net/http.HandlerFunc.ServeHTTP(0x40035b5b00?, {0x3d1b870?, 0x400281dbc0?}, 0x40003e37c0?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithWarningRecorder.func13({0x3d1b870?, 0x400281dbc0}, 0x3575097?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/warning.go:35 +0xbc
net/http.HandlerFunc.ServeHTTP(0x3370a20?, {0x3d1b870?, 0x400281dbc0?}, 0x358f63b?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithCacheControl.func14({0x3d1b870, 0x400281dbc0}, 0x4003143188?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/cachecontrol.go:31 +0xa8
net/http.HandlerFunc.ServeHTTP(0x4003143168?, {0x3d1b870?, 0x400281dbc0?}, 0x1180?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithHTTPLogging.WithLogging.withLogging.func34({0x3d1b870, 0x400281dbc0}, 0x4003143208?)
    k8s.io/apiserver@v0.27.3/pkg/server/httplog/httplog.go:111 +0x78
net/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d1b870?, 0x400281dbc0?}, 0x3cd6750?)
    net/http/server.go:2136 +0x38
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP(0x400085bc30, {0x3d10aa0?, 0x40009c2240}, 0x40035b5a00, {0x3ce42c0, 0x40009656b0})
    go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.42.1-0.20230601092337-0332bf5c0078/handler.go:217 +0xf44
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1({0x3d10aa0?, 0x40009c2240?}, 0xffff6471c070?)
    go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.42.1-0.20230601092337-0332bf5c0078/handler.go:81 +0x40
net/http.HandlerFunc.ServeHTTP(0x3d203b8?, {0x3d10aa0?, 0x40009c2240?}, 0xffffab6fb108?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithLatencyTrackers.func16({0x3d105f0?, 0x400364e898}, 0x2d01da0?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/webhook_duration.go:57 +0x134
net/http.HandlerFunc.ServeHTTP(0x40035b5800?, {0x3d105f0?, 0x400364e898?}, 0xffffab6fb108?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestInfo.func17({0x3d105f0, 0x400364e898}, 0xd5ac672828?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/requestinfo.go:39 +0x104
net/http.HandlerFunc.ServeHTTP(0x40035b5700?, {0x3d105f0?, 0x400364e898?}, 0xd5ac672828?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestReceivedTimestamp.withRequestReceivedTimestampWithClock.func31({0x3d105f0, 0x400364e898}, 0x4001bfe980?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/request_received_time.go:38 +0xac
net/http.HandlerFunc.ServeHTTP(0x4001b0e9a0?, {0x3d105f0?, 0x400364e898?}, 0x31c9100?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithMuxAndDiscoveryComplete.func18({0x3d105f0?, 0x400364e898?}, 0x40035b5700?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/mux_discovery_complete.go:52 +0xd0
net/http.HandlerFunc.ServeHTTP(0x1?, {0x3d105f0?, 0x400364e898?}, 0xf313345be009173?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithPanicRecovery.withPanicRecovery.func32({0x3d105f0?, 0x400364e898?}, 0x4001bfe988?)
    k8s.io/apiserver@v0.27.3/pkg/server/filters/wrap.go:74 +0x9c
net/http.HandlerFunc.ServeHTTP(0x3d1fd18?, {0x3d105f0?, 0x400364e898?}, 0x40011f9200?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithAuditInit.withAuditInit.func33({0x3d105f0, 0x400364e898}, 0x551?)
    k8s.io/apiserver@v0.27.3/pkg/endpoints/filters/audit_init.go:63 +0x110
net/http.HandlerFunc.ServeHTTP(0x0?, {0x3d105f0?, 0x400364e898?}, 0x1f1a8?)
    net/http/server.go:2136 +0x38
k8s.io/apiserver/pkg/server.(*APIServerHandler).ServeHTTP(0xc15f966fe1b88bd3?, {0x3d105f0?, 0x400364e898?}, 0x27360?)
    k8s.io/apiserver@v0.27.3/pkg/server/handler.go:189 +0x30
net/http.serverHandler.ServeHTTP({0x4003143dc8?}, {0x3d105f0?, 0x400364e898?}, 0xffffab6fb5b8?)
    net/http/server.go:2938 +0xbc
net/http.initALPNRequest.ServeHTTP({{0x3d1fd18?, 0x4001e15c20?}, 0x400188d500?, {0x4001cfda40?}}, {0x3d105f0, 0x400364e898}, 0x40035b5600)
    net/http/server.go:3546 +0x1b4
golang.org/x/net/http2.(*serverConn).runHandler(0x100000005d57280?, 0x15af9e0?, 0x4002c21d40?, 0x4003143fb0?)
    golang.org/x/net@v0.17.0/http2/server.go:2368 +0xc0
created by golang.org/x/net/http2.(*serverConn).scheduleHandler in goroutine 363
    golang.org/x/net@v0.17.0/http2/server.go:2303 +0x208
sangee2004 commented 9 months ago

Tested with acorn version - v0.10.0-rc2-9-g43dbcbf4+43dbcbf4

Able to deploy clustercomputeclass successfully using the following yaml

kind: ClusterComputeClass
apiVersion: admin.acorn.io/v1
default: true
metadata:
  name: cc2
description: Large compute for linux on arm64
cpuScaler: 0.75
supportedRegions:
 - local
memory:
  default: 20M
  values:
  - 10M
  - 20M
  - 30M