Grrrit signing in problems

139 views
Skip to first unread message

thomasmu...@yahoo.com

unread,
Jun 28, 2017, 4:55:00 AM6/28/17
to Repo and Gerrit Discussion
Hi, one of our users cannot sign in due to this error

Cannot assign user name "maurelio" to account 5000; name already in use.

Looking at the db it shows this

gerrit> select * from accounts where full_name = 'MarcoAurelio';
registered_on | full_name | preferred_email | inactive | account_id
----------------------+--------------+--------------------+----------+-----------
2016-07-25 01:42:27.0 | MarcoAurelio | stri...@gmail.com | N | 787
(1 row; 8 ms)

gerrit> select * from account_external_ids where account_id = 787;
account_id | email_address | password | external_id
-----------+---------------+----------+------------------
787 | NULL | NULL | username:maurelio
(1 row; 1 ms)

Which is missing one entry.

This happened after we reindexed gerrit because someone else in a different thread said doing offline reindezing of the accounts fixed there external id problem. But they were using 2.14 and we use 2.13.

Currently no one else has reported this problem downstream.

See our downstream task https://phabricator.wikimedia.org/T152640 (Which has old details from the problem in December but chad merged https://phabricator.wikimedia.org/T168707 into there)

Edwin Kempin

unread,
Jun 28, 2017, 5:00:12 AM6/28/17
to Paladox none, Repo and Gerrit Discussion
On Wed, Jun 28, 2017 at 10:55 AM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Hi, one of our users cannot sign in due to this error

Cannot assign user name "maurelio" to account 5000; name already in use.

Looking at the db it shows this

gerrit> select * from accounts where full_name = 'MarcoAurelio';
 registered_on         | full_name    | preferred_email    | inactive | account_id
 ----------------------+--------------+--------------------+----------+-----------
 2016-07-25 01:42:27.0 | MarcoAurelio | stri...@gmail.com | N        | 787
(1 row; 8 ms)

gerrit> select * from account_external_ids where account_id = 787;
 account_id | email_address | password | external_id
 -----------+---------------+----------+------------------
 787        | NULL          | NULL     | username:maurelio
(1 row; 1 ms)

Which is missing one entry.
Just create the missing entry and see if this fixes the problem?
 

This happened after we reindexed gerrit because someone else in a different thread said doing offline reindezing of the accounts fixed there external id problem. But they were using 2.14 and we use 2.13.
I'm pretty sure this issue has nothing to do with reindexing.
 

Currently no one else has reported this problem downstream.

See our downstream task https://phabricator.wikimedia.org/T152640 (Which has old details from the problem in December but chad merged https://phabricator.wikimedia.org/T168707 into there)

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

thomasmu...@yahoo.com

unread,
Jun 28, 2017, 5:06:59 AM6/28/17
to Repo and Gerrit Discussion
Yep will see if chad did the missing entry.

Also the problem started just after we did a reindex. The account was working before we reindexed.

Edwin Kempin

unread,
Jun 28, 2017, 5:15:24 AM6/28/17
to Paladox none, Repo and Gerrit Discussion
On Wed, Jun 28, 2017 at 11:06 AM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Yep will see if chad did the missing entry.

Also the problem started just after we did a reindex. The account was working before we  reindexed.
I very much doubt this. 
Reindex doesn't touch the database and hence it didn't remove this ID.
This means this ID was already missing before reindex and without the gerrit ID a login to the web UI is not possible.

Only SSH access is possible with this account, but this should still work.

thomasmu...@yahoo.com

unread,
Jun 28, 2017, 6:01:01 AM6/28/17
to Repo and Gerrit Discussion, thomasmu...@yahoo.com
Hmm, strange the user said that it worked before the reindex happened but stop working after.

On Wednesday, June 28, 2017 at 10:15:24 AM UTC+1, Edwin Kempin wrote:
On Wed, Jun 28, 2017 at 11:06 AM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Yep will see if chad did the missing entry.

Also the problem started just after we did a reindex. The account was working before we  reindexed.
I very much doubt this. 
Reindex doesn't touch the database and hence it didn't remove this ID.
This means this ID was already missing before reindex and without the gerrit ID a login to the web UI is not possible.

Only SSH access is possible with this account, but this should still work.
 

--
--
To unsubscribe, email repo-discuss...@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

Luca Milanesio

unread,
Jun 28, 2017, 6:25:09 AM6/28/17
to thomasmu...@yahoo.com, Repo and Gerrit Discussion
*IF* the record on the DB was there, was reindex but then *vanished* after the reindex ... then it is possible that a fresh reindex showed the underlying problem.

I recall there was a bug in the LDAP authentication a while ago where some of the external ids were deleted, and it was fixed a few months ago.
Could have been a "long leg" of data inconsistency coming from that event?

However, you guys should fix your external ids on the DB, otherwise you may have unexpected problems at login time.

Luca.

thomasmu...@yahoo.com

unread,
Jul 7, 2017, 1:50:32 PM7/7/17
to Repo and Gerrit Discussion
Yep, though it's strange that reindexing removes it from the db. shoulden't it be the opposite, the db removing or adding entrys to the index?

Edwin Kempin

unread,
Jul 10, 2017, 2:11:02 AM7/10/17
to Paladox none, Repo and Gerrit Discussion
On Fri, Jul 7, 2017 at 7:50 PM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Yep, though it's strange that reindexing removes it from the db.
If you claim this, can you point us to the code where this is happening?
 

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.

thomasmu...@yahoo.com

unread,
Jul 10, 2017, 7:39:38 AM7/10/17
to Repo and Gerrit Discussion
I am not sure where in the code it is doing this, but shoulden't this https://github.com/GerritCodeReview/gerrit/commit/352be569f969c9cd16032c911365882779c22ce4 and https://github.com/GerritCodeReview/gerrit/commit/8f83bbbb27730112d2edeb9aa03c70d12ebdc62e prevent this?

I guess we are hitting cases from where a user has been inactive so they didnt notice the problem until recently. Sorry to have pointed to something that was most likly not the cause.

On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

Edwin Kempin

unread,
Jul 10, 2017, 7:55:32 AM7/10/17
to Paladox none, Repo and Gerrit Discussion
On Mon, Jul 10, 2017 at 1:39 PM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
No these have nothing to do with running the reindex program.
Reindex is a standalone program which doesn't even use AccountManager.
 

I guess we are hitting cases from where a user has been inactive so they didnt notice the problem until recently. Sorry to have pointed to something that was most likly not the cause.
I still don't believe that running the reindex program is ever deleting anything from ReviewDb.
If you say it does, please try to find the code where this deletion is happening.

 

On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:
Hi, one of our users cannot sign in due to this error

Cannot assign user name "maurelio" to account 5000; name already in use.

Looking at the db it shows this

gerrit> select * from accounts where full_name = 'MarcoAurelio';
 registered_on         | full_name    | preferred_email    | inactive | account_id
 ----------------------+--------------+--------------------+----------+-----------
 2016-07-25 01:42:27.0 | MarcoAurelio | stri...@gmail.com | N        | 787
(1 row; 8 ms)

gerrit> select * from account_external_ids where account_id = 787;
 account_id | email_address | password | external_id
 -----------+---------------+----------+------------------
 787        | NULL          | NULL     | username:maurelio
(1 row; 1 ms)

Which is missing one entry.

This happened after we reindexed gerrit because someone else in a different thread said doing offline reindezing of the accounts fixed there external id problem. But they were using 2.14 and we use 2.13.

Currently no one else has reported this problem downstream.

See our downstream task https://phabricator.wikimedia.org/T152640 (Which has old details from the problem in December but chad merged https://phabricator.wikimedia.org/T168707 into there)

--

thomasmu...@yahoo.com

unread,
Jul 24, 2017, 4:38:10 PM7/24/17
to Repo and Gerrit Discussion
Hi, the problem has come back. This time we found both entry's to be there ie there was no missing entry for gerrit:. We do not know why the user is getting this error 

Cannot assign user name "reception123" to account 5120; name already in use.
Cannot assign user name "reception123" to account 5122; name already in use.

See https://phabricator.wikimedia.org/T152640#3467159

(though this is not like the other users where they had a missing entry, this user has an entry + the user was for a period inactive with the account for a few months though. (by inactive i meant did not use the account)

On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

thomasmu...@yahoo.com

unread,
Jul 24, 2017, 6:33:26 PM7/24/17
to Repo and Gerrit Discussion
I think chad is going to try to delete the external id and the account without lossing the users history and try to recreate the account. Also i think a warnning needs to go on the 2.13 release stating it's broken with ldap, please use 2.14 instead. We belive it's fixed in 2.14 but not really sure.


On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

Edwin Kempin

unread,
Jul 25, 2017, 2:09:30 AM7/25/17
to Paladox none, Repo and Gerrit Discussion
On Mon, Jul 24, 2017 at 10:38 PM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Hi, the problem has come back. This time we found both entry's to be there ie there was no missing entry for gerrit:

Can you please post the external ID entries of this user?
 
. We do not know why the user is getting this error 

Cannot assign user name "reception123" to account 5120; name already in use.
Cannot assign user name "reception123" to account 5122; name already in use.

 
What is the Gerrit version you are using now?
 

(though this is not like the other users where they had a missing entry, this user has an entry + the user was for a period inactive with the account for a few months though. (by inactive i meant did not use the account)

On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:
Hi, one of our users cannot sign in due to this error

Cannot assign user name "maurelio" to account 5000; name already in use.

Looking at the db it shows this

gerrit> select * from accounts where full_name = 'MarcoAurelio';
 registered_on         | full_name    | preferred_email    | inactive | account_id
 ----------------------+--------------+--------------------+----------+-----------
 2016-07-25 01:42:27.0 | MarcoAurelio | stri...@gmail.com | N        | 787
(1 row; 8 ms)

gerrit> select * from account_external_ids where account_id = 787;
 account_id | email_address | password | external_id
 -----------+---------------+----------+------------------
 787        | NULL          | NULL     | username:maurelio
(1 row; 1 ms)

Which is missing one entry.

This happened after we reindexed gerrit because someone else in a different thread said doing offline reindezing of the accounts fixed there external id problem. But they were using 2.14 and we use 2.13.

Currently no one else has reported this problem downstream.

See our downstream task https://phabricator.wikimedia.org/T152640 (Which has old details from the problem in December but chad merged https://phabricator.wikimedia.org/T168707 into there)

--

thomasmu...@yahoo.com

unread,
Jul 25, 2017, 12:55:13 PM7/25/17
to Repo and Gerrit Discussion
We are still on 2.13.8 (basically 2.13.9 since we built from the stable-2.13 branch, we also cherry picked luca patch which was abandoned on 2.13. Without it, it broke alot of accounts, https://gerrit-review.googlesource.com/#/c/92830/

I've asked chad for the entrys from the table. I am hopping i will have the info soon :)


On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

thomasmu...@yahoo.com

unread,
Jul 25, 2017, 3:18:34 PM7/25/17
to Repo and Gerrit Discussion
Here's the entry's in the table for the user.

[20:17:15]  <+RainbowSprinkles>  3635       | <email redacted> | NULL     | mailto:<email redacted>

[20:17:15]  <+RainbowSprinkles>  3635       | NULL                             | NULL     | username:reception123


On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

thomasmu...@yahoo.com

unread,
Jul 25, 2017, 3:20:16 PM7/25/17
to Repo and Gerrit Discussion
Aha we found the problem after i pasted this, it was missing the gerrit: prefix. We presumed there was only two entry's.


On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

thomasmu...@yahoo.com

unread,
Jul 25, 2017, 3:27:46 PM7/25/17
to Repo and Gerrit Discussion
The issue has been fixed with the missing gerrit: added. 


On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

Edwin Kempin

unread,
Jul 26, 2017, 2:26:50 AM7/26/17
to Paladox none, Repo and Gerrit Discussion
Thanks for the update!

--

thomasmu...@yahoo.com

unread,
Jul 26, 2017, 6:42:03 AM7/26/17
to Repo and Gerrit Discussion
Your welcome and sorry for the noise again. We both believe our problems will be fixed with 2.14.2 :).

I've begun testing it in a test instance https://gerrit.git.wmflabs.org/r/ :)


On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

thomasmu...@yahoo.com

unread,
Jul 27, 2017, 11:16:27 AM7/27/17
to Repo and Gerrit Discussion
Happen to the same user again due to the user missing the gerrit: prefix again. After adding it do we have to do a reindex?


On Wednesday, June 28, 2017 at 9:55:00 AM UTC+1, thomasmu...@yahoo.com wrote:

Edwin Kempin

unread,
Jul 27, 2017, 11:40:33 AM7/27/17
to Paladox none, Repo and Gerrit Discussion
On Thu, Jul 27, 2017 at 5:16 PM, thomasmulhall410 via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Happen to the same user again due to the user missing the gerrit: prefix again. After adding it do we have to do a reindex?
Yes, this one account needs to be reindexed. You can do the reindex by the Index Account REST endpoint (https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#index-account).
 

--

thomasmu...@yahoo.com

unread,
Jul 27, 2017, 11:56:17 AM7/27/17
to Repo and Gerrit Discussion
Thanks. Yep, we have now done the reindex :). I've added the reminder here https://phabricator.wikimedia.org/T152640 on our task to make sure we re add the missing entry and do the reindex :)
Reply all
Reply to author
Forward
0 new messages