-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal users added by gerrit-create-user.sh won't be effective until the restart #4
Comments
Did you set the full name? |
How do you run this scripts? Via nohup, or one after another? Sounds like race condition |
Yes, it's a nohup. |
After the restart, the full name of the Jenkins user can be showed correctly. |
Could you try to do this without nohup, but with awaiting in place. Just one after another, to exclude any race conditions. Also it might be great idea to put scripts with leading numbers like:
Also problem could be in the location of the scripts execution. I've slightly modified my copy of entrypoint.sh
And Dockerfile
This way I'm convinced that some of the scripts had run before, and other part are after Gerrit startup. |
To add a leading number is a good idea. I will give it a try tomorrow. |
Logs show that user jenkins are added successfully but the exists check after that failed.
Login to the Gerrit as the admin and check the users in the Non-Interactive Group shows an Anonymous Coward instead of a jenkins user has alread been added in the group.
Exec a command like below in the container echoes a 404 as the return code.
curl --output /dev/null --silent --write-out "%{http_code}" "http://localhost:8080/gerrit/accounts/jenkins"
Try to reindex the accounts by using the command below gives an exception shows a write lock.
su-exec ${GERRIT_USER} java ${JAVA_OPTIONS} ${JAVA_MEM_OPTIONS} -jar "${GERRIT_WAR}" reindex --verbose --index accounts -d "${GERRIT_SITE}"
This issue only happens in 2.14.x. The 2.13.x looks good.
The text was updated successfully, but these errors were encountered: