Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Sync existing docker repo with portus #1170

Closed
kayrus opened this issue Feb 6, 2017 · 5 comments
Closed

Sync existing docker repo with portus #1170

kayrus opened this issue Feb 6, 2017 · 5 comments
Labels

Comments

@kayrus
Copy link

kayrus commented Feb 6, 2017

For some reason portus doesn't show/sync the data which is located in existing registry.

When I run bundle exec rails r bin/client.rb catalog it prints all the repos which I have in existing registry:

$ bundle exec rails r bin/client.rb catalog
[Mailer config] Host:     registry.mydomain.com
[Mailer config] Protocol: https://
[{"name"=>"busybox", "tags"=>["latest"]}, {"name"=>"docker-gc", "tags"=>["latest"]},
... ... ...
{"name"=>"word2vec", "tags"=>["14", "15", "16", "12", "6", "21", "24", "17", "11", "22", "10", "18", "8", "latest", "4", "7", "5", "20", "9", "23", "13"]}]
Size: 99

portus logs contain auth log for each request:

Started GET "/v2/token?account=portus&scope=repository%3Aword2vec%3Apull&service=registry.mydomain.com%3A444" for 172.17.0.1 at 2017-02-06 15:47:02 +0000
Processing by Api::V2::TokensController#show as JSON
  Parameters: {"account"=>"portus", "scope"=>"repository:word2vec:pull", "service"=>"registry.mydomain.com:444"}
Completed 200 OK in 107ms (Views: 0.2ms | ActiveRecord: 32.4ms)

docker logs:

... ... ...
time="2017-02-06T15:44:34Z" level=warning msg="error authorizing context: insufficient scope" go.version=go1.6.3 http.request.host="registry.mydomain.com:444" http.request.id=735be1d8-dd47-40b7-b267-650ce62fb91d http.request.method=GET http.request.remoteaddr="172.17.0.1:55568" http.request.uri="/v2/word2vec/tags/list?n=100" http.request.useragent=Ruby instance.id=767877e1-fcc2-426a-8a40-4ec6dc7b95d9 vars.name=word2vec version=v2.5.1 
172.17.0.1 - - [06/Feb/2017:15:44:34 +0000] "GET /v2/word2vec/tags/list?n=100 HTTP/1.1" 401 140 "" "Ruby"
time="2017-02-06T15:44:34Z" level=info msg="response completed" go.version=go1.6.3 http.request.host="registry.mydomain.com:444" http.request.id=1e4ed089-3739-48b2-aa61-287cb5a5ceb9 http.request.method=GET http.request.remoteaddr="172.17.0.1:55578" http.request.uri="/v2/word2vec/tags/list?n=100" http.request.useragent=Ruby http.response.contenttype="application/json; charset=utf-8" http.response.duration=2.210185ms http.response.status=200 http.response.written=132 instance.id=767877e1-fcc2-426a-8a40-4ec6dc7b95d9 version=v2.5.1 
172.17.0.1 - - [06/Feb/2017:15:44:34 +0000] "GET /v2/word2vec/tags/list?n=100 HTTP/1.1" 200 132 "" "Ruby"

But it doesn't show anything in the web interface.

@kayrus
Copy link
Author

kayrus commented Feb 6, 2017

Looks like bundle exec rails r bin/client.rb catalog is not how I should run the sync. Crono is not what I need right now. Is there any rake job which just synchronizes the repo?

@JoKre17
Copy link

JoKre17 commented Apr 3, 2017

Hey kayrus,

can you tell me where I can find the portus logs?
I am running portus as a docker container as well and i can only achieve the portus_web_1, portus_crono_1 and portus_db_1 log with "docker logs portus_X_1"

And the mounted Portus directory contains a log folder which is empty except a 0 Byte sized development.log file.

I've found why Portus would not add all the repositories into its database.
It is searching for a namespace, which might not exist yet in the database.
See #1268 where I pointed out, that the repositories in the registry are in sub folders which need to exist as namespaces, so that portus adds them into the database.

@kayrus
Copy link
Author

kayrus commented Apr 10, 2017

@JoKre17 I use docker logs functionality to fetch the logs.

@stale
Copy link

stale bot commented Feb 20, 2018

Thanks for all your contributions!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Feb 20, 2018
@mssola
Copy link
Collaborator

mssola commented Feb 20, 2018

I believe this is fixed. Check out the new options for the synchronization part. If you are facing further issues after this, please tell us so in the issue #1599.

@mssola mssola closed this as completed Feb 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants