Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certificates: nersc.gov, ornl.gov #79

Closed
ax3l opened this issue Aug 17, 2021 · 19 comments
Closed

Certificates: nersc.gov, ornl.gov #79

ax3l opened this issue Aug 17, 2021 · 19 comments

Comments

@ax3l
Copy link

ax3l commented Aug 17, 2021

Hi,

Using this action I have problems verifying nersc.gov and ornl.gov certificates in a standard Ubuntu-20.04 GH action instance:

HTTPSConnectionPool(host='docs-dev.nersc.gov', port=443): Max retries exceeded with url: /cgpu/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))
https://docs-dev.nersc.gov/cgpu/
HTTPSConnectionPool(host='www.olcf.ornl.gov', port=443): Max retries exceeded with url: /summit/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))
https://www.olcf.ornl.gov/summit/

Googling the interwebs, I think that we can fix this by also pre-installing certifi into the actions:

@vsoch
Copy link
Collaborator

vsoch commented Aug 17, 2021

hey @ax3l that's not an issue with the action, there is an SSL certificate error. You need to add those patterns to the whitelist patterns, which are defined in both the linters.yaml (with urlchecker) and the nightly task to clean jobs. Thanks!

@vsoch
Copy link
Collaborator

vsoch commented Aug 17, 2021

If you like I'll make a branch for you here to test that installs that dependency. Give me a sec.

@vsoch
Copy link
Collaborator

vsoch commented Aug 17, 2021

Here you go! https://github.com/urlstechie/urlchecker-action/tree/add/certifi Feel free to PR to that branch if you want to fuss around further. Thanks!

@ax3l
Copy link
Author

ax3l commented Aug 17, 2021

Thanks a lot!
I quickly built this out via

docker build -t url .

and run it via

docker run -t url -v "$(pwd)":/github/workspace -e INPUT_FILE_TYPES=".py,.cpp,.H,.rst,.md" --workdir /github/workspace --rm

But it does not seem to find my files in my PWD. Any other hints I need to pass into the container?

@ax3l
Copy link
Author

ax3l commented Aug 17, 2021

Oh..., I can try this branch in an action via uses: urlstechie/urlchecker-action@add/certifi 💡

@ax3l
Copy link
Author

ax3l commented Aug 18, 2021

I tried a couple further updates - down to even doing:

FROM quay.io/urlstechie/urlchecker:0.0.22
RUN apt-get update && \
    /bin/bash -c "install_packages ca-certificates && \
    source activate urlchecker && \
    which python && \
    which pip && \
    python -m pip install --upgrade pip && \
    python -m pip install --upgrade certifi requests && \
    python -c 'import certifi; print(certifi.where())'"
# prints: /opt/conda/lib/python3.8/site-packages/certifi/cacert.pem from certifi-2021.5.30

#ENV REQUESTS_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
COPY entrypoint.sh /entrypoint.sh
WORKDIR /github/workspace
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]

I think one problem might be that the base image bases on Debian 9 "stretch": https://www.debian.org/releases/stretch/

Debian 9 has been superseded by Debian 10 ("buster"). Security updates have been discontinued as of July 6th, 2020. 

Shall we just update to Debian 11 ("Bullseye")?
https://github.com/urlstechie/urlchecker-python/blob/08fc1bb93beaf1263701dc7c1e609a399bc7a32d/Dockerfile#L1

@vsoch
Copy link
Collaborator

vsoch commented Aug 18, 2021

I could try, we would want to do that anyway. Let me open a PR on that other repo and see if it still works. I might as well at certifi to that container base too.

@ax3l
Copy link
Author

ax3l commented Aug 18, 2021

Got it :) urlstechie/urlchecker-python#58

@vsoch
Copy link
Collaborator

vsoch commented Aug 18, 2021

see #80

@vsoch
Copy link
Collaborator

vsoch commented Aug 18, 2021

@ax3l I noticed from our discussion day that GitHub changed the UI for showing icons alongside comments - it's in a little nested bubble now instead of anchored to the bottom!

image

The weird thing is that I still have tabs open with the old format!

image

@ax3l
Copy link
Author

ax3l commented Aug 18, 2021 via email

@vsoch
Copy link
Collaborator

vsoch commented Aug 18, 2021

Ah, there we go!

It was still worth the work because we updated the container base! I'll leave this issue open so we can discuss again / re-test when the time comes, and I'll hold off releasing any 0.0.23 on pypi (since it's technically the same).

@ax3l
Copy link
Author

ax3l commented Aug 18, 2021

Alrighty!
I actually think you can merge & release this updated image if you like.

I'll keep my linked WarpX PR open and will report back if the issue stays once the tickets are resolved. No need to wait for those.

NERSC: INC0172063
OLCF: OLCFHELP-3254

@vsoch
Copy link
Collaborator

vsoch commented Aug 18, 2021

sounds good! I'll merge the PR here so the action uses the updated image, and we can follow up after. Thanks for your work today!

@ax3l
Copy link
Author

ax3l commented Aug 18, 2021

Thank you as well! Always a pleasure! 🎉
Have a nice evening!

@ax3l ax3l closed this as completed Aug 18, 2021
@ax3l
Copy link
Author

ax3l commented Aug 18, 2021

OLCF has fixed their certificate issue today.

@vsoch
Copy link
Collaborator

vsoch commented Aug 18, 2021

hooray!

@ax3l
Copy link
Author

ax3l commented Aug 19, 2021

NERSC has also fixed their missing intermediate certificate download for docs-dev.nersc.gov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants