I have a custom created repository, and receive an error when trying to install packages through pkg.installed or pkg.latest on Debian and RedHat.
pkg.installed:
- pkgs:
- kav4fs
- klnagent
The same thing if i trying to use a specific versions of packages.
pkg.latest can't find any info about my packages.
Function: pkg.installed
Result: False
Comment: The following packages failed to install/update: klnagent, kav4fs
Started: 11:10:21.320690
Duration: 31866.899 ms
Changes:
----------
kav4fs.i386:
----------
new:
8.0.4-312
old:
klnagent.i386:
----------
new:
10.1.0-101
old:
[INFO ] Running state [kaspersky] at time 11:10:21.320688
[INFO ] Executing state pkg.installed for kaspersky
[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.
[INFO ] Executing command ['yum', '--quiet', 'clean', 'expire-cache'] in directory '/root'
[DEBUG ] output:
[INFO ] Executing command ['yum', '--quiet', 'check-update', '--setopt=autocheck_running_kernel=false'] in directory '/root'
[DEBUG ] Failed to get holds, versionlock plugin is probably not installed
[INFO ] Executing command ['systemd-run', '--scope', 'yum', '-y', 'install', 'klnagent', 'kav4fs'] in directory '/root'
[INFO ] Executing command ['rpm', '-qa', '--queryformat', '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'] in directory '/root'
[ERROR ] Made the following changes:
'klnagent.i386' changed from 'absent' to '10.1.0-101'
'kav4fs.i386' changed from 'absent' to '8.0.4-312'
Salt Version:
Salt: 2016.11.8
Dependency Versions:
cffi: Not Installed
cherrypy: unknown
dateutil: 1.5
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, May 3 2017, 07:55:04)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: redhat 7.4 Maipo
machine: x86_64
release: 3.10.0-693.5.2.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.4 Maipo
@Freezelight Thanks for the report. Can you check the output of the Salt module pkg.list_pkgs and see if your custom packages are listed as installed?
Hello.
Yes, but something wrong with package version:
salt -v '*' pkg.list_pkgs |grep kav4fs
kav4fs.i386:
salt -v '*' pkg.list_pkgs |grep klnagent
klnagent.i386:
And:
rpm -qa |grep kav4fs
kav4fs-8.0.4-312.i386
rpm -qa |grep klnagent
klnagent-10.1.0-101.i386
Hello.
Can someone give me an advice about it?
I think this is by design.
Try:
----------
pkg.installed:
- pkgs:
- kav4fs.i386
- klnagent.i386
I just ran into a s similar issue dealing with i386 packages.
I am having this same issue and updating the format did not fix the issue:
[INFO ] Running state [managesoft] at time 16:17:02.516598
[INFO ] Executing state pkg.installed for managesoft
[DEBUG ] Could not LazyLoad pkg.normalize_name: 'pkg.normalize_name' is not available.
[DEBUG ] Could not LazyLoad pkg.check_db: 'pkg.check_db' is not available.
[INFO ] Executing command ['apt-cache', '-q', 'policy', 'managesoft'] in directory '/root'
[DEBUG ] Could not LazyLoad pkg.normalize_name: 'pkg.normalize_name' is not available.
[INFO ] Executing command ['apt-get', '-q', 'update'] in directory '/root'
[INFO ] Executing command ['dpkg', '--get-selections', '*'] in directory '/root'
[INFO ] Executing command ['systemd-run', '--scope', 'apt-get', '-q', '-y', '-o', 'DPkg::Options::=--force-confold', '-o', 'DPkg::Options::=--force-confdef', '--allow-unauthenticated', 'install', 'managesoft'] in directory '/root'
[INFO ] Executing command ['dpkg-query', '--showformat', '${Status} ${Package} ${Version} ${Architecture}\n', '-W'] in directory '/root'
[ERROR ] Made the following changes:
'managesoft:i386' changed from 'absent' to '12.4.0'
Here is the output from the dpkg-query commmand:
root@usgbtubu10:~# dpkg-query --showformat '${Status} ${Package} ${Version} ${Architecture}\n' -W managesoft
install ok installed managesoft 12.4.0 i386
Here is the relevant portion of the state:
managesoft:
pkg.installed:
- skip_verify: True
- pkgs:
- managesoft
- require:
- file: mgsft_rollout_response
Versions:
`Salt Version:
Salt: 2016.11.9
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
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.7.12 (default, Dec 4 2017, 14:50:18)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
machine: x86_64
release: 4.8.0-36-generic
system: Linux
version: Ubuntu 16.04 xenial
`
This can happens when package with different name is installed instead specified package. I'm not even sure that it's need to be fixed. For example:
# apt-get -s install php7.2-redis
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php-redis' instead of 'php7.2-redis'
The following packages will be upgraded:
php-redis
1 upgraded, 0 newly installed, 0 to remove and 72 not upgraded.
Inst php-redis [3.1.6-1+0~20180104152216.4+stretch~1.gbp3cf38a] (4.0.0-1+0~20180412074133.5+stretch~1.gbp24a357 packages.sury.org [amd64])
Conf php-redis (4.0.0-1+0~20180412074133.5+stretch~1.gbp24a357 packages.sury.org [amd64])
Note this line:
Note, selecting 'php-redis' instead of 'php7.2-redis'
Also in this case pkg.installed upgrade that package although it should not. State code:
php_pkgs:
pkg.installed:
- pkgs:
- php7.2-bcmath
- php7.2-curl
- php7.2-gd
- php7.2-mbstring
- php7.2-pgsql
- php7.2-redis
- php7.2-xml
- php7.2-zip
Output:
ID: php_pkgs
Function: pkg.installed
Result: False
Comment: The following packages failed to install/update: php7.2-redis
The following packages were already installed: php7.2-zip, php7.2-gd, php7.2-pgsql, php7.2-curl, php7.2-bcmath, php7.2-xml, php7.2-mbstring
Started: 16:18:55.116879
Duration: 3237.159 ms
Changes:
----------
php-redis:
----------
new:
4.0.0-1+0~20180412074133.5+stretch~1.gbp24a357
old:
3.1.6-1+0~20180104152216.4+stretch~1.gbp3cf38a
Minion log:
[salt.state :1795][INFO ][10514] Executing state pkg.installed for [php_pkgs]
[salt.utils.lazy :103 ][DEBUG ][10514] Could not LazyLoad pkg.resolve_capabilities: 'pkg.resolve_capabilities' is not available.
[salt.utils.lazy :103 ][DEBUG ][10514] Could not LazyLoad pkg.normalize_name: 'pkg.normalize_name' is not available.
[salt.utils.lazy :103 ][DEBUG ][10514] Could not LazyLoad pkg.check_db: 'pkg.check_db' is not available.
[salt.loaded.int.module.cmdmod:385 ][INFO ][10514] Executing command [u'apt-cache', u'-q', u'policy', u'php7.2-redis'] in directory '/root'
[salt.utils.lazy :103 ][DEBUG ][10514] Could not LazyLoad pkg.normalize_name: 'pkg.normalize_name' is not available.
[salt.loaded.int.module.cmdmod:385 ][INFO ][10514] Executing command [u'apt-get', u'-q', u'update'] in directory '/root'
[salt.loaded.int.module.cmdmod:385 ][INFO ][10514] Executing command [u'dpkg', u'--get-selections', u'*'] in directory '/root'
[salt.loaded.int.module.cmdmod:385 ][INFO ][10514] Executing command [u'systemd-run', u'--scope', u'apt-get', u'-q', u'-y', u'-o', u'DPkg::Options::=--force-confold', u'-o', u'DPkg::Options::=--force-confdef', u'install', u'php7.2-redis'] in directory '/root'
[salt.loaded.int.module.cmdmod:385 ][INFO ][10514] Executing command [u'dpkg-query', u'--showformat', u'${Status} ${Package} ${Version} ${Architecture}', u'-W'] in directory '/root'
[salt.state :292 ][ERROR ][10514] Made the following changes:
'php-redis' changed from '3.1.6-1+0~20180104152216.4+stretch~1.gbp3cf38a' to '4.0.0-1+0~20180412074133.5+stretch~1.gbp24a357'
So minion tries to find is specified package installed. Found that is not installed. Install it and then check again and found that is still not installed.
Salt Version:
Salt: 2018.3.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: Not Installed
gitdb: 2.0.0
gitpython: 2.1.1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: 1.3.7
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.13 (default, Nov 24 2017, 17:33:09)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.1
timelib: Not Installed
Tornado: 4.4.3
ZMQ: 4.2.1
System Versions:
dist: debian 9.4
locale: UTF-8
machine: x86_64
release: 4.9.0-6-amd64
system: Linux
version: debian 9.4
This is a problem when upgrading the kernel. The state reports failed when in reality it was a success.
'pkg_|-upgrade_held_kernel_|-kernel_|-latest': {'__id__': 'upgrade_held_kernel',
'__run_num__': 7,
'__sls__': 'yum.upgrade_held_kernel_pkgs',
'changes': {'kernel': {'new': '3.10.0-957.el7,3.10.0-862.11.6.el7,3.10.0-862.6.3.el7',
'old': '3.10.0-862.11.6.el7,3.10.0-862.6.3.el7'}},
'comment': 'The '
'following '
'packages '
'failed '
'to '
'update: '
'kernel',
'duration': 118269.24,
'name': 'kernel',
'result': False,
'start_time': '13:19:47.786159'},
And this is from the minion log
2018-11-15 13:21:45,636 [salt.state :320 ][ERROR ][4242] Made the following changes:
'kernel' changed from '3.10.0-862.11.6.el7,3.10.0-862.6.3.el7' to '3.10.0-957.el7,3.10.0-862.11.6.el7,3.10.0-862.6.3.el7'
Versions report:
Salt Version:
Salt: 2018.3.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.5
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.28.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.7.5 (default, Sep 12 2018, 05:31:16)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: redhat 7.6 Maipo
locale: UTF-8
machine: x86_64
release: 3.10.0-862.11.6.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.6 Maipo
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.
Most helpful comment
This is a problem when upgrading the kernel. The state reports failed when in reality it was a success.
And this is from the minion log
Versions report: