pkg.refresh_db for windows makes winrepo.p only in repo not in reppo-ng

616 views
Skip to first unread message

marwooj

unread,
Jan 27, 2016, 5:28:04 AM1/27/16
to Salt-users
How to configure salt for using winrepo-ng?

There is  "Unable to locate package firefox" in minion logs

Morever I am always getting "Minion did not return. [No response]" for windows minion ping while for linux minion responds are lighting fast.

I also see test.ping job in windows minion logs.

Regards.



marwooj

unread,
Jan 27, 2016, 5:30:13 AM1/27/16
to Salt-users
ENV IS :
salt 2015.8.3 (Beryllium)
and 

marwooj

unread,
Jan 27, 2016, 9:16:11 AM1/27/16
to Salt-users
Added 
multiprocessing: False

So I can ping now :-).

Now I need to resolve "Unable to locate package firefox"


W dniu środa, 27 stycznia 2016 11:28:04 UTC+1 użytkownik marwooj napisał:

Megan Wilhite

unread,
Jan 27, 2016, 11:25:27 AM1/27/16
to Salt-users
Looks like there is documentation to set up winrepo for salt  here: https://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html

There are also available sls files to use to be able to install packages located here: https://docs.saltstack.com/en/latest/ref/configuration/master.html

marwooj

unread,
Jan 28, 2016, 6:17:01 AM1/28/16
to Salt-users
It looks like all of these settings are set by default, and there is no need to configure anything.

The strange part is that:
sudo salt -G 'os:windows' pkg.list_pkgs
works just fine
but when I try to purge something that is already installed, I am getting:

----------
    Notepad++:
        Unable to locate package Notepad++ 

Regards

Megan Wilhite

unread,
Jan 28, 2016, 7:19:08 PM1/28/16
to Salt-users
I actually have never setup the windows repository so I apologize in advanced if my response is not helpful.


Seems this is required in order to install or uninstall a package. If you add a sls file i believe you have to regenerate your repo again as a side note 

2. If the above doesn't help is there anything useful in your master or minion debug logs?

marwooj

unread,
Jan 29, 2016, 3:47:26 AM1/29/16
to Salt-users
1. I think SLS file is downloaded from git repo  when you do:
sudo salt-run winrepo.update_git_repos
and it is located in:
/srv/salt/win/repo-ng/salt-winrepo-ng/firefox.sls

Doc says there is no need for :
sudo salt-run winrepo.genrepo
after salt 2015.0 and I have 2015.8.3

I do not see anything interesting in trace:



MASTER
2016-01-28 23:18:57,909 [salt.master                                         ][INFO    ][15054] User sudo_marwooj Published command pkg.install with jid 20160128231857900144
2016-01-28 23:18:57,909 [salt.master                                         ][DEBUG   ][15054] Published command details {'tgt_type': 'grain', 'jid': '20160128231857900144', 'tgt': 'os:windows', 'ret': '', 'user': 'sudo_marwooj', 'arg': ['Mozilla Firefox 44.0 (x86 en-US)'], 'fun': 'pkg.install'}
2016-01-28 23:18:57,913 [salt.utils.lazy  ][DEBUG   ][16470] LazyLoaded local_cache.get_load
2016-01-28 23:18:57,914 [salt.client      ][DEBUG   ][16470] get_iter_returns for jid 20160128231857900144 sent to set(['DESKTOP-TEST']) will timeout at 23:19:57.913479
2016-01-28 23:18:58,358 [salt.utils.lazy                                     ][DEBUG   ][15058] LazyLoaded local_cache.prep_jid
2016-01-28 23:18:58,464 [salt.utils.job                                      ][INFO    ][15058] Got return from DESKTOP-TEST for job 20160128231857900144
2016-01-28 23:18:58,465 [salt.utils.event                                    ][DEBUG   ][15058] Sending event - data = {'fun_args': ['Mozilla Firefox 44.0 (x86 en-US)'], 'jid': '20160128231857900144', 'return': {'Mozilla Firefox 44.0 (x86 en-US)': 'Unable to locate package Mozilla Firefox 44.0 (x86 en-US)'}, 'retcode': 0, 'success': True, 'cmd': '_return', '_stamp': '2016-01-28T22:18:58.465075', 'fun': 'pkg.install', 'id': 'DESKTOP-TEST'}
2016-01-28 23:18:58,479 [salt.client      ][DEBUG   ][16470] jid 20160128231857900144 return from DESKTOP-TEST

MINION
2016-01-29 09:41:21,004 [salt.minion      ][INFO    ][5176] User sudo_marwooj Executing command pkg.install with jid 20160128231857900144
2016-01-29 09:41:21,004 [salt.minion      ][DEBUG   ][5176] Command details {'tgt_type': 'grain', 'jid': '20160128231857900144', 'tgt': 'os:windows', 'ret': '', 'user': 'sudo_marwooj', 'arg': ['Mozilla Firefox 44.0 (x86 en-US)'], 'fun': 'pkg.install'}
2016-01-29 09:41:21,020 [salt.minion      ][INFO    ][5176] Starting a new job with PID 5176
2016-01-29 09:41:21,095 [salt.utils.lazy  ][DEBUG   ][5176] Could not LazyLoad pkg.normalize_name
2016-01-29 09:41:21,130 [salt.loaded.int.module.win_pkg][ERROR   ][5176] Unable to locate package Mozilla Firefox 44.0 (x86 en-US)
2016-01-29 09:41:21,160 [salt.minion      ][DEBUG   ][5176] Minion return retry timer set to 8 seconds (randomized)
2016-01-29 09:41:21,190 [salt.minion      ][INFO    ][5176] Returning information for job: 20160128231857900144
2016-01-29 09:41:21,205 [salt.transport.zeromq][DEBUG   ][5176] Initializing new AsyncZeroMQReqChannel for ('c:\\salt\\conf\\pki\\minion', 'DESKTOP-TEST', 'tcp://10.8.8.13:4506', 'aes')
2016-01-29 09:41:21,205 [salt.crypt       ][DEBUG   ][5176] Initializing new SAuth for ('c:\\salt\\conf\\pki\\minion', 'DESKTOP-TEST', 'tcp://10.8.8.13:4506')
2016-01-29 09:41:21,534 [salt.minion      ][TRACE   ][5176] ret_val = None




marwooj

unread,
Jan 29, 2016, 6:42:04 AM1/29/16
to Salt-users
I have almost got it:

I had :
file_roots:
  base:
    - /srv/salt/prod
  qa:
    - /srv/salt/qa
    - /srv/salt/prod
  dev:
    - /srv/salt/dev
    - /srv/salt/qa
    - /srv/salt/prod

I have commented these out. And it works now :-)

So now I have to to figure out how to have multiple environments. And winrepos.


W dniu środa, 27 stycznia 2016 11:28:04 UTC+1 użytkownik marwooj napisał:

Megan Wilhite

unread,
Jan 29, 2016, 1:32:31 PM1/29/16
to Salt-users

damona

unread,
Mar 5, 2016, 2:44:59 AM3/5/16
to Salt-users
Did you work this out in the end with the repo-ng .....  There seems to be some missing bits in the doco???

damona

unread,
Mar 6, 2016, 1:29:48 AM3/6/16
to Salt-users

If you have moved the base environment one fix is a symbolic link link below in the file_roots. Otherwise you need to update where master configuration (WINREPO_DIR_NG)
So its within the file_roots
-rw-r--r--. 1 root root 379 Mar  6 16:24 top.sls
lrwxrwxrwx. 1 root root  13 Mar  6 17:20 win -> /srv/salt/win
 
The symbolic link is most likely a better option if you just one copy of it.
Reply all
Reply to author
Forward
0 new messages