saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
https://docs.saltproject.io/salt/install-guide/en/latest/
Apache License 2.0
14.19k stars 5.48k forks source link

version param in pkg.installed broken in 2016.11.8/2017.7.2 in EL6-7 #44150

Closed rossengeorgiev closed 5 years ago

rossengeorgiev commented 7 years ago

Description of Issue/Question

Broke in 2016.11.8 and 2017.7.2.

TypeError: expected string or buffer is because the value of name is None, so it breaks when the code tries to re.match('kernel(-.+)?', name)

Setup

/srv/salt/test.sls
teststate:
 pkg.installed:
  - name: audit
  - version: '2.4'

Or version: '2.4*'

Steps to Reproduce Issue

$ salt-call state.sls test
...
[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/test.sls:

teststate:
 pkg.installed:
  - name: audit
  - version: '2.4'

[DEBUG   ] LazyLoaded config.get
[DEBUG   ] Results of YAML rendering:
OrderedDict([('teststate', OrderedDict([('pkg.installed', [OrderedDict([('name', 'audit')]), OrderedDict([('version', '2.4')])])]))])
[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/test.sls' using 'yaml' renderer: 0.0135700702667
[DEBUG   ] LazyLoaded pkg.install
[DEBUG   ] LazyLoaded pkg.installed
[DEBUG   ] Module PSGet: Only available on Windows systems
[DEBUG   ] You should upgrade pyOpenSSL to at least 0.14.1 to enable the use of X509 extensions in the tls module
[ERROR   ] org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[DEBUG   ] Module DSC: Only available on Windows systems
[DEBUG   ] Could not LazyLoad pkg.ex_mod_init: 'pkg.ex_mod_init' is not available.
[INFO    ] Running state [audit] at time 12:14:07.391194
[INFO    ] Executing state pkg.installed for audit
[INFO    ] Executing command ['rpm', '-qa', '--queryformat', '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'] in directory '/root'
[DEBUG   ] Could not LazyLoad pkg.check_db: 'pkg.check_db' is not available.
[DEBUG   ] Could not LazyLoad pkg.check_extra_requirements: 'pkg.check_extra_requirements' is not available.
[DEBUG   ] Could not LazyLoad pkg.version_clean: 'pkg.version_clean' is not available.
[DEBUG   ] Current version (['2.4.5-3.el6']) did not match desired version specification (2.4), adding to installation targets
[INFO    ] Executing command ['yum', '--quiet', 'clean', 'expire-cache'] in directory '/root'
[DEBUG   ] output:
[INFO    ] Executing command ['yum', '--quiet', 'check-update'] in directory '/root'
[ERROR   ] An exception occurred in this state: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/state.py", line 1765, in call
    **cdata['kwargs'])
  File "/usr/lib/python2.6/site-packages/salt/loader.py", line 1705, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line 1440, in installed
    **kwargs)
  File "/usr/lib/python2.6/site-packages/salt/modules/yumpkg.py", line 1233, in install
    if re.match('kernel(-.+)?', name):
  File "/usr/lib64/python2.6/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

[INFO    ] Completed state [audit] at time 12:14:10.939263 duration_in_ms=3548.069
[DEBUG   ] File /var/cache/salt/minion/accumulator/55363600 does not exist, no need to cleanup.
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'redhat6-8.local', 'tcp://192.168.11.10:4506', 'aes')
[DEBUG   ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'redhat6-8.local', 'tcp://192.168.11.10:4506')
[DEBUG   ] LazyLoaded highstate.output
local:
----------
          ID: teststate
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.6/site-packages/salt/state.py", line 1765, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.6/site-packages/salt/loader.py", line 1705, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line 1440, in installed
                  **kwargs)
                File "/usr/lib/python2.6/site-packages/salt/modules/yumpkg.py", line 1233, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.6/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 12:14:07.391194
    Duration: 3548.069 ms
     Changes:

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   3.548 s

Versions Report

Broken for CentOS/RedHat 6/7


Salt Version:
           Salt: 2016.11.8

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 1.4.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.8.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.20.2
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.6.6 (r266:84292, May 22 2015, 08:34:51)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.5.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: redhat 6.8 Santiago
        machine: x86_64
        release: 2.6.32-642.el6.x86_64
         system: Linux
        version: Red Hat Enterprise Linux Server 6.8 Santiago
``
gtmanfred commented 7 years ago

I am unable to reproduce this.

[root@localhost site-packages]# salt-call state.apply test
local:
----------
          ID: teststate
    Function: pkg.installed
        Name: audit
      Result: True
     Comment: The following packages were installed/updated: audit=2.4.*
     Started: 15:57:30.411887
    Duration: 5121.286 ms
     Changes:
              ----------
              audit:
                  ----------
                  new:
                      2.4.5-6.el6
                  old:

Summary for local
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:   5.121 s
[root@localhost site-packages]# cat /srv/salt/test.sls
teststate:
 pkg.installed:
  - name: audit
  - version: '2.4.*'

Can you provide the output of yum check-update on that server?

Thanks, Daniel

rossengeorgiev commented 7 years ago

@gtmanfred Yeah that works, but in my case the package is already installed.

[DEBUG   ] Current version (['2.4.5-3.el6']) did not match desired version specification (2.4), adding to installation targets
gtmanfred commented 7 years ago

You will need to specify the full rpm version or the glob.

'2.4.5-3.el6'

If you remove the package and run salt-call, what is the full debug log before that traceback with the kernel message?

rossengeorgiev commented 7 years ago

If i specify 2.4.* I still get the same exception, when the package is already installed. There is nothing relevant in the log, but here is the full thing on centos 6.8.

[root@centos6-8 ~]# salt-call -l debug state.sls test
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: centos6-8.local
[DEBUG   ] Configuration file path: /etc/salt/minion
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[DEBUG   ] Please install 'virt-what' to improve results of the 'virtual' grain.
[DEBUG   ] Connecting to master. Attempt 1 (infinite attempts)
[DEBUG   ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'centos6-8.local', 'tcp://192.168.11.10:4506')
[DEBUG   ] Generated random reconnect delay between '1000ms' and '11000ms' (3713)
[DEBUG   ] Setting zmq_reconnect_ivl to '3713ms'
[DEBUG   ] Setting zmq_reconnect_ivl_max to '11000ms'
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'centos6-8.local', 'tcp://192.168.11.10:4506', 'clear')
[DEBUG   ] Decrypting the current master AES key
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_390789f5a6_pub.ipc
[DEBUG   ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_390789f5a6_pull.ipc
[DEBUG   ] Initializing new IPCClient for path: /var/run/salt/minion/minion_event_390789f5a6_pull.ipc
[DEBUG   ] Sending event: tag = salt/auth/creds; data = {'_stamp': '2017-10-19T14:48:17.642588', 'creds': {'publish_port': 4505, 'aes': '8YWnSZg/c1MqwY
kcKIiaxEBRrlRP4nsJwWUuOpndQVNxgsDVaJ8O7Yld74oJ9l3/nhZgHKkLkIc=', 'master_uri': 'tcp://192.168.11.10:4506'}, 'key': ('/etc/salt/pki/minion', 'centos6-8.
local', 'tcp://192.168.11.10:4506')}
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Determining pillar cache
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'centos6-8.local', 'tcp://192.168.11.10:4506', 'aes')
[DEBUG   ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'centos6-8.local', 'tcp://192.168.11.10:4506')
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] LazyLoaded jinja.render
[DEBUG   ] LazyLoaded yaml.render
[DEBUG   ] LazyLoaded state.sls
[DEBUG   ] LazyLoaded saltutil.is_running
[DEBUG   ] LazyLoaded grains.get
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'centos6-8.local', 'tcp://192.168.11.10:4506', 'aes')
[DEBUG   ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'centos6-8.local', 'tcp://192.168.11.10:4506')
[INFO    ] Loading fresh modules for state activity
[DEBUG   ] LazyLoaded jinja.render
[DEBUG   ] LazyLoaded yaml.render
[DEBUG   ] In saltenv 'base', looking at rel_path 'test.sls' to resolve 'salt://test.sls'
[DEBUG   ] In saltenv 'base', ** considering ** path '/var/cache/salt/minion/files/base/test.sls' to resolve 'salt://test.sls'
[DEBUG   ] Fetching file from saltenv 'base', ** attempting ** 'salt://test.sls'
[DEBUG   ] No dest file found
[INFO    ] Fetching file from saltenv 'base', ** done ** 'test.sls'
[DEBUG   ] compile template: /var/cache/salt/minion/files/base/test.sls
[DEBUG   ] Jinja search path: ['/var/cache/salt/minion/files/base']
[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/test.sls' using 'jinja' renderer: 0.00537109375
[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/test.sls:

asdasd:
  pkg.installed:
    - name: audit
    - version: '2.*'

[DEBUG   ] LazyLoaded config.get
[DEBUG   ] Results of YAML rendering:
OrderedDict([('asdasd', OrderedDict([('pkg.installed', [OrderedDict([('name', 'audit')]), OrderedDict([('version', '2.*')])])]))])
[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/test.sls' using 'yaml' renderer: 0.00492906570435
[DEBUG   ] LazyLoaded pkg.install
[DEBUG   ] LazyLoaded pkg.installed
[DEBUG   ] Module DSC: Only available on Windows systems
[DEBUG   ] Module PSGet: Only available on Windows systems
[DEBUG   ] SMBIOS: neither dmidecode nor smbios found!
[DEBUG   ] Could not LazyLoad pkg.ex_mod_init: 'pkg.ex_mod_init' is not available.
[INFO    ] Running state [audit] at time 14:48:18.814184
[INFO    ] Executing state pkg.installed for audit
[INFO    ] Executing command ['rpm', '-qa', '--queryformat', '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'] in directory '/root'
[DEBUG   ] Could not LazyLoad pkg.check_db: 'pkg.check_db' is not available.
[DEBUG   ] Could not LazyLoad pkg.check_extra_requirements: 'pkg.check_extra_requirements' is not available.
[DEBUG   ] Could not LazyLoad pkg.version_clean: 'pkg.version_clean' is not available.
[DEBUG   ] Current version (['2.4.5-6.el6']) did not match desired version specification (2.*), adding to installation targets
[INFO    ] Executing command ['yum', '--quiet', 'clean', 'expire-cache'] in directory '/root'
[DEBUG   ] output:
[INFO    ] Executing command ['yum', '--quiet', 'check-update'] in directory '/root'
[ERROR   ] An exception occurred in this state: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/state.py", line 1765, in call
    **cdata['kwargs'])
  File "/usr/lib/python2.6/site-packages/salt/loader.py", line 1705, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line 1440, in installed
    **kwargs)
  File "/usr/lib/python2.6/site-packages/salt/modules/yumpkg.py", line 1233, in install
    if re.match('kernel(-.+)?', name):
  File "/usr/lib64/python2.6/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

[INFO    ] Completed state [audit] at time 14:48:22.282727 duration_in_ms=3468.543
[DEBUG   ] File /var/cache/salt/minion/accumulator/36877968 does not exist, no need to cleanup.
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'centos6-8.local', 'tcp://192.168.11.10:4506', 'aes')
[DEBUG   ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'centos6-8.local', 'tcp://192.168.11.10:4506')
[DEBUG   ] LazyLoaded highstate.output
local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.6/site-packages/salt/state.py", line 1765, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.6/site-packages/salt/loader.py", line 1705, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line 1440, in installed
                  **kwargs)
                File "/usr/lib/python2.6/site-packages/salt/modules/yumpkg.py", line 1233, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.6/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 14:48:18.814184
    Duration: 3468.543 ms
     Changes:

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   3.469 s
gtmanfred commented 7 years ago

I am still unable to replicate this, which is why I was hoping that you would provide me the output of the check-update command which was run right before it.

And the possibly if you could throw some debugging in to see what is going on with your system, because this is not erroring with any centos 6.8 boxes that I try.

[root@543ef217a6ad /]# cat /srv/salt/test.sls
teststate:
 pkg.installed:
  - name: audit
  - version: '2.4.*'
[root@543ef217a6ad /]# salt-call --local state.apply test
local:
----------
          ID: teststate
    Function: pkg.installed
        Name: audit
      Result: True
     Comment: The following packages were installed/updated: audit=2.4.*
     Started: 15:23:08.316074
    Duration: 6805.589 ms
     Changes:
              ----------
              audit:
                  ----------
                  new:
                      2.4.5-6.el6
                  old:
              audit-libs:
                  ----------
                  new:
                      2.4.5-6.el6
                  old:
                      2.4.5-3.el6
              tcp_wrappers-libs:
                  ----------
                  new:
                      7.6-58.el6
                  old:

Summary for local
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:   6.806 s
[root@543ef217a6ad /]# salt-call --versions-report
Salt Version:
           Salt: 2016.11.8

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.8.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.5.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: centos 6.8 Final
        machine: x86_64
        release: 4.4.89-boot2docker
         system: Linux
        version: CentOS 6.8 Final
rossengeorgiev commented 7 years ago

Here is the output of yum check-update:

[root@centos6-8 salt]# yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: www.mirrorservice.org
 * extras: mirror.as29550.net
 * updates: www.mirrorservice.org
acl.x86_64                                          2.2.49-7.el6_9.1                                 updates
bash.x86_64                                         4.1.2-48.el6                                     base
binutils.x86_64                                     2.20.51.0.2-5.47.el6_9.1                         updates
ca-certificates.noarch                              2017.2.14-65.0.1.el6_9                           updates
centos-release.x86_64                               6-9.el6.12.3                                     base
coreutils.x86_64                                    8.4-46.el6                                       base
coreutils-libs.x86_64                               8.4-46.el6                                       base
cpio.x86_64                                         2.10-13.el6                                      base
cronie.x86_64                                       1.4.4-16.el6_8.2                                 base
cronie-anacron.x86_64                               1.4.4-16.el6_8.2                                 base
curl.x86_64                                         7.19.7-53.el6_9                                  updates
db4.x86_64                                          4.7.25-22.el6                                    base
db4-utils.x86_64                                    4.7.25-22.el6                                    base
device-mapper.x86_64                                1.02.117-12.el6                                  base
device-mapper-event.x86_64                          1.02.117-12.el6                                  base
device-mapper-event-libs.x86_64                     1.02.117-12.el6                                  base
device-mapper-libs.x86_64                           1.02.117-12.el6                                  base
dhclient.x86_64                                     12:4.1.1-53.P1.el6.centos.1                      updates
dhcp-common.x86_64                                  12:4.1.1-53.P1.el6.centos.1                      updates
dracut.noarch                                       004-409.el6_8.2                                  base
dracut-kernel.noarch                                004-409.el6_8.2                                  base
e2fsprogs.x86_64                                    1.41.12-23.el6                                   base
e2fsprogs-libs.x86_64                               1.41.12-23.el6                                   base
efibootmgr.x86_64                                   0.5.4-15.el6                                     base
expat.x86_64                                        2.0.1-13.el6_8                                   base
glib2.x86_64                                        2.28.8-9.el6                                     base
glibc.x86_64                                        2.12-1.209.el6_9.2                               updates
glibc-common.x86_64                                 2.12-1.209.el6_9.2                               updates
gmp.x86_64                                          4.3.1-12.el6                                     base
grep.x86_64                                         2.20-6.el6                                       base
grub.x86_64                                         1:0.97-99.el6                                    base
gzip.x86_64                                         1.3.12-24.el6                                    base
hwdata.noarch                                       0.233-18.1.el6                                   base
initscripts.x86_64                                  9.03.58-1.el6.centos.2                           updates
iputils.x86_64                                      20071127-24.el6                                  base
kernel.x86_64                                       2.6.32-696.13.2.el6                              updates
kernel-firmware.noarch                              2.6.32-696.13.2.el6                              updates
kexec-tools.x86_64                                  2.0.0-307.el6                                    base
kpartx.x86_64                                       0.4.9-100.el6                                    base
krb5-libs.x86_64                                    1.10.3-65.el6                                    base
libacl.x86_64                                       2.2.49-7.el6_9.1                                 updates
libblkid.x86_64                                     2.17.2-12.28.el6                                 base
libcom_err.x86_64                                   1.41.12-23.el6                                   base
libcurl.x86_64                                      7.19.7-53.el6_9                                  updates
libgcc.x86_64                                       4.4.7-18.el6                                     base
libgcrypt.x86_64                                    1.4.5-12.el6_8                                   base
libgomp.x86_64                                      4.4.7-18.el6                                     base
libss.x86_64                                        1.41.12-23.el6                                   base
libstdc++.x86_64                                    4.4.7-18.el6                                     base
libtirpc.x86_64                                     0.2.1-13.el6_9                                   updates
libudev.x86_64                                      147-2.73.el6_8.2                                 base
libuuid.x86_64                                      2.17.2-12.28.el6                                 base
logrotate.x86_64                                    3.7.8-28.el6                                     base
lvm2.x86_64                                         2.02.143-12.el6                                  base
lvm2-libs.x86_64                                    2.02.143-12.el6                                  base
mdadm.x86_64                                        3.3.4-8.el6                                      base
module-init-tools.x86_64                            3.9-26.el6                                       base
mysql-libs.x86_64                                   5.1.73-8.el6_8                                   base
net-tools.x86_64                                    1.60-114.el6                                     base
newt.x86_64                                         0.52.11-4.el6                                    base
newt-python.x86_64                                  0.52.11-4.el6                                    base
nfs-utils.x86_64                                    1:1.2.3-75.el6                                   base
nfs-utils-lib.x86_64                                1.1.5-13.el6                                     base
nspr.x86_64                                         4.13.1-1.el6                                     base
nss.x86_64                                          3.28.4-4.el6_9                                   updates
nss-softokn.x86_64                                  3.14.3-23.3.el6_8                                base
nss-softokn-freebl.x86_64                           3.14.3-23.3.el6_8                                base
nss-sysinit.x86_64                                  3.28.4-4.el6_9                                   updates
nss-tools.x86_64                                    3.28.4-4.el6_9                                   updates
nss-util.x86_64                                     3.28.4-1.el6_9                                   updates
openldap.x86_64                                     2.4.40-16.el6                                    base
openssh.x86_64                                      5.3p1-123.el6_9                                  updates
openssh-clients.x86_64                              5.3p1-123.el6_9                                  updates
openssh-server.x86_64                               5.3p1-123.el6_9                                  updates
openssl.x86_64                                      1.0.1e-57.el6                                    base
pam.x86_64                                          1.1.1-24.el6                                     base
perl.x86_64                                         4:5.10.1-144.el6                                 base
perl-Module-Pluggable.x86_64                        1:3.90-144.el6                                   base
perl-Pod-Escapes.x86_64                             1:1.04-144.el6                                   base
perl-Pod-Simple.x86_64                              1:3.13-144.el6                                   base
perl-libs.x86_64                                    4:5.10.1-144.el6                                 base
perl-version.x86_64                                 3:0.77-144.el6                                   base
plymouth.x86_64                                     0.8.3-29.el6.centos                              base
plymouth-core-libs.x86_64                           0.8.3-29.el6.centos                              base
plymouth-scripts.x86_64                             0.8.3-29.el6.centos                              base
policycoreutils.x86_64                              2.0.83-30.1.el6_8                                base
postfix.x86_64                                      2:2.6.6-8.el6                                    base
procps.x86_64                                       3.2.8-45.el6_9.1                                 updates
psmisc.x86_64                                       22.6-24.el6                                      base
python.x86_64                                       2.6.6-66.el6_8                                   base
python-libs.x86_64                                  2.6.6-66.el6_8                                   base
rdma.noarch                                         6.9_4.1-3.el6                                    base
rpcbind.x86_64                                      0.2.0-13.el6_9.1                                 updates
selinux-policy.noarch                               3.7.19-307.el6_9.2                               updates
selinux-policy-targeted.noarch                      3.7.19-307.el6_9.2                               updates
setup.noarch                                        2.8.14-23.el6                                    base
sudo.x86_64                                         1.8.6p3-29.el6_9                                 updates
tar.x86_64                                          2:1.23-15.el6_8                                  base
tzdata.noarch                                       2017b-1.el6                                      updates
udev.x86_64                                         147-2.73.el6_8.2                                 base
util-linux-ng.x86_64                                2.17.2-12.28.el6                                 base
vim-minimal.x86_64                                  2:7.4.629-5.el6_8.1                              base
wget.x86_64                                         1.12-10.el6                                      base
yum-plugin-fastestmirror.noarch                     1.1.30-40.el6                                    base
gtmanfred commented 7 years ago

@terminalmage have you ever seen the kernel regex check line fail like this?

Thanks, Daniel

rossengeorgiev commented 7 years ago

@gtmanfred Found the issue:

https://github.com/saltstack/salt/commit/663874908aee77901378ee744e8079fde608d14c#diff-e8ecdef70c9c678790ca9e0e07c9ab77R1426

terminalmage commented 7 years ago

https://github.com/saltstack/salt/pull/44188 should fix this

rossengeorgiev commented 7 years ago

@terminalmage the same code exists in 2017.7.2, but it doesn't seem to trigger.

terminalmage commented 7 years ago

@rossengeorgiev Are you sure that you are testing with a single package (i.e. not using the pkgs argument), and also specifying a version? Those are the combination of circumstances that would trigger this.

rossengeorgiev commented 7 years ago

Bug is reproducible when not using * in both versions. With * in 2017.7.2 everything works fine. I guess due to the changes in how wildcards work.

2016.11.8

root@master:~# find /srv
/srv
/srv/salt
/srv/salt/test.sls
root@master:~# cat /srv/salt/test.sls
asdasd:
 pkg.installed:
  - name: audit
  - version: '2.4'
root@master:~# salt-run manage.versions
Master:
    2016.11.8
Up to date:
    ----------
    centos6-8.local:
        2016.11.8
    centos7-2.local:
        2016.11.8
    redhat6-8.local:
        2016.11.8
    redhat7-2.local:
        2016.11.8
root@master:~# salt '*' pkg.version audit
centos6-8.local:
    2.4.5-3.el6
redhat6-8.local:
    2.4.5-3.el6
centos7-2.local:
    2.4.1-5.el7
redhat7-2.local:
    2.4.1-5.el7
root@master:~# salt '*' state.sls test
redhat7-2.local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/site-packages/salt/state.py", line 1765, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1705, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/states/pkg.py", line 1440, in installed
                  **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/modules/yumpkg.py", line 1233, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.7/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 12:41:40.790033
    Duration: 3201.825 ms
     Changes:

Summary for redhat7-2.local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   3.202 s
redhat6-8.local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.6/site-packages/salt/state.py", line 1765, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.6/site-packages/salt/loader.py", line 1705, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line 1440, in installed
                  **kwargs)
                File "/usr/lib/python2.6/site-packages/salt/modules/yumpkg.py", line 1233, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.6/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 12:41:41.233234
    Duration: 3129.233 ms
     Changes:

Summary for redhat6-8.local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   3.129 s
centos7-2.local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/site-packages/salt/state.py", line 1765, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1705, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/states/pkg.py", line 1440, in installed
                  **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/modules/yumpkg.py", line 1233, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.7/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 12:41:40.799039
    Duration: 4301.548 ms
     Changes:

Summary for centos7-2.local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   4.302 s
centos6-8.local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.6/site-packages/salt/state.py", line 1765, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.6/site-packages/salt/loader.py", line 1705, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line 1440, in installed
                  **kwargs)
                File "/usr/lib/python2.6/site-packages/salt/modules/yumpkg.py", line 1233, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.6/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 12:41:40.784921
    Duration: 4831.745 ms
     Changes:

Summary for centos6-8.local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   4.832 s
ERROR: Minions returned with non-zero exit code

2017.7.2

root@master:~# salt-run manage.versions
Master:
    2017.7.2
Up to date:
    ----------
    centos6-8.local:
        2017.7.2
    centos7-2.local:
        2017.7.2
    redhat6-8.local:
        2017.7.2
    redhat7-2.local:
        2017.7.2
root@master:~# salt '*' pkg.version audit
centos6-8.local:
    2.4.5-3.el6
redhat6-8.local:
    2.4.5-3.el6
centos7-2.local:
    2.4.1-5.el7
redhat7-2.local:
    2.4.1-5.el7
root@master:~# salt '*' state.sls test
redhat6-8.local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/site-packages/salt/state.py", line 1843, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1795, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/states/pkg.py", line 1631, in installed
                  **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/modules/yumpkg.py", line 1415, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.7/re.py", line 141, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 13:22:30.264705
    Duration: 9958.786 ms
     Changes:

Summary for redhat6-8.local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   9.959 s
redhat7-2.local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/site-packages/salt/state.py", line 1843, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1795, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/states/pkg.py", line 1631, in installed
                  **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/modules/yumpkg.py", line 1415, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.7/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 13:22:31.044509
    Duration: 11778.684 ms
     Changes:

Summary for redhat7-2.local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:  11.779 s
centos6-8.local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/site-packages/salt/state.py", line 1843, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1795, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/states/pkg.py", line 1631, in installed
                  **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/modules/yumpkg.py", line 1415, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.7/re.py", line 141, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 13:22:31.074907
    Duration: 12070.63 ms
     Changes:

Summary for centos6-8.local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:  12.071 s
centos7-2.local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/site-packages/salt/state.py", line 1843, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1795, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/states/pkg.py", line 1631, in installed
                  **kwargs)
                File "/usr/lib/python2.7/site-packages/salt/modules/yumpkg.py", line 1415, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.7/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 13:22:30.945781
    Duration: 14037.304 ms
     Changes:

Summary for centos7-2.local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:  14.037 s
ERROR: Minions returned with non-zero exit code
terminalmage commented 6 years ago

I can't reproduce this:

(git) 4e566254  develop [upstream/develop]
erik ~/git/salt/main                                                    [15:14:06]
(⌐■_■) % sudo find . -type f -name \*.pyc -delete
(git) 4e566254  develop [upstream/develop]
erik ~/git/salt/main                                                    [15:16:53]
(⌐■_■) % git checkout v2016.11.8
Note: checking out 'v2016.11.8'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 9ba1f6112f... Don't allow path separators in minion ID
(git) 9ba1f611  v2016.11.8
erik ~/git/salt/main                                                    [15:17:00]
(⌐■_■) % docker run --rm -it -v $PWD:/testing terminalmage/issues:44150
[root@15716fb36951 /]# cat /srv/salt/test.sls
asdasd:
 pkg.installed:
  - name: audit
  - version: '2.4'
[root@15716fb36951 /]# salt-call state.sls test
[ERROR   ] org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[ERROR   ] Command '['yum', '-y', 'install', 'audit-2.4']' failed with return code: 1
[ERROR   ] stdout: Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirrors.usc.edu
 * epel: mirror.us.leaseweb.net
 * extras: mirror.math.princeton.edu
 * updates: mirror.solarvps.com
No package audit-2.4 available.
Error: Nothing to do
[ERROR   ] retcode: 1
[ERROR   ] Error occurred installing package(s). Additional info follows:

errors:
    - Loaded plugins: fastestmirror, ovl
      Loading mirror speeds from cached hostfile
       * base: mirrors.usc.edu
       * epel: mirror.us.leaseweb.net
       * extras: mirror.math.princeton.edu
       * updates: mirror.solarvps.com
      No package audit-2.4 available.
      Error: Nothing to do
