Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-07-04

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 badon left #salt
00:05 onlyanegg joined #salt
00:17 DEger joined #salt
00:20 amcorreia joined #salt
00:41 hemebond saltnpeppa: Not automatically through salt-cloud.
00:42 hemebond Seems most people just use a script that updates it once the host comes up.
00:42 hemebond *VM comes up.
00:46 saltnpeppa hemebond: thx for the feedback
00:53 snath joined #salt
01:01 snath I have a simple salt setup from yesterday that is returning "Failure to Authenticate" messages today.  No changes since yesterday when it was working.  Any ideas?
01:02 hemebond snath: Sounds like something has changed. Master resolving to the correct IP?
01:02 snath yes
01:02 hemebond If you cat the master keys on the minion do they match the master files?
01:03 snath Hmm, now I'm seeing timeouts
01:03 snath working with a friend
01:05 iceyao joined #salt
01:07 iceyao_ joined #salt
01:11 snath one master, 2 minions, 1 is a local minion
01:12 hemebond Which minion is having problems?
01:15 snath both.  doing most testing on the local
01:15 snath servers are at two different providers, Digital Ocean and Kimsufi
01:17 patrek joined #salt
01:18 hemebond So do the keys match on both the master and the minion?
01:28 snath yes.  It worked momentarily and then crapped out again
01:30 snath getting: [TRACE   ] _get_event() waited 5 seconds and received nothing
01:33 snath seems to be working after a reboot
01:36 aarontc joined #salt
01:36 liskl joined #salt
01:46 fannet_ joined #salt
01:46 johnkeates joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.10, 2015.8.10, 2016.3.1 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:49 scoates joined #salt
01:59 hexa- what kind of file content does debconf.set_file except? json dict?
02:05 DEger joined #salt
02:30 Narendra_ joined #salt
02:30 badon joined #salt
02:44 DEger joined #salt
02:44 sjmh joined #salt
03:15 subsignal joined #salt
03:44 fannet_ joined #salt
04:04 racooper joined #salt
04:06 DEger joined #salt
04:08 kshlm joined #salt
04:17 subsignal joined #salt
04:34 hasues joined #salt
04:35 hasues left #salt
04:45 subsignal joined #salt
04:46 onlyanegg joined #salt
04:56 bfig joined #salt
04:56 bfig__ joined #salt
05:02 mosen joined #salt
05:08 DEger joined #salt
05:21 manji joined #salt
05:28 manji joined #salt
05:30 reith joined #salt
05:32 manji joined #salt
05:44 fannet_ joined #salt
05:47 manji joined #salt
05:47 yuhlw_ joined #salt
05:53 felskrone joined #salt
05:55 zz_capri^on joined #salt
05:55 colttt joined #salt
05:58 capri left #salt
06:02 ravenx joined #salt
06:06 DEger joined #salt
06:08 felskrone joined #salt
06:09 evle joined #salt
06:12 onlyanegg joined #salt
06:18 martoss joined #salt
06:26 mohae_ joined #salt
06:26 rdas joined #salt
06:29 kshlm joined #salt
06:38 kawa2014 joined #salt
06:49 DEger joined #salt
06:49 ajv joined #salt
06:54 krymzon joined #salt
06:56 DEger joined #salt
07:02 ruxu joined #salt
07:02 Rumbles joined #salt
07:04 POJO joined #salt
07:06 POJO joined #salt
07:07 POJO joined #salt
07:17 ronnix joined #salt
07:22 DEger joined #salt
07:23 KingJ joined #salt
07:27 POJO joined #salt
07:36 POJO joined #salt
07:41 mosen_ joined #salt
07:42 mosen__ joined #salt
07:47 Rumbles joined #salt
07:48 manji joined #salt
07:52 permalac joined #salt
07:54 bdrung_work joined #salt
07:55 krymzon joined #salt
08:02 ronnix joined #salt
08:04 lero joined #salt
08:20 manji joined #salt
08:24 DEger joined #salt
08:31 dmaiocchi joined #salt
08:34 konstantin joined #salt
08:34 GreatSnoopy joined #salt
08:36 jakshi joined #salt
08:36 jakshi Hello All.
08:37 jakshi May be somebody knows - how to pass variables between pyobject and jinja|yaml?
08:39 kbaikov joined #salt
08:40 jakshi I would like to do some data transformation at pyobject sls file, and then pass results of that transformation to jinja|yaml file
08:41 jakshi in jinja|yaml it can be done with {% set = your_variable_after_transformation %}
08:41 AndreasLutro cross-rendering isn't easily supported like that
08:41 jakshi and then {% from bla import bla-bla with context
08:41 jakshi %}
08:41 AndreasLutro yeah no that's not possible at all afaik
08:41 s_kunk joined #salt
08:41 AndreasLutro from x import y is a jinja feature, salt does nothing to facilitate it
08:42 jakshi yup, I know
08:42 jakshi that's why I'm seeking for knowledge at #salt channel
08:42 AndreasLutro have you considered writing a custom module for your data transformation?
08:42 AndreasLutro that would make it accessible in every renderer
08:43 jakshi let's suppose I write that module, how can I use it in my jinja|yaml then?
08:44 tuxick i found out the firewalld execution module in general doesn't check/return errors
08:44 AndreasLutro {% set my_var = salt['my_module.my_func'](...) %}
08:44 tuxick is that normal for such modules?
08:45 jakshi @AndreasLutro looks good, how to add custom module to salt?
08:45 AndreasLutro tuxick: more than half the modules are completely community-contributed, so yes, expect low code quality
08:45 AndreasLutro jakshi: look it up in the docs/google
08:45 tuxick hmm ok
08:45 * jakshi rtfm
08:45 tuxick guess i'll have some contributions soon then
08:46 tuxick especially "failing silently" is very annoying
08:50 catpig joined #salt
08:51 jhauser joined #salt
08:54 ravenx by default, if i dont specify "requires"
08:54 ravenx does saltstack just tries adn run things in parallel.
08:54 ravenx cuz i think it just tried to build something and it claimed that the file is missing.
08:56 AndreasLutro no, salt states are not ran in parallel
09:00 kbaikov joined #salt
09:05 _mel_ joined #salt
09:09 Elsmorian joined #salt
09:12 N-Mi joined #salt
09:12 N-Mi joined #salt
09:14 onlyanegg joined #salt
09:15 keimlink joined #salt
09:18 reith joined #salt
09:21 ravenx the requires is only for if the "required" state fails?
09:23 AndreasLutro requires also affect the order of states
09:24 ravenx joined #salt
09:26 DEger joined #salt
09:27 hemebond ravenx: (2016-07-04 21:23:23) AndreasLutro: requires also affect the order of states
09:28 ravenx hemebond: thanks.  appreciate that :)
09:28 ravenx and thanks AndreasLutro for the explanation.
09:30 impi joined #salt
09:38 subsignal joined #salt
09:41 tuxick trying to grant access to multiple hosts using mysql_user, how am i supposed to do that?
09:42 hemebond tuxick: That's... a Salt question?
09:42 linjan joined #salt
09:42 tuxick it's a salt module
09:42 hemebond gotta link?
09:42 tuxick https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_user.html
09:43 hemebond Okay so that function creates a user.
09:43 hemebond Oh, doesn't MySQL just use % for "all hosts"?
09:43 Mandorath_ joined #salt
09:43 tuxick i don't want %
09:44 tuxick i want 1 trusted subnet + localhost
09:44 punkoivan joined #salt
09:44 hemebond That's probably something you'll find in the MySQL documentation.
09:44 tuxick yes i know how to do it there
09:44 hemebond How do you do it there?
09:45 punkoivan joined #salt
09:45 tuxick an extra grant statement
09:45 punkoivan left #salt
09:45 tuxick hm
09:45 hemebond Like https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_grants.html
09:45 hemebond ?
09:45 tuxick heh ye i was just looking :)
09:46 hemebond :thumbsup: :smile_sparkle:
09:46 tuxick :)
09:46 fannet_ joined #salt
09:53 jakshi How to add a value to an array in jinja?
09:54 hemebond jakshi: Called a "list" in Python and Jinja.
09:54 hemebond Look for append
09:54 manji .append()
09:55 jakshi {%         slaves_ip.append(slave_a_records[0]) %}    <======================
09:55 jakshi Rendering SLS 'base:database.postgresql' failed: Jinja syntax error: Encountered unknown tag 'slaves_ip'. Jinja was looking for the following tags: 'elif' or 'else' or 'endif'. The innermost block that needs to be closed is 'if'.
09:55 manji jacksontj, use do
09:55 jakshi I see
09:55 manji {% do   slaves_ip.append(slave_a_records[0]) %}
09:56 manji iirc that is :)
09:56 * jakshi testing
09:58 jakshi @manji Thank you a lot, it works :)
09:59 manji hehe
10:00 deus_ex joined #salt
10:05 lero joined #salt
10:07 deus_ex1 joined #salt
10:14 POJO joined #salt
10:20 ravenx i have used the include: - http
10:20 ravenx or rather, i have used it for a jinja include
10:21 ravenx sorry sorry, let me backtrack:
10:21 ravenx i did not use include
10:21 ravenx i used import, of a jinja macro:
10:21 ravenx {% import 'states/bower.sls' as bower %}
10:21 ravenx how can i have my next state require that?
10:22 hemebond If you're just setting up requisites, you don't want to use a Jinja import, but a Salt SLS import.
10:22 hemebond Then you just "require" that other state by its name.
10:22 hemebond https://docs.saltstack.com/en/latest/ref/states/requisites.html
10:23 ravenx well see, in that jinja import
10:23 ravenx is an entire state.
10:26 fredvd joined #salt
10:35 tuxick anyway, got a lot bigger problem with mysql, it fails to run 'create table if not exists'
10:37 tuxick ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
10:41 tuxick not sure if it can be fixed in the module at all
10:44 DEger joined #salt
10:56 toanju joined #salt
10:57 traph joined #salt
10:59 amcorreia joined #salt
11:01 impi joined #salt
11:04 tuxick meh, i'll work around it
11:11 ronnix joined #salt
11:26 DEger joined #salt
11:28 Deliant joined #salt
11:40 subsignal joined #salt
11:47 fannet joined #salt
11:50 KermitTheFragger joined #salt
11:58 punkoivan joined #salt
11:58 permalac Using salt-ssh on 6 identical rosters I have one of them giving Reason: Module 'grains/cmd /anything /pkg ' is not available.
11:58 permalac I've checked with grains.items comparing with the working ones and looks good.
11:59 permalac since is salt-ssh I have no logs on the roster, that I'm aware of .
11:59 punkoivan joined #salt
11:59 permalac what else should I check?
11:59 punkoivan left #salt
12:02 AndreasLutro permalac: try rm -rf on the /tmp directory containing the salt thin client
12:02 AndreasLutro if that doesn't make a difference, run salt-ssh with -l debug, look for SALT_ARGV and run that command on the target host
12:03 ravenx joined #salt
12:04 permalac AndreasLutro, Excelent. Solved and learned. Many thanks.
12:05 numkem joined #salt
12:09 DEger joined #salt
12:18 krymzon joined #salt
12:20 hlub salt-ssh seems to freeze nowadays. Tried with different servers. It prompts for password and then nothing.
12:24 manji hlub, check if it is uploading the thin-client
12:24 manji check the /tmp dir in the dest server
12:34 hlub manji: nothing in /tmp
12:34 manji have you specified where to install the thin client in the master or roster file?
12:35 manji (I don't remember which one)
12:36 hlub I have changed nothing explicitly.
12:37 manji hmm weird
12:38 iceyao joined #salt
12:40 subsignal joined #salt
12:40 guedressel joined #salt
12:41 hosttor joined #salt
12:42 manji joined #salt
12:51 DEger joined #salt
12:52 scc Working with jinja: I would love to extract a number value from my minion ID - any pointers?
12:53 Barbarossa Write a python module including a function doing that (with a regexp f.e.) and call that function from jinja
12:53 scc I was hoping it wouldnt come to that :)
12:54 scc But ok, thanks!
12:54 Barbarossa It's simple
12:54 scc Sure, but something I've not done before
12:55 scc Then again, I still need to do a "learnt something new today", today
12:55 Barbarossa I added some simple regex magic module https://github.com/FreifunkHochstift/ffho-salt-public/blob/master/_modules/ffho.py
12:55 Barbarossa well "magic"
12:56 Barbarossa And then you can just use it
12:56 Barbarossa {%- set peer_config = { 'node' : salt['ffho.re_replace']('[.-]', '_', node) } %}
12:57 scc I see
12:57 scc I'll get on that, cheers
13:00 kus joined #salt
13:00 dyasny joined #salt
13:06 yidhra joined #salt
13:06 JPT joined #salt
13:08 kawa2014 joined #salt
13:11 ronnix joined #salt
13:11 goudale joined #salt
13:14 goudale hi salt
13:14 goudale how can i set VMs names in a cloud.map file ?
13:15 onlyanegg joined #salt
13:21 ravenx is there anyway of getting cmd.run to ignore stderr?
13:22 Phil-Work ravenx, run 'yourcommand 2>/dev/null'
13:23 west575 joined #salt
13:31 kshlm joined #salt
13:33 DEger joined #salt
13:33 ravenx Phil-Work:  thanks
13:35 _mel_ joined #salt
13:41 subsignal joined #salt
13:42 scc Barbarossa, I seems to be failing somewhere: added ffho.py to /srv/salt/_modules, but I get this from jinja, when trying to reference the function: "altRenderError: Jinja variable 'salt.utils.templates.AliasedLoader object' has no attribute 'ffho.re_replace'"
13:43 scc Any suggestion in which direction to head for solving this?
13:44 scc Oh, and I did a saltutil.sync_all
13:44 Barbarossa Did it sync the modules? You should see the name in the output
13:44 scc Yup
13:44 Barbarossa hmm
13:45 Barbarossa You didn't change the names, did you?
13:45 scoates joined #salt
13:45 scc method names?
13:45 Barbarossa module and method, yes
13:46 Barbarossa After the sync_all it "justed worked" for me IIRC
13:46 Barbarossa So no real idea
13:46 scc nope, module should have it's name from the file (ffho.py) and rest is just c/p directly
13:46 scc Hehe pl
13:46 scc *ok
13:48 fannet joined #salt
13:53 ronnix joined #salt
13:58 kawa2014 joined #salt
14:00 honestly what's the opposite of "onfail"
14:01 honestly because I'm too tired/lazy to read through the whole requisites manual page again
14:03 goudale onsuccess ?
14:03 honestly onsuccess doesn't exist
14:04 honestly nvm, cmd.run has "onlyif"
14:05 Hydrosine joined #salt
14:05 Hydrosine joined #salt
14:06 numkem joined #salt
14:08 raj_ joined #salt
14:12 west575 joined #salt
14:15 DEger joined #salt
14:17 west575_ joined #salt
14:22 west575 joined #salt
14:31 onlyanegg joined #salt
14:34 sjmh joined #salt
14:42 subsignal joined #salt
14:47 krymzon joined #salt
14:57 bluenemo joined #salt
14:57 DEger joined #salt
14:59 lero joined #salt
15:09 writteno1 joined #salt
15:09 badon_ joined #salt
15:09 LostSoul_ joined #salt
15:09 Sketch_ joined #salt
15:09 M-liberdiko1 joined #salt
15:09 M-liberdiko1 joined #salt
15:12 Joe630 joined #salt
15:12 hasues joined #salt
15:16 west575 joined #salt
15:19 subsignal joined #salt
15:23 subsignal joined #salt
15:25 TyrfingMjolnir joined #salt
15:26 west575 joined #salt
15:31 krymzon joined #salt
15:35 krymzon_ joined #salt
15:39 DEger joined #salt
15:43 Trauma joined #salt
15:47 onlyanegg joined #salt
15:55 The_Ball joined #salt
15:56 The_Ball What provides modules in salt. I'm chasing the ceph module: salt-call ceph.get_heartbeats -> Module 'ceph' is not available.
15:58 A||SySt3msG0 joined #salt
16:03 arif-ali joined #salt
16:09 iggy The_Ball: it probably has a dependency that you need to install first
16:10 iggy but seeing as that isn't a standard salt module... there's no telling
16:16 viq I'm playing with slack returner, and I have a couple questions
16:16 viq I guess first one is do all hosts need the API key, or just master?
16:16 manji joined #salt
16:18 iggy depends how your returners are setup
16:18 iggy there's a specific option to route all returns through the master
16:20 manji joined #salt
16:21 DEger joined #salt
16:21 viq do you remember what it is?
16:22 iggy I was just looking for it
16:23 viq ah, apparently event_return, if I'm reading correctly
16:23 viq In master settings
16:23 iggy external job cache
16:24 iggy https://docs.saltstack.com/en/latest/ref/returners/
16:29 viq hm, neither event_return nor ext_job_cache work (with slack)
16:29 iggy then yes, you'll need the key on all the minions
16:29 voileux_ joined #salt
16:30 viq thank you
16:31 viq I was hoping to be able to get output of "salt-run survey.hash '*' pkg.list_upgrades refresh=True" on slack, but seems that's not to be
16:33 subsignal joined #salt
16:34 badon_ joined #salt
16:36 dontrun joined #salt
16:37 hasues left #salt
16:41 p3rror joined #salt
16:49 netjak joined #salt
16:49 netjak hi all
16:49 netjak i have a users state here http://pastebin.com/8CBjn00s
16:50 netjak when i create a new minion i automatucaly runs highstate on it wit reactor
16:50 netjak it runs fine
16:50 netjak but when i run state.highstate manualy it gives me error
16:50 netjak Rendering SLS 'base:users' failed: Jinja variable 'user' is undefined
16:51 netjak it was working just fine before
16:52 netjak how come its unedefiend if it runs fine on bootstrap
16:57 isntall joined #salt
16:57 isntall joined #salt
16:58 bfig_ joined #salt
16:58 bfig___ joined #salt
17:00 netjak makes no sense, it was working yesterday
17:00 netjak actually on friday
17:03 DEger joined #salt
17:04 west575 joined #salt
17:07 saltnpeppa_ joined #salt
17:07 saltnpeppa_ hi all, does anyone know what the salt client is doing when its fetching from these hidden folders on the salt master?  Fetching file from saltenv 'dev', ** done ** '_grains/is_http.py'
17:08 iggy netjak: and pillar.get on the minion shows valid pillar data?
17:08 iggy saltnpeppa_: it's syncing grains to the minion
17:09 noraatepernos joined #salt
17:09 saltnpeppa_ iggy: oh ok thx, do i need this _grains folder? im getting an exception on this py script
17:10 saltnpeppa_ i dont see it in our production environment
17:10 iggy it means you already have that
17:10 saltnpeppa_ the _grains folder that is
17:10 iggy it's in the dev saltenv
17:10 iggy as the log message says
17:10 saltnpeppa_ yep, i see the folder _grains but on the minion, i get an exception  "Failed to load grains defined in grain file is_http.more_infos"
17:11 saltnpeppa_ wondering if i can just remove it
17:12 iggy you'd have to remove it from your master first
17:12 noraatepernos I use salt for deployment from git and I’m wondering which of these options triggers “git reset --hard origin/master” under the hood.  Looking here and not sure about force vs force_fetch vs force_reset.  We use production master always.
17:12 iggy or just fix it
17:12 netjak iggy: yes, pillar.get users return my user
17:12 saltnpeppa_ ok thx iggy
17:12 noraatepernos Should I just set force_*: True?  Because I really don’t care if any changes have been made on the minion.
17:12 netjak so minion is created via salt-cloud, highstate ran successfully
17:12 iggy saltnpeppa_: that's definitely not something salt depends on, so feel free to blast away at will
17:12 saltnpeppa_ very cool
17:13 netjak after that i run it manualy and i get compile error
17:16 iggy netjak: can you paste the full output of `salt-call state.highstate` on the minion??
17:16 netjak any idea?
17:16 manji joined #salt
17:17 impi joined #salt
17:17 netjak iggy: http://pastebin.com/GuUnLzw9
17:18 iggy that wasn't as illuminating as I thought it'd be
17:19 netjak yeah
17:19 netjak restarted both master and minion, refreshed pllar
17:19 netjak dunno what else to do
17:20 iggy can you paste the output of pillar.get users?
17:22 iggy and f u pastebin.com... I don't want your shitty flash ads that bring chrome to it's knees and I don't want a "pro" account
17:22 noraatepernos file.managed “Unable to manage file: string indices must be integers, not str” is very hard to debug :(
17:22 netjak hh
17:22 tuxick parsing salt logs is rather painful ye
17:23 noraatepernos It’s like some super vague  python error…to me at least.
17:23 tuxick and no context, i guess?
17:23 tuxick "parse error somewhere"
17:23 noraatepernos https://github.com/saltstack/salt/issues/21799 then read for an hour and no solution.
17:23 saltstackbot [#21799][MERGED] Unable to manage file: string indices must be integers, not str | Once in a while we see this error coming by whenever we run highstates....
17:24 netjak iggy: i just removed keys
17:24 netjak http://pastebin.com/C6ZUHVrR
17:25 babilen http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
17:25 netjak ok ok :)
17:25 babilen Do us and yourself a favour and never open pastebin.com again
17:26 netjak np :)
17:27 noraatepernos I’m on 2015.5.3 and still have this issue.  So weird.  Are dashes not allowed in filenames or something weird like that?
17:27 iggy noraatepernos: for state names? no
17:27 iggy use underscores
17:28 iggy in fact, anything remotely related to python, always use underscores
17:30 * babilen tries to use …
17:30 iggy netjak: quite odd... I don't see anything out of the ordinary
17:31 netjak now i created a new instance with salt-cloud and it dod not create myuser
17:33 netjak gonna try later again
17:33 netjak gotta run
17:33 netjak 10x
17:39 numkem joined #salt
17:40 _W_ joined #salt
17:40 subsignal joined #salt
17:40 impi joined #salt
17:43 debian112 joined #salt
17:45 DEger joined #salt
17:47 onlyanegg joined #salt
17:50 fannet joined #salt
17:57 ronnix joined #salt
18:08 hamsham joined #salt
18:12 POJO joined #salt
18:15 amcorreia joined #salt
18:18 saltnpeppa is it possible to change the minion schedule after the initial schedule has been sent to the minion
18:24 s_kunk joined #salt
18:27 DEger joined #salt
18:35 hosttor joined #salt
18:46 manji joined #salt
18:50 manji joined #salt
18:50 GreatSnoopy joined #salt
18:57 manji joined #salt
18:57 felskrone joined #salt
18:59 babilen saltnpeppa: Just update the respective pillar
19:03 DEger joined #salt
19:08 toanju joined #salt
19:21 WildPikachu left #salt
19:23 felskrone joined #salt
19:36 subsignal joined #salt
19:46 amcorreia joined #salt
19:48 deus_ex joined #salt
19:49 viq https://docs.saltstack.com/en/latest/ref/engines/all/salt.engines.logstash.html#module-salt.engines.logstash  - is the "tag" there what the engine will search for and send only those events to logstash?
19:50 arif-ali joined #salt
20:00 manji joined #salt
20:05 lero joined #salt
20:09 keldwud joined #salt
20:23 manji joined #salt
20:24 badon_ joined #salt
20:27 fxhp joined #salt
20:29 west575 joined #salt
20:56 traph_ joined #salt
21:13 oida joined #salt
21:17 badon_ joined #salt
21:24 badon joined #salt
21:41 cyborg-one joined #salt
21:49 yidhra joined #salt
21:51 fannet joined #salt
22:10 lero joined #salt
22:34 zenlot joined #salt
22:35 POJO joined #salt
22:40 yidhra joined #salt
22:56 Sammichmaker joined #salt
23:02 badon_ joined #salt
23:16 vike1 joined #salt
23:18 vike1 left #salt
23:32 SheetiS joined #salt
23:52 fannet joined #salt
23:52 stickmack joined #salt
23:57 cliffstah joined #salt
23:58 sknebel joined #salt

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary