p2p proxy doesn't work with registryfs v2

Aperta
#361 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
azure, cpp

Direzione di ricerca

Inizia da registryfs_v2.cpp e segui la gestione di p2p_url fino a url.cpp, quindi esamina message.cpp e client.cpp usando i log forniti. Riproduci il problema con il proxy p2p abilitato su Overlaybd 1.0.13; il lavoro è completato quando l’endpoint p2p locale viene analizzato correttamente e la richiesta ad Azure Storage non restituisce più HTTP 400.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
What happened in your environment?

Hey, we tried to upgrade our overlaybd installation from 0.6.17 to 1.0.13 and found out p2p proxy doesn't work with registryfs v2. The new http client in registryfs v2 is not able to parse the local p2p endpoint correctly. See the following logs:

Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182677|DEBUG|th=00007E28A80866C0|registryfs_v2.cpp:166|get_data:p2p_url: 127.0.0.1:8181/overlaybd/https://**redacted**.blob.core.windows.net/harbor//docker/registry/v2/blobs/sha256/88/****redacted*****/data?se=2025-02-26T23%3A49%3A07Z&sig=Z0dBLr8s6D8xouLHGQ6P11gibD08CgduRNskibZ9Slg%3D&sp=r&sr=b&sv=2016-05-31
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182680|DEBUG|th=00007E28A80866C0|url.cpp:44|from_string:[url=127.0.0.1:8181/overlaybd/https://**redacted**.blob.core.windows.net/harbor//docker/registry/v2/blobs/sha256/88/****redacted*****/data?se=2025-02-26T23%3A49%3A07Z&sig=Z0dBLr8s6D8xouLHGQ6P11gibD08CgduRNskibZ9Slg%3D&sp=r&sr=b&sv=2016-05-31]
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182682|DEBUG|th=00007E28A80866C0|message.cpp:312|reset:requst reset [u.host()=**redacted**.blob.core.windows.net][enable_proxy=0]
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182685|DEBUG|th=00007E28A80866C0|client.cpp:154|do_roundtrip:[concurreny=1]
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182687|DEBUG|th=00007E28A80866C0|client.cpp:67|dial:Dial to **redacted**.blob.core.windows.net 80
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182689|DEBUG|th=00007E28A80866C0|client.cpp:71|dial:Connecting 20.60.233.225:80 ssl: 0
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182694|DEBUG|th=00007E28A80866C0|client.cpp:82|dial:Connected 20.60.233.225:80 host : **redacted**.blob.core.windows.net ssl: 0 000063364D44CC80
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182696|DEBUG|th=00007E28A80866C0|client.cpp:166|do_roundtrip:Sending request 2 /harbor//docker/registry/v2/blobs/sha256/88/****redacted*****/data?se=2025-02-26T23%3A49%3A07Z&sig=Z0dBLr8s6D8xouLHGQ6P11gibD08CgduRNskibZ9Slg%3D&sp=r&sr=b&sv=2016-05-31
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.182702|DEBUG|th=00007E28A80866C0|client.cpp:195|do_roundtrip:Request sent, wait for response 2 /harbor//docker/registry/v2/blobs/sha256/88/****redacted*****/data?se=2025-02-26T23%3A49%3A07Z&sig=Z0dBLr8s6D8xouLHGQ6P11gibD08CgduRNskibZ9Slg%3D&sp=r&sr=b&sv=2016-05-31
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.184306|DEBUG|th=00007E28A80866C0|message.cpp:108|append_bytes:add headers, header buf size 65053
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.184312|DEBUG|th=00007E28A80866C0|message.cpp:114|append_bytes:header parsed
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.184314|DEBUG|th=00007E28A80866C0|client.cpp:211|do_roundtrip:Got response 2 /harbor//docker/registry/v2/blobs/sha256/88/****redacted*****/data?se=2025-02-26T23%3A49%3A07Z&sig=Z0dBLr8s6D8xouLHGQ6P11gibD08CgduRNskibZ9Slg%3D&sp=r&sr=b&sv=2016-05-31 code=400 || content_length=284
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.184317|ERROR|th=00007E28A80866C0|registryfs_v2.cpp:186|get_data:Failed to fetch data [url=https://**redacted**.com/v2/main/dbr/spark-image/blobs/sha256:****redacted*****][op.status_code=400][ret=400]
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.184319|ERROR|th=00007E28A80866C0|registryfs_v2.cpp:504|get_length:failed to get meta from server
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.184328|ERROR|th=00007E28A80866C0|registryfs_v2.cpp:530|open:failed to open and stat registry file /https://**redacted**.com/v2/main/dbr/spark-image/blobs/sha256:****redacted*****, ret -1 errno=110(Connection timed out)
Feb 26 23:29:32  overlaybd-tcmu[2226]: 2025/02/26 23:29:32.184334|ERROR|th=00007E28A80866C0|store.cpp:368|open_src_file:open source /https://**redacted**.com/v2/main/dbr/spark-image/blobs/sha256:****redacted***** failed errno=110(Connection timed out)

There are two errors in the above log.

  1. The url host is parsed incorrectly: 23:29:32.182682|DEBUG|th=00007E28A80866C0|message.cpp:312|reset:requst reset [u.host()=**redacted**.blob.core.windows.net][enable_proxy=0]
  2. For some reason, the request to the azure storage account also failed (got 400 code).
What did you expect to happen?

No response

How can we reproduce it?

Enabling p2p proxy with the 1.0.13 version should reproduce this.

What is the version of your Overlaybd?

1.0.13

What is your OS environment?

azure linux

Are you willing to submit PRs to fix it?
  • Yes, I am willing to fix it.
Lingua principale
C++
Stelle
447
Fork
102
Merge medio
1g 7h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di containerd/overlaybd

Tutte le issue di containerd/overlaybd

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.