CDN injects cosmo. into hostname for S3
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
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.
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.
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
Honestly not sure -- I had everything pulling latest at the time..
Correction latest pulled today: 1badabde0e0e throwing that error for me
Hi @japhar81 thanks for the input.
How about the version I sent you? Is this one working as expected for you?
@AndreasZeissner intermittently, but yes..