salt: win_pkg: help, winrepo-ng package not found or no files report with pkg.refresh_db
Description of Issue/Question
salt and salt-call cannot install anything from the winrepos. The package xyz not found in the repository.
(specifically, trying to install nsclient from the winrepo-ng
Setup
file_roots:
base:
- /srv/salt/states/base
- /srv/formulas/nagios-formula
development:
- /srv/salt/states/development
production:
- /srv/salt/states/production
pillar_roots:
base:
- /srv/salt/pillars/base
development:
- /srv/salt/pillars/development
production:
- /srv/salt/pillars/production
Windows Software Repo settings #####
Location of the repo on the master: I had to change this from /srv/salt/win/repo since winrepo-ng and all it’s sls files are pulled by git into this directory.
win_repo: '/srv/salt/win/repo-ng/salt-winrepo-ng'
Location of the master’s repo cache file: This is correct.
#win_repo_mastercachefile: '/srv/salt/win/repo/winrepo.p'
List of git repositories to include with the local repo:
win_gitrepos: Does this need to be enabled?
- 'https://github.com/saltstack/salt-winrepo.git'
Steps to Reproduce Issue
salt-call debug logging does not show anything specific to the issue except package xyz not found in the repository.
Versions Report
master:
salt --versions-report
Salt Version:
Salt: 2015.8.8.2
Dependency Versions:
Jinja2: 2.7.2
M2Crypto: Not Installed
Mako: 0.9.1
PyYAML: 3.10
PyZMQ: 14.0.1
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.4
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.5
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
libgit2: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.3.0
mysql-python: 1.2.3
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: 0.8.2
timelib: Not Installed
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-74-generic
system: Ubuntu 14.04 trusty
minion:
PS C:\salt> .\salt-call.bat --versions-report
Salt Version:
Salt: 2015.8.8
Dependency Versions:
Jinja2: 2.7.3
M2Crypto: Not Installed
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 14.7.0
Python: 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)]
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.2
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
libgit2: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: 0.3.7
smmap: Not Installed
timelib: Not Installed
System Versions:
dist:
machine: AMD64
release: 2012ServerR2
system: 2012ServerR2 6.3.9600 Multiprocessor Free
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 38 (13 by maintainers)
@SaltMPA The
adobereader-dc-classic.sls
is a software definition file. It tells salt where the installer is, how to install it, how to uninstall it, etc. Salt uses the information within this file to install the software. Since you specified a location on the salt file server usingsalt://
thepkg.install
function will cache that file from the salt master to the minion upon execution. It will then execute that file locally with the installer parameters described in your software definition file.As Damon said,
pkg.refresh_db
copies only the.sls
files and generates the local message pack file from those files. This is to avoid copying down every piece of software on the master every time you do apkg.refresh_db
.Some of the common problems I’ve seen with people trying to get their packages to work is the full_name must match exactly what shows up in
add/remove programs
. Another is the version, which must also match.The error you’re seeing though is produced by the following code:
which looks like maybe the name of the package in your state file doesn’t match exactly what’s in your software definition file. This error is occurring before the minion attempts to cache anything down from the master. It’s not finding that package name in the message pack file.
Since I don’t know what your state file looks like I would have you check to make sure it’s something like this:
Another thing to watch is multiple software definition files for the same installer in the repo. Are there other software definition files in the
/srv/salt/win/repo-ng/
directory that also have a name ofadobereader-dc-classic
. It’s kind of a last one wins scenario. So, maybe your software definition file is correct, but it’s being overwritten by another with the same name.There could also be a problem with the YAML/JINJA that is causing the software definition file not to render properly and therefore is not included in the message pack file… This may be more likely. Did you get an errors when you ran
pkg.refresh_db
?You can check that your sls is parsing correctly by running the following command:
Anyway, just guessing at a few things here. I hope this is helpful.