-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Support for virtual execution module pkg on AIX #48924
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
Conversation
terminalmage
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing functions like latest_version. Please refer to our package provider writing documentation here: https://docs.saltstack.com/en/latest/topics/development/package_providers.html#package-functions
|
@terminalmage I know, talked with Kent Besaw about the additional functionality, since he talks with the customer weekly (that requested this support) and agreed to limit to the functionality requested rather than adding extra's not originally requested. So pulled that out: but can add it and others back in to provide barest minimum support to meet Fluorine commitments. Can add latest_available and upgrade_available (not too applicable in AIX since no repositories as in the sense of Linux or even Solaris, and the latest is that already committed to the database AIX keeps - ODM). Can add the functions and have them return what is already there. Decision was to add the additional functionality after Fluorine shipped. |
|
I don't find that to be an acceptable solution, since pkg states expect at least some of the missing functions to exist and will throw a KeyError if you run them and they're not. |
|
@terminalmage I was going to check the states pkg to see what was affected when writing the unit tests. I shall have another talk with Kent and raise the issues again with him, to push for the other functionality. |
|
@terminalmage talked with Kent and adding latest_version and upgrade_available. Others shall be added in another PR, to ensure this meets deadlines |
|
@terminalmage Added support for pkg.latest_version, pkg.upgrade_available similar to Solaris 10 which also does not support repositories. |
|
@dmurphy18 This has some lint errors. Can you fix those, please? https://jenkinsci.saltstack.com/job/pr-lint/job/PR-48924/4/warnings52Result/ |
salt/modules/aixpkg.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"package repositories" is redundant as it results in the word "package" appearing twice in the same clause. Also, the 2nd appearance should be "packages", not "package". Thus, this should be:
NOTE: As repositories are not presently supported for AIX installp/RPM
packages, this function will always return an empty string for a given
package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@terminalmage I hate getting nailed by cut and paste, :(, will fix.
|
@rallytime Those pylint errors are fixed. |
|
@rallytime Can Mike be pulled as a reviewer since he is PTO and a continent and an ocean away ? |
salt/modules/aixpkg.py
Outdated
| if __grains__['os_family'] == 'AIX': | ||
| return __virtualname__ | ||
| return (False, | ||
| 'The aixpkg execution module failed to load.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good error message. failed suggests that it should have loaded and did not. Perhaps something like Did not load AIX module on non-AIX OS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated message, was following error messages currently used for other pkg execution modules.
| return __salt__['cmd.retcode'](cmd) == 0 | ||
|
|
||
|
|
||
| def install(name=None, refresh=False, pkgs=None, version=None, test=False, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version and test doesn't appear to be documented below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cachedout Will update to include refresh, version and test.
|
@dmurphy18 I have changed the base branch of this PR from develop to fluorine for inclusion in the Fluorine feature release. |
What does this PR do?
Added support for virtual execution module pkg on AIX,
provides support for pkg.install, pkg.remove, pkg.list_pkgs, pkg.version
Also adds support for pkg.is_installed
Adds ability to install/remove IBM AIX filesets and/or rpm packages for the AIX platform
What issues does this PR fix or reference?
https://github.com/saltstack/zh/issues/1408
Previous Behavior
There was no support for execution module pkg on AIX
New Behavior
pkg.install, pkg.remove, pkg.list_pkgs, pkg.version, pkg.is_installed are now functional on AIX
Tests written?
No - Tests coming lates
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.