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

Gatewayd container exits unsuccessfully on v0.9.6 #568

Closed
eabasir opened this issue Jun 8, 2024 · 11 comments
Closed

Gatewayd container exits unsuccessfully on v0.9.6 #568

eabasir opened this issue Jun 8, 2024 · 11 comments
Labels
bug Something isn't working
Milestone

Comments

@eabasir
Copy link
Contributor

eabasir commented Jun 8, 2024

Expected Behavior

docker-compose should start the gatewayd container without any problems.

Current Behavior

After the release v0.9.6 the gatewayd container exits unsuccessfully (exit code 1) due to failure at parsing the actionRedis config.

Failure Information (for bugs)

The failiure only occurs when running the latest version (0.9.6) in a docker container as described below. It doesn't show any errors after building and running the project locally (go build main.go && ./main run)

Steps to Reproduce

  1. Try running the docker-compose up which by default uses the version 0.9.6
  2. Notice the aforementioned failure
  3. Uncomment the GATEWAYD_VERSION env var for the gatewayd service in the docker-compose.yaml file and change the version to 0.9.5
  4. Run the docker-compose up again. The container should start successfully.

Context

  • Operating System and architecture: MacOS 14.4.1 (Sonoma), Apple M3 Pro
  • GatewayD version: 0.9.6
  • Docker version: 24.0.7
  • Docker compose version: v2.23.3-desktop.2

Failure Logs

image

@mostafa mostafa added the bug Something isn't working label Jun 8, 2024
@mostafa mostafa added this to the v0.9.x milestone Jun 8, 2024
@mostafa
Copy link
Member

mostafa commented Jun 8, 2024

@eabasir I couldn't reproduce it on my machine. It just works.

@eabasir
Copy link
Contributor Author

eabasir commented Jun 9, 2024

Weired... any other one sees this issue? @sinadarbouy @hamedsalim1999

@sinadarbouy
Copy link
Collaborator

yes, I can reproduce this issue. It seems, as you said, there is a problem with the actionRedis parsing in the plugin config.

@eabasir
Copy link
Contributor Author

eabasir commented Jun 9, 2024

There is no issue with the darwin-arm64 binary that is being executed locally, though. The problem is when the linux-arm64 binary starts in a docker container.

@eabasir
Copy link
Contributor Author

eabasir commented Jun 9, 2024

Some more inputs:
I built the docker file and started it, locally. It starts successfully, so I think something is probably wrong with the pushed version to the Dockerhub.

Side not: I've noticed that the git=2.45.1-r0 is no longer available in the apk repository. To build the image, I had to update the Dockerfile to git=2.45.1-r0.

@mostafa
Copy link
Member

mostafa commented Jun 9, 2024

@eabasir git was recently updated by @sinadarbouy and is available on the main branch.

@mostafa
Copy link
Member

mostafa commented Oct 1, 2024

@eabasir @sinadarbouy Can you test this again with the latest version to see if it is still reproducible? I couldn't reproduce this again.

@sinadarbouy
Copy link
Collaborator

@eabasir @sinadarbouy Can you test this again with the latest version to see if it is still reproducible? I couldn't reproduce this again.

@mostafa Yes, we still have this issue. It seems to only appear on ARM machines.

2024-10-02 15:22:50 2024/10/02 13:22:50 linting failed, OriginalError: jsonschema: '/clients/default' does not validate with https://github.com/gatewayd-io/gatewayd/config/global-config#/$ref/properties/clients/additionalProperties/$ref/additionalProperties: additionalProperties 'writes', 'reads' not allowed
2024-10-02 15:24:26 2024/10/02 13:24:26 linting failed, OriginalError: jsonschema: '/clients/default' does not validate with https://github.com/gatewayd-io/gatewayd/config/global-config#/$ref/properties/clients/additionalProperties/$ref/additionalProperties: additionalProperties 'writes', 'reads' not allowed

I’ll take a look later today and see if I can sort it out.

@sinadarbouy
Copy link
Collaborator

@eabasir @sinadarbouy Can you test this again with the latest version to see if it is still reproducible? I couldn't reproduce this again.

@mostafa Yes, we still have this issue. It seems to only appear on ARM machines.

2024-10-02 15:22:50 2024/10/02 13:22:50 linting failed, OriginalError: jsonschema: '/clients/default' does not validate with https://github.com/gatewayd-io/gatewayd/config/global-config#/$ref/properties/clients/additionalProperties/$ref/additionalProperties: additionalProperties 'writes', 'reads' not allowed
2024-10-02 15:24:26 2024/10/02 13:24:26 linting failed, OriginalError: jsonschema: '/clients/default' does not validate with https://github.com/gatewayd-io/gatewayd/config/global-config#/$ref/properties/clients/additionalProperties/$ref/additionalProperties: additionalProperties 'writes', 'reads' not allowed

I’ll take a look later today and see if I can sort it out.

I checked it again, and it looks like the issue was caused by using the latest tag in Docker Compose. Docker Compose didn’t recognize the image update, so it used the local one instead. After I removed the local image with

docker image rmi gatewaydio/gatewayd:latest

it got fixed. So the problem’s gone, and we can close this task now.

For future releases, we should probably use a specific release tag in Docker Compose instead of latest.

@mostafa
Copy link
Member

mostafa commented Oct 2, 2024

@sinadarbouy How about adding pull_policy: always to the GatewayD image, so every time you run it, it'll pull the actual latest version, rather than the existing one?

@sinadarbouy
Copy link
Collaborator

sinadarbouy commented Oct 2, 2024

pull_policy: always

Yeah, using pull_policy is a good idea 👍. It’ll always pull the latest image, but if we run docker compose up and down a lot, we might hit the rate limit

@mostafa mostafa closed this as completed in ffd13ea Oct 2, 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
Projects
Development

No branches or pull requests

3 participants