This repository has been archived by the owner on Jul 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Fixes #14 : list_directory always return empty list #15
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rvrignaud what's the justification behind this change? How can I reproduce this issue (private/hosted platform)? Is there documentation on this change in the swift client? |
Hello. |
sathlan
added a commit
to redhat-cip/docker-registry-driver-swift
that referenced
this pull request
Sep 17, 2014
docker-registry has a local database which can be queried using a simple REST API. If you trash this database, it is supposed to be recreated when you restart docker-registry. This fix the recreation of the db which happens thanks to results of the the list_directory function. Previously this was empty. To test the problem and review the solution: 1. assuming a working swift and docker registry with swift driver installed; 2. push some images; 3. stop docker-registry; 4. check sqlalchemy_index_database in docker registry conf and "rm" the database (by default an sqlite file); 5. restart docker-registry; With the old code the database will be empty. With the new one the db will be filled with the already pushed images. The main problem come from the facts that: $ curl -i -X GET -H "X-Auth-Token: AUTH_token" 'http://localhost:8080/v1/AUTH_test/docker?prefix=lvl_1/&delimiter=/&format=json' [{"hash": "a83a7dcf68a3dd1d83584abd8e230829", "last_modified": "2014-09-17T15:26:25.585390", "bytes": 29, "name": "lvl_1/file_2", "content_type": "application/octet-stream"}, {"subdir": "lvl_1/lvl_2/"}] and $ curl -i -X GET -H "X-Auth-Token: AUTH_token" 'http://localhost:8080/v1/AUTH_test/docker?path=lvl_1/&format=json' [{"hash": "a83a7dcf68a3dd1d83584abd8e230829", "last_modified": "2014-09-17T15:26:25.585390", "bytes": 29, "name": "lvl_1/file_2", "content_type": "application/octet-stream"}] do not return the same thing. The main difference being that the subdirectories are not return when using the "path" syntax. I tested with swift 1.18 and check that the Pseudo-hierarchical folders and directories behaviour was the same on swift 2.2.0. This would close bacongobbler#14 and bacongobbler#15. The "fill it if not there" mechanism is described in this issue docker-archive/docker-registry#516
sathlan
added a commit
to redhat-cip/docker-registry-driver-swift
that referenced
this pull request
Sep 17, 2014
docker-registry has a local database which can be queried using a simple REST API. If you trash this database, it is supposed to be recreated when you restart docker-registry. This fix the recreation of the db which happens thanks to results of the the list_directory function. Previously this was empty. To test the problem and review the solution: 1. assuming a working swift and docker registry with swift driver installed; 2. push some images; 3. stop docker-registry; 4. check sqlalchemy_index_database in docker registry conf and "rm" the database (by default a sqlite file); 5. restart docker-registry; With the old code the database will be empty. With the new one the db will be filled with the already pushed images. The main problem come from the facts that: $ curl -i -X GET -H "X-Auth-Token: AUTH_token" 'http://localhost:8080/v1/AUTH_test/docker?prefix=lvl_1/&delimiter=/&format=json' [{"hash": "a83a7dcf68a3dd1d83584abd8e230829", "last_modified": "2014-09-17T15:26:25.585390", "bytes": 29, "name": "lvl_1/file_2", "content_type": "application/octet-stream"}, {"subdir": "lvl_1/lvl_2/"}] and $ curl -i -X GET -H "X-Auth-Token: AUTH_token" 'http://localhost:8080/v1/AUTH_test/docker?path=lvl_1/&format=json' [{"hash": "a83a7dcf68a3dd1d83584abd8e230829", "last_modified": "2014-09-17T15:26:25.585390", "bytes": 29, "name": "lvl_1/file_2", "content_type": "application/octet-stream"}] do not return the same thing. The main difference being that the subdirectories are not return when using the "path" syntax. I tested with swift 1.8.0 and check that the Pseudo-hierarchical folders and directories behaviour was the same on swift 2.2.0. This would close bacongobbler#14 and bacongobbler#15. The "fill it if not there" mechanism is described in this issue docker-archive/docker-registry#516
closing in favour of #18 |
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Any thought ?