p2p proxy doesn't work with registryfs v2

Abierto
#361 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
azure, cpp

Línea de trabajo

Comienza con registryfs_v2.cpp y sigue el manejo de p2p_url hasta url.cpp. Después, inspecciona message.cpp y client.cpp usando los logs proporcionados. Reproduce el problema con el proxy p2p habilitado en Overlaybd 1.0.13; se considera terminado cuando el endpoint p2p local se analiza correctamente y la solicitud al almacenamiento de Azure deja de devolver HTTP 400.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
C++
Estrellas
447
Forks
102
Merge medio
1 d 7 h
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de containerd/overlaybd

Todos los issues de containerd/overlaybd

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.