-
Notifications
You must be signed in to change notification settings - Fork 473
crono synch job fails on private repository and deletes everything from database #663
Comments
A solution for the firs part seems to be to do this change in add_tags in
I would submit this as a pull req but there are a fairly large number of requirements to do that, so I'll leave it for one of the devs to pick up |
You are totally right. I'll fix that.
Now, this is weird... If you have access to the Portus instance, maybe you could call:
What does this print ? Moreover, just to be sure: which version of docker and docker distribution are you using ? |
I will run this test Monday. We are running docker under CoreOS, docker 1.8.3 |
I am seeing the same issue. If I docker exec into the db container and connect to mysql the "repositories" and "tags" tables are empty. I am on RHEL-7.2 and am running docker: if I run the "_catalog" REST API on the registry, I see the images in there. I also was using LDAP, but I tried without LDAP first. |
@mssola Sorry for the delay, ran the test as asked. Unfortunately there have been a number of changes ot the repository since my first post (people are actively testing things) so the values are somewhat different to before. The 'fos' namespace is now the private one (same as 'sis' in the original example).
|
Right now, the `RegistryClient#catalog` method can erase the DB of all the repos. This happens when, for some unexpected reason, the `RegistryClient#add_tags` method fails at retrieving one repository. In this case, before this patch this method just returned an empty array. After this patch, repositories that are not found will simply not be added, but the method will go on adding tags to other repositories. See SUSE#663 Signed-off-by: Miquel Sabaté Solà <[email protected]>
@sshipway sorry for the delay from my side too ;) With #672 the first part will be fixed. Moreover, it will be backported to the So, as far as I understand it, the |
Thanks for the update. I've added some more logging lines to log the JSON from catalogue requests when in debug mode so that there will be more info. |
Right now, the `RegistryClient#catalog` method can erase the DB of all the repos. This happens when, for some unexpected reason, the `RegistryClient#add_tags` method fails at retrieving one repository. In this case, before this patch this method just returned an empty array. After this patch, repositories that are not found will simply not be added, but the method will go on adding tags to other repositories. See #663 Signed-off-by: Miquel Sabaté Solà <[email protected]>
Right now, the `RegistryClient#catalog` method can erase the DB of all the repos. This happens when, for some unexpected reason, the `RegistryClient#add_tags` method fails at retrieving one repository. In this case, before this patch this method just returned an empty array. After this patch, repositories that are not found will simply not be added, but the method will go on adding tags to other repositories. See SUSE#663 Signed-off-by: Miquel Sabaté Solà <[email protected]>
A similar thing could have happened to us recently. We are using 2.0.3 and docker 1.9. All of a sudden we lost all our repositories and the whole database was wiped out. Unfortunately cannot provide more debugging info at this stage but I guess the merge above did not (fully) fix the problem. What would be the best way to turn debugging for crono? Also I have found that crono is performing quite slow. We have under 100 repositories with probably 15-20 tags each and it takes about 7 minutes to go through the catalogue job. Is there anything that can be done to improve on that? |
What version of the registry are you using ?
Crono uses the log level as for Portus itself. So, if you are in development mode, then it follows the
This is something that we should investigate. Maybe Portus is to blame, maybe the registry (e.g. slow backend), etc. |
Closing in favor of #1599. |
I have Portus running with the webhook working correctly, and API account created. Authentication in registry 2.1 is passed on to Portus which uses LDAP.
When the crono Catalogue synch job runs, it removes all the repositories from the database.
The synch job used to work, until another user logged in, created a group, and a private repository.
Following logs, I can see that what is happening is this:
{"repositories":["registry","sis/rea","sshi052/janitor","sshipway/minecraft-server","sshipway/portus","ubuntu"]}
{"errors":[{"code":"NAME_UNKNOWN","message":"repository name not known to registry","detail":{"name":"sis/rea"}}]}
This seems to have two big problems...
The text was updated successfully, but these errors were encountered: