hiya list -
I had a situation on my gerrit 3.3.2 server where the same username got created with two different casing conventions (due to a mistake I made when trying to manually create the user), which then caused lots of problems when the actual person was trying to get in via oauth with github. so I was actually able to solve that problem, not without some side effects, by both removing the entries for both usernames from All-Users refs/meta/external-ids as well as deleting the ref for the user in general in refs/users/XY/userid .
this then has the effect that the users are mostly gone, the more troublesome one 1000235 pictured below:
ssh -p 29418 username@gerritserver admin-console show-account 1000235
No accounts found for your query: "1000235" Tip: Try double-escaping spaces, for example: "show-account Last,\\ First"
although there is still a ghost of that number in the user list (where is it still coming from?):
ssh -p 29418 username@gerritserver admin-console ls-users | grep 1000235
1000235 | | | | inactive
but even though the number is still floating around, all the identifying usernames/emails were gone from it and the person was able to create a new account w/ the username (that matches what's on github) and their email address.
so initial problem solved, but this user id still floats around in the system. After that, one of the groups still had the user id stuck in there, showing up as "Name of user not set", which I could not change or move in any way, because the user id pointed to a non-existent record. Once again I was able to go into All-Users, get the refs for the group file, remove the user id from the group file manually, push and flush caches, and it worked. Whew!
So what's left? The user is still stuck as a reviewer on a single review. This data does not seem to be in the notedb system, I would gather it's in /var/gerrit/db/account_patch_reviews.h2.db .
question one: why is this user id still showing up in ls-users ? caches have been flushed and all that. I have zapped this user id from everywhere I can find, gerrit tools can't work with the user id at all and mostly show it as deleted, but where is it still coming from ?
question two: is account_patch_reviews.h2.db the file where the user ids of reviewers for reviews are? i can't see anywhere else this information might be.
question three: i thought everything is supposed to be in notedb now, is there a way to migrate that?
question four: how do i work w/ that h2 file, I downloaded the h2 console tools (this thing: http://www.h2database.com/html/tutorial.html#shell_tool) and I can query it like a database (I'm very well versed in SQL and can get rid of this user id if I can see the tables), but i dont know the username/password, so when i log in as "blank user /password", I can only see the information_schema tables. I dont see any tables that look like they are related to gerrit. im not sure if this is because i didnt log in as a certain user or what. There is a "[database] password" in my secrets.config file, not sure if that's what's used here, but if it is, then what is the username? all forms of "gerrit" etc. w that password I get user/password error. Google tells me there is a "gsql" tool but it looks like this is a remnant of the 2.x days as there does not seem to be any such command now.
I understand that I wasn't supposed to be messing with my datafiles but the lack of a simple "please delete this user account completely" feature is really problematic as I got into a situation where someone could not create / log in with their github account (we use github oauth) at all due to the presence of two usernames that were the same except for casing.
thanks for anyone who has the resources to chime in.