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

[yum] Make package removal confirmation strict #69592

Merged
merged 2 commits into from May 26, 2020
Merged

Conversation

relrod
Copy link
Member

@relrod relrod commented May 19, 2020

SUMMARY

Change:
After removing packages, the yum module does a final check to ensure the
packages are really uninstalled. The check would include packages that
were RPM Provides: values of another package.

This means that, for example, if a third-party kernel RPM spec had
Provides: kernel in it, removing the stock kernel would be successful
but the check to see if it was really removed would fail and cause
Ansible to report a failure.

Test Plan:
Tested on local CentOS 7 VM with kernel from elrepo which is known to
Provides: kernel.

Tickets:
Fixes #69237
Refs #35672
Refs #40723

Signed-off-by: Rick Elrod rick@elrod.me

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

yum

ADDITIONAL INFORMATION

Change:
After removing packages, the yum module does a final check to ensure the
packages are really installed. The check would include packages that
were RPM `Provides:` values of another package.

This means that, for example, if a third-party kernel RPM spec had
`Provides: kernel` in it, removing the stock kernel would be successful
but the check to see if it was really removed would fail and cause
Ansible to report a failure.

Test Plan:
Tested on local CentOS 7 VM with kernel from elrepo which is known to
`Provides: kernel`.

Tickets:
Fixes ansible#69237
Refs ansible#35672
Refs ansible#40723

Signed-off-by: Rick Elrod <rick@elrod.me>
@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. packaging Packaging category small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels May 19, 2020
Signed-off-by: Rick Elrod <rick@elrod.me>
@relrod relrod requested a review from maxamillion May 19, 2020 21:28
@relrod relrod marked this pull request as ready for review May 19, 2020 21:28
@relrod
Copy link
Member Author

relrod commented May 19, 2020

/cc @maxamillion

@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label May 26, 2020
@samdoran samdoran merged commit 4aff877 into ansible:devel May 26, 2020
@maxamillion
Copy link
Contributor

I totally missed this, sorry. This is great, thanks @relrod! 👍

@ansible ansible locked and limited conversation to collaborators Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. packaging Packaging category small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yum module improperly reports error on successful package removal.
5 participants