Mirror Registry for OpenShift doesn’t show correct IP address in logs
Issue
- When deploying
Mirror Registry(on RHEL 8,9) as anon-root user, the real IP address of thelocal machine/ VM/ RHOCP worker nodesdoes not get logged. -
User logs from
Quay WebUI, record the IP10.0.2.100even if requests toQuaycome from different clients. -
Systemd logs show the below error message :
May 16 12:05:46 apimts-registry quay-app[12878]: nginx stdout | 10.0.2.100 (-) - - [16/May/2023:05:05:46 +0000] "GET /v2/openshift4/blobs/sha256:bb6df4bd210d623b8f328c9f15a6264af9196d42d6654e4d5538bb43111e5d94 HTTP/1.1" 200 114216651 "-" "cri-o/1.23.5- 7.rhaos4.10.git5cc2f1e.el8 go/go1.17.12 os/linux arch/amd64" (4.904 1361 4.904) May 16 12:05:46 apimts-registry podman[12800]: gunicorn-registry stdout | 2023-05-16 05:05:46,589 [185] [INFO] [gunicorn.access] 10.0.2.100 - - [16/May/2023:05:05:46 +0000] "GET /v2/openshift4/blobs/sha256:bb6df4bd210d623b8f328c9f15a6264af9196d42d6654e4d5538bb43111e5d94 HTTP/1.1" 200 115717174 "-" "cri-o/1.23.5-7.rhaos4.10.git5cc2f1e.el8 go/go1.17.12 os/linux arch/amd64" -
How to log the real IP address of the client which is pulling
imagesfrom themirror registry? - What is the right way to add a flag
--network slirp4netns:port_handler=slirp4netnsin the unit filequay-app.service?
Environment
- Mirror Registry for OpenShift
- 1.3.7
- Red Hat OpenShift Container Platform (RHOCP)
- 4.x
- Red Hat Enterprise Linux (RHEL)
- 8, 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.