Issue 2461: Single project name disappers from list after upgrade to 2.8.x
Status:  New
Owner: ----
Reported by mjanulew...@jawbone.com, Feb 7, 2014

Affected Version: 2.8, 2.8.1

What steps will reproduce the problem?
1. Upgrade gerrit 2.5 to 2.8 or 2.8.1.
2. Go to project list (or ls-projects)
3.

What is the expected output? What do you see instead?

I expect to see all projects listed, but one is missing.


Please provide any additional information below.

The only weird thing I see is that the repo's path does not have '.git' at the end: 

# ls -l /var/users/gerrit/review_site/git/
total 40
drwxr-xr-x  7 gerrit gerrit 4096 Nov 14  2012 All-Projects.git
drwxr-xr-x  7 gerrit gerrit 4096 Dec 13 10:36 auth.git
drwxr-xr-x 17 gerrit gerrit 4096 Feb  7 13:16 audio
drwxr-xr-x  6 gerrit gerrit 4096 Jan  8  2013 gerrit-hooks.git
drwxr-xr-x  7 gerrit gerrit 4096 Dec 12  2012 jackson-test.git
drwxr-xr-x  7 gerrit gerrit 4096 Dec 10  2012 monkey.git

We're talking about the 'audio' project. In gerrit 2.5, 2.6 and 2.7 the project shows up and functions like any other project.

After upgrading to 2.8, that project disappears from the list in the web interface as well as ls-projects, though it still functions as normal. I can go to http://gerrit/#/admin/projects/audio and it's there. Permissions are correct. I can clone/push/review. All previous review records are there, it's just not showing up on the list. Minor thing, but annoying to a lot of people.

I can also do other things with the project and it works. So it just looks like it's missing from any project listings.

$ ssh -p 29418 gerrit-test gerrit gc audio
collecting garbage for "audio":
Pack refs:              100% (3594/3594)
Counting objects:       41784
Finding sources:        100% (41784/41784)
Getting sizes:          100% (12468/12468)
Compressing objects:    100% (6769258/6769258)
Writing objects:        100% (41784/41784)
Selecting commits:      4303
Selecting commits:      100% (4303/4303)
Building bitmaps:       100% (212/212)
Counting objects:       18754
Finding sources:        100% (18754/18754)
Getting sizes:          100% (11582/11582)
Compressing objects:     99% (28296/28303)
Writing objects:        100% (18754/18754)
Prune loose objects also found in pack files: 100% (258/258)
Prune loose, unreferenced objects: 100% (258/258)
done.

$ ssh -p 29418 gerrit-test gerrit ls-projects
auth
gerrit-hooks
jackson-test
monkey

And then this looks interesting:

$ ssh -p 29418 gerrit-test gerrit create-project audio
fatal: Cannot create audio because the name is already occupied by another project. The other project has the same name, only spelled in a different case.
$ ssh -p 29418 gerrit-test gerrit create-project Audio
$ ssh -p 29418 gerrit-test gerrit ls-projects
Audio
auth
gerrit-hooks
jackson-test
monkey

Nothing interesting shows up in the error log. I'm at a loss for how to correct this or even troubleshoot it since it works fine in versions prior to 2.8. It doesn't look like there are any special character, spaces, etc in the project or repo directory name. And note that we are running behind a Apache server but I have set "AllowEncodedSlashes On" and nocanon. In any case, if I stop Apache and connect straight through to gerrit I get the same results.
Feb 12, 2014
#1 parlane
I can confirm this issue as we just upgraded our test gerrit from 2.5 to 2.8.1 and lost a single project (out of 2 non-defaults) also.
Feb 12, 2014
#2 parlane
 mjanulew, I have fixed our problems.

Basically under out git repo directory for gerrit we had:

repo/
  thing/
    stuff
    stuff2
    .git

We changed it to be

repo/
  thing

Where thing was the old .git directory.

It turns out someone had used a git clone instead of the default git repo for serving.
 
Feb 13, 2014
#3 mjanulew...@jawbone.com
Awesome, this is exactly what was going on. I didn't originally set this up, but we did have a .git directory inside the missing repo directory. I moved everything in .git up one level, restarted gerrit, and the project is functioning as normal.

Weird that gerrit 2.5, 2.6 and 2.7 didn't care, but suddenly 2.8 didn't like it.