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

cryptography NAPALM dependancy needs rust and newer pip on python36 #125

Open
mtinberg opened this issue Feb 18, 2021 · 3 comments
Open

Comments

@mtinberg
Copy link
Contributor

Netbox doesn't deploy on RHEL/CentOS 7 python36 with pip3 v9.0.3 due to current release of cryptography depended on by NAPALM depending on rust during the build/install process, pip3 v9.0.3 setuptools doesn't have modules to build rust, but running pip3 install pip --upgrade in the venv then installing napalm works, as long as rust (1.47.0) is installed from EPEL.

We may need to add rust as a package dependancy then upgrade pip in the venv during deployment, maybe have the first pip/venv task be to set up an empty venv and upgrade pip, then install requirements/constraints then optional modules.

This may affect other platforms as well

@tyler-8
Copy link
Collaborator

tyler-8 commented Feb 20, 2021

This has affected a lot of packages/apps in the Python ecosystem.

I'm not crazy about blindly upgrading pip to the latest version - as there have been breaking pip changes in the past. IMO, we should select a known working version (whatever is released right now) and pin that as part of the pip constraints perhaps?

The latest version of pip has a pre-compiled wheel of the cryptography package so there's no need to install rust on the target system. So the pre-install steps should be pip install pip==X.Y.Z wheel=X.Y.Z to ensure the following tasks can complete.

@tyler-8
Copy link
Collaborator

tyler-8 commented Feb 20, 2021

It's worth noting that the NetBox upgrade.sh is doing a 'blind' pip upgrade now netbox-community/netbox#5776 but I still think a pinned pip is the better approach.

@lae
Copy link
Owner

lae commented Mar 24, 2021

I'm on board with pinned pip via the constraints role variable. Although pinning to a minor version (x.y) instead of a patch version (x.y.z) seems like it'd be appropriate to keep the maintenance overhead low.

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

No branches or pull requests

3 participants