local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: Error occurred installing package(s). Additional info follows:

              errors:
                  - Loaded plugins: fastestmirror, ovl
                    Loading mirror speeds from cached hostfile
                     * base: mirrors.usc.edu
                     * epel: mirror.us.leaseweb.net
                     * extras: mirror.math.princeton.edu
                     * updates: mirror.solarvps.com
                    No package audit-2.4 available.
                    Error: Nothing to do
     Started: 21:26:25.806135
    Duration: 17046.341 ms
     Changes:

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:  17.046 s
[root@15716fb36951 /]#
terminalmage commented 6 years ago

Ahh, OK, so the following circumstances must be present to trigger this:

  1. Package is installed
  2. Package version does not match the version specified in the SLS.
  3. name and version used to specify package name and version.

If you check the PR I linked here, it shows that the fix is labeled for 2016.11.9 and 2017.7.3. I can reproduce using 2016.11.8 and 2017.7.2 but not on the head of the 2016.11 or 2017.7 branches.

As far as I'm concerned, this matter is resolved. You can confirm this fix for yourself using the docker image I've provided.

terminalmage commented 6 years ago

Below are examples of using that docker image to reproduce. The commands were all run from the root of the git checkout.

(git) dc6de050  2016.11 [upstream/2016.11]
erik ~/git/salt/main                                                    [15:57:38]
(⌐■_■) % git checkout v2016.11.8
Note: checking out 'v2016.11.8'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 9ba1f6112f... Don't allow path separators in minion ID
(git) 9ba1f611  v2016.11.8
erik ~/git/salt/main                                                    [15:57:47]
(⌐■_■) % sudo find . -type f -name \*.pyc -delete
[sudo] password for erik:
(git) 9ba1f611  v2016.11.8
erik ~/git/salt/main                                                    [15:57:51]
(⌐■_■) % docker run --rm -it -v $PWD:/testing terminalmage/issues:44150 salt-call state.apply test
[ERROR   ] org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[ERROR   ] An exception occurred in this state: Traceback (most recent call last):
  File "/testing/salt/state.py", line 1765, in call
    **cdata['kwargs'])
  File "/testing/salt/loader.py", line 1705, in wrapper
    return f(*args, **kwargs)
  File "/testing/salt/states/pkg.py", line 1440, in installed
    **kwargs)
  File "/testing/salt/modules/yumpkg.py", line 1233, in install
    if re.match('kernel(-.+)?', name):
  File "/usr/lib64/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/testing/salt/state.py", line 1765, in call
                  **cdata['kwargs'])
                File "/testing/salt/loader.py", line 1705, in wrapper
                  return f(*args, **kwargs)
                File "/testing/salt/states/pkg.py", line 1440, in installed
                  **kwargs)
                File "/testing/salt/modules/yumpkg.py", line 1233, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.7/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 21:58:12.252211
    Duration: 4275.508 ms
     Changes:

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   4.276 s
^[[A%                                                                              (git) 9ba1f611  v2016.11.8
erik ~/git/salt/main                                                    [15:58:18]
(⌐■_■) % git checkout 2016.11                    Previous HEAD position was 9ba1f6112f... Don't allow path separators in minion ID
Switched to branch '2016.11'
Your branch is up to date with 'upstream/2016.11'.
(git) dc6de050  2016.11 [upstream/2016.11]
erik ~/git/salt/main                                                    [15:58:25]
(⌐■_■) % sudo find . -type f -name \*.pyc -delete
(git) dc6de050  2016.11 [upstream/2016.11]
erik ~/git/salt/main                                                    [15:58:27]
(⌐■_■) % docker run --rm -it -v $PWD:/testing terminalmage/issues:44150 salt-call state.apply test
[ERROR   ] org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[ERROR   ] Command '['yum', '-y', 'downgrade', 'audit-2.4']' failed with return code: 1
[ERROR   ] stdout: Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.math.princeton.edu
 * epel: mirror.math.princeton.edu
 * extras: mirror.math.princeton.edu
 * updates: mirrors.xmission.com
No package audit-2.4 available.
Error: Nothing to do
[ERROR   ] retcode: 1
[ERROR   ] Error occurred installing package(s). Additional info follows:

errors:
    - Loaded plugins: fastestmirror, ovl
      Loading mirror speeds from cached hostfile
       * base: mirror.math.princeton.edu
       * epel: mirror.math.princeton.edu
       * extras: mirror.math.princeton.edu
       * updates: mirrors.xmission.com
      No package audit-2.4 available.
      Error: Nothing to do
local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: Error occurred installing package(s). Additional info follows:

              errors:
                  - Loaded plugins: fastestmirror, ovl
                    Loading mirror speeds from cached hostfile
                     * base: mirror.math.princeton.edu
                     * epel: mirror.math.princeton.edu
                     * extras: mirror.math.princeton.edu
                     * updates: mirrors.xmission.com
                    No package audit-2.4 available.
                    Error: Nothing to do
     Started: 21:58:36.299028
    Duration: 4592.194 ms
     Changes:

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   4.592 s
(git) dc6de050  2016.11 [upstream/2016.11]
erik ~/git/salt/main                                                    [15:58:42]
(⌐■_■) % git checkout v2017.7.2
Note: checking out 'v2017.7.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 80d90307b0... Don't allow path separators in minion ID
(git) 80d90307  v2017.7.2
erik ~/git/salt/main                                                    [15:59:02]
(⌐■_■) % sudo find . -type f -name \*.pyc -delete
(git) 80d90307  v2017.7.2
erik ~/git/salt/main                                                    [15:59:04]
(⌐■_■) % docker run --rm -it -v $PWD:/testing terminalmage/issues:44150 salt-call state.apply test
[WARNING ] org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[ERROR   ] An exception occurred in this state: Traceback (most recent call last):
  File "/testing/salt/state.py", line 1843, in call
    **cdata['kwargs'])
  File "/testing/salt/loader.py", line 1795, in wrapper
    return f(*args, **kwargs)
  File "/testing/salt/states/pkg.py", line 1631, in installed
    **kwargs)
  File "/testing/salt/modules/yumpkg.py", line 1415, in install
    if re.match('kernel(-.+)?', name):
  File "/usr/lib64/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/testing/salt/state.py", line 1843, in call
                  **cdata['kwargs'])
                File "/testing/salt/loader.py", line 1795, in wrapper
                  return f(*args, **kwargs)
                File "/testing/salt/states/pkg.py", line 1631, in installed
                  **kwargs)
                File "/testing/salt/modules/yumpkg.py", line 1415, in install
                  if re.match('kernel(-.+)?', name):
                File "/usr/lib64/python2.7/re.py", line 137, in match
                  return _compile(pattern, flags).match(string)
              TypeError: expected string or buffer
     Started: 21:59:11.436672
    Duration: 17499.156 ms
     Changes:

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:  17.499 s
(git) 80d90307  v2017.7.2
erik ~/git/salt/main                                                    [15:59:30]
(⌐■_■) % git checkout 2017.7
Previous HEAD position was 80d90307b0... Don't allow path separators in minion ID
Switched to branch '2017.7'
Your branch is up to date with 'upstream/2017.7'.
(git) d6ccf4bb  2017.7 [upstream/2017.7]
erik ~/git/salt/main                                                    [15:59:35]
(⌐■_■) % sudo find . -type f -name \*.pyc -delete(git) d6ccf4bb  2017.7 [upstream/2017.7]
erik ~/git/salt/main                                                    [15:59:40]
(⌐■_■) % docker run --rm -it -v $PWD:/testing terminalmage/issues:44150 salt-call state.apply test
[WARNING ] org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[ERROR   ] Command '['yum', '-y', 'downgrade', 'audit-2.4']' failed with return code: 1
[ERROR   ] stdout: Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.math.princeton.edu
 * epel: mirror.math.princeton.edu
 * extras: mirror.math.princeton.edu
 * updates: mirrors.xmission.com
