Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-01-07

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

All times shown according to UTC.

Time Nick Message
00:00 aron_kexp joined #salt
00:01 genediazjr joined #salt
00:03 Ozack2 joined #salt
00:03 manytrees hi, is there a function to update values in pillar? i store the version # for a package there and need to update it and trigger a highstate run from another application.  ideally i'd use salt-api with REST
00:04 FRANK_T joined #salt
00:04 yomilk joined #salt
00:04 ldlework manytrees: arnt pillars read from the disk?
00:04 FRANK_T What type of connection does salt user to connect to the minion in a local network?
00:04 iggy maybe use a ext_pillar of some type?
00:04 hasues left #salt
00:04 FRANK_T salt use*
00:05 iggy zeromq? tcp? ethernet?
00:05 manytrees idlework: on the salt-master yes, but i need to update them progmatically somehow
00:06 FRANK_T ok
00:07 FRANK_T sorry iggy maybe is a stupid question  ;) but I have to present a prove of concept by friday.
00:08 FRANK_T proof of concept*
00:08 jhauser joined #salt
00:09 murrdoc u have to explain how the minion connects to the master ?
00:09 hal58th1 FRANK_T ZeroMQ over TCP/IP
00:09 murrdoc it connects to the zeromq instance on the master (me thinks)
00:09 manytrees iggy: what kind of ext_pillar?
00:09 murrdoc the port is configured in the master/minion file
00:09 murrdoc 4096 ?
00:09 iggy manytrees: whichever one makes the most sense
00:09 mosen joined #salt
00:09 murrdoc the auth is using keys similar to ssh auth
00:10 murrdoc i think the data going back and forth is encrypted but i dont rememeber
00:10 FRANK_T okay.
00:10 hal58th1 murrdoc yes the default ports that need to be open on master are 4095 and 4096 :)
00:10 FRANK_T murrdoc zeromq on the master how about the minion
00:10 hal58th1 minions doing the connecting to master. Master can then send commands over that connection
00:11 murrdoc minion connects to masters zeromq
00:11 FRANK_T ok
00:11 murrdoc master drop work on local queue
00:11 murrdoc u can use tcp keepalive settings if u want
00:11 murrdoc not sure if people do much with that
00:11 FRANK_T murrdoc I do not have to explain but I do not know if my team will ask me that question..
00:11 murrdoc hal58th1:  knows more
00:12 murrdoc is the data going back and forth encrypted hal ?
00:12 hal58th1 I believe so. That's what the ssl keys are for
00:12 murrdoc secops always asks frank
00:13 murrdoc can we cycle keys ?
00:13 murrdoc yes we can
00:13 snave joined #salt
00:13 murrdoc dev questions:
00:13 murrdoc - what languages can i write in
00:13 murrdoc - how can i test my changes (lol no)
00:13 murrdoc old sys ops crew
00:14 murrdoc - why dont i just use ssh and or why cant i just use cfengine
00:14 otter768 joined #salt
00:14 FRANK_T We're 4 sysadmin the oldest one is 67 LOL
00:14 hal58th1 "Salt uses public keys for authentication with the master daemon, then uses faster https://en.wikipedia.org/wiki/Advanced_Encryption_Standardencryption for payload communication; authentication and encryption are integral to Salt"
00:15 FRANK_T We're using puppet now..
00:16 murrdoc salt does ordered states
00:16 murrdoc no fucked (pardon) dependancy graphs
00:16 murrdoc doesnt have puppetdb yet and no foreman support
00:16 Ryan_Lane http://ryandlane.com/blog/2014/07/14/truly-ordered-execution-using-saltstack/ http://ryandlane.com/blog/2015/01/06/truly-ordered-execution-using-saltstack-part-2/
00:16 murrdoc but it will soon
00:16 Ryan_Lane foreman has support for salt, I think
00:16 pdayton joined #salt
00:16 murrdoc what else :)
00:17 nickg left #salt
00:17 mosen I thought that given the returners can be customised, you could have something like puppetdb? or maybe I dont undestand :)
00:17 Ryan_Lane not that though salt /can/ do ordered states, most tutorials will use depedencies
00:17 Ryan_Lane *note
00:17 murrdoc but listen and watch (_in) are much better than require
00:18 Ryan_Lane watch/watch_in isn't
00:18 Ryan_Lane watch implies require
00:18 murrdoc most importantly FRANK_T with salt u dont have to maintain a ruby install at a version
00:18 Ryan_Lane it will reorder your states
00:18 murrdoc really ?
00:18 Ryan_Lane yes
00:18 murrdoc i thought watch didnt
00:18 murrdoc hmm
00:18 Ryan_Lane that's why I asked for listen/listen_in
00:19 murrdoc well then listen and listen_in for the win
00:19 FRANK_T murrdoc my boss when to the Super computing conference in nov. he when to the saltstack booth they told saltack + python.. thats it..... he wants salt.
00:20 mosen I wanted to ask how people were doing iptables, since the iptables state does policy/append. I guess just manage it with iptables.save ?
00:21 FRANK_T now.. another question I have 600 linux Nodes... and this year I will add 20 Windows 7 Interactive, should I have 2 separate masters, or should I just create the groups
00:21 murrdoc u can have multiple masters configured in the minions
00:21 murrdoc on that bombshell
00:21 murrdoc g night
00:22 jalaziz joined #salt
00:29 bbradley joined #salt
00:30 genediazjr joined #salt
00:30 aqua^mac joined #salt
00:30 whiteinge manytrees: look at the pillar_roots wheel module: http://docs.saltstack.com/en/latest/ref/wheel/all/salt.wheel.pillar_roots.html#module-salt.wheel.pillar_roots
00:33 mfournier joined #salt
00:33 manytrees whiteinge: thanks! that looks like exactly what i need
00:33 rnts joined #salt
00:33 whiteinge np. Easy to call from the REST API too.
00:35 manytrees ya, it looks like it was made so the web ui could use the API to manage the master. didn't know wheel existed :)
00:37 mosen wow thats cool
00:42 johtso joined #salt
00:45 lionel_ joined #salt
00:50 jalaziz joined #salt
00:54 genediazjr joined #salt
00:57 MindDrive How well is multi-master configuration supported under 2014.7.0, if anyone happens to know?
00:57 MindDrive How well is multi-master configuration supported under 2014.7.0, if anyone happens to know?
00:57 MindDrive Oops, sorry for missend...
00:59 MindDrive (Er, duplicate send... *sigh* I'm trying to do too much at once.)
01:02 jalaziz joined #salt
01:03 jimklo joined #salt
01:03 jimklo joined #salt
01:06 I3olle joined #salt
01:06 jalaziz_ joined #salt
01:08 cpowell joined #salt
01:10 mattbarto joined #salt
01:10 mattbart_ joined #salt
01:11 cpowell joined #salt
01:11 mattbarto joined #salt
01:12 delinquentme joined #salt
01:14 nitti joined #salt
01:15 asyncsrc joined #salt
01:17 Furao joined #salt
01:20 bhosmer_ joined #salt
01:22 forrest joined #salt
01:26 jalaziz joined #salt
01:31 stevednd whiteinge: is there a network command that can be called to get return the ip addr defined on eth0? I have a public ip on eth0, and internal ips on eth0:0. ip_addrs is inconsistent. interface_ip('eth0') is also inconsistent. I know what the internal ip will match, so if there's a "not cidr match" that could work too
01:34 iggy stevednd: you'll probably have to look over grains['ipv4'] and just pick based on normal rules for non-routable addresses
01:34 stevednd iggy: I just came across network.is_private which is new in 2014.7. So I'm thinking I'll loop and check with that
01:36 iggy yeah, I was just going to mention that
01:36 iggy didn't know if it was in a released version or not
01:38 genediazjr joined #salt
01:42 stevednd iggy or anyone else, not a python programmer, is there a shorthand way to iterate a list and collect only items that match in a new list?
01:43 iggy list comprehensions
01:46 elfixit joined #salt
01:46 mattbarto you could cast them as sets and do a set intesection?
01:50 stevednd I ended up with this. It appears to work  [ip for ip in ips if __salt__['network.is_private'](ip)]
01:50 ajmccluskey joined #salt
01:52 aqua^mac joined #salt
01:58 iggy that's sufficiently pythonic
02:05 luminous stevednd: <3 list comprehensions! dicts too!
02:09 Ryan_Lane too bad dict comprehensions are forbidden in salt ;)
02:09 Ryan_Lane for upstream, that is
02:10 aurynn they're a fairly recent Python addition
02:15 otter768 joined #salt
02:25 garthk joined #salt
02:28 meylor joined #salt
02:32 delinquentme joined #salt
02:38 anotherZero joined #salt
02:40 Ryan_Lane joined #salt
02:43 genediazjr joined #salt
02:45 stevednd are there default mine values?
02:45 iggy no
02:45 stevednd default way to get all minion names?
02:45 iggy it's completely empty unless you tell it to fill
02:45 stevednd or do I need to expose the host grain?
02:45 stevednd I wasn't sure since you get the minion names back with regular mine queries
02:45 iggy put network.get_hostname in mine
02:46 iggy that's not from the mine, that's "minion49 reporting in"
02:48 saltynoob1 joined #salt
02:49 stephas joined #salt
02:50 saltynoob1 hi, i'm new to salt and am working with pillars.  i'm making a lot of changes to my /srv/pillar directory as i test code.  is it a good idea to make /srv/pillar a git repo?
02:52 stevednd yeah, I'm glad I can alias mine functions now. I waited forever for my patch for that to get in
02:53 smcquay joined #salt
02:53 mosen joined #salt
02:53 smcquay joined #salt
02:56 iggy saltynoob1: at some point... if you do while under heavy development, you have to wait a minute between refreshes
03:01 saltynoob1 iggy: thanks for taking the time to answer my question!  A follow up to that: is it better to use ext pillar to define the git repo for pillar?
03:01 stevednd it would be nice to be able to execute multiple mine functions in one call
03:03 iggy saltynoob1: oh, that's what I was assuming... yeah, if you just put it in a regular git repo in /srv/pillar, that's probably a good idea (and won't kill test time too much)
03:05 saltynoob1 iggy: awesome i'll test it out thanks for the input!
03:05 iggy saltynoob1: so yeah, what I Was saying about the 1 minute wait between refreshes was referring to ext_pillar
03:07 * MindDrive is so far extremely unimpressed with Salt
03:07 aurynn MindDrive, Yay?
03:08 MindDrive No, not really.  I was hoping to move off MCollective, but right now, I can't even get my minions to consistently respond to the masters.
03:12 MindDrive The salt-minion processes either keep dying (usually saying one of the masters isn't responding), or during Puppet runs a second process gets started, confusing things.
03:14 MindDrive The autosign.conf file also appears to be not doing what it's supposed to do, either...
03:14 MindDrive I'm giving up for the night, guess I'll have an extremely long email to write to the mailing list tomorrow...
03:17 favadi joined #salt
03:20 aurynn is there a list of salt mine functions somewhere?
03:24 aurynn or does it just use existing modules?
03:24 aurynn ah yes, that is how it works
03:33 CeBe1 joined #salt
03:34 DamianMyers joined #salt
03:35 Furao joined #salt
03:37 iggy MindDrive: masters? You're just getting started and jumping into one of the more advanced topics (that people with years of experience and 1000's of minions don't bother with)
03:42 mgw joined #salt
03:54 jalaziz joined #salt
04:07 stevednd so I thought I would be clever to remove some redundancy from my cloud profiles, and made a bunch of provider configs for the same provider(linode). Now when salt-cloud runs it can provision just fine, but when querying it thinks the machine exists under all profiles, and when destroying the machine it tries with each config. Is it possible to layer cloud configs somehow to remove a lot of that redundancy?
04:15 otter768 joined #salt
04:24 schlueter joined #salt
04:25 asoc joined #salt
04:30 Singularo joined #salt
04:37 Ryan_Lane joined #salt
04:41 badon joined #salt
04:43 jalaziz joined #salt
04:53 Singularo joined #salt
04:58 Singularo joined #salt
05:05 heww joined #salt
05:07 Singularo joined #salt
05:16 Singularo joined #salt
05:19 stooj joined #salt
05:22 bhosmer joined #salt
05:23 Singularo joined #salt
05:26 SheetiS joined #salt
05:27 twellspring joined #salt
05:30 Singularo joined #salt
05:33 felskrone joined #salt
05:39 jalbretsen joined #salt
05:39 schlueter joined #salt
05:40 Singularo joined #salt
05:48 Singularo joined #salt
05:52 schlueter joined #salt
05:54 ramteid joined #salt
05:59 Shiv joined #salt
06:00 Shiv Hi
06:00 Shiv i am getting this error on master
06:00 Shiv An extra return was detected from minion min000-1, please verify the minion, this could be a replay attack
06:00 Shiv Can someone help me please
06:01 DamianMyers Can you connect to the minion and view the /var/log/salt/minion logs
06:02 Shiv I have deleted logs sometime back ...now i am not getting anyupdates there
06:03 Shiv should i restart minion and tray again
06:03 Shiv ?
06:03 DamianMyers Can you restart the salt minion
06:03 DamianMyers Since you probably have an open file
06:05 Shiv Give me some time ... will do that
06:08 mohae joined #salt
06:10 JlRd joined #salt
06:14 sinenitore joined #salt
06:16 otter768 joined #salt
06:22 Shiv Hi
06:22 Shiv Am not getting any updates in minion logs
06:22 mosen is it possible that there are two minion processes running, like one service and one interactively? just a random shot in the dark
06:23 aquinas joined #salt
06:24 Shiv How do i verify that ? Same SLS file works well other other minions though
06:25 mosen hmm yeah im probably just guessing :) i think theres a ps execution module
06:25 mosen salt min000-1 ps.pgrep salt-minion
06:26 mohae_ joined #salt
06:27 Ryan_Lane joined #salt
06:27 Shiv ps.pgrep' is not available
06:28 mosen ok
06:29 Shiv Just FYI, first time it executes fine
06:29 Shiv After that its not executing at all
06:29 mosen the first time you run highstate?
06:29 Shiv i mean after setting up the minion
06:29 Shiv nope state.sls with specific sls file
06:30 Shiv salt  'min000-1' state.sls slsname
06:30 mosen oh right
06:34 mohae joined #salt
06:51 Shiv Hi
06:51 Shiv Issue fixed
06:51 catpiggest joined #salt
06:52 Shiv There were multiple minion processes were running on the minion servers
06:52 Shiv :)
06:52 Shiv Thanks a lot for your help
06:58 mosen hah
07:04 Mso150 joined #salt
07:13 repl1cant joined #salt
07:13 rbjorklin joined #salt
07:14 rbjorklin Hi, I'm having trouble targeting with pillar info
07:14 rbjorklin This "salt 'walx5009.ppe.loc' pillar.item id" returns: walx5009.ppe.loc
07:15 rbjorklin but doing: salt -I 'id:walx5009.ppe.loc' cmd.run "echo hi"
07:15 rbjorklin does not work
07:15 rbjorklin any thoughts?
07:15 elfixit joined #salt
07:16 gspe joined #salt
07:26 eightyeight joined #salt
07:32 stoogenmeyer joined #salt
07:40 rjc joined #salt
07:40 Furao rjc: pillar.get
07:41 Furao oups sorry rjc this was for  rbjorklin
07:41 Furao rbjorklin: ^
07:41 seshan joined #salt
07:44 anybroad_ joined #salt
07:49 rbjorklin Furao: Sorry didn't follow, what did you mean to do with pillar.get?
07:51 TyrfingMjolnir joined #salt
07:51 mens Hi, I did a pull request 10 hours ago on saltstack/salt, but now it's still waiting for result of jenkins.
07:51 linjan joined #salt
07:55 agend joined #salt
07:55 Furao rbjorklin: use that instead of pillar.item
07:56 slafs joined #salt
07:56 slafs left #salt
08:01 KermitTheFragger joined #salt
08:01 trikke joined #salt
08:02 yomilk joined #salt
08:04 seshan_ joined #salt
08:04 phx joined #salt
08:05 hebz0rl joined #salt
08:07 catpig joined #salt
08:09 mikkn joined #salt
08:13 wvds-nl joined #salt
08:13 rbjorklin Furao: Then nothing is returned.
08:16 rbjorklin Furao: Ah, with pillar.get master:id it returns the value
08:16 Furao pillar.get return empty string “” if pilalr key isn’t defined
08:17 otter768 joined #salt
08:18 rbjorklin Furao: When doing salt -I 'foo:bar' does bar have to be a value?
08:18 viq joined #salt
08:18 rbjorklin Furao: Or can that be a key in a hierarchy?
08:18 j-saturne joined #salt
08:34 delinquentme joined #salt
08:47 jhauser joined #salt
08:50 I3olle joined #salt
08:51 rjc joined #salt
08:55 lb1a joined #salt
09:00 chiui joined #salt
09:03 kawa2014 joined #salt
09:08 akafred joined #salt
09:13 Blacklite joined #salt
09:20 CeBe joined #salt
09:22 zadock joined #salt
09:23 bhosmer joined #salt
09:28 seshan joined #salt
09:28 seshan I set a custom grain called roles , and i tried to target minions based on the role as salt 'roles:master' test.ping
09:29 seshan but that always return no minions found
09:35 stoogenmeyer_ joined #salt
09:35 seshan How do i write an equivalent for this in python
09:35 seshan salt -G 'os:CentOS' test.ping
09:35 seshan how to represent the -G in python api ?
09:35 jalaziz joined #salt
09:42 JDog Anyone know how to call a specific state with salt-call? Can't find it in the docs
09:43 j-saturne joined #salt
09:43 ThomasJ JDog: salt '*' salt.sls slsname  is possibly the one you are looking for
09:45 JDog I get ''salt.sls' is not available.' Is that what you intended? Obviously I replaced slsname with my sls.
09:46 ThomasJ Whoops, slipped. its state.sls, not salt.sls
09:46 karimb joined #salt
09:46 Rawkode joined #salt
09:48 ThomasJ JDog: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
09:48 JDog ThomasJ: Thanks!
09:49 tmmt joined #salt
09:49 lothiraldan joined #salt
09:50 cobakobodob joined #salt
09:53 Laogeodritt joined #salt
09:54 stoogenmeyer__ joined #salt
10:01 lb1a joined #salt
10:10 che-arne joined #salt
10:11 phx i'm trying to make salt work with softlayer, checking http://docs.saltstack.com/en/latest/topics/cloud/softlayer.html, however i do not see how should I set the profiles up to NOT to have public interfaces, just privates
10:12 phx could someone please give me a hint with tihs?
10:12 fredvd joined #salt
10:16 phx oh, 7.5.15.4.1.12. private_network
10:16 saltnoob joined #salt
10:16 phx twisted logic in works :)
10:18 otter768 joined #salt
10:20 chutzpah joined #salt
10:24 stolendog joined #salt
10:27 lb1a joined #salt
10:36 paulm joined #salt
10:36 Guest38940 Can I use salt states and pillar without installing any minions or masters (just using salt-ssh)?
10:38 stolendog Hello guys, I am working with salt-ssh, how to add to Saltfile --ignore-host-keys option? tried like this https://gist.github.com/stolendog/71d6ef6c255e7ce7f7b6, but still getting message host key verification
10:39 stolendog Guest38940> yes you can use it without installing minions and masters
10:42 phx is it possible to call salt-cloud functions/actions from python, and if so, how? i don't really see it at http://docs.saltstack.com/en/latest/topics/cloud/index.html
10:44 repl1cant joined #salt
10:47 markm_ joined #salt
10:50 jalaziz joined #salt
10:54 paulm- joined #salt
10:56 yomilk joined #salt
11:00 lothiraldan joined #salt
11:01 elfixit joined #salt
11:05 the_drow joined #salt
11:07 paulm- stolendog: it seems really difficult to understand the manual with respect to minion/master-less setup (just using SSH) because the documentation constantly refers to minion and master configuration files for setting everything up -- files which I don't even have
11:08 N-Mi_ joined #salt
11:08 N-Mi_ joined #salt
11:10 lothiraldan joined #salt
11:11 paulm- For example, the documentation states, "In Salt the master determines who is in what environment", so I have no idea how to use environments without a master
11:12 stolendog Paulm> you must have master config in configuration dir for salt-ssh
11:13 stolendog where you can set file_roots for your environments
11:13 stolendog where you can set file_roots depend on your environments
11:14 Furao joined #salt
11:17 lothiraldan joined #salt
11:18 egil1 I am curious to wether or not, anyone is actually using salt-cloud against Azure
11:19 egil1 and if they are, are they running any services that isnt just VM's?
11:21 bhosmer joined #salt
11:24 yomilk joined #salt
11:27 yomilk joined #salt
11:41 arno joined #salt
11:48 repl1cant joined #salt
11:48 the_lalelu joined #salt
12:00 ecdhe_ joined #salt
12:00 flebel joined #salt
12:14 the_drow I'm trying to use pip that I got by using pyenv
12:15 djaykay joined #salt
12:15 the_drow I set the bin_env correctly but I get State 'pip.installed' found in SLS 'python.tools' is unavailable
12:15 the_drow I refereshed the modules but I still get the same error
12:18 abhi_ joined #salt
12:19 otter768 joined #salt
12:20 abhi_ Hi. Please tell me how to change root password of a minion through salt master.
12:21 rbjorklin Does anyone have an example of targeting with pillars?
12:22 rbjorklin joined #salt
12:22 the_drow abhi_: Take a look at the salt formula
12:23 the_drow It might be possible to do so with it
12:24 abhi_ the_drow : do you have any doc for this. Please share link if you have.
12:24 the_drow abhi_: Not much https://github.com/saltstack-formulas/salt-formula
12:24 the_drow Check it out
12:24 the_drow It manages minions and masters using salt
12:26 abhi_ Ok let me check this. Thanks.
12:32 pppingme joined #salt
12:37 stolendog joined #salt
12:40 j-saturne joined #salt
12:41 gspe joined #salt
12:47 rtuin joined #salt
12:49 cads joined #salt
12:52 jalaziz joined #salt
12:53 hotsnow joined #salt
12:55 hobakill joined #salt
13:02 lothiraldan joined #salt
13:04 FRANK_T joined #salt
13:06 j-saturne1 joined #salt
13:07 j-saturne joined #salt
13:15 johtso joined #salt
13:15 j-saturne1 joined #salt
13:17 the_drow Is there a good way to run a cmd.script state on a different python interpeter?
13:18 ThomasJ the_drow: Set the apropriate shebang in the actual script?
13:19 the_drow I am getting it from the internet
13:19 the_drow I don't want to fork it just for that
13:19 ThomasJ You realize how dangerous that is? :)
13:19 the_drow It uses /usr/bin/env python
13:19 the_drow https://github.com/mitsuhiko/pipsi/blob/master/get-pipsi.py
13:19 ata joined #salt
13:19 the_drow It's not. I have tested it before
13:20 ThomasJ the_drow: The point being, you will be running a script blindly that can be changed at any time outside your control
13:20 Guest86818 left #salt
13:20 ThomasJ In any case, I don't think you can do it without either changing your local environment or altering the shebang
13:21 the_drow I'd like to run it on a python installed by pyenv
13:21 ThomasJ Actually, you can change the environment when I come to think of it
13:21 the_drow How?
13:22 ThomasJ You can supply - env: and list any environment values to be set before the script is run
13:22 the_drow So I need to edit the path?
13:22 the_drow Or is there a better way?
13:22 ThomasJ Not sure if you can override /usr/bin/env that way, but possibly, by setting path for example
13:23 ThomasJ Yep, overriding path to have the version of python you want to use is the right way to do it
13:24 ThomasJ I'd still recommend grabbing a copy of the script and store locally and run from that though for the security implications alone
13:24 the_drow so PATH: '/usr/local/pyenv/versions/2.7.9/bin/:$PATH'?
13:24 lothiraldan_ joined #salt
13:25 ThomasJ Not sure $PATH will work, but if all you need is python itself, PATH: '/usr/local/pyenv/versions/2.7.9/bin/' should be sufficient
13:25 ThomasJ And you could just add paths to any other requirements manually if $PATH does not work
13:26 __ale__ joined #salt
13:29 the_drow ThomasJ: yup that works
13:29 ThomasJ Excellent :)
13:30 the_drow but for some reason pipsi doesn't work from within salt
13:30 the_drow bummer
13:33 ericof joined #salt
13:35 markm_ joined #salt
13:36 bhosmer joined #salt
13:37 babilen the_drow: Why not?
13:37 babilen due to PYTHONPATH tinkering?
13:37 the_drow Something about non-existent directories
13:38 the_drow I'm converging from scratch to see if it was something in my environment
13:39 bhosmer joined #salt
13:39 the_drow I did not touch python path
13:39 the_drow mkdirs failed
13:40 the_drow I'll paste the error if and once I'll get it again
13:40 ThomasJ the_drow: Indicates that $PATH does not work, you will need to manually specify all the paths you need when you override PATH
13:41 the_drow unless blabla:$PATH will expand correctly
13:41 the_drow I'll try that first
13:44 the_drow I really need to improve the pip state to be able to use a python installed by pyenv like the gem state does. You can just specify ruby: x.x.x and it will pick it up
13:46 bluenemo joined #salt
13:47 shyam_ joined #salt
13:48 shyam_ hi all small help like I wann run power shell script on windows which login to remote software repository ans do the installation
13:49 shyam_ so how to copy file from master to windows minion and run script with login user on windows or specific domain user on windows
13:49 the_drow I wish the salt team could work on improving the states so that the community won't have to do so much work to get features in
13:49 the_drow I know that salt focuses on scale right now which is fine but the states quality really varies
13:49 the_drow There are almost no tests
13:50 bluenemo hi guys. when I import sth with context, how can i call that before merging it with the pillar data? example: http://paste.debian.net/hidden/f6cc16c5/
13:50 thawes joined #salt
13:50 the_drow And common functionality isn't migrated between states
13:51 FRANK_T shyam_ look at this http://serverfault.com/questions/524201/how-do-you-execute-a-cmd-script-once-the-pre-requisite-files-have-been-downloade
13:52 shyam_ Frank all this for Linux minions not for windows minion
13:52 shyam_ at present I am coping file from master to windows minion using file.managed
13:53 shyam_ but it not taking other option of user and group etc
13:53 FRANK_T shyam_ sorry I thought it was the same concept
13:54 shyam_ Frank it's not taking
13:54 FRANK_T I run  95% linux
13:54 shyam_ so I come here for little help
13:54 shyam_ me to with linux but management requirement liek this
13:54 FRANK_T show me the formula
13:55 FRANK_T https://www.refheap.com/
13:55 shyam_ c:\\salt\install-firefox.ps1:    file.managed:     - source: salt://winfirefox/install-firefox.ps1 cmd:   cmd.run:     - shell: powershell     - name: 'c:\salt\install-firefox.ps1'
13:55 shyam_ it is inside 1 .sls file
13:55 jalaziz joined #salt
13:55 FRANK_T Please use the link
13:56 shyam_ ok
13:56 shyam_ pls chk link
13:57 shyam_ https://www.refheap.com/95830
13:57 FRANK_T and whats the output?
13:58 FRANK_T It is copying the file but not running the script?
13:59 shyam_ https://www.refheap.com/95831
13:59 shyam_ yes
14:00 shyam_ yes script not running as it need user level permission to fetch installaltion file form storage location
14:00 jeremyr joined #salt
14:02 FRANK_T user level permission. mmm
14:02 shyam_ yaa
14:02 cpowell joined #salt
14:02 FRANK_T meaning Admin rights?
14:03 shyam_ i have to give this file user pernission who is currently login to windows machine then only this script get executed and get permission on shared storage
14:03 JDiPierro joined #salt
14:03 shyam_ in linux it is easliy manageable by file.manages
14:04 Guest38940 joined #salt
14:04 FRANK_T I am not sure but in linux
14:04 FRANK_T I will be
14:04 FRANK_T file.managed:
14:04 FRANK_T - user:
14:04 FRANK_T - group
14:04 FRANK_T - mode
14:04 shyam_ ya in linux me too doing like tht
14:05 shyam_ but in windows gettign issue
14:05 egil1 have you checked UAC?
14:06 FRANK_T shyam_ I do not know. sorry
14:10 shyam_ egill i have to set user permission on file
14:11 shyam_ then only it access executable file on shared location
14:11 shyam_ it's ok Frank
14:12 egil1 shyam_: I don't understand. Are you running a script from a shared location, or are you copying it to the minion from the share?
14:13 egil1 because windows doesn't really like to run Powershell scripts from remote locations, by default
14:13 egil1 and if the script requires some sort of admin priveliges, UAC usually come into account
14:13 shyam_ 1.>i m coping script from master to windows minion
14:14 shyam_ then this script need to be run with some specific user
14:14 egil1 So: is the filed copied over? and the problem is running the script?
14:15 shyam_ in this script when it execute login to remote shared storage for installation file
14:15 egil1 Two things to look after: You are running a powershell script. Are you allowed to run remote powershell scripts? Does UAC kick in, when running the script?
14:15 shyam_ yes file is gettign copy
14:15 shyam_ only issue in running the script
14:15 egil1 I will say that your user is lacking priveliges
14:16 egil1 either it stops becuase of remotesigned scripts, or uac
14:16 shyam_ ok so u mean first I disable UAC ,but what abt user permission on file
14:17 shyam_ egill i am saying the same I have to set user persmission on file which I am coping from master to minion
14:17 shyam_ do u wann see my code and output
14:17 egil1 As long as the file is copied over to a directory that the user can read from, that shouldnt be an issue
14:17 FRANK_T shyram_ Do you in a AD environment?
14:18 egil1 have you tried to log on to the machine as the user, and run the script manually?
14:18 egil1 This is the #1 most annoying thing I know when running remote jobs on windows machines
14:18 shyam_ yaa manually it running and doing the installation
14:18 shyam_ even I have disable UAC
14:19 shyam_ i just need to set user permission on file
14:19 sgregory_ joined #salt
14:19 FRANK_T shyram_ run the salt command with -v and show me the output
14:20 FRANK_T now I am curious
14:20 otter768 joined #salt
14:20 egil1 shyam_: do you mean the script file?
14:20 shyam_ ok frank
14:20 shyam_ yes
14:20 rypeck joined #salt
14:21 egil1 If the file is copied over to a directory the user already has write access to, that should be no problem
14:21 egil1 and with inheritance
14:21 shyam_ egile let me try
14:22 shyam_ 1 min just
14:24 aquinas joined #salt
14:27 cheus joined #salt
14:28 Ahlee if salt would return on busy systmes I'd be soooo happy
14:31 j-saturne joined #salt
14:37 mpanetta joined #salt
14:39 mpanetta_ joined #salt
14:40 overyander what happened to the master branch of salt in github? I'm not able to see it anymore.
14:40 overyander https://github.com/saltstack/salt
14:40 numkem Has anyone played with virt runner? If so, where could I find images that would work with salt? I've grabbed an image from the official Ubuntu images and I can't find a way to log in since I don't have a key pair
14:44 shyam_ egil1 thr
14:44 shyam_ frank thr
14:46 asdf___ joined #salt
14:46 Left_Turn joined #salt
14:47 stoogenmeyer_ joined #salt
14:50 xf10e joined #salt
14:52 kbyrne joined #salt
14:53 j-saturne1 joined #salt
14:53 egil1 shyam_: did it work?
14:53 anotherZero joined #salt
14:54 shyam_ egill i have made 1 directory and set permssion
14:54 shyam_ but it not working
14:55 shyam_ I think best way it should be to change the file permission after ti get copy any how
14:56 xf10e hi
14:56 jalaziz joined #salt
14:56 xf10e is it just me or is targeting via "match: pillar" in a topfile broken?
14:56 egil1 shyam_: you should be able to get the same permissions, as long as the directory is set to override files and folders
14:57 xf10e `salt -C I@foo:bar` and `salt -I foo:bar` works fine...
14:57 egil1 shyam_: that being said, I have never ran powershell scripts using salt
14:57 egil1 I would guess there are som issues with remotesigning
14:58 shyam_ yes u r right
14:58 shyam_ executables files are on shared location
14:58 shyam_ and have permmission
15:03 housl joined #salt
15:03 andrew_v joined #salt
15:03 eliasp overyander: there's no "master", it's called "develop" … that's a convention used by quite a lot Python based projects
15:04 bluenemo how can I pass a jinja variable for use in a script when using cmd.script source:salt://foo.sh ? I want to use {{ foobar }} inside that fo.sh
15:04 FRANK_T shyram_ all set?
15:04 perfectsine joined #salt
15:05 xf10e bluenemo: either generate the script from a template or pass a paramter to the script
15:05 twellspring joined #salt
15:05 kermit joined #salt
15:06 jbub joined #salt
15:06 bluenemo xf10e, how would you pass the parameter? I've tried env: and defaults:, both of which only seem to pass it as bash environment variable
15:06 bluenemo (as in I get Jinja variable 'foobar' is undefined)
15:07 xf10e bluenemo: /path/to/foo.sh {{ parameter }}: \n cmd.run:\n ...
15:07 bluenemo aaah as parameter. good idea. thank you
15:08 xf10e if you want the state itself to not change it's id use "- name: /path/to/foo.sh {{ parameter }}"
15:09 bluenemo ah sry no. I want to use it as a yaml variable in the script (as I do write some jinja in there). as in I need to be able to use {{ foobar }} in the script, so passing {{ foobar }} as parameter isnt an option.
15:09 Guest38940 Is it possible to specify multiple PPAs for one pkgrepo.managed state or do I have to create N states, where N = number of PPAs
15:10 bluenemo pmorris, as far as I know you have to use one state per repo
15:10 bluenemo aeh PPA
15:10 kaptk2 joined #salt
15:10 overyander eliasp, i could have sworn there a master branch. i must have been thinking of another project.
15:11 eliasp overyander: there was once, it got removed as it was obsolete
15:11 overyander ah
15:11 bluenemo xf10e, what I basically want to do is cmd.scipt: - name: salt:/fo.sh - pass_variable: {{ foobar }}     then     fo.sh:   echo {{ foobar }}
15:12 bluenemo can I somehow set a jinja variable from bash environment, sth like bar = os.environ('foobar') ?
15:12 xf10e bluenemo: according to http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.script you can use templating to generate the script
15:13 xf10e settings environment variables should also be possible...
15:14 hobakill joined #salt
15:15 bluenemo xf10e, thats what I'm looking for: http://paste.debian.net/hidden/b4ae75da/
15:15 bluenemo I have to pass the variable in jinja and then have it available not in bash but in jinja again in the script
15:15 bluenemo bash is also fine but already works with - env:
15:16 _JZ_ joined #salt
15:16 bluenemo sorry, the last paste was a bit misleading: http://paste.debian.net/hidden/c5defbb3/
15:17 bluenemo I thought of sth like {% foobar = os.environ('foobar') %} but that doesnt work
15:17 xf10e use "- context:" or "- default" then
15:17 bluenemo already tried, default doesnt work, context is to override defaults it says
15:17 xf10e yeah, your {% %} is missing a "set" ;)
15:17 murrdoc joined #salt
15:18 bluenemo yeah sry, works in my actual code ;)
15:18 bluenemo I used this:
15:18 bluenemo http://paste.debian.net/hidden/048d5a72/
15:18 bluenemo bash works, I can echo $vpnname, but echo {{ vpnname }} doesnt work
15:19 bluenemo also - defaults: \n - {{ vpnname }} wont work :(
15:20 xf10e bluenemo: version A: http://paste.debian.net/139579/
15:21 bluenemo xf10e, yes, thats a bash variable. that works for me too
15:21 ventris joined #salt
15:21 FRANK_T https://www.refheap.com/39711653b3f51800436dff039        <--------- I have problem with this formulas I was able to copy the files but after copying the file I have to tun the bash.sh and I am getting an error any Idea.
15:21 fredvd joined #salt
15:21 dude051 joined #salt
15:23 bluenemo FRANK_T, there is no source argument to the cmd.script, the first argument (first line) is name, default for source is none
15:23 bluenemo output is a bit misleading. check http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.script
15:24 bluenemo do you know how to pass a jinja variable to a cmd.script? :P
15:24 bluenemo xf10e, is there a version B with a jinja variable? :) can you verify that defaults: does not pass a jinja variable as well?
15:25 FRANK_T bluenemo no..
15:25 xf10e bluenemo: version B: http://paste.debian.net/139580/
15:25 xf10e I used context, but yepp, there is
15:26 bluenemo ah context ok. i knew that one. its not listed in the doc
15:27 bluenemo I c. thank you so much xf10e !! :)
15:27 bluenemo FRANK_T, does it work with a given source argument?
15:28 FRANK_T no
15:28 FRANK_T - source: salt://files/PBSPro_12.2.4/bash.sh:    <======================
15:29 FRANK_T Rendering SLS "base:pbs_mom" failed: Unknown yaml render error; line 23
15:29 veselin joined #salt
15:29 bluenemo can u paste the full output again pls? just to make sure
15:30 FRANK_T the output?
15:30 xf10e FRANK_T: does this work? http://paste.debian.net/139581/
15:30 veselin Hello all, which module allows an execution of a portion of a state? e.g. run only the pkg.installed part of an sls containing pkg.installed, file.managed, service.running etc.
15:30 FRANK_T https://www.refheap.com/383861d549658489b37a5e95b
15:31 FRANK_T xf10e let me check
15:32 gfa joined #salt
15:35 FRANK_T xf10e nop
15:36 FRANK_T ok let me explain maybe you guys have a better way to do this
15:37 FRANK_T Inside of the folder that I copied I have a script call INSTALL that will install the application but I have to pass some argument from another file
15:37 eriko joined #salt
15:37 FRANK_T If i do this manually the command will be   ./INSTALL < answers
15:38 FRANK_T that the command that I want to pass  I tried  salt 'hostname' cmd.run './INSTALL < answers' and i had no luck that why I create a bash.sh file with the command in it
15:40 xf10e veselin: split the state into substates then (state.sls -> state/pkg.sls, state/service.sls, state/file.sls) ant tie them all together with state/init.sls including all those substates
15:41 veselin xf10e: thank you, how about the 'state.sls_id'  module? could that be an alternative approach?
15:43 xf10e veselin: yeah, should work, too
15:44 xf10e FRANK_T: did you specify a cwd for your cmd.run?
15:45 redzaku joined #salt
15:45 Papipo joined #salt
15:48 dnjay joined #salt
15:51 FRANK_T cwd?
15:52 xf10e current working directory
15:52 FRANK_T cwd will be the script location
15:52 xf10e did you specify it when running `./INSTALL < answers`?
15:52 FRANK_T I put the complete path
15:53 FRANK_T '/home/PBS/./INSTALL < answers'
15:53 FRANK_T sorry
15:54 rockey joined #salt
15:54 FRANK_T '/home/PBS/./INSTALL < /home/PBS/answers
15:54 FRANK_T that how I tried
15:55 N-Mi_ joined #salt
15:55 N-Mi_ joined #salt
15:55 jngd joined #salt
15:57 jalaziz joined #salt
15:58 TheThing joined #salt
15:58 FRANK_T salt -v 'host' cmd.run '/srv/salt/files/PBSPro_12.2.4/./INSTALL < answers '
15:59 Hydrosine joined #salt
15:59 FRANK_T zsh:1: no such file or directory: answers
16:02 conan_the_destro joined #salt
16:04 lothiraldan joined #salt
16:05 rockey joined #salt
16:05 cleme1mp joined #salt
16:07 Furao joined #salt
16:10 rockey left #salt
16:13 RedundancyD joined #salt
16:14 zadock joined #salt
16:17 hasues joined #salt
16:19 Deevolution Is there a salt.states.sysctl.absent?
16:21 otter768 joined #salt
16:23 peters-tx joined #salt
16:23 felskrone joined #salt
16:27 StDiluted joined #salt
16:27 redzaku joined #salt
16:27 nitti joined #salt
16:29 lothiraldan_ joined #salt
16:30 iggy wooo! github should now know the difference between yaml+jinja and scheme (at least for .sls files)
16:31 xf10e iggy: finally!
16:31 xf10e FRANK_T: in theory this approach should work. I guess it needs some fiddling to find the actual problem but I'm too busy right now
16:32 stevednd I'm trying to write a custom grain, but I need to import a custom module I wrote. I can't figure out how to bring itin though
16:32 Mso150 joined #salt
16:33 iggy stevednd: it's python... from custom import foo
16:33 veselin left #salt
16:33 murrdoc well first put foo in the _modules under /srv/salt
16:34 I3olle_ joined #salt
16:35 stevednd iggy: my module is at salt/_modules/envutil.py when I go to import it in my grain I tried import envutil but no go. I also tried import salt.modules.envutil also import salt._modules.envutil
16:38 iggy I'm not sure how that would work tbh
16:38 iggy _modules isn't exactly on the path, it's just fake imported by salt
16:38 iggy look at the loader code maybe
16:38 murrdoc salt '*' saltutil.sync_modules
16:38 murrdoc then u dont need to import it
16:39 murrdoc just do {{ salt['envutil.functioname']('params') }} in your jinja
16:39 iggy read up
16:39 stevednd murrdoc: the module is already synced. I'm attempting to load it in a custom grain. __salt__isn't setup yet at that point
16:39 iggy he's trying to use the module in a custom grain
16:40 murrdoc oh, then __salt__('module.function')['params'] ? in grains class
16:40 jimklo joined #salt
16:41 murrdoc sorry i should have read more
16:41 murrdoc my bad
16:41 iggy __salt__ should be available to custom grains
16:41 murrdoc yeah and all modules should be in __salt__
16:41 stevednd let's try. I was going off of the code in grains/core.py which was manually building __salt__
16:42 theologian joined #salt
16:43 stevednd doesn't look like it
16:44 iggy show me the mon^Wcode
16:46 Ozack joined #salt
16:46 stevednd https://gist.github.com/dnd/3329901fb90feb8dddd4
16:46 stevednd nothing special
16:47 stevednd right now it dies where it tries to call __salt__
16:48 tligda joined #salt
16:48 jalbretsen joined #salt
16:53 iggy error?
16:54 stevednd KeyError: 'envutil.infer_env_from_name'
16:55 stephenfin joined #salt
16:56 nahamu joined #salt
16:57 arno joined #salt
16:57 iggy seems like it should be working... maybe one of the devs will chime in when they aren't busy
16:59 Ahlee Isn't there a trick for getting pillars in pillars?
16:59 bersace joined #salt
16:59 bersace Hi, how to avoid salt rerun clean up rules (like deleting obsolete packages) ?
16:59 bersace is there some solution for some kind of migration ?
17:00 iggy Ahlee: no, avoid it (it's non-deterministic at best)
17:00 perfectsine joined #salt
17:00 bersace state based on a version rather than system introspection
17:00 xf10e Ahlee: nope, you can't access pillar in pillar because it's not yet generated
17:00 Ahlee right, but ther'es work arounds
17:00 Ahlee since it's a valid, useful use case
17:01 Ahlee I know i've read about them, just can't remember them
17:01 xf10e Ahlee: a workaround to reuse data is inclusion with templating
17:02 xf10e also usefull to specify defaults so you can pass just a few values that are differen for this minion
17:03 Ryan_Lane joined #salt
17:03 Ahlee https://gist.github.com/jalons/fb2abc83d1bdf59e09cd
17:03 Ahlee right, usually.
17:03 Ahlee I really, really don't want to move foo_list out of this state for $REASONS
17:03 elfixit1 joined #salt
17:03 stevednd Ryan_Lane: I remember you writing a lot of custom salt stuff, is that right?
17:04 Ryan_Lane most of it upstreamed, but yeah
17:04 stevednd have you written any custom grains? in particular I'm trying to use a custom module I wrote in a custom grain, but I can't get it imported
17:05 Ryan_Lane you should be able to call the custom module via salt['mymodule.myfunction')(myargs)
17:05 Ryan_Lane err
17:05 Ryan_Lane __salt__
17:06 murrdoc he tried
17:06 Ryan_Lane I haven't tried calling a custom module from a custom grain, but I would think it would work
17:06 stevednd yeah I tried that . no dice
17:06 Ryan_Lane if not it's a bug and you should submit an issue
17:06 Ahlee custom module should be accessible same as regular module
17:06 Ryan_Lane can you call your custom module from the cli?
17:06 Ahlee as long as you saltutil.sync_modules
17:07 stevednd yep, works perfectly from there
17:07 stevednd I can see from grains/core.py that there are some load order issues between modules/grains
17:07 Ryan_Lane yeah, I'd file an issue in github. looks broken
17:10 ajmccluskey joined #salt
17:11 lothiraldan joined #salt
17:11 KyleG joined #salt
17:11 KyleG joined #salt
17:11 stevednd I don't think builtin modules are available either
17:12 murrdoc will salt-min work for u steve
17:12 xf10e Ahlee: you could put foo_list into something like a map.jinja and merge it with data from your external pillar
17:12 Ahlee hrm.
17:12 Ahlee still fails the "data not in front of you" test, but that might have to do
17:13 iggy are you using the module code elsewhere? infer_env_from_name() looks awfully specific... why not just move it to the grain itself?
17:13 iggy stevednd: ^
17:13 delinquentme joined #salt
17:13 stephas joined #salt
17:14 murrdoc looking at https://github.com/saltstack/salt-contrib/blob/18ecf95fa9ea0325ac9acd91a91a4be117fe6315/grains/facter.py
17:14 murrdoc you have to setup __salt__ variable
17:14 murrdoc so import salt.modules.<custom>
17:14 stevednd iggy: it is very specific, but there's other stuff around environments in that file that it needs
17:14 stevednd murrdoc: tried that. didn't work
17:15 stevednd you can import the main salt modules, but it doesn't find the custom ones
17:15 murrdoc is it just missing the __init__ file in the _modules directory
17:16 iggy I don't think _modules ends up in python_path
17:16 iggy so I don't think you can import it that way
17:20 stevednd murrdoc: having an __init__.py file didn't make a difference
17:20 iggy yeah, that's just not the way the python importer works
17:20 iggy the salt loader works differently (i.e. it knows to look in _modules)
17:24 alexr_ joined #salt
17:25 smcquay joined #salt
17:30 Cottser|away joined #salt
17:30 dseira joined #salt
17:31 wendall911 joined #salt
17:33 ajw0100 joined #salt
17:35 murrdoc joined #salt
17:36 iggy anybody know when the saltconf training is (exact dates)
17:36 Ahlee oh that's awesome.  pillar.item <pillar> returned one thing, pillar.get <pillar> returned another after first saltutil.refresh_pillar, second caused both to return same
17:36 iggy nvm, I found it
17:37 iggy (it's the 3rd)
17:37 murrdoc got an ossec formula handy ?
17:39 schristensen joined #salt
17:40 desposo joined #salt
17:42 murrdoc do we have a formula template repo ?
17:42 iggy there is one, but it's got issues
17:43 murrdoc go on
17:46 Gareth k/w 7
17:46 Gareth erm
17:46 spookah joined #salt
17:47 murrdoc https://github.com/saltstack-formulas/template-formula
17:47 iggy yeah
17:49 murrdoc what dont u like about it
17:51 iggy after looking at it again, I take that back
17:51 iggy it's not that bad, just simplistic
17:52 iggy someone did something bad one day and said they copied it from that template... but I don't see that happening
17:52 aparsons joined #salt
17:52 tdegrunt joined #salt
17:53 bhosmer__ joined #salt
17:54 dave08080 joined #salt
17:55 Ahlee blah.  I give up.  five individual files and i'll kill the outter loop
17:56 ipmb joined #salt
17:56 dave08080 anyone know how to install pdo_mysql using salt states? i'm getting "Could not install pecl extension pdo_mysql." when i try to use the pecl.installed function
17:58 stevednd So I am moving up to a number of servers(~60) that is not terribly easy to manage with little custom bits of functionality. What do you guys do for managing grains, pillars, etc... for a situation like this?
17:58 dnai23 joined #salt
17:59 spookah every server has a unique configuration?
17:59 dnai23 joined #salt
18:00 stevednd spookah: not hugely varying, but one example is that the way metric reporting occurs, each machine needs its own specific port to contact the primary server
18:00 stephas joined #salt
18:01 berserk joined #salt
18:02 jimklo joined #salt
18:02 iggy augeas?
18:02 iggy no, that's not the one I was thinking of
18:02 murrdoc steve u can use grains much easier by putting key/values in the /etc/minion.d/grains file
18:02 murrdoc or 'exact path'
18:03 stevednd murrdoc: that's still a more manual tedious process, and is effectively what I do now
18:03 murrdoc the way i  do it is have a minion state which sets up grains by nodes
18:03 murrdoc using an external pillar
18:03 iggy reclass
18:03 iggy that's the one I was thinking of
18:03 stevednd yeah, I was thinking about maybe doing something with a database ext pillar
18:03 murrdoc not a fan of reclass iggy
18:03 iggy noted
18:04 murrdoc not that u asked :)
18:04 iggy it works for some people's setup
18:04 iggy not everybody
18:04 mattbarto joined #salt
18:04 paulm- joined #salt
18:04 dnai23 joined #salt
18:05 dnai23 joined #salt
18:05 iggy but if there was a single thing that worked for everybody, we'd all be packing up shop and heading home
18:05 davebarnes joined #salt
18:05 paulm- `salt-ssh \* state.highstate` tries to load state from the target...? How do I get it to use the state files on the source machine instead?
18:06 murrdoc stevednd:  heres what i am doing, you can setup a bootup/startup state, i set that to be the minion state, where a bunch of data is read in from pillars/ext-pillars and grains are setup on the nodes as needed, then use the pillars everwhere
18:07 stevednd murrdoc: do you use any kind of admin ui for managing your ext pillars?
18:07 stevednd assuming they're database backed that is
18:08 murrdoc not yet no
18:08 davebarnes how do I get apache to restart after a php module gets installed?
18:08 thedodd joined #salt
18:09 forrest joined #salt
18:12 Mso150 joined #salt
18:15 dnai23 joined #salt
18:15 shaggy_surfer joined #salt
18:16 redzaku joined #salt
18:17 beneggett joined #salt
18:17 dnai23 joined #salt
18:20 monkey66 joined #salt
18:22 otter768 joined #salt
18:23 thedodd joined #salt
18:23 dfinn joined #salt
18:24 rjc joined #salt
18:25 thedodd joined #salt
18:27 eykd joined #salt
18:29 Ryan_Lane joined #salt
18:32 jhauser joined #salt
18:34 iggy davebarnes: watch/watch_in
18:34 murrdoc listen/listen_in
18:35 murrdoc save our ordering
18:35 iggy blah blah
18:35 murrdoc :P
18:35 iggy when was listen added?
18:35 murrdoc 2014.1
18:35 murrdoc .somever
18:35 repl1cant joined #salt
18:36 iggy docs say 2014.7
18:36 Ryan_Lane 2014.7
18:36 iggy so it's a no go
18:37 iggy (at least until 2014.7.1 is released)
18:37 iggy 2014.7.0 has too many issues
18:38 davebarnes iggy: thanks, tried "watch", but apache isn't being restarted after running highstate ... any ideas? heres my sls code:
18:38 davebarnes php5-mysql:
18:38 davebarnes pkg.installed:
18:38 davebarnes - require:
18:38 davebarnes - pkg: apache2
18:38 davebarnes - watch:
18:38 davebarnes - pkg: apache2
18:38 * iggy mumbles something about mine.get
18:38 iggy davebarnes: next time, throw that in a paste somewhere (refheap, gist.github.com, etc.)
18:39 davebarnes sry ill do that next time
18:39 meylor joined #salt
18:39 meylor joined #salt
18:39 iggy you would do something like - listen_in:\n  service: apache2
18:39 iggy instead of the watch bit
18:40 iggy note the _in part and the service vs pkg
18:40 meylor If I've defined a custom filter in /usr/lib/python2.7/dist-packages/salt/_modules/helper.py . Is there another step to be able to register that within salt?
18:41 beneggett joined #salt
18:41 ponpanderer joined #salt
18:43 linjan joined #salt
18:44 dnai23 joined #salt
18:44 ponpanderer Hello, I have a question regarding the behavior of kill_job in respect to cmd.script run via cmd_async. It seems that issuing a kill_job using the returned JID from cmd_async does not kill the script process. In my test case I have a shell script with a 'sleep 180' and issuing the kill returns no output from targeted minions and a ps confirms the script is still running. Is my understanding of
18:44 ponpanderer the intended behavior incorrect?
18:45 MK_FG joined #salt
18:45 MK_FG joined #salt
18:45 Ryan_Lane is there any way to say 'I want version x or greater using pkg.installed'?
18:45 Ryan_Lane I want to avoid apt-get update, but I also want to ensure some packages are > than a vulnerable version
18:45 ponpanderer note: in my test both the salt-minion and salt-master are 2014.7
18:46 Syn1 joined #salt
18:46 ericof joined #salt
18:48 murrdoc apt doesnt support greater than
18:48 murrdoc you can use pinning
18:48 davebarnes iggy: tried listen_in with service: apache2, still can't get apache to restart any idea waht's wrong? https://www.refheap.com/95842
18:52 hal58th joined #salt
18:53 davebarnes Ryan_Lane: you specify the version and you can use the > or >= operator: example: mypkgs:\n  pkg.installed:\n    - pkgs:\n      - bar: '>=1.2.3-4'
18:53 jchen joined #salt
18:54 Ryan_Lane that seems to fail
18:55 Ryan_Lane davebarnes: on a new install of a package it does anyway
18:56 davebarnes oh, nvm that only works for ebuild, pacman and zypper
18:57 davebarnes what i do is i specify the exact version i want like this: php5:\n  pkg.installed:\n    - version: 5.5.12+dfsg-2ubuntu4.1
18:57 lagrenade joined #salt
18:57 Ryan_Lane yeah, I don't want to do that either, otherwise we'll have failures between distro versions or when the older package disappears
18:58 Ryan_Lane it also locks us into a possibly insecure version if we don't check
18:58 cpowell joined #salt
18:58 murrdoc https://wiki.debian.org/AptPreferences is your friend
18:58 MK_FG joined #salt
18:59 Ryan_Lane bleh
18:59 Ryan_Lane that's really complex
18:59 FRANK_T https://www.refheap.com/383861d549658489b37a5e95b  Help :(
18:59 mikaelhm joined #salt
19:00 FRANK_T I cant run my bash script :(
19:00 davebarnes FRANK_T:
19:00 davebarnes theres a colon at the end of line 24
19:00 davebarnes that might be your problem
19:00 iggy Ryan_Lane: pkg.latest might be your best bet
19:01 iggy but seems like it'd be a good addition
19:01 Ryan_Lane I don't want to take the hit for apt-get update unless I need to
19:01 Ryan_Lane if I use latest, every run is going to be 20-30 seconds slower
19:01 iggy then wait for support to be added...
19:02 FRANK_T sorry wrong one
19:02 FRANK_T salt -v 'host name cmd.run '/srv/salt/files/PBSPro_12.2.4/./INSTALL < answers'
19:02 FRANK_T I am getting zsh:1: no such file or directory: answers
19:02 sgregory_ joined #salt
19:03 iggy that's relying on shell redirection and I don't think cmd.run runs under a shell
19:03 FRANK_T If I run ir manually I jut have to go to the directory and run ./INSTALL
19:03 FRANK_T iggy
19:03 FRANK_T If i do it manually I just have to run the script ./INSTALL < answers
19:04 iggy why can't you use "cat foo | /sfdo/asf/safoi/INSTALL"
19:04 FRANK_T the file answer is a text files that auto responds to the question  of the instalation
19:04 N-Mi_ joined #salt
19:04 N-Mi_ joined #salt
19:04 gfa joined #salt
19:05 FRANK_T manually works I just want to send that command via salt.
19:05 iggy I'm pretty sure you can't rely on shell semantics when running cmd.run
19:05 iggy so work around it
19:06 FRANK_T I tried this https://www.refheap.com/da47416086008132ff307087e
19:07 sgregory_ If I have a topfile that looks like this: http://pastebin.com/4GxuHTfB  and I have a host named server01-zone1.example.com I should get  env.base, env.zone1 and service.web applied to it right?
19:09 iggy sgregory_: afaik
19:09 sgregory_ ok, thanks for the sanity check
19:09 iggy I would avoid env there as it could easily be confused with salt's environment support
19:09 iggy but that's just me
19:09 sgregory_ yeah just tried to simplity the example
19:10 sgregory_ Something else is fishy.  I just wanted to make sure the approach wasn't wildly off base
19:11 FRANK_T iggy any idea?
19:12 iggy FRANK_T: no, every example you've pasted doesn't at all match what you say you are doing, so I stopped looking
19:12 FRANK_T ok
19:13 overyander I'm running into an odd issue. i'm getting this error "[ERROR   ] Unable to cache file 'salt://win/repo/cisco_vpn/vpnclient_setup(x32).msi)' from saltenv 'base'." when running this command "salt User-PC1-Telco pkg.install cisco_vpn32" the file is physically located in "/srv/salt/base/win/repo/cisco_vpn/"
19:13 ponpanderer Regarding my question about kill_job i see that salt kills the salt process running the job, just not the children(see http://pastebin.com/SmZ27zrc). This seems related to https://github.com/saltstack/salt/issues/9855 but that issue was closed in early 2014
19:14 iggy overyander: does cp.list_master show it where you think it should be?
19:15 overyander iggy, do i run that with salt-runner ? i'm not familiar with that command
19:15 FRANK_T ok I did the formula to copied the folder PBS  from the master to minion I tried to install the application with the script ./INSTALL < answer , manually works but when I try via salt doesn't work  than a I creates a bash file with the command ./INSTALL < answer
19:16 FRANK_T I cannot run the command via cmd.run or  cmd.script:
19:16 iggy overyander: it's a standard execution module
19:17 MK_FG joined #salt
19:17 iggy FRANK_T: find some way other than < to do it
19:17 Yee joined #salt
19:18 overyander iggy, yes it shows it correctly. - win/repo/cisco_vpn/vpnclient_setup(x32).msi
19:19 overyander iggy, in the state file i have "installer: 'salt://win/repo/cisco_vpn/vpnclient_setup(x32).msi)'"
19:19 iggy overyander: your paste says ) at the end
19:20 iggy ).msi)
19:20 overyander holy crap
19:20 overyander thanks. LOL
19:22 meylor I have the options configured in /etc/salt/master:
19:22 meylor root_dir: /etc/salt/
19:22 meylor extension_modules: _modules
19:22 meylor Should those be the only necessary settings to pick up
19:22 meylor /etc/salt/_modules/helper.py ?
19:22 iggy meylor: _modules goes in file_roots not root_dir
19:22 mens joined #salt
19:22 totte left #salt
19:23 totte joined #salt
19:24 iggy in fact, I know nothing about extension_modules
19:24 FRANK_T ok
19:24 iggy so ignore me
19:24 meylor iggy: that worked.
19:26 FRANK_T Iggy I tried this https://www.refheap.com/bd9eca5bac6648975bf483652
19:27 FRANK_T inside bash.sh I have the command ./INSTALL < Answers
19:27 StDiluted_ joined #salt
19:28 iggy I've never tried to do something like that in salt, I don't think I can help you further
19:29 FRANK_T ok thank you.
19:30 Mso150 joined #salt
19:31 gfa joined #salt
19:31 Ryan_Lane FRANK_T: root/root 770? :D
19:32 FRANK_T I know it should be 644
19:32 FRANK_T ;)
19:35 Ryan_Lane what are you trying to do?
19:35 snave joined #salt
19:35 dfinn joined #salt
19:36 FRANK_T Install PBS
19:36 FRANK_T manually I have to scp the folder to one on the nodes
19:37 FRANK_T and run the script that is inside the folder
19:37 FRANK_T the script name is ./INSTALL
19:37 FRANK_T that will ask me 4 question, I create a text file with the answer of the question
19:38 FRANK_T if I do it manually I have to run the command ./INSTALL < answers
19:38 iggy try pasting all the code you have (state file, bash script you are running, etc.)
19:38 iggy might make it more clear what's actually going on
19:38 iggy protip: gist allows multiple files in a paste
19:39 FRANK_T I have I file
19:39 FRANK_T 1 file*
19:39 FRANK_T pbs_mom.sls
19:39 FRANK_T https://www.refheap.com/bd9eca5bac6648975bf483652
19:42 higgs001 joined #salt
19:44 iggy what about the bash script you're trying to get salt to run?
19:45 chiui joined #salt
19:45 kelly_ joined #salt
19:45 davebarnes iggy, any idea on what i'm doing wrong to get apache to restart upon installation of another package using listen_in? i'm guessing it's something simple but i just can't figure it out :(  https://www.refheap.com/95852
19:47 kelly_ I am new to salt, and from the business side. I have some very basic questions.
19:47 iggy davebarnes: you have to include whatever file defines the apache service
19:47 kelly_ Does salt run on Windows?
19:47 iggy kelly_: the minion does
19:47 kelly_ not the master?
19:47 iggy pretty sure, no
19:48 iggy but I could be wrong
19:48 kelly_ is there a db associated SQL or something
19:49 iggy not by default, just config files
19:49 fintler joined #salt
19:49 kelly_ and logs i assume
19:49 Xiao_ joined #salt
19:49 fintler joined #salt
19:49 kelly_ GUI interface?
19:50 ajw0100 joined #salt
19:50 delinquentme is there a grain for a machines external IP ?
19:50 gothix joined #salt
19:51 cobakobodob joined #salt
19:52 iggy kelly_: not by default... there's halite (and others) and saltstack enterprise is working on one that looks pretty nice
19:52 iggy delinquentme: no, as there isn't really a standard way to get that
19:53 kelly_ Is SSH communication available yet
19:53 iggy delinquentme: however... https://github.com/saltstack/salt-contrib/blob/master/grains/gce.py
19:53 iggy delinquentme: there's one for aws in there as well
19:54 iggy kelly_: yes, salt-ssh exists, it has some limitations over the standard salt transport
19:54 ponpanderer no one with any input on why saltutil.kill_job only kills the salt pid and not the child script when using cmd.script?
19:56 davebarnes salt-ssh is nice
19:59 dfinn joined #salt
20:00 thedodd joined #salt
20:01 nitti_ joined #salt
20:03 j-saturne joined #salt
20:03 jslatts joined #salt
20:03 shaggy_surfer joined #salt
20:06 Deevolution left #salt
20:07 Deevolution joined #salt
20:11 xf10e Ryan_Lane: you can check if the current version is older than the one with fixed one and specify the fixed one to be isntalled
20:11 xf10e iggy: sure is cmd.run executed in a shell, I run `foo && bar` all the time
20:12 xf10e iggy: https://github.com/0xf10e/openvswitch-formula/blob/master/networking/init.sls#L21
20:13 FRANK_T xf10e it is possible to run cmd.run './INSTALL < answer'
20:14 FRANK_T ?
20:16 twellspring @basepi  in issue 13263 about gpg you said to put the renderer in a shebang at the top of a pillar file.   Is the shebang just
20:16 twellspring #!gpg
20:16 xf10e FRANK_T: I think so but I haven't looked at the pastes you posted since 18:30 or something yet
20:16 stoogenmeyer joined #salt
20:19 xf10e FRANK_T: take a look at http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.run . there's a parameter "cwd" that specifies in which dir the cmd is executed. set cwd to /home/PBSPro_12.2.4/ and try again
20:20 cberndt joined #salt
20:21 xf10e I still think a cmd.run of './INSTALL < answers' with '- cwd: /home/PBSPro_12.2.4/' should work but I'm to tired to write a state to proof it ;)
20:22 racooper joined #salt
20:22 kevinforbes joined #salt
20:22 otter768 joined #salt
20:24 kevinforbes I’m using SaltCloud to provision Ubuntu instances. When I SSH into them they say “75 packages can be updated. 43 updates are security updates.” Is there a good salt way to update Ubuntu before doing anything else?
20:24 FRANK_T xf102 hehe..
20:24 FRANK_T let me check
20:24 numkem kevinforbes: I've done something similar using the reactor
20:24 numkem when the minion starts, I make it run a highstate
20:25 gspe joined #salt
20:25 kevinforbes numkem: Ok, I’m reading that the reactor lets you run an event in response to, e.g. an instance being created
20:26 numkem kevinforbes: as for doing it over time, you could use the scheduler to run either highstate or just a specific state. Keep in mind that doing updates unattended tends to be a little dangerous because it could restart services
20:26 kevinforbes numkem: So what’s your highstate command?
20:26 numkem kevinforbes: indeed, also you could write something quick that would send a specific event that would trigger an update
20:26 kevinforbes numkem I’m already running highstate, but it doesn’t update system packages
20:26 hasues left #salt
20:27 iggy kevinforbes: there's also a way to pass args to the bootstrap script via the cloud profiles (and the bootstrap script has an option for updating everything before it installs the minion)
20:28 numkem kevinforbes: if you want to do a full security update without your knowning you might want to go with the update-manager route
20:29 numkem it would show up in your logwatch
20:29 kevinforbes numkem: what’s that?
20:29 forrest joined #salt
20:29 kevinforbes numkem: ok, it’s an Ubuntu package
20:30 kevinforbes numkem: Thanks guys, I’ll look at these approaches
20:30 tomh- joined #salt
20:30 numkem kevinforbes: it's a service included in ubuntu taht is disabled when automated but could be enabled to do it for you. Check out https://help.ubuntu.com/community/AutomaticSecurityUpdates
20:31 Jahkeup joined #salt
20:31 ponpanderer looking at signal_job in saltutils module in 2014.7 it looks as though there's a list data['child_pids'] that is iterated over with os.kill and that 'child_pids' is populated from modules/cmdmod.py run function that pulls it from the job file. are there instances where child pids are not attached to a jid? seems to me this IS supported and should work...
20:32 kevinforbes numkem: thanks again. I think I need to weight the risk of unattended upgrades vs. the risk of using out of date packages
20:32 numkem np!
20:33 numkem kevinforbes: what i would suggest is to use pkg.latest instead of pkg.installed in places were the service wouldn't be restarted since you are already using highstate on a schedule
20:34 numkem kevinforbes: say stuff like openssl if you are using it...
20:36 numkem I still think it's hard to do updates, there is always risk. Maybe pair it with code updates
20:38 Ryan_Lane xf10e: yeah, but then I'm just implementing the logic I want from the module into my state using inferior jinja :)
20:38 madduck murrdoc: at some point, I'd love to know what you dislike about reclass… maybe we can make it better.
20:38 Ryan_Lane https://github.com/saltstack/salt/issues/19480 <-- I just opened a bug to support comparison operators in pkg.installed for apt
20:38 Ryan_Lane hopefully it isn't hard to implement :D
20:40 xf10e Ryan_Lane: some things just aren't possible in jinja. In those cases I tend to write python-states and pre-process the data I then feed in a simplified jinja-template
20:41 * iggy follows
20:41 Ryan_Lane xf10e: I definitely won't use python states :)
20:42 xf10e want an ugly one? take a look at https://github.com/0xf10e/openvswitch-formula/blob/master/openvswitch/init.sls
20:42 Ryan_Lane if I can't do it in yaml/python I either write a custom module or I modify the core ones and upstream the changes
20:42 xf10e checking if an bridge already exist and if an interface is a port of this bridge is just not possible in jinja
20:42 Ryan_Lane err yaml/jinja
20:43 xf10e and yeah, this formula has some code I'd like to see in modules.network ;)
20:43 Flusher joined #salt
20:45 jslatts joined #salt
20:45 Ryan_Lane heh, state/execution modules are way more straightforward than python state files
20:47 dude^2 joined #salt
20:48 xf10e might be, but some things cross the boundaries of a module when you tie stuff together
20:48 xf10e and a module for managing a bridge shouldn't be bothered with the IP-config of said bridge
20:51 xf10e have a nice evening or whatever everyone
20:55 toddnni joined #salt
20:57 utbmxguy joined #salt
21:00 sgregory_ joined #salt
21:01 cpowell joined #salt
21:02 utbmxguy Anyone know if there is a way to have a pillar report out on the last octet of an IP? Is there a split function that can be used or something?
21:06 I3olle joined #salt
21:06 murrdoc madduck:  uh for sure, i forget why i didnt like it, but there was something about it. sorry for the vague comment
21:06 murrdoc do we have a standard gitignore for salt projects
21:06 murrdoc cos we should
21:06 davebarnes left #salt
21:07 jimklo joined #salt
21:07 paha joined #salt
21:08 madduck murrdoc: whenever you remember. I am genuinely interested.
21:08 elfixit joined #salt
21:08 murrdoc madduck:  u got it
21:09 troyready joined #salt
21:09 twellspring joined #salt
21:14 Mso150 joined #salt
21:16 cheus Can salt not be used to install its own library dependencies? I ask because I'm consistently observing behavior where a pip package is installed as part of a highstate run and doesn't appeart to be available to salt until a second highstate run
21:17 ajw0100 joined #salt
21:22 ebauman joined #salt
21:27 iggy cheus: the pip module should force a reload_modules, if you are using something else to install those, you should add that to the state manually
21:27 ajmccluskey joined #salt
21:28 cheus iggy, I'm just using pip but the module in question is consistently unavailable for the rest of that run
21:28 markm_ joined #salt
21:28 cheus iggy, Err, rest of that highstate
21:28 iggy look at reload_modules like I said
21:29 cheus Hi iggy, Which module is that a part of?
21:29 iggy it's a global state option (like watch/listen/require/etc.)
21:30 cheus oh, that's neat.
21:30 cheus is that new?
21:32 iggy no
21:32 iggy just not very well known for some reason
21:33 cheus huh, indeed. I've used this on and off for over three years and didn't know about it -- very helpful though
21:33 cheus Thank you much!
21:35 CaptainMagnus joined #salt
21:38 natewalck joined #salt
21:38 natewalck Afternoon/Morning
21:40 dude051 joined #salt
21:40 stevednd does anyone know if there have been any changes to pythons regex handling? using an online python regex tester this: (^|-)(ftp)\d*$ matches prd-ftp2 just fine, but when I attempt re.match("(^|-)(ftp)\d*$", 'prd-ftp2') I get nothing
21:43 fxhp joined #salt
21:45 robm joined #salt
21:47 Papipo joined #salt
21:48 robm I have a question and would be grateful if someone could help.as I am still very new to this... I hope I am not asking too much of salt...
21:48 shaggy_surfer joined #salt
21:49 madduck stevednd: re.match might be a whole line matcher (vs. search). check docs
21:49 robm I have minions pulling from from another subversion host...using state...is it possible to have it check if there was an update...run a command, and if that was successful, restart a service.
21:52 Mso150 joined #salt
21:53 ebauman robm: You want to have your minions check if there was a subversion update, and then if there was, restart a service?
21:53 ebauman Just making sure I'm understanding you properly.
21:54 iggy listen(_in)?
21:54 cheus Hrm. So I've forced "reload_modules = True" after pip.installed but I'm still being told my state (docker.built) is unavailable until the next highstate run
21:55 robm With one more step in there...I can be very specific what I am doing...
21:55 iggy cheus: paste code
21:55 robm We have minions that run Nagios... They pull their updates from a subversion server...once the update has been done...we manually run "nagios -v nagios.cfg" which is basically a verification check.  If that goes swimingly...restart the service.
21:56 jhauser joined #salt
21:56 iggy robm: does nagios not have a SIGHUP handler to just re-read the config?
21:56 ebauman If you're not able to craft something from existing states, could you use state.cmd?
21:56 robm I know it is asking quite a bit for help on this, but I have been bouncing back and forth through pages in the doc and all the things I have tried have not worked at all.
21:57 iggy robm: paste code too
21:57 ebauman iggy: It does, AFAIK, but it won't pre-flight the configuration.
21:57 iggy code is worth 772 words
21:57 kzx joined #salt
21:57 ebauman And if it reloads bad conf I believe it kills the daemon
21:58 iggy ebauman: unless: nagios -v nagios.cfg ?
21:58 robm didn't see that option...let me look at unless.
21:59 ebauman Yeah, that'd do it, if the return codes are kosher, etc.
21:59 cheus iggy: http://paste.ubuntu.com/9689894/
21:59 iggy or onlyif
21:59 robm honestly, my code is a jumble of mess right now. It would probably just confuse the issue further...let me give that a try and get it in a better format. I have been pointed in the right direction I think.
22:00 iggy forget which one is which
22:00 robm thank you
22:02 aparsons joined #salt
22:02 bytemask joined #salt
22:02 iggy cheus: I think you want the reload_modules on the pip.installed state
22:03 iggy (although I was under the impression pip.installed would set that by default)
22:03 cheus iggy, Saw that roughly 3s after posting. :-p, re-running as we speak
22:03 iggy also, traditionally, yaml uses 2 space indentation
22:04 robawt for a language wrapped around using 4 spaces :)
22:05 MindDrive iggy: I saw your message from last night, was your comment about multi-server (HA) in general, or specifically regarding Salt?  (For the former, I've been a systems administrator for 20 years, so HA is certainly nothing new or difficult to me, but for the latter, well... if something's HA-capable, we usually require it to be configured as such here (and I didn't do the initial configuration, but the person who did spent a lot of time and is
22:05 MindDrive also uncertain what's going on))
22:07 cheus iggy, That worked. I'll admit I'm a bit surprised too that pip didn't force a reload itself
22:07 cheus Thanks again
22:14 beneggett joined #salt
22:14 jimklo joined #salt
22:18 shaggy_surfer joined #salt
22:23 otter768 joined #salt
22:24 hkais joined #salt
22:25 desposo joined #salt
22:29 slimmons joined #salt
22:29 Singularo joined #salt
22:29 Singularo joined #salt
22:29 aurynn I wish it was easier to capture the results of a reactor run
22:29 mosen joined #salt
22:30 slimmons Hey, when I run a command from my master to a minion, such as, salt 'myServer' cmd.run "./ myScript.sh", which user does it run the script as, on the minion?
22:31 hacksepe joined #salt
22:33 slimmons The reason I ask, is because I'm not sure how to answer that question, and I guess that means I'm missing a fundamental piece of knowledge about saltstack, and I'm getting a Permission denied on a 777 script.
22:37 ajmccluskey slimmons: I don't know salt, but one guess would be that the script is 777 on the master but the umask on the minion means the permissions are different when it copies it over.
22:38 slimmons I have salt moving the file over with file.managed, and it's setting the mode to 777, and on the server it's actually 777
22:39 ajmccluskey slimmons: I got nothing else :(
22:40 redzaku joined #salt
22:40 hacksepe hi I'm a salt newbie trying to run salt as a non-privleged user (master and minion).  I have the master and minion accepting keys, but when I run salt-call it does not seem to recognize my config dir.
22:40 hacksepe I get an error:
22:40 hacksepe ln98314[Laird]:infra$ salt-call --config-dir=/work/staging/salt-2014.7.0/etc --master=ln98314.corp.ads "*" test.ping [ERROR   ] Could not cache minion ID: [Errno 2] No such file or directory: '/etc/salt/minion_id' Failed to create directory path "/etc/salt/pki/minion" - [Errno 13] Permission denied: '/etc/salt'
22:40 forrest slimmons: The script would be run as whatever user the salt-minion is running as, usually the root user.
22:41 hacksepe the master and minion and salt-key all work.  I only have the problem with salt-call
22:42 forrest hacksepe: Did you confirm the directories are all properly owned via the instructions here? http://docs.saltstack.com/en/latest/ref/configuration/nonroot.html
22:42 Opti_ joined #salt
22:42 kermit joined #salt
22:43 hacksepe I don't have root privledges on my machine, however I tried changing the directories to paths I do own in the master and minion config files
22:44 hacksepe that seemed to work for master minion and salt-key
22:44 hacksepe does salt-call need separate config?  Or does it read master cnfig file?
22:47 slimmons I'm pretty sure it isn't running the script as root.  I think it's just running it as a standard user since it's getting permission denied.  Is there any way to tell for sure?
22:48 hacksepe ln98314[Laird]:infra$ grep salt-2014 etc/master pidfile: /work/staging/salt-2014.7.0/var/run/salt-master.pid root_dir: /work/staging/salt-2014.7.0 pki_dir: /work/staging/salt-2014.7.0/etc/salt/pki/master cachedir: /work/staging/salt-2014.7.0/var/cache/salt/master sock_dir: /work/staging/salt-2014.7.0/var/run/salt/master     - /work/staging/salt-2014.7.0/srv
22:49 forrest hacksepe: Should just be reading from the confs, maybe salt-call uses a different option in the config, I can't remember.
22:49 forrest slimmons: Well, what user is running salt on the minion? You can re-run your command with -l debug on the end to get debug logs which might provide some more.
22:50 hacksepe ln98314[Laird]:infra$ salt-call --config-dir=XYZ --master=ln98314.corp.ads "*" test.ping WARNING: 'XYZ' directory does not exist.
22:50 hacksepe I have it right according to docs and it seems to be looking at the  path
22:51 forrest what are the perms on /etc/salt?
22:51 forrest maybe it's trying to look in there prior to visiting the config-dir.
22:51 hacksepe those are owned by root, I can't change that
22:51 murrdoc hacksepe: salt '*' cmd.run 'whoami'
22:52 Mso150_y joined #salt
22:52 mosen hiya saltines
22:53 theologian joined #salt
22:54 aurynn when you really want salt events to be rpc, but it's really not
22:54 hacksepe murrdoc: if I run that I get same permission error
22:55 hacksepe if I run salt -c/work/staging/salt-2014.7.0/etc '*' cmd.run 'whoami' it returns with no response
22:55 murrdoc weird
22:56 mattjb joined #salt
22:56 redzaku joined #salt
22:57 iggy aurynn: you and me both
22:57 aurynn iggy, it's so close to being true RPC, but so very far
22:58 hacksepe ln98314[Laird]:infra$ ls -ld /etc drwxr-xr-x 93 root root 12288 Jan  6 15:40 /etc
22:58 hal58th1 joined #salt
22:58 aurynn I'm using salt-call event.fire_master on my minions, and I'd love to be able to get a response to my minion
23:00 iggy aurynn: maybe something with wheel?
23:00 aurynn wheel?
23:01 paulm- joined #salt
23:01 iggy I don't think I can be more useful... I don't know much about it... but from what I understand, that's what it's kind of for
23:01 aurynn I've not heard of this before
23:01 iggy (NOTE: my understanding of wheel and what you are trying to do may be completely wrong)
23:02 tafa2 joined #salt
23:02 aurynn currently I'm trying to write a commandline wrapper for a salt-event call
23:03 aurynn and it'd be great to get a response
23:03 iggy forrest: did you look at that PR yet? Seem reasonable? I just feel like I missed something in there
23:03 hacksepe murrdoc: sorry didn't notice my minion was down  this time it worked
23:03 iggy aurynn: oh, yeah, I misunderstood what you were trying to do
23:03 hacksepe ln98313.corp.ads:     True
23:03 murrdoc :) yay
23:04 aurynn iggy, it looks like I can use returners, if I can get the jid of the spawned task to the minion
23:04 hacksepe Thanks!
23:04 hacksepe so what is the difference between salt and salt-call?
23:04 aurynn iggy, monitoring the possible end results seems... meh.
23:04 mosen joined #salt
23:05 forrest iggy: I'll look now
23:05 aurynn 'cos if it errors then I eventually just time out
23:06 Ryan_Lane joined #salt
23:06 iggy hacksepe: salt you run from the master (and target the minions), salt-call you run on the minion
23:07 jimklo joined #salt
23:08 fishdust joined #salt
23:09 hebz0rl joined #salt
23:09 forrest iggy: only issues I see are https://github.com/saltstack-formulas/aptly-formula/pull/8/files#diff-a9a77463c6806ddfc04e60f9e1b35469R17 since it could cause issues for users who don't want to update. Also for https://github.com/saltstack-formulas/aptly-formula/pull/8/files#diff-a9a77463c6806ddfc04e60f9e1b35469R23 we should still specify the name there in case a user needs to change it.
23:09 forrest Other than that it looks solid
23:11 iggy but we need the lastest to pull in the nightly if someone already had the old version installed
23:12 iggy I don't really understand your second comment
23:14 forrest so for the first one you could just modify the if/else statement to handle pkg.latest, versus pkg.installed. for bzip2, imagine I have some stupid custom bzip I roll for my org, because, well we need bzip2, it's just being consistent across the formula to specify the name.
23:14 iggy I didn't change that though
23:15 iggy I don't have a problem changing that, but... seems like it should be a completely separate change
23:16 iggy hmm, the line after I did change... I guess that's really a bug fix that snuck in? I don't remember changing that
23:21 cheus joined #salt
23:23 ckao joined #salt
23:29 jhauser joined #salt
23:30 foulou joined #salt
23:46 murrdoc joined #salt
23:51 forrest iggy: Sorry I got distracted working on some stuff. Yeah it was just something I noticed *shrug*
23:57 dardis joined #salt
23:59 ajmccluskey Is there a way to specify dependencies for windows packages? I can't seem to find one.

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