goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
24.12k stars 4.76k forks source link

Unable to delete images with Openstack Swift as the storage backend #2854

Closed glitchcrab closed 7 years ago

glitchcrab commented 7 years ago

docker-engine: 17.06.0~ce-0~ubuntu relevant log files: https://gist.github.com/analbeard/fca3ddfb36d3e8ba0f71dce1cd13acdf

We are running Harbor with an on-premise Openstack Swift cluster providing the storage - push/pull works fine but we are unable to delete images. The swift user has full read/write permissions on the container and I can manually delete test files. Please see above for the log files for the transaction.

Storage configuration:

storage:
  swift:
    username: registry
    password: **
    authurl: https://auth.storage.domain.com/v2.0
    tenant: **
    region: ** 
    container: dockerimages
    delete:
        enabled: true
ywk253100 commented 7 years ago

According to the docs of docker distribution, swift has no property called "delete". You should set "delete" on the same level with "swift".

storage:
  swift:
    username: registry
    password: **
    authurl: https://auth.storage.domain.com/v2.0
    tenant: **
    region: ** 
    container: dockerimages
  delete:
    enabled: true
glitchcrab commented 7 years ago

Wonderful, that's fixed it. Thanks!