Page MenuHomeDevCentral

Rhyne-Wyse tries to login on test.wikipedia.org instead of agora.nasqueron.org
Closed, ResolvedPublic

Description

(venv) [rhyne-wyse@windriver /var/run/rhyne-wyse]$ update-agora-reports 
Logging in to wikipedia:test as Rhyne-Wyse
Traceback (most recent call last):
  File "/opt/rhyne-wyse/venv/lib/python3.11/site-packages/pywikibot/login.py", line 319, in login
    self.login_to_site()
  File "/opt/rhyne-wyse/venv/lib/python3.11/site-packages/pywikibot/login.py", line 517, in login_to_site
    raise pywikibot.exceptions.APIError(code=status, info=fail_reason)
pywikibot.exceptions.APIError: FAIL: Incorrect username or password entered.
Please try again.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/rhyne-wyse/venv/bin/update-agora-reports", line 41, in <module>
    run()
  File "/opt/rhyne-wyse/venv/bin/update-agora-reports", line 26, in run
    site = client.connect_to_site(global_config["wiki"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rhyne-wyse/venv/lib/python3.11/site-packages/rhyne_wyse/client.py", line 44, in connect_to_site
    manager.login()
  File "/opt/rhyne-wyse/venv/lib/python3.11/site-packages/pywikibot/login.py", line 326, in login
    raise NoUsernameError(error_msg)
pywikibot.exceptions.NoUsernameError: FAIL: Incorrect username or password entered.
Please try again.
CRITICAL: Exiting due to uncaught exception NoUsernameError: FAIL: Incorrect username or password entered.
Please try again.

Event Timeline

dereckson triaged this task as High priority.Sat, Feb 7, 17:30
dereckson created this task.

Deployment wasn't up-to-date and families configuration for Agora was missing, that's why fallback was on testwiki.

Complector - rOPS at c97fb8b474 (current origin/main)
$ salt windriver state.apply roles/reports/rhyne-wyse 
[...]
----------      
          ID: /var/run/rhyne-wyse/families/agora_family.py
    Function: file.managed
      Result: True
     Comment: File /var/run/rhyne-wyse/families/agora_family.py updated
     Started: 12:26:53.424974
    Duration: 172.55 ms
     Changes:           
              ----------  
              diff:
                  New file                                                                                             
              mode:
                  0664
              user:
                  rhyne-wyse
----------
          ID: /var/run/rhyne-wyse/user-config.py
    Function: file.managed
      Result: True
     Comment: File /var/run/rhyne-wyse/user-config.py updated
     Started: 12:26:53.601089
    Duration: 95.275 ms
     Changes:   
              ----------
              diff:
                  New file
              mode:
                  0644
              user:
                  rhyne-wyse
[...]

That solves that issue.

WindRiver
$ sudo -u rhyne-wyse bash
$ cd /var/run/rhyne-wyse
$ . /opt/rhyne-wyse/venv/bin/activate
$ update-agora-reports
Logging in to agora:agora as Rhyne-Wyse
[...]

Role can be improved because the expectation was this can be run automatically, or from an user for development, but either we need to add users in group rhyne-wyse, either we've to add rhyne-wyse in group nasquenautes (or adopt a proper flexible ACL framework?). That's independant of that issue.

dereckson claimed this task.