-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] Maintain version locking/compatibility/updates with optional modules #64299
Comments
Another related issue is #62758, which is additional friction for the only remaining feasible workaround. |
There are a few possible solutions that I can think of:
|
That's not all of them. There are "core" Salt modules with dependencies not on that list. People can also add/write extensions with any dependencies they want. I've got one for |
I would assume that the "core" modules are already bundle or already working otherwise onedir wouldn't function at all? I think at the bare minimum bundling dependencies for the Saltstack states and modules included out-of-the-box would be a big step. This means the likes of Really this issue is to solve modules that are:
Installing a user-provided extension is understandably harder to support and would maybe rely on the extension providing further dependencies; that is a much bigger problem to solve. Those modules have to be built somewhere, but I think it is hard to place the responsibility on the Saltstack maintainers for every possible user-provided module. Extension developers could possibly package and distribute their own wheels either via Pypi or #62758 (I definitely agree that would be a great feature). I know this possibly requires a separate mechanism for distributing user-provided extensions, but I think it is reasonable to place that out of the scope of distributing officially supported modules. |
use of 3005.x classic packaging builds is going to become long in the tooth until this works. I keep trying to move to "onedir"/relenv/whatever comes next builds of salt, but i keep hitting walls. The concept is good, the reality is painful and feels like core modules were never tested (nacl on debian 11 segfaults #64342) at a minimum the core modules need to work (nacl, pycurl, python-ldap, gitfs, (ive not even gotten to the point of trying docker modules yet, or salt-proxys with napalm....) ). |
Our take on this is that python libraries which have c dependencies should be distributing wheels. Salt should do it's best to reduce dependencies on libraries that require compilation in favor of pure python versions, versions using cffi/ctypes and libraries that are being maintained by shipping wheels (cryptography is a good example). I understand that today this is not always the case and the comments made about users having to compile software to enable features in Salt are entirely valid. Bundling additional c dependencies in a onedir build is not completely off the table but it is something we'd like to avoid. I'll address our plans for the issues listed thus far.
Salt extensions are, in general a good approach for handling functionality that requires third party libraries not bundled with Salt. We have started down the path of migrating a lot of the bloat out of the core Salt repository and into extensions. At some point in the future this should mean that Salt has far less dependencies in the core codebase. I hope this provides everyone with good understanding of how we plan to tackle these issues. As I stated above; the concerns here are valid. I hope this alleviates those concerns. I am looking forward to the discussions that follow. |
Amazing!
If this is the intended path then I think there should be much better version locking/compatibility with these dependencies. Currently to install a module you run I think we should try to either:
|
I am really happy that we are moving toward solving these issues! Thank you for all of your work! |
Indeed. But if you don't install the latest then you're going to miss security fixes, as most python libraries do not maintain their own old versions. The only way to maintain both security and stability is either using the distro-managed packages, or having Salt bundling everything itself and backporting any fixes. |
The big elephant in the room is #64296, testing of the ability to actually install and run these modules across the built releases on each os. Otherwise were only going to catch these kind of issues with user reports. |
I don't think this actually requires bundling. It does require Salt to pay attention and track these security updates. If there is a security update for a module, then Salt can release a patch that updates it's optional dependency version constraint (not actually bundled, just an optional dependency for Pip) without actually shipping the modules themselves or needing to update any other parts of Salt. Obviously there will eventually be a dead end with some of these modules between Salt's LTS release timeline and the modules making breaking changes, but I think it is reasonable to match working versions. When a security issue is found but there is not a compatible replacement for an older Salt version, Salt should probably release a CVE and say "using this module with this version of Salt is now a security risk and no longer recommend; since the patched versions are not compatible with this Salt version please update to the next version of Salt." Without this announcement users may simply roll back the module they are trying to install without any notice of security risk. There are already a lot GitHub issues describing different old versions to lock into for compatibility. Also probably most users do not remember to update |
@DaAwesomeP The curl backend was replaced by requests and proxy support should now (in 3006.8) be working. Closing this one. |
@dwoz I don't think that resolves this issue. This issue is about all Salt optional dependencies and their lack of version locking/matching with the current Salt version, not just that one in particular. Even if the current specific issues due to individual optional dependencies' breaking changes are fixed, that still doesn't address that it can continue to happen in the future (as it has many times before). Please see earlier comments about a few suggested schemes to prevent dependency issues in the future. |
Description
In an enterprise environment machines often sit behind a proxy. As such using Saltstack requires the use of pycurl. This broke in #62949 and then with relenv a solution is presented here: https://relenv.readthedocs.io/en/latest/additional-dependencies.html
This is more of a workaround than a solution. Similarly in enterprise environments machines are kept as clean as possible, so if the applications running on the machine do not require build tools then build tools will not be permitted to be installed.
Additionally, building modules from source creates then additional required upkeep to keep these modules up to date. Specifically with curl the chance of a CVE or other security vulnerability requiring a patch is a concern.
Manually compiling against the system libraries is also bound to create issues that are the same problem that relenv seeks to solve. Relenv does not make Saltstack easier to use or more consistent across machines if manual compilation is required.
Python modules may deprecate the ability to link with older dependencies provided by the OS. At the same time Saltstack may bundle a newer version of Python or other dependencies that prevent the use of older modules that can link with the OS. Ultimately, the user has to perform trial and error to figure out which version works now but might break or become a security concern in 6 months. See #58898 and #61790.
Now that onedir is a requirement this is becoming a large issue that could result in dropping Saltstack in environments behind proxies. I say this in the most constructive way possible; I enjoy using Saltstack but I currently have run out of workarounds.
Same issue with other packages than pycurl: #63142
This issue does not affect other modules that bundle wheels (such as pygit2) pending fix of #64121.
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
Usually a RHEL8 x86_64 or Debian 11 amd64 machine with Saltstack installed via the official Saltstack repos.
Steps to Reproduce the behavior
N/A
Expected behavior
Pycurl installation should not require manual compilation.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: