Page MenuHomePhabricator

"No Phabricator accounts found for tool maintainers." while creating the a new diffusion repository
Closed, ResolvedPublic

Description

Reported on irc.

[15:14]  <    yasha>	I am facing trouble creating repository for my tool at TOOLFORGE. It says no phabricator account found for tool maintainer whereas i have updated my account details.
[15:14]  <    yasha>	Please help.
[15:15]  <    bd808>	yasha: the first thing I would recommend is logging out of toolsadmin and then logging back in
[15:15]  <    bd808>	there is a bug with caching that may be fixed by that
[15:16]  <    yasha>	alright! m trying it out
[15:18]  <    yasha>	bd808: It still says the same error.. :(
[15:20]  <    yasha>	exact error is- "No Phabricator accounts found for tool maintainers." while creating the a new diffusion repository
[15:20]  <    yasha>	though my toolforge account is well linked with phabricator account 
[15:22]  <    bd808>	yasha: hmm... which tool? I can peek into the database
[15:25]  <    yasha>	bd808: tool's name is devyasha (tools.devyasha)
[15:25]  <    yasha>	maintainer-  Yashasingh

Workaround: Link your Phabricator and LDAP account directly (Phabricator Settings > External Accounts > LDAP).

Event Timeline

bd808 created this task.Sep 20 2017, 3:54 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 20 2017, 3:54 PM
bd808 added a comment.Sep 20 2017, 4:07 PM

One thing I see at https://toolsadmin.wikimedia.org/tools/id/devyasha is that the tool is a maintainer of itself. I'm not sure if this is the root cause of the problem or not. That's probably a code path that has not been well tested in Striker.

bd808 added a comment.Sep 20 2017, 4:13 PM

@Yashasingh I removed the tool from being a maintainer of itself. That is not needed for any operations. Please try to create a diffusion repo again and report back here if that works or not.

@bd808 I tried opening in incognito window too. The problem persists . I'm attaching the screenshot .

bd808 added a comment.Sep 20 2017, 7:14 PM

Just to check and see if repo creation was broken universally, I created https://toolsadmin.wikimedia.org/tools/id/bd808-test/repos/id/tool-bd808-test which did work as expected. Not directly helpful for @Yashasingh's tool but a useful data point.

Alright sir , I'll recheck to find out , if there's some fault , from my side.

bd808 added a comment.Sep 20 2017, 7:48 PM

Alright sir , I'll recheck to find out , if there's some fault , from my side.

I think the error is probably in Striker somewhere. I just haven't been able to figure out where yet. The only log message I see related to this is:

2017-09-20T16:47:19Z [ae52b682397641a582af6fb62b8c16ac] striker.phabricator WARNING: Unknown or missing ldap names: Yashasingh

That is not an unexpected warning as your Phabricator account is not directly attached to your LDAP account. When I do a manual lookup of your Phabricator account based on your Wiki account (SUL) it matches. Striker is supposed to look up using both methods, merge the lists, and then use those results when creating the repository. The message from your screenshot indicates that something is going wrong in that process.

I'll try logging out from all my accounts and then logging in back . I'll try possible ways to link all my accounts with same user handles .

Thank you for your support. I found that my phabricator account was linked with mediawiki account but not via LDAP account.
I resolved the issue by linking phabricator account with LDAP account.

bd808 added a comment.Sep 21 2017, 4:03 AM

I resolved the issue by linking phabricator account with LDAP account.

This is definitely a bug in Striker that should be corrected. Thanks for the report and helping narrow down the problem.

Yes , that is probable (bug in Striker) & Welcome !

bd808 moved this task from Backlog to Ready on the Striker board.Oct 4 2017, 11:37 PM

I have tried the workaround and am still having this problem. My Phabricator account is linked to both my LDAP account and my Mediawiki account but I am still getting this error.

Change 483679 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[labs/striker@master] Lookup repo maintainers by both LDAP and SUL names

https://gerrit.wikimedia.org/r/483679

bd808 moved this task from Ready to Doing on the Striker board.Jan 11 2019, 6:01 AM

Change 483679 merged by jenkins-bot:
[labs/striker@master] Lookup repo maintainers by both LDAP and SUL names

https://gerrit.wikimedia.org/r/483679

Change 498258 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[labs/striker/deploy@master] Upgrade to Django 2.1 and other small improvments

https://gerrit.wikimedia.org/r/498258

Change 498258 merged by jenkins-bot:
[labs/striker/deploy@master] Upgrade to Django 2.1 and other small improvments

https://gerrit.wikimedia.org/r/498258

Mentioned in SAL (#wikimedia-operations) [2019-03-22T00:34:41Z] <bd808@deploy1001> Started deploy [striker/deploy@c4726e3]: Django upgrade and various bug fixes (T192487, T182142, T176325, T217932)

Mentioned in SAL (#wikimedia-operations) [2019-03-22T00:35:56Z] <bd808@deploy1001> Finished deploy [striker/deploy@c4726e3]: Django upgrade and various bug fixes (T192487, T182142, T176325, T217932) (duration: 01m 15s)

bd808 closed this task as Resolved.Mar 22 2019, 1:46 AM
bd808 claimed this task.

I don't understand any of this, but it still isn't working.

Error

Our servers are currently under maintenance or experiencing a technical problem. Please try again in a few minutes.

See the error message at the bottom of this page for more information.

f you report this error to the Wikimedia System Administrators, please include the details below.

Request from 130.56.18.21 via cp1089 cp1089, Varnish XID 368869878
Error: 503, Backend fetch failed at Tue, 26 Mar 2019 03:10:12 GMT

Peachey88 updated the task description. (Show Details)Mar 26 2019, 10:27 AM
bd808 reopened this task as Open.Mar 27 2019, 12:03 AM
[2019-03-26T03:09:56] @cee: {"message": "Unknown or missing ldap names: Ross Mallett", "type": "striker", "host": "labweb1002", "level": "WARNING", "path": "./striker/phabricator.py", "stack_info": null, "@version": "1", "tags": [], "logger_name": "striker.phabricator", "@timestamp": "2019-03-26T03:09:56.458Z"}
[2019-03-26T03:09:56] Traceback (most recent call last):
[2019-03-26T03:09:56]   File "/srv/deployment/striker/venv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
[2019-03-26T03:09:56]     response = get_response(request)
[2019-03-26T03:09:56]   File "/srv/deployment/striker/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 126, in _get_response
[2019-03-26T03:09:56]     response = self.process_exception_by_middleware(e, request)
[2019-03-26T03:09:56]   File "/srv/deployment/striker/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 124, in _get_response
[2019-03-26T03:09:56]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[2019-03-26T03:09:56]   File "/srv/deployment/striker/venv/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
[2019-03-26T03:09:56]     return view_func(request, *args, **kwargs)
[2019-03-26T03:09:56]   File "./striker/tools/views/decorators.py", line 48, in decorated
[2019-03-26T03:09:56]     return f(*args, **kwargs)
[2019-03-26T03:09:56]   File "./striker/tools/views/repo.py", line 71, in create
[2019-03-26T03:09:56]     phab_maintainers += [
[2019-03-26T03:09:56] UnboundLocalError: local variable 'phab_maintainers' referenced before assignment

Change 499366 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[labs/striker@master] Ensure phab_maintainers is in tools.views.repo.create

https://gerrit.wikimedia.org/r/499366

Change 499366 merged by jenkins-bot:
[labs/striker@master] Ensure phab_maintainers is in tools.views.repo.create

https://gerrit.wikimedia.org/r/499366

Change 499882 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[labs/striker/deploy@master] Bump Striker submodule

https://gerrit.wikimedia.org/r/499882

Change 499882 merged by jenkins-bot:
[labs/striker/deploy@master] Bump Striker submodule

https://gerrit.wikimedia.org/r/499882

Mentioned in SAL (#wikimedia-operations) [2019-03-28T22:12:04Z] <bd808@deploy1001> Started deploy [striker/deploy@2f62c43]: Fixes for error pages and repo creation (T176325)

Mentioned in SAL (#wikimedia-operations) [2019-03-28T22:13:03Z] <bd808@deploy1001> Finished deploy [striker/deploy@2f62c43]: Fixes for error pages and repo creation (T176325) (duration: 00m 59s)

I don't understand any of this, but it still isn't working.

@Hawkeye7 I think I have fixed this bug for real this time (famous last words). Could you retry your git repo creation to help me verify the fix?

Repo created okay.

I get a 403 error when I try to git push. Will have to investigate that further.

bd808 added a comment.Apr 2 2019, 11:10 PM

Repo created okay.
I get a 403 error when I try to git push. Will have to investigate that further.

What is the repo? I can at least take a look to see if it has the configuration I would expect.

One thing that may not be completely clear about using Diffusion repos is that to access them over ssh you need to upload an ssh key here in Phabricator. This is separate from the ssh key(s) you use to connect to Toolforge bastions and also separate from the ssh key(s) you may use to interact with Gerrit.

It is tool-milhistbot.

I think you will find it looking good, but empty. I'm certain that your change is good.

I haven't uploaded an ssh key. I will have to locate some "how-to" documentation. If you could point me to it, that would be good. I have been at this point for a year.

bd808 closed this task as Resolved.Apr 4 2019, 3:50 AM

It is tool-milhistbot.
I think you will find it looking good, but empty. I'm certain that your change is good.

The configuration for the repo does look ok. It is configured to allow @Hawkeye7 to push to the repo and manage all settings.

I haven't uploaded an ssh key. I will have to locate some "how-to" documentation. If you could point me to it, that would be good. I have been at this point for a year.

I don't think we have a user guide for using Diffusion as a git client. The docs at https://www.mediawiki.org/wiki/Diffusion and upstream seem to be about repo creation and management, but not use.

Adding an ssh key is done at SettingsSSH Public Keys.

I tried adding an ssh key here on Phabricator with settings -> SSH Public Keys.

It had no effect:

rmallett@tools-sgebastion-07:~/tool-milhistbot$ git push
Username for 'https://phabricator.wikimedia.org': Hawkeye7
Password for 'https://Hawkeye7@phabricator.wikimedia.org':
fatal: unable to access 'https://phabricator.wikimedia.org/source/tool-milhistbot.git/': The requested URL returned error: 403

My desktop machine doesn't prompt for the userid/password, but goes straight to the 403 error.

Clearly, I don't have access to the repository. I don't understand what the ssh key does, or why it is required. It can't be validated in any way since there is no private key.

bd808 added a comment.Apr 4 2019, 6:02 AM

I tried adding an ssh key here on Phabricator with settings -> SSH Public Keys.
It had no effect:
rmallett@tools-sgebastion-07:~/tool-milhistbot$ git push
Username for 'https://phabricator.wikimedia.org': Hawkeye7
Password for 'https://Hawkeye7@phabricator.wikimedia.org':
fatal: unable to access 'https://phabricator.wikimedia.org/source/tool-milhistbot.git/': The requested URL returned error: 403

You cloned over https rather than ssh, so the ssh key is not used. Password based authentication is used for https access. The password used however is not your developer account password or your Wikimedia account password. It is instead a password you setup at SettingsVCS Password. This is similar to the way that password based authentication works for Gerrit.

My desktop machine doesn't prompt for the userid/password, but goes straight to the 403 error.

That sounds like a client configuration error of some sort. Maybe some web seraches can help you figure that out?

Clearly, I don't have access to the repository. I don't understand what the ssh key does, or why it is required. It can't be validated in any way since there is no private key.

For ssh public key authentication, the private key exists on your client computer and is never directly shared with the remote server. Instead it is used to sign cryptographic challenges to prove ownership of the matching private key which has already been shared with Phabricator. This all only comes into use however when you clone the git repo using the ssh://vcs@git-ssh.wikimedia.org/source/... URL for the repo.

Thanks for your assistance. Much appreciated. I tried the ssh initially, but it did not work. Now that the ssh key and VCS password are set, it works!