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

pkg.installed: hold: True not applied to a package which is already installed. #46689

Closed
mxork opened this Issue Mar 23, 2018 · 8 comments

Comments

Projects
None yet
4 participants
@mxork

mxork commented Mar 23, 2018

Description of Issue/Question

hold: True is not applied to a package which is already installed. (may be specific to compound pkg.installed)

Setup

some-packages-please:
  pkg.installed:
      - pkgs:
          - "git": "1.8.3.1"
          - "glusterfs-fuse": "3.8.4"
          - "socat": "1.7.3.2-2.el7"
          - "ceph-common": "1:0.94.5"
          - "nfs-utils": "1:1.3.0"
          - "iscsi-initiator-utils": "6.2.0.874"
          - "cifs-utils": "6.2"
      - hold: true
      - update_holds: true

Steps to Reproduce Issue

Applying the above (some-packages-please) gives:

----------
          ID: some-packages-please
    Function: pkg.installed
      Result: True
     Comment: 5 targeted packages were installed/updated.
              Package glusterfs-fuse is now being held.
              Package socat is now being held.
              Package ceph-common is now being held.
              Package iscsi-initiator-utils is now being held.
              Package cifs-utils is now being held.
              The following packages were already installed: git=1.8.3.1, nfs-utils=1:1.3.0

and nfs-utils, git are indeed missing the version lock:

$ yum versionlock
Loaded plugins: fastestmirror, versionlock
0:telegraf-1.4.1-1.*
1:ceph-common-0.94.5-2.el7.*
0:cifs-utils-6.2-10.el7.*
0:glusterfs-fuse-3.8.4-18.4.el7.centos.*
0:iscsi-initiator-utils-6.2.0.874-4.el7.*
0:socat-1.7.3.2-2.el7.*
versionlock list done

Versions Report

Salt Version:
           Salt: 2017.7.3
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: 1.10.6
          gitdb: 0.6.4
      gitpython: 1.0.1
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.1
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4
 
System Versions:
           dist: centos 7.4.1708 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.11.6.el7.x86_64
         system: Linux
        version: CentOS Linux 7.4.1708 Core
$ yum --version
3.4.3
  Installed: rpm-4.11.3-25.el7.x86_64 at 2018-01-08 16:27
  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2017-08-03 03:48
  Committed: Panu Matilainen <pmatilai@redhat.com> at 2017-03-17

  Installed: yum-3.4.3-154.el7.centos.noarch at 2018-01-08 16:27
  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2017-08-05 19:13
  Committed: CentOS Sources <bugs@centos.org> at 2017-08-01

  Installed: yum-plugin-fastestmirror-1.1.31-42.el7.noarch at 2018-01-08 16:27
  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2017-08-11 10:23
  Committed: Valentina Mukhamedzhanova <vmukhame@redhat.com> at 2017-03-21

@mxork mxork changed the title from `pkg.installed`: `hold: True` not applied to a package which is already installed. to pkg.installed: hold: True not applied to a package which is already installed. Mar 23, 2018

@garethgreenaway garethgreenaway added this to the Blocked milestone Mar 26, 2018

@garethgreenaway

This comment has been minimized.

Member

garethgreenaway commented Mar 26, 2018

@mxork Thanks for the report. Unfortunately I have been unable to reproduce this issue.

@mxork

This comment has been minimized.

mxork commented Mar 26, 2018

K. I will get a debug trace next time I run the state.

@mxork

This comment has been minimized.

mxork commented Apr 4, 2018

@djsly

This comment has been minimized.

djsly commented Jun 26, 2018

@garethgreenaway logs were provided, you need anything else ?

@garethgreenaway garethgreenaway self-assigned this Jul 2, 2018

@garethgreenaway

This comment has been minimized.

Member

garethgreenaway commented Jul 3, 2018

@mxork @djsly Apologies for the delay. Thanks for the log. I was able to reproduce it by installing both git and nfs-utils manually, then using the state file to install the others. You're assessment is correct, it appears that packages that are already installed are not being checked to ensure they're are set to be held.

@garethgreenaway

This comment has been minimized.

Member

garethgreenaway commented Jul 4, 2018

@mxork @djsly If you're able to test the fix in that PR to see if it fixes the issue for you, that would be greatly appreciated.

@djsly

This comment has been minimized.

djsly commented Jul 5, 2018

@rallytime

This comment has been minimized.

Contributor

rallytime commented Jul 31, 2018

Closed via #48426

@rallytime rallytime closed this Jul 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment