Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-08

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

All times shown according to UTC.

Time Nick Message
00:00 quix joined #salt
00:03 CampusD XenophonF: yes that could work
00:03 CampusD perhaps pushing it via GPO
00:03 CampusD we are pushing via puppet to our nix nodes
00:04 CampusD I guess I could write one, pull the files and then run the silent installer
00:06 XenophonF CampusD: i vaguely recall messing around with winexe
00:07 XenophonF i've tried a couple of times to make a msi package for salt
00:07 XenophonF https://gist.github.com/xenophonf/c2351f8af80d3231b547 is how I did it
00:07 XenophonF i was never wholly satisfied with it, thoug
00:07 XenophonF though
00:08 XenophonF and i never finished building an installer that actually completed the few salt-specific bits
00:08 XenophonF like creating c:\salt etc.
00:09 XenophonF never had the time
00:10 CampusD i see
00:12 CampusD perhaps i'll write a powershell script just to pull the intaller and run silently. I have to also pull some custom configs before starting the minion
00:12 CampusD thanks for sharing your work
00:12 amcorreia joined #salt
00:32 rihannon joined #salt
00:36 snc joined #salt
00:37 rihannon I'm getting a ton of "Unable to manage file: list indices must be integers, not str" messages in places where I do:
00:37 rihannon file.managed:
00:37 rihannon source:
00:37 rihannon - path/{{grains['id']}}.conf
00:37 rihannon - path/default.conf
00:38 rihannon Running 2015.8.8.  I've been having this issue for ages.  Is it a known bug?
00:38 hemebond rihannon: What if you use {{ salt['grains.get']('id') }} ?
00:40 LiveviL joined #salt
00:42 LiveviL joined #salt
00:43 quix joined #salt
00:44 LiveviL joined #salt
00:46 LiveviL joined #salt
00:46 rihannon hemebond: hold on.. testing..
00:46 LiveviL joined #salt
00:49 jeffspeff joined #salt
00:49 LiveviL joined #salt
00:52 flowstate joined #salt
00:54 rihannon hemebond: I'm sorry to report that that change had no effect.
00:54 flowstate joined #salt
00:54 hemebond Okay.
00:54 hemebond What if you do "salt myminion grains.get id" ?
00:56 rihannon All minions report their id back correctly.
00:57 hemebond Does the file exist for all minions?
00:57 rihannon Yes.
00:58 rihannon Here's an interesting tid-bit:  It works fine if sent to a single minion, but fails when sent to '*'.
00:58 hemebond Does it affect all minions that try to run this?
00:58 hemebond Aha.
00:58 rihannon No, many minions succeed.
00:58 hemebond Can you see which minions fail?
01:00 rihannon Yes.  I haven't discoverd a pattern yet.
01:02 lero joined #salt
01:04 akhter joined #salt
01:04 hemebond And they still report the id grain?
01:04 hemebond And they have a .conf file?
01:06 rihannon Yes.  Although I have several of these config patterns, the one I'm specifically testing is /etc/ssh/ssh_config.  Even if the grain id failed, I'd expect the entire thing to succeed by falling back to the default config file.
01:07 hemebond Ah, true.
01:08 hemebond What if you put the line in quotes?
01:09 qu9 joined #salt
01:09 rihannon In my sshd state, I have a file named ssh_config, and a directory named ssh_config.d with files named for each grain-id.  Here's an example, not sure where the quotes would go:
01:09 rihannon /etc/ssh/ssh_config:
01:09 rihannon file.managed:
01:09 rihannon - source:
01:09 rihannon - salt://cirt_ssh/ssh_config.d/{{ salt['grains.get']('id') }}
01:09 rihannon - salt://cirt_ssh/ssh_config
01:10 rihannon Hmm, it may be that the hosts which succeed are those which fail back to the default file.  I'll check.
01:12 hemebond The quotes would go around - "salt://..."
01:21 catpigger joined #salt
01:25 myraft joined #salt
01:25 myraft hi
01:25 myraft this is my first go around and trying to tomcat-formula, failing miserably.
01:26 qu9 joined #salt
01:27 myraft why am I getting failure on this
01:27 myraft http://pastebin.com/9VqBLDiQ
01:27 myraft this is pretty simple
01:27 myraft brb
01:27 rihannon hemebond: Nope.  Still fails.
01:28 sagerdearia joined #salt
01:29 rihannon myraft: Looks like indenting. make sure name is under run.
01:30 myraft @rihannon
01:30 myraft @rihannon: which name ? bullet or run all ?
01:32 hemebond myraft: He means "- name" under " - run"
01:32 hemebond It should be indented another level.
01:32 hemebond rihannon: Did you find out if the successful minions are using their custom file or not?
01:34 akhter joined #salt
01:38 myraft @hemebond: did indent - now getting this :Rendering SLS 'base:tomcat' failed: mapping values are not allowed here; line 16
01:39 hemebond I've never put the module and the function on separate lines so I'm looking up the exact syntax/format now.
01:40 mavhq joined #salt
01:40 myraft I will be glad to go with best-practices, only if I know what they are.
01:40 myraft Thanks for helping sir.
01:40 cuonglm joined #salt
01:41 hemebond Oh, it doesn't look like name needs to be indented more.
01:41 quasiben joined #salt
01:41 hemebond What was the actual error?
01:46 myraft Comment: The following requisites were not found: required: cmd: bullet
01:46 myraft I pasted on the same line, so might be hard to read.
01:46 myraft but something about trying to create the directory is messing it up.
01:46 myraft If I run that section i.e. Bullet in it's own init file, runs fine.
01:46 hemebond I don't see the error mentioned anywhere.
01:46 hemebond requisites, okay.
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.8, 2016.3.0rc2 | SaltConf16: http://saltconf.com/register/ | 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:48 hemebond run_all has no command.
01:48 hemebond Unless there is an executable or something called run_all
01:49 myraft true
01:49 myraft let me step back.
01:49 hemebond Is it just me or do the examples in https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.directory have the wrong indentation?
01:49 myraft I just want to setup a /opt/tomcat directory on the minion - How woudl I do that
01:50 myraft so I run into that issue, due to which I changed the indentation.
01:50 myraft ok , begining to clean out the file
01:51 hemebond Are you using the Tomcat formula?
01:51 myraft I tried using the tomcat formula but really not getting it.
01:51 myraft not understanding it.
01:51 myraft basically - I want to copy tomcat.zip from s3 and install
01:51 hemebond Well, in your top.sls you just apply "- tomcat" to a minion.
01:52 hemebond Well in that case you don't want the formula.
01:52 myraft that is why I am trying "my own thing"
01:52 hemebond If you want to download and extract a zip you might want https://docs.saltstack.com/en/latest/ref/states/all/salt.states.archive.html#salt.states.archive.extracted
01:53 myraft so here is a question, now that I have removed everything from init.sls other than one block, how do I ensure order of execution
01:53 myraft I know there is "require", but I am not getting how to use it.
01:53 hemebond But to just create a directory you really just need file.directory like you have for bullet.
01:53 myraft got it.
01:53 myraft let me play around some more and will ask when I have the next block
01:54 hemebond Good luck.
01:54 myraft last question, how do I ensure order ? i.e create directory before unzip - do I use "require" ?
01:54 k_sze[work] joined #salt
01:55 myraft @hemebound: last question, how do I ensure order ? i.e create directory before unzip - do I use "require" ?
01:55 myraft @hemebond: last question, how do I ensure order ? i.e create directory before unzip - do I use "require" ?
01:55 myraft sorry, didn't mean to flood the channel :)
01:55 hemebond The order that they appear in the file and also the requisites/dependencies.
01:56 jagguli joined #salt
01:56 myraft let me read up on requisites and dependencies.
01:56 hemebond So you your file.directory appears first in the SLS it will be executed first.
01:56 myraft ok - let me venture down that path
01:57 beardedeagle joined #salt
01:57 aganders3 joined #salt
01:57 spuder joined #salt
01:59 nZac joined #salt
02:01 aganders3 joined #salt
02:02 liskl joined #salt
02:05 myraft @hemebond: putting the four blocks in sequence got me further than the last 5 hours i.e setup_directory, setup_group, setup_user, get_file
02:05 antpa joined #salt
02:05 myraft let me take a break - this is refreshing.
02:05 hemebond :thumbsup:
02:06 myraft @hemebond: thanks for the sanity check ! thanks for the help.
02:06 hemebond Any time.
02:11 barajasfab joined #salt
02:13 quasiben1 joined #salt
02:16 rihannon joined #salt
02:16 darvon joined #salt
02:18 sk_0 joined #salt
02:20 whitenoise joined #salt
02:23 paydro joined #salt
02:26 mavhq joined #salt
02:27 kshlm joined #salt
02:29 cberndt joined #salt
02:29 antpa joined #salt
02:32 jeffspeff joined #salt
02:36 brianfeister joined #salt
02:41 TheoSLC joined #salt
02:42 quix joined #salt
02:44 mavhq joined #salt
02:48 linziyan joined #salt
02:48 jeffspeff joined #salt
02:48 flowstate joined #salt
02:48 linziyan hi
02:48 linziyan i encounter a problem
02:48 linziyan when i use  "salt '*' state.apply  "
02:48 myraft as a newbee might regret asking this, what problem ?
02:49 linziyan it  returns   "the function 'state.apply' is running and started  balabala"
02:49 linziyan why
02:50 linziyan i follow the tutorial  in doc
02:50 mavhq joined #salt
02:50 myraft trying running the same thing with -l debug
02:50 linziyan with minion  or  master?
02:50 linziyan i tried  with  minion
02:50 linziyan it still be the same
02:51 myraft no I mean when you run it from the master
02:51 linziyan and  i  cant  find any infomation about it
02:51 linziyan ok
02:51 myraft @hemebond: quick question
02:51 linziyan i  try it
02:52 evle joined #salt
02:52 aganders3_ joined #salt
02:53 drawsmcgraw joined #salt
02:53 linziyan still
02:53 linziyan no  further  information  supplied
02:54 myraft so what do you have in your top file
02:54 linziyan can  find ant clues to check
02:54 linziyan just 3 lines
02:54 linziyan 'base:'
02:54 linziyan '*'
02:54 linziyan '- vim'
02:55 akhter joined #salt
02:55 linziyan '*':
02:55 linziyan '- vim'
02:55 myraft ok now create a /srv/salt/vim directory or create a /srv/salt/vim.sls
02:56 myraft in the sls file, do something
02:56 linziyan yes  i  have   /srv/salt/vim.sls
02:57 linziyan vim:
02:57 linziyan pkg:
02:57 linziyan - installed
02:57 linziyan like  this
02:58 antpa joined #salt
02:58 linziyan - The function "state.apply" is running as PID 16153 and was started at 2016, Apr 08 10:57:53.809160 with jid 20160408105753809160 ERROR: Minions returned with non-zero exit code
02:58 linziyan this is  all  the returns
02:58 linziyan i  thought  a little  hard  to find  where is  the problem...
02:59 linziyan i  cant  get  any infomation...
03:00 iceyao joined #salt
03:01 beardedeagle joined #salt
03:02 hemebond linziyan: What is the full command you are running from your master?
03:02 iceyao_ joined #salt
03:02 linziyan salt '*' state.apply
03:03 hemebond That's it? Where is the state you're trying to apply?
03:03 hemebond salt '*' state.apply vim
03:03 linziyan the offcial doc says  salt '*' state.apply   will be enough
03:03 linziyan and  i  tried your command ,too
03:03 hemebond Can you give me a link to that please?
03:04 linziyan still  the same
03:04 linziyan https://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html
03:04 linziyan INSTALL THE PACKAGE Next, let's run the state we created. Open a terminal on the master and run:  salt '*' state.apply
03:05 hemebond Oh it uses the top file. Interesting. I didn't know that.
03:05 linziyan both of  the command
03:05 linziyan cant  get right
03:05 linziyan really confused
03:06 hemebond Can you paste your top.sls and vim.sls files somewhere?
03:06 hemebond (not in here)
03:06 hemebond So I can see it all properly.
03:07 linziyan ok   wait a  moment
03:09 linziyan https://dpaste.de/bxfx
03:09 myraft @hemebond: question, what is difference between using "formula" or doing things in a sequential manner?
03:09 linziyan this is my top.sls  and  vim.sls
03:09 hemebond myraft: A formula is just a state that does stuff, the same way linziyan is creating a state to install vim.
03:09 linziyan how to  @ people in irc..
03:10 jeffspeff joined #salt
03:10 myraft @hemebond: aye - got it. Thanks
03:10 linziyan @hemebond: give you my config
03:11 hemebond myraft: With formulas I don't add them to my file_roots at all, I create a symlink from the base environment directory to the blah_formula/blah/ directory.
03:11 hemebond linziyan: Try this command (replacing the minion name with yours)
03:11 hemebond salt 'myminion' state.apply vim
03:12 linziyan tried ..
03:12 linziyan sad  story..
03:12 myraft so what I need to do is push a tomcat.service to /etc/systemd/system/tomcat.service. The contents of the file is long. how do I do that ? Do I have a local copy on master and just do a COPY command to the minions ?
03:13 hemebond myraft: file.managed
03:14 linziyan I feel my salt stack  career  is closed...
03:14 hemebond linziyan: What is the output?
03:14 myraft don't give up linziyan
03:14 linziyan still the same
03:14 hemebond Try this
03:14 hemebond salt 'myminion' test.ping
03:14 linziyan yeah
03:14 linziyan tried
03:14 linziyan it worked
03:14 myraft @linziyan: I have struggled for two days strainght, learning and now getting some results.
03:15 hemebond Okay, try this
03:15 linziyan the connection is successful
03:15 hemebond salt 'myminion' pkg.install vim
03:15 linziyan ok  i  try
03:16 linziyan dis2:     ----------
03:16 linziyan it seems  successful
03:16 linziyan i think maybe something is wrong with my understanding about state file
03:17 linziyan the salt module command  will be all successful
03:17 hemebond Okay now...
03:17 linziyan so...what's  next...
03:17 hemebond ls /srv/salt/; cat /srv/salt/top.sls; cat /srv/salt/vim.sls
03:17 hemebond I'm assuming default master settings here.
03:18 hemebond Paste all that somewhere for me, as is.
03:18 linziyan ok  i  paste my master settings to you  ,a moment..
03:18 hemebond (I suspect the indentation in your top.sls might be off but not sure)
03:18 hemebond I only' need the file_roots if you do.
03:18 linziyan ok
03:19 hemebond Remember that YAML uses two (2) spaces for indentation.
03:19 hemebond It looks, from your previous paste, that your top.sls has four (4) spaces.
03:19 linziyan i neglect the indentation..
03:20 linziyan i check it  first..
03:20 hemebond So I want to see the actual output as-is from those commands.
03:20 linziyan https://dpaste.de/9FeY
03:21 linziyan the actual output as-is from those commands.
03:21 linziyan @hemebond
03:22 hemebond A minion ID with a space in it? Okay.
03:22 hemebond Appears to be valid YAML.
03:22 linziyan ...
03:22 linziyan no spaces!!!
03:22 linziyan maybe  the problems..
03:22 hemebond Well, it all looks okay.
03:22 linziyan ORZ
03:23 hemebond test.ping would probably fail if spaces were a problem.
03:23 racooper joined #salt
03:23 linziyan so...
03:23 linziyan really
03:23 hemebond You said "state.apply vim" fails too, right?
03:23 linziyan it  is  the
03:23 linziyan space  issue!!!
03:24 linziyan kill me..
03:24 hemebond Is it?
03:24 linziyan yes..
03:24 linziyan modify it
03:24 linziyan salt salt 'dis2' pkg.install vim dis2:     ----------
03:24 favadi joined #salt
03:24 linziyan and  this is the output..
03:24 linziyan seems  to work
03:25 hemebond Oh, the minion name is dis2 not "dis 2"?
03:25 linziyan yeah..
03:25 linziyan you can kill me..
03:25 hemebond Ah I see.
03:25 hemebond LOL
03:25 hemebond No worries.
03:25 linziyan stupid  mistakes..
03:25 linziyan thanks a lot..
03:26 linziyan i dont know how to say my appreciation...
03:26 hemebond You're welcome.
03:26 linziyan you  open the saltstack world for me..
03:26 linziyan wish  you have  a  nice day...
03:27 hemebond You too :-)
03:29 linziyan a..
03:29 linziyan @hemebond
03:29 hemebond mm?
03:29 linziyan help...
03:29 hemebond What's up?
03:29 linziyan still the problems...
03:29 linziyan i 'm  too sited  to check...
03:30 linziyan really  kill me..
03:31 hemebond linziyan: Is there a problem? I'll need more info if there is.
03:31 simon_c1 joined #salt
03:31 linziyan I mean  the problem  isnt  solved..
03:32 linziyan i'm  too  excited to check
03:32 hemebond Okay, paste me the output to these commands.
03:32 hemebond salt-run manage.up; salt '*' test.ping
03:33 linziyan https://dpaste.de/Jv2R
03:33 linziyan this is the output
03:33 linziyan test.ping will work
03:33 linziyan but  state  will not..
03:34 hemebond linziyan: That's the old output.
03:34 hemebond I want the exact output from those commands I just wrote.
03:34 linziyan salt-run manage.up; salt '*' test.ping   this ?
03:34 hemebond Yes
03:36 linziyan https://dpaste.de/9OuW
03:36 linziyan @hemebond
03:36 hemebond linziyan: You are current root, correct?
03:36 beardedeagle yeah what user are you running as
03:37 linziyan yes  i use sudo user
03:37 hemebond sudo, okay.
03:38 hemebond Did you sudo for the test.ping?
03:38 linziyan https://dpaste.de/bbkK  file_roots
03:38 linziyan no
03:39 linziyan test.ping no  sudo
03:39 hemebond Okay you should sudo for all commands or just use "sudo su" to become root.
03:39 linziyan sudo  will not  work
03:40 linziyan i  tried  just now
03:40 hemebond hmm?
03:40 linziyan https://dpaste.de/ex5Y
03:41 linziyan sudo output
03:41 hemebond So you have SSH access to the minion?
03:42 linziyan it means?
03:42 hemebond Can you logon to the minion?
03:42 hemebond Just normally.
03:42 linziyan yes
03:42 linziyan i can
03:42 hemebond Stop the salt-minion service
03:42 linziyan then?..
03:43 hemebond and, still on the minion, run "salt-minion -l debug"
03:43 linziyan yeah
03:43 linziyan done
03:43 linziyan then..
03:44 hemebond Now on the master run "salt 'dis2' state.apply vim"
03:44 linziyan minion debug  i  tried  but no information can get
03:44 hemebond And on the minion look for errors.
03:44 linziyan ok
03:44 hemebond The minion should output stuff to the console.
03:44 hemebond We're on the lookout for errors.
03:45 linziyan https://dpaste.de/Yk0F
03:45 linziyan seems  no  errors  output
03:45 linziyan no any valuable error tips
03:46 flowstate joined #salt
03:47 hemebond That looks odd. This is from dis2?
03:47 linziyan yes...
03:47 linziyan from dis2
03:47 spuder joined #salt
03:48 hemebond Why is the output completely different to what I see?
03:48 hemebond This looks like something from the master.
03:48 mavhq joined #salt
03:48 linziyan ➜  ~ sudo salt-minion -l debug
03:49 linziyan right ..this is the minion..
03:49 beardedeagle minion event bus looks similar @hemebond
03:50 hemebond Minion event bus? I get like console output, e.g., pillar compilation, etc.
03:51 linziyan ok...it's  a little hard to find out...
03:51 paydro_ joined #salt
03:53 west575_ joined #salt
03:56 jerredbell joined #salt
03:57 linziyan is  the user problem?  i  use  simply user in my master settings  and  i use root user in my minion settings
03:57 hemebond Everything should be done as root. Salt needs root access to stuff.
03:58 hemebond (to the best of my knowledge)
03:58 hemebond Use user in your master settings? What does that mean?
03:58 linziyan no  just a  non  root user
03:58 linziyan but with sudo permission
03:59 hemebond But salt-master is running as the default root-level user?
03:59 hemebond It's a standard install, yeah?
03:59 hemebond From the saltstack repos?
03:59 linziyan yes
03:59 nZac joined #salt
04:00 linziyan master is  centos ..but minion is ubuntu   all  from the offical install refer
04:02 hemebond My salt-minion debug output is just lines of stuff.
04:02 linziyan yeah  the offcial doc  shows the same..
04:03 linziyan maybe only the developer can solve my issues..
04:04 linziyan my saltstack career is closed again...
04:04 hemebond Why does it look like it's running salt-call?
04:04 linziyan i dont know..
04:04 hamsham joined #salt
04:04 linziyan i just run sudo salt-minion -l debug..
04:05 hemebond If you do "ps aux | grep salt"
04:05 hemebond are all salt processes running as root?
04:05 linziyan minion or master?
04:05 hemebond Master
04:06 linziyan yeah
04:06 linziyan root
04:07 linziyan sigh
04:07 linziyan i  give up
04:07 hemebond Can you login as root on dis2 or "sudo su" and then run salt-minion?
04:07 linziyan maybe  sometime later  i  will find the way
04:07 linziyan minion run as root  to
04:07 linziyan too
04:07 linziyan i checked
04:08 hemebond Sure but with the debug stuff I meant
04:08 hemebond sudo su; salt-minion -l debug
04:09 hamsham joined #salt
04:09 linziyan still the same
04:10 linziyan I give up for now  ,maybe tracked in some strange loop
04:10 linziyan hemebond  thank you very much
04:10 hemebond Sorry I couldn't track down the problem.
04:11 hemebond Keep trying. Maybe fresh install or something will help.
04:11 linziyan no  you are great to help me
04:11 linziyan yeah
04:11 linziyan i will be back  sometime later
04:15 mavhq joined #salt
04:22 spuder joined #salt
04:24 antpa joined #salt
04:24 brianfeister joined #salt
04:27 aganders3_ joined #salt
04:34 cuonglm joined #salt
04:40 beardedeagle joined #salt
04:46 flowstate joined #salt
04:47 brianfeister joined #salt
04:49 felskrone joined #salt
04:50 UForgotten joined #salt
04:51 josuebrunel joined #salt
04:56 mTeK How do I build salt-minion 2015.8 for ubuntu but for 32bit?
04:59 UForgotten joined #salt
05:02 hightekvagabond joined #salt
05:03 ivanjaros joined #salt
05:03 hightekvagabond1 joined #salt
05:05 paydro joined #salt
05:06 impi joined #salt
05:07 linziyan i check minion setting,i comment the sudo_user,which is assigned to root by me, and  some other modifications i dont know,  it  works
05:07 mavhq joined #salt
05:07 linziyan @hemebond
05:08 hemebond Hi
05:08 hemebond It works?
05:08 linziyan i use both 'user' and 'sudo user' in minion  as 'root'
05:08 linziyan but comment the 'sudo user' ,it works...
05:08 linziyan yes
05:08 hemebond linziyan: I haven't set anything like that for my minions.
05:08 linziyan it  works
05:09 hemebond It's working now that you're just using root?
05:09 mavhq joined #salt
05:09 hemebond (if you comment out user: and sudo_user: it will use the defaults)
05:09 linziyan https://dpaste.de/h18q
05:10 linziyan yes
05:10 hemebond sudo_user is for when you want/need the minion to run as something other than root.
05:10 linziyan default  is  root
05:10 hemebond Excellent, so that explains the sudo we saw in the debug output.
05:10 linziyan so it is..
05:10 hemebond What were the values before?
05:10 hemebond Both 'root'
05:10 hemebond ?
05:10 linziyan yes
05:10 linziyan both  root
05:10 hemebond Ah I see.
05:10 mavhq joined #salt
05:11 hemebond I recommend leaving the minion config alone if you can. The defaults should be fine.
05:11 hemebond (except for settings master: that is)
05:11 hemebond (actually I don't even do that)
05:12 hemebond Well, that's good news, well done.
05:14 iceyao joined #salt
05:14 linziyan yeah....i  start to learn...so  will want  to know how it works...and the officail doc  is not so friendly to newbee
05:16 hemebond Hmm. Any ideas on how to make it better? Are you going through the tutorial?
05:16 linziyan yes..
05:16 linziyan all the things  going through the tutorial
05:16 linziyan as the start tutorial still not so  friendly..
05:18 linziyan and  as a newbee ,we will encounter lots of problems..
05:20 hemebond Was there something in the tutorial that suggested changing the sudo_user?
05:20 linziyan nope...but i forget...
05:21 linziyan toturial said  minion config
05:21 linziyan then  i  find  che /etc/salt/minion..
05:21 linziyan lots of  choices..
05:22 linziyan and  each choice have explained the usage..
05:22 linziyan so  i just follow the usage to uncomment things...
05:22 linziyan i even didnt know the user between sudo user...
05:23 sauvin joined #salt
05:24 linziyan so i think..tutorial is fine..
05:24 linziyan besides the tutorial
05:24 linziyan should be a newbee problems may found..
05:24 linziyan like   newbee faq
05:25 linziyan newbees  will have a lot in common...
05:26 linziyan curiosity  will destroy the tutorial when you try new things...
05:26 linziyan someone like me
05:26 hemebond Yeah, not sure a tutorial or FAQ and protect the user from curiosity.
05:26 hemebond That's why one of my first questions was whether or not the configs had been changed.
05:27 hemebond I'm not sure sudo_user even works properly.
05:27 linziyan yeah i never thought sudo_user will be the key..
05:28 linziyan i think will be  protect the user from curiosity.
05:28 garphy joined #salt
05:28 linziyan like in the tutorial  says  dont modify something like  balabala...
05:29 linziyan maybe  only me have the habit...
05:30 penguinpowernz joined #salt
05:30 linziyan to try something ...
05:30 linziyan anyway   problem solved
05:30 linziyan thanks a lot  ,want you to know  what's  the problem
05:31 hemebond Thanks. Good luck.
05:31 simon_c joined #salt
05:34 sfxandy joined #salt
05:34 linziyan i will dig into salt stack ,LOL
05:38 josuebrunel joined #salt
05:40 auzty joined #salt
05:46 flowstate joined #salt
05:47 slav0nic joined #salt
05:55 mowntan joined #salt
05:55 mowntan joined #salt
06:00 nZac joined #salt
06:15 KermitTheFragger joined #salt
06:21 akhter joined #salt
06:28 yuhlw joined #salt
06:30 polyidus joined #salt
06:34 jhauser joined #salt
06:40 ivanjaros joined #salt
06:41 punkoivan joined #salt
06:41 paydro joined #salt
06:45 ravenx joined #salt
06:46 ravenx i've been getting a Minion returned a non zero code
06:46 ravenx it's cuz i'm running as a non root user and salt can't do demidecode
06:46 ravenx how can i fix this?
06:46 flowstate joined #salt
06:51 mavhq joined #salt
06:52 subsignal joined #salt
06:53 babilen ravenx: I'd run minions as root
06:53 ravenx ah
06:53 ravenx minions are being run as root for sure
06:53 ravenx master is not th ough.
06:54 babilen So you get "Minion returned a non zero code" because the master runs as a different user?
06:55 babilen I assumed that you were referring to the minion as ^^^ doesn't necessarily make sense to me
06:55 ravenx let me run my command again
06:57 ravenx this is after a 'salt '*' state.sls thingy'
06:58 ravenx ERROR: Minions returned with non-zero exit code
06:58 ravenx minions are running as root though.
06:58 ravenx and in my /var/log/salt/master:  2016-04-08 08:57:59,502 [salt.loaded.int.grains.core][WARNING ][7437] Although 'dmidecode' was found in path, the current user cannot execute it. Grains output might not be accurate.
06:59 babilen That's unrelated
06:59 babilen (almost certainly)
06:59 babilen So, what is the exact output you get? Could you paste that to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
06:59 ravenx of the master or minion?
07:00 babilen Of the "salt '*' state.sls thingy" command on the master
07:00 ravenx alright, i will get you the output
07:00 ravenx it make take awhile, i have to censor out some work stuff ;/
07:01 donmichelangelo joined #salt
07:02 babilen Well, I'm particularly interested in the latter part (i.e. "the error")
07:02 ravenx ah
07:02 babilen But then .. who knows if there are other clues.
07:02 subsignal joined #salt
07:02 elsmo joined #salt
07:02 mavhq joined #salt
07:03 polyidus left #salt
07:04 ravenx since you are only interested int he latter of my state.sls
07:04 ravenx i only included a screenshot of it:
07:04 ravenx https://imgur.com/wN7C49D
07:04 mavhq joined #salt
07:04 ravenx there is not much above it, just a buncha commands saying it passwed successfully.
07:05 ravenx the "ERROR:  ......" is the very last line
07:05 babilen How many minions did you run this on?
07:05 source47 joined #salt
07:06 source47 hi guys, how can i make a requisite so that a service is not installed as a requirement for another service to run? the 'require' clause takes 'service' as a argument, not service.disabled
07:06 ravenx two
07:06 punkoivan joined #salt
07:06 ravenx babilen: and it is all local:   my salt is on my machine, the two minions are in a vagrant box on the same machine
07:06 babilen ravenx: Please check for other errors in the output. *Anything* that might hint as to what went wrong.
07:06 ravenx babilen:  i will have a read now.
07:07 donmichelangelo joined #salt
07:08 TyrfingMjolnir joined #salt
07:09 garphy joined #salt
07:09 TyrfingMjolnir joined #salt
07:11 ravenx babilen: all my return codes are 0. everything is green.  the only thing that stands out is this:  https://imgur.com/fIf6dTB
07:11 ravenx since it says "Invalid Changes data: [ yada yada yada ]
07:11 simon_c left #salt
07:11 babilen Remove that state, try again
07:11 XenophonF joined #salt
07:12 ravenx sure
07:12 linjan_ joined #salt
07:12 babilen If that doesn't work, conduct a binary search through your state space. (comment half of it, run it → boom, comment half again → no boom, comment other half → boom, ....)
07:13 babilen In fact: Try to come up with a minimal example that show the problem
07:13 ravenx good call
07:13 ravenx but that won't work
07:13 ravenx if i comment out the bottom half without the top half being there
07:13 ravenx my requisites will crash and burn
07:14 babilen You don't necessarily have to define "halves" in terms of location in the file.
07:14 babilen I am essentially referring to "possible partitions of the set of states"
07:14 ravenx aaah
07:15 ravenx i am taking you too literally
07:16 babilen Well .. the "comment first half of the file" is a possible way, but not always possible. It is just a way to find to offending state (or states) without having to run too many tests. Each test halves the search space and you get there faster...
07:18 roman_d joined #salt
07:24 bohr joined #salt
07:25 aw110f joined #salt
07:26 dmaiocchi joined #salt
07:27 lero joined #salt
07:28 ravenx hmm
07:28 ravenx nothing
07:28 ravenx it is still returning that.
07:28 josuebrunel joined #salt
07:28 babilen Do you get it on test.ping ?
07:29 babilen (given that you should, essentially, have a SLS with a single state in it by the end of the binary search: Which one was it?)
07:29 josuebrunel joined #salt
07:30 bohr left #salt
07:30 linjan_ joined #salt
07:31 kawa2014 joined #salt
07:31 ravenx it was the systems packages depedency one.
07:31 ravenx test ping is all claer/clean
07:32 roman_d Hi #salt! I want to add 1 more master in my infrastructure, is there a way to autogenerate new config file for all my minions ? I found no info about it :(
07:33 babilen roman_d: Salt can salt itself: https://github.com/saltstack-formulas/salt-formula
07:34 aw110f_ joined #salt
07:34 roman_d Thanks! I'll check this
07:36 mavhq joined #salt
07:42 ravenx babilen: so i have one state left
07:42 ravenx just by going pkg.installed....
07:42 ravenx it is giving that minion error.
07:43 babilen Okay, what are you installing in that state? Could you paste the output of *that* run ?
07:43 ravenx sure
07:43 colegatron joined #salt
07:45 JohnnyRun joined #salt
07:46 losh joined #salt
07:46 ravenx http://paste.debian.net/426753/
07:47 babilen Okay, replace that state with a, say, "pkg.installed: - name: base-files" and try that
07:47 flowstate joined #salt
07:49 ravenx a package named base-files?
07:49 babilen (assuming you are on some Debian derivative)
07:49 ravenx master = debian, minion = ubuntu
07:50 babilen Yeah, both are either actual Debian or a derivative. Naturally Debian itself is fine too even though its not technically a derivative of itself ;)
07:50 ravenx :) i see
07:50 ravenx i just ran your command with base-files
07:50 ravenx commented out all my commands and i still see that erro
07:51 babilen You might also want to stop the salt-minion service on one of your minions and run "salt-minion -ldebug" to see what's happening there.
07:51 babilen So *any* pkg.installed state run results in that error?
07:52 ravenx yes, that seems to be the case
07:52 ravenx i will also run a saltminio debug now
07:53 babilen Please also make sure that you only have a single salt-minion process
07:53 ravenx ps aux | grep shows that there is only one.
07:56 ravenx do you think that this i caused by a version issue?
07:58 ravenx i did see this when i did a tail -f /var/log/salt/minion:
07:58 ravenx [py.warnings      ][WARNING ] /usr/lib/python2.7/dist-packages/salt/modules/pip.py:252: DeprecationWarning: The 'runas' argument to pip.install is deprecated, and will be removed in 0.18.0. Please use 'user' instead.
07:58 ravenx 'The \'runas\' argument to pip.install is deprecated, and will be '
08:00 MikaT joined #salt
08:01 nZac joined #salt
08:01 impi joined #salt
08:05 s_kunk joined #salt
08:14 garphy joined #salt
08:16 ronnix joined #salt
08:18 JohnnyRun joined #salt
08:22 brianvdawson joined #salt
08:22 iceyao_ joined #salt
08:27 keimlink joined #salt
08:39 fredvd joined #salt
08:40 jf_ joined #salt
08:41 jf_ hey folks, is it really necessary to run the minion on a master as well?
08:41 MadHatter42 joined #salt
08:42 hemebond jf_: Not necessary, no. Only if you want to manage the master the same way as any other minion.
08:46 jf_ hemebond: ok, thanks!
08:47 flowstate joined #salt
08:50 mavhq joined #salt
08:56 elsmo joined #salt
09:06 eMBee i am managing a host running containers. with pillar i define which containers should be running. now each container is also a minion, and now i would like to target only the minions that are active on the host.
09:06 aw110f joined #salt
09:07 eMBee i could set a pillar value for each container-minion, but then i would have to create/update that value each time i change the containers on the host. is there any other way?
09:08 N-Mi joined #salt
09:08 N-Mi joined #salt
09:09 ecdhe joined #salt
09:13 JohnnyRun joined #salt
09:14 aw110f AndreasLutro: multimaster failover + syndic = success, with 2 minions, 2 master syndics, 1 master of master.  Next test on ~1000 minions.
09:14 mavhq joined #salt
09:16 mavhq joined #salt
09:17 aw110f the docs on multimaster was hard to follow but nonetheless I’m grateful the docs were there
09:17 josuebrunel joined #salt
09:23 ronnix joined #salt
09:27 mavhq joined #salt
09:28 Rumbles joined #salt
09:32 josuebrunel joined #salt
09:34 felskrone joined #salt
09:40 punkoivan joined #salt
09:41 punkoivan joined #salt
09:41 mavhq joined #salt
09:43 quix_ joined #salt
09:46 colegatron joined #salt
09:47 drawsmcgraw joined #salt
09:47 flowstate joined #salt
09:55 JohnnyRun joined #salt
09:58 akhter joined #salt
10:02 nZac joined #salt
10:05 RDc joined #salt
10:19 mavhq joined #salt
10:24 mavhq joined #salt
10:37 cyborg-one joined #salt
10:42 mavhq joined #salt
10:42 fredvd joined #salt
10:47 flowstate joined #salt
10:53 sthns joined #salt
10:57 LondonAppDev joined #salt
10:58 mavhq joined #salt
10:59 akhter joined #salt
11:04 mavhq joined #salt
11:07 rburkholder can the 'include' statement be placed into a pillar/top.sls file?
11:08 paydro joined #salt
11:10 yidhra joined #salt
11:13 babilen rburkholder: no
11:17 rburkholder ok, thanx
11:21 MadHatter42 joined #salt
11:31 mavhq joined #salt
11:33 lero__ joined #salt
11:35 mavhq joined #salt
11:37 lero joined #salt
11:42 mavhq joined #salt
11:44 GerhardVana joined #salt
11:47 akhter joined #salt
11:50 Guest9607 good morning all
11:50 XenophonF let me try that again - good morning
11:51 _JZ_ joined #salt
11:52 mavhq joined #salt
11:54 quasiben joined #salt
11:57 impi joined #salt
11:57 TyrfingMjolnir joined #salt
12:03 nZac joined #salt
12:10 Hydrosine joined #salt
12:12 DammitJim joined #salt
12:22 cuonglm joined #salt
12:23 favadi joined #salt
12:26 JohnnyRun joined #salt
12:27 vilitux joined #salt
12:28 lero__ joined #salt
12:30 Hydrosine joined #salt
12:34 impi joined #salt
12:35 Shirkdog joined #salt
12:37 akhter joined #salt
12:37 yuhlw joined #salt
12:39 armyriad joined #salt
12:41 yuhlw joined #salt
12:42 mavhq joined #salt
12:43 subsignal joined #salt
12:44 sfxandy joined #salt
12:47 yuhlw joined #salt
12:48 numkem joined #salt
12:49 Rumbles joined #salt
12:52 edrocks joined #salt
12:52 Nazca joined #salt
12:53 akhter joined #salt
12:58 racooper joined #salt
12:58 evle joined #salt
13:00 drawsmcgraw left #salt
13:01 subsignal joined #salt
13:06 gh34 joined #salt
13:07 yuhlw joined #salt
13:07 XenophonF babilen: recapitulating fairly complicated XML configuration files in Python is somewhat tedious, I'll have you know
13:08 XenophonF not as tedious as trying to build the templates with jinja, though
13:08 teatime XenophonF: use something like file-tree?
13:08 XenophonF can't
13:08 akhter joined #salt
13:09 XenophonF i have a lot of blanks in the xml configs that i need to fill in from defaults.yaml/map.jinja/pillar
13:09 XenophonF nice idea thoug
13:09 XenophonF though
13:09 teatime luckily XML is largely whitespace agnostic, at least
13:12 yuhlw joined #salt
13:17 la|r|ma joined #salt
13:17 paydro joined #salt
13:17 la|r|ma left #salt
13:18 ronnix joined #salt
13:23 XenophonF yeah but whenever i generate config files from templates in salt, i endeavour to make them human-readable
13:24 ashmckenzie joined #salt
13:24 XenophonF i can never work out in my head how jinja's whitespace controls work :(
13:24 mapu joined #salt
13:25 teatime really?
13:25 ronnix joined #salt
13:25 teatime they seem intuitive to me :/
13:25 XenophonF i could totally use a clue if you have one to give
13:25 XenophonF i can never get them to work the way i expect without lots of tinkering
13:25 babilen nom-at-the-left vs nom-at-the-right
13:25 teatime adding the minus sign to one side of a tag means 'eat whitespace on this side of the tag'?
13:26 babilen *slurp*
13:26 XenophonF and sometimes i just have to give up and just add or remove newlines from the template file to make it look right
13:26 quix joined #salt
13:26 XenophonF yeah except ltrim and rtrim dont' stop where i think they should stop and screwy stuff like that
13:27 teatime and as much as I've been tempted to, I refuse to change the defaults available in the salt config files
13:27 teatime lest unexpected things happen to templates in formulas etc.
13:27 XenophonF this is what i had to do to make jinja emit an xml file with correct indentation - https://github.com/irtnog/shibboleth-formula/blob/3c1fab3841cb08f8c191e24b055b9517dfae75dd/shib/sp/files/shibboleth2.xml
13:28 XenophonF it was at this point that i gave up and took babilen's advice to use python to generate the xml
13:28 babilen I guess we can agree that XML is tedious
13:28 akhter joined #salt
13:30 XenophonF VERY
13:30 beardedeagle joined #salt
13:31 XenophonF for now i'm using lxml's ElementTree API
13:31 akhter_1 joined #salt
13:31 XenophonF once i get it working, i'll go back over it and port it to the native ElementTree API (which handles namespaces differently among other things)
13:32 XenophonF i'd hate to add a dependency on lxml, but i'd like the formula to take advantage of it if it is installed
13:32 XenophonF the pretty printer is much nicer than the one in stock, for starters
13:36 mavhq joined #salt
13:36 flowstate joined #salt
13:39 mavhq joined #salt
13:43 flowstate joined #salt
13:44 flowstat_ joined #salt
13:47 snc joined #salt
13:50 breakingmatter left #salt
13:56 akhter joined #salt
13:56 cyborg-one joined #salt
13:58 snc| joined #salt
13:58 mavhq joined #salt
14:00 babilen Could somebody explain to me why file.line was added?
14:00 TheoSLC joined #salt
14:00 teatime because people think they want that?  :)
14:00 babilen (or what purpose it solves that is not covered by file.{append,replace,blockreplace,...})
14:03 nZac joined #salt
14:03 babilen Is it simply about context-sensitivity?
14:04 mavhq joined #salt
14:04 teatime I think so
14:04 teatime I don't see another way to get a line into a specific position in a file where the line doesn't already exist
14:05 babilen Okay, that makes some sense. It just felt a bit redundant :)
14:06 teatime I wish people wouldn't feel like its a first line solution to common problems, though.
14:06 teatime sometimes my bootstrap etc. scripts run sed or something on a file, like to enable/disable root logins in sshd_config or something
14:06 teatime but that's where I can be confident of the before state
14:07 teatime once you have full-fledged config mgmt like salt, people's first reaction should be to manage entire files
14:07 babilen I typically merge entire files, but file.line still feels like syntactic sugar around file.replace (which is okay)
14:08 babilen *manage
14:11 rburkholder ok, one more little wrinkle:  I want to include a pillar file (file1) into another pillar file (file2), file1 has no jinja templating, file2 has jinja templating, and needs to make use of values from file1.  Is there a mechanism to do this?  I have been looking at map.jinja but not sure if that is the way to go.
14:13 teatime usually, you don't have any assurance/control over which pillar data file will be evaluated first, so you can't interpolate data from pillar into pillar file
14:14 teatime there are ways around that, not sure if they're a good idea to use
14:16 XenophonF teatime: what's wrong with managing entire files?
14:16 XenophonF it seems to be the cleanest way to get configs into the CM system
14:16 babilen "should be"
14:16 babilen I think teatime is advocating it
14:16 XenophonF ah
14:16 teatime there is this tho https://docs.saltstack.com/en/latest/topics/pillar/#including-other-pillars
14:17 nZac joined #salt
14:18 quique joined #salt
14:18 tharkun joined #salt
14:18 babilen rburkholder: https://github.com/bbinet/pillarstack / http://reclass.pantsfullofunix.net/ -- https://docs.saltstack.com/en/latest/ref/pillar/all/
14:18 babilen rburkholder: You might want to use something a little more powerful
14:19 andrew_v joined #salt
14:19 hasues joined #salt
14:19 hasues left #salt
14:20 rburkholder teatime:  I saw that link, and have tested it, but it isn't making the included lines available to jinja
14:20 rburkholder babilen:  looking at the links ....
14:22 teatime rburkholder: yeah that goes back to what I was previously saying
14:22 teatime if you define multiple pillar roots, earlier ones' data is availble to later ones
14:24 flowstate joined #salt
14:26 source47 joined #salt
14:28 source47 hi guys, i am constantly getting 'AttributeError: 'Minion' object has no attribute 'schedule'' when running salt minion. i have added it to the ticket here https://github.com/saltstack/salt/issues/27688 any ideas what i can do to fix this?
14:28 saltstackbot [#27688]title: AttributeError: 'Minion' object has no attribute 'schedule' | Hi, I am trying to upgrade our salt from v2014.7.0 to v2015.8.0 and I am getting some early errors.  We are testing this running bootstrap-salt.sh executed from Vagrant masterless and we are getting the following error:...
14:28 source47 it wasnt happening before. but happening every time today
14:28 babilen Typical for Friday the 8th
14:29 source47 babilen: what do you mean?
14:29 babilen Nothing - Let me look into the bug report
14:29 babilen (a play on Friday the 13th)
14:30 Brew joined #salt
14:31 ronnix joined #salt
14:31 babilen source47: The bug seems to contain a number of very good pointers. What exactly would you like us to do?
14:31 JohnnyRun hi all. I'm quite new to saltstack. I find mysql formula but I would like my.cnf be unmanaged. Is there a way to overrider this https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/config.sls#L57 without forking mysql-formula ?
14:31 onlyanegg joined #salt
14:31 source47 well i just need to be able to run salt, at present i am not able to get anything running.
14:32 babilen JohnnyRun: You could not target mysql.config to your minion
14:32 source47 it talks about the pyc files, but i am not sure how i can remove those
14:32 berserk joined #salt
14:32 babilen JohnnyRun: But then: Having that formula manage your my.cnf is one of the nicest aspects that formula! What's your usecase?
14:32 source47 i am doing this on a clean vagrant install
14:33 source47 so it should be fresh to start with
14:33 M-liberdiko joined #salt
14:33 babilen source47: I think the issue is rather: https://github.com/saltstack/salt/blob/develop/salt/minion.py#L868 (linked in CGenie's comment)
14:33 berserk joined #salt
14:33 quasiben joined #salt
14:34 JohnnyRun babilen, by policy here, /etc/my.cnf as distro defaults and /etc/myCONFIGDIR.d/override_world.cnf
14:34 JohnnyRun It's not a choise of mine. I have to do that way
14:34 JohnnyRun I'm tring to use exclude:
14:35 source47 babilen: i read that too, but i dont understand how i can patch this to fix this?
14:35 source47 do you mean i should create a salt-master first?
14:36 babilen JohnnyRun: Ah, but you can override mysql.config.file in your pillar -- https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/config.sls#L59
14:36 source47 but its a headless bootstrapper, so i dont have a master at that point
14:36 babilen JohnnyRun: That's mysql:lookup:config:file
14:37 babilen JohnnyRun: And which states in mysql.config to you need if you don't want mysql_config ?
14:38 JohnnyRun none
14:38 babilen JohnnyRun: So why do you target it at all?
14:39 jeffspeff joined #salt
14:39 JohnnyRun I need mysql (package installed, grant done and so on) I'm not targeting mysql.config but:  https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/server.sls#L2
14:39 babilen Right
14:39 JohnnyRun Can't I use exclude: sls: something? I tried but no luck
14:42 teryx510 joined #salt
14:43 JohnnyRun other formulas are easier, config is separate from installation and so on.. ex: nginx.ng.config is separate from nginx.ng.install
14:43 debian112 how can I get the mac address added in my network interface file: http://paste.debian.net/427298/
14:45 berserk joined #salt
14:46 ivanjaros joined #salt
14:46 teryx5101 joined #salt
14:47 mavhq joined #salt
14:51 babilen JohnnyRun: It seems to "only" be included due to some requisites. Maybe we could revisit that design. Would you mind opening an issue?
14:53 kmkramer71 debian112, grains.get hwaddr_interfaces:eth0
14:54 wendall911 joined #salt
14:54 kevinquinnyo for the 'presence' event, salt/presence/change, my reactor should have data['new'] and data['lost'] available to it, correct?
14:55 kmkramer71 debian112, - hwaddr: salt['grains.get']('hwaddr_interfaces:eth0') should work
14:55 debian112 kmkramer71. That is what I have used in the past. I also have used: {{ salt['network.hw_addr']('eth0') }}
14:56 gtmanfred kevinquinnyo: for events, it may be data['data']['new']
14:56 gtmanfred the whole block of data passed to the event is called 'data'
14:56 debian112 but, now I have been trying to use the network states
14:56 gtmanfred then if the payload has a data block in it, it is data['data']
14:56 babilen dataception
14:56 kevinquinnyo gtmanfred: thanks
14:57 gtmanfred i want to change that first data to be called payload
14:57 babilen +123
14:57 debian112 in salt, so that I can have ip addresses active without telling salt to reload network when the network address is changed
14:57 debian112 how can I plug that in to a network state: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html
14:58 gtmanfred and if you send the event as `salt-call event.send "tag" "{'data': {'mystuff': 'test'}}"` it will be data['data']['data']
15:00 kevinquinnyo `salt-call event.send "tag" "{'data': {'data': 'data'}}"`
15:00 kevinquinnyo hm now i'm getting this:
15:00 kevinquinnyo new = data['data']['new']
15:00 kevinquinnyo KeyError: 'data'
15:01 kevinquinnyo how can i just print the data variable so i can inspect it?  i've always had trouble just dumping variables with salt
15:01 gtmanfred you can't in the reactors, you could send data along, and have it run a state that writes it to a file
15:03 kevinquinnyo oh i forgot about this eventlisten.py script
15:03 gtmanfred kevinquinnyo: you could do something like this http://ix.io/vFI
15:03 gtmanfred oh
15:03 Muchoz joined #salt
15:04 kevinquinnyo thanks gtmanfred thats a good hack
15:04 gtmanfred kevinquinnyo:there is a salt-run to listen to the queue
15:04 flowstate joined #salt
15:04 gtmanfred kevinquinnyo: salt-run state.event pretty=True
15:04 gtmanfred and you can filter on tags
15:04 gtmanfred salt-run -d state.event
15:04 kevinquinnyo nice
15:05 beardedeagle dont forget the pretty=True lol
15:06 beardedeagle ah, he had it
15:06 beardedeagle IGNORE ME
15:07 rooty__ joined #salt
15:09 gtmanfred hehe
15:10 hackel joined #salt
15:10 kevinquinnyo so i've changed my /etc/salt/master.d/reaactor.conf from having salt/presence/present to salt/presence/change and restarted the salt-master process, but it seems to still have cached salt/presence/present as my event pointing to my reactor
15:11 iceyao joined #salt
15:11 kevinquinnyo is there a reactor config cache of some kind?
15:11 gtmanfred there should not be, you should just have to restart the master
15:12 morissette joined #salt
15:12 kevinquinnyo ohhh nevermind, i'm dumb.  I forgot i was running salt-master -l debug in another terminal
15:12 kevinquinnyo so i did not restart it...
15:13 gtmanfred hehe
15:14 kevinquinnyo ok so in this case, for the change event, 'new' and 'lost' are top level in the data dict
15:16 TheoSLC joined #salt
15:16 rihannon joined #salt
15:18 quique My salt-master has 50K anonymous inodes open is that normal?
15:18 quique # lsof | grep anon_inode | grep 'salt-mas' | wc -l
15:18 quique 50750
15:20 mavhq joined #salt
15:24 jschoolcraft joined #salt
15:27 Andrew_ joined #salt
15:27 Andrew_ left #salt
15:33 subsigna_ joined #salt
15:33 Eugene That seems a bit excessive.
15:37 racooper what happened to the salt packages for SuSE 11 SP3?
15:38 akhter joined #salt
15:39 M-liberdiko joined #salt
15:39 mavhq joined #salt
15:42 ronnix joined #salt
15:42 rlatimore joined #salt
15:43 snc joined #salt
15:43 mavhq joined #salt
15:45 shiriru joined #salt
15:46 rooty__ Does anybody know, why 'salt' ignores --return parameter completely ? I can specify anything there with no errors.
15:47 punkoivan left #salt
15:47 blakemiller joined #salt
15:48 myraft joined #salt
15:48 myraft good morning
15:49 myraft is there an example of how to copy a file from master to minion "as-is"?
15:49 babilen file.managed with the file "as-is" as - source:
15:49 myraft I am looking at file.managed, salt-cp , but am lost in how to set it up ?
15:49 andrew_v joined #salt
15:49 jettero I'm using salt-run state.event pretty=True tagmatch=syndic/\* to try to find the cause of mysterious long syndic waits. It seems when I glob target,the syndic tells the master what minions are supposed to come back. But if I grain target, it gives an empty list of expected returners... causing the longer syndic wait. Is this the expected behavior?
15:50 mavhq joined #salt
15:50 myraft thanks @babilen
15:50 babilen myraft: Place the file somewhere in salt:// -- The location defaults to /srv/salt, but can be configured in the master config (cf. file_roots). So /srv/salt/files/foo.bar would be salt://files/foo.bar
15:53 kevinquinnyo is there any reason i shouldnt be able to add 'mine_functions' to the end of my pillar dict in an ext_pillar?
15:54 kevinquinnyo or is salt hard-coded to read a file in pillar_roots for the mine_functions key
15:54 myraft @babilen: I tried that, put the file in /srv/salt/tomcat and did this, not working. Can you take a glimpse please ? <script src="https://gist.github.com/anonymous/a4b78297ccab2cf022f262841442e40a.js"></script>
15:54 teatime kevinquinnyo: I think that should work
15:56 teatime kevinquinnyo: probably have some other problem, like invalid format of mine_functions or haven't triggered a mine collection by doing one of 1) restart minion, 2) wait mine_interval, or 3) refresh_pillar followed by mine.update
15:57 babilen myraft: You use salt:// to define addresses relative to file_roots (which defaults to /srv/salt) so you want "salt://tomcat/tomcat.servive" in line 3 -- Also use "- name" and not "- destination" -- https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
15:58 M-MadsRC joined #salt
15:58 aganders3_ joined #salt
15:59 jerredbell joined #salt
16:01 myraft @babilen: worked like a charm.
16:01 myraft @babilen: THANKS ! I wasted 2 hours playing with salt-cp. It worked with file.managed.
16:01 babilen myraft: https://github.com/saltstack-formulas/tomcat-formula might be of interest
16:02 myraft @babilen: I tried that, but not that proficient yet to make head or tails of it.
16:02 babilen Sure
16:02 babilen You can revisit it at a later time :)
16:03 myraft @babilen: all I am trying to do is download tomcat.XYZ.jar and install it on minion. Going by the formula can't figure out how to tell where the source is.
16:03 myraft @babilen: thanks for pointer. When I say download, since I have do this in a "closed-network", I am downloading from AWS S3.
16:06 akhter_1 joined #salt
16:06 rooty__ [DEBUG   ] Could not LazyLoad sentry.returner
16:06 rooty__ Whats wrong with it?
16:08 kevinquinnyo teatime: thanks
16:08 akhter joined #salt
16:09 onlyanegg joined #salt
16:11 blakemil_ joined #salt
16:11 akhter joined #salt
16:16 source47_ joined #salt
16:16 eMBee i am trying to reference other pillar values inside a particular set of pillar data. how can i do that?
16:16 akhter joined #salt
16:17 teatime eMBee: not really valid to do that in general
16:17 teatime eMBee: you'd have to have the previous pillar data be in an earlier pillar_root
16:18 eMBee so if i want to avoid duplicating values, i'd have to move the data into an exteran lsource that i can reference in both places inside pillar?
16:18 eMBee erm, an external source...
16:19 teatime you could target the same pillar data file to multiple minions
16:20 teatime and take advantage of the merging behavior to squeeze in the not-shared parts
16:23 eMBee it's more complicated than that. i have a set of definitions for containers in pillar, which are sent to one minion which is the container host. now each of these contaniners is in itself a minion. now i want to query pillar to tell me the list of minions that are defined as containers to that i can target those (in order to manage all container minions with the same states)
16:23 blakemiller joined #salt
16:23 garphy joined #salt
16:24 flowstate joined #salt
16:24 paydro joined #salt
16:25 writtenoff joined #salt
16:27 teatime sounds similar to trying to replicate puppet's external resources in salt
16:27 teatime to which the answer seems to be, salt mine
16:28 hightekvagabond joined #salt
16:29 cresten_ joined #salt
16:29 cresten joined #salt
16:31 cresten joined #salt
16:31 source47_ joined #salt
16:32 cresten hey guys, struggling a bit: I'm trying to keep a password out of my github repo, so while most of my pillars are implemented and stored in git, including my top.sls file, I want to keep this file local
16:32 source47 hi guys, i am getting the error 'Module will not be loaded local variable 'osrelease' referenced before assignment' when i try to load my salt-minion
16:32 source47 i am running the master and minion on same host
16:33 source47 any ideas?
16:33 source47_ joined #salt
16:34 cresten https://gist.github.com/baconcheeseburger/d8a23917e12ad8028b5c0a616c2eb63c
16:35 mavhq joined #salt
16:35 eMBee hmm, salt mine lets me get data from other minions, that's interesting, but i am not sure that is what i need. the data i have exists on the master in pillar. what i need is to be able to address a group of minions based on that data
16:35 cresten source47: is osrelease a pillar?
16:35 source47 cresten: no i dont have any pillar set
16:35 babilen source47: When do you get that error exactly? (not entirely sure what you mean by "load my salt-minion")
16:35 cresten source47: That SHOULD be a grain... so you're having trouble bootstrapping the minion?
16:36 gtmanfred cresten: fileserver_backend is for state locations, so it looks like you are using git pillars, in which case, you should still be able to use the regular /srv/pillar/ path along with ext_pillars
16:36 source47 creston: yes. i looked at the bootstrapper script and saw i can touch /tmp/disable_salt_checks to disable the service checks
16:36 source47 so now i am getting the minion booting up
16:36 source47 but it says ' No Top file or external nodes data matches found.'
16:36 source47 when i run salt '*' state.apply
16:36 babilen Did you target states to it?
16:38 source47 babilen: yes, that was it!
16:38 source47 thanks
16:38 babilen np
16:39 cresten gtmanfred: I posed the gitter with my config file, mind taking a look? https://gist.github.com/baconcheeseburger/d8a23917e12ad8028b5c0a616c2eb63c
16:39 cresten it SHOULD  be looking in /opt, since I set the pillar_roots
16:39 cresten am I crazy?
16:39 gtmanfred nah, it looks right
16:39 gtmanfred /opt/git_config.sls
16:41 AndreasLutro for the record using /opt for your roots is a terrible idea
16:41 dmaiocchi joined #salt
16:41 AndreasLutro and using the same root for both states and pillars is even worse
16:41 maduro joined #salt
16:43 cresten gtmanfred: updated https://gist.github.com/baconcheeseburger/d8a23917e12ad8028b5c0a616c2eb63c with error I'm getting from local
16:43 eMBee maybe i can approach my problem from another angle: i want to be able to run: salt 'custom list of minions' state.highstate; now that custom list of minions should be generated based on a given set of data (a list of currently defined containers or minions), how would i do that?
16:43 impi joined #salt
16:44 cresten emBee: optimally, state.highState is pretty idempotent, so you can just run it on everything
16:44 cresten The point of the top file is to target minions like that...
16:44 teatime there is a compound matcher for pillar data
16:44 teatime not sure exactly what the gotchas are with using it
16:45 teatime eMBee: you may also want to look at ext_pillar; it's not what you're asking for, but I suspect it may be relevant
16:45 cresten emBee: Would: `salt 'minion-name-*' state.apply` be what you're looking for? Unsure of your exp level
16:45 gtmanfred cresten: where is your top file?
16:45 kevinquinnyo so i listen for a presence/change event, and if the minion is listed as 'new', i run a state that adds a dns entry via a dns module i made -- so what i would like to do, is fire an event from that state with the state results data back to the master
16:45 cresten gtmanfred: only in gitfs, do I need another one?
16:46 gtmanfred cresten: can you add it to the gist
16:46 kevinquinnyo is it possible or easy to just snag the results from the state and use it directly as my event data?
16:46 cresten added
16:46 cresten That is NOT on local though: only in gitfs
16:47 gtmanfred yeah
16:47 gtmanfred but it was your only top.sls which is the error that the thing is throwing
16:47 gtmanfred the primary top.sls
16:48 gtmanfred i don't know unfortunately
16:48 gtmanfred cresten: i bet it is because you don't have a top.sls file in /opt/ for pillars, because it is trying to merge in the ext_pillars top.sls file
16:48 gtmanfred but i don't know
16:49 cresten gtmanfred: I'm curious if maybe it's because I have /opt as a base for both pillars and saltstates...
16:49 gtmanfred maybe
16:49 mavhq joined #salt
16:49 Trauma joined #salt
16:51 eMBee the reall problem i have is that, at any given point i have a containers defined as minions which are not running (because i only boot them up when i need them) salt takes a long time to return on minions that are not running and flags that as error. i need a way to address only running minions so as to not waste time, unless a minion crashed.
16:51 teatime pillar dir cannot be a subdirectory (which I assume includes the same directory) as file_roots, according to the docs
16:51 teatime the obviously problem is top.sls being the same file for both -> probably not what you want
16:51 kevinquinnyo oh nevermind on my question, i just remembered that state runs fire events by default
16:52 mavhq joined #salt
16:54 eMBee with ext_pillar i might be able to define my containers externally, and constructpillar data that states the values i need for each container. but which data source would be most suitable for that?
16:55 mavhq joined #salt
16:55 teatime the beauty of ext_pillar is that they can refer to whatever data you need them to
16:55 eMBee hmm, maybe with cmd_yaml i can read the initial pillar file
16:56 teatime they also have access to all of your pillar_roots data by default
16:56 cresten Got it, gtmanfred, teatime: it was both. I needed a top.sls file locally, and states / pillars were pointing to the same place
16:56 * eMBee looks up pillar_roots
16:56 teatime eMBee: that just means your pillar data directory(s)
16:57 mavhq joined #salt
16:58 kevinquinnyo eMBee: i think the ext_pillar takes in pillar as the second arg, which i believe contains whatever pillar it already knows about, so it can be merged into the data that you get (in whatever way you want) in the ext_pillar code
16:58 kevinquinnyo someone correct me if i'm wrong on that
16:58 teatime kindof
16:58 teatime I think it used to work like that
16:58 mTeK joined #salt
16:58 eMBee ok, but i need the output of ext_pillar inside pillar, so it can't have all of pillar_roots at that point
16:58 teatime it still does get the existing pillar data
16:59 teatime but you no longer have to merge it manually
16:59 kevinquinnyo ah ok
16:59 teatime you just return your pillar data, and it gets merged according to the salt config
16:59 teatime eMBee: you can choose whether to execute ext_pillar before pillar_roots or after; default is after.
17:00 eMBee right, i read about that, so i need it before
17:00 teatime eMBee: one way you can refer to ext_pillar data in pillar files, the other way you can refer to pillar files data in ext_illar
17:00 ageorgop joined #salt
17:00 eMBee wait, i am not sure i need it before
17:01 teatime probably not.
17:01 teatime (as an aside, it would be useful, and may already be the case, if the default pillar data file handling / pillar_roots could be an ext_pillar, so that you could just make a list of ext_pillars instead of treating the 'default' source of pillar data as special, since it isn't really special.)
17:03 kevinquinnyo i'm trying to test subscribing to the salt-api events bus, but i'm getting a 401 when i try to go to http://salt-master-ip/events
17:03 akhter_1 joined #salt
17:03 eMBee so the approach would be to define an ext_pillar script(?) that parses pillar_root for the values i want.
17:03 kevinquinnyo is there something i need to setup specifically in the restcherrypy configuration?
17:03 teatime eMBee: no, that sounds wrong
17:03 bluenemo joined #salt
17:03 teatime eMBee: but I can't tell you waht would be right w/o understandin more of your program
17:04 teatime *problem
17:04 teatime eMBee: for one thing, ext_pillar should already have all of the data from pillar_roots when it gets called; no need to parse it manually
17:04 teatime I gotta afk for a bit
17:04 eMBee well, with parse i meant read/access
17:07 rhand joined #salt
17:07 mavhq joined #salt
17:09 eMBee in pillar i have: list of containers: a: running, b: down, c: running. based on that, the minion that hosts the containers will boot up or shut down certain containers. what i now need is a pillar state that does: if my minion_id is a, then my state should be running, so that finally i can do: salt -I 'container:running' ... to manage them. i could then even addresse these containers in top.sls to give them specific configs...
17:10 * eMBee is looking for an ext_pillar example
17:11 teatime the ones thatc ome with salt are good examples, like file_tree.py
17:12 * eMBee is reading this: https://docs.saltstack.com/en/latest/topics/development/external_pillars.html
17:13 blakemiller joined #salt
17:13 eMBee i somehow don't get where the ext_pillar is called
17:13 eMBee from reading that
17:14 eMBee so inside my pillar data i include ext_pillar: - example_a: some argument?
17:14 teatime no
17:14 teatime you specify your ext_pillar in the salt master config
17:15 teatime and then salt calls it
17:15 paydro joined #salt
17:15 teatime that snippet at the top of the page is from master config file
17:15 teatime not pillar data file
17:16 eMBee ok
17:16 cresten Getting gitfs working is a bit of a bear
17:16 cliluw joined #salt
17:17 kevinquinnyo hey guys i have an haproxy instance with ssl termination and it's own authentication layer in front of the cherrypy salt api server, so i do not require any authentication for the salt-api -- how can i disable all auth restrictions to the salt-api?
17:17 teatime and you can define an extension_modules dir in master config, and put your .py file under pillar/ in that dir
17:17 eMBee ok, extension_modules sounds good, let me start with that
17:18 kmkramer71 joined #salt
17:19 teatime eMBee: this example config may help:  http://paste.debian.net/427580/
17:19 eMBee that directory is relative to the pillar base? doesn't seem so from the description in master conf
17:19 teatime no
17:19 teatime it is not
17:19 teatime pillar_roots has pretty much zero to do either either ext_pillar or extension_modules
17:20 eMBee yeah, that;s what i thought, your example looks good, thanks, i'll work through that for a bit...
17:21 hackel joined #salt
17:22 kmkramer71 I'm trying to install gnome-desktop group on SL 7.2 and its failing with "RuntimeError: maximum recursion depth exceeded in cmp"
17:23 kmkramer71 this is the only group that fails in the entire list of available groups. it has the largest list of mandatory packages.
17:24 aw110f joined #salt
17:24 teryx510 joined #salt
17:24 kmkramer71 we tend to also change yum.conf to install default and optional also so I fear we will hit more issues when we change that. where should I look to clear this unless it is a bug
17:25 alemeno22 joined #salt
17:25 eMBee ok, so i define: ext_pillar: foo: args? foo corresponding to foo.py in the modules directory? what do i do with the args?
17:25 Fiber^ joined #salt
17:27 hightekvagabond joined #salt
17:27 wendall911 anyone know how to do something like 'dnf copr enable' command via salt.states.pkg?
17:27 mavhq joined #salt
17:27 alemeno22 joined #salt
17:30 oscar___ joined #salt
17:31 oscar___ ?
17:34 dmaiocchi joined #salt
17:37 mpanetta joined #salt
17:39 brotatochip joined #salt
17:39 brotatochip hey guys, saltstack noob here, i’m wondering if it’s possible to trigger a systemctl daemon-reload when a systemd unit file is changed
17:40 brotatochip i created the unit file as a jinja template
17:40 brotatochip something similar to watched_in would be cool
17:40 alemeno22 joined #salt
17:41 cresten brotatochip: I think you want beacons: https://docs.saltstack.com/en/latest/topics/beacons/
17:42 cresten here be dragons
17:42 cresten NOT a fan of these docs
17:42 AndreasLutro brotatochip: use a module.run state with onchanges
17:42 brotatochip ah, sweet, thanks AndreasLutro and cresten
17:43 AndreasLutro https://bpaste.net/show/677798c2476c sanitised from my states
17:44 brotatochip ohh, sweet
17:44 ajw0100 joined #salt
17:44 brotatochip damn i love salt
17:44 * brotatochip is becoming a salt zealot
17:44 eMBee ok, i successfully created a ext_pillar module stub. now i just need it to return the right values, and i should be good to go
17:45 mavhq joined #salt
17:48 eMBee now i just need to figure out how to read the original pillar values
17:49 teatime they either get passed as a parameter to your ext_pillar function, or the global __pillar__
17:49 teatime can't remember which
17:49 eMBee it get's passed yes, put i haven't seen any docs or example how to use the object to get data out of it
17:50 teatime it's a dict of lists/dicts/strings
17:50 teatime like, it directly maps to the pillar data
17:50 eMBee i also can't see where the logging gets written to
17:50 eMBee thanks, i'll try that
17:53 preachermanx joined #salt
17:53 hightekvagabond joined #salt
17:57 andrew_v joined #salt
17:58 mavhq joined #salt
18:01 punkoivan joined #salt
18:03 kingscott joined #salt
18:04 quique joined #salt
18:04 kingscott I'm new to saltstack. How is the best way to update security packages on multiple servers? Running Ubuntu and CentOS? Should I use states, or the apt-get formula?
18:06 eMBee ok, my whole scheme doesn't work. pillar requires the minion to run in order to get its data on the master
18:06 teatime kingscott: probably a simple state/command to update all packages to latest; if you can't update all packages to your distro's latest, then maintaining your own repo mirrors and pushing updates you want to go out to them.
18:06 eMBee i need to look at this differently
18:06 teatime kingscott: otherwise you're looking at tryign to list every package you care about, and that's probably not sustainable.
18:06 eMBee i  want to tell salt to temporarely ignore certain minions because i know they are not running
18:07 eMBee i may have to do: salt $(some script that returns a list of running minions) ...
18:08 racooper eMBee,  won't salt just ignore/timeout on minions that aren't available?
18:08 kingscott Is there a way to run both commands "yum update --security" and "apt-get install -o Dir::Etc::SourceList=/etc/apt/security.list" or a best practice to add that to a state?
18:09 davisj eMBee: I don't personally use mine, but that sounds like a good use case for it.
18:09 eMBee it will time out, but that timeout is to long if there are several minions not running. that id fine if they should be running, but if they are off intentionally then that is just wasting a lot of time
18:10 oscar___ hello everyone, just wrote my first runner however I can not figure out how to write a schedule pillar to schedule it.  `salt-run my.runner "blah" 1 5` runs fine from command line, how would I write a schedule pillar to invoke it and pass the 3 arguments?  The docs say you can schedule a runner but the example is of an orchestration and there are no arguments.
18:10 davisj have your minions publish $list_of_running_ocntainers to the mine
18:10 mavhq joined #salt
18:10 subsignal joined #salt
18:11 babilen kingscott: You would, essentially, run "salt 'yourminion' pkg.upgrade refresh=True"
18:12 babilen kingscott: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pkg.html
18:12 racooper kingscott,  not familar with the --security option to yum. what does that do?
18:13 babilen kingscott: I wouldn't necessarily make that part of a state as it is nice if your higstate is idempotent, but you can use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.uptodate
18:13 brianfeister joined #salt
18:13 kingscott --security only updates the security packages. I'm trying to avoid updating anything but security on the servers to avoid any un-needed changes
18:13 eMBee ok, how would i use the mine to target minions?
18:13 teatime kingscott: you can of course do one of two different things based on a grains value.
18:14 babilen pkg.upgrade does the right thing™
18:14 babilen (but it upgrades all packages)
18:14 teatime kingscott: for debian at least, only security fixes and critical bug fixes get into stable, so I would think updating all packages would be what you really wanted.  and I figure RHEL works the same way.
18:14 babilen But then .. if you use official sources, you should have security updates only anyway
18:14 kingscott yes...that's what i'm trying to avoid for the devs.
18:15 teatime kingscott: if you only update from security.debian.org, you could miss security updates
18:15 babilen Indeed
18:15 |Fiber^| joined #salt
18:15 racooper if you're running RHEL or CentOS, you need to do full updates generally.  the versions on packages are not going to change; that's what backporting is for.
18:15 kingscott Thanks guys!
18:16 baweaver joined #salt
18:16 babilen kingscott: Run "salt 'yourminion' pkg.list_upgrades" to see which packages will be updates
18:16 teatime kingscott: This assumes you don't have weird repos configured, though
18:17 teatime like backports or EPEL and stuff
18:18 alemeno22 joined #salt
18:19 babilen Or random third-party ones
18:19 racooper EPEL tries to stay pretty consistent too, but some of the 3rd-party ones...brrrr scary
18:20 flowstate joined #salt
18:21 oscar___ hello everyone, just wrote my first runner however I can not figure out how to write a schedule pillar to schedule it.  `salt-run my.runner "blah" 1 5` runs fine from command line, how would I write a schedule pillar to invoke it and pass the 3 arguments?  The docs say you can schedule a runner but the example is of an orchestration and Im having no luck trying to figure out how to change it to invoke my runner with arguments.
18:21 flowstate joined #salt
18:25 akhter joined #salt
18:26 onlyanegg joined #salt
18:29 Muchoz joined #salt
18:30 _beardedeagle joined #salt
18:31 source47_ joined #salt
18:32 davisj eMBee: Just spit-balling here, but if the mine data can be used in a pillar (never looked into it), then you can target via pillar "salt -I 'data:key'"
18:33 babilen It can -- https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.mine.html#salt.modules.mine.get
18:34 hackel joined #salt
18:34 davisj or, if you can call a runner inside pillar, then this? https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.manage.html#salt.runners.manage.alived
18:34 davisj babilen: thanks!
18:34 teatime I think eMBee has kindof an XY problem
18:35 teatime the real question they wanted to ask, I think, was 'how do I target all active minions' or something similar.
18:38 eMBee teatime: that's one way to put it
18:39 teatime or maybe 'how can I maintain a list of minions, and then target that list' which is something I don't know a good answer to
18:39 teatime node groups, sadly, require restarting the master to modify
18:39 eMBee yes, exactly, that is where my problem started
18:41 eMBee so i was hoping to use pillar to maintain that list (because i am already using it to maintain the list of active containers) but accessing pillar data queries the minion so it doesn't help. and i am afraid salt mine won't help either. i may need an external solution
18:41 oscar___ you can write a runner that uses the results of manage.up then issue commands in the runner using that list as a target
18:42 gtmanfred cresten: cool
18:42 rihannon joined #salt
18:43 davisj Yeah, the "target active minions" seems like something that should have an obvious answer, but I'm drawing a blank.
18:44 teryx510 joined #salt
18:45 oscar___ see the example at https://docs.saltstack.com/en/latest/ref/runners/   just need to change it to use a RunnerClient to execute manage.up instead of using cmd to do a test.ping in the example
18:46 eMBee well, i can see why it is not obvious. in order for the master to know which minion is active, it has to at least ping it. so it can never tell you what is active now without doing that. at best rhere could be something like: target all minions that have been active a minute ago. or something like that
18:47 nZac joined #salt
18:47 quique joined #salt
18:47 oscar___ salt-run manage.up will do a ping to determine which are connected and responding and just return the live ones
18:48 eMBee so i think what makes more sense is to have a feature in salt where i can tell the master to temporarily ignore certain minions. at least that would work for my use-case
18:49 eMBee or the ability to define groups without restarting the master, then i could update groups as i go
18:51 vivek_ joined #salt
18:51 vivek_ hi
18:51 teatime I would also like that feature
18:52 vivek_ i have an enviornment of 2000 machines, & there are certain machines on which minion is running but not connected to Master because of version conflict of installed minion
18:52 vivek_ is there is a way by why i can run a command & find out which minions are not connected to salt master
18:52 vivek_ please suggest
18:54 davisj vivek_: try https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.manage.html
18:55 alemeno22 joined #salt
18:57 blakemiller joined #salt
18:58 hrumph joined #salt
18:58 hrumph hi
18:58 vivek_ thanks davisj_ but i have a problem that the minions having older version of minions installed has not contacted the Master not even hence i think the salt runner wont be my best bet
18:59 vivek_ is there anything i can run on mininon machines having old version of minions..?
18:59 vivek_ please suggest
18:59 flowstate joined #salt
18:59 brotatochip joined #salt
19:00 edrocks joined #salt
19:00 nidr0x joined #salt
19:01 mavhq joined #salt
19:01 hrumph i've got salt master version 2015.5.0 and a windows salt-minion version 2015.5.5.0. I ran salt-run winrepo.update_git_repos and that went ok then I ran "salt '011000' pkg.refresh_db" and I am just getting "False". Can anyone help me?
19:03 eMBee vivek_: have those minions connected to the master before? does the master know about them? or have they never connected?
19:03 source47_ joined #salt
19:03 vivek_ eMBee - the minions have never connected to  Master..
19:04 vivek_ thoughh the minion processs is running on the nodes, is there a way i can find which r not connected to Master..pls advise
19:04 cresten Anyone here ever have luck getting salt-cloud working in GCE?
19:04 cresten I've had quite the time with it
19:05 rihannon joined #salt
19:05 eMBee vivek_: get a list of all minions, and remove those which are connected. for the remaining list, you need to find a way to access them without salt, (ssh?) and run something to upgrade them
19:06 davisj vivek_: if they have ever tried to connect then they might show up in output of salt-key
19:06 davisj otherwise, what eMBee said... maybe salt-ssh.
19:06 hrumph should i run genrepo or something? are the instructions missing steps?
19:06 source47_ joined #salt
19:07 cyborg-one joined #salt
19:08 DammitJim is there an easy way to create a secondary ssh server listening on a different port?
19:08 hrumph the win_pkg modules does not seem to be available on the minion
19:09 vivek_ _eMee _davisj - ohh i was wondering if there any module/function on the minions which i can call to show the master details,,, if the node doesnt show the master status ,,i can conclude that tthis is not connected to master . is there any such possibility ..since the main problem is there r many minions which r never connected to master because of lower version of zeromq installed on them
19:10 eMBee vivek_: so you have a means to run something without salt? you could check for the existence of the master key
19:10 DammitJim how do I access the variable short from a state? http://paste.debian.net/427851/
19:11 davisj or just query the version of the salt, or zmq package?
19:11 vivek_ not without salt ,using salt-call i mean
19:11 vivek_ hmm,,,that is the only way ..i think ..
19:12 DammitJim {% set service_settings = salt['pillar.get']('ftp_quartz:scheduler:short'    , {}) %} ?
19:12 davisj vivek_: salt-minion  --version
19:12 DammitJim I actually want to pass the scheduler object to a template
19:13 eMBee vivek_: if the minion is not connected to the master, then how would the master talk to it?
19:14 brotatochip joined #salt
19:15 vivek_ i mm asking for it to talk to master,, i m just thinking is there any function which return the status of master from minion..in case minion is not connected to master it can return Null or Not connected sort of message.. i m just inquiring since i m kind of new to SaltStack..but thanks for ur answers _davisj _eMBee
19:15 _beardedeagle DammitJim: didnt we go over this the other day
19:16 ZiLi0n joined #salt
19:16 eMBee vivek_: you want to run this on the minion?
19:16 DammitJim but it's not working
19:16 DammitJim or I am doing something else wrong
19:16 merlehaggard for starters, from a master, 'salt-run manage.down' will show down minions, then you can script ssh to get them back up,update etc
19:17 TheoSLC joined #salt
19:17 DammitJim _beardedeagle, OMG... the stupid stuff I do
19:17 vivek_ yes on minion
19:18 _beardedeagle {% set service_settings = salt['pillar.get']('ftp_quartz', {} %} then you have to call service_settings['scheduler']['short']. Either way you *will* have to pass scheduler because that is how you have your pillar structured.
19:18 DammitJim yes, thanks
19:18 oscar___ nobody got any ideas re how to write pillar to schedule execution of a runner (and passing arguments to the runner)?
19:18 DammitJim I was doing this: {% set ftp_quartz_sections = pillar.get('ftp_quartz', {} ) %}
19:18 DammitJim then calling pillar on ftp_quartz_sections:scheduler
19:18 _beardedeagle ah
19:18 DammitJim and that wasn't working
19:19 DammitJim I guess one can't set another variable like that
19:19 eMBee vivek_ well, ls /etc/salt/pki/minion/minion_master.pub; for example should fail if the minion never connected to the master;
19:19 _beardedeagle nope
19:19 DammitJim I wonder why not
19:19 eMBee vivek_: and as davisj said: salt-minion  --version; tells you  the version
19:19 _beardedeagle .get is the method off of the dictionary, which is called via ['pillar.get']('', {})
19:20 _beardedeagle not pillar.get('')
19:20 _beardedeagle jinja/salt does it different from pure python
19:20 DammitJim I'll have to remember that!
19:20 DammitJim thanks
19:21 vivek_ _davisj _eMBee many thanks guys
19:21 ZiLi0n Hi everyone. thanks for all your help. I have been looking around today to see if there is a way to print out a message at the master console, the message is defined in the states sls. It is for a way somehow os printing the tasks that a minion is performing, no need of results from the minion, only a static message
19:21 vivek_ will work it out based on ur suggestion
19:22 ZiLi0n like 'upgrading kernel,,,' then when it starts the next tasks, it prints 'upgrading OS', etc.
19:22 baweaver joined #salt
19:23 ageorgop joined #salt
19:23 cresten joined #salt
19:23 mavhq joined #salt
19:24 lero joined #salt
19:24 iggy oscar___: runners run in the master context, pillar exists in the minion context
19:25 teatime I assume -I has to generate the pillar for ever registered minion before it can continue
19:25 teatime *for every
19:26 AndreasLutro teatime: for matching? pillars are cached on the master so not necessarily
19:26 onlyanegg joined #salt
19:26 oscar___ yes, but (as per documentation, and it works) you can write pillar (using key schedule) to schedule things to run including runners (see the "scheduling jobs" section of https://docs.saltstack.com/en/latest/topics/jobs/)
19:27 oscar___ iggy: that page says you can use it to schedule execution of runners but the example is orchestration specific
19:27 AndreasLutro oscar___: schedulers run execution modules, so you need to find an execution module that runs a runner
19:27 davisj ZiLi0n: the only way I can think of is to set up all your states to fire an event when it runs, then watch the event bus on the master. Not that I'd recommend that. Normally, it's best to just accept the fact that minions don't return until after the run is finished.
19:33 source47_ joined #salt
19:33 ZiLi0n davisj thank you very much. It is a good suggestion to fire events back from states
19:34 aarontc joined #salt
19:34 notnotpe_ joined #salt
19:35 writtenoff joined #salt
19:36 DammitJim I have my directories in my master as: /srv/salt/ssh with my sls files in there. Could I have my sls files in a subdirectory like /srv/salt/ssh/server ?
19:36 DammitJim how do I call those?
19:36 hrumph i realise that they have changed everything in a recent version change
19:36 DammitJim like if I have something like /srv/salt/ssh/server/users.sls
19:37 iggy DammitJim: yes, just use more dots
19:37 DammitJim thanks... trying to keep my stuff organized
19:38 DammitJim after finding, I have an openssh folder, then an ssh folder then an openssh-server folder
19:38 DammitJim ugh
19:38 mavhq joined #salt
19:38 Lee_ joined #salt
19:41 hrumph i had to run winrepo.genrepo instead of winrepo.update_git_repos. I wish you guys would have helped me out on this
19:45 blakemiller joined #salt
19:49 * oscar___
19:49 baweaver joined #salt
19:50 onlyanegg joined #salt
19:55 ZiLi0n davisj so I have one event being fired from a state. Is there a way to watch those events and show them in salt cli while waiting for the salt command to complete?
19:57 tvinson joined #salt
19:59 slav0nic joined #salt
20:01 iggy there's a runner I think
20:02 rodr1c joined #salt
20:02 rodr1c joined #salt
20:02 linjan_ joined #salt
20:03 quique joined #salt
20:04 brianfeister joined #salt
20:06 tvinson joined #salt
20:09 cerberus_ joined #salt
20:15 georgemarshall joined #salt
20:17 angvp joined #salt
20:18 Muchoz joined #salt
20:25 mavhq joined #salt
20:31 hightekvagabond joined #salt
20:32 nidr0x joined #salt
20:36 quix joined #salt
20:40 akhter joined #salt
20:47 linjan_ joined #salt
20:49 barajasfab joined #salt
20:49 ajw0100 joined #salt
20:52 alemeno22 joined #salt
20:53 MTecknology joined #salt
20:58 chmod666org joined #salt
20:59 jken joined #salt
20:59 jken Hello, what command would I run to set the root password on all my minion machines?
20:59 TheoSLC joined #salt
21:02 Ch3LL_ jken: if you are just looking for an execution module looks liek this will do it: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.shadow.html#salt.modules.shadow.set_password
21:03 quique joined #salt
21:04 teryx510 joined #salt
21:05 brotatochip joined #salt
21:05 surge_ joined #salt
21:05 teryx510 hey guys, anyone know if @reboot is supported by the cron state?
21:05 surge_ So the saltstack slack module, am I supposed to generate a “test” token from here? https://api.slack.com/tokens
21:07 mavhq joined #salt
21:09 renaissancedev joined #salt
21:10 renaissancedev How would I list the state modules and their functions that are loaded in a salt minion? I am trying to debug a custom state that I'm writing which isn't finding the specified functions.
21:12 Ch3LL_ renaissancedev: i think you are looking for this: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.sysmod.html#salt.modules.sysmod.list_state_functions
21:12 renaissancedev Cool, thanks Ch3LL_
21:12 Ch3LL_ no prob
21:15 Ch3LL_ teryx510: i'm not sure, but i found this: https://github.com/saltstack/salt/issues/2896 someone is reporting that it was added. you could follow the discussion there
21:15 saltstackbot [#2896]title: cron.present should support magic string @reboot  | cron supports using some special strings replacing the first five time matching fields:...
21:17 blakemiller joined #salt
21:19 brotatochip is there any reason I shouldn’t set node specific variables in my role sls files vs setting them in pillar using grains?
21:19 teryx510 Ch3LL_: thanks!
21:21 Ch3LL_ teryx510: glad to help :)
21:21 alemeno22 joined #salt
21:21 Muchoz_ joined #salt
21:22 brotatochip on another note, Ch3LL_ are you going to get the HTC Vive for Portal 3 in VR?
21:28 Corey Seeing a strange jinja issue.
21:28 Corey "{{ pillar['management_gateway']['access_id'] }}" <-- the closing quote is on a newline. I can't seem to get the jinja renderer to chomp the newline.
21:28 onlyanegg joined #salt
21:29 teatime so, your pillar value contains a newline then?
21:29 Corey teatime: I didn't think so. :-)
21:30 teatime that's the only thing that makes sense to me
21:30 teatime can you show wehre it's set
21:30 garphy joined #salt
21:31 Corey teatime: Ah... it's in plllar as a gpg rendered value.
21:31 teatime hrm, I don't know much (anything) about that
21:31 teatime but you can check if it ends in a newline with pillar.get on the command-line
21:34 Corey Yeah, that's what I'm doing.
21:36 Ch3LL_ brotatochip: haha i'm really tempted. i take it you know what my name is from ;)
21:37 brotatochip of course, it’s my favorite game of all
21:37 brotatochip :-)
21:37 Corey That sorted it. Thanks.
21:38 Ch3LL_ brotatochip: mine too.. well that and earthbound
21:38 ageorgop joined #salt
21:46 TheoSLC joined #salt
21:51 schmichael left #salt
21:52 brotatochip joined #salt
21:53 brianfeister joined #salt
21:53 kevinquinnyo1 joined #salt
21:53 onlyanegg joined #salt
22:02 lemur joined #salt
22:08 whatevsz joined #salt
22:10 whatevsz joined #salt
22:12 chrismoos t
22:14 cilkay teryx510: What are you trying to do with @reboot? I use @reboot to trigger a shell script which wraps salt-call on a masterless minion.
22:14 devops joined #salt
22:16 brianfeister joined #salt
22:19 teryx510 cilkay: We have an internal app that does some firewall rule inspection and needs to be run at startup. Really should be done with systemd but I figured I could quick fix with cron until it can get packaged up properly.
22:19 alemeno22 joined #salt
22:19 brotatochip joined #salt
22:20 linjan__ joined #salt
22:21 teatime p.s. you can make your own init scripts / systemd service descriptions; its not deep magic strictly relegated to package maintainers :)
22:23 teryx510 teatime: I hear you…just being lazy.
22:24 rodr1c I'm ready to pull my hair out, maybe someone has some insight on what to check. I'm trying to pull from a docker registry (details are setup in my pillar file), but no matter what I do I keep getting 'dockerng' __virtual__ returned False: Docker module could not get imported. I have double checked that docker-py is in fact installed, but still no luck. Anyone have some  suggestions on what to check?
22:24 baweaver joined #salt
22:29 tvinson joined #salt
22:32 hightekvagabond joined #salt
22:33 Ch3LL_ rodr1c: can you do the following 1. python 2. import docker 3. import docker-utils   any errors with that?
22:34 rodr1c Ch3LL_: On the minion machine correct?
22:34 brotatochip hey guys, how do I call a single grain value when there are multiple? for example, ipv4 contains both loopback and eth0 ip addresses, and I want grains to grab just the eth0 address in a template
22:34 rodr1c Ch3LL_: docker imports just fine, but docker-utils does not
22:34 Ch3LL_ rodr1c: well let me make sure i understand the scope. Which docker module are you running?
22:35 brotatochip I’m thinking it’s an array, possibly a python array (or I think python refers to them as lists)
22:36 rodr1c Ch3LL_: In my sls state file I'm trying to use dockerng.image_present
22:38 alemeno22 joined #salt
22:39 zenlot6 joined #salt
22:39 absolute joined #salt
22:39 brotatochip gah, meeting time
22:39 whatevsz joined #salt
22:40 absolute joined #salt
22:41 Vaelatern joined #salt
22:41 onlyanegg joined #salt
22:42 Ch3LL_ rodr1c: whats the output of pip list | grep -i dock
22:43 rodr1c Ch3LL_: docker-compose (1.6.2) docker-py (1.8.0) docker-utils (0.1.4) dockerpty (0.4.1)
22:46 keimlink joined #salt
22:49 Ch3LL_ rodr1c: hmm looks like the code is looking to be able to do this: import docker.utils  but looks like you have docker-utils installed. i wonder if you need a particular version.
22:49 Ch3LL_ can you try this: sudo pip install docker-py
22:49 Ch3LL_ maybe pip has a more recent version
22:50 rodr1c Ch3LL_: Just shows its already installed. Requirements already satisfied
22:54 whatevsz joined #salt
22:55 rodr1c Ch3LL_: Any idea which python these would be trying to run under? When I just type #python, the docker imports work. If I do #python2 the docker import fails
22:56 rodr1c Ch3LL_: This is on an amazon linux AMI if that helps make any difference
22:57 iggy salt only works with python2 right now
22:57 whatevsz joined #salt
22:58 Edgan iggy: good to know
23:00 whatevsz joined #salt
23:01 Ch3LL_ rodr1c: yeah like iggy said python2, so you probably installed the python3-docker package
23:01 Ch3LL_ i'm not sure of hte name but just do a yum search docker and look at all the available python*-docker packages and make sure you install the correct one
23:01 Ch3LL_ i gotta head out though. good luck
23:01 rodr1c Python3 isn't even installed on the machine. It looks like it was expecting it to have been installed with pip-2.6
23:02 rodr1c After I did pip-2.6 install docker-py it works fine. Must just be a weird setup with the amazon ami
23:02 iggy it is
23:02 Ch3LL_ yeah it is.
23:03 iggy there are a bunch of issues in the salt issue tracker about Amazon Linux
23:04 Ch3LL_ yeah because amazon changed their image to use python27 instead of 26 even though its based on rhel6 it can cause some issues. glad its working now though
23:04 rodr1c Very much appreciate the help
23:05 Ch3LL_ no problem. gotta go have a great weekend
23:05 rodr1c You as well
23:07 alemeno22 joined #salt
23:12 brianfeister joined #salt
23:13 TheoSLC joined #salt
23:16 keimlink_ joined #salt
23:17 cro joined #salt
23:21 alemeno22 joined #salt
23:22 keimlink joined #salt
23:23 Brandon_ joined #salt
23:32 hightekvagabond joined #salt
23:43 hasues joined #salt
23:45 hasues left #salt
23:50 brotatochip so nobody around to help me figure out how to pull the first grain value for a grain?
23:50 hemebond ?
23:51 hemebond You want a custom grain to be the first item in a list of an existing grain?
23:51 brotatochip No
23:51 brotatochip the ipv4 grain contains 2 values, I want to pull on the one for eth0 and not for loopback
23:52 hemebond Hmm, I was trying to do that recently.
23:55 brotatochip I found a module for it
23:55 brotatochip salt ‘*’ network.interface_ip eth0 pulls it up
23:55 brotatochip I’m not sure how Jinja would grab that
23:56 brotatochip There’s also network.ip_addrs
23:59 brotatochip Ah, hemebond, it’s {{grains[‘ip_interfaces’][‘eth0’][0]}}
23:59 hemebond Yeah

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