cnrancher / hangar

Multi-platform container image command-line utility.
https://hangar.cnrancher.com
Apache License 2.0
12 stars 6 forks source link

[BUG][Harbor] Failed to create harbor project & warning message when copy image #44

Closed STARRY-S closed 1 week ago

STARRY-S commented 1 week ago

Description

Failed to create harbor project automatically when loading images, and warning message appears when loading image to harbor registry server:

$ hangar load -s ./saved-images.zip -d h2.example.com:30080 --tls-verify=false
[10:18:26] [INFO] Arch List: [amd64,arm64]
[10:18:26] [INFO] OS List: [linux]
[10:18:27] [WARN] Failed, retrying in 100ms ... (1/3). Error: reading manifest 3 in h2.example.com:30080/library/alpine: unknown: artifact library/alpine:3 not found
[10:18:28] [WARN] Failed, retrying in 100ms ... (2/3). Error: reading manifest 3 in h2.example.com:30080/library/alpine: unknown: artifact library/alpine:3 not found
[10:18:29] [WARN] Failed, retrying in 100ms ... (3/3). Error: reading manifest 3 in h2.example.com:30080/library/alpine: unknown: artifact library/alpine:3 not found
[10:18:30] [INFO] [IMG:1] Loading [docker.io/library/alpine:3]...
STARRY-S commented 1 week ago

Reason

  1. Bug at here caused failed to create harbor project automatically, affected version v1.7.2 - v1.8.0.
  2. Harbor responses non-standard not found error code and c/image library cannot detect it. Will add workaround to detect error string content in the retry function.

Will fix in both v1.8.1 and v1.7.4.

STARRY-S commented 1 week ago

Hangar validation test for distribution registry & Harbor has intergrated into CI Pipeline: https://drone-pandaria.cnrancher.com/cnrancher/hangar/454/1/3