| Summary: | Can't pull from contactBaseData repositories anymore | ||
|---|---|---|---|
| Product: | Community | Reporter: | Simon Reis <simon.reis> |
| Component: | Git | Assignee: | Eclipse Webmaster <webmaster> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | denis.roy, frederic.gurr, jonas.tewolde, matthias.sohn |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| Whiteboard: | |||
|
Description
Simon Reis
Umlauts and special characters in branch names are causing issues again. Same thing happened in bug 564725. I'm in the process of cleaning it up. Hmmm, Gerrit is reporting "non-bare repository is not supported: git/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.xxxxxxx.git" for both repos. The filesystem permissions look ok, and I can clone them both on the Gerrit host via command line git and the file:/// URL. @Matthias, any suggestions here? Why would Gerrit think these repos are no longer 'bare'? -M. I've seen some of those repos have a checked-out branch, with an embedded .git repo. Gerrit doesn't want that. (In reply to Denis Roy from comment #3) > I've seen some of those repos have a checked-out branch, with an embedded > .git repo. Gerrit doesn't want that. But that is not the case here, and gc is performed just fine $ ssh -p 29418 [snip] gerrit gc --show-progress --aggressive openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend collecting garbage for "openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend": Pack refs: 100% (42/42) Counting objects: 3319 Finding sources: 100% (3319/3319) Getting sizes: 100% (1717/1717) Compressing objects: 100% (3490687/3490687) Writing objects: 100% (3319/3319) Selecting commits: 100% (210/210) Building bitmaps: 100% (121/121) Finding sources: 100% (23/23) Getting sizes: 100% (16/16) Compressing objects: 100% (5778/5778) Writing objects: 100% (23/23) Prune loose objects also found in pack files: 100% (2/2) Prune loose, unreferenced objects: 100% (2/2) done. Simon, when is the last time these repositories were known to work? (In reply to Frederic Gurr from comment #1) > Umlauts and special characters in branch names are causing issues again. > Same thing happened in bug 564725. > > I'm in the process of cleaning it up. For the record: I've cleaned up the following branches: * org.eclipse.openk-coremodules.contactBaseData.frontend.git - origin/KON-44-Synchronisation-Interne-Personen-mit-Auth&Auth-Modul => origin/KON-44-Synchronisation-Interne-Personen-mit-Auth_und_Auth-Modul - origin/KON_19-Kommunikationsdatenübersicht => origin/KON_19-Kommunikationsdatenuebersicht - origin/KON_18-Maske-Adresse-hinzufügen-bearbeiten-loeschen => origin/KON_18-Maske-Adresse-hinzufuegen-bearbeiten-loeschen * org.eclipse.openk-coremodules.contactBaseData.frontend.git - origin/KON-23-24-Maske-Ansprechpartnerübersicht => origin/KON-23-24-Maske-Ansprechpartneruebersicht - origin/KON-435-Person-automatisch-aus-einem-ausgewählten-LDAP-User-erstellen => origin/KON-435-Person-automatisch-aus-einem-ausgewaehlten-LDAP-User-erstellen This did not fix the checkout problem (completely) though. (In reply to Denis Roy from comment #5) > Simon, when is the last time these repositories were known to work? Difficult to say, I can only reference to what you already know: The last commit of one of our team members was on 2020-05-06: SI-879 UnitTests HEAD master SI-295_Guppen_Verteiler_anlegen DEVELOP (In reply to Frederic Gurr from comment #6) > (In reply to Frederic Gurr from comment #1) > > Umlauts and special characters in branch names are causing issues again. > > Same thing happened in bug 564725. > > > > I'm in the process of cleaning it up. > For the record: > > I've cleaned up the following branches: > * org.eclipse.openk-coremodules.contactBaseData.frontend.git > - origin/KON-44-Synchronisation-Interne-Personen-mit-Auth&Auth-Modul > => origin/KON-44-Synchronisation-Interne-Personen-mit-Auth_und_Auth-Modul > > - origin/KON_19-Kommunikationsdatenübersicht > => origin/KON_19-Kommunikationsdatenuebersicht > > - origin/KON_18-Maske-Adresse-hinzufügen-bearbeiten-loeschen > => origin/KON_18-Maske-Adresse-hinzufuegen-bearbeiten-loeschen > > * org.eclipse.openk-coremodules.contactBaseData.frontend.git > - origin/KON-23-24-Maske-Ansprechpartnerübersicht > => origin/KON-23-24-Maske-Ansprechpartneruebersicht > > > - > origin/KON-435-Person-automatisch-aus-einem-ausgewählten-LDAP-User-erstellen > => > origin/KON-435-Person-automatisch-aus-einem-ausgewaehlten-LDAP-User-erstellen > > This did not fix the checkout problem (completely) though. If there something we can do to help fixing this issue? (In reply to Eclipse Webmaster from comment #2) > @Matthias, any suggestions here? Why would Gerrit think these repos are no > longer 'bare'? @Matthias ping I tried cloning these repositories this one seems to be empty: $ git clone "https://msohn@git.eclipse.org/r/a/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.documentation" Cloning into 'org.eclipse.openk-coremodules.contactBaseData.documentation'... warning: You appear to have cloned an empty repository. and these two fail with 500 error status: $ git clone "https://msohn@git.eclipse.org/r/a/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend" Cloning into 'org.eclipse.openk-coremodules.contactBaseData.backend'... remote: Server Error fatal: unable to access 'https://git.eclipse.org/r/a/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend/': The requested URL returned error: 500 $ git clone "https://msohn@git.eclipse.org/r/a/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.frontend" Cloning into 'org.eclipse.openk-coremodules.contactBaseData.frontend'... remote: Server Error fatal: unable to access 'https://git.eclipse.org/r/a/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.frontend/': The requested URL returned error: 500 I have no access to the logs and the gerrit site, so it's hard to say what's going wrong. - check if these git repositories are considered to be bare: $ cd $gerrit_site_path/git/path/to/git/repo $ git rev-parse --is-bare-repository - check the repository for consistency: $ git fsck --full - check if all files are owned by the OS user running Gerrit. Non-Ascii letters in branches etc. should work if you have set locale to use unicode on the OS. Otherwise you will see errors like "java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters" If you set locale on OS level to use unicode e.g. LC_ALL=en_US.UTF-8 this should just work. Gerrit and JGit are implemented in Java and use UTF-8 everywhere. org.eclipse.openk-coremodules.contactBaseData.backend.git # sudo -u gerrit git rev-parse --is-bare-repository
false
org.eclipse.openk-coremodules.contactBaseData.backend.git # sudo -u gerrit git fsck --full
Checking object directories: 100% (256/256), done.
Checking objects: 100% (3342/3342), done.
org.eclipse.openk-coremodules.contactBaseData.backend.git #
The Gerrit log simply reports:
[2020-09-04T07:28:15.456-0400] [HTTP-118747] WARN org.eclipse.jetty.server.HttpChannel : /r/a/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend/info/refs
java.lang.IllegalArgumentException: non-bare repository is not supported: /home/data/git/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend.git
at com.google.gerrit.server.git.DelegateRepository.toBuilder(DelegateRepository.java:85)
(I've cut off the trace)
Based on a quick comparison to another repo that looks ok there did seem to be a missing info/refs file , so after a little digging I used "git update-server-info" to recreate it. Attempting to clone results in a slightly different error:
[2020-09-04T08:48:10.049-0400] [SSH git-upload-pack /openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend ] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error during git-upload-pack '/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend'
java.lang.IllegalArgumentException: non-bare repository is not supported: /home/data/git/openk-coremodules/org.eclipse.openk-coremodules.contactBaseData.backend.git
And as above git rev-parse still returns false. Any other suggestions?
-M.
Is the option core.bare = true [1] in the config file of these repositories ? The root directory of each repository should be named <reponame>.git and it should directly contain the structure you find in the .git folder of non-bare repositories which have a working tree where the HEAD version is checked out: -rw-r--r-- HEAD drwxr-xr-x branches -rw-r--r-- config -rw-r--r-- description drwxr-xr-x hooks drwxr-xr-x info drwxr-xr-x logs drwxr-xr-x objects -rw-r--r-- packed-refs drwxr-xr-x refs There should be no index file in this directory. The git index is only persisted in non-bare repositories since it caches meta data of the checked out files in the working tree which doesn't exist in a bare repository. [1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-corebare (In reply to Matthias Sohn from comment #12) > Is the option core.bare = true [1] in the config file of these repositories ? No, which does seem strange. I used "git config --bool core.bare true" on the backend repo so git rev-parse now reports true, but it's still not cloneable . org.eclipse.openk-coremodules.contactBaseData.backend.git # ls -Fla total 24 drwxrwsr-x 8 gerrit cvs 194 Sep 4 09:12 ./ drwxrwsr-x 9 gerrit cvs 4096 Sep 4 09:08 ../ -rwxrwxr-x 1 gerrit cvs 23 Dec 16 2019 HEAD* drwxrwsr-x 2 gerrit cvs 10 Dec 16 2019 branches/ -rwxrwxr-x 1 gerrit cvs 151 Sep 4 09:09 config* -rwxrwxr-x 1 gerrit cvs 73 Dec 16 2019 description* drwxrwsr-x 2 gerrit cvs 4096 Dec 16 2019 hooks/ drwxrwsr-x 2 gerrit cvs 45 Sep 4 08:46 info/ drwxrwsr-x 3 gerrit cvs 26 Dec 23 2019 logs/ drwxrwsr-x 4 gerrit cvs 42 Aug 31 08:37 objects/ -rw-r--r-- 1 gerrit cvs 3352 Aug 31 11:31 packed-refs drwxrwsr-x 7 gerrit cvs 95 Jan 7 2020 refs/ org.eclipse.openk-coremodules.contactBaseData.backend.git # Just for grins I removed the execute permissions on HEAD,config and description but that didn't make any difference. Does gerrit have a cache that may be holding state on the repo? -M. (In reply to Eclipse Webmaster from comment #13) > (In reply to Matthias Sohn from comment #12) > > Is the option core.bare = true [1] in the config file of these repositories ? > > No, which does seem strange. I used "git config --bool core.bare true" on > the backend repo so git rev-parse now reports true, but it's still not > cloneable . > > org.eclipse.openk-coremodules.contactBaseData.backend.git # ls -Fla > total 24 > drwxrwsr-x 8 gerrit cvs 194 Sep 4 09:12 ./ > drwxrwsr-x 9 gerrit cvs 4096 Sep 4 09:08 ../ > -rwxrwxr-x 1 gerrit cvs 23 Dec 16 2019 HEAD* > drwxrwsr-x 2 gerrit cvs 10 Dec 16 2019 branches/ > -rwxrwxr-x 1 gerrit cvs 151 Sep 4 09:09 config* > -rwxrwxr-x 1 gerrit cvs 73 Dec 16 2019 description* > drwxrwsr-x 2 gerrit cvs 4096 Dec 16 2019 hooks/ > drwxrwsr-x 2 gerrit cvs 45 Sep 4 08:46 info/ > drwxrwsr-x 3 gerrit cvs 26 Dec 23 2019 logs/ > drwxrwsr-x 4 gerrit cvs 42 Aug 31 08:37 objects/ > -rw-r--r-- 1 gerrit cvs 3352 Aug 31 11:31 packed-refs > drwxrwsr-x 7 gerrit cvs 95 Jan 7 2020 refs/ > org.eclipse.openk-coremodules.contactBaseData.backend.git # > > Just for grins I removed the execute permissions on HEAD,config and > description but that didn't make any difference. > > Does gerrit have a cache that may be holding state on the repo? > > -M. Gerrit has a lot of caches and jgit is also caching some state. Gerrit caches can be flushed [1] but not the jgit caches. Maybe you need to reindex [2] the project index. That shouldn't take very long. You can also online reindex only the affected projects using [3]. [1] https://git.eclipse.org/r/Documentation/cmd-flush-caches.html [2] https://git.eclipse.org/r/Documentation/pgm-reindex.html [3] https://git.eclipse.org/r/Documentation/rest-api-projects.html#index I was just able to clone the backend repo even though I haven't made any other changes since my last comment, so it looks like Gerrit was caching state for a period of time. I've updated the config file for the frontend repo, and issued a 'flush-caches', but that didn't seem to help. I tried to use the rest-api, but I'm getting 403s when trying to trigger the re-index of the project. -M. The frontend repo is now also cloneable, so I'm going to resolve this as 'fixed'. If this happens again we'll need to check if something is updating the configuration. -M. |