salt icon indicating copy to clipboard operation
salt copied to clipboard

Add disableexcludes to states.pkg

Open seanjnkns opened this issue 11 years ago • 8 comments

Per issue #11415, this was added into yumpkg. If doing any yum exclusion enforcement, states will fail when trying to install anything that was excluded. It's preferable to add disableexcludes to the states.pkg vs. having no exclusions and then doing holds on most versions of packages on the system or doing something similar to this:

httpd:
  pkg.installed:
    - hold: True
    - version: {{ httpd_version }}
    - cmd.run:
      - name: yum install --disableexcludes=all httpd

IMO, disableexcludes should not be set unless specifically included.

seanjnkns avatar Jul 22 '15 15:07 seanjnkns

@seanjnkns, thanks for the report.

jfindlay avatar Jul 22 '15 17:07 jfindlay

I fail to see how #29707 addresses any part of this issue/feature request. What I'm recommending is something similar to this, assuming say httpd* was excluded in your /etc/yum.conf. I realize doesn't work for all distros:

httpd: pkg.installed:

  • disableexcludes: True (default would be False)
    • version: {{ httpd_version }} (optional as it is now)

And this should just as easily be extended to pkgs, not just pkg, if there's a grouping and you want to ensure that exclusions are disabled for salt runs, but otherwise enforced. This then makes salt's salt.states.pkg.uptodate usable while not blindly updating everything, imo.

seanjnkns avatar Dec 15 '15 16:12 seanjnkns

I made a mistake when linking this PR.

Sorry about that.

abednarik avatar Dec 15 '15 16:12 abednarik

Since #11415 added this functionality to execution module yumpkg, there is now unexpected feature disparity between the pkg state and the yumpkg execution module. The labels of this issue should include state module, surely?

afletch avatar Mar 15 '16 12:03 afletch

+1

When this feature will be added to states.pkg?

kporembinski avatar Sep 13 '16 05:09 kporembinski

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

stale[bot] avatar Jul 01 '18 04:07 stale[bot]

I think this is still needed. Excludes are often used for Kubernetes deployments for example, to avoid unattended upgrades.

tlemarchand avatar Aug 01 '19 19:08 tlemarchand

This feature is still needed like in Kubernetes installations as aforementioned.

hbayindir avatar Oct 19 '20 13:10 hbayindir