-
Notifications
You must be signed in to change notification settings - Fork 55
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
Service creation - intermittent 400 bad request error #2385
Comments
As a workaround, we are migrating our custom helm-charts to S3, in order to have https instead of oci protocol. |
Based on description and the latest comment I suspect that the OCI protocol is the issue, i.e. not supported. (*) The mittwald client uses the official helm packages. Currently at |
Hm ... Helm claims to be able to support oci registries since client 3.8.0, per https://helm.sh/blog/storing-charts-in-oci/ Assuming that helm package versions track client versions, the helm packages we use should support OCI. Time to see if I can install a local OCI registry I could then use in attempts at reproducing the issue. |
According to https://helm.sh/docs/topics/registries/ there are a lot of other OCI registries, beyond Amazon ECR, which was used here, I believe. docker hub might be easiest to trial with. (docs: https://docs.docker.com/docker-hub/oci-artifacts/) |
Running into issues in the intersection of Starting to look at https://github.com/project-zot/zot for a local setup. |
Switching back to docker hub after getting some ideas during the weekend ...
So, have a OCI registry now, working with the Now to see if the issue can be reproduced. |
Using the service specification (added to the E chart to be deployed with it, instead of
The command
And creating a service instance from that works:
This is also visible in the server logs (slightly modified to make the embedded json readable)
|
@riqueps Given that the above basic trial with an OCI registry worked ... What are differences between mine and your setup ?
So, questions:
Depending on the answers suspicion will fall on either AWS or the custom service. Table of data points:
Side note: My |
@enrichman reminded me that the issue is something intermittent, i.e. appears mainly when deploying multiple times ... Trying here ...
(auth error: I now suspect that talking to the OCI registry involves a hidden token, created on demand, and it expires, causing a subsequent access to fail. However it also seems to be cleared and the next attempt gets a new token and works. Will wait another hour to see if the auth error happens again. |
Confirmed, after an hour wait the first attempt fails, and the next attempt after works. Without restarting the server between the two.
@riqueps And for AWS the second attempt will also fail ? Note: I am ware that AWS apparently reports |
My error contains This means that the original issue happens for the same command as my issue, just different underlying messages. Locations are Line 173 in 4ef2627
and Line 166 in 4ef2627
|
Reopening as I still could reproduce this issue on 1.9.0-rc4 (also on 1.8.1) Reproducer:
|
Thanks @thehejik, I was able to reproduce the issue as well. It seems that the problem was the misunderstanding of the I tried incrementing it and now it's ok. Basically |
Verified fixed in epinio v1.9.0-rc5 |
Describe the bug
After upgrade epinio to 1.8.0 we started experiencing some intermittent error during the creation of a custom service (epinio service create...), and to get it working again
epinio-server
deployment must be restarted.When this occurs I'm still able to install the same service using helm directly,
helm install SERVICE_NAME oci://REPO_URL --version 0.1.0
.I didn't experience this error for HTTPS based helm repo
Error message for CLI and Server:
❌ error creating service: service create failed: Internal Server Error: error deploying service helm chart: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request
No error log on
helm-controller
Workaround
Downgrade epinio to 1.7.1 or restart epinio-server deployment
Service details:
Env details
To Reproduce
Logs with trace-level 255
~$ epinio service create epinio-debug henrique-test4 --trace-level 255
🚢 Creating Service...
Catalog: epinio-debug
Service: henrique-test4
Wait For Completion: false
2023/06/13 14:21:34 EpinioApiClient: "level"=4 "msg"="POST https://epinio.DOMAIN.COM/api/v1/namespaces/workspace/services"
2023/06/13 14:21:35 EpinioApiClient: "level"=5 "msg"="request finished" "method"="POST" "uri"="https://epinio.DOMAIN.COM/api/v1/namespaces/workspace/services" "body"="{"catalog_service":"epinio-debug","name":"henrique-test4"}"
2023/06/13 14:21:35 EpinioApiClient: "level"=5 "msg"="response received" "status"=500 "header"={"Epinio-Version":["v1.8.0"],"X-Content-Type-Options":["nosniff"],"Strict-Transport-Security":["max-age=15724800; includeSubDomains"],"Date":["Tue, 13 Jun 2023 17:21:35 GMT"],"Content-Type":["application/json; charset=utf-8"],"Connection":["keep-alive"]} "TLSServerName"="epinio.DOMAIN.COM" "body"="{"errors":[{"status":500,"title":"error deploying service helm chart: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request","details":"\nServer Backtrace: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request\nerror deploying service helm chart\ngithub.com/epinio/epinio/internal/services.(*ServiceClient).Create\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/services/instances.go:179\ngithub.com/epinio/epinio/internal/api/v1/service.Controller.Create\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/api/v1/service/create.go:65\ngithub.com/epinio/epinio/internal/api/v1.errorHandler.func1\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/api/v1/router.go:52\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/alron/ginlogr.RecoveryWithLogr.func1\n\t/home/sles/go/pkg/mod/github.com/alron/ginlogr@v0.0.4/logr.go:121\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/alron/ginlogr.Ginlogr.func1\n\t/home/sles/go/pkg/mod/github.com/alron/ginlogr@v0.0.4/logr.go:34\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/gin-gonic/gin.CustomRecoveryWithWriter.func1\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/recovery.go:101\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/net/http/server.go:1991\nruntime.goexit\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/runtime/asm_amd64.s:1594"}]}"
2023/06/13 14:21:35 EpinioApiClient: "level"=5 "msg"="response is not StatusOK: Internal Server Error: error deploying service helm chart: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request" "status"=500 "header"={"Connection":["keep-alive"],"Epinio-Version":["v1.8.0"],"X-Content-Type-Options":["nosniff"],"Strict-Transport-Security":["max-age=15724800; includeSubDomains"],"Date":["Tue, 13 Jun 2023 17:21:35 GMT"],"Content-Type":["application/json; charset=utf-8"]} "TLSServerName"="epinio.DOMAIN.COM" "body"="{"errors":[{"status":500,"title":"error deploying service helm chart: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request","details":"\nServer Backtrace: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request\nerror deploying service helm chart\ngithub.com/epinio/epinio/internal/services.(*ServiceClient).Create\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/services/instances.go:179\ngithub.com/epinio/epinio/internal/api/v1/service.Controller.Create\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/api/v1/service/create.go:65\ngithub.com/epinio/epinio/internal/api/v1.errorHandler.func1\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/api/v1/router.go:52\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/alron/ginlogr.RecoveryWithLogr.func1\n\t/home/sles/go/pkg/mod/github.com/alron/ginlogr@v0.0.4/logr.go:121\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/alron/ginlogr.Ginlogr.func1\n\t/home/sles/go/pkg/mod/github.com/alron/ginlogr@v0.0.4/logr.go:34\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/gin-gonic/gin.CustomRecoveryWithWriter.func1\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/recovery.go:101\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/net/http/server.go:1991\nruntime.goexit\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/runtime/asm_amd64.s:1594"}]}" "body"="{"errors":[{"status":500,"title":"error deploying service helm chart: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request","details":"\nServer Backtrace: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request\nerror deploying service helm chart\ngithub.com/epinio/epinio/internal/services.(*ServiceClient).Create\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/services/instances.go:179\ngithub.com/epinio/epinio/internal/api/v1/service.Controller.Create\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/api/v1/service/create.go:65\ngithub.com/epinio/epinio/internal/api/v1.errorHandler.func1\n\t/home/sles/actions-runner/_work/epinio/epinio/internal/api/v1/router.go:52\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/alron/ginlogr.RecoveryWithLogr.func1\n\t/home/sles/go/pkg/mod/github.com/alron/ginlogr@v0.0.4/logr.go:121\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/alron/ginlogr.Ginlogr.func1\n\t/home/sles/go/pkg/mod/github.com/alron/ginlogr@v0.0.4/logr.go:34\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/gin-gonic/gin.CustomRecoveryWithWriter.func1\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/recovery.go:101\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/home/sles/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/net/http/server.go:1991\nruntime.goexit\n\t/home/sles/actions-runner/_work/_tool/go/1.19.8/x64/src/runtime/asm_amd64.s:1594"}]}"
2023/06/13 14:21:35 EpinioClient/ServiceCreate: "level"=4 "msg"="return"
❌ error creating service: service create failed: Internal Server Error: error deploying service helm chart: pulling from host public.ecr.aws failed with status code [manifests 0.3.0]: 400 Bad Request
The text was updated successfully, but these errors were encountered: