Hi, I've been running a (non-public) Pagure instance for a while and noticed a weird thing about how the repositories are being created. I think this is ultimately either an issue with how the *_FOLDER settings values are documented (and perhaps also how they're used) or I'm missing something crucial about configuration.
*_FOLDER
Here's what to put in Pagure config file to reproduce:
STORAGE_ROOT = '/var/pagure' DATA_ROOT = os.path.join(STORAGE_ROOT, 'pagure_data') GIT_FOLDER = os.path.join(DATA_ROOT, 'repos') DOCS_FOLDER = os.path.join(DATA_ROOT, 'docs') # tickets/requests and other folders are also set up to be under DATA_ROOT
It's also necessary to specify GL_REPO_BASE explicitly in gitolite.rc to be /var/pagure/pagure_data.
GL_REPO_BASE
gitolite.rc
/var/pagure/pagure_data
With the above config, when I create a repository test, two test.git repos actually get created - one in GIT_FOLDER and one in DATA_ROOT. The one in GIT_FOLDER gets created by Pagure worker and doesn't have gl-conf, the one under DATA_ROOT gets created by gitolite itself and has gl-conf. When I clone the repo from Pagure, I get the one created by gitolite and I can push there, but the pushed files are not displayed in Pagure web UI, as Pagure is looking at the repo under GIT_FOLDER, which didn't get the commits.
test
test.git
GIT_FOLDER
DATA_ROOT
gl-conf
The reason for this is that gitolite constructs paths to repos by joining GL_REPO_BASE and the repo <name> entry from gitolite.conf.
repo <name>
gitolite.conf
I haven't really noticed this for quite some time, since the problem in my prod instance was reversed - the repos themselves were fine, but all the docs, tickets and requests were duplicated, since I had pointed GL_REPO_BASE to GIT_FOLDER. This meant that I had docs/tickets/requests both under GIT_FOLDER (those were the one that gitolite knew about) and under DATA_ROOT (created by Pagure worker).
Assuming this is not a stupid mistake of mine, there are some implications that I think this has:
REPO_FOLDER
docs
tickets
requests
Thanks for reading through this and I hope this makes sense. I'll be glad to clarify if it doesn't.
Commit adea204d fixes this issue