Page MenuHomePhabricator

video2commons login is broken by the LE cert expiry (py2.7)
Closed, ResolvedPublicBUG REPORT


List of steps to reproduce (step by step, including full links if applicable):

What happens?:

Traceback (most recent call last): 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/flask/", line 1949, in full_dispatch_request rv = self.dispatch_request() 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/flask/", line 1935, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args)
File "/data/project/video2commons/www/python/src/../../../video2commons/frontend/", line 194, in loginredirect redirecturl, request_token = handshaker.initiate() 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/mwoauth/", line 89, in initiate user_agent=self.user_agent) 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/mwoauth/", line 91, in initiate headers={'User-Agent': user_agent}) 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/requests/", line 110, in post return request('post', url, data=data, json=json, **kwargs) 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/requests/", line 56, in request return session.request(method=method, url=url, **kwargs) 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/requests/", line 488, in request resp = self.send(prep, **send_kwargs) 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/requests/", line 609, in send r = adapter.send(request, **kwargs) 
File "/data/project/video2commons/www/python/venv/local/lib/python2.7/site-packages/requests/", line 497, in send raise SSLError(e, request=request) 
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581) 
# This file is used by Toolforge infrastructure.
# Please do not edit manually at this time.
# Thu Jul 30 21:26:38 2020
backend: kubernetes
distribution: debian
version: 4
web: python2

This is because video2commons is running on the python2.7 container, which has problems with T291387. Python 2.7 is also deprecated.

Event Timeline

Chicocvenancio triaged this task as Unbreak Now! priority.
Chicocvenancio added a subscriber: Chicocvenancio.

Investigating if any workaround while using python 2 is feasiable.

Mentioned in SAL (#wikimedia-cloud) [2021-10-03T18:35:02Z] <chicocvenancio> building python 2.7.18 to use in python 3.9 container T292355

Mentioned in SAL (#wikimedia-cloud) [2021-10-03T21:30:58Z] <bstorm> rebuilding buster containers since they are also affected T291387 T292355

Tagged this on my rebuilds in case the openssl library needed updating (bullseye fixes the issue either way, but in case you need to roll back to buster). The images are being pushed still, so don't test that rollback just yet if 3.9 doesn't work.

New buster images should be up now if you need to use that.

Video2commons still uses python 2. I could not get it to work in Toolforge. Will try to move the front-end to the vps project this week.

Chicocvenancio added subscribers: Andrew, Matanya.

Only @Matanya and @Andrew are admins in the vps project. On IRC it was mentioned porting video2commons frontend to python3 as an alternative to hosting the current python2 frontend in the project.

Mentioned in SAL (#wikimedia-cloud) [2021-10-11T13:58:54Z] <chicocvenancio> checking out PR#138 and running with python3.9 type T292355

Chicocvenancio claimed this task.
Chicocvenancio added a subscriber: LucasWerkmeister.

With @Andrew and @LucasWerkmeister helping we have ported the frontend to python3 and its running in toolforge. This particular error is gone. I do expect some other error to show up, please report it and we can try and deal with it.