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
pkg5 fails if asked to install a package that is already present #22781
Comments
What does needs_info |
|
Hmm, on further investigation, this seems to cause none of the packages specified in the list to be installed, so even if I add a |
I think this may be a bit of a red herring. On further investigation I realized that setting |
You say you're running Solaris 11, but I notice that the newer What does I think what's happening here is that |
needs_info |
Running |
I tried out the proposed fix for #22823 and that didn't change the issue I was seeing here, so I now think they're two completely separate issues. I do note that if I ask for the vim package to be |
I did some tests and found the reason for the strange behaviour. It has to do with restricting versions in Solaris.
There's the reason we can't update to the latest package. Solaris has packages which freeze the system to some particular package level. Now we either ignore the rc 4 when we want the latest package or...add a switch that we try to update other packages accordingly? Or we allow restrictions to be relaxed with a switch? |
So... the latest userland-incorporation would allow the latest wget version. But it can't be updated because it needs the latest "entire" incorporation package. And that itself can't be updated because the global zone doesn't provide the newest version for it. So in an effective global managed installation we are depending on packages "released" through our gloabl zones, because they are deemed "good". Well okay, but then we should maybe just allow rc 4 after all ;-) RC 4 is saying "The latest version I can provide you with is already installed. Everything else is currently impossible." |
Unfortunately, this was a for work thing that is no longer being worked on, so I don't think I'm going to be able to check :( |
* pkg returns 4 for "nothing to do" We need to handle this because our own checking for whether there's anything to do returns false negatives in certain circumstances. We need to rename the response `rc`, because that name is reserved by Ansible to indicate a failure if it is non-zero. Fixes #22781 and ansible/ansible-modules-extras#932. * Don't rename `rc` to to `pkg_rc`, and instead override the failure state. * Drop mention of renamed variable in `pkg5` module.
* pkg returns 4 for "nothing to do" We need to handle this because our own checking for whether there's anything to do returns false negatives in certain circumstances. We need to rename the response `rc`, because that name is reserved by Ansible to indicate a failure if it is non-zero. Fixes ansible#22781 and ansible/ansible-modules-extras#932. * Don't rename `rc` to to `pkg_rc`, and instead override the failure state. * Drop mention of renamed variable in `pkg5` module.
* pkg returns 4 for "nothing to do" We need to handle this because our own checking for whether there's anything to do returns false negatives in certain circumstances. We need to rename the response `rc`, because that name is reserved by Ansible to indicate a failure if it is non-zero. Fixes ansible#22781 and ansible/ansible-modules-extras#932. * Don't rename `rc` to to `pkg_rc`, and instead override the failure state. * Drop mention of renamed variable in `pkg5` module.
* pkg returns 4 for "nothing to do" We need to handle this because our own checking for whether there's anything to do returns false negatives in certain circumstances. We need to rename the response `rc`, because that name is reserved by Ansible to indicate a failure if it is non-zero. Fixes ansible#22781 and ansible/ansible-modules-extras#932. * Don't rename `rc` to to `pkg_rc`, and instead override the failure state. * Drop mention of renamed variable in `pkg5` module.
* pkg returns 4 for "nothing to do" We need to handle this because our own checking for whether there's anything to do returns false negatives in certain circumstances. We need to rename the response `rc`, because that name is reserved by Ansible to indicate a failure if it is non-zero. Fixes ansible#22781 and ansible/ansible-modules-extras#932. * Don't rename `rc` to to `pkg_rc`, and instead override the failure state. * Drop mention of renamed variable in `pkg5` module.
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
No changes to config file and no env vars
OS / ENVIRONMENT
This is specific to a Solaris host. In this particular case I'm using Solaris 11
SUMMARY
The short version is that
pkg install
will return4
as its return code if the package already exists, and that needs to be treated as successful by the module.This was already discussed a fair bit in ansible/ansible-modules-extras#932 and ansible/ansible-modules-extras#933
The weird thing is that this only seems to happen with a subset of packages.
STEPS TO REPRODUCE
Here's a task that causes this issue to happen for me.
The package that causes the problem here is "vim".
EXPECTED RESULTS
I thought that it should just ignore packages that already installed.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: