Cannot create a new project in Gerrit

Description

Trying to follow the instructions to create a new project here:
http://ovirt-infra-docs.readthedocs.io/en/latest/General/Creating_Gerrit_Projects.html

Yields the following error in the web UI regardless of the name entered:

Code Review - Error
400 invalid project name: foobar

Trying to do the same from the CLI with the following command:

ssh gerrit.ovirt.org -p 29418 gerrit create-project --empty-commit --owner foobar foobar

Also yields an error:

fatal: invalid project name: foobar

So far I haven't found anything in the logs to indicate why is this happening.

Activity

Show:

Former user July 16, 2017 at 12:40 PM

The folder has got its owner back to be root.
Tried to find the entity that changes it with no success. Tried cron jobs, init script and hooks.

Barak Korren August 17, 2016 at 1:54 PM

File permissions fixed by (Thanks!) on Gerrit server.

Barak Korren August 17, 2016 at 1:52 PM

Ok, with the local file permission change, adding a repo now worked.

Eyal Edri August 17, 2016 at 1:52 PM

The problem with Gerrit is that its not managed by puppet, so all changes
are done locally (for e.g the hooks for the projects that are under git dir.

We need to puppetize it soon and move all hooks and gerrit conf to
git/puppet in order to track all changes.
There is already a ticket opened on it, we'll need to prioritize it seeing
how critical gerrit is and how often we need to update hooks.

On Wed, Aug 17, 2016 at 4:45 PM, Marc Dequènes (Duck) (oVirt JIRA) <


Eyal Edri
Associate Manager
RHV DevOps
EMEA ENG Virtualization R&D
Red Hat Israel

phone: +972-9-7692018
irc: eedri (on #tlv #rhev-dev #rhev-integ)

Marc Dequènes (Duck) August 17, 2016 at 1:44 PM

I see nothing in history or Puppet rules explaining these wrong (altered at some point in time) permissions.

Marc Dequènes (Duck) August 17, 2016 at 1:11 PM

So this fails in createProject(), in repoManager.createRepository() IIUC (not a Java dev).

Nothing was created into /usr/local/src/git/, so this confirms it failed somehow.

  1. ls -ld /usr/local/src/git
    drwxr-xr-x. 86 root root 4096 Mar 18 22:34 /usr/local/src/git

I suppose this is the root of the problem. Fixed permissions, could you retry?

Marc Dequènes (Duck) August 17, 2016 at 12:29 PM

sshd_log says:
[2016-08-17 05:44:03,151 -0400] 8610a532 bkorren a/1000607 LOGIN FROM 82.81.161.50
[2016-08-17 05:44:03,596 0400] 8610a532 bkorren a/1000607 gerrit.create-project.empty-commit.-owner.infra-ansible.foobar 0ms 3ms 1
[2016-08-17 05:44:03,903 -0400] 8610a532 bkorren a/1000607 LOGOUT

nothing else in the logs, no error in error_log at this time.

Marc Dequènes (Duck) August 17, 2016 at 12:22 PM

Does not seem missing permissions as you suggested in your mail, or you would most probably have the same message I got:
Capability createProject is required to access this resource

Fixed

Details

Assignee

Reporter

Components

Priority

Created August 17, 2016 at 9:46 AM
Updated July 16, 2017 at 12:40 PM
Resolved August 17, 2016 at 1:54 PM