Failed to do pkg.refresh_db on Windows minion

261 views
Skip to first unread message

Stefan Krüger

unread,
Oct 15, 2019, 5:42:41 AM10/15/19
to Salt-users
Hello,

I try to install some software on a Windows machine, but it did not work, salt said there is no package

salt-run winrepo.update_git_repos
https
://github.com/saltstack/salt-winrepo-ng.git:
   
/srv/salt/win/repo-ng/salt-winrepo-ng
https
://github.com/saltstack/salt-winrepo.git:
   
/srv/salt/win/repo/salt-winrepo
salt v
-s-xxx.domain.de pkg.refresh_db
v
-s-xxx.domain.de:
   
----------
    failed
:
       
0
    success
:
       
0
    total
:
       
0
ERROR
: Minions returned with non-zero exit code


salt v
-s-xxx.domain.de cmd.run 'C:\salt\salt-call -c C:\salt\conf -l debug pkg.refresh_db'
v
-s-xxx.domain.de:
   
[DEBUG   ] Reading configuration from C:\salt\conf\minion
   
[DEBUG   ] Including configuration from 'C:\salt\conf\minion.d\_schedule.conf'
   
[DEBUG   ] Reading configuration from C:\salt\conf\minion.d\_schedule.conf
   
[DEBUG   ] Using cached minion ID from c:\salt\conf\minion_id: v-s-xxx.domain.de
   
[DEBUG   ] Configuration file path: C:\salt\conf\minion
   
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
   
[DEBUG   ] Grains refresh requested. Refreshing grains.
   
[DEBUG   ] Reading configuration from C:\salt\conf\minion
   
[DEBUG   ] Including configuration from 'C:\salt\conf\minion.d\_schedule.conf'
   
[DEBUG   ] Reading configuration from C:\salt\conf\minion.d\_schedule.conf
   
[DEBUG   ] Connecting to master. Attempt 1 (infinite attempts)
   
[DEBUG   ] Master URI: tcp://194.94.xxx.yyy:4506
   
[DEBUG   ] Popen(['git', 'version'], cwd=C:\WINDOWS\system32\config\systemprofile, universal_newlines=False, shell=None)
   
[DEBUG   ] Initializing new AsyncAuth for ('c:\\salt\\conf\\pki\\minion', 'v-s-xxx.domain.de', 'tcp://194.94.xxx.yyy:4506')
   
[DEBUG   ] Generated random reconnect delay between '1000ms' and '11000ms' (3553)
   
[DEBUG   ] Setting zmq_reconnect_ivl to '3553ms'
   
[DEBUG   ] Setting zmq_reconnect_ivl_max to '11000ms'
   
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('c:\\salt\\conf\\pki\\minion', 'v-s-xxx.domain.de', 'tcp://194.94.xxx.yyy:4506', 'clear')
   
[DEBUG   ] Connecting the Minion to the Master URI (for the return server): tcp://194.94.xxx.yyy:4506
   
[DEBUG   ] Trying to connect to: tcp://194.94.xxx.yyy:4506
   
[DEBUG   ] salt.crypt.get_rsa_pub_key: Loading public key
   
[DEBUG   ] Decrypting the current master AES key
   
[DEBUG   ] salt.crypt.get_rsa_key: Loading private key
   
[DEBUG   ] salt.crypt._get_key_with_evict: Loading private key
   
[DEBUG   ] Loaded minion key: c:\salt\conf\pki\minion\minion.pem
   
[DEBUG   ] salt.crypt.get_rsa_pub_key: Loading public key
   
[DEBUG   ] Closing AsyncZeroMQReqChannel instance
   
[DEBUG   ] Connecting the Minion to the Master publish port, using the URI: tcp://194.94.xxx.yyy:4505
   
[DEBUG   ] salt.crypt.get_rsa_key: Loading private key
   
[DEBUG   ] Loaded minion key: c:\salt\conf\pki\minion\minion.pem
   
[DEBUG   ] Determining pillar cache
   
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('c:\\salt\\conf\\pki\\minion', 'v-s-xxx.domain.de', 'tcp://194.94.xxx.yyy:4506', 'aes')
   
[DEBUG   ] Initializing new AsyncAuth for ('c:\\salt\\conf\\pki\\minion', 'v-s-xxx.domain.de', 'tcp://194.94.xxx.yyy:4506')
   
[DEBUG   ] Connecting the Minion to the Master URI (for the return server): tcp://194.94.xxx.yyy:4506
   
[DEBUG   ] Trying to connect to: tcp://194.94.xxx.yyy:4506
   
[DEBUG   ] salt.crypt.get_rsa_key: Loading private key
   
[DEBUG   ] Loaded minion key: c:\salt\conf\pki\minion\minion.pem
   
[DEBUG   ] Closing AsyncZeroMQReqChannel instance
   
[DEBUG   ] LazyLoaded jinja.render
   
[DEBUG   ] LazyLoaded yaml.render
   
[DEBUG   ] LazyLoaded pkg.refresh_db
   
[DEBUG   ] LazyLoaded direct_call.execute
   
[DEBUG   ] Refreshing pkg metadata db for saltenv 'base' (age of existing metadata is 0:00:33.327773)
   
[INFO    ] Removing all *.sls files under 'c:\salt\var\cache\salt\minion\files\base\win\repo-ng'
   
[INFO    ] Fetching *.sls files from salt://win/repo-ng/
   
[DEBUG   ] LazyLoaded cp.cache_dir
   
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('c:\\salt\\conf\\pki\\minion', 'v-s-xxx.domain.de', 'tcp://194.94.xxx.yyy:4506', 'aes')
   
[DEBUG   ] Initializing new AsyncAuth for ('c:\\salt\\conf\\pki\\minion', 'v-s-xxx.domain.de', 'tcp://194.94.xxx.yyy:4506')
   
[DEBUG   ] Connecting the Minion to the Master URI (for the return server): tcp://194.94.xxx.yyy:4506
   
[DEBUG   ] Trying to connect to: tcp://194.94.xxx.yyy:4506
   
[INFO    ] Caching directory 'win/repo-ng/' for environment 'base'
   
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('c:\\salt\\conf\\pki\\minion', 'v-s-xxx.domain.de', 'tcp://194.94.xxx.yyy:4506', 'aes')
   
[DEBUG   ] Initializing new AsyncAuth for ('c:\\salt\\conf\\pki\\minion', 'v-s-xxx.domain.de', 'tcp://194.94.xxx.yyy:4506')
   
[DEBUG   ] Connecting the Minion to the Master URI (for the return server): tcp://194.94.xxx.yyy:4506
   
[DEBUG   ] Trying to connect to: tcp://194.94.xxx.yyy:4506
   
[DEBUG   ] Closing AsyncZeroMQReqChannel instance
   
[DEBUG   ] LazyLoaded nested.output
   
local:
       
----------
        failed
:
           
0
        success
:
           
0
        total
:
           
0
ERROR
: Minions returned with non-zero exit code



salt v
-s-xxx.domain.de pkg.install vlc
v
-s-xxx.domain.de:
   
----------
    vlc
:
       
Unable to locate package vlc
does someone have an idea why this happens?

Stefan Krüger

unread,
Oct 15, 2019, 8:10:31 AM10/15/19
to Salt-users
OK it looks like that salt use the gitfs instead

fileserver_backend:
  - git
gitfs_provider: gitpython
gitfs_remotes:
  - ssh://g***@git.***.de/salt/saltstack.git:
    - root: states

ext_pillar:
  - git:
    - master g***@git.***.de:salt/saltstack.git:
      - root: pillars


so, how can i configure winrepo_dir_ng to push all the data to the git?

Dafydd Jones (techneg.it)

unread,
Oct 15, 2019, 11:07:32 AM10/15/19
to salt-...@googlegroups.com
These days salt-run winrepo.update_git_repos is redundant.

Just add another gitfs_remote such as:
gitfs_remotes:
    - https://github.com/saltstack/salt-winrepo-ng.git:
        - mountpoint: salt://win/repo-ng/salt-winrepo-ng


HTH,
Dafydd

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/f3d448f4-ee00-465c-b5b3-4fefd7ab2ba5%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages