Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-07-08

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

All times shown according to UTC.

Time Nick Message
00:00 ronrib joined #salt
00:00 sgargan joined #salt
00:01 coval3nce joined #salt
00:01 coval3nce Anyone ever see “invalid keyword standard for variable master_type” being thrown by a minion?
00:02 yomilk joined #salt
00:03 JDiPierro joined #salt
00:08 JDiPierro joined #salt
00:12 zer0def joined #salt
00:17 johnkeates joined #salt
00:17 hybridpollo joined #salt
00:34 Furao joined #salt
00:39 baweaver joined #salt
00:40 coval3nce pwd
00:42 twork ls
00:42 tmclaugh[work] joined #salt
00:43 coval3nce i just laughed on that one  ;)
00:43 murrdoc find
00:43 murrdoc who does ls
00:43 murrdoc honestly
00:43 murrdoc so much easier to type find -mindepth1 -maxdepth1
00:44 murrdoc amirite
00:44 twork a colleague once asked me who does find, when locate is always so much faster. teaching moment.
00:44 coval3nce just alias that to ‘ls'
00:44 murrdoc salt has alias capabilities ?
00:44 coval3nce arrg my brain is hurting trying to track down “[ERROR   ] Invalid keyword 'standard' for variable 'master_type’”
00:44 murrdoc or is that something u can do on the os itself
00:46 murrdoc whats the salt version on the two servers ?
00:46 murrdoc coval3nce:
00:46 coval3nce the error is happening on 2015.5.0, 2015.5.1, 2015.5.2, but 2015.5.3 works
00:46 coval3nce of course 2015.5.2 is the one in EPEL right now
00:47 murrdoc ouch
00:47 coval3nce oh i beti know whats up, the minion config is getting generated with different options compatible with 2015.5.3 (salt-cloud version)
00:48 coval3nce and that is a mismatch with what my minions have
00:50 murrdoc yeah
00:51 coval3nce https://github.com/saltstack/salt/blob/2015.5/salt/config.py#L66
00:51 coval3nce i’m getting “standard” in mine
00:52 coval3nce https://github.com/saltstack/salt/blob/v2015.5.3/salt/config.py#L300 bam
00:52 coval3nce vs https://github.com/saltstack/salt/blob/v2015.5.2/salt/config.py#L289
00:52 coval3nce i guess moral of the story, make sure salt-cloud matches the versions on the minions
00:57 subsignal joined #salt
00:59 kevinquinnyo joined #salt
01:00 iwishiwerearobot joined #salt
01:03 agentnoel left #salt
01:05 tmclaugh[work] joined #salt
01:05 ageorgop joined #salt
01:15 kevinquinnyo is the standard way of 'grouping' minions together, for instance a cluster of minions for a specific client typically done by setting pillar variables?  Or is there a better way?
01:16 coval3nce you could use grains or possibly environment variables
01:16 kevinquinnyo it seems inverse to what I would expect -- now in my state file for say, nginx I have to build logic for checking that a pillar variable exists to do something special for a client that is part of a specific group
01:17 kevinquinnyo coval3nce: is that normal?  I'm just learning but it seems like the first thing I want to do is build some grouping of clusters -- and even inheritance from a more general parent group
01:18 coval3nce I’m a bit new myself, but the way i’ve done it is use grains as roles, then key off those in my top to include different states and pillars
01:18 kevinquinnyo wordpress-cluster (parent group) -> specific-client-wordpress-cluster (child, inherits from wordpress-cluster, and does some client specific things), etc
01:19 coval3nce If those specifics are data driven from the pillars, then that would work
01:19 kevinquinnyo coval3nce: thanks, are you setting the grains then?  From what I was reading, grains are supposed to be read-only, and 'gathered' from the hosts, but it looks like you can obviously also set them
01:19 coval3nce Yah you can set them from master, but i set my initial ones as part of bootstrapping a new minion.
01:20 coval3nce i been playing a bit with salt-cloud lately, and use that to bootstrap the /etc/grains via the salt-bootstrap.sh file
01:21 kevinquinnyo the /etc/grains lives on the minions?
01:21 coval3nce That way i define which boxes get which roels in there via grains and match corresponding grains to all states/pillars via each respective top.  I also use the environment minion setting and tie those to gitfs backends for the states/pillars
01:22 bfoxwell joined #salt
01:22 coval3nce Yeah, an /etc/grains can live on the minion, or you can have a “grains” json object in the /etc/salt/minion config file i think.  I mean to say “/etc/salt/grains”
01:23 kevinquinnyo yeah i assumed you forgot the /salt/ dir
01:23 kevinquinnyo intereseting
01:23 thehaven joined #salt
01:23 timoguin joined #salt
01:24 coval3nce If i had different clients i wanted to keep different, i’d prolly use environments, then keep the “base” as anything i wanted to share with all of them
01:24 Viper233 joined #salt
01:24 coval3nce I’d be scared of a minion from one client being changed, and how it has access to other client’s data tho
01:25 coval3nce IF a “client” was really a seperate customer, i’d prolly just have different masters
01:25 kevinquinnyo coval3nce: I'd end up with hundreds of masters that way
01:25 Furao joined #salt
01:26 coval3nce If a client had root (or box compromised) they could play around and swtich the grains/environment settings on  you, and that would be bad
01:26 kal0pr joined #salt
01:27 sgargan joined #salt
01:27 coval3nce I honestly don’t know if there is a good way to protect against that, never thought about it.
01:27 kevinquinnyo yeah for anything that we end up managing with salt, we definitely won't be allowing the client to have root -- sudo at best for specific things
01:27 beauby joined #salt
01:27 kevinquinnyo coval3nce: but that's why I think this categorization seems to be the inverse of what I expect
01:27 quasiben joined #salt
01:28 kevinquinnyo before looking into this I was under the assumption that the master defined the roles of the minions, not the other way around -- it seems like using grains, the minions say "Im an X"
01:28 kevinquinnyo and the master says "OK, then you get Y"
01:29 coval3nce it can be both ways depending on how you want to match in the top files
01:29 kevinquinnyo coval3nce: have you used "nodegroups" at all?
01:30 coval3nce saw this one right? http://docs.saltstack.com/en/latest/topics/targeting/compound.html
01:30 coval3nce Nah I actually haven’t tried those yet.
01:31 kevinquinnyo coval3nce: yup -- I did see that and tested it a bit.
01:31 coval3nce oh wow, maybe nodegroups does exactly what you want
01:32 coval3nce So yeah, you could define your clients with any of those compount matchers as part of node groups
01:33 kevinquinnyo it does seem to do what I want, and you can use the same compound targeting syntax for it, but i thought it seemed strange that it's only defined (as far as i can tell) in the /etc/salt/master and i couldn't find references of people using it.  So I assumed I was "doing it wrong" since it seems like it should be a common problem I'm having
01:33 coval3nce Damn, what would be cool, if you could match on key material
01:34 kevinquinnyo explain?  (thanks for your help by the way)
01:34 coval3nce kevinquinnyo: I was just trying to think of how you’d deal with the non-repudiation - but that is dealt with accepting keys on the master anyway
01:35 coval3nce just be nice ifyou could set a grain that the minion could not change itself (not sure if that is possible)
01:35 kevinquinnyo ah
01:35 kevinquinnyo well i know that you can set pillar variables and as far as i know those are defined by the master
01:36 Furao joined #salt
01:36 coval3nce Sure, but that is top down..im still trying to think what security options are for provisioning nodes with “roles”
01:36 kevinquinnyo so i guess i could define groups using pillar variables, then define nodegroups by targeting them with 'I@'
01:36 c10 joined #salt
01:38 coval3nce I’ll have to play with this nodegroup thing, might be better than provisinoing with roles grains
01:40 kevinquinnyo hm.  in my case, clients will have a set block of ips, so if i could reasonably trust the grain for specific ip ranges assigned to clients, i could organize groups that way too
01:41 coval3nce matching on minion id may help too
01:41 kevinquinnyo isn't that just some sort of hash of the fqdn
01:41 kevinquinnyo i'll have to look into that
01:42 coval3nce i think id is actually hostname by default
01:45 coval3nce but you have to accept the key before it can talk to master anyway
01:45 kevinquinnyo right
01:45 kevinquinnyo so don't set a cron with /usr/bin/salt-key -A -y
01:45 kevinquinnyo ;)
01:45 coval3nce hehe
01:45 coval3nce thats where salt-cloud is cool, if you are building machines new with some cloud provider
01:45 coval3nce it will handle generating and accepting the key for you
01:45 kevinquinnyo we use OnApp
01:45 kevinquinnyo i need to look into that
01:45 coval3nce Meh, dont see that in here https://github.com/saltstack/salt/tree/develop/salt/cloud/clouds
01:46 coval3nce but i dunno what kind of api they expose
01:47 sunkist joined #salt
01:47 kevinquinnyo coval3nce: it might be worth it to build a provider -- onapp does have an api
01:47 kevinquinnyo thanks for the tip on that
01:48 coval3nce Cool man no worries, im only maybe  a month or two into messing with salt myself.
01:48 kevinquinnyo i'm a few days in, hence my confusion
01:49 clintberry joined #salt
01:54 coval3nce heading out, take it easy kevinquinnyo
01:55 kevinquinnyo coval3nce: have a good one!
01:55 kevinquinnyo thanks for the tips
02:01 beauby joined #salt
02:07 hasues joined #salt
02:07 hasues left #salt
02:09 beauby joined #salt
02:14 JoshuaX joined #salt
02:20 beauby joined #salt
02:25 quasiben joined #salt
02:27 DammitJim joined #salt
02:30 favadi joined #salt
02:34 desposo joined #salt
02:35 yomilk joined #salt
02:38 dendazen joined #salt
02:44 ayee Can I identify a salt minion by the IP?
02:48 quasiben joined #salt
02:50 beauby joined #salt
03:01 dimeshake joined #salt
03:05 toastedpenguin joined #salt
03:07 quasiben joined #salt
03:08 scbunn joined #salt
03:09 evle joined #salt
03:10 miker_ joined #salt
03:11 beauby joined #salt
03:14 amcorreia joined #salt
03:20 andygabby joined #salt
03:23 Bryson joined #salt
03:26 ITChap joined #salt
03:26 ITChap Hi
03:27 ITChap when using gitfs, is there any way to see what as been pulled from the repository ?
03:33 c10 joined #salt
03:35 scbunn joined #salt
03:36 Bryson joined #salt
03:41 stanchan joined #salt
03:43 JoshuaX joined #salt
03:44 eccentricson joined #salt
03:44 eccentricson Anyone familiar with the Users formula located at https://github.com/saltstack-formulas/users-formula ?
03:46 CheKoLyN joined #salt
03:47 Nafai joined #salt
03:49 phix what is salt?
03:51 tkharju joined #salt
03:51 aurynn it's a remote execution platform that grew a config management system
03:53 HappySlappy joined #salt
03:53 eccentricson Hey aurynn: any idea why running a state that calls a pillar says succeded: 0  failed: 0?  Obviously, it never ran anything!
03:54 aurynn eccentricson, without looking at the state & pillar in question, no
03:54 aurynn probably something around the runner not finding any states to apply to that node
03:54 eccentricson Would you be willing to take a gander this late into the night?
03:55 eccentricson It's utilizing the users formula I posted a little bit above that's up on Github.  It's got to be something with my pillar, IMO.
03:55 jaybocc2 joined #salt
03:56 aurynn sorry, I don't have time right now :(
03:56 eccentricson No worries! :)
03:59 ITChap joined #salt
03:59 HappySlappy joined #salt
04:01 phix aurynn: I see, and what can I use it for?
04:03 aurynn phix, the stuff you'd use Chef or Puppet or Ansible for, with some extra stuff on top
04:03 phix aurynn: nice, linux compatible?
04:03 aurynn yes
04:04 aurynn phix, extra stuff includes: a messaging bus that your custom programs can use, a reaction system to handle multi-system orchestration
04:05 murrdoc joined #salt
04:06 phix aurynn: nice, does it support AWS / Rackspace / Google / Azura?
04:06 aurynn yes
04:06 aurynn as in, it can drive the APIs for at least AWS as part of the config management
04:07 phix nice
04:07 phix I might look into it
04:07 phix is it included in Ubuntu or Debian repos?
04:08 phix salt-cloud - public cloud VM management system
04:08 aurynn I don't know, I usually install straight from the salt repository
04:08 phix salt-master - remote manager to administer servers via salt
04:08 phix apt-cache search salt seems to think so :)
04:08 eccentricson phix: install salt-master or minion on Ubuntu: http://docs.saltstack.com/en/latest/topics/installation/ubuntu.html
04:09 phix eccentricson: Cheers, and welcome! :)
04:10 hre joined #salt
04:10 eccentricson Cheers! :)  And thank you!
04:10 phix :D
04:12 sarerto joined #salt
04:13 HappySlappy joined #salt
04:23 quasiben joined #salt
04:29 kal0pr joined #salt
04:30 jaybocc2 joined #salt
04:32 CeBe joined #salt
04:34 malinoff joined #salt
04:45 ITChap joined #salt
04:48 ramteid joined #salt
04:53 stoogenmeyer joined #salt
04:55 quasiben joined #salt
04:59 sarerto joined #salt
05:01 catpiggest joined #salt
05:05 cliluw joined #salt
05:06 jaybocc2 joined #salt
05:06 rdas joined #salt
05:09 cliluw joined #salt
05:18 GothAck joined #salt
05:18 iwishiwerearobot joined #salt
05:20 ndrei joined #salt
05:20 prathee joined #salt
05:25 napsterX joined #salt
05:25 prathee hey everyone! good day! :) can somebody pleeeeease tell me why job cache stores details about jobs only wen highstate is run manually and not wen highstate is scheduled say..every 5 minutes...?
05:30 ajw0100 joined #salt
05:31 c10 joined #salt
05:32 kal0pr joined #salt
05:35 khebbie joined #salt
05:41 jaybocc2 joined #salt
05:46 Nazca joined #salt
05:47 jaybocc2 joined #salt
05:50 dopesong joined #salt
05:58 colttt joined #salt
05:58 stoogenmeyer joined #salt
05:59 catpigger joined #salt
06:02 darkhuy joined #salt
06:04 darkhuy_ joined #salt
06:07 spookah joined #salt
06:07 AndreasLutro joined #salt
06:07 sirex joined #salt
06:10 darkhuy joined #salt
06:15 gcfhvjbkn joined #salt
06:22 ITChap joined #salt
06:25 impi joined #salt
06:28 sectionme joined #salt
06:29 ITChap joined #salt
06:33 KermitTheFragger joined #salt
06:41 ndrei joined #salt
06:45 stephanbuys joined #salt
06:53 kal0pr joined #salt
06:55 jaybocc2 joined #salt
06:57 froztbyte if I want to backup some stuff to my master from a state, what's the best way?
06:57 froztbyte the data will be generated on-minion, so I'm not sure if I can use file.managed with the backup parameter
06:58 julienlavergne joined #salt
07:07 iwishiwerearobot joined #salt
07:09 TyrfingMjolnir joined #salt
07:10 kawa2014 joined #salt
07:10 thalleralexander joined #salt
07:11 JoshuaX joined #salt
07:11 jaybocc2 joined #salt
07:11 soren joined #salt
07:13 ITChap joined #salt
07:14 Ztyx joined #salt
07:16 ITChap joined #salt
07:25 darkhuy joined #salt
07:27 gcfhvjbkn joined #salt
07:31 TyrfingMjolnir joined #salt
07:32 desposo joined #salt
07:33 s_kunk joined #salt
07:33 s_kunk joined #salt
07:36 chiui joined #salt
07:37 cliluw joined #salt
07:38 VSpike Ahlee: no worries ... glad it's useful
07:44 lb1a joined #salt
07:46 jaybocc2 joined #salt
07:46 julez joined #salt
07:50 cmb joined #salt
07:50 cmb joined #salt
07:51 pcdummy joined #salt
07:51 pcdummy joined #salt
07:53 harkx joined #salt
07:54 julienlavergne hello guys
07:55 julienlavergne when i launched sudo salt '*' pillar.items I can not get ext_pillar data
07:55 julienlavergne while the call to s3 is correct :/
07:56 Furao ...
08:01 Furao joined #salt
08:02 jaybocc2 joined #salt
08:15 iwishiwerearobot joined #salt
08:16 Xevian joined #salt
08:17 ITChap joined #salt
08:17 ndrei joined #salt
08:19 markm joined #salt
08:21 permalac joined #salt
08:23 linjan joined #salt
08:27 ITChap joined #salt
08:30 keimlink joined #salt
08:36 julez joined #salt
08:44 mick3y froztbyte: if you use file.managed with the backup param the data will be backed up most likely on the minion itself under /var/cache/salt/minion/file_backup/<path>
08:45 mick3y froztbyte: you probably could copy the backup directory onto master
08:45 mks joined #salt
08:46 froztbyte how do I do the latter?
08:46 mick3y froztbyte: I think that I'm thinking about cp module
08:46 mick3y s/about/of/
08:47 mick3y http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html
08:47 froztbyte mm
08:47 mick3y check that out if it meets your requirements
08:47 mick3y froztbyte: from what i remember you will need to enable one insecure option on ur salt master
08:47 froztbyte I'm still not really clear whether modules are nicely usable from states; do they basically just work like execution modules?
08:47 froztbyte yes, there is a setting on the master
08:50 clupeidae joined #salt
08:51 mks hi people, can you help me? I got message Unable to render top file: Unable to render top file. No targets found.
08:51 mks master file_roots:   base:     - /home/salt  /home/salt/top.sls base:   'test-004':    - htop  /home/salt/htop.sls htop:   cmd.run:     - name: 'w'      salt-key -L Accepted Keys: test-004
08:52 jaybocc2 joined #salt
08:53 mks_ joined #salt
08:53 sectionme joined #salt
08:53 mks_ master
08:53 mks_ file_roots:
08:53 mks_ base:
08:53 mks_ - /home/salt
08:53 mks_ /home/salt/top.sls
08:53 mks_ base:
08:53 mks_ 'test-004':
08:53 mks_ - htop
08:53 mks_ /home/salt/htop.sls
08:53 mks_ htop:
08:53 mks_ cmd.run:
08:53 mks_ - name: 'w'
08:53 mks_
08:53 mks_ salt-key -L
08:53 mks_ Accepted Keys:
08:53 mks_ test-004
08:54 mks_ Unable to render top file: Unable to render top file. No targets found.
08:54 Norrland mks_: please use pastebin or gist.github.com
08:54 mks_ what is wrong?
08:54 mks_ sorry, i will
08:55 ITChap joined #salt
08:56 jhauser joined #salt
08:57 yomilk joined #salt
08:59 ITChap any idea ?
09:01 losh joined #salt
09:01 ndrei joined #salt
09:02 mks_ https://gist.github.com/6cb4aff4a1d1e0240637.git
09:08 jaybocc2 joined #salt
09:13 N-Mi joined #salt
09:14 VSpike mks_: I get a blank page there
09:15 mick3y mks_: same here
09:15 ITChap joined #salt
09:15 mick3y mks_: salt 'test-004' test.ping return True ok?
09:16 mks_ True
09:16 dr4Ke joined #salt
09:16 VSpike The indentation looks a bit wrong in the top file there, but that could just be the paste
09:16 mick3y mks_: yeah like VSpike says i'd add couple more spaces before '- htop'
09:16 mick3y mks_: i've seen weird issues when using two spaces for indentation
09:17 mick3y mks_: 4 spaces always worked for me :]
09:17 mks_ trying add spaces...
09:17 VSpike mks_: what about salt 'test-004' pillar.items
09:17 clupeidae joined #salt
09:19 mks_ add spaces, no changes
09:19 mks_ pillar.items  -empty
09:19 julez joined #salt
09:19 khebbie joined #salt
09:20 dr4Ke hi folks, i'm struggling a little with jinja macros inside sls files.
09:20 dr4Ke I would like to define a macro in a separate sls, include this file in another sls one, and call the defined macro in this second file. Is that possible at all?
09:20 dr4Ke When I do this, I got this error message: failed: Jinja variable 'my_macro' is undefined
09:21 mks_ salt-master installed on Debian wheezy (old installation). Eariler there was puppet-server:)
09:23 mick3y mks_: what if on the minion you call 'salt-call state.highstate'
09:23 mick3y mks_: you could probably start salt-master with the -l debug option to get bit more insight on what's happening there
09:24 sectionme joined #salt
09:26 c10 joined #salt
09:26 mks_ on minion salt-call  output the same  that on master
09:28 mks_ debug master https://gist.github.com/2ba629288c1428ad079b.git
09:28 mick3y mks_: you used 4 spaces for indentation everiwhere right?
09:28 mick3y mks_: blank page mate
09:29 mick3y right...it works if i remove the .git part
09:30 mick3y mks_: srv-spb-004 - is this ur salt-master ?
09:31 mks_ no it is test-004 (real name srv-spb-004)
09:31 mks_ understand?
09:33 mks_ debug minion https://gist.github.com/455da53276daffe01ec5
09:35 mick3y no
09:35 prathee joined #salt
09:36 mick3y mks_: ok. you provided different information above
09:36 dr4Ke I just got it right with http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html. I needed to import the macro from the file, not to include the whole file.
09:36 mick3y mks_: use 4 spaces before the 'srv-spb-004' in top.sls file
09:37 mks_ ok try now
09:37 mick3y try what
09:37 mick3y oh the gist?
09:42 mks_ i tried use 4spaces in top.sls no changes
09:42 mick3y weird.
09:42 kal0pr joined #salt
09:43 mick3y what's your minion name (as shown in salt '*' test.ping) ?
09:43 mks_ srv-spb-004
09:44 mks_ minion=srv-spb-004   master=10.0.0.125 (srv-spb-025)
09:44 mick3y now. salt 'srv-spb-004' test.ping returns true, right?
09:44 mks_ forgot about test-004
09:44 mks_ yes
09:45 mick3y salt 'srv-spb-004' cmd.run 'hostname -f' returns something, right?
09:45 mks_ srv-spb-004.corp.asd.com
09:45 mick3y try: salt 'srv-spb-004' state.sls htop
09:46 mick3y btw: make sure that indentation in htop.sls is also 4 spaces
09:46 mick3y can you post htop.sls on gist please?
09:46 sgargan joined #salt
09:46 mks_ salt 'srv-spb-004' state.sls htop    is work fine
09:46 mick3y just wanted to make sure there's nothing weird
09:46 mick3y ok, so that returns output for 'w' command, correct?
09:47 mks_ it return correct data (that i want)
09:48 mick3y mkay
09:48 mks_ why state.highstate       say Unable to render top file: Unable to render top file. No targets found.
09:49 mick3y no idea
09:50 ITChap could someone talk a look to this ? http://pad.yohdah.com/338/3418fc67-6a10-4a2c-afd3-4d523ae08f16
09:50 mks_ i make 4 spaces in top.sls  when reopen top.sls  that 4 spaces=1tab
09:50 mick3y and what if you replace the 'srv-spb-004' with '*' in top.sls ?
09:50 mks_ i use mcedit
09:52 mick3y mks_: try replacing srv-spb-004 with * and see if that works
09:54 froztbyte hrm, so I have all my templates full of {%- %}
09:55 froztbyte yet I still get newlines
09:55 froztbyte often at the start of a block
09:55 froztbyte on 2015.5.2
09:55 froztbyte anyone else experienced this? and/or know that's potting?
09:57 mks_ '*'             Unable to render top file: Unable to render top file. No targets found.
09:57 mick3y mks_: you sure it's state top.sls not for example pillar top.sls ? :-)
09:57 mick3y mks_: stop salt-master, start it from command line with -l debug and run highstate again
09:58 mick3y mks_: maybe that would give you some more information
09:58 jaybocc2 joined #salt
09:59 mks_ top.sls  in base env
10:01 mks_ debug minion https://gist.github.com/34d2a9c293b4a45bc754
10:01 mick3y mks_: one last thing: try stopping the minion, removing it's cache (rm -fr /var/cache/salt/minion/files/) and restarting it
10:01 mick3y mks_: debug from master please
10:02 mick3y mks_: why the hell is there '#' before servername in top.sls ??
10:02 mick3y basepi:
10:02 mick3y #    'srv-spb-004':
10:02 mick3y s/basepi/base/
10:02 mick3y (autocomplete changed that)
10:03 mks_ because then '*'
10:03 mick3y mks_: line 79
10:03 mick3y mks_: ok. mea culpa. nevermind
10:03 mick3y mks_: i missed the asterisk
10:03 mick3y mks_: but stil it looks like the target '*' and the state are in the same line
10:03 mick3y mks_: get your indentation in order
10:04 mick3y mks_: use vim
10:04 mick3y mks_: or instead of tabs in mcedit just hit space 4 times
10:04 mick3y mks_: do you see what i mean?
10:06 mks_ yes, i mean. i don't use tab. use spaces. but when i reopen file it's like tab
10:06 mick3y mks_: use vim then
10:07 mick3y mks_: https://gist.github.com/anonymous/21ff770b986d99d9c070 here's my vimrc
10:07 mick3y mks_: nothing too fancy but it works
10:08 mks_ ok. thank you mick3y. i need go out. Come back in 1 hour
10:08 mick3y same here. will be back in 8
10:08 mick3y good luck
10:08 mks_ :)
10:14 jaybocc2 joined #salt
10:15 daemonkeeper joined #salt
10:16 matthew-parlette joined #salt
10:20 desposo joined #salt
10:26 c10 joined #salt
10:27 giantlock joined #salt
10:29 include joined #salt
10:30 include I guys, what GUI should I use? saltpad? #newInTown #ktxbye
10:33 khebbie joined #salt
10:33 yomilk joined #salt
10:34 ingslovak joined #salt
10:51 jaybocc2 joined #salt
10:55 sunkist joined #salt
11:03 kal0pr joined #salt
11:07 jaybocc2 joined #salt
11:07 giantlock joined #salt
11:07 aqua^c joined #salt
11:09 ksj hi, I'm having trouble tracking down an error. the only thing I get is Rendering SLS failed: Jinja variable list object has no element 0. I'm running the minion with -l debug, and there's nothing in there, nor in the master log
11:12 AndreasLutro joined #salt
11:14 ndrei joined #salt
11:15 yomilk joined #salt
11:39 AndreasLutro joined #salt
11:42 jaybocc2 joined #salt
11:45 _JZ_ joined #salt
11:48 froztbyte for grains that go into /srv/salt/_grains/ (let's say foo.py), can I make use of the salt execution modules inside the grain?
11:48 froztbyte I'm getting tracebacks that make it look like salt/__salt__ don't exist yet
11:48 froztbyte I tried importing some stuff that look like grains/core.py, but no luck thus far
11:54 julez joined #salt
11:55 gcfhvjbkn joined #salt
11:58 jaybocc2 joined #salt
11:58 julez joined #salt
11:59 giantlock joined #salt
11:59 LeProvokateur joined #salt
12:02 JDiPierro joined #salt
12:04 evle joined #salt
12:08 aqua^c joined #salt
12:10 amcorreia joined #salt
12:12 denys joined #salt
12:15 sirex Maybe there is a way to set up masterless minion on a server, something like salt-bootstrap, bot it should setup remote machine, instead of local with possibility to copy configuration files.
12:20 is_null joined #salt
12:21 is_null hi all, if this function is a "state" https://github.com/saltstack/salt/blob/develop/salt/states/file.py#L1019 then what's the name for this http://dpaste.com/01P6W4W ?
12:31 AndreasLutro is_null: circus_initd is a state, which invokes the state function "file.managed" with the args listed
12:33 jaybocc2 joined #salt
12:37 fivmo joined #salt
12:39 kal0pr joined #salt
12:42 DammitJim joined #salt
12:44 is_null AndreasLutro: thanks, that makes sense, but don't that mean that this docstring "Regular files can be enforced with the :mod:`file.managed<salt.states.file.managed>` state." is outdated ? https://github.com/saltstack/salt/blob/develop/salt/states/file.py#L9
12:45 dendazen joined #salt
12:46 furrowedbrow1 joined #salt
12:47 kal0pr joined #salt
12:48 sk_0 joined #salt
12:49 jaybocc2 joined #salt
12:50 subsignal joined #salt
12:50 stoogenmeyer_ joined #salt
12:51 raffomania joined #salt
12:51 is_null AndreasLutro: i'm all for enforcing this distinction, it is imho, the same distinction between a function and a parametrized function call, or the same between a class and an object ^^
12:51 is_null so even if i have to review all docstrings in salt code and make a pr to get this straight it's ok
12:52 thehaven joined #salt
12:52 is_null but even the docs do not make a distinction between states and state functions to my knowledge
12:53 include ,, I guys, what GUI should I use? saltpad? #newInTown #ktxbye?
12:57 _JZ__ joined #salt
12:58 UForgotten joined #salt
12:58 UForgotten joined #salt
12:59 qybl joined #salt
12:59 Furao joined #salt
12:59 raffomania Hi guys, just a short question - can I modify the behavior of a mod_watch state function somehow?
13:00 seblu joined #salt
13:00 zz_cro joined #salt
13:01 lahwran joined #salt
13:01 IOMonster joined #salt
13:01 mummer joined #salt
13:01 eirsyl joined #salt
13:01 desposo joined #salt
13:01 TOoSmOotH joined #salt
13:01 danemacmillan joined #salt
13:03 AndreasLutro is_null: I agree but won't lose any sleep over it :)
13:04 AndreasLutro I think it's fairly obvious from context what it means
13:04 raffomania joined #salt
13:06 JDiPierro joined #salt
13:11 toastedpenguin joined #salt
13:12 OliverMT file.recurse is not picking up an added file one folder down in the hierarchy
13:12 OliverMT any ideas?
13:14 OliverMT ehm, exclude_pat...
13:15 frickler_ joined #salt
13:15 frickler_ hello
13:16 frickler_ what is the difference between saltstack free and enterprise license ?
13:18 icflournoy joined #salt
13:18 cpowell joined #salt
13:18 giantlock joined #salt
13:20 murrdoc joined #salt
13:21 fivmo joined #salt
13:21 fivmo joined #salt
13:23 yomilk joined #salt
13:26 JDiPierro joined #salt
13:27 tkharju joined #salt
13:27 egil joined #salt
13:31 peters-tx joined #salt
13:31 timoguin joined #salt
13:32 JoshuaX joined #salt
13:32 pic0frame joined #salt
13:34 ekristen joined #salt
13:34 djdeaf joined #salt
13:35 djdeaf Hi, When I run salt --failhard state.sls....bla bla, and with batch size of let's say 1 on 2 servers (-L server1,server2) it seems that the --failhard doesn't work. The first server return False on one of the steps, stopping and than moving on to the second servers. Any ideas why? Driving me crazy
13:36 djdeaf I have also tried to add failhard: True to the state's cmd.run but with no success (cmd.run state is the failing state that returns False)
13:37 TyrfingMjolnir joined #salt
13:39 mpanetta joined #salt
13:39 riftman joined #salt
13:40 pdayton joined #salt
13:41 pdayton joined #salt
13:43 jgelens joined #salt
13:44 JDiPierro joined #salt
13:45 scoates joined #salt
13:45 ericof joined #salt
13:46 catpig joined #salt
13:48 tmclaugh[work] joined #salt
13:48 jdesilet joined #salt
13:57 aqua^c joined #salt
13:59 riftman joined #salt
14:01 mapu joined #salt
14:01 desposo joined #salt
14:02 dyasny joined #salt
14:06 andrew_v joined #salt
14:07 pcdummy joined #salt
14:08 Whissi joined #salt
14:09 jaybocc2 joined #salt
14:10 GrueMaster joined #salt
14:16 gcfhvjbkn what is the preferred way to get machine's external ip via grains?
14:17 gcfhvjbkn i used to use ip4_interfaces:eth0
14:17 gcfhvjbkn but now i want to share the same configuration across two different installations
14:17 gcfhvjbkn and one of them 'calls' eth0 venet0:0
14:18 gcfhvjbkn so it would be nice if there was an abstraction above that
14:18 fivmo joined #salt
14:20 murrdoc i would recommend custom grain
14:23 julez joined #salt
14:23 darkhuy joined #salt
14:26 clintberry joined #salt
14:29 TheoSLC joined #salt
14:33 ingslovak joined #salt
14:34 dimeshake joined #salt
14:36 furrowedbrow joined #salt
14:37 murrdoc iggy:  Ahlee:  u around
14:37 murrdoc need brains
14:42 otter768 joined #salt
14:44 amcorreia_ joined #salt
14:47 druonysus joined #salt
14:48 mks_ mick3y: I make new server, install salt-master. All fine, all works. Problem was in old server (i have with it very long fuck)
14:48 rm_jorge joined #salt
14:51 timoguin joined #salt
14:51 napsterX joined #salt
14:56 yomilk joined #salt
14:58 Heartsbane joined #salt
14:59 sectionme joined #salt
14:59 ajw0100 joined #salt
14:59 andygabby joined #salt
15:00 dimeshake_ joined #salt
15:01 bja inside a state sls file during jinja2 template rendering, is it possible to execute a salt module that resides on the minion rendering the state?
15:02 ingslovak joined #salt
15:04 whytewolf bja: yes {%- set varable = salt['module.name'](args to module) -%}
15:04 whytewolf bja: for states the jinja is rendered on the minion.
15:04 bja so I need to use the jinja2 set? i.e. would {{ salt['module.name'](args to module) }} work?
15:04 quique joined #salt
15:05 dfinn joined #salt
15:05 whytewolf it should work. but watch out for formatting
15:06 bja ok. yeah I wrote a module specifically to format a non-standard line in a config file I need to work with.
15:06 julez joined #salt
15:07 sdm24 joined #salt
15:09 TooLmaN joined #salt
15:14 furrowedbrow joined #salt
15:15 primechuck joined #salt
15:16 jhauser joined #salt
15:18 druonysus joined #salt
15:18 PI-Lloyd is there a way of having the salt keys stored in pillar on the salt master opposed to /etc/salt/pki/master/minions/ ?
15:21 gcfhvjbkn i guess there is a reason for this abstraction i had in mind not to be implemented?
15:21 gcfhvjbkn say, server has several interfaces, and the grain has to pick one by some criteria, what would that be?
15:22 gcfhvjbkn absolute ordering comes to mind, but what if some interfaces disappear?
15:22 PI-Lloyd gcfhvjbkn: we use a custom script in _grains to fetch the external IP
15:22 geekatcmu gcfhvjbkn: and *your* ordering may not be the same as mine
15:23 PI-Lloyd we look at external sources first (queryip.co for ex), if that fails we then look at NICs attached to the system
15:23 geekatcmu And then your Linux distribution changes NIC naming.
15:23 geekatcmu And then you have to recognize environments that aren't Linux (Solaris, AIX, WIndows, etc).
15:24 gcfhvjbkn i didn't know about the possibility to use NIC
15:24 geekatcmu So, what you want is *strictly* site specific.
15:26 scbunn joined #salt
15:26 gcfhvjbkn i need to have an external domain to use that, right?
15:27 programmerq joined #salt
15:27 gcfhvjbkn what does the abbreviation stand for anyway?
15:27 djdeaf Hi, When I run salt --failhard state.sls....bla bla, and with batch size of let's say 1 on 2 servers (-L server1,server2) it seems that the --failhard doesn't work. The first server return False on one of the steps, stopping and than moving on to the second servers. Any ideas why? Driving me crazy
15:27 gcfhvjbkn i don't know what it is yeat, but it sure looks better than querying ifconfig
15:27 giantlock joined #salt
15:27 djdeaf I have also tried to add failhard: True to the state's cmd.run but with no success (cmd.run state is the failing state that returns False)  and also to put it in master configuration but nothing seems to work
15:27 whytewolf gcfhvjbkn: are all external ips on the same subnet?
15:28 whytewolf with the same cird?
15:28 whytewolf cidr
15:28 anotherZero joined #salt
15:28 gcfhvjbkn whytewolf: nope
15:28 gcfhvjbkn generally speaking
15:29 whytewolf is the hostname on the systems related to the external ip?
15:30 gcfhvjbkn whytewolf: hm, no
15:30 gcfhvjbkn what do you have in mind?
15:30 whytewolf http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#module-salt.modules.network
15:30 whytewolf using the network module to grab the external ip
15:30 whytewolf in a template
15:30 whytewolf but you have no way of isolating the ip address
15:31 gcfhvjbkn yeah, that's the problem precisely
15:32 jondonas joined #salt
15:33 sdm24 do you want to grab the IP from a dig?
15:33 gcfhvjbkn sdm24: no
15:33 gcfhvjbkn ok gotta go now
15:33 gcfhvjbkn http://pastie.org/private/3hftvfzwinbgfsq7g8owa
15:33 khebbie joined #salt
15:33 gcfhvjbkn this is what i have so far
15:34 gcfhvjbkn i guess you can see what's wrong with this approach
15:34 gcfhvjbkn thanks for the input all
15:34 sdm24 ah sorry, I joined this convo in the middle
15:35 DammitJim joined #salt
15:37 whytewolf gcfhvjbkn: one more question. do you have more than one nic in the server? [more then an external and loopback?]
15:37 sgargan joined #salt
15:37 iggy murrdoc: nope
15:38 murrdoc k
15:39 quasiben joined #salt
15:39 whytewolf ahh damn gcfhvjbkn left. was going to tell him if he only has a single ip [which his script looks like it only checks for] he could just use ip_addrs with include_loopback=false [default]
15:40 SheetiS joined #salt
15:41 iggy murrdoc: what's the problem
15:41 druonysus joined #salt
15:43 murrdoc saltmaster, around 300 vms
15:43 murrdoc sorry saltmaster is a vm
15:43 rc joined #salt
15:43 murrdoc 300 hardwware boxes, need to do saltutil.sync_all,saltutil.refresh_pillar,saltutil.modules, a state that might restart the minion, then highstate
15:43 perrigo joined #salt
15:44 khebbie joined #salt
15:45 iggy I suppose that is killing the master?
15:45 murrdoc yeah
15:45 murrdoc i think runner is the way to go
15:45 aqua^c joined #salt
15:45 murrdoc and i am thinking to —async the highstate
15:46 rc1 joined #salt
15:46 icflournoy joined #salt
15:48 murrdoc scratching my head with this
15:48 murrdoc https://docs.saltstack.com/en/2014.7/ref/clients/index.html#salt.client.LocalClient.cmd
15:48 iggy you don't want to batch it?
15:48 patrek joined #salt
15:49 murrdoc 300 minions, at a batch of 10 is ridiculous
15:49 murrdoc i am thinking cmd(saltutil.sync_all) and saltutil.refresh_pillar, and saltutil.modules
15:49 murrdoc then batch the 'restart state'
15:49 murrdoc then async and returner=syslog the highstate
15:50 JoshuaX joined #salt
15:50 iggy you could do a batch of 25 or 50
15:50 iggy my masters all have ~50 minions and handle that kind of stuff pretty easily
15:50 iggy 2 cpu masters
15:51 murrdoc yeah
15:51 murrdoc not a fan of all this man … salt needs better orchestration
15:51 iggy I agree
15:51 sdm24 So I'm upgrading my minions to 2015.5.2, using salt 'minion' pkg.install salt-minion refresh=True. I'm doing this 1-8 minions at a time, just to be safe. Sometimes, I will get "Minion did not return. [No response]", but salt-run manage.versions shows them as being updated. Should I worry about this?
15:52 fivmo joined #salt
15:52 iggy sdm24: that means the minion restarted before it returned the data to the master
15:52 iggy for something like that it's probably safe to ignore (so long as it comes back up and shows the expected version)
15:53 sdm24 It just seems strange that it only happens some of the time, even though the minions are using the same OS and version (Ubuntu 14.04)
15:53 iggy murrdoc: why do you need to do this to 300 minions at once? Can you not do some of this stuff via reactor (i.e. event driven)
15:54 murrdoc how do u say
15:54 iggy sdm24: timing is all... sometimes the minion fires off the return data before it restarts, sometimes it doesn't
15:54 sdm24 ah ok, thanks for clearing it up
15:57 murrdoc iggy:  how do u recommend the reactor thing
15:58 druonysus joined #salt
15:59 clintberry joined #salt
15:59 murrdoc like a cmd.run ' salt-call event.send TAG'
16:00 iggy murrdoc: I don't really know what you're trying to achieve other than doing a lot of stuff that a highstate already does before restarting and running a highstate
16:00 murrdoc highstate doesnt refresh pillars or modules or sync_all
16:01 pdayton joined #salt
16:02 murrdoc salt.exceptions.EauthAuthenticationError: Failed to authenticate!  This is most likely because this user is not permitted to execute commands, but there is a small possibility that a disk error occurred (check disk/inode usage).
16:02 murrdoc man
16:04 iggy highstate does all that stuff
16:05 iggy it would be effectively useless if not
16:05 raffomania iggy: highstate does refresh_pillars?
16:05 murrdoc i think u wrong
16:05 murrdoc lets look at this code
16:06 iggy let me know what you find out
16:06 jalbretsen joined #salt
16:11 phpdave11 joined #salt
16:12 murrdoc https://github.com/saltstack/salt/blob/2014.7/salt/state.py#L2150
16:13 murrdoc yeah it doesnt
16:13 murrdoc https://github.com/saltstack/salt/blob/2014.7/salt/state.py#L2873-L2877
16:13 murrdoc calls get_top
16:13 murrdoc man u tripping
16:13 murrdoc or i am
16:13 murrdoc not sure
16:14 khebbie joined #salt
16:17 murrdoc iggy:  ?
16:22 pdayton joined #salt
16:25 raffomania1 joined #salt
16:26 raffomania is there a way to pass parameters to a mod_watch function?
16:27 jaybocc2 joined #salt
16:27 djdeaf joined #salt
16:30 stoogenmeyer_ joined #salt
16:32 UtahDave joined #salt
16:33 ljt joined #salt
16:34 pguinardco joined #salt
16:35 clintberry joined #salt
16:36 zilla joined #salt
16:36 ageorgop joined #salt
16:36 fivmo joined #salt
16:36 fivmo joined #salt
16:42 ericof joined #salt
16:42 zilla left #salt
16:42 quique how do you target using grains in orchestrate?
16:42 whytewolf quique: - tgt: 'grain' - tgt_type: grain
16:42 otter768 joined #salt
16:43 quique whytewolf: thanks
16:43 murrdoc joined #salt
16:43 whytewolf quique: http://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html this does have an example with grains on the page
16:44 whytewolf http://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html#more-complex-orchestration
16:45 quique yeah i read that but i guess i didn't remember that part
16:45 yomilk joined #salt
16:47 druonysus joined #salt
16:47 druonysus joined #salt
16:48 aparsons joined #salt
16:48 stanchan joined #salt
16:49 clintber_ joined #salt
16:51 quique whytewolf: on that page where there is a require under that the prefix is salt: i've see pkg, file, etc but what does that 'salt' mean?
16:51 KyleG joined #salt
16:51 KyleG joined #salt
16:53 whytewolf quique: salt refers to salt.functiona and salt.state that is used in orchenstrate
16:53 ingslovak joined #salt
16:54 quique so salt: can be either of those?
16:54 whytewolf yes
16:54 iggy it refers to the lines below that "webserver_setup:\n  salt.state"
16:54 iggy so the salt in salt.state followed by the id (webserver_setup)
16:59 bhosmer_ joined #salt
17:02 theologian joined #salt
17:06 Ahlee iggy: it syncs, but changes aren't immediately available
17:06 Ahlee if you change _module/foo.py, apply highstate to sync _module/foo.py and during that highstate call a state that runs _module/foo.py it will run the foo.py that was present when highstate began, not hte one synced over during highstate
17:07 Ahlee you have to sync, stop, run
17:07 Ahlee murrdoc: That's what you're fighting too, correct?
17:07 murrdoc Ahlee:  hating it
17:07 Fiber^ joined #salt
17:07 murrdoc gonna write a runner
17:07 khebbie joined #salt
17:08 JoshuaX joined #salt
17:08 Ahlee that's a good test case though, see if we still have that issue on 2015.5
17:08 * Ahlee does it now
17:09 onewheelskyward joined #salt
17:10 icflourn1y joined #salt
17:10 iggy never had a problem with it, but if you went and read code to see, I trust you
17:11 iggy I still think if you are having problems with running highstate on 300 minions you're probably doing something wrong
17:12 Ahlee I have not read code. I only have experience that this is how it works (on 0.17.ahlee0
17:12 Ahlee and i have no problems with highstate, just highstate when somehting changes ;)
17:13 JDiPierro joined #salt
17:15 viq joined #salt
17:16 khebbie joined #salt
17:16 jonher joined #salt
17:16 pullphinger joined #salt
17:18 murrdoc iggy:  what could i be doing wrong
17:18 murrdoc i have custom modules, grains, states
17:19 primechuck joined #salt
17:23 KyleG1 joined #salt
17:24 dfinn1 joined #salt
17:28 gladiatr joined #salt
17:29 penguin_dan joined #salt
17:34 aqua^c joined #salt
17:35 quique joined #salt
17:41 JoshuaX joined #salt
17:42 donmichelangelo joined #salt
17:43 spookah joined #salt
17:44 donmichelangelo joined #salt
17:45 hasues joined #salt
17:45 hasues left #salt
17:46 jonlangemak joined #salt
17:46 yomilk joined #salt
17:47 jonlangemak Anyone out there have any luck getting the prereqs for docker (PIP namely) working on Centos?
17:47 jonlangemak I get docker-py, and I upgrade six.  But then I need to restart the salt-minion for the docker states to work
17:49 Gareth murrdoc: So I have a mostly working Salt runner for configuring Reactors :)
17:50 murrdoc Gareth:  SHARE (if possible)
17:50 Gareth of course.  cleaning up, then PR.
17:52 rodr1c joined #salt
17:53 ajw0100 joined #salt
17:54 michelangelo joined #salt
17:55 iggy jonlangemak: in your state that does the docker-py install use reload_modules: True
17:55 jonlangemak Yeah
17:55 jonlangemak iiggy:  It does
17:56 jonlangemak Iggy: Yeah, I’ve tried putting that on each of the states.  The one that does docker-py, six, and the pip install itself
17:56 iggy (not really sure why pip doesn't do that by default)
17:56 jonlangemak Thing is, all I need to do is restart the salt-minion service after running the state and it all works
17:56 murrdoc next slowest thing i gotta figure out is how to tell apt to not apt-get update on EACH repo thats added
17:57 Bryson joined #salt
17:59 baweaver joined #salt
18:00 iggy refresh_db
18:01 iggy but then you're stuck either tracking all of them and making sure you run a update before you install anything
18:01 iggy or putting them all together and leaving the refresh off the last one
18:02 iggy jonlangemak: what version of salt?
18:02 murrdoc u know if mod_aggregate can work with pkgrepo
18:02 iggy murrdoc: I bet the salt devs would accept a PR that did something similar to what they did with pkg.* (collect them all up and run them at the beginning of the state run)
18:03 * murrdoc looks for time
18:05 iggy interns
18:05 iggy or the entire AOL dev dept
18:05 * iggy runs
18:05 murrdoc HAH
18:09 patrek joined #salt
18:14 izibi joined #salt
18:14 spookah joined #salt
18:16 khebbie joined #salt
18:17 baweaver joined #salt
18:17 patrek joined #salt
18:21 SaltyCharles joined #salt
18:21 chiui joined #salt
18:32 yota joined #salt
18:43 otter768 joined #salt
18:46 sectionme joined #salt
18:46 Nafai joined #salt
18:51 denys joined #salt
19:00 mks1945 joined #salt
19:03 johnBe_ joined #salt
19:05 johnBe_ Hello guys, I have little question. on a private Cloud platform, we spawn new VMs from a template which has a minion already installed. From what I understand, the minion can start automatically and contact the salt master to register itself. BUT before being usable, the minion has to be accepted on the master. Is that true? If yes, can it be performed programmatically ? through the WebApi for instance. Since we have in an autoscalin
19:05 johnBe_ any human interaction
19:07 gcfhvjbkn joined #salt
19:08 julienlavergne joined #salt
19:10 KyleG joined #salt
19:10 KyleG joined #salt
19:12 iggy johnBe_: yes, the docs have an example of using the reactor to accept keys (you can also use autosign)
19:12 mks1812 joined #salt
19:12 iggy or open_mode for that matter
19:12 iggy they have varying levels of security
19:13 iggy you can generally assume that the more secure, they harder it'll be to config
19:13 gcfhvjbkn joined #salt
19:13 johnBe_ thx iggy, I'll try to find it. The doc is either messy or incomplete but with your keywords, I should be able to find something
19:13 johnBe_ thanks a lot
19:13 davidone_ joined #salt
19:14 quasiben joined #salt
19:14 iggy http://docs.saltstack.com/en/latest/topics/reactor/index.html#a-complete-example
19:14 johnBe_ I should marry you :)
19:16 arnoldB joined #salt
19:17 lpmulligan joined #salt
19:21 jhauser joined #salt
19:23 aqua^c joined #salt
19:27 baweaver joined #salt
19:29 iggy "Salt will sync all custom types (by running a saltutil.sync_all) on every highstate."
19:29 iggy murrdoc: Ahlee: is that not true anymore? If not, the docs probably need to be updated.
19:29 murrdoc i dont see it in the code
19:29 hybridpollo joined #salt
19:29 iggy me either
19:29 murrdoc basepi:  "Salt will sync all custom types (by running a saltutil.sync_all) on every highstate."
19:29 murrdoc is this true ?
19:30 murrdoc OR IS THE CAKE A LIE BASE PI
19:31 iggy I see something about sync_all in load_dynamic, but it looks like it only applies to autoload_dynamic_modules: True case
19:31 iggy https://github.com/saltstack/salt/blob/2014.7/salt/state.py#L2429
19:31 iggy does that look like a useless if statement?
19:33 murrdoc thats a beautiful if
19:33 mick3y|afk mks_: glad it worked!
19:33 iggy oh yeah, autoload_dynamic_modules defaults to true, call_highstate calls self.load_dynamic which does all the refreshing
19:35 yomilk joined #salt
19:35 * murrdoc is confused
19:35 murrdoc doesnt look like it works
19:35 murrdoc but it does ?
19:36 iggy doesn't do a refresh_pillar like I thought, so yeah
19:36 iggy 50/50
19:37 murrdoc and does the grains only if 'grains' was diff ?
19:37 iggy looks more like a version check to me
19:38 iggy grains is always going to be in the return (in every version of salt I've seen)
19:38 iggy it'll be present but empty
19:41 hamburglar joined #salt
19:43 aboe joined #salt
19:44 aboe did anybody test the source: salt:// {{ slspath }}/ on salt develop or salt 2015.8.0rc1 ?
19:46 aboe left #salt
19:46 aboe joined #salt
19:55 lb1a joined #salt
20:02 druonysuse joined #salt
20:05 quique here is my orchestrate sls file: http://fpaste.org/241594/ it works without the if statement and loop, but gives me the error: Rendering SLS 'base:orchestration.commonorch' failed: Jinja syntax error: expected token ':', got '}'; line 10 with the loop.  What colon and I missing?
20:06 KyleG1 joined #salt
20:07 iggy quique: you don't have to use {{ }} inside {% %}
20:07 quique ok good to know
20:07 quique is that the problem?
20:07 bastiandg joined #salt
20:09 iggy I think it's actually on line 18
20:09 iggy {{ grains_dict['ebs_volumes']volume}}['lineage_tag']
20:09 iggy what's that?
20:09 sdm24 How would I output a list of minions from the mine? I am running a script and I need a comma-seperated list of all of the minions that fit certain requirements
20:10 iggy sdm24: something like: {%- for hostname in salt['mine.get']('G@roles:reg and G@roles:primary', 'network.get_hostname', 'compound') %}
20:11 quique iggy: hmm the paste took the two {{ off
20:11 sdm24 Oh ok that makes sense. I guess I need to have a nested for loop just for that list
20:11 iggy <3 gist
20:11 quique iggy: should be {{ volume }}
20:12 iggy still not clear
20:12 sdm24 iggy: actually the nested for loop won't work. I'll make a gist with what I'm trying to do
20:13 dopesong_ joined #salt
20:13 quique iggy: click raw code
20:13 quique i'm trying to place the volume var
20:13 quique in the code
20:13 quique from the loop
20:13 Ahlee gah.
20:14 Ahlee pillar.raw is stale, again
20:14 quique iggy: does that make more sense?
20:14 iggy quique: to what end? What is an example of what you expect to see there?
20:14 N-Mi joined #salt
20:14 N-Mi joined #salt
20:14 quique volume1
20:14 quique then volume2
20:14 quique etc
20:15 iggy {{ grains_dict['ebs_volumes'][volume]['lineage_tag'] }}
20:15 iggy something like that maybe?
20:15 quique yeah
20:15 iggy is it supposed to be a dict lookup?
20:15 quique yup
20:15 iggy try that
20:15 quique trying
20:16 iggy inside jinja tags, it gets quite pythonic
20:16 pppingme joined #salt
20:18 iggy I wonder if Boron will be out this year or if it's scheduled for next year
20:18 basepi murrdoc: the cake might be a lie, turns out I'm not infallible. ;)
20:19 iggy *cough*compound mine lookups*cough*
20:19 spookah joined #salt
20:19 iggy but in all seriousness, I think we found where the sync takes place
20:19 sdm24 https://gist.github.com/sdm24/9279a1f7d0326e4badf9 here's what  I have. This works, but it will run the script once for each out-of-date minion. I want it to run the script once, using all out-of-date minions as an argument
20:20 Ztyx joined #salt
20:20 murrdoc basepi:  honest question tho, what does highstate do
20:20 iggy it's just gated by an odd looking option that happens to default to True
20:20 sdm24 Since the script takes 90 seconds to run (to make sure the minions are fully upgraded), it can really add  up for a lot of minions
20:20 murrdoc basepi:  cos it may or may not sync_all and refresh_pillars
20:20 Edgan How do I get the output of salt-call to look just like the salt command? salt-call tells me every little thing it did, instead of the status of each state. I tried "salt-call --retcode-passthrough --out=highstate state.highstate", but it is still giving me the normal output.
20:21 aboe basepi: I think I stumbled upon an issue with develop version, with file recurse
20:21 basepi murrdoc: My brain says it should do both those things. It definitely refreshes pillars
20:21 basepi aboe: sounds like bug waiting to be filed. =)
20:21 aboe basepi: it doesn't strip the | in file recurse, and creates a cache dir |salt
20:21 basepi Interesting...
20:21 aboe yes but can somebody confirm?
20:22 aboe i have /var/cache/salt/minion/files/base/|salt
20:23 murrdoc basepi:  iggy and i reviewed code and it turns out it might only do a sync_all , if configured to do so
20:23 basepi murrdoc: configured by default would be my assumption
20:23 murrdoc yeah but we cant find where it does the refresh pillar
20:23 basepi aboe: certainly sounds like a bug in the is_cached part of the fileclient
20:23 iggy sdm24: {% set servers = salt['mine.get']('roles:brkr', 'network.get_hostname', 'grain').join(' ') %}
20:24 basepi But I don't have time to test at this second
20:24 iggy sdm24: or something similar
20:24 hal58th joined #salt
20:24 aboe basepi: that's where I was looking but couldn't find the right reference for the bug report,
20:24 basepi murrdoc: I don't have time to track it down at the moment. But if you put an error in a pillar file your highstate will fail
20:24 aboe I'm testing with some custom state to see if I can reproduce
20:24 basepi Cool
20:25 sdm24 Thanks iggy
20:26 murrdoc basepi:  not in an external_pillar, it just keeps on going
20:27 aboe basepi: found it, it's the file.recurse clean: True option
20:29 basepi murrdoc: I haven't done a lot of testing in external_pillar
20:29 basepi but if errors in external pillar don't stop a highstate, we should probably fix that
20:29 aboe basepi: only referencing clean option is enough in file.recurse
20:29 basepi I was specifically thinking the /srv/pillar/ pillar
20:29 basepi aboe: so if you do clean:True then it doesn't strip the file properly?
20:30 murrdoc basepi:  it doesnt, have to write a state to validate it in the top.sls
20:30 murrdoc is pain
20:31 aboe basepi: ah, sorry clean is true isn't the culprit, it's template: jinja in file.recurse
20:31 aboe I will file a bug
20:31 baweaver joined #salt
20:32 giantlock joined #salt
20:33 quique iggy: so that worked for the jinja the final rendering looks like this; http://fpaste.org/241605/ but they both fail and I see this critical error: http://fpaste.org/241606/
20:33 quique it's asking me to open an issue
20:33 quique is that a bug?
20:35 iggy could be, is this with regular salt or salt-ssh?
20:35 Gareth murrdoc: fyi, https://github.com/saltstack/salt/pull/25261
20:35 Ahlee hrm. i wodner how much i'd break if i changed saltutil.refresh_grain/refresh_pillar to return the changed value(s) instead of returning None
20:35 quique regular
20:36 yomilk joined #salt
20:36 murrdoc Gareth:  u the man
20:36 iggy Gareth: one says reactors one says reactor... on purpose?
20:39 iggy quique: clear your cache dir and try again
20:39 sdm24 So the specific issue I'm having with https://gist.github.com/sdm24/9279a1f7d0326e4badf9 is that I should only run the script for servers that are running a wrong version, not just for all servers. As my script currently is, it will run the script but only one minion at a time. I want it to run the script "/srv/salt/misc/winupgrade/script-upgrade 'minion1,minion2,minion3'" etc
20:40 Gareth iggy: where?
20:40 sdm24 but not include minion4 if it is up to date
20:40 iggy Gareth: if 'reactors' not in opts:   ...   if 'reactor' in self.opts:
20:41 murrdoc how would u guys do this in salt-y ways
20:41 * Gareth looks
20:41 quique iggy: on the master or minion?
20:41 iggy quique: try both? (although I suspect minion)
20:41 Gareth iggy: ahh. good catch.  Thanks.
20:41 LV-426 given a pure python sls, is it possible to generate it's equivalent yaml representation?
20:42 Gareth that code in config.py isn't necessary iirc.
20:43 iggy LV-426: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#module-salt.modules.state  state.show*
20:44 iggy not exactly yaml, but...
20:44 LV-426 good enough, thanks
20:44 otter768 joined #salt
20:44 murrdoc https://gist.github.com/anonymous/54763fa345c52134578f needs to be a runner, hopefully  something i can pass in the state for
20:45 murrdoc post reboot state
20:46 quique iggy: still fails.  the debug out put is: 'mount_volume1' __virtual__ returned False
20:46 quique what's that __virtual__?
20:47 murrdoc magic word
20:48 iggy quique: try changing arg: to name?
20:50 basepi aboe: thanks sir
20:50 quique iggy: that doesn't work either
20:51 basepi murrdoc: definitely file a bug about highstate not stopping for external pillar errors.
20:51 quique iggy: if I shorten the dictionary so there's only one and change the name to cmd.run it works
20:51 aboe basepi: no problem ran into this one because of salt-formula uses this file.recurse seutp
20:51 iggy quique: leave arg how it is and add "    - name: cmd.run" below both salt.function lines
20:51 * basepi nods
20:53 quique iggy: ok that worked with a dictionary with just one entry, trying with two
20:56 quique iggy: that worked! how can they both have the same name?
20:56 quique and why does that name matter?
20:57 SheetiS murrdoc: you could put that all in an orchestrate runner and then pass the args via a pillar at the CLI.
20:57 iggy the ID is what has to be unique
20:57 murrdoc SheetiS:  how do i pass in a minion id to the orchestrate
20:58 quique murrdoc: - pillar?
20:58 murrdoc minion id ?
20:59 quique - pillar: { target_server: {{ data['id'] }} }
20:59 quique murrdoc then in the orchestrate i do: {% set target = salt['pillar.get']('target_server') %}
21:00 SheetiS murrdoc: https://bpaste.net/show/ed266df9041d is an example
21:00 SheetiS then I just pass those pillar args via the cli (or actually via a reactor in my env)
21:01 quique iggy: so do all salt.function need that name: cmd.run?
21:02 iggy quique: if it's running a command, it could also be any other module function (mine.update saltutil.sync_all, etc.)
21:02 whytewolf quique: - name is what module that salt.function is going to call. instead of putting the function in the ID
21:04 patrek joined #salt
21:04 quique iggy, whytewolf: ok i get it, wish that was explained in the docs, I can't find anywhere they shows you the arguments for orchestrate
21:05 iggy the runners module docs maybe
21:05 iggy I think most of us have just kind of worked it out via examples and trial and error
21:05 itru joined #salt
21:05 whytewolf and a bit of logic. since - name has a simalar use in state files
21:07 hasues joined #salt
21:07 quique but for salt.state in orchestrate you need sls:
21:07 hasues left #salt
21:07 patrek joined #salt
21:08 druonysuse joined #salt
21:08 whytewolf quique: not exatly. you can run - highstate: instead of a single sls
21:09 patrek joined #salt
21:10 quique whytewolf: yeah i have read that, but you are referring to how you need to include cmd.run for shell commands in a regular state files right?
21:11 mens joined #salt
21:11 aqua^c joined #salt
21:13 NotAvailable joined #salt
21:13 patrek joined #salt
21:14 whytewolf quique: here have a crappy example. https://gist.github.com/whytewolf/b0887ceb472f92550df6
21:15 whytewolf [this was writen against develop, the neutron.create_network doens't take all those args yet.
21:15 patrek joined #salt
21:18 quique whytewolf: hmm that's helpful, so would it make more sense if i wrote my own function?
21:18 zer0def joined #salt
21:19 whytewolf a custom module might get you a bit more control. and less having to twiddle around with orch.
21:19 sdm24 well I solved my problem, although its a very hack-job solution
21:20 sdm24 I have the master use file.manage to update a one-line script with the building list, then {% endfor %}, then cmd.script to run the one-line script that calls a different script
21:22 Rockj joined #salt
21:24 patrek joined #salt
21:24 itru joined #salt
21:26 iggy mmmm, hack job
21:26 JoshuaX joined #salt
21:26 LtLefse I'm trying to do (what I think is) a simple orchestrate job
21:26 LtLefse for syncing out users
21:26 LtLefse when I run the states manually against my nodegroups (e.g. with salt -N ...) they work fine
21:27 LtLefse but when I run the orchestrate job, it fails on random nodes with ... odd errors
21:27 LtLefse https://gist.github.com/jvestrum/061feaea8d6063173d22
21:28 LtLefse "?[01;31mData failed to compile:?[0m"
21:29 LtLefse anyone else ever see anything like that?
21:33 LtLefse 2015.5.2 on all nodes, btw
21:33 patrek joined #salt
21:35 patrek joined #salt
21:36 yomilk joined #salt
21:37 baweaver joined #salt
21:40 furrowedbrow joined #salt
21:42 clintberry joined #salt
21:42 itru joined #salt
21:44 lpmulligan joined #salt
21:47 clintber_ joined #salt
21:51 theeldest joined #salt
21:57 itru joined #salt
21:57 baweaver joined #salt
21:57 pcn Can I get salt's git state to use an ssh agent for auth to github?
22:02 iggy doubt it
22:07 druonysuse joined #salt
22:09 ingslovak joined #salt
22:10 X67r joined #salt
22:12 ingslovak hey guys, does anyone know whether it is possible to have two identical ID matchers in the topfile? for example, '*': - some.state and then later '*': -other.state
22:13 ingslovak i mean, it doesn't work in that form, but maybe there is a workaround or a directive
22:13 michelangelo joined #salt
22:17 slav joined #salt
22:17 slav hi is it possible to have osx minions/nodes with salt?
22:18 iggy ingslovak: why would you want to put them in different locations?
22:19 iggy ingslovak: and probably not directly, but you could probably closely approximate it with compound matchers '* and G@os:*' or something
22:19 geekatcmu "brew install salt"
22:19 geekatcmu done
22:19 iggy slav: yes
22:19 geekatcmu Er, "brew install saltstack"
22:19 dendazen joined #salt
22:20 ingslovak iggy: the thing is they're generated by jinja from two different files that both contain compound matchers. and occassionally, the same matcher may be present in both.
22:20 slav is it not just for salt master only?
22:20 iggy ingslovak: no, that's just how yaml works
22:20 ingslovak iggy: nice one with the compound, thanks
22:21 slav i want to have osx minions connected to the existing master server
22:21 iggy I actually kind of doubt a master would run on osx
22:21 iggy it's spotty on *bsd
22:22 iggy and only officially supported on Linux afaik
22:22 slav ok .
22:23 slav one more question . is it possible to have windows minions connected via salt-ssh  command??
22:23 slav like agentless mode or so
22:23 napsterX joined #salt
22:24 iggy no
22:24 iggy well, I doubt it without some work
22:24 murrdoc figured it out
22:24 iggy you need a ssh server running for salt-ssh
22:24 murrdoc salt/aut/pend request, validate minion, add to queue
22:24 murrdoc have a runner watch that queue and run through some states and put in another queue
22:25 murrdoc have a runner watch that queue and run through some states and put in 2 queu
22:25 iggy is that new guy you're hiring going to have fix all this stuff when he starts?
22:25 murrdoc and ladifucking guy
22:25 murrdoc fix ?
22:25 murrdoc this is the right way fool
22:25 slav like ansible - you just have to install powershell 3+ to manage that host
22:25 hybridpollo joined #salt
22:26 iggy slav: that wouldn't be salt-ssh then, that'd be salt-powershell-remote (or something)
22:26 iggy and there's nothing that says that couldn't be written
22:26 iggy it just hasn't been written yet
22:27 iggy actually kind of sounds like a good idea, you should search/open a feature request
22:27 murrdoc iggy:  whats wrong with my plan
22:27 murrdoc which is awesome btw
22:27 iggy a runner watch the queue how?
22:28 slav the thing is that not eveyone want to spend time on installing the agent software
22:28 murrdoc scheduled job
22:28 murrdoc every 5 minutes for the 'prep runner'
22:28 murrdoc every 20 for the 'provisioning running'
22:28 iggy slav: then they can continue managing their windows hosts the way they've been doing it and just use salt-ssh on the Linux hosts
22:29 slav with powershell once installed you technically don;t have any agent software ro be updated
22:29 iggy murrdoc: without knowing more, it sounds like you have a working but probably not optimal solution
22:29 * iggy hates schedules for things
22:29 slav i was searching for some msi packaged I could deploy in our AD
22:30 slav but I did't find enything
22:30 iggy you could convert the normal installer to an msi
22:30 iggy or open an issue asking for one to be generated alongside the exe installer
22:31 baweaver joined #salt
22:34 iggy (which would require switching away from nsis installer, so a bigger project than I made it sound initially)
22:41 slav ok I will
22:41 slav tnx
22:41 iggy lol, can't even install the new rc
22:43 KyleG joined #salt
22:43 KyleG joined #salt
22:45 bfoxwell joined #salt
22:45 otter768 joined #salt
22:48 jaybocc2 hey guys
22:48 jaybocc2 is there way to import modules into pyrender sls files?
22:49 geekatcmu #!jinja|py
22:49 geekatcmu Then your {% import ... %} works just fine
22:49 geekatcmu That said, it still makes me cranky to do it.
22:49 geekatcmu Of course, some people might point out that I'm *usually* cranky
22:49 iggy import python modules?
22:50 gcfhvjbkn joined #salt
22:51 jaybocc2 interesting, thanks geek
22:54 yomilk joined #salt
22:55 jaybocc2 geekatcmu: i guess i didn't try hard enough... this just worked for me... and so might make you happy... import os; import imp; authorized_keys = imp.load_source('authorized_keys', os.path.join(os.path.dirname(__file__), 'authorized_keys.sls'))
22:55 ramblinpeck joined #salt
22:56 codekobe joined #salt
22:57 geekatcmu joined #salt
22:57 gazarsgo joined #salt
22:57 kutenai joined #salt
22:58 CaptTofu_ joined #salt
22:58 joeyparsons joined #salt
23:04 hal58th exit
23:10 iggy aww, Carl... why you leave us
23:16 sgargan joined #salt
23:20 ajw0100 joined #salt
23:20 druonysus joined #salt
23:20 druonysus joined #salt
23:23 mosen joined #salt
23:37 Nazca joined #salt
23:38 ingslovak joined #salt
23:40 Vynce joined #salt
23:49 kal0pr joined #salt
23:50 aqua^c joined #salt

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