Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-06-23

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

All times shown according to UTC.

Time Nick Message
00:01 whytewolf don't know a stateful way. but you could maybe call modules.useradd.getent and compare it to a list of users [include service accounts in your list]
00:01 mosen murrdoc: hehe, hiya murrdoc
00:02 murrdoc sup mosen
00:02 whytewolf or just modules.userad.list_users
00:03 whytewolf http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.useradd.html#salt.modules.useradd.list_users
00:03 mosen yeah typically the execution modules provide the functional part and the state compares the outputs.. but not always. It's a good abstraction in the sense that you can get orchestration from the execution module and use the exact same functionality as described in the state :)
00:04 mosen what whytewolf suggested basically :)
00:05 ahammond whytewolf sounds about right. Thanks.
00:06 imaack joined #salt
00:08 leszq joined #salt
00:09 ericof joined #salt
00:14 cberndt joined #salt
00:15 imaack Hoping somebody can help me with this. I'm getting an error when using the mysql-formula on an Amazon Linux instance running as a masterless minion -> Specified SLS mysql in saltenv base is not available on the salt master or through a configured fileserver (gist with relevant files: https://gist.github.com/anonymous/1499d5d49139f7ed36ed
00:16 napsterX joined #salt
00:23 ahammond I have {% set current_users = salt['useradd.list_users']() %} and am getting  failed: Jinja variable 'dict object' has no attribute 'useradd.list_users'
00:23 ahammond which seems... unexpected
00:23 ahammond and yeah, this is on a linux box
00:24 cruatta joined #salt
00:25 whytewolf user.list_users
00:26 ahammond whytewolf cool. thanks
00:26 murrdoc ahammond:  salt['module.function']
00:27 murrdoc anything u can run as salt minionname module.function at the cli
00:32 ahammond murrdoc yeah, I get that... what I was confused about was the correct name of the function. thought it was http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.useradd.html#salt.modules.useradd.list_users
00:33 murrdoc salt minionname sys.doc <module>
00:33 murrdoc or salt minionname sys.doc <module>.<function>
00:33 murrdoc when in doubt
00:34 ahammond murrdoc which is great if you already know the module name. Not so great if you're trying to figure that out.
00:34 murrdoc i am not right
00:34 ranomore joined #salt
00:34 murrdoc i am helping the future u
00:34 murrdoc the one who will know the module but cant remember the function
00:35 murrdoc :) my bad on the recommendation
00:37 whytewolf well you could run sys.doc without a module name and get everything
00:37 dingo_ a for loop of all modules + grep and you win
00:40 imaack so, the odd thing I'm seeing is that minion file ignores my file-roots
00:41 imaack or wait, is the minion file not supposed to be at /srv/salt/minon
00:41 fridder joined #salt
00:41 whytewolf minion file should be in /etc/salt/minion
00:41 whytewolf it's a config file
00:42 conan_the_destro joined #salt
00:43 imaack yup, I read it wrong, thank you whytewolf
00:46 Micromus joined #salt
00:49 llua joined #salt
00:49 llua joined #salt
00:57 favadi joined #salt
01:04 timoguin joined #salt
01:06 Micromus joined #salt
01:14 aCodinMan joined #salt
01:16 dendazen joined #salt
01:19 napsterX joined #salt
01:23 Micromus joined #salt
01:32 david_an11 joined #salt
01:41 DammitJim joined #salt
01:42 beauby joined #salt
01:45 otter768 joined #salt
02:03 Furao joined #salt
02:04 desposo joined #salt
02:06 aea joined #salt
02:08 beauby joined #salt
02:12 rocket Hi iggy
02:13 Micromus joined #salt
02:13 rocket helping the wife clean up boiled over jam in the kitchen is no fun .. that is all ..
02:20 napsterX joined #salt
02:23 malinoff joined #salt
02:25 ITChap joined #salt
02:26 drawsmcgraw left #salt
02:41 napsterX joined #salt
02:47 beauby joined #salt
02:51 BretFisher joined #salt
02:52 donmichelangelo joined #salt
03:07 NightMonkey joined #salt
03:07 gladiatr joined #salt
03:09 beauby joined #salt
03:13 BretFisher joined #salt
03:26 ageorgop joined #salt
03:39 mosen joined #salt
03:45 otter768 joined #salt
04:21 jeddi joined #salt
04:23 clintberry joined #salt
04:27 SpX joined #salt
04:32 cliluw joined #salt
04:33 rdas joined #salt
04:40 husanu joined #salt
04:45 ajw0100 joined #salt
04:45 evle joined #salt
04:51 husanu joined #salt
04:51 joeto joined #salt
05:00 markm_ joined #salt
05:02 husanu joined #salt
05:03 napsterX joined #salt
05:04 favadi joined #salt
05:08 catpigger joined #salt
05:31 hrumph joined #salt
05:31 hrumph hi
05:31 stoogenmeyer joined #salt
05:32 hrumph i like the idea of returners, (an alternative is to use the client stuff on the salt-master) but is there some way to use them securely when users have admin rights on their machines?
05:32 hrumph some way to hide db credentials (or ssh credentials or whatever) from the users?
05:39 ajw0100 joined #salt
05:41 hrumph returners probably aren't a good idea in lot of real-world use-cases where credential security might be an issue
05:46 leszq joined #salt
05:46 otter768 joined #salt
05:53 ndrei joined #salt
05:56 dh joined #salt
05:57 husanu joined #salt
06:03 AndreasLutro joined #salt
06:04 onorua joined #salt
06:05 sieve joined #salt
06:09 colttt joined #salt
06:14 evle1 joined #salt
06:17 impi joined #salt
06:18 aCodinMan joined #salt
06:19 viq joined #salt
06:20 ndrei joined #salt
06:24 ajw0100 joined #salt
06:24 NightMonkey joined #salt
06:25 prathee joined #salt
06:26 prathee hey all! i have a really trivial question..... logging into halite..the username if what we specify under the external_auth in the master config. right... how do we set the password? or get to know the password for logging in to halite?
06:26 prathee is what*
06:29 malinoff joined #salt
06:30 prathee oh! i guess i understood how this works! thanks anyways ! :)
06:30 egil prathee: using pam auth, you need to create the user first
06:30 prathee this username and password is the system's username and password is it?
06:31 stephanbuys joined #salt
06:31 mosen its tied into whatever the external auth is
06:31 mosen for pam its the same as the system
06:31 prathee using pam..under the external_auth in my master config..i have a user named salt...
06:31 favadi joined #salt
06:32 prathee oh...i was provided a virtual machine...been logging in through ssh without any password being asked...i wonder what the username and password of my machine is
06:32 egil prathee: then you must create the user as a local user
06:32 egil you can use only cert auth as well
06:36 prathee if i have to create it as a local user...you mean to say..i must provide the username and password of the virtual machine rite?
06:37 prathee the machine on which my salt master is installed and configured...
06:38 flyboy joined #salt
06:38 prathee okie..i have successfully logged in! thank you egil and mosen! :-)
06:39 mosen np prathee
06:40 KermitTheFragger joined #salt
06:43 ndrei joined #salt
06:44 monkey66 joined #salt
06:49 ndrei joined #salt
06:51 cliluw joined #salt
06:55 toanju joined #salt
06:57 aw110f joined #salt
06:58 onorua joined #salt
07:03 thalleralexander joined #salt
07:03 zz_ashmckenzie joined #salt
07:05 kawa2014 joined #salt
07:09 bfoxwell joined #salt
07:09 Romlok joined #salt
07:13 eseyman joined #salt
07:15 jhauser joined #salt
07:17 lb1a joined #salt
07:25 leszq joined #salt
07:31 ITChap HI
07:31 ITChap for people using gitfs_remotes, do you use one repo for the states and one for the pillar ?
07:32 denys joined #salt
07:32 ITChap or one repo for both and you use the gitfs_root option
07:34 ingslovak joined #salt
07:35 mosen one for each
07:46 al joined #salt
07:47 otter768 joined #salt
07:50 TyrfingMjolnir joined #salt
07:51 supersheep joined #salt
07:52 favadi joined #salt
07:53 aCodinMan joined #salt
07:54 Furao_ joined #salt
07:54 berto- joined #salt
08:04 FRANK_I joined #salt
08:04 chiui joined #salt
08:09 impi joined #salt
08:11 gwmngilfen joined #salt
08:11 leszq joined #salt
08:12 lb1a joined #salt
08:17 pcdummy joined #salt
08:17 pcdummy joined #salt
08:17 julez joined #salt
08:18 FredFoo has anyone successfully used wheel functions in a state?
08:19 Xevian joined #salt
08:19 FredFoo Trying to install a container and want the host minion to tell the master to accept the key of the new minion once done
08:20 FredFoo using exactly the example in http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html
08:20 FredFoo works without errors, tells me the command was executed, no errors
08:20 FredFoo but also no change :)
08:21 FredFoo key stays in /etc/salt/pki/master/minions_pre/
08:22 FredFoo running it all with -l all gives no hint that anything went wrong
08:22 Flusher joined #salt
08:25 FredFoo salt '*' saltutil.wheel key.list_all gives me no errors, but no list either
08:25 FredFoo beginning to think I am missing something
08:26 FredFoo important ...
08:27 CeBe joined #salt
08:29 sieve joined #salt
08:30 Grokzen joined #salt
08:30 CeBe1 joined #salt
08:39 Pixer joined #salt
08:40 s_kunk joined #salt
08:40 s_kunk joined #salt
08:53 sgate1 joined #salt
08:56 yuhl_work___ joined #salt
09:05 supersheep joined #salt
09:07 favadi joined #salt
09:08 chiui joined #salt
09:08 pbrooko joined #salt
09:08 CeBe joined #salt
09:08 s_kunk joined #salt
09:12 sieve joined #salt
09:13 sieve joined #salt
09:14 chiui joined #salt
09:16 ingslovak joined #salt
09:18 c10 joined #salt
09:23 sieve joined #salt
09:24 pbrooko joined #salt
09:26 alxbse joined #salt
09:28 pbrooko joined #salt
09:29 keimlink joined #salt
09:31 sieve joined #salt
09:31 ALLmightySPIFF joined #salt
09:31 Furao joined #salt
09:36 sieve joined #salt
09:38 favadi joined #salt
09:43 sieve joined #salt
09:47 otter768 joined #salt
09:48 linjan joined #salt
09:55 kusams joined #salt
09:57 ingslovak joined #salt
09:58 fredvd joined #salt
10:01 ndrei joined #salt
10:04 Furao joined #salt
10:06 favadi_ joined #salt
10:06 robothands joined #salt
10:10 devops joined #salt
10:12 devops hi, while configuring gitfs I am getting the message "comment:      No Top file or external nodes data matches found"
10:12 devops http://pastebin.com/J9MEY6NW
10:12 PI-Lloyd Any word on when the Ubuntu PPA is going to get updated with the newer versions of 2015.5.x ? Still only seeing 2015.5.0 available.
10:13 devops this is my configuration. http://pastebin.com/J9MEY6NW
10:13 devops can any one help me fix this
10:14 chiui joined #salt
10:14 PI-Lloyd devops: check the matching in the top file to ensure you are matching the correct target
10:16 devops Ok
10:25 evle joined #salt
10:30 wpot joined #salt
10:30 ph123 joined #salt
10:30 devops @PI-Lloyd: this is the message I getting while running the command "salt '*' state.apply" for all the minions
10:30 devops http://pastebin.com/F3e6Ss5N
10:30 ph123 hi all
10:31 devops salt works fine without salt-formulas. or gitfs
10:33 leszq joined #salt
10:34 evle1 joined #salt
10:36 ph123 In the docs they say, that if I specify an order for several states, and the order value is equal, then the states will be executed in parallel (tandem):
10:36 ph123 http://docs.saltstack.com/en/latest/ref/states/ordering.html
10:36 ph123 I cannot get this to work, did I misunderstand?
10:36 AndreasLutro devops: you can't only have a saltstack-formula as your states - formulas have no top.sls
10:37 AndreasLutro devops: try adding - roots to your fileserver_backend
10:37 sieve joined #salt
10:38 AndreasLutro ph123: "in tandem" and "in parallel" are not the same
10:38 mitsuhiko joined #salt
10:41 ph123 aw, ok. thanks
10:41 CeBe joined #salt
10:41 ph123 is there any way to execute different states in parallel?
10:41 AndreasLutro no
10:42 ph123 alright, thanks for the answers
10:43 sieve joined #salt
10:51 chiui joined #salt
10:54 cberndt joined #salt
10:56 ingslovak joined #salt
10:58 epcim joined #salt
10:59 ericof joined #salt
11:01 ndrei joined #salt
11:03 favadi joined #salt
11:05 stephanbuys1 joined #salt
11:05 devops hi, I am new to salt and I am confused on using salt-formulas. how to call these formulas in top file. So Can anyone guide me on how to use salt-formulas. For example salt formula: https://github.com/saltstack-formulas/nginx-formula
11:07 asaladin joined #salt
11:12 ndrei joined #salt
11:13 babilen devops: You have to make them available to the salt master somehow to begin with. I would recommend to fork the salt-formula on GH (or elsewhere) and to add that formula as GitFS on the salt master. For that you add "- git" to "fileserver_backend" in the master config and "- https://github.com/youruser/salt-formula.git" as "gitfs_remotes"
11:13 babilen This formula is somewhat special as it allows you to configure the master (and minions) themselves.
11:14 babilen You can, naturally, also clone a formula locally somewhere (e.g. /srv/formulas) and add that to file_roots on the salt master.
11:14 aqua^c joined #salt
11:17 leszq joined #salt
11:17 babilen Once you have the salt formula in place you can start using it so that the master can salt itself (i.e. apply "- salt.master" to the master, yes you need a minion on the master for that to work). With that in place you can start configuring additional formulas using the pillar of the salt-formula. This takes care of cloning the formulas and configuring them: https://github.com/saltstack-formulas/salt-formula
11:17 babilen /blob/master/pillar.example#L132
11:17 dkrae joined #salt
11:18 babilen So, you would then fork all formulas you'd like to use to https://github.com/YOURUSER and set salt_formulas:git_opts:baseurl and list them under salt_formulas:list:base: ...
11:19 babilen I suggest the forking as you would otherwise track git HEAD which might not be a good idea if you like to check changes first before you push them into your infrastructure.
11:20 babilen You can also configure all formulas you'd like to use as gitfs_remote directly (like you did for the salt-formula earlier)
11:20 cberndt joined #salt
11:21 babilen To use states in the formula you just apply them (e.g. "- salt.master" for the salt-formula or "- nginx" for the nginx one. Configuration of their behaviour is typically done in pillars and most (if not all?) formulas should come with a pillar.example that shows all applicable settings.
11:26 gyre007__ left #salt
11:26 markm_ joined #salt
11:33 devops @babilen: Thanks a lot. Let me try these things
11:34 c10 joined #salt
11:34 CeBe joined #salt
11:36 napsterX joined #salt
11:40 julez joined #salt
11:40 babilen devops: You are welcome. The setup above is a bit more complicated than it needs to be, but you would essentially grant root to everyone who can commit to salt-formulas otherwise (which I wouldn't consider to be a good idea)
11:41 elfixit joined #salt
11:42 leszq joined #salt
11:42 kusams joined #salt
11:42 pbrooko joined #salt
11:43 ksj is it possible to change the pillar format from yaml? ideally I'd like it to read from a database, but an ini file would work too
11:44 ksj I know you can change the renderer from the jinja/yaml default, but I can't find any info on pillar
11:44 ksj window -1
11:44 AndreasLutro ksj: look into external pillars maybe
11:45 babilen ksj: You'd simply set it in the shebang (e.g. #!py for Python)
11:45 _JZ_ joined #salt
11:45 babilen ah
11:46 babilen That assumes that there is a renderer for the format you want to use. For databases (and somesuch) AndreasLutro's suggestion to look into external pillars is spot on: http://docs.saltstack.com/en/latest/ref/pillar/all/
11:48 julez joined #salt
11:49 otter768 joined #salt
11:50 ageorgop joined #salt
11:50 otter768 joined #salt
11:56 leszq joined #salt
11:57 husanu joined #salt
12:00 DammitJim joined #salt
12:03 linjan joined #salt
12:06 ndrei joined #salt
12:10 amcorreia joined #salt
12:15 aqua^c joined #salt
12:16 mou joined #salt
12:17 kusams joined #salt
12:22 illern joined #salt
12:25 drawsmcgraw joined #salt
12:36 dendazen joined #salt
12:36 emaninpa joined #salt
12:40 bluenemo joined #salt
12:45 slav0nic joined #salt
12:49 GabLeRoux joined #salt
12:51 slav0nic joined #salt
12:52 napsterX joined #salt
12:54 subsignal joined #salt
12:55 Ozgurc joined #salt
12:55 TyrfingMjolnir joined #salt
12:57 Tecnico1931 joined #salt
13:02 linjan joined #salt
13:02 hal58th joined #salt
13:03 jespada joined #salt
13:06 primechuck joined #salt
13:07 hal58th_ joined #salt
13:14 supersheep joined #salt
13:15 scoates joined #salt
13:15 c10 joined #salt
13:15 leszq joined #salt
13:16 jdesilet joined #salt
13:20 hasues joined #salt
13:20 hasues left #salt
13:20 cluther joined #salt
13:21 Deevolution Has anyone else seen anything like this: https://github.com/saltstack/salt/issues/24830
13:23 AndreasLutro Deevolution: where is your renderer file located?
13:25 ksj babilen & AndreasLutro: thanks. I'll take a look at external pillars.
13:25 babilen yes, yes you will
13:25 babilen ;)
13:25 Deevolution AndreasLustro: in '/srv/salt/_renderers'
13:25 teryx510 joined #salt
13:25 julez joined #salt
13:25 bfoxwell joined #salt
13:26 Deevolution ksj:  I have pillars that read from a database.  We're actually just using the Python renderer.
13:26 racooper joined #salt
13:26 Deevolution ksj: It reads from a database (using pymssql) and returns yaml data.
13:26 Deevolution left #salt
13:26 Deevolution joined #salt
13:28 ksj Deevolution: interesting. I was hoping for something simpler than a database - preferably a flat text ini file. Mostly because I don't know SQL and don't want to have another layer of complexity just to edit config properties. flat text ini file is easy to grep/sed/awk.
13:29 ksj ha, just realised I said the exact opposite of my original question. I'm fickle...sorry
13:29 babilen ksj: And "normal" pillars don't satisfy that requirement?
13:29 Deevolution ksj: It would be pretty easy to do that with just straight Python via the renderer.
13:29 Deevolution Put #!py at the top and it works pretty well.
13:30 ksj babilen: how can you grep a yaml file? everything's on different lines. an ini file with properties of the form: environment.application.prepertyX = Y are processable
13:30 babilen You did not mention that requirement earlier
13:31 ksj Deevolution: yeah, I'll have an experiment with straight python. ceratinly the easiest for the environment I work in
13:31 ksj babilen: yeah, sorry
13:31 ksj it's because other people are pushing to put it all into a DB. I'm not convinced it's the right answer, but that's my own bias
13:31 babilen But sure, write an ini file, read that with configparser in Python and write the little code that is needed to return a dictionary in the run() function implemented there (use #!py as shebang)
13:31 ksj sounds good
13:32 babilen https://docs.saltstack.com/en/develop/ref/renderers/all/index.html are the renderers you can use
13:32 babilen (out of the box)
13:33 jespada joined #salt
13:33 Deevolution babilen: I've not been able to get any custom ones to work...  :(
13:33 Deevolution LOL
13:35 babilen Deevolution: That is because of "if saltuser == "Deevolution": do_something_funky()" at random places in the salt codebase
13:35 Deevolution babilen: sad panda
13:36 SheetiS joined #salt
13:38 timoguin joined #salt
13:39 kusams joined #salt
13:39 ndrei joined #salt
13:40 primechuck If I wanted to build a roster module, would it be similar to pillar or module where I can place it in aa _roster directory?
13:41 twork_ joined #salt
13:44 AndreasLutro primechuck: looks like it
13:44 primechuck Yay, thank you
13:45 mpanetta joined #salt
13:48 ndrei joined #salt
13:50 kawa2014 joined #salt
13:54 clintberry joined #salt
13:55 FredFoo Does anyone successfully use wheel modules?
13:59 FredFoo hoping :D
13:59 babilen FredFoo: Do you not?
13:59 Furao joined #salt
14:00 FredFoo haha
14:00 FredFoo :)
14:00 FredFoo Trying at least :)
14:00 andrew_v joined #salt
14:01 otter768 joined #salt
14:01 FredFoo If I run something like salt '*' saltutil.wheel key.list_all I get kind of Yeah! Cool! - but no list
14:01 FredFoo and no errors
14:01 perfectsine joined #salt
14:01 dRiN joined #salt
14:02 FredFoo me on the wrong path?
14:02 ksj ugh....maybe I'm being dumb, but the docs for external pillars at http://docs.saltstack.com/en/latest/topics/development/external_pillars.html just aren't making any sense
14:02 ksj anyone got any real world examples?
14:02 dyasny joined #salt
14:02 FredFoo Does it need to have extra configuration or acl's in order to work on a stock salt install?
14:04 Inver joined #salt
14:04 aqua^c joined #salt
14:04 Inver heya o/
14:05 dkrae joined #salt
14:06 Inver is it possible to do test.ping: - target: 'testminion' in a state file? cause I'm not having much luck with it, and I can't find an example in the docs
14:07 Deevolution Inver: Can you do it via cmd.run?  Also, why?
14:07 drawsmcgraw Inver: You may be interested in state.module() -> http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#module-salt.states.module
14:08 drawsmcgraw Deevolution: Maybe "only take some action if another minion is reponding" ?
14:08 Inver yeah via cmd it returns true, no problem there; I've made a reactor that triggers fine, but the result of the YAML rendering is just {}
14:08 Inver and the targeted minion never receives the command when I'm looking at the debug output
14:08 scoates joined #salt
14:09 Inver thanks for the link drawsmcgraw, gonna have a read through that
14:09 Deevolution Inver:  have you looked at the possibility of using peer based commands?
14:09 FredFoo If I understand the wheel right, its telling a minion to ask the master to do something with himself
14:09 Deevolution Also, I was refering to using cmd.run within a state.
14:09 Inver Deevolution: I haven't yet, gonna give that a look aswell
14:10 leszq joined #salt
14:11 ndrei joined #salt
14:12 Inver Deevolution: my initial test was actually cmd.run, trying to just issue a hostname command and see if it returned anything, but maybe the issue is somewhere else altogether, gonna go look at the things you have pointed me at
14:12 Inver thanks for the pointers :)
14:12 Deevolution Inver:  NP
14:12 Deevolution glad to help
14:12 FredFoo so if I am right it might be access rights, but I see no errors anywhere
14:13 FredFoo log says excecuted, but no results whatsoever
14:13 sporkd21 sounds like your targeting is off
14:14 murrdoc joined #salt
14:16 FredFoo can I target any minion run the wheel or should it be a specific one?
14:16 DammitJim is there a standard way of logging the results of a salt call to have a record of an update to a server per se?
14:18 sporkd21 FredFoo: I usually target my master's minion for that stuff
14:19 sporkd2 unless I need minion specific data
14:19 FredFoo I tried that too
14:19 FredFoo gives me back the name with the term None
14:19 ghoz joined #salt
14:19 ghoz hi
14:20 amcorreia joined #salt
14:21 leszq joined #salt
14:22 FredFoo I try to install an lxc container on a host and then have the hosts minion asking to accept the new container minions key
14:23 FredFoo executes without errors, but then nothing happens
14:23 FredFoo key stays in wrong dir
14:27 multia joined #salt
14:28 bhosmer joined #salt
14:29 dmz joined #salt
14:30 dmz hey y'all just looking at salt and wondered is there a non-commercial solution?
14:30 ageorgop joined #salt
14:30 dmz i see code on github but not sure relationship of salt to company to products
14:31 kusams joined #salt
14:31 adelcast joined #salt
14:32 scoates joined #salt
14:33 soren joined #salt
14:33 soren joined #salt
14:34 murrdoc sorry can u repeat the question ?
14:34 murrdoc are u trying to use saltstack community ?
14:34 murrdoc thats available in pip and lots of major os distro repos
14:36 sieve joined #salt
14:37 dmz was just curious
14:37 dmz the web site didn't make it clear that there was a full open-communitiy version
14:37 dmz the products only listed the commercial ones
14:37 sieve1 joined #salt
14:37 dmz and before i play with it i wanted to be sure i wasn't wasting my time
14:37 murrdoc ah
14:37 murrdoc havent used website in a while
14:37 * dmz isn't gonna pay 5k+ for any solution
14:37 * dmz is cheap :)
14:38 dmz well cost conscious which keeps costs down for customers
14:38 LtLefse yes, the open-source salt is fully functional and not restricted in any way
14:38 dmz cool; i'll check it out
14:38 LtLefse it just doesn't have the fancy Enterprise web console
14:38 dmz we dont' need that
14:38 dmz we have our own web ui we can integrate into
14:38 stoogenmeyer joined #salt
14:38 dmz is salt meant to replace or supplement somethign like chef?
14:39 TOoSmOotH replace
14:39 dmz sigh
14:39 dmz too many competing solutions
14:39 dmz we already invested heavily to deploy chef to hundreds of servers
14:39 TOoSmOotH I have used them all
14:39 dmz it's good for cfg mgmt but not really good for mgmt
14:40 TOoSmOotH salt is the most scalable and simple one of all the bunch in my opinion
14:40 dmz is salt agent based for ssh push? we have a highly segmented network; can't really have ssh flying around
14:40 murrdoc u can trigger chef from salt
14:40 dmz s/for/or
14:40 TOoSmOotH agent based
14:40 * dmz goes to read some
14:40 dmz thanks
14:42 FredFoo What really are the major differences between community and commercial? Gui? Support? SLA's?
14:42 FredFoo Any majore features community does not have?
14:42 dmz i've got the cfg mgmt stuff; i'm just looking for somethign that can help mange upgades across hundreds of servers; there is such a lack of decent tools to do that
14:42 TOoSmOotH pkg.latest
14:42 dmz pkg.latest?
14:42 TOoSmOotH you said you wanted to manage updates right
14:42 murrdoc salt '*' pkg.istalled name=yup version=yup
14:43 murrdoc tea time
14:43 dmz can i easily exclude stuff; what if i want to get a listing of what is to be upgraded so i can notify customers
14:43 TOoSmOotH pkg.latest ensures that package is always at the latest version
14:43 whytewolf salt '*' pkg.upgrade cry when you didn't vet every package and one breaks a random system
14:43 TOoSmOotH yes
14:43 Heartsbane pkg.list_upgrades
14:44 beacons_are_hard joined #salt
14:44 Heartsbane dmz ^^^
14:44 dmz thanks; ill take a look
14:44 kawa2014 joined #salt
14:44 dmz i assume it works w/deb as easily
14:44 TOoSmOotH yea
14:45 TOoSmOotH the module knows if its deb or rpm etc
14:45 whytewolf yes, works with all major distros, and a few minor ones. as well as some BSD's and solaris
14:46 * Heartsbane blames UtahDave cause he isn't here yet.
14:46 debian112 joined #salt
14:46 dmz cool; sigh i really don't want to replace chef
14:47 TOoSmOotH you can use both
14:47 TOoSmOotH but you will find yourself doing everything with salt
14:47 whytewolf salt has modules to work with chef. so you don't have to
14:47 thedodd joined #salt
14:47 dmz cool
14:47 dmz that would be nice
14:47 dmz is salt also good at general configuration mgmt too then i assume
14:47 dmz but still annoying to replace
14:47 beacons_are_hard Has anyone gotten beacons to work with Windows minions?
14:47 TOoSmOotH file.managed
14:47 dmz chef just doesn't have any solid upgrade mechanisms
14:47 TOoSmOotH can use jinja templating
14:48 TOoSmOotH nameserver {{ salt['pillar.get']('staticinfo:dns1', '<default>') }}
14:48 TOoSmOotH that is a line from my resolv.conf
14:48 TOoSmOotH or at least the template
14:49 TOoSmOotH so I end up with nameserver 8.8.8.8 in my /etc/resolv.conf
14:51 TOoSmOotH I personally don't run anything from the master any more
14:51 TOoSmOotH I have too many minions
14:51 TOoSmOotH I jsut have them check in every 15 minutes
14:51 TOoSmOotH and do their work there
14:51 TOoSmOotH that way I spread the love
14:51 TOoSmOotH accross time and multiple masters
14:52 yudao joined #salt
14:55 onorua joined #salt
15:04 chiui joined #salt
15:05 aqua^c joined #salt
15:05 overyander joined #salt
15:10 sdm24 joined #salt
15:11 SheetiS joined #salt
15:13 c10 joined #salt
15:13 spark_ joined #salt
15:13 leszq joined #salt
15:15 venu0336 joined #salt
15:16 conan_the_destro joined #salt
15:16 jhauser joined #salt
15:18 leszq joined #salt
15:21 bhosmer joined #salt
15:21 RickCH joined #salt
15:21 ajw0100 joined #salt
15:23 raffomania joined #salt
15:23 raffomania hi everyone
15:24 raffomania Does anyone have some hints regarding pillar debugging? My external pillar data just won't show up :(
15:25 SpX joined #salt
15:29 Brew joined #salt
15:29 RickCH File manage question.  Is there a easy way to replace a file once and then never touch it again.  Even if it changes?
15:30 linjan joined #salt
15:31 sporkd2 RickCH: file.copy with a conditional
15:31 sporkd2 ?
15:31 c10 joined #salt
15:31 dfinn joined #salt
15:31 Brew joined #salt
15:32 RickCH I was going that route but the file exist and needs to be replaced.
15:32 murrdoc raffomania:  turn up master logging to debug
15:32 raffomania murrdoc: thanks, but I didn't find anything pillar related in the debug output
15:33 raffomania murrdoc: as a side note, I'm running a masterless setup
15:33 murrdoc oh i have never figured that out
15:34 murrdoc external pillar on a master less
15:34 raffomania :/ the docs say it should work http://docs.saltstack.com/en/latest/topics/tutorials/standalone_minion.html
15:34 LtLefse RickCH: how about file.managed with a check_cmd?
15:35 murrdoc havent needed it
15:36 RickCH Trying to figure out what I should check for?  Since the file will change after it is replaced I am not sure how to tell it was replaced once then ignored going forward
15:37 Furao joined #salt
15:37 lempa joined #salt
15:37 LtLefse hmm, yeah, if the file will change arbitrarily I guess that won't work
15:40 whytewolf use orchenstrate to setup the file and leave it out of the highstate?
15:41 Rkp_ RickCH: maybe create an other file, like an empty lock file of some sort and test its existence as a conditional for the file update?
15:41 RickCH Good ideas, thanks
15:43 aCodinMan joined #salt
15:45 kevin-wk RickCH: similar to Rkp_'s idea, make file.managed "replace: False" arg conditional on non-existence of an "initialize file" grain, which you delete during highstate (grains.absent)
15:46 kevin-wk set it before the very first highstate, maybe during your minion bootstrapping
15:46 julez joined #salt
15:48 LtLefse ooh - use backup + check_cmd
15:48 writtenoff joined #salt
15:48 LtLefse set backup: '.bak'
15:48 LtLefse and then set check_cmd to check if file.bak exists
15:50 kevin-wk i like that because if someone accidentally subverts it, the next highstate will save a new backup before messing up your file
15:50 pguinardco joined #salt
15:51 lynxman joined #salt
15:52 LtLefse check_cmd would be something like "/usr/bin/test ! -f /path/to/file.bak"
15:53 sieve joined #salt
15:55 bhosmer joined #salt
15:59 LtLefse ah, check_cmd runs the command with the managed file as an argument
15:59 LtLefse so the command you want is "/usr/bin/test ! -f /path/to/file.bak #"
15:59 LtLefse :)
16:00 gladiatr joined #salt
16:00 kevin-wk didn't notice that - guess who hasn't used that yet?
16:02 otter768 joined #salt
16:02 RickCH Nice
16:03 supersheep joined #salt
16:04 KyleG joined #salt
16:04 KyleG joined #salt
16:07 spark_ joined #salt
16:07 Edgan joined #salt
16:08 voileux joined #salt
16:08 aCodinMa_ joined #salt
16:10 GabLeRoux joined #salt
16:10 spiette joined #salt
16:13 jalbretsen joined #salt
16:13 Furao joined #salt
16:14 hal58th__ joined #salt
16:14 spookah joined #salt
16:15 hal58th_1 joined #salt
16:17 ndrei joined #salt
16:19 pguinardco Hello, I am looking for a bit of help with the syntax for a cpan module into another state file. I have it setup like pkg right now but seem to be getting this error:
16:19 pguinardco State 'cpan.installed' was not found in SLS.
16:21 ipmb joined #salt
16:21 FeatherKing joined #salt
16:21 voileux pguinardco: cpan is a module
16:22 voileux and you can call in state by module.run
16:22 pguinardco that really helps, thank you... Been banging my head against a wall trying to use it the wrong way.
16:23 voileux ;)
16:24 voileux I've trouble with zpool module and I don't undestand this line : https://github.com/saltstack/salt/blob/develop/salt/modules/zpool.py#L241
16:24 Viper233 joined #salt
16:26 voileux when I create a new pool with salt but when I user  zpool binary  on the minion the pool is created
16:30 amcorreia joined #salt
16:30 FeatherKing do returners return errors? i am using the smtp returner and if the module throws an IndexError for example, i was hoping it would send me the traceback via email, but it doesnt seem to
16:31 nitenq joined #salt
16:32 maxskew joined #salt
16:33 ranomore joined #salt
16:34 spark_ joined #salt
16:35 voileux zpool can create on character device too, not only on a block device or regular file
16:36 cruatta joined #salt
16:38 pguinardco I just destroyed a pool and tried to recreate it via salt, same thing on FreeBSD 10.1x64, file on the raw device shows "character special (0/85)"
16:39 pguinardco Appending this to the end of that line fixes the problem for me: "and not stat.S_ISCHR(mode)"
16:44 tmclaugh[work] joined #salt
16:45 kusams joined #salt
16:45 supersheep joined #salt
16:54 aqua^c joined #salt
16:58 onorua joined #salt
16:59 druonysus joined #salt
17:04 husanu joined #salt
17:05 ipmb joined #salt
17:06 CeBe joined #salt
17:07 forrest joined #salt
17:07 GabLeRoux joined #salt
17:07 theologian joined #salt
17:08 bhosmer joined #salt
17:09 Laserwhit joined #salt
17:17 aparsons joined #salt
17:21 c10 joined #salt
17:21 leszq joined #salt
17:21 Laserwhit I need advice debugging a master minion connection.  I'm running 2015.5.2 and I have accepted the minion key on the master but the minion does not return a ping.  I can see with netstat that both ports on the minion are up and connected to the master.  Not sure what the problem is.
17:25 aw110f joined #salt
17:25 whytewolf Laserwhit: try a salt-call test.ping on the minion. also add -l debug to both the salt and salt-call. that should at least give you a base. as well as ready the contents of /var/log/{master,minion} and check if more then two minions are running on the minion [ps -ef | grep salt]
17:25 forrest timoguin: Are you still working at linkedin?
17:25 losh joined #salt
17:26 timoguin forrest: never was. :)
17:26 forrest Laserwhit: Also make sure both systems have the same release of salt
17:26 impi joined #salt
17:26 forrest timoguin: Oh I thought you were for some reason.. maybe you just interviewed with them.
17:26 Laserwhit Both systems are the same release.
17:26 forrest I was hoping to be like 'dear sir, can you please tell them to STOP CONTACTING ME'
17:26 timoguin forrest: nope, met some of them at the conference though
17:26 forrest ahh alright
17:27 timoguin ah yea those emails that go to that one tab in my inbox that i sometimes look at
17:27 Fiber^ joined #salt
17:30 aparsons joined #salt
17:31 aCodinMan joined #salt
17:31 supershe_ joined #salt
17:32 drawsmcgraw It's been a little while since I've seen/done it. But it looks like the "Use Salt to restart Salt" problem has been solved(?)
17:32 forrest iggy: https://github.com/saltstack-formulas/apache-formula/pull/62
17:32 Laserwhit It looks like I have two minions running on my minion.
17:32 forrest iggy: Please merge that, I forgot apache doesn't use a proper lookup table.
17:33 drawsmcgraw I remember being in the middle of a discussion with someone and was like "Yeah, we can't really use Salt to restart iself - oh wait it just did o.o"
17:33 whytewolf drawsmcgraw: yeah i think that was fixed back in 2014.something
17:33 drawsmcgraw whytewolf: Wow... I need to read the release notes more carefully. Can't believe I missed that one.
17:33 forrest or murrdoc
17:33 forrest murrdoc: https://github.com/saltstack-formulas/apache-formula/pull/62 can you merge that
17:33 forrest whoever happens to be around ;)
17:34 murrdoc i got u
17:34 murrdoc i didnt review it
17:34 murrdoc so i hope u havent booboo'ed all over it
17:34 forrest thanks murrdoc
17:35 forrest murrdoc: It's a revert of something I merged. I forgot apache wasn't using a lookup table and merged some dude's changes, which would have broken the whole formula.
17:35 murrdoc np
17:37 murrdoc forrest:  thoughts on how to add in a comment to a hosts file entry
17:37 murrdoc like ip: servername #some comment
17:37 murrdoc is that doable
17:38 forrest murrdoc: you don't want to manage the file though?
17:38 murrdoc nah
17:38 murrdoc i need to update the one hosts line
17:38 murrdoc on a schedule
17:38 murrdoc ( /me hates it to )
17:38 forrest murrdoc: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.prepend
17:39 murrdoc but that would prepend to the whole file
17:39 forrest murrdoc: then populate the servername data via grain, with the message set by a pillar or your default lookup table is what I'd do.
17:39 forrest murrdoc: Oh you want to overwrite the line every time?
17:39 forrest murrdoc: cmd.run with a sed then :\
17:39 murrdoc the hosts file entry gets written every know and then
17:40 whytewolf file.replace
17:40 murrdoc so chain the hosts.present and the file.replace
17:40 murrdoc hate it
17:40 murrdoc but you right
17:41 whytewolf sometimes you just can't avoid putting logic where you don't want it
17:41 murrdoc nah python state tim
17:41 murrdoc time*
17:41 whytewolf lol.
17:41 whytewolf thats the other way
17:41 whytewolf that might be better in the long run anyway
17:41 murrdoc thing is i will still use state.single to call the parent module
17:42 whytewolf using a salt call to it in your python state
17:42 kusams joined #salt
17:42 forrest just manage the hosts file
17:42 whytewolf not sure if it would work. but couldn't hurt
17:42 ndrei_ joined #salt
17:44 Laserwhit So I did a ps -ef and I see two salt-minion processes running on my minion.  Is this normal?
17:44 whytewolf Laserwhit: yes, 2 is normal
17:44 Laserwhit Also the /var/log/salt/minion logs are telling me to upgrade ZMQ even though I installed 2015.5.2.  Is this normal?
17:44 forrest Laserwhit: See, I can't even remember if 2 is normal I haven't run with a master in so long ;)
17:45 whytewolf Laserwhit: that is not normal. what version of zmq do you have installed?
17:45 scoates joined #salt
17:46 stephanbuys joined #salt
17:46 Laserwhit Let me check (version of ZMQ)
17:47 Laserwhit My python-zmq is at 2.1.11-1
17:47 Laserwhit The log says I should be at or above 3.2.
17:48 Laserwhit Let me see if I can get this machine (Ubuntu 12.04) up to 3.2 zmq
17:48 whytewolf the log is correct. that might be your problem.
17:48 murrdoc can i add a line right before a line
17:48 murrdoc using file.something ?
17:49 nadley left #salt
17:49 murrdoc whytewolf:  ?
17:50 whytewolf maybe.. some trickery with file.replace and/or file.blockreplace. but honestly at that point. it would be easyer just to manage the whole thing
17:50 bhosmer joined #salt
17:54 whytewolf Laserwhit: what method did you use to install salt?
17:55 Laserwhit curl -L https://bootstrap.saltstack.com | sudo sh -s -- git v2015.5.2
17:56 Laserwhit That was after installing 0.17.x and 2014.7.6 (wasn't sure where the 'LATEST' was)
17:56 Laserwhit Should I uninstall and start fresh?
17:57 Laserwhit I actually need to run to lunch :-(  I'll look for your comments (if you have any) when I get back thanks for your help so far (whytewolf and forrest)
17:57 whytewolf I would. and would just run the bootstrap without the git and latest tag
17:57 Laserwhit Ok, I will try that.
17:57 baweaver joined #salt
17:59 scoates_ joined #salt
18:00 leszq joined #salt
18:02 dkrae joined #salt
18:02 otter768 joined #salt
18:06 baweaver joined #salt
18:07 stoogenmeyer joined #salt
18:09 kusams joined #salt
18:10 timoguin joined #salt
18:12 aparsons joined #salt
18:12 DammitJim is there such a thing as saving the output of salt commands to keep a trail of what has been done to a server?
18:12 c10 joined #salt
18:13 whytewolf DammitJim: use a returner to store to a database?
18:13 DammitJim is that what I need to google? salt returner database
18:13 whytewolf http://docs.saltstack.com/en/latest/ref/returners/all/
18:13 spark joined #salt
18:13 chiui joined #salt
18:14 DammitJim Thanks! is there a way to track "who" did what?
18:15 whytewolf DammitJim: that i don't know. normally a user is listed in the return data. however. only if you have the access setup so that root isn't the only user with the ability
18:17 DammitJim yeah, right now we are doing everything as root
18:17 DammitJim I haven't found a specific doc to follow to give access only to specific people
18:17 DammitJim or is it as simple as adding users to a salt group?
18:18 arobertson joined #salt
18:18 whytewolf DammitJim: http://docs.saltstack.com/en/latest/topics/eauth/index.html
18:21 ajw0100 joined #salt
18:24 toastedpenguin is it possible to use salt to find active rdp sessions for specific users on windows hosts
18:25 baweaver joined #salt
18:27 * Ahrotahntee tries his hand at writing a custom module to do what he wants
18:28 bhosmer__ joined #salt
18:29 lunchtime joined #salt
18:30 Ahrotahntee hmm, seems straight forward
18:30 whytewolf Ahrotahntee: it pretty much is.
18:39 fllr joined #salt
18:41 DammitJim I meant for a different user to say run: salt '*' service.restart 'tomcat7'
18:41 DammitJim right now one can only do that as sudo
18:41 DammitJim but I would like to capture who used the command
18:42 whytewolf DammitJim: yes. the external auth stuff does allow you to do that
18:42 DammitJim oh ok
18:42 aqua^c joined #salt
18:43 DammitJim 'dammit, how do I make xchat2 put this window back in the main window
18:43 DammitJim some keyboard shortcut popped it out
18:43 whytewolf lol. sorry wouldn't know I use irssi myself
18:43 ashmckenzie left #salt
18:43 whytewolf havn't used a gui IRC client in something like 15 years
18:44 DammitJim external auth... 'cause reading that doc, it seemed as if one still has to do sudo salt
18:44 DammitJim left #salt
18:45 whytewolf DammitJim: oh wait i was wrong. it is client_acl
18:45 DammitJim joined #salt
18:45 aCodinMan joined #salt
18:45 whytewolf DammitJim: https://docs.saltstack.com/en/latest/ref/clientacl.html
18:45 whytewolf DammitJim: i was wrong. it is client_acl not external_auth
18:46 whytewolf DammitJim: external auth just allows for authenticating as a different user.
18:47 supersheep joined #salt
18:49 desposo joined #salt
18:50 DammitJim ok, thanks whytewolf
18:50 DammitJim why is this site https? lol
18:50 DammitJim the other link was just http
18:51 whytewolf DammitJim: cause I'm lazy and just went to the first link. the site is avalible in http and https
18:54 zz_ashmckenzie joined #salt
18:56 Bryson joined #salt
18:57 Bryson left #salt
19:02 CeBe1 joined #salt
19:04 murrdoc whytewolf:  help
19:04 murrdoc file.replace:
19:04 murrdoc - name: /etc/hosts
19:04 murrdoc - pattern: "svn001.lol.net"
19:04 murrdoc - repl: "\#svn001.lol.net"
19:04 murrdoc how i fix
19:06 supersheep joined #salt
19:08 sdm24 https://regex101.com/ ?
19:08 cruatta joined #salt
19:08 sdm24 thats a handy regex tool if thats what you need help with
19:08 ashmckenzie left #salt
19:09 murrdoc k
19:12 sgargan joined #salt
19:16 forrest Ryan_Lane: You around?
19:17 rap424 joined #salt
19:23 nate_c joined #salt
19:24 julez joined #salt
19:25 napsterX joined #salt
19:25 baweaver joined #salt
19:26 katyucha which UI are U using ? Hilate ?
19:27 husanu joined #salt
19:30 baweaver joined #salt
19:32 ajw0100 joined #salt
19:32 murrdoc UI is for weaklings
19:32 zer0def joined #salt
19:32 murrdoc cli-all-day
19:33 whytewolf katyucha: not sure who you were asking. but i don't use a GUI. I just use the command line
19:33 sgargan murrdoc: there is a meme in there somewhere
19:33 murrdoc yes
19:33 murrdoc but i actually dont like using cli
19:34 murrdoc saltpad is decent
19:34 katyucha murrdoc: i agree but i'm not alone at work :/
19:34 denys joined #salt
19:35 leszq joined #salt
19:35 whytewolf katyucha: you might want to go enterprise and get the gui they offer. I saw a demo and it actually looked pretty nice
19:36 drawsmcgraw katyucha: you should know that halite is abandoned
19:36 sdm24 Me too. I don't have enterprise, but the demo seemed very nice and fluid, especially for those who don't use salt
19:37 murrdoc i cant afford it
19:37 * murrdoc is poor
19:37 drawsmcgraw I just keep my states in Git and have a bunch of README.md files that document what's there and how to use it.
19:38 katyucha can't have Enterprise.... CIO say : no €
19:38 katyucha drawsmcgraw: ok thanks
19:38 * katyucha is poor too
19:40 katyucha so, tomorrow, will try the develop branch on my vpshere to use pyVmomi ...
19:41 salter joined #salt
19:41 salter I am wondering, if I write a custom returner for a minion and run highstate from the master, will the master and the customer returner get the results, just the returner, or just the master?
19:42 subsignal joined #salt
19:43 fxhp joined #salt
19:43 ekristen joined #salt
19:43 forrest iggy: Are we just not handling ng PRs?
19:43 forrest nginx is getting out of control with open PRs
19:43 forrest mostly for ng shit
19:44 forrest I don't see cheus around otherwise I'd ask him to handle those
19:44 forrest I have no desire to do so
19:50 CeBe1 joined #salt
19:52 spookah joined #salt
19:53 subsignal joined #salt
19:53 baweaver joined #salt
19:53 zz_ashmckenzie joined #salt
19:55 katyucha an active UI : https://github.com/tinyclues/saltpad
20:00 dopesong joined #salt
20:02 addison_w joined #salt
20:03 otter768 joined #salt
20:04 ajw0100 joined #salt
20:06 addison_w joined #salt
20:07 scoates joined #salt
20:07 drawsmcgraw katyucha: wow! That's a new one to me
20:08 tmclaugh[work] joined #salt
20:14 dimeshake joined #salt
20:14 sgargan joined #salt
20:14 tracphil joined #salt
20:16 gladiatr joined #salt
20:17 tomh- joined #salt
20:19 jhauser joined #salt
20:20 Laserwhit What is the best way to uninstall salt?
20:21 jonher937 laserwhit: I guess you could use salt to do it. I don't know how it would hande a uninstall of salt with the pkg module, but a script with file.managed or just simply cmd.run would do the job
20:22 kusams joined #salt
20:23 jonher937 Laserwhit: You could target the minions using grains like "os:Linux" or even distribution level for the differend package managers like "yum, aptitude, pacman" and so on
20:24 Laserwhit How do I address you like you are addressing me (jonher937)
20:24 jonher937 Just write the name and then a colon sign "username: my message"
20:24 Laserwhit Ok
20:25 Laserwhit jonher937: Thanks, is there a more generic way of uninstalling salt?
20:26 jonher937 Laserwhit: What OS are you running salt on? I guess it comes down to that
20:26 Laserwhit jonher937: I can do an apt-get remove (ubuntu)
20:26 Laserwhit jonher937: Just thinking there was a script or such.  No problem.
20:27 jonher937 Not that I know of, removing the service (init script and such) + deleting the files should be good enough
20:27 napsterX joined #salt
20:29 jonher937 But as I said, package manager would take care of that with "apt-get remove or apt-get purge"
20:29 salter Say I wrote a custom returner for my minions, where does it get stored on the minion after syncing the returners?
20:31 ALLmightySPIFF joined #salt
20:31 aqua^c joined #salt
20:31 leszq joined #salt
20:32 Brew joined #salt
20:35 dopesong joined #salt
20:38 drawsmcgraw Anyone else using Digital Ocean with Salt-cloud?
20:38 drawsmcgraw Anyone else get a little irritated when they change up the image-ids and you have to update your profiles? D:
20:39 jonlangemak joined #salt
20:41 anotherZero joined #salt
20:42 mapu joined #salt
20:42 Laserwhit Ok, my real issue is that I can't get a test.ping to work from my master to my minion.  I'm running Lithium (2015.5.0) and I can't get my master to ping my minion.  I am probably missing something basic.
20:43 Laserwhit I was able to accept the minion key on the master side but I think after I upgraded something went wrong.  I was running 0.17.x before.
20:45 Laserwhit Can I re accept a minion key?  Should I reject it then accept it again?  Not sure if they are even communicating at this point but the port seem to be up (netstat shows 4505 and 4506 being used).
20:46 salter Bueller?
20:47 Laserwhit Is there a way to reset my keys?
20:48 cluther left #salt
20:49 donmichelangelo joined #salt
20:51 druonysus joined #salt
20:51 Laserwhit I'm getting the following when I try to ping my minion from my master: 'USD-S5' __virtual__ returned False
20:52 Laserwhit Any ideas?
20:57 Laserwhit I'm going to a meeting for an hour or so and will check back if anyone has ideas, thanks.
21:04 Zachary_DuBois joined #salt
21:07 jhauser joined #salt
21:10 ajw0100 joined #salt
21:13 julez joined #salt
21:13 supersheep joined #salt
21:18 robawt can I pass virtualenv.managed a requirements.txt file without placing it on disk?
21:18 robawt being lazy here :)
21:18 jalbretsen joined #salt
21:18 jalbretsen left #salt
21:19 forrest robawt: Yeah, the docs even show an example of doing that: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.virtualenv_mod.html
21:20 robawt TY forrest, just confirming what i was reading there
21:20 forrest NP, if you scroll all the way down you can see the example. I've never tried it though
21:20 robawt yeah I was looking at it when I asked, it seemed too good to be true
21:20 cberndt joined #salt
21:21 forrest lol
21:23 spark joined #salt
21:26 Antiarc joined #salt
21:28 napsterX joined #salt
21:36 sdm24 Is there a way from a minion to check if a specific file exists on the master? I've tried salt-call cp.list_master from http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html but that lists all files, when I only want a specific subdirectory. One possible fix I think is to make that subdirectory a new environment and use saltenv=newenv
21:37 sdm24 I guess another solution is to use cp.get_dir and set the destination to temp
21:39 scoates iggy: last week you told me how to output the current minion configuration; can you remind me? I'm looking in the wrong place in the docs, I'm sure.
21:42 giantlock joined #salt
21:43 jhauser joined #salt
21:45 tracphil joined #salt
21:49 ranomore joined #salt
21:57 Laserwhit I can't get a test.ping to work from my master to my minion.  I'm running Lithium (2015.5.0) and I can't get my master to ping my minion.
21:57 Laserwhit I was able to accept the minion key on the master side but I think after I upgraded something went wrong.  I was running 0.17.x before.
21:58 Laserwhit Can I re accept a minion key?  Should I reject it then accept it again?  Not sure if they are even communicating at this point but the port seem to be up (netstat shows 4505 and 4506 being used).
21:58 Laserwhit Is there a way to reset my keys and would that help?
21:58 Laserwhit I'm getting the following when I try to ping my minion from my master: 'USD-S5' __virtual__ returned False
22:03 SheetiS joined #salt
22:03 perfectsine joined #salt
22:04 otter768 joined #salt
22:04 baweaver joined #salt
22:05 alexanderilyin joined #salt
22:06 campee joined #salt
22:10 murrdoc joined #salt
22:12 qybl joined #salt
22:14 Laserwhit I'm getting the following when I try to ping my minion from my master: 'USD-S5' __virtual__ returned False
22:15 Laserwhit I can get an fqdn with python socket.getfqdn('USD-S5')
22:15 Laserwhit Everything seems to be correct and yet I get a False returned.  What is the problem?
22:16 whytewolf Laserwhit: what do you get when you run salt-call test.ping on the minion
22:16 geekatcmu joined #salt
22:17 Laserwhit salt-call USD-S5 test.ping returns 'USD-S5' __virtual__ returned False
22:17 geekatcmu Am I the only one who is trying to use mines with salt?
22:17 whytewolf Laserwhit: so the minion is broken.
22:17 geekatcmu They don't seem to show up anywhere in *any* of the example salt states in http://docs.saltstack.com/en/latest/topics/index.html
22:18 gladiatr joined #salt
22:18 Laserwhit whytewolf: Ok, How do I fix it?  In what way is it broken?
22:19 Laserwhit whytewolf: I installed the way you mentioned above without the git and without the version.  It changed my install from 2015.5.2 to 2015.5.0
22:20 whytewolf Laserwhit: I would say stop the minion, delete all salt code from the system. and reinstall. and from the sounds of it it looks like the python is corupted.
22:20 Laserwhit whytewolf: This is now the version that I am running on both machines.
22:20 aqua^c joined #salt
22:20 whytewolf if you want more indepth about what is happening you can add -l debug to the salt-call
22:21 whytewolf geekatcmu: I actualy use mine data now and then.
22:21 husanu joined #salt
22:21 geekatcmu For what do you use it?
22:22 whytewolf geekatcmu: right now? only config that really uses it currently is grabbing the ip of my ntp server to put it into the ntp clients
22:22 Laserwhit whytewolf: should I dump my debug here?  It says above to dump 'code' to gist.githum.com.  I've never done that but I can dump it somewhere if that would help.
22:22 geekatcmu See, that's pretty much what I want to do.
22:22 whytewolf gist.github.com is your friend Laserwhit
22:23 geekatcmu In my case it's s/ntp/Zookeeper/, but still.
22:23 Laserwhit whyewolf: I'll check it out.
22:23 geekatcmu The only complication is that I've got a number of different zookeeeper environments, so I need to be able to tell each client the appropriate set of servers to configure.
22:25 geekatcmu So I'm trying to get each zookeeper server to put both it's environment name as well as its IP address into the mine.
22:25 geekatcmu Unfortunately, following the examples in the docs ... it doesn't appear that *anything* gets stuck in the mine.
22:26 whytewolf geekatcmu: what do you have for your mine setup?
22:26 bfoxwell joined #salt
22:26 kiorky joined #salt
22:27 geekatcmu Right now, it's really, really trivial: https://gist.github.com/BrianGallew/60b4c36d6f1070686935
22:28 geekatcmu ANd of course, now that I've posted that, I see a logic flaw.
22:28 * geekatcmu sighs
22:28 whytewolf lol
22:28 whytewolf it happens
22:29 Laserwhit whytewolf: Here is my debug: https://gist.github.com/Laserwhit/b53863a22e8371e44153
22:29 napsterX joined #salt
22:29 geekatcmu whytewolf: I just updated it.
22:29 Laserwhit whytewolf: How do I know what files to remove from my minion?  The 'all salt files' you mentioned?
22:30 geekatcmu So, that ensures it evaluates, but ... it generates the included error.
22:30 Laserwhit whytewolf: I'm making the best attempt at it now (removing salt and starting over.)
22:31 nitenq joined #salt
22:31 ranomore1 joined #salt
22:31 whytewolf geekatcmu: are you putting that in the state top file or the pillar top file?
22:32 whytewolf geekatcmu: it goes in pillar
22:32 geekatcmu it's in zookeeper/server.sls
22:33 geekatcmu That is ... not obvious.
22:34 whytewolf geekatcmu: https://docs.saltstack.com/en/latest/topics/mine/index.html#mine-functions "This option can be applied via the minion's configuration file, or the minion's Pillar."
22:34 geekatcmu Ah, I'm looking at http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mine.html
22:35 geekatcmu I guess somehow I'm think that 'minion config" somehow includes states
22:35 whytewolf minion config is the /etc/salt/{minion,minion.d/*} stuff
22:36 geekatcmu So, before I go down that road, I don't suppose there's an easier way to do this?
22:36 whytewolf actually once you get mine working. you will find it pretty easy. and will get the broader idea of things
22:37 geekatcmu OK.
22:37 geekatcmu thanks
22:39 markm joined #salt
22:39 Slimmons I'm trying to get a salt master and minion on the same machine.  I currently can't do any basic tasks.  No test.ping or anything.  Any idea what is wrong with this super basic setup?  https://gist.github.com/johnsimmons/e951cad20b4720d3f167
22:40 Slimmons it did accept the key
22:40 baweaver joined #salt
22:41 whytewolf Slimmons: one thing i see. master is listening on 192.168.1.182 but you have minion looking for salt on 127.0.0.1
22:42 c10 joined #salt
22:43 Slimmons I changed them both to the .182 address, and that worked.  But something I saw before on my other server, is that if i run another test.ping right after that, it freezes on that too.
22:43 hasues joined #salt
22:43 hasues left #salt
22:44 Slimmons which is weird, but if i run a state.highstate, it just returns with no errors, and does nothing
22:45 Slimmons I added that output to the comments
22:47 whytewolf Slimmons: version? zmq version?
22:49 Slimmons salt-master and minion are both 0.17.5
22:49 whytewolf Slimmons: yikes. why so old?
22:50 Slimmons whytewolf: I actually didn't even realize that was old.  That's just what installed with apt-get install salt-master/minion
22:52 whytewolf Slimmons: that is pretty old. what repo did you get that from? cause I don't even think the ubuntu/debian repos come with that old of version
22:53 murrdoc Ahlee version sighting
22:54 Slimmons I just downloaded ubuntu 14.04, server, and apt-get instlal salt-master, and that's what came.  I probably should have add-apt-repository ppa:saltstack/salt  (i'm a bit of a noob if you can't tell)
22:54 murrdoc yeah
22:54 whytewolf Slimmons: ahh. apperently the trusty ubuntu repo comes with that version. stupid default ubuntu repos
22:54 murrdoc ubuntu upstream is superior to all
22:54 murrdoc but its behind as fuck
22:54 Slimmons will add-apt-repository fix that?
22:54 Slimmons like update it to the new one?
22:54 whytewolf it should.
22:54 Slimmons i mean originally, not now that it's installed
22:54 Slimmons ok
22:55 whytewolf I never tried cause well I nev,er considered even using the one in the default repo
22:55 Laserwhit whytewolf: How do I start the salt-master in open mode or how do I delete the public key on the salt-master?
22:55 whytewolf but then again i love living on the razer edge
22:56 whytewolf Laserwhit: keys are stored in /etc/salt/pki/
22:56 Laserwhit Thanks
22:56 Slimmons well, at least I think that has pretty good odds of being the problem
22:56 Slimmons looking at my other salt-master that works flawlessly, it's on 2014.7.0
22:56 Slimmons so, that's the issue I bet.  Thanks!
22:57 whytewolf Slimmons: np.
22:57 dhorn joined #salt
22:59 dhorn I'm new to SaltStack, and literally just started with it today. I created a simple base state for a handful of servers, and I'm wondering what the proper way is to maintain that state. I've created a top.sls in base to run the state I want on the hosts I want, so do I just create a schedule to run highstate (i.e., salt '*' schedule.add job1 function=state.highstate' seconds=3600)? Or is there a different/better way I should use to main
23:02 julez joined #salt
23:02 whytewolf dhorn: I have always used pillars to set my schedule jobs. but to each their own.
23:03 whytewolf dhorn: http://docs.saltstack.com/en/latest/topics/jobs/schedule.html#highstates
23:04 supersheep joined #salt
23:04 dhorn whytewolf: I haven't used pillars yet, so I don't really understand them.  I'll be sure to read up on them next. though.  So it says to apply that to the minion config...I assume that means /etc/salt/minion?
23:05 whytewolf dhorn: either /etc/salt/minion, or a conf file in /etc/salt/minion.d
23:05 dhorn whytewolf: Sure, cool.  I'll use that for now until I can figure pillars out. ;)
23:06 Laserwhit whytewolf:  I have removed the configs and reinstalled and deleted the keys and re accepted on the master and I get the same results for my test.ping "'USD-S5' __virtual__ returned False"
23:07 Aidin joined #salt
23:07 Laserwhit whytewolf: The minion is running python 2.7.3 and the master is running python 2.7.6
23:07 jcristau joined #salt
23:07 Laserwhit whytewolf: They are also different versions of Ubuntu (minion 12.04 and master is 14.04)
23:08 Laserwhit whytewolf: I'm going to a second minion to see how it responds.  (same kind of machine Ubuntu 12.04)  but my confidence is low...
23:09 snarfy joined #salt
23:10 snarfy saltmaster:~$ sudo salt-run fileserver.update
23:11 snarfy [ERROR] invalid outputter nested specified; fall back to nested
23:11 snarfy anyone seen that?
23:11 yannis joined #salt
23:13 ALLmightySPIFF joined #salt
23:13 whytewolf Laserwhit: apt-get purge salt-minion on the minion, then delete /etc/salt, and /usr/lib/python2.7/dist-packages/salt* and /var/cache/salt, and anything else that 'find / -iname salt\*' finds on the minion of coarse. then follow this https://docs.saltstack.com/en/2014.7/topics/installation/ubuntu.html
23:13 yannis I'm starting to use runners to run code in my masters. I have python code that I want to share with modules which get placed in /srv/salt/_modules. What is the recommended may to share code so that it is used both in the runners and in modules - is there a location that will get auto pushed to minion caches?
23:16 Laserwhit whytewolf:  Thanks,  I'm trying on a separate but equal minion (Brown vs Board of Ed not withstanding) and I will then try on the original with your idea.  I'll keep you posted.
23:23 dimeshake joined #salt
23:25 otter768 joined #salt
23:27 Laserwhit whytewolf: Yeah, exact same result on a fresh install on the new minion.  Something in the configuration between the different python versions or the different OS versions is not happy.
23:28 kusams joined #salt
23:29 Guest89 joined #salt
23:30 napsterX joined #salt
23:31 whytewolf Laserwhit: sounds like you have something funcy in your minions as I have never seen this issue. and the pythons verion isn't the issue. and it isn't a minion talking to the master that is the issue. the minions have an issue with running. what is the output of the salt-call -l debug test.ping run on a minion
23:31 whytewolf post it into gist
23:31 Laserwhit whytewolf:  I'll get it for you.
23:31 danomano joined #salt
23:32 Laserwhit whytewolf: actually I posted a link to that before (not very interesting but here it is:  https://gist.github.com/Laserwhit/b53863a22e8371e44153)
23:33 whytewolf Laserwhit: salt-call test.ping -l debug
23:33 whytewolf Laserwhit: don't need the server name in salt-call
23:33 geekatcmu OK, here's another piece of silliness: https://gist.github.com/BrianGallew/bb5dfcdc4ff1dab0e6ce
23:33 Laserwhit Ok, hold on
23:34 geekatcmu Clearly, the grain 'cornerstone.tags' exists, and is a list with one item.
23:34 geekatcmu But the loop doesn't seem to be running.
23:34 Laserwhit whytewolf: Am I running this on the minion or on the master?
23:34 geekatcmu Or if it is, the set isn't overriding the set outside of the loop.
23:35 geekatcmu If I remove '{% set zookeeper_environment = tags %}', then I get an error that zookeeper_environment isn't exported.
23:37 whytewolf geekatcmu: try salt['grains.get']('cornerstone.tags') instead
23:37 whytewolf Laserwhit: minion
23:37 geekatcmu In the for loop?
23:37 whytewolf geekatcmu: in place of the grains['cornerstone.tags']
23:37 geekatcmu because graints['cornerstone.tags'] is pretty clearly working on line 3.
23:38 Laserwhit whytewolf: Ok, just added a comment to https://gist.github.com/Laserwhit/b53863a22e8371e44153  This was run on my other minion.
23:39 whytewolf Laserwhit: okay, that is the expected result
23:39 Laserwhit whytewolf: my first minion is in process of being cleaned of salt.
23:39 geekatcmu I just replaced  grains['cornerstone.tags'] with salt['grains.get']('cornerstone.tags') globally in the map.jinja.  Behaviour is unchanged.
23:39 geekatcmu 'tags' still gets set to a list (as I expect).
23:40 geekatcmu which means zookeeper_environment is set to a list in the first assignment on line 3.
23:40 Laserwhit whytewolf: So you are telling me that this is a very special "For Laserwhit only" bug!  Great
23:41 whytewolf geekatcmu: wait. you have no logic in the loop. you only reference zookeeper_enviroment after words
23:41 Ryan_Lane forrest: sup?
23:41 Laserwhit whytewolf:  I actually need to go home now.  I appreciate your help.  I'll get back on another time.
23:41 whytewolf Laserwhit: ok.
23:41 geekatcmu Then I don't understand the syntax at all.  The loop is supposed to iterate through all of the values in that grain, and set zookeeper_environment to each one in succession.
23:42 Laserwhit whytewolf: Did you get my side message?
23:42 forrest Ryan_Lane: Was just going to give you shit about dockercon and thinking that it wasn't going to be a sales pitch ;)
23:42 geekatcmu My very first iteration add "if 'foo' in my_tag" to the for loop so I could filter it appropriately.
23:42 geekatcmu But right now, I just want to see the thing actually *iterate and assign*.
23:43 whytewolf geekatcmu: it very well could be iterating over the loop and then setting it to a different value each time. but you would only get the last value of the loop
23:43 geekatcmu And I would kill for, e.g. {% log "made it here" %}
23:43 geekatcmu But it's not iterating over the loop at all.
23:44 geekatcmu If I comment out line 3, I get this error: Jinja variable the template 'zookeeper/map.jinja' (imported on line 2) does not export the requested name 'zookeeper_environment'
23:44 TrogdorLaserwhit joined #salt
23:44 gladiatr joined #salt
23:46 whytewolf gah, I hate commenting in gist
23:46 geekatcmu heh
23:47 whytewolf i can never remeber the special command to get it to not format
23:47 geekatcmu heh
23:47 geekatcmu Me, neither.
23:47 whytewolf there
23:48 gladiatr joined #salt
23:49 geekatcmu But I don't see that your comment is any different that my initial post, beyond moving the {%endfor-%} from line 7 (where it is in the map.jinja file), to the end, where it's showing the expansion in init.sls.
23:51 cruatta joined #salt
23:51 whytewolf because the only thing your loop is doing is setting zookeeper_enviroment. but you never use it in the loop. are you just trying to access the last item in the loop?
23:51 geekatcmu No, I'm accessing it in init.sls.
23:52 geekatcmu let me edit the original gist to make that more clear.
23:52 snarfy joined #salt
23:53 aqua^c joined #salt
23:53 geekatcmu There
23:54 geekatcmu init.sls, line 1, grabs zookeeper_environment from map.jinja
23:54 whytewolf geekatcmu: okay, that does make it more clear. your map.jinja is setting the zookeeper_enviroment to the last item in the list
23:54 snarfy^ joined #salt
23:54 geekatcmu No, it's not.
23:55 geekatcmu It's setting it to the entire list.
23:55 geekatcmu ['zookeeper-env-qa-1']
23:55 geekatcmu If it were setting it to just the last item on the list, it would be zookeeper-env-qa-1
23:55 geekatcmu No square brackets
23:55 whytewolf it is a dict of a list
23:56 geekatcmu And, as I've said, if I delete or comment out line 3 of map.jinja, then zookeeper_environment *never* gets set.
23:56 geekatcmu salt['grains.get']('cornerstone.tags') is rendering as ['zookeeper-env-qa-1']
23:56 geekatcmu I don't understand how that is a dict of a list
23:59 geekatcmu If I change line 6 of map.jinja to '{% set zookeeper_environment = loop.index -%}', it still doesn't set zookeeper_environment there.
23:59 whytewolf wait. no you are right. it should be just spitting out the item. add .items to the salt function.

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