No package audit-2.4 available.
Error: Nothing to do
[ERROR   ] retcode: 1
[ERROR   ] Error occurred installing package(s). Additional info follows:

errors:
    - Loaded plugins: fastestmirror, ovl
      Loading mirror speeds from cached hostfile
       * base: mirror.math.princeton.edu
       * epel: mirror.math.princeton.edu
       * extras: mirror.math.princeton.edu
       * updates: mirrors.xmission.com
      No package audit-2.4 available.
      Error: Nothing to do
local:
----------
          ID: asdasd
    Function: pkg.installed
        Name: audit
      Result: False
     Comment: Error occurred installing package(s). Additional info follows:

              errors:
                  - Loaded plugins: fastestmirror, ovl
                    Loading mirror speeds from cached hostfile
                     * base: mirror.math.princeton.edu
                     * epel: mirror.math.princeton.edu
                     * extras: mirror.math.princeton.edu
                     * updates: mirrors.xmission.com
                    No package audit-2.4 available.
                    Error: Nothing to do
     Started: 21:59:52.319738
    Duration: 6843.927 ms
     Changes:

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   6.844 s
stale[bot] commented 5 years ago

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.

terminalmage commented 5 years ago

This was fixed in 2016.11.9 and 2017.7.3 via https://github.com/saltstack/salt/pull/44188.

@saltstack/team-core It can be closed.

stale[bot] commented 5 years ago

Thank you for updating this issue. It is no longer marked as stale.