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

delete of non-existent entity causes panic when run on follower controller #1983

Closed
plorenz opened this issue Apr 25, 2024 · 0 comments
Closed
Assignees
Labels
bug Something isn't working distributed-control Work related to HA/Raft/other distributed control panic describes a code panic

Comments

@plorenz
Copy link
Member

plorenz commented Apr 25, 2024

Causes by bad parsing of boltz.RecordNotFoundError when sent over the wire from ctrl <-> ctrl

goroutine 158 [running]:
github.com/openziti/foundation/v2/debugz.generateStack(0x2000, 0x0)
        /home/plorenz/go/pkg/mod/github.com/openziti/foundation/v2@v2.0.42/debugz/stack.go:38 +0x45
github.com/openziti/foundation/v2/debugz.GenerateLocalStack(...)
        /home/plorenz/go/pkg/mod/github.com/openziti/foundation/v2@v2.0.42/debugz/stack.go:33
github.com/openziti/ziti/controller/api.(*timeoutHandler).ServeHTTP.func1.1()
        /home/plorenz/work/nf/ziti/controller/api/timeouts.go:92 +0xd5
panic({0x35ee220?, 0x5a0f360?})
        /home/plorenz/go/go1.22.1/src/runtime/panic.go:770 +0x132
github.com/openziti/ziti/controller/response.EdgeResponseMapper.toRestModel({}, 0xc002db5880, {0xc0022853b0, 0x9})
        /home/plorenz/work/nf/ziti/controller/response/responder.go:93 +0x66e
github.com/openziti/ziti/controller/response.EdgeResponseMapper.MapApiError(...)
        /home/plorenz/work/nf/ziti/controller/response/responder.go:47
github.com/openziti/ziti/controller/api.(*ResponderImpl).RespondWithApiError(0xc0014432f0, 0xc002db5880)
        /home/plorenz/work/nf/ziti/controller/api/responder.go:142 +0x6a
github.com/openziti/ziti/controller/api.(*ResponderImpl).RespondWithError(0x3584a40?, {0x4191ce0?, 0xc002db5880?})
        /home/plorenz/work/nf/ziti/controller/api/responder.go:138 +0xac
github.com/openziti/ziti/controller/internal/routes.Delete(0xc002e384b0, 0xc0023a1590?)
        /home/plorenz/work/nf/ziti/controller/internal/routes/base_router.go:285 +0x25f
github.com/openziti/ziti/controller/internal/routes.DeleteWithHandler(...)
        /home/plorenz/work/nf/ziti/controller/internal/routes/base_router.go:262
github.com/openziti/ziti/controller/internal/routes.(*IdentityRouter).Delete(0x14f4eea?, 0x4194de0?, 0x3e78f30?)
        /home/plorenz/work/nf/ziti/controller/internal/routes/identity_router.go:221 +0x4e
github.com/openziti/ziti/controller/internal/routes.(*IdentityRouter).Register.func1.(*AppEnv).IsAllowed.1({0x41b8b80, 0xc002abda40}, {0x4194de0, 0x3e78f30})
        /home/plorenz/work/nf/ziti/controller/env/appenv.go:928 +0x247
github.com/go-openapi/runtime/middleware.ResponderFunc.WriteResponse(0x35cc920?, {0x41b8b80?, 0xc002abda40?}, {0x4194de0?, 0x3e78f30?})
        /home/plorenz/go/pkg/mod/github.com/go-openapi/runtime@v0.28.0/middleware/context.go:80 +0x37
github.com/go-openapi/runtime/middleware.(*Context).Respond(0xc002673500, {0x41b8b80, 0xc002abda40}, 0xc000cbaa20, {0xc001586920, 0x1, 0x1}, 0xc001d7b100, {0x362a080, 0xc002d9a1e0})
        /home/plorenz/go/pkg/mod/github.com/go-openapi/runtime@v0.28.0/middleware/context.go:559 +0x6e7
github.com/openziti/edge-api/rest_management_api_server/operations/identity.(*DeleteIdentity).ServeHTTP(0xc0027a3800, {0x41b8b80, 0xc002abda40}, 0xc000cbaa20)
        /home/plorenz/go/pkg/mod/github.com/openziti/edge-api@v0.26.18/rest_management_api_server/operations/identity/delete_identity.go:93 +0x2e5
github.com/go-openapi/runtime/middleware.(*Context).RoutesHandler.NewOperationExecutor.func1({0x41b8b80, 0xc002abda40}, 0xc000cbaa20)
        /home/plorenz/go/pkg/mod/github.com/go-openapi/runtime@v0.28.0/middleware/operation.go:28 +0x53
net/http.HandlerFunc.ServeHTTP(0xc002673500?, {0x41b8b80?, 0xc002abda40?}, 0x40?)
        /home/plorenz/go/go1.22.1/src/net/http/server.go:2166 +0x29
github.com/go-openapi/runtime/middleware.NewRouter.func1({0x41b8b80, 0xc002abda40}, 0xc000cb7d40)
        /home/plorenz/go/pkg/mod/github.com/go-openapi/runtime@v0.28.0/middleware/router.go:80 +0x257
net/http.HandlerFunc.ServeHTTP(0xc00221fec7?, {0x41b8b80?, 0xc002abda40?}, 0x9d0000c00280bb30?)
        /home/plorenz/go/go1.22.1/src/net/http/server.go:2166 +0x29
github.com/go-openapi/runtime/middleware.Redoc.serveUI.func1({0x41b8b80, 0xc002abda40}, 0xc000cb7d40)
        /home/plorenz/go/pkg/mod/github.com/go-openapi/runtime@v0.28.0/middleware/ui_options.go:164 +0xda
net/http.HandlerFunc.ServeHTTP(0xc00221fec7?, {0x41b8b80?, 0xc002abda40?}, 0xc001443140?)
        /home/plorenz/go/go1.22.1/src/net/http/server.go:2166 +0x29
github.com/go-openapi/runtime/middleware.Spec.func1({0x41b8b80, 0xc002abda40}, 0xc000cb7d40)
        /home/plorenz/go/pkg/mod/github.com/go-openapi/runtime@v0.28.0/middleware/spec.go:72 +0x1b1
net/http.HandlerFunc.ServeHTTP(0xc002e384b0?, {0x41b8b80?, 0xc002abda40?}, 0xc000cb7d40?)
        /home/plorenz/go/go1.22.1/src/net/http/server.go:2166 +0x29
github.com/openziti/ziti/controller/server.ManagementApiHandler.newHandler.func1({0x41b8b80, 0xc002abda40}, 0xc000cb7d40)
        /home/plorenz/work/nf/ziti/controller/server/management-api.go:141 +0x262
net/http.HandlerFunc.ServeHTTP(0xc001442ea0?, {0x41b8b80?, 0xc002abda40?}, 0xffffffffffffffff?)
        /home/plorenz/go/go1.22.1/src/net/http/server.go:2166 +0x29
github.com/gorilla/handlers.(*cors).ServeHTTP(0xc0034b8360, {0x41b8b80, 0xc002abda40}, 0xc000cb7d40)
        /home/plorenz/go/pkg/mod/github.com/gorilla/handlers@v1.5.2/cors.go:54 +0x335
github.com/openziti/ziti/controller/api.(*timeoutHandler).ServeHTTP.func1()
        /home/plorenz/work/nf/ziti/controller/api/timeouts.go:96 +0x71
created by github.com/openziti/ziti/controller/api.(*timeoutHandler).ServeHTTP in goroutine 156
        /home/plorenz/work/nf/ziti/controller/api/timeouts.go:89 +0x2a5
@plorenz plorenz self-assigned this Apr 25, 2024
@plorenz plorenz added bug Something isn't working distributed-control Work related to HA/Raft/other distributed control panic describes a code panic labels Apr 25, 2024
plorenz added a commit that referenced this issue Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working distributed-control Work related to HA/Raft/other distributed control panic describes a code panic
Projects
Status: Done
Development

No branches or pull requests

1 participant