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

CDN injects cosmo. into hostname for S3 #1237

Open
japhar81 opened this issue Oct 3, 2024 · 6 comments
Open

CDN injects cosmo. into hostname for S3 #1237

japhar81 opened this issue Oct 3, 2024 · 6 comments
Assignees
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.

Comments

@japhar81
Copy link

japhar81 commented Oct 3, 2024

Component(s)

controlplane

Component version

latest docker tag

wgc version

0.65.1

controlplane version

latest docker tag

router version

latest docker tag

What happened?

Description

The CDN container appears to prepend .cosmo to the hostname being configured

Steps to Reproduce

In docker-compose, create CDN and point to minio:

  cdn:
    image: ghcr.io/wundergraph/cosmo/cdn:latest
    environment:
      - PORT=11000
      - NODE_ENV=development
      - AUTH_JWT_SECRET=fkczyomvdprgvtmvkuhvprxuggkbgwld
      - AUTH_ADMISSION_JWT_SECRET=uXDxJLEvrw4aafPfrf3rRotCoBzRfPEW
      - S3_STORAGE_URL=http://minio:changeme@minio:9000/cosmo
      - S3_REGION=auto
      - S3_ENDPOINT=
      - S3_ACCESS_KEY_ID=
      - S3_SECRET_ACCESS_KEY=
      - S3_FORCE_PATH_STYLE="true"
    ports:
      - "11000:11000"
    restart: unless-stopped
    depends_on:
      minio:
        condition: service_healthy

Expected Result

CDN should see the bucket -- its there, confirmed to be created by controlplane

Actual Result

cdn-1                   |   <-- POST /9f865d75-832c-434c-a832-ff520c48d7d0/58ed107f-bc79-4db6-afbb-e5ffcc20a7c7/routerconfigs/latest.json
cdn-1                   | Error: getaddrinfo ENOTFOUND cosmo.minio
cdn-1                   |     at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
cdn-1                   |   errno: -3008,
cdn-1                   |   code: 'ENOTFOUND',
cdn-1                   |   syscall: 'getaddrinfo',
cdn-1                   |   hostname: 'cosmo.minio',
cdn-1                   |   '$metadata': { attempts: 1, totalRetryDelay: 0 }
cdn-1                   | }
cdn-1                   |   --> POST /9f865d75-832c-434c-a832-ff520c48d7d0/58ed107f-bc79-4db6-afbb-e5ffcc20a7c7/routerconfigs/latest.json 500 8ms

Note the hostname is cosmo.minio. This appears nowhere in my configs, nor anywhere I can find in the cdn source code, so not sure where it's coming from.

Environment information

Environment

Docker Desktop on Linux

Router configuration

N/A

Router execution config

N/A

Log output

router-1                | {"level":"info","time":1727921582354,"msg":"Retry request","hostname":"b25752d30f4d","pid":8,"component":"@wundergraph/router","service_version":"0.117.0","component":"router_config_client","retry":3}
cdn-1                   |   <-- POST /9f865d75-832c-434c-a832-ff520c48d7d0/58ed107f-bc79-4db6-afbb-e5ffcc20a7c7/routerconfigs/latest.json
cdn-1                   | Error: getaddrinfo ENOTFOUND cosmo.minio
cdn-1                   |     at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
cdn-1                   |   errno: -3008,
cdn-1                   |   code: 'ENOTFOUND',
cdn-1                   |   syscall: 'getaddrinfo',
cdn-1                   |   hostname: 'cosmo.minio',
cdn-1                   |   '$metadata': { attempts: 1, totalRetryDelay: 0 }
cdn-1                   | }
cdn-1                   |   --> POST /9f865d75-832c-434c-a832-ff520c48d7d0/58ed107f-bc79-4db6-afbb-e5ffcc20a7c7/routerconfigs/latest.json 500 8ms

Additional context

No response

@japhar81 japhar81 added the bug Something isn't working label Oct 3, 2024
Copy link

github-actions bot commented Oct 3, 2024

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@japhar81
Copy link
Author

japhar81 commented Oct 3, 2024

quick note: this "might" be in the images somehow? Other folks on my team see this as well, but its intermittent. Some image pulls my config works great, sometimes, not so much. Best we can tell this started a few days ago, but pinning the image version and going back a few releases doesnt seem to matter.

@AndreasZeissner
Copy link
Contributor

Hi @japhar81 thanks for reporting this.

Could you please tell me which versions you used before and which you are using now?

There has been some changes in the s3 handling back then e.g.: https://github.com/wundergraph/cosmo/releases/tag/cdn%400.10.1

@AndreasZeissner AndreasZeissner added the internally-reviewed The issue has been reviewed internally. label Oct 8, 2024
@japhar81
Copy link
Author

Honestly not sure -- I had everything pulling latest at the time..

@japhar81
Copy link
Author

Correction latest pulled today: 1badabde0e0e throwing that error for me

@AndreasZeissner
Copy link
Contributor

Hi @japhar81 thanks for the input.

How about the version I sent you?
Is this one working as expected for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.
Projects
None yet
Development

No branches or pull requests

2 participants