Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-09-23

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

All times shown according to UTC.

Time Nick Message
00:00 aquinas joined #salt
00:01 mpanetta joined #salt
00:01 mpanetta joined #salt
00:11 darrend joined #salt
00:12 halfss joined #salt
00:14 apergos for those (not) following along, puppet was running  a second little python script but would only tell us about it with --debug... this second script tried to set a grain and hence also wanted to auth with the master, starting the minion and then firing this off hits the salt race condition for key creation
00:14 apergos where it checks  the path to see if there's already a key...
00:14 apergos and with that, I'm of for the night, have a good one
00:15 scbunn joined #salt
00:17 gtmacdonald joined #salt
00:17 manfred nice catch
00:19 kingel joined #salt
00:19 gtmacdonald Hi, I'm trying to add a mysql returner, which requires a the MySQLdb python module be added to the minion. How do I go about doing this? I have both windows and linux minions.
00:26 halfss joined #salt
00:27 DaveQB joined #salt
00:27 bhosmer joined #salt
00:28 Vye gtmacdonald, on linux it is just a matter of install MySQLdb via pip or with apt/yum, depending on your distribution.
00:29 Vye gtmacdonald, on Windows, Salt is Frozen so I'm rather curious how to go about that myself.
00:32 doMonkey joined #salt
00:32 saltymoli gtmacdonald, it only requires the mysql-client (on linux), unless you're planning to host a mysql server from your minion
00:34 saltymoli gtmacdonald, i believe you can still run pip install commands on windows, if you have installed the pip exe/msi/whatever
00:34 saltymoli salt 'windowsbox' cmd.run 'pip install ...'
00:34 gtmacdonald ok, thx saltymoli.  I'm investigating how to do it with windows. There's a FREEZER_INCLUDES  in setup.py where I can specify MySQLdb which i've compiled and installed into my virtual environment, but I'm uncertain how to use it to generate the installer...
00:35 khoai joined #salt
00:35 saltymoli gtmacdonald, http://docs.saltstack.com/en/latest/topics/installation/windows.html#building-the-installer
00:35 saltymoli talks about how to build a custom salt installer
00:35 saltymoli i've done it; it's not so hard
00:36 khoai I'm using salt with ec2/boto. I would like to get ec2 instance ID after salt-cloud spawn a node with random name, what would be the cleanest way to do it?
00:36 gtmacdonald oh great! thanks! :)
00:36 Steve7314 joined #salt
00:39 manfred khoai: it returns it at the very end, otherwise, use salt-cloud's built in server query stuff
00:41 khoai manfred: thank you, I need to run salt-cloud, then a long while later would need ec2 ID, which makes it harder to manage
00:41 manfred yeah
00:41 khoai i'll look into salt-cloud server query
00:41 Steve7314 new to salt here, and I have a question.  How do I know if a salt command was successful - for instance, if I want to chmod a file and it exists on 2 out of 4 servers, how do I know which 2 servers the file did not exist on?
00:42 manfred khoai: http://docs.saltstack.com/en/latest/topics/cloud/salt.html#query
00:43 khoai manfred: thank you
00:44 manfred np
00:46 teebes joined #salt
00:48 _mel_ joined #salt
00:51 _rene joined #salt
00:54 aparsons joined #salt
00:54 debian112 anyone use pillars with this: salt.states.host
00:56 _rene hello!
00:56 _rene i have a list which is a grain. the items are base64 encoded. like so; my_list_base64_encoded: [Zm9v, YmFy, Znll]
00:56 _rene is there a way that i can have a jinja template do the base64 decode for me?
00:57 _rene for example, foo = {{ grains['my_list_base64'][0] }} in jinja would print the first item in its current form.
00:57 _rene something like foo = {{ base64_decode(grains['my_list_base64'][0]) }}, is what im looking for.
00:58 _rene i've found salt.modules.hashutil.base64_decodestring() though im running 2014.1.5 at the moment.
00:58 midacts joined #salt
00:59 halfss joined #salt
01:00 _rene im thinking i may now to create a jinja filter to do something like foo = {{ grains['my_list_base64][0]|custom_base64_filter }}
01:00 _rene now==need.
01:05 khoai manfred: salt '*' cloud.query returns a list of minions with no information
01:05 bhosmer joined #salt
01:05 manfred don't use the module, use it inside the salt-cloud binary
01:05 khoai manfred: nvm, it was something ran into 20mins ago, found out how now :)
01:05 khoai thanks manfred
01:08 avn joined #salt
01:09 catpigger joined #salt
01:10 higgs001 joined #salt
01:10 malinoff joined #salt
01:16 jalaziz joined #salt
01:19 quickdry21_ joined #salt
01:25 Steve7314 left #salt
01:30 mrlesmithjr joined #salt
01:37 kusams joined #salt
01:40 jhauser_ joined #salt
01:41 dude051 joined #salt
01:45 drawsmcgraw joined #salt
01:51 saltymoli anyone know where salt-cloud logs to?
01:51 saltymoli i'm putting print and log statements in, but they keep getting swallowed
01:51 saltymoli trying to debug one of the cloud providers
01:51 saltymoli (vsphere)
01:52 manfred the salt-cloud binary logs to the master log
01:57 saltymoli is it buffered?
01:57 saltymoli i'm calling log.info a lot, but most of them aren't showing up
01:59 baconbeckons joined #salt
01:59 dccc joined #salt
02:00 baconbeckons i’m trying to provision on aws with salt-cloud and i’m hanging at “*  INFO: Running install_ubuntu_deps()”
02:00 saltymoli joined #salt
02:01 elfixit joined #salt
02:08 kingel joined #salt
02:16 teebes_ joined #salt
02:23 joehoyle joined #salt
02:23 joehoyle reactjs
02:30 n8n joined #salt
02:40 mgw joined #salt
02:46 ekristen joined #salt
02:53 vu joined #salt
02:55 dccc joined #salt
02:56 NotreDev joined #salt
03:00 vu joined #salt
03:01 vu joined #salt
03:03 vu joined #salt
03:06 vu joined #salt
03:06 ramishra joined #salt
03:08 yetAnotherZero joined #salt
03:09 troyready joined #salt
03:15 mgw joined #salt
03:15 vu joined #salt
03:20 user___ joined #salt
03:22 vu joined #salt
03:22 iggy saltymoli: -l debug?
03:23 kusams_ joined #salt
03:23 vu joined #salt
03:25 vu joined #salt
03:31 vu joined #salt
03:32 vu joined #salt
03:34 vu joined #salt
03:37 jY joined #salt
03:37 viq joined #salt
03:42 saltymoli iggy; i knew there was a simple solution that i was just forgetting
03:42 saltymoli thanks!
03:51 vu_ joined #salt
03:52 vu_ joined #salt
03:53 drawsmcgraw left #salt
03:54 vu_ joined #salt
03:54 ndrei joined #salt
03:54 ndrei_ joined #salt
03:56 bezeee joined #salt
03:57 kingel joined #salt
03:59 vu_ joined #salt
04:01 vu joined #salt
04:02 NotreDev joined #salt
04:09 ravenac95 left #salt
04:11 Ryan_Lane joined #salt
04:12 mgw joined #salt
04:13 jalaziz joined #salt
04:20 StDiluted joined #salt
04:32 NV hmm, when using salt reactor is it possible to trigger a state execution on multiple hosts but specifying a batch-size too?
04:32 manfred should be
04:33 NV any idea how? :P
04:33 ramishra joined #salt
04:35 manfred ugh, i don't wanna do work
04:35 manfred one second
04:35 manfred :P
04:35 iggy isn't that orchestrate is for
04:35 iggy *that what
04:35 manfred well, you would go through the orchestrate or overstate runner
04:36 manfred which is called from the reactor file
04:36 iggy ahh
04:36 iggy haven't looked at reactors as much as I should have yet
04:37 manfred actually doesn't look like you can do it... i could have sworn you could
04:37 manfred oh, nm, one second
04:38 iggy I remember seeing something about batch size when I was looking at orch or overstate
04:38 manfred yeah, just throw the batch: configuration in your overstate or orchestrate .sls for the state runner
04:38 manfred it is just 'batch' when talking about the runner
04:38 manfred batch-size is only on the command line
04:38 NV hmm i haven't looked into oversatate/orchestrate yet tbh
04:38 sherbs_tee joined #salt
04:39 manfred you should :P
04:39 sherbs_tee can I ask a dumb question? how do I check if a directory exists using jinja?
04:40 manfred https://github.com/saltstack/salt/blob/develop/salt/overstate.py#L240
04:40 manfred sherbs_tee: why would you use jinja? why not use an unless statement in the state file?
04:40 manfred or i mean, onlyif
04:40 manfred actually, that isn't available until 2014.7
04:41 bezeee joined #salt
04:41 manfred sherbs_tee: {% if salt['cmd.retcode']('ls /path/to/dir') == 0 %}
04:41 intellix joined #salt
04:41 iggy eww
04:42 iggy the django/jinja devs would not be happy about that
04:42 manfred or in 2014.7, just - onlyif: stat /path/to/dir
04:42 manfred iggy: on one cares about them
04:42 sherbs_tee manfred: awesome
04:43 manfred besides, imo it should be checked with salt
04:43 sherbs_tee manfed: the problem is that we're transitioning roles from one directory structure to another
04:43 sherbs_tee so I need a stop-gap that will support existing roles in the old structure vs the new
04:43 sherbs_tee we will be removing this once the roles are converted
04:44 sherbs_tee basically like this: http://pastebin.com/nHGT1PFc
04:44 manfred yeah, i was just saying, in 2014.7, instead of testing with jinja, you could use the onlyif statement
04:44 iggy do whatever works
04:44 sherbs_tee definitely looking forward to 2014.7
04:45 sherbs_tee when's that drop?
04:45 iggy if only we knew
04:45 sherbs_tee ha
04:45 manfred when it is ready
04:45 manfred it is on rc2 right now
04:45 sherbs_tee cool...just thought you might know off-hand
04:45 sherbs_tee thanks all...this definitely helped
04:46 manfred we do not, it won't be decided until they are happy with it's stability
04:46 manfred they are doing a lot more internal qa on this release
04:46 sherbs_tee awesome
04:47 felskrone joined #salt
04:47 sherbs_tee I hope relative includes for pillar is included as well
04:47 iggy I like ceph's release schedule... big major releases every 6, minor releases every month
04:50 NV manfred: cheers, odd that batch isn't mentioned in the overstate docs though :P
04:51 kermit joined #salt
04:57 kingel joined #salt
04:59 ndrei joined #salt
05:04 active8 joined #salt
05:12 sectionme joined #salt
05:17 aquinas joined #salt
05:18 NV err
05:18 aquinas_ joined #salt
05:18 NV does orchestrate not work with gitfs or something?
05:18 manfred nope, it should work
05:18 NV "salt-run state.orch test" gives me "No matching sls found for 'test' in env 'base'", but running "salt-call cp.list_master prefix=test" I get "local:\n    - test.sls"
05:18 manfred all those things should still be called from the fileserver
05:19 NV so it can see the sls file
05:20 linjan joined #salt
05:26 sectionm1 joined #salt
05:27 flyingcarskill joined #salt
05:28 NV hmm doing some digging it looks like orchestrate uses http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.state anyway, not overstate.py so it doesn't support batch either
05:28 NV so only overstate would let me specify a batch...
05:37 vxitch joined #salt
05:38 flyingcarskill left #salt
05:38 vxitch hey, do we have support for PGP encryption of pillar data?
05:39 manfred not yet
05:39 manfred you could write one, if you wrote an sdb function
05:39 vxitch on the roadmap? i'm interested in doing it
05:39 vxitch sdb?
05:39 manfred and just had it use the apply_sdb() stuff
05:39 manfred http://docs.saltstack.com/en/latest/topics/sdb/
05:40 lcavassa joined #salt
05:40 manfred would just need to write an sdb driver
05:40 manfred and we would need to switch voer to adding the apply_sdb stuff to parse pillars, but yeah it wouldn't be that difficult
05:41 manfred i am off to bed o/
05:41 vxitch bye, thanks! \o
05:41 manfred you could also write an ext_pillar module
05:42 manfred that could do all your gpg querying/decrypting and use that
05:42 manfred np
05:42 vxitch i like that, i'll look into that
05:51 babilen vxitch: http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html
05:57 catpiggest joined #salt
05:59 vxitch ah, so my request/idea has been taken care of already? to have encrypted pillar data?
06:11 jpaetzel joined #salt
06:12 sherbs_tee how can I use a pillar variable inside a cmd.retcode? like salt['cmd.retcode']('ls {{mypath}}') ?
06:13 sherbs_tee with jinja
06:13 bhosmer joined #salt
06:25 kingel joined #salt
06:33 sherbs_tee joined #salt
06:37 hotbox joined #salt
06:40 sectionme joined #salt
06:40 kingel joined #salt
06:42 intellix joined #salt
06:45 jayfk joined #salt
06:50 askhan joined #salt
06:50 askhan hi newbiew to salt
06:50 askhan regarding installing which components to install
06:51 askhan I am using Ubuntu and installed the folloiwng
06:51 askhan salt-master on master
06:51 askhan salt-minions on all minions
06:51 askhan is this fine ?
06:52 askhan or i need to install something else on master and minions
06:52 askhan thank you
06:52 Guest85615 joined #salt
06:53 Ryan_Lane askhan: that's all you need
06:53 askhan Ryan_Lane, what is salt-syndic ?
06:53 Ryan_Lane it's only necessary if you want to make a hierarchy of masters
06:53 askhan ah okay
06:55 askhan Ryan_Lane, i am following the salt walkthrough ,
06:55 askhan now at salt states,
06:56 askhan when tries to run sudo salt pink state.sls vim
06:56 askhan got this
06:56 agend joined #salt
06:56 askhan pink:
06:56 askhan Data failed to compile:
06:56 askhan ----------
06:56 askhan No matching sls found for 'vim' in env 'base'
06:57 Ryan_Lane where's your file root?
06:57 Ryan_Lane is it the default?
06:57 askhan actually i am testing with docker containers
06:58 askhan pink is a container running ubuntu and salt-minions
06:58 * Ryan_Lane nods
06:58 askhan not sure what you mean by file root
06:58 Sweetshark joined #salt
06:59 Ryan_Lane so, state.sls will look for a file called vim.sls in whatever directory is configured to be the file root
06:59 askhan on master ?
06:59 Ryan_Lane http://docs.saltstack.com/en/latest/ref/configuration/master.html#file-roots
06:59 ramishra joined #salt
07:00 askhan thanks checking
07:01 Ryan_Lane if you're using the default, you should have the file in /srv/salt/vim.sls
07:02 askhan Ryan_Lane, didn't changed anything , and i have nothing under /srv
07:02 Ryan_Lane right, so without /srv/salt/vim.sls being defined, state.sls won't be able to find the vim state
07:05 askhan hmm , /etc/salt/master is poing to default /srv/salt but nothing under /srv
07:05 askhan duno its easy to create the default sls under /srv/salt ?
07:06 Ryan_Lane yes, just create the /srv/salt directory
07:06 Ryan_Lane and add the vim.sls file there
07:08 alanpearce_ joined #salt
07:08 ramishra joined #salt
07:08 askhan Ryan_Lane, thanks now its working
07:08 Ryan_Lane great!
07:08 askhan i thinks lots to learn .. only 2nd day with salt and dockers/containers
07:10 Ryan_Lane yeah. it's a little difficult at first, but once you get the hang of it, it's pretty easy
07:12 askhan agreed basic of devOps and linux sysadmins is prerequisite though ;)
07:24 zz_Cidan joined #salt
07:29 askhan so basically there are two ways to install packages on minions
07:29 askhan - using salt '*' pkg.install vim
07:29 spo0nman joined #salt
07:29 askhan and using sls formulas
07:30 askhan the differnce is the later one is to do customization right?
07:31 babilen askhan: These are two ways of using salt, yes. One is manual, ad-hoc orchestrating and running of commands and the other is the definition of a setup via states that will be true when you run a highstate over your minions.
07:32 askhan babilen, gracias
07:32 babilen I would recommend to write states for everything you want to be true at any given time and then use the execution modules to perform actions that change based on the time that you execute them (e.g. upgrades, ...)
07:42 VSpike Does anyone know what happens if you have reboot: True in a windows repo package definition? I can find any docs on it
07:43 VSpike s/can/&'t/
07:44 bhosmer joined #salt
07:47 VSpike kind of looks like it does nothing, from scanning through the code ... but I may be missing something
07:48 VSpike Ah, is the locale setting in there only used for comparing the name strings?
07:49 anitak joined #salt
07:52 notbmatt joined #salt
07:54 darkelda joined #salt
08:02 bhosmer joined #salt
08:04 PI-Lloyd joined #salt
08:05 kingel joined #salt
08:15 davidone joined #salt
08:24 martoss joined #salt
08:29 fredvd joined #salt
08:30 fredvd joined #salt
08:30 rattmuff joined #salt
08:31 rattmuff ooo, nice, 524 users :D
08:32 rattmuff If someone has any input on this SO question it'd be more then welcome :) http://stackoverflow.com/questions/25971634/make-minion-wait-until-master-runner-complete
08:34 Guest526 joined #salt
08:34 Guest526 qq
08:35 zumer http://ohjp.teresnab.ru/84247/r1586154/ ðåàëüíû çàðîáîòîê äëÿ òåáÿ áåç âëîæåíèé)
08:36 zumer left #salt
08:36 malinoff zumer, use utf-8, luke
08:36 malinoff oh, right
08:36 malinoff a spammer
08:38 martoss left #salt
08:38 kbyrne joined #salt
08:40 jeremyBass joined #salt
08:44 intellix joined #salt
08:46 timontimon joined #salt
08:48 anitak joined #salt
08:48 remsidemsi hello, I'm quite new to the whole salt world but I found a webthread from 2013 that would be quite interesting for me.
08:48 remsidemsi that would be it: https://groups.google.com/forum/#!topic/salt-users/pTLzKkJiW48
08:49 _mel_ can i modify / add grains to minios to make parsing easier? i have for example this productname; "PRIMERGY RX300 S6" , "PRIMERGY RX100S5", "PRIMERGY RX600 S4" and so on. i'd like to split this into two new items
08:49 malinoff remsidemsi, i think celery is much more useful it such case
08:50 remsidemsi alright i'll have a look into that. thanks!
08:50 ggoZ joined #salt
08:51 remsidemsi ahhh i've seen that before malinoff
09:10 remsidemis joined #salt
09:10 babilen _mel_: You can write custom grains, yes. http://docs.saltstack.com/en/latest/topics/targeting/grains.html#writing-grains
09:12 CeBe joined #salt
09:22 irctc914 joined #salt
09:27 wnkz joined #salt
09:27 akafred joined #salt
09:29 _mel_ babilen: how can i test them?
09:29 babilen _mel_: What do you mean?
09:30 _mel_ if i write a custom grain, how can i test it?
09:31 viq you dump it on a box, you see if it returns what you expect?
09:31 _mel_ i want to use other grains and just modify it. is it posible to do something like: grains['fsc_major'] = grains.get('productname')
09:32 babilen What exactly do you mean by "testing" ? If you want to check the effect of it just put it into _grains somewhere in file_roots, sync it and use grains.item FOO to get it. If your custom grain does not depend on any other salt functionality at all you can just call the function in question directly from an "if __name__ == "__main__"" block and print the resulting dictionary.
09:32 viq _mel_: it's python code, which you need to distribute to your machines. In it you can do whatever you want
09:33 babilen _mel_: You should introduce a new grain. I would *not* modify anything as you cannot be sure what other code relies on that grain being set the way it is set.
09:33 _mel_ babilen: but then i need to duplicate the dmi parsing code as i only want to modify the productname string
09:34 babilen Can't you call any other functionality? http://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
09:35 babilen (and why would that be a problem?)
09:35 yomilk joined #salt
09:35 ramishra joined #salt
09:37 _mel_ i just want to customize the productname string, because i don't find a convenient way to build a config template. i have different outputs depending on the server and want to apply some grub boot options. so i fought it may be eaysier to have a new grain with that information.
09:38 babilen I also don't quite understand why you can't work with the current productname.
09:41 _mel_ i don't understand how to write the if-then-else syntax if i can only do things like: if grains['lsb_distrib_release'] > or if grains['lsb_distrib_release'] ==  when the string is sometimes "PRIMERGY RX300 S6" and sometimes "PRIMERGY RX100S5"
09:41 AvengerPenguin left #salt
09:43 viq _mel_: and what would you rather have there?
09:43 viq _mel_: also, http://jinja.pocoo.org/docs/dev/templates/#list-of-builtin-filters
09:43 _mel_ something like fsc_major: 100 fsc_minor: 5
09:44 _mel_ maybe fsc_major would be enough
09:44 giantlock joined #salt
09:45 _mel_ can i split the string via regex inside the template file before doing the if-then-else logic?
09:45 viq grains['lsb_distrib_release']|replace("PRIMERGY RX", "")
09:46 viq or even
09:47 viq grains['lsb_distrib_release']|replace("PRIMERGY RX", "")|replace(" ", "")|replace("S", ".")
09:47 viq Should get you those to 300.6 and 100.5
09:48 _mel_ oh, that looks good.
09:48 viq _mel_: you can do more, have a look at http://jinja.pocoo.org/docs/dev/templates/#list-of-builtin-filters
09:49 _mel_ is there a way to develop such things wihtout doing state.sls <name> anytime?
09:50 bhosmer joined #salt
09:50 halfss joined #salt
09:51 viq Sorry, I don't know answer to that one. I guess whatever usual means to work with jinja
09:55 che-arne joined #salt
09:55 bhosmer joined #salt
09:56 darkelda joined #salt
10:02 johtso joined #salt
10:04 bhosmer joined #salt
10:09 maggo joined #salt
10:11 babilen Can I override the top file when I use masterless minions? I only found http://docs.saltstack.com/en/latest/ref/configuration/master.html#state-top in the master config.
10:12 babilen (I'd like to use this for provisioning of local VMs for testing)
10:12 maggo Hi all, i reading the docs and found the requisites onchanges. That should give me the possibility to execute something just if there are changes. I tested it with - onchanges: file: statename but it will execute it all the time...
10:13 Outlander joined #salt
10:13 babilen maggo: Are you using 2014.7 (i.e. the release candidate that has not been packages/released yet) ?
10:14 maggo babilen: oh now i use the 2014.1.10
10:15 _mel_ viq: can i use an external filter like sed or something?
10:15 babilen http://docs.saltstack.com/en/latest/ref/states/requisites.html#onchanges is not available in that version -- "New in version 2014.7.0."
10:15 babilen _mel_: replace would be that
10:16 babilen _mel_: http://jinja.pocoo.org/docs/dev/templates/#list-of-builtin-filters is what you can use and you can also write execution modules and call them explicitly from there.
10:17 babilen ( salt['execution_module.function'](arguments, ...) )
10:19 anitak joined #salt
10:19 scott_w joined #salt
10:20 scott_w yo, i see you guys followed me on twitter
10:20 scott_w prepare to be disappointed by the lack of tweets :P
10:22 viq scott_w: just write "yup, still no tweets today" every so often ;)
10:22 babilen but but .. that would be a tweet!
10:23 diegows joined #salt
10:24 maggo joined #salt
10:24 scott_w TWEETCEPTION
10:25 viq twatception
10:25 scott_w too many tweets make a twat?
10:25 maggo is 2014.6 stable?
10:25 _mel_ babilen: can replace use regex? something like |replace("S[[:digit:]]", "")
10:25 viq maggo: there is no 2014.6
10:25 babilen no
10:25 maggo ups i mean 2014.7
10:25 babilen _mel_: No, it is the "normal" string method "replace" in Python not re.sub
10:25 viq maggo: define "stable"
10:27 maggo stable like released and ready to be packaged next time in repositories
10:27 babilen no
10:27 babilen hence my "(i.e. the release candidate that has not been packaged/released yet)"
10:27 viq maggo: if it was released it wouldn't be a release candidate
10:29 maggo viq: yes thats right i know but babilen was talking about using 2014.7 to get the requisite onchanges. Now i know its release candidate like it is written on docs.saltstack and i have to use another method
10:30 babilen You have to indeed. What are you trying to do? (in a broader more holistic view than 'run state A only when B had changes')
10:30 maggo viq: i need to execute a reboot after a state was changing a file. I'm working on my reboot and restart salt state state we talked last week you rember
10:31 maggo babilen: yes thats what i try to do
10:32 johtso can anyone recommend some example project salt states to use as a guide? something that does things the "right" way and preferably uses formulae?
10:32 viq maggo: how about cmd.wait?
10:32 gokr joined #salt
10:33 ramishra joined #salt
10:34 ramishra joined #salt
10:34 gokr Sigh... anyone knows a Howto or something on how to prepare an AMI with salt-minion etc so I can use salt-cloud  etc?
10:34 gokr I must be missing something.
10:35 harkx joined #salt
10:35 viq gokr: what is the problem? (I know nothing about salt-cloud or AMIs, but it may be something I could guess at, or someone else knows)
10:36 gokr First problem which I thought I figured out: Making an AMI that doesn't have an old key in it (so it gets regenerated on startup).
10:36 viq Do you know packer.io ? That's what I use to generate my vagrant machines, it can do amazon too
10:36 gokr I found some stackexchange answer or something mentioning that you need to stop salt-minion, and simply remove the key files and clear out minion_id.
10:37 viq Yeah, that's how I would go about it
10:37 gokr We use packer yes, but... in this case I already have a machine on EC2.
10:37 maggo viq: a ok, at time i using module.run with system.reboo ... but yes i can use cmd.wait... let me try
10:38 gokr I will try again, perhaps ... I need to stop the machine before making the AMI.
10:39 hjst joined #salt
10:39 gokr The other "issue" was ... discovering how to send "-N" to bootstrap-salt, ok, so I figured that out I think. In general I think this should be documented somewhere - because it seems quite "normal" to produce an AMI with salt-minion preinstalled.
10:45 ggoZ joined #salt
10:47 peters-tx joined #salt
10:47 maggo viq: babilen: hm i thought about but cmd.wait will just resolve my problem with the reboot. but i have to use module grains.setval to write the grain startup_states and this just if a specific state changes something too. Can i use watch for this ?
10:49 babilen You are still suffering from XY problem. Be more generic, what are you *really* trying to do? What does startup_states states have to do with all this?
10:49 cruatta joined #salt
10:50 viq maggo: why don't you set a grain as part of your state?
10:50 viq http://docs.saltstack.com/en/latest/ref/states/all/salt.states.grains.html
10:50 viq !help
10:51 wm-bot4 I'm a documentation bot. To control me, please use #salt-bot to avoid channel spam. See this URL for my commands: http://meta.wikimedia.org/wiki/WM-Bot
10:51 viq !tell salt.states.grains
10:51 viq !salt.states.grains
10:51 CryptoMer joined #salt
10:53 maggo viq: yes i'm using grains.setval for that but i have to call it with module.run, haven't i?
10:53 viq maggo: nope, there's a state
10:53 viq Which I linked you to
10:54 _mel_ can i assign two values like {% set (var1, var2) = grains[] |do_something %} ?
10:54 maggo babilen: i try to create a state that i can use to trigger a reboot and executing the state for my minion that was executed bevore. I will set the grain startup_state to my minions state, rebooting, and after reboot deleting it again with grains.delval
10:55 maggo viq: yes is saw it, i will take a look after dinner.
10:56 babilen maggo: Why would you want to do that?
10:56 babilen viq: Wouldn't that still be problematic as that state should only run when another one had changes.
10:56 maggo babilen: because my software i will install need that
10:57 oyvjel joined #salt
10:57 viq babilen: hm, yeah
10:57 babilen maggo: Sorry, but I have the feeling as if there might be a better general approach to the actual problem you are trying to solve (sounds like orchestrate or maybe reactor), but I have no idea what that is. You are still quite deep in your actual implementation of *your* solution to that problem.
10:57 babilen maggo: Your software requires a certain grain to be set?
10:58 the_drow Is there a way to supply an environment variable to the pip state? I need to install uwsgi with jemalloc support. The required command is: UWSGI_PROFILE_OVERRIDE=malloc_implementation=jemalloc pip install uwsgi
10:58 babilen http://mywiki.wooledge.org/XyProblem is what I was referring to earlier, maggo
11:00 PI-Lloyd hey, is there a way I can use jinja on the command line using git.pull - eg "salt -b10% '*' git.pull /path/to/git/dir/{{ grains.nodename }} user='git-user' identity='/path/to/key' template=jinja " ?
11:01 QuinnyPig joined #salt
11:02 Cyclohex joined #salt
11:02 Cyclohex Hello guys
11:03 Cyclohex I'm fairly new to salt, and I must say that it is somewhat overwhelming
11:03 the_drow anyone?
11:04 Cyclohex At this point I think I have the basic understanding of salt, like what are pillars, how to use sls files.. But I just don't know what the best practices are
11:05 PI-Lloyd Cyclohex: http://docs.saltstack.com/en/latest/topics/best_practices.html
11:05 Cyclohex yes, reading it right now
11:06 hintss joined #salt
11:07 hjst joined #salt
11:08 cruatta joined #salt
11:09 VSpike the_drow: I don't know for sure, but http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.environ.html#module-salt.modules.environ will let you change the env vars of the salt process. If it spawns pip, pip should inherit
11:09 the_drow I'll check and let you know :)
11:09 VSpike the_drow: yeah, would be intrigued to know if it works!
11:10 scottpgallagher joined #salt
11:11 babilen Cyclohex: I'd like to point out that I don't consider the ":lookup:" key used for pillars best practice, but reading that and http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html should give you a pretty good idea of "best practices" in salt.
11:13 Cyclohex Ok, I'll read it through... why is the lookup not best practice?
11:15 babilen Cyclohex: You will encounter "lookup" in the context of map.jinja that is being used in the formulas. These maps are also called "lookup tables" and are being used for values that users would hardly ever want to change and are different between os_families (e.g. package or service names, location of configuration files, ...).
11:17 babilen Cyclohex: To still allow users to override those values easily one typically merged in the FOO:lookup pillar into the *map*, but in the "best practices" document that pillar is being referenced directly, which I consider to not be idiomatic.
11:17 babilen (anyway, this probably confuses you more than it helps right now)
11:17 Cyclohex babilen: it kinda does, yes
11:18 babilen sorry ;(
11:19 babilen You may ask me pesky at least 10 pesky questions now that I will answer happily if I can.
11:19 Cyclohex Was just looking at the map.jinja.. Is this the file that is being used if you want to install apache, check if os is debian then pkg name is apache2, if redhat httpd
11:19 babilen exactly
11:19 Cyclohex ok, I started writing the jinja code in my sls files
11:20 Cyclohex but i'll be creating a map.jinja file now then
11:20 babilen You'd import the map and the values in that map is set to different values based on the "os_family" grain which distinguishes between, say, Debian, RHEL, FreeBSD, ...
11:20 giantlock joined #salt
11:20 babilen That is being discussed in the formula conventions article
11:21 babilen http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#abstracting-platform-specific-data
11:22 Cyclohex ok, i'll read the 'best practices' and 'formulas' pages first, then get back here
11:22 babilen Sounds like a plan!
11:22 Cyclohex thanks a lot for your help!
11:27 hobakill joined #salt
11:30 ndrei joined #salt
11:31 intellix joined #salt
11:39 bhosmer_ joined #salt
11:43 srini_ joined #salt
11:43 srini_ Hi
11:44 crisdev joined #salt
11:47 wr3nch joined #salt
11:57 anitak joined #salt
11:59 teebes joined #salt
12:00 erjohnso joined #salt
12:09 quickdry21 joined #salt
12:18 ndrei joined #salt
12:19 bhosmer_ joined #salt
12:21 rattmuff Just thought I'd ask about my stack overflow issue regarding master/minion event chaining again: http://stackoverflow.com/questions/25971634/make-minion-wait-until-master-runner-complete
12:21 rattmuff if anyone have any feedback (such as wont work, approaching it wrong, do it this way) is more then welcome :)
12:21 mrlesmithjr joined #salt
12:22 anitak joined #salt
12:24 mgw joined #salt
12:24 debian112 joined #salt
12:25 vbabiy joined #salt
12:29 PI-Lloyd rattmuff: why not just have the backup script handle all the rsync stuff? The way you're running your backups seems overly complicated
12:30 halfss_ joined #salt
12:31 babilen +1
12:31 PI-Lloyd our backups are done thus - salt sync's script to system, set's up cronjob - on cron run, backup grabs database/files, sends to storage, emails if any problems.
12:31 PI-Lloyd one script, does it all, salt just makes sure the script exists and the cron is present
12:33 rattmuff PI-Lloyd: thanks, that is what I wanted to do from the beginning but I would prefer that the minion don't have the power to run rsync to the master
12:33 PI-Lloyd why would you be rsync'ing to the master? surely your backups would be stored a seperate system?
12:33 ndrei joined #salt
12:34 rattmuff PI-Lloyd: ah, yes, sorry. In my test setup the backup and master is the same (will be different in production)
12:34 PI-Lloyd ok so then there shouldn't be an issue with the script sending the files to the backup system?
12:35 rattmuff yeah, I guess you are right. Will need to bring it up with the design people :P. I suppose there is no way to chain the events the way I've been trying?
12:36 mechanicalduck joined #salt
12:38 blackhelmet joined #salt
12:38 PI-Lloyd There probably is a way, but for the use case, i think it's a bit longwinded if not overkill. Best to keep things simple when it comes to backups or you could be running into issues if your saltmaster is unreachable for whatever reason
12:38 jeffspeff joined #salt
12:40 rattmuff PI-Lloyd: Absolutely, I'm still very new to salt (heard of it first time 4 days ago) so I'm also trying to dig deeper into some interesting parts like the reactor system. My current thought on a solution would be to write a python script that executes on the minion and listens to the event bus. Not sure what happens after that though :P
12:40 jslatts joined #salt
12:41 NotreDev joined #salt
12:44 aarontc joined #salt
12:45 PI-Lloyd again you probably don't even need that... just a simple bash/python script that grabs the database dump and transfers it to the backup system, and sends an email depending on the exit code of the rsync. Adding in things like the reactor system adds layers of complexity to the whole process, and potentially introduces issues that can be avoided (can't guarantee network connection between mater/minion being the biggest issue)
12:46 intellix joined #salt
12:46 saltymoli joined #salt
12:47 PI-Lloyd obv that is just my personal opinion, someone else may say differently however.
12:48 rattmuff I completely agree but can't stop thinking about how to chain events :P
12:48 PI-Lloyd haha
12:49 rattmuff thanks for your input, I think I can move on now (after getting some coffee)
12:49 PI-Lloyd I take it you've read through http://docs.saltstack.com/en/latest/topics/reactor/ ?
12:49 saltymoli when using salt-cloud, is there something you are supposed to put in the profile or map files to indicate that salt should accept the generated keys? because i'm about to spin up a bunch of vms, and i don't want to have to accept all of the keys
12:49 PI-Lloyd saltymoli: it auto accepts the generated keys
12:49 Cyclohex I have configured gitfs and have a repo where a formula users exists.. But I have no clue on how to use this formula
12:49 rattmuff PI-Lloyd: yeah, many times :S
12:50 mechanicalduck joined #salt
12:51 babilen Cyclohex: You'd target "- users" on your minions and provide suitable data (as exemplified in the pillar.example) in pillar
12:52 saltymoli PI-Lloyd, that's not what i'm seeing (vsphere driver)
12:52 saltymoli going through the code, it only auto-accepts if "local_master" is set to true
12:54 PI-Lloyd saltymoli: hmm odd, everytime i fire up an instance (GCE) it generates the key and accepts it automagicly. I've just checked my cloud profiles/providers and see no additional options in there for accepting the keys
12:54 kingel joined #salt
12:55 saltymoli PI-Lloyd, okay; maybe i have a residual key hanging around somewhere
12:55 saltymoli i'll check again
12:57 wnkz__ joined #salt
12:57 halfss joined #salt
12:58 aarontc joined #salt
13:00 nitti joined #salt
13:03 mpanetta joined #salt
13:05 wendall911 joined #salt
13:05 saltymoli figured it out; i was running salt-cloud from a virtual environment on the salt master box, testing out the 2014.7 rc; so i was pre-accepting the keys in $VIRTUAL/etc/salt/pki/master/minions, but the actual salt master didn't know of that.
13:05 saltymoli what a silly thing to do!
13:06 PI-Lloyd samrt move :p
13:06 PI-Lloyd smart too !
13:06 saltymoli i should have created a test vm to be the salt master for the rc testing
13:07 PI-Lloyd +1
13:08 PI-Lloyd at least you know for next time :)
13:12 midacts joined #salt
13:14 halfss joined #salt
13:14 saltymoli and knowing is half the battle
13:14 hasues joined #salt
13:15 miqui joined #salt
13:18 viq Hm, how would you go about having a warning header in all files managed by salt? Just put it in source files, or is there a smarter way?
13:20 racooper joined #salt
13:20 perfectsine joined #salt
13:20 viq http://russell.ballestrini.net/add-a-custom-header-to-all-salt-managed-files-using-pillar-and-jinja-templates/ seems to be in line with what I was thinking
13:21 maggo babilen: Sorry for my delay. You wrote maybe i we have an XY Problem. Yep maybe ;) For example: Deactivating SELinux or activating ACL Support requires an system Reboot. After the reboot salt should continune executing the states. So my idea is to change the selinux file and if these file was changed i will set the grain of the minion to startup_state a state and reboot. What i don't realy know is how to execute the next state only if the first
13:21 maggo state changed something....
13:21 cpowell joined #salt
13:22 viq maggo: you can switch selinux into permissive without rebooting
13:23 viq maggo: I heard of people setting grains when a state was executed, so for example a state would be executed on a machine only once and never again
13:24 viq And I am right now in the process of deploying something that will tell me when servers need to be rebooted (in my case because of kernel upgrades)
13:24 repl1cant viq: i used to do that w/puppet and that article is pretty much the same method I did, cept well "puppet like" ;-)
13:25 maggo viq: yes that could be a solution for selinux. it is flooding the logs but deactivatet. But with ACL on a root filesystem it won't work ...
13:25 viq repl1cant: I also like that it's defined in once place, and thus can be easily changed. Though some files will need to be changed into template mode, but not that big of an issue I think
13:26 repl1cant yup. we had a large 24x7 support team that did break/fix. threw that in there as not to confuse them
13:26 maggo viq: setting the grain isn't the problem that works fine. Just the dependence for rebooting if the file.blockreplace had changed something
13:26 viq maggo: true, but if you need it everywhere, you could make it part of your kickstart. Or even if not everywhere but widely enough for it to be an issue
13:27 maggo viq: in my case i don't have a kickstart. i have just an image from my IaaS provider ..
13:27 viq maggo: cmd.wait watching that state that touches eg /var/run/reboot-required ?
13:28 viq maggo: can't you make your own? packer is a very useful project
13:29 kusams joined #salt
13:29 maggo viq: yes i can ;) but i can not upload it ;) very nice ;) but they have important features we want to use others have not ...
13:30 teebes joined #salt
13:30 Sp00n joined #salt
13:30 viq maggo: care to share what those features are? ;) Just curious
13:32 maggo CPU/HDD/RAM live scaling, an surface to create an server setup by drag and drop server storage and network into to your working sheet with just buttons, and located in an country we need to store our data
13:32 maggo an a bit more
13:33 NotreDev joined #salt
13:39 colinbits joined #salt
13:40 maggo viq: ok i tested cmd.wait with watch: - file: /etc/fstab that was not changed but system is rebooting...
13:41 mgw1 joined #salt
13:41 kusams joined #salt
13:43 elextro joined #salt
13:43 viq maggo: do you have a state defining /etc/fstab ?
13:43 ndrei joined #salt
13:44 elextro Hi! Does anybody know of a way I can run salt states on certain nodes FIRST when calling "salt '*' state.highstate"?
13:44 manfred elextro:  order: 1
13:44 elextro I want to make sure 1 node runs before the others.
13:44 elextro nice!
13:44 manfred oh
13:44 manfred that
13:44 manfred no
13:44 manfred you can't order the nodes
13:44 manfred you can order the states
13:44 elextro ahhhh
13:44 elextro that stinks
13:45 stevednd elextro: you could sort of do that with orchestration
13:45 manfred if you wanted to order them explicitly, use an overstate or orchestrate
13:45 elextro Can you point me to some good docs about that :)?
13:45 manfred google saltstack overstate system
13:45 elextro cool
13:45 viq elextro: you can batch, you can orchestrate
13:45 stevednd you won't be able to just type out whatever commands you want, but if it's just for highstate you should be all good
13:46 elextro That's okay. I just want to make sure that a node with the matched grain "roles:db_bootstrap" runs before the rest
13:48 maggo viq: just an file.blockreplace
14:02 kusams joined #salt
14:02 ndrei joined #salt
14:05 dude051 joined #salt
14:05 mikepea__ joined #salt
14:05 akafred_ joined #salt
14:06 maboum joined #salt
14:06 gldnspud___ joined #salt
14:06 scalability-junk joined #salt
14:07 gamingrobot joined #salt
14:07 midacts joined #salt
14:08 mihait__ joined #salt
14:08 balltongu joined #salt
14:10 maggo viq: ok partialy i got it ;)
14:11 XenophonF joined #salt
14:11 maggo viq: my state is now doing what i wan't it manipulates the file. it reboots and after reboot it is exeuting my state again and touches a file i can sse
14:12 viq maggo: cool, how did you achieve this?
14:12 maggo viq: but if i change the cmd.run: - name: touch /tmp/rebooted to module.run: - name: grains.delval - key: startup_states it does not delete it
14:13 maggo viq: now i'm searching why it is running cmd.run after reboot but module.run not..
14:14 ajprog_laptop joined #salt
14:15 alanpearce_ joined #salt
14:15 hasues joined #salt
14:16 dccc joined #salt
14:20 maggo viq: you can have a look at this here http://pastebin.com/6ky9QFqK
14:20 ckao joined #salt
14:21 maggo viq: at the end you see i have the cmd.run activated and this is working. But if i deactivate the cmd.run and activating the module.run it wouldn't work after reboot
14:21 to_json joined #salt
14:21 kaptk2 joined #salt
14:21 ndrei joined #salt
14:22 maggo viq: the first state acl_activate have to be pimped with pillar now or by getting the uuid from the system but that should be easy till possible ;)
14:24 jaimeve joined #salt
14:25 vu joined #salt
14:27 viq maggo: does it complain about something, or just doesn't do anything?
14:27 the_drow can someone help me set up a salt master and minion using salt-cloud?
14:28 the_drow Until now I just used salt masterless
14:28 the_drow I am using ec2
14:28 the_drow I have salt cloud installed locally
14:29 the_drow First of all I want all the profiles/providers/maps etc. to be stored in git and still be used by salt cloud. How do I do that?
14:30 yetAnotherZero joined #salt
14:31 babilen maggo: What I do in this is to write a custom grain that populates its values based on some test that I implemented in Python. (e.g. check if selinux is disabled) and then target states that require it to be disabled with that grain to the minions.
14:31 felskrone joined #salt
14:31 elextro Does anybody know why salt-run is running the code from my master branch? When I'm clearly on my orchestration branch?
14:32 elextro I tried clearing the cache with salt '*' state.clear_cache, but salt-run still runs the code from my master branch of my local repo
14:32 babilen maggo: That way you don't have the whole "write/remove" grain problematic and actually express what you want to do (we have something similar with "install xen / kvm on boxes, then continue installing software that requires that ..."
14:33 rodo left #salt
14:33 maggo viq: ah maybe an additional info for you. If i execute the state manually after reboot it
14:33 maggo works
14:35 kermit joined #salt
14:36 viq sounds like possibly on startup either the grain or pillar was not available yet?
14:36 the_drow It seems that salt-cloud requires a master and I don't have that yet
14:36 maggo babilen: viq: yes that would be a workaround. But the salt minion should be able to execute that after reboot. Hm i'will debug a bit...
14:36 the_drow How do I install a salt master using salt-cloud?
14:36 the_drow Do I have to do it with ssh?
14:36 iggy the_drow: you don't, you have to bootstrap the master yourself
14:37 the_drow Ok
14:37 babilen maggo: http://docs.saltstack.com/en/latest/topics/reactor/#syncing-custom-types-on-minion-start
14:37 saltymoli the_drow, unless you want to configure one of the cloud boxes as the master; you can set that up in the profile file, or the map file
14:37 KennethWilke joined #salt
14:37 FeatherKing joined #salt
14:37 the_drow saltymoli: Yes I do
14:37 saltymoli but then you won't get auto-accept of the keys
14:38 the_drow Oh
14:38 the_drow Then I don't
14:38 saltymoli i think
14:38 Cyclohex I am trying to install salt-cloud, got all dependancies and finally trying to pip install git+https://github.com/saltstack/salt-cloud.git#egg=salt_cloud. I get an errormessage stating that build/salt-cloud/python.py doesn't exit, this is true. Because it is in build/salt-cloud/salt-cloud/python.py
14:38 teebes joined #salt
14:39 FeatherKing ive started seeing this on several of my windows minions:
14:39 FeatherKing [CRITICAL] Could not deserialize msgpack message: n++n++funn++mine.updaten++jidn++20140910104313708000n++pidn++n++n++idn++minionNameIn an attempt to keep Salt running, returning an empty dict.This often happens when trying to read a file not in binary mode.Please open an issue and include the following error: unpack(b) received extra data.[ERROR ] An un-handled exception was caught by salt's globa
14:39 FeatherKing only fix i have found is to reinstall
14:39 rallytime joined #salt
14:39 iggy Cyclohex: salt-cloud is part of salt now
14:39 FeatherKing anyone encountered anything like that?
14:39 iggy don't install that
14:39 Cyclohex iggy: but how then can I use the salt-cloud?
14:40 iggy it's part of salt now
14:40 manfred it gets installed when you install salt proper
14:40 iggy install salt... it's there
14:40 elfixit joined #salt
14:40 Cyclohex if I try salt-cloud --version it says it doesn't know salt-cloud
14:40 manfred how did you install salt?
14:40 manfred from pip?
14:40 maggo babilen: ok "to instruct each minion to sync its custom grains" means the grains that i try to modify in /etc/salt/grains on the minion it self? I thougth that is available to the minion just in time after the reboot
14:41 Cyclohex I used wget (from the bootstrap)
14:42 manfred so, you probably installed it with your package manager, unless you passed in to install it from git
14:42 manfred so install it with your package manager
14:42 KennethWilke what distro are you running with?
14:42 Cyclohex I use debain
14:42 Cyclohex debian
14:42 manfred apt-get install salt-cloud
14:42 Cyclohex so i use the aptitude to install salt, then?
14:42 CeBe joined #salt
14:43 manfred that is the default for how the bootstrap installs it
14:43 babilen maggo: I am referring to custom grains (which are not set in /etc/salt/grains or in the minion config)
14:43 manfred and if you had done | sh -s — git develop , it would have installed it with salt-cloud
14:43 babilen maggo: I am saying that you should write an "selinux" grain and target states based on that.
14:43 Cyclohex manfred: I thought I used sh -s -, but probably just did sh
14:44 Cyclohex manfred: anyway, I used apt-get and salt-cloud is now installed
14:44 manfred yeah, that would have installed it with apt-get
14:45 maggo babilen: to i missunderstand something? I thought grains are just information from the minion it self. Do you mean pillar on the master?
14:45 Cyclohex manfred: Thanks!
14:45 manfred yw :)
14:45 VSpike Can anyone suggest why the windows pkg manager is reporting a failure on python3 ? https://bpaste.net/show/6c76ee7489d2
14:45 VSpike It's trying to install 3.4.1150 and the output suggests that's exactly what's installed, yet the process says it failed
14:46 babilen maggo: Yes, didn't you say that you want to target states based on the fact if SELinux is enabled or not?
14:46 VSpike This is using my own fork of the salt-winrepo, but I found the same problem with the default one and Python 3.3 https://github.com/fastmarkets/salt-winrepo
14:47 VSpike oh wait
14:49 maggo babilen: no i talked about executing a state if another state had modified a file
14:50 maggo babilen: i gave the reactor a try. but it isn't working
14:50 VSpike OK, thought I'd spotted it but no
14:51 maggo babilen: stop i have a typo lets try again
14:51 SheetiS joined #salt
14:52 Micromus joined #salt
14:52 the_drow Ok so now I have a salt master with salt cloud installed on EC2
14:52 the_drow How do I link that to my git repo so that my cloud configuration will be in source control
14:53 maggo babilen: no it won't work
14:56 anitak joined #salt
14:56 elextro Does anybody know why when I run salt-state statch.orch it tries to render an OLD pillar file? I've updated the file on my local machine but salt-run still tries to render the file without the change.
14:56 thehaven joined #salt
14:57 perfectsine joined #salt
15:01 the_drow I even open up the salt master ports...
15:01 the_drow But I have no idea how to link salt to my git repo
15:02 conan_the_destro joined #salt
15:04 babilen maggo: Why is it important if a state modified a file?
15:04 vejdmn joined #salt
15:04 maggo babilen: http://pastebin.com/6ky9QFqK
15:05 babilen Isn't that just a flag you use to signify "some changes we needed have been performed" ? Can't you test for the attribute you really need directly? (I thought it was SELinux (or rather the lack thereof))
15:05 * babilen begrudgingly clicks on a pastebin.com link
15:06 babilen maggo: Why can't you run "startup_states" earlier? Which attribute of the machine do you rely on and is there a way to test its presence?
15:06 babilen But then, I'm heading home now. All the best!
15:06 maggo babilen: yes but selinux could be set to permissive without reboot
15:07 maggo babilen: but changing to acl support for a root filesystem needs a reboot and i manipulate it with that state. and as i told i couldn't change that with kickstart or an image before
15:08 ndrei joined #salt
15:08 maggo babilen: viq: i have it it is the time the minion needs to load the grains
15:08 che-arne|2 joined #salt
15:08 maggo babilen: viq: by default it will load the grains every 10 minutes and sending them to the master. now if i activate grains caching it works...
15:09 iggy elextro: there are some tools to flush/clear caches... I'd start there
15:11 maggo Doeas someone know how to configure the minon to load the grains on startup immediately
15:12 jergerber joined #salt
15:17 vejdmn joined #salt
15:20 maggo babilen: I studied the saltutil page again and now i understand what you mean. Youl will place the grain information on the master for that minion by writing them however into the grains directory on the master. Now with reactor it will realod the custom grains on the master and it should be available... But the grains.setval couldn't be used here, or?
15:20 ericof joined #salt
15:21 the_drow I have set up gitfs with the master and I'd like to store the salt-cloud configuration on my repo. Is there a guide on how to do that?
15:23 timoguin the_drow: I don't think there's a specific guide for that, but the salt-formula does have support for setting up salt-cloud configs
15:23 timoguin at least it does some of the work.
15:23 timoguin needs some polishing though
15:24 jms joined #salt
15:25 eunuchsocket joined #salt
15:26 jms Hi.  Is anyone here familiar with saltnado on 2014.1.x or 2014.7-rc2?
15:26 the_drow timoguin: Care to walk me through it please?
15:26 smcquay joined #salt
15:29 djstorm joined #salt
15:29 nitti how do i get nested values in pillar using pillar.item()
15:29 davet joined #salt
15:29 the_drow timoguin: Where should my cloud files be?
15:30 nitti for example, 'salt-call pillar.item users' works, but 'salt-call pillar.item users:nitti' does not
15:30 jms nitti: salt-call pillar.get users:nitti is the way to do it
15:31 jms instead of item
15:31 nitti that would work for me except that i can't provide multiple arguments to pillar.get()
15:31 nitti but i can give multiple arguments to pillar.item()
15:32 nitti i'm trying to pull some data out of pillar in order to push it to the mine
15:32 jms ah, not sure then
15:33 timoguin the_drow: i think maybe it only sets up the provider config and keys. see the pillar example: https://github.com/saltstack-formulas/salt-formula/blob/master/pillar.example
15:33 timoguin I'm not managing my cloud config yet, but I need to be.
15:33 jms does anyone know how to get rest_tornado to listen on the external interface.  I can connect via localhost, but not from anywhere else
15:33 nitti i would use this except that i'm not on 2014.7 yet: http://docs.saltstack.com/en/latest/topics/mine/#mine-functions-aliases
15:34 the_drow Is there way to do the same with the master config file?
15:35 the_drow timoguin: I added the salt-formula
15:36 ekristen joined #salt
15:36 jms nitti: I'm not sure how to do what you want in 2014.1.10, but I haven't done much with salt-mine.
15:36 jms hopefully someone else who has can answer better
15:36 nitti no worries, thanks jms
15:37 funzo joined #salt
15:39 the_drow How do I sync all configurations with the salt master?
15:39 nitti i think i will just do pillar.item('network') and put that all in mine, then pull out the bits i need in individual states
15:41 jms nitti: That's what i've done, but I was coming from a different angle, using pepa templating to create pillars full of stuff derived from grains, restful queries to other services, etc.  But to pull nested values I still have to use pillar.get pillarname:nestedkey
15:42 jms unless you combine all the values you want into a toplevel key and just to a pillar.item on that
15:42 nitti yeah
15:42 nitti i can work around it for now until 2014.7
15:43 aparsons joined #salt
15:44 StDiluted joined #salt
15:46 anitak joined #salt
15:50 troyready joined #salt
15:51 scryptic1 joined #salt
15:52 the_drow Should I make /etc/salt a git repo and clone into it the config files that sounds bad
15:54 scryptic1 Has anyone ever had an issue using salt-cloud in which the minion config files lists "master: salt" instead of the actual dns/ip of master? This is after a fresh provision on rackspace
15:54 manfred scryptic1:  that is the deafult master: config for salt-cloud
15:55 manfred scryptic1:  to change it, add
15:55 manfred minion:
15:55 manfred master: <salt master location>
15:55 manfred to /etc/salt/cloud
15:55 perfectsine joined #salt
15:55 manfred so that it will configure /etc/salt/minion on the minion correctly
15:55 scryptic1 ah! thank you
15:55 manfred yeah, you can throw any minion configs you want into that setting in your /etc/salt/cloud file
15:56 manfred (or in your profile, or map file if you want to override it later)
15:56 bezeee joined #salt
15:56 manfred but /etc/salt/cloud is the default settings
15:56 tligda joined #salt
15:56 PI-Lloyd manfred: I didn't realise you could set it in there, I've always set it in the provider config... will remember that one!
15:56 manfred yeah
15:57 manfred lots of good stuff that you can set in /etc/salt/cloud
15:57 timoguin the_drow: look at the example pillar file. the idea is you set all the configuration options for the master's config file and it applies those using a jinja template
15:57 oz_akan joined #salt
15:57 scryptic1 I had it set in my profile, but I left out the minion key
15:57 scryptic1 thank you for the help
15:57 manfred PI-Lloyd:  http://docs.saltstack.com/en/latest/topics/cloud/misc.html
15:58 the_drow Ok I get it
15:58 VSpike salt-call pkg.list_pkgs ... are the names there meant to be the full name of the package, or the package key?
15:59 mrlesmithjr joined #salt
15:59 the_drow timoguin: So I should fork the formula right?
15:59 the_drow How do I cause the salt master to pick up the configuration?
15:59 thayne joined #salt
15:59 Micromus joined #salt
16:00 TyrfingMjolnir joined #salt
16:02 the_drow I'm so lost here :/
16:03 davet1 joined #salt
16:04 timoguin the_drow: I run my master as a minion of itself, so I can just call normal salt states on it.
16:04 timoguin So once the formula is in your file_roots, you should be able to do salt-call state.sls salt.master
16:05 timoguin That formula has really really heavy jinja templates, so it can be hard to figure out what's going on
16:05 chrisjones joined #salt
16:06 timoguin But, yes, you'll want to fork it and add it to your gitfs remotes (or symlink it into your state tree or whatever)
16:09 the_drow timoguin: pillar.example should be pillar.sls right?
16:09 the_drow and I should be using http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#using-git-as-an-external-pillar-source right?
16:13 conan_the_destro joined #salt
16:14 KyleG joined #salt
16:14 KyleG joined #salt
16:15 timoguin the_drow: well not necessary. mine is salt/master.sls and i apply it to my master via the pillar's top.sls
16:15 the_drow how do I cause the salt master to clone the fornyka
16:15 the_drow formula
16:16 timoguin as long as 'pillar.get salt' returns a data structure that looks like pillar.example
16:16 timoguin are you using gitfs?
16:16 the_drow yes
16:17 anotherZero joined #salt
16:17 timoguin fork the repo on github, then add that URL to your gitfs_remotes
16:17 timoguin it should pick it up after restarting the master
16:17 eunuchsocket joined #salt
16:17 hobakilllll joined #salt
16:17 the_drow done and restarted
16:18 ajolo joined #salt
16:20 KennethWilke joined #salt
16:21 CF300498 joined #salt
16:21 vu joined #salt
16:21 the_drow timoguin: still nothing
16:21 the_drow Where should it clone it to?
16:23 timoguin You should just fork it on github, so it's available under your user (or maybe some team account you might use)
16:23 the_drow It is available
16:23 timoguin This way you don't have things automatically updating when people push new commits
16:23 the_drow With the ssh key I provided
16:26 world_weapon joined #salt
16:28 pduersteler joined #salt
16:29 micah_chatt joined #salt
16:29 saurabhs joined #salt
16:31 pduersteler Hi all. I'm playing around with holding pks on certain versions, however I don't seem to grasp how it's done.. I first put nginx into pkg.installed.pkgs, which set up 1.6.1. after that, I defined it as nginx: '< 1.5.9' and then ran state.highstate, but that kept nginx on 1.6.1 and told me that desired versions were installed. Can anybody tell me what I'm doing wrong? https://gist.github.com/pduersteler/74b6d0fbdedd650bbc3b
16:32 bezeee joined #salt
16:32 StDiluted pduersteler: salt won’t remove the old package unless you tell it to
16:33 StDiluted you’d have to purge the old 1.6.1 packages as a requisite of installing the 1.5.9
16:33 manfred can pkgs do versions?
16:34 StDiluted absolutely
16:34 askhan joined #salt
16:34 pduersteler StDiluted: okay, and when I'd do it the other way round, by starting with a lower version and redefining a higher version as max, that would work to update packages?
16:34 pduersteler manfred: according to http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html, yes ;)
16:34 manfred interesting
16:34 StDiluted pduersteler: yes, you can upgrade a package that way, just not downgrade.
16:35 pduersteler StDiluted: okay, that makes sense. Thanks!
16:35 manfred pduersteler:  are you on 2014.7 ?
16:36 pduersteler manfred: 2014.1.10
16:36 pduersteler why?
16:36 manfred a lot of the pkg_verify stuff wasn't added until 2014.7
16:37 pduersteler manfred: didn't ran into errors by now for the features I'm playing with, so I assumed the version is sufficient. But thanks for the information, will keep that in mind
16:37 iclebyte2 joined #salt
16:37 Jean-Michel joined #salt
16:37 manfred yup, looks like it was in 2014.1
16:38 pduersteler another question, to keep it clean: I've put pkgrepo.managed into base / top.sls, is there a way to put them away into other files? I've found a few hints about folder structure for package sls files, but not for repo's.
16:38 kermit joined #salt
16:40 nitti joined #salt
16:40 bhosmer joined #salt
16:41 StDiluted you can put them wherever you like
16:42 StDiluted just need to call them in your top.sls or include them in other states
16:42 iggy just get used to the fact, that you're probably going to be shuffling stuff around for a while and don't worry so much about where you put stuff now
16:42 pduersteler okay, thanks
16:42 bhosmer_ joined #salt
16:42 StDiluted so if you had /srv/salt/repos/nginx.sls for the nginx repo, you could call repos.nginx in top.sls, or you could include: - repos.nginx in your nginx pkg install state.
16:42 iggy I was the same way when I started... obsessed with the best way to do everything
16:43 cwyse joined #salt
16:43 iggy there isn't a best way
16:43 StDiluted salt is extremely flexible in how it lets you do stuff
16:43 StDiluted whatever makes sense to you is the best way, more than likely
16:43 iggy that's another way of putting it
16:45 jaimed joined #salt
16:45 jslatts joined #salt
16:45 pduersteler :D glad I'm not the only one. However, when looking at how other people do things, I'd be glad if they would care just a bit more..  (not just salt-related)
16:46 StDiluted hahaha
16:46 iggy we've all had to clean up somebody else's mess
16:47 pduersteler well basically it's my more-or-less daily job for a few years. everywhere I go I have to enforce some QA guidelines first. I wonder how people work like that. technical debt everywhere
16:47 saltymoli1 joined #salt
16:47 saltymoli1 left #salt
16:47 pduersteler but I'm not complaining, everyone's his own luck-smith (rough translate..)
16:48 VSpike Should pip.installed actually work on windows in its current state?
16:48 VSpike IOW, am I likely doing something wrong, or is it non-functional?
16:51 scottpgallagher joined #salt
16:52 VSpike I reckon most people pipe this channel through egrep -v '\<win(dows)?\>' :)
16:53 Gareth morning morning
16:53 iggy it's built-in to my retinas
16:53 VSpike heh
16:54 VSpike I hate working with it. I get Windows rage and start swearing aloud at the stupidity of it all.
16:56 StDiluted more like I just don’t know so I don’t answer :)
16:56 world_weapon Using the LocalClient.cmd, I've tried to call state.highstate on a targeted minion ( which returned an empty dict {}), then also tried to call cmd.run with 'salt-call state.highstate' (and also ['salt-call', 'state.highstate']) on a targeted minion which returned empty dict also.
16:56 world_weapon The timeout was increased to something ridiculous which made the testing a very long process... Am I doing something wrong in initializing the LocalClient() or calling the cmd function for state.highstate?
16:56 SheetiS VSpike: unfortunately I don't do enough with salt in windows on a regular basis to be useful.
16:56 world_weapon http://fpaste.org/135813/
16:56 UtahDave joined #salt
16:57 world_weapon Interestingly enough, the test.ping returns a dict with the minion id: True
16:57 world_weapon And instantly too.
16:58 StDiluted I have periodically seen calling a salt state from the master to the minion return nothing, even though a test.ping returns immediately. The highstate still got run though
16:58 world_weapon Yeah, when I check the minion, the highstate isn't ran in my case. I would be happy if it was the timeout, but still running.
16:59 StDiluted yah, I haven’t seen taht behavior
16:59 world_weapon Will check the logs for more details then.
16:59 FeatherKing joined #salt
17:00 Voziv joined #salt
17:01 Voziv Is there a way to freeze a version number? I tried using this for nginx on ubuntu 14.04:     - version: '1.4.6-1ubuntu3' however when I run state.highstate it says it can't find the package anymore (because ubuntu released an update to nginx).
17:02 VSpike Any ideas on why this pip.installed is failing https://bpaste.net/show/8163336c9889
17:03 smcquay joined #salt
17:05 killerintersekt joined #salt
17:07 aparsons joined #salt
17:07 SheetiS world_weapon: have you tried to listen to the event bus on your master to see if the highstate was actually triggered there?  http://docs.saltstack.com/en/latest/topics/reactor/#knowing-what-event-is-being-fired <== I know this is the reactor docs, but I've found that the eventlisten script is useful to look at when doing almost any of the API stuff as well.
17:09 smcquay joined #salt
17:09 world_weapon Will check this out. Thanx
17:09 anitak joined #salt
17:10 bmcorser joined #salt
17:11 tligda1 joined #salt
17:11 SheetiS VSpike: looking at that error, it looks like that pip itself is unhappy.  I am used to seeing that error if a path given to pip doesn't exist.  like if you tried to 'pip install /missing/foo' and it didn't exist.
17:12 hobakill joined #salt
17:13 SheetiS VSpike: does a 'pip install colorama' give the same error?  Since you are doing that via salt-call  it would be to the local machine as well.
17:16 SheetiS can always pip uninstall after to make salt do it for the permanent state file or whatever to further test
17:18 Gareth UtahDave: morning
17:18 UtahDave morning!
17:20 linjan joined #salt
17:20 n8n joined #salt
17:20 eagen joined #salt
17:21 ekristen UtahDave: morning!
17:21 UtahDave hey, ekristen!
17:21 ekristen so upgrading to 2014.1.7rc1 seems to be ok in my test environment
17:22 ekristen I’m a little puzzled how my current saltmaster is working at all with ext_pillar git :/
17:22 UtahDave ekristen: do you mean    2014.7rc1?
17:22 ekristen yeah that one
17:22 ekristen used to typing the 1 :)
17:22 UtahDave :)  yeah.
17:23 fragamus joined #salt
17:24 StDiluted morning UtahDave
17:24 UtahDave good morning!
17:24 ekristen UtahDave: I’m a little nervous about updating my salt-master still but I think as long as I get a good backup of it I should be ok
17:24 UtahDave Ya'll better hurry up!  I've only got 36 minutes of morning left!
17:25 SheetiS It's always morning somewhere though right?
17:25 UtahDave that's true.   :)
17:25 SheetiS and as long as the morning in that place is good, we can still all just say good morning!
17:25 StDiluted UtahDave: do you know when someone might be able to look at #16028 for me? I noticed I am not getting the EC2 tags I want, which means automation with capistrano is going to be difficult.
17:26 UtahDave yeah.
17:27 killerintersekt joined #salt
17:28 StDiluted UtahDave: not trying to be pushy, I know you probably have  a ton of things you are working on
17:28 chrisjones joined #salt
17:29 intellix joined #salt
17:29 snuffeluffegus joined #salt
17:31 alanpearce_ joined #salt
17:31 UtahDave Yeah, no problem. We do want to get these all fixed.
17:32 UtahDave StDiluted: is there any way you can test this on 2014.1.11?
17:32 Voziv left #salt
17:33 StDiluted well, how close is that to ‘production’ ready?
17:33 StDiluted this isn’t a production system _yet_
17:33 StDiluted but i intend it to be
17:33 UtahDave It has been released. Probably more production ready than 2014.1.10
17:34 StDiluted oh
17:34 StDiluted sure, then, I dont see why not
17:35 aparsons_ joined #salt
17:36 teepark I had a file.symlink state, then I changed that same file to a file.managed taking the source from a salt:// location. what appears to have happened is that the minion opened the file that was already there (the symlink) and overwrote it, when it needed to detect the symlink and remove it first
17:36 world_weapon SheetiS: Thanx for that. After watching the events, it turns out that the event was fired, but isolating the core functionality that I was testing works only after the minion auth's and is accepted by the master. In the full script, this wasn't happening. The dict is still empty though, but highstate consistently runs now.
17:36 murrdoc joined #salt
17:36 teepark just sanity checking before I start working on a PR: my interpretation is better behavior right?
17:39 SheetiS world_weapon: glad you were able to make some progress :).  You might still be hitting a highstate timeout.  I think you can pass the timeout kwarg, or write it a little differently to obtain the JID and watch the events for the return yourself.
17:39 world_weapon Yeah, cmd_async will give me back the job id I can follow from there.
17:41 killerintersekt joined #salt
17:42 SheetiS :)
17:44 teepark oh, hadn't seen the follow_symlinks option
17:44 StDiluted UtahDave: it’s not on the PPA yet, yes?
17:45 UtahDave Oh, it might not be. Our ubuntu packager has been tied up with work and hasn't finished the package
17:46 StDiluted ok
17:49 aparsons joined #salt
17:49 jalbretsen joined #salt
17:50 halfss joined #salt
17:53 askhan hi if create ntp.sls with  in it
17:53 askhan npt:
17:53 teebes joined #salt
17:53 askhan pkg.installed it works fine
17:54 askhan Data failed to compile:
17:54 askhan ----------
17:54 askhan Name service in sls ntp is not a dictionary
17:54 askhan got the above error with the following in ntp.sls
17:54 babilen http://refheap.com please
17:56 askhan babilen, https://www.refheap.com/90590
17:56 askhan same error with ntp.sls or init.sls
17:57 kermit joined #salt
17:57 SheetiS askhan: the service needs the same indentation as pkg:  i think to fix your problem
17:57 StDiluted indeed
17:58 QuinnyPig Why would cp.get_file fail? The node returns an empty dict when I tell it to copy the file, but it doesn't end up being there. salt $node cp.getfile salt::/source/path/ /destination/path is my syntax; logs show nothing on either side.
17:58 QuinnyPig Best practice is now to blame UtahDave.
17:59 askhan SheetiS, thanks mate its works
18:01 Gareth QuinnyPig: You should right a song...same tune as "Blame Canada" but "Blame UtahDave".
18:02 aparsons joined #salt
18:02 aboe joined #salt
18:03 eunuchsocket Hi all, can someone with access to the saltstack-fomula github organization review pulls on 'snmp-formula'  I have a few commits piling up behind those pull requests that I'd like to get merged
18:03 viq joined #salt
18:05 UtahDave QuinnyPig: did you try adding -l debug?
18:05 UtahDave eunuchsocket: Yeah, I'll do that. Sorry they got overlooked!
18:05 eunuchsocket UtahDave: thanks
18:06 UtahDave done
18:09 kusams_ joined #salt
18:09 bhosmer joined #salt
18:09 askhan guys why /srv/salt/ntp/init.sls works , but /srv/salt/webservers/init.sls give this error
18:09 askhan No matching sls found for 'apache2' in env 'base'
18:10 askhan It works fine if i move /srv/salt/webservers/init.sls -> /srv/salt/init.sls
18:11 ipmb joined #salt
18:11 kermit joined #salt
18:11 SheetiS able to give another paste on refheap or equivalent for it?
18:12 iggy or give us passwords so we can login and look at the files
18:13 perfectsine_ joined #salt
18:14 askhan https://www.refheap.com/90592 , SheetiS this is working
18:14 kballou joined #salt
18:14 askhan Now if i move the apache2.sls to /srv/salt/webserver/init.sls it give me error
18:14 QuinnyPig UtahDave: http://pastebin.com/EALE1tvG That could be more helpful. :-)
18:15 iggy askhan: because at that point it's called webserver, not apache2
18:16 aparsons joined #salt
18:16 SheetiS askhan: did you also make sure that '- sls: apache2' was not referenced anywhere else and that your top.sls now points to '- webserver' instead of '- apache2'?
18:16 intersekted joined #salt
18:17 scryptic1 joined #salt
18:17 askhan i don't have top.sls _ls
18:18 askhan i don't have top.sls*
18:19 UtahDave QuinnyPig: just a minute.  On the phone
18:19 SheetiS askhan: how are you trying to apply the state then?  not with a highstate?
18:19 kingel joined #salt
18:20 askhan SheetiS, newbie here , stats working without top.sls
18:20 askhan duno
18:20 askhan iggy, you are right sudo salt red state.sls webservers -l debug is working
18:22 askhan iggy, still confuse i have /srv/salt/ntp/init.sls working with ntp, however not the apache2 in webservers directory
18:22 SheetiS it takes the folder name
18:22 SheetiS so the folder is ntp for ntp
18:22 SheetiS but you changed the filename from apache2 to the folder 'webservers'
18:22 askhan oh yes
18:22 ajolo joined #salt
18:22 SheetiS if you made the folder 'apache2' it would work
18:23 askhan SheetiS, cool , yeah should works :)
18:23 askhan btw whats is top.sls ? :)
18:23 SheetiS top.sls is the topfile that can determine what states to apply to minions: http://docs.saltstack.com/en/latest/ref/states/top.html
18:24 askhan thanks checking
18:24 SheetiS so you don't have to manually 'salt "minion" state.sls state' for every thing you manage
18:26 midacts joined #salt
18:29 mdaniel joined #salt
18:30 drawks hey all
18:30 drawks don't suppose anyone on this project can give me a little feedback on my recent PR? https://github.com/saltstack/salt/pull/16034
18:31 drawks looks like it merges and passes jenkins
18:31 drawks i tried to follow to contributor/developer guidelines
18:33 VSpike SheetiS: no, pip install colorama is fine
18:34 manfred drawks:  looks good, just need to wait for someone to get to it and merge it
18:34 iggy ^ in the meantime, finish the cleanup and tests you want to do
18:35 drawks well it'll probably take me at least another day or two to get all the test coverage for this module, but what's there so far seems like a reasonable interrim point.
18:36 drawks there was zero coverage before and I found at least a handful of bugs that might as well be fixed for now
18:36 iggy I would say that in the message next time
18:36 iggy it sounds like you've still got more to do in that PR
18:37 drawks heh, well TBH I was hoping to get a good idea what the appetite is for this sort of commit before I put all those hours behind writing it
18:37 manfred yes
18:37 manfred more of those
18:37 drawks not really eager to write 4-500 lines of tests if it won't get pulled
18:37 manfred oh
18:37 manfred it will get pulled
18:38 manfred always happy to have more tests
18:38 jcockhren drawks++
18:39 SheetiS VSpike: that's odd as this line comes from your paste: [INFO    ] Executing command "pip install 'colorama'" in directory 'C:\\Users\\Administrator'.  Then it follows up to say that the error it gets is from stdout (i.e. from pip itself).
18:44 SheetiS I don't have a windows minion handy to try and reproduce it.  I probably need to look at getting a windows minion in my local ESXi test environment at some point.
18:45 mdaniel Hi!  First at all, thank you so much for this wonderful project. Saw that latelly there is plenty of activity in salt-ssh and custom modules and states are supposed to work in branch 2014.7. Can somebody confirm a line like  'salt-ssh hostsystem --refresh state.sls test'  should automatically sync the custom modules and states?  Is there anything I am missing?
18:46 manfred that was my understanding, I haven't tried it yet
18:46 manfred it shouldn't need to refresh it though
18:48 kusams joined #salt
18:49 mdaniel Yes, I also understood --refresh is supposed to be done automatically, but I recall needing it to refresh pillar data. (custom states and modules seems not to sync with or without --refresh or even --refresh-cache)
18:53 jcockhren "Don't automate your automation system as your first project" -- stahnma at puppetconf
18:53 nergdron joined #salt
18:54 nergdron Quick Q... I'm seeing weird behaviour using cmd.run for remote command execution. It seems like if the remote host doesn't return anything within about 10s, it just returns, even if the remote command isn't done. is this expected behaviour?
18:55 manfred mdaniel: no, it isn't done automatically, it just shouldn't be done at all.  Nothing is stored on the remote host, what happens is, we sshin and transfer a binary that has all the modules, it executes and opens a zeromq connection back to the master, then pulls down all the .sls files and configuration files, and then uses the modules from the binary ball to execute all the states
18:55 babilen nergdron: Run the job with "-v" or find them in the output of "salt-run jobs.list_jobs|tail -n100" and then look it up with "salt-run jobs.lookup_jid $JID" -- You probably just ran into a timeout and you can pass, say, "-t 120" to raise that.
18:55 manfred so doing a refresh shouldn't do anything from my understanding
18:56 manfred except maybe refresh the list of custom modules for the host to transfer
18:57 MTecknology How can I diagnose why salt-cp won't get a file down to a system? It just returns {}
18:57 nergdron babilen: yeah, if there's a timeout in cmd.run, that'd explain it. I'll try with -t.
18:57 manfred MTecknology:  should have information in the minion logs
18:58 saltymoli MTecknology: salt-cp -l debug ?
18:58 saltymoli it'll dump more logging info
18:58 saltymoli other than that, you could put print statements in the code
18:58 MTecknology aaah... timeout
18:59 saltymoli check that the key has been added (salt-key -L)
18:59 MTecknology I forgot that salt-cp hates working with larger files. In this case, trying to push Salt-Minion-2014.1.10-AMD64-Setup.exe down to 180 Windows boxes
19:00 MTecknology thanks :)
19:01 bezeee joined #salt
19:02 saltymoli you're using salt-cp to copy the salt installer to salt targets?
19:02 dccc joined #salt
19:02 MTecknology I should just write a state for it instead... I think that's what I did last time.
19:02 MTecknology Is there a better method to update salt on windows boxes?
19:03 saltymoli not that i know of
19:03 basepi felskrone: re: #15933, sorry for my ignorance, but what's the difference between denied and rejected?
19:03 cpowell joined #salt
19:03 jaimed joined #salt
19:04 geekatcmu One makes you feel bad.
19:04 basepi geekatcmu: heh
19:04 felskrone basepi: minions that for example had their key changed for some reason are not rejected because of a configured reject but because the keys dont match
19:05 basepi ah, cool
19:05 basepi I'm leaning towards just doing red, even though it won't be differentiated from rejected
19:05 felskrone but that was not recorded anywhere yet but might happen every now and then in dynami evironments
19:05 VSpike SheetiS: I think it's a quoting issue https://bpaste.net/show/37b5167cd126
19:06 VSpike SheetiS: I put some a couple of print statements into the pip code to see what options and args it was getting
19:06 basepi felskrone: my vote goes towards "magenta"
19:06 basepi because it's closer to red
19:06 basepi ish
19:06 felskrone hehe, and magenta it shall be :-)
19:06 VSpike I spotted the odd quoting in the orignal but I wasn't sure if it was real or just the way the args were printed
19:07 basepi and it needs to be an ansi color which leaves us with few choices.  ;)
19:08 mdaniel manfred: That makes sense. For some reason things doesn't quite work in my  system. I am running salt-ssh 2014.7.0rc2-262-g6d2151c (Helium). Any suggestion how can I follow salt-ssh this up?
19:08 VSpike SheetiS: pip install "'colorama'" produces the same error
19:08 saltymoli any plans to build an installer for alpine linux?
19:09 scryptic1 joined #salt
19:09 saltymoli i've been tooling around with one
19:09 saltymoli if i get it functioning cleanly, where would i upload it?
19:09 VSpike I can't think of any obvious way to work around that one, other than calling pip as a cmd.run for now
19:10 che-arne joined #salt
19:10 aparsons joined #salt
19:10 NotreDev joined #salt
19:10 Ryan_Lane joined #salt
19:11 Ryan_Lane joined #salt
19:11 aparsons joined #salt
19:11 jslatts joined #salt
19:12 manfred saltymoli:  if you get it working, send an email to the salt-users mailing list and get added to the salt-packagers mailing list
19:12 nergdron left #salt
19:13 saltymoli thanks, manfred
19:15 Delfina_Murazik8 joined #salt
19:19 TheThing joined #salt
19:19 MTecknology yup, using a state to push out a file like that is the best option. using salt to update salt on windows systems is a bit interesting
19:20 SheetiS VSpike: my guess is the quoting works in bash/*nix and is used by default to not get errors if there are spaces/etc.  However, that doesn't help you with windows :(
19:21 laxity joined #salt
19:21 baconbeckons joined #salt
19:23 martoss joined #salt
19:23 baconbeckons i need some help with best practices and how my salt state ends up on my salt master
19:24 martoss1 joined #salt
19:26 StDiluted baconbeckons: what do you need
19:26 StDiluted best practices for what exactly
19:26 StDiluted and as far as the salt master’s filesystem, I’d recommend some sort of version control
19:26 StDiluted keep your states and whatnot in git, and then you can check them in and out easily
19:28 StDiluted just dont keep your pillars in there if you have secrets in them
19:28 mgw joined #salt
19:31 MTecknology I keep my pillar data in git, but I'm the only one with access to that one
19:32 StDiluted lol, well, apparently his need was not that great.
19:33 baconbeckons joined #salt
19:34 StDiluted lol
19:34 StDiluted welcome back, baconbeckons
19:35 baconbeckons StDiluted and MTecknology: i have salt states that reside in my server code repo
19:35 baconbeckons this works well for vagrant and salt provisioning
19:35 martoss1 left #salt
19:36 baconbeckons but now that we are deploying these salt states to a new salt master, i’m not sure if this makes sense still
19:36 StDiluted salt master can be managed with salt as well
19:36 mikeym joined #salt
19:36 baconbeckons StDiluted: right, but even so, i’m not sure if how i’ve structured the project makes sense
19:37 baconbeckons is there a repo somewhere that i could look at for an example?
19:37 StDiluted this was mentioned earlier, but there really is no ‘best practice’ for structure
19:38 marco_en_voyage joined #salt
19:40 murrdoc joined #salt
19:40 baconbeckons right now, i have something like this http://dpaste.com/1NNNFGX
19:41 baconbeckons i have formulas added using gitsubtree because gitfs doesn’t work masterless which is how the vagrant provisioner is setup
19:41 baconbeckons the minion config is for a masterless minion for vagrant
19:42 baconbeckons it seems like it would make sense to store my master and cloud configs in the salt folder
19:42 MTecknology I don't usually touch formulas. My structure is this - http://dpaste.com/2NRVHPX
19:42 MTecknology sys isn't really needed, but it makes things pretty imo
19:43 MTecknology break thyme!
19:43 SheetiS mm thyme
19:43 baconbeckons but then i need to make sure that don’t put production config into vagrant
19:43 baconbeckons MTecknology: how do you push changes to the tree you posted to the salt master?
19:44 vejdmn joined #salt
19:44 baconbeckons i think that the part that i’m having trouble wraping my head around is how to seperate files needed for masterless vagrant and files needed for production salt master
19:45 SheetiS baconbeckons: I actually have a state that refreshes the git checkout on my master (gitfs didn't work for my installation, at least until 2014.7 it won't).
19:46 the_drow_ joined #salt
19:46 SheetiS I try and keep my states setup so that they work for both production and vagrant, but have different pillar data for configurations.  Then I don't share the production pillar data for vagrant use.
19:46 martoss joined #salt
19:48 baconbeckons SheetiS: so if i did that as well, would i also put the files from /etc/salt (master, cloud, cloud.profiles etc) into my salt state?
19:48 baconbeckons SheetiS: also, how does that work with the vagrant salt provisioner?
19:48 vejdmn joined #salt
19:48 gmcwhistler joined #salt
19:49 sherbs_tee joined #salt
19:49 kingel joined #salt
19:51 mikeym joined #salt
19:51 halfss joined #salt
19:51 mikeym joined #salt
19:52 mikeym joined #salt
19:52 SheetiS baconbeckons: you can definitely manage the salt master config with salt if you would like (personal preference).  While I version control those things for my master, I don't actually manage them with salt myself.  For vagrant the states used in /srv/salt  on your master could be the same ones you use with the provisioner.  You'd just need to have a minion config that was setup for masterless.  That would be the truly unique thing for va
19:52 mikeym joined #salt
19:53 mikeym joined #salt
19:55 bhosmer joined #salt
19:56 sherbs_tee cmd.retcode is not being honored in jinja in a pillar top.sls
19:56 sherbs_tee http://pastebin.com/kyvzVrG9
19:56 baconbeckons SheetiS: that makes sense except for the masterless minion config file. should i keep it where is, as is? it seems like it has to be there for the vagrant provisioner?
19:57 baconbeckons SheetiS: are you able to share any part of your salt repo?
20:00 VSpike Does anyone know what happens if you have reboot: True in a windows repo package definition? I can't find any docs on it
20:01 VSpike kind of looks like it does nothing, from scanning through the code ... but I may be missing something
20:01 sherbs_tee joined #salt
20:01 VSpike Also, is the locale setting in there only used for comparing the name strings?
20:01 Ryan_Lane UtahDave, basepi: any eta on release? :)
20:01 UtahDave VSpike: Yeah, I don't think it does anything right now. Eventually it should allow you to allow for reboots when installs need
20:01 Ryan_Lane I'm chomping at the bit
20:02 basepi Ryan_Lane: so are we!
20:02 Ryan_Lane I need to upgrade to a newer revision, but it affects our vagrant users, so I only want to do so for the full release
20:02 basepi just waiting on a couple of blockers to cut the last RC
20:02 Ryan_Lane cool
20:02 Ryan_Lane which blockers?
20:02 basepi then we'll begin the testing phase and if the testing goes well, we'll release.
20:02 basepi One RAET bug, and this:  https://github.com/saltstack/salt/issues/15218
20:02 aparsons joined #salt
20:03 aparsons joined #salt
20:03 kingel joined #salt
20:04 VSpike Windows really doesn't help the general lack of understanding of timezones by naming timezones incorrectly... e.g. calling UK local time "GMT standard time"
20:04 nitti_ joined #salt
20:07 UtahDave VSpike: seriously
20:07 VSpike yep
20:07 Ryan_Lane basepi: sounds like it may be pretty soon, then.
20:07 to_json joined #salt
20:08 basepi Extensive testing will be done.  So it may be a couple more weeks.  But yes, soon soon soon.
20:08 Ryan_Lane any consideration for a locked schedule for future releases?
20:08 basepi Depends on what you mean by a locked schedule.  We will never release if it's not ready (I'm looking at you, ubuntu)
20:08 Ryan_Lane I get a bit of pushback from folks when they have no idea when the next version will be released
20:08 basepi But yes, we plan to have a *much* more regular schedule in the future
20:09 basepi Both for open source and enterprise
20:09 Ryan_Lane well, releases will be ready if features are dropped if they don't hit the date
20:09 basepi Right, but right now the issue is bugfixes.  That's what's blocking, not features.  =P
20:09 Ryan_Lane well, it's bugfixes that came from features ;)
20:09 basepi Once the bug count is under control, then yes, we just drop features if they don't make it in
20:10 basepi Sure
20:10 VSpike UtahDave: you prolly saw the pull request for the salt-winrepo. Python 3.4 is a bonus because it includes pip, which is otherwise quite painful to install on Windows. So now we just need the pip.installed state to work :)
20:10 Ryan_Lane it's been like what, 8 or 9 months since the last release?
20:10 basepi In any case, yes, we plan to have a very regular release schedule.  And bugs blocking will become less and less of a problem as the test suite grows and our QA team gets more and more awesome.
20:11 Ryan_Lane that means there's going to be an insane number of features and changes, which is also worrying for upgrading.
20:11 VSpike I've still got a few more things to add ... mercurial at the least.
20:11 UtahDave VSpike: No, I hadn't seen that PR. Thanks!   I'm not sure why I didn't get a notification
20:11 basepi Ryan_Lane: yep.  our biggest release ever.  That said, we have a *lot* of people who are running 2014.7 or develop right now, the test suite is passing more than it ever has before....I'm more confident of this release than any previous feature release.
20:12 Ryan_Lane basepi: my biggest complaint is that I've been hearing "it'll be a couple weeks" for almost two months now :(
20:12 * basepi knocks on wood
20:12 basepi Yep
20:12 Ryan_Lane I'm running develop because the current stable isn't usable for my use case
20:12 Ryan_Lane it's a really bad state to be in
20:12 basepi Right
20:12 arnoldB Ryan_Lane++
20:13 bezeee joined #salt
20:13 arnoldB another reason why i am using develop is that the current stable release isn't really stable :)
20:13 fragamus joined #salt
20:13 Ryan_Lane heh. well, I haven't had that issue
20:14 arnoldB but mostly because of the big amount of new features
20:15 UtahDave arnoldB: Hey, do you have a way to ping felskrone? I need him to forward me an email.
20:15 Ryan_Lane arnoldB: yeah, I need some of the new features. specifically I need listen/listen_in and the boto_* stuff I added
20:16 arnoldB UtahDave: will do it later. brb in a hour
20:16 UtahDave arnoldB: cool, thanks
20:17 linjan joined #salt
20:20 baconbeckons joined #salt
20:24 MTecknology he left :(
20:26 vejdmn joined #salt
20:29 StDiluted UtahDave: so weird that you can’t repro. maybe something is messed up on my salt master… I don’t know what it would be though
20:29 marco_en_voyage joined #salt
20:30 UtahDave StDiluted: possibly. Maybe something in your provider config?  I used your exact profile and ami, just changed to use my aws provider config
20:31 StDiluted do you have ssh interface set to public_ips or private ips
20:31 StDiluted tht’s literally the only thing that has an option in the providers
20:32 StDiluted I’ll try with public
20:32 marco_en_voyage left #salt
20:32 linjan joined #salt
20:33 StDiluted how can i remove saltcloud and reinstall it
20:33 StDiluted maybe i have some old python file hanging around? This was an upgrade to hydrogen, not a fresh install
20:34 timoguin It's bundled with salt now.
20:34 StDiluted hm
20:34 StDiluted oh well taht explains the hell out of it
20:34 StDiluted hahahaha
20:34 StDiluted please close that ticket, UtahDave
20:35 UtahDave Oh, was that the issue?
20:35 StDiluted salt-cloud --version
20:35 StDiluted salt-cloud 0.8.9
20:35 UtahDave boom.
20:35 UtahDave Do you want to test first before I close that ticket?
20:36 StDiluted yeah, I just need to figure out how to use the right executable, yeah?
20:37 aparsons joined #salt
20:37 catpiggest joined #salt
20:37 StDiluted hrm, need upgraded libcloud
20:37 iggy pip uninstall salt-cloud?
20:38 forrest joined #salt
20:38 _rene left #salt
20:39 StDiluted salt-cloud 2014.1.10 (Hydrogen)
20:39 StDiluted ok. let’s see how it works now :)
20:40 n8n joined #salt
20:40 glyf joined #salt
20:43 StDiluted yep
20:43 StDiluted that was it
20:43 StDiluted jesus, I am an idiot. Sorry.
20:45 n8n joined #salt
20:48 jhauser joined #salt
20:53 to_json joined #salt
20:53 to_json joined #salt
20:53 kickerdog joined #salt
20:54 kickerdog Hey guys, is there a resolution for this bug? https://github.com/saltstack/salt/issues/14963 AWS VPC's are basically useless with salt-cloud right now.
20:56 iggy have you tried the latest salt and libcloud release?
20:57 kickerdog are these not the latest?
20:57 kickerdog [root@ip-10-100-0-104 salt]# rpm -qa |grep salt
20:57 kickerdog salt-2014.1.10-4.el7.noarch
20:57 kickerdog salt-master-2014.1.10-4.el7.noarch
20:57 kickerdog salt-minion-2014.1.10-4.el7.noarch
20:57 colinbits joined #salt
20:59 iggy release wise
20:59 iggy there's newer in git
20:59 kickerdog ah
20:59 timoguin I'm using VPCs with 2014.1.10 just fine.
20:59 iggy salt-cloud is a moving target
20:59 timoguin I'm not using instance profiles atm though.
21:00 kickerdog are there dev rpm packages?
21:00 ekristen timoguin: that is my concern with upgrading from salt 2014.1.0rc1 to 2014.7rc1 that salt-cloud might break
21:02 aparsons_ joined #salt
21:02 timoguin ekristen: yea I haven't had time to test for upgrades yet
21:02 timoguin kickerdog: there aren't RPMs right now, but you can install from pip or straight from git
21:03 ekristen timoguin: I tested my pillars and states to a degree, seem to work ok
21:03 ekristen but I didn’t have salt-cloud setup on my test env :/
21:03 iggy one of the reasons I'm glad we actually have separate salt masters for dev/qa/prod (instead of trying to run one for all 3 environments)
21:03 ekristen iggy: omg that would drive me nuts
21:03 ekristen iggy: I use salt environments
21:03 ekristen easy as pie
21:04 aparsons joined #salt
21:04 ekristen separate branch per environment
21:04 StDiluted i really could not figure out environments when i started
21:04 iggy except pillars
21:04 iggy we could never get pillar environments working
21:04 timoguin I had an issue with the salt mine not working when I first tried. Didn't have time to test any further.
21:05 SheetiS I use salt environments, but have a separate 'salt testing' master with a handful of VMs that get all of my states applied to them at various points.  That way I can test new versions of salt before rolling it out at all.
21:05 timoguin Looking forward to all the boto stuff though
21:05 iggy and it turned out better in the long run... now I can throw beta versions of salt into dev and not get shot by qa/my boss
21:05 ekristen I do wish salt pillars using git worked like states though
21:05 timoguin I test everything locally with vagrant before pushing out to dev
21:05 ekristen UtahDave: why do states and pillars for environments work differently?
21:06 iggy pillars just haven't caught up
21:06 iggy I imagine at some point they'll be equivalent
21:07 kickerdog timoguin: looks like pip installing over the rpms worked
21:07 kickerdog thanks
21:07 the_drow_ I have the following pillar: https://bpaste.net/show/8437fd1eac5c For some reason salt reports that Rendering SLS "base:salt.cloud" failed: Jinja variable 'dict object' has no attribute 'folders'; line 31
21:08 the_drow_ This is using the salt-formula formula
21:09 Benjamin_ joined #salt
21:09 eunuchsocket Ryan_Lane: I just read your blog entry on salt vs ansible.  Good stuff!  Thanks for sharing
21:10 Ryan_Lane thanks :)
21:10 StDiluted yeah i read that earlier too
21:10 StDiluted hehe
21:10 Ryan_Lane glad you likes it
21:10 Ryan_Lane *liked
21:10 StDiluted i read a bunch of your stuff last week actually
21:10 StDiluted trying to figure out how to do these deploys with salt
21:10 timoguin the_drow_: that pillar looks right. can you run 'salt-call pillar.get salt' on the master? and see if it matches what's in your SLS
21:10 timoguin if not you may need to saltutil.refresh_pillar
21:10 the_drow_ I have no master yet
21:11 the_drow_ local is empty...
21:11 timoguin salt-call on the minion then
21:11 Ryan_Lane StDiluted: what kind of deploys are you trying?
21:11 timoguin Ryan_Lane: it is indeed a great blog post, probably the best comparison I've read. Sent it to someone else for reading yesterday
21:11 yomilk joined #salt
21:11 StDiluted Ryan, I’ve got a RoR app, with nginx, unicorn, sidekiq. Trying to figure out a good pattern for autoscaling.
21:11 Benjamin_ left #salt
21:11 timoguin the_drow_: yea, refresh pillar and see if it shows up.
21:11 Ryan_Lane ah
21:12 Ryan_Lane I personally prefer masterless
21:12 Ryan_Lane and even if you go with a master, I still think file_client: local is the way to go
21:12 ekristen Ryan_Lane: that seems like a major PITA unless you only have 2 servers
21:12 Ryan_Lane ekristen: I have hundreds
21:12 Ryan_Lane and it's *way* easier
21:12 Ryan_Lane that said, remote execution is good to have
21:13 the_drow_ timoguin: how do I do that?
21:13 Ryan_Lane masterless is more compatible with things like docker as well
21:13 timoguin the_drow_: salt-call saltutil.refresh_pillar
21:13 ekristen Ryan_Lane: how so? I use master and have ZERO problems
21:13 ekristen and use docker almost exclusively
21:13 ekristen unless you mean you are doing salt inside of docker
21:13 the_drow_ local is still none
21:13 Ryan_Lane well, then you're not really using a master as the file client :)
21:13 VictorLin joined #salt
21:14 Ryan_Lane are you generating docker images, then running them places?
21:14 Ryan_Lane if so, you're going with a model pretty similar to me
21:14 the_drow_ timoguin: There should be a tutorial that explains how to do it with the salt formula
21:14 Ryan_Lane it's still a form of masterless
21:14 ekristen Ryan_Lane: I have a docker registry, index, and a docker build server
21:14 StDiluted Ryan_Lane: would love to hear any thoughts you have about RoR app deployment
21:14 ekristen the docker build server builds all my images based on repos and Dockerfiles
21:14 Ryan_Lane StDiluted: are you in AWS?
21:14 StDiluted yep
21:15 Ryan_Lane I use the boto_* modules
21:15 ekristen and then triggers salt master to deploy the images on whatever server they belong too
21:15 StDiluted i saw that
21:15 Ryan_Lane StDiluted: I'd imagine you read this? http://ryandlane.com/blog/2014/08/26/saltstack-masterless-bootstrapping/
21:15 timoguin the_drow_: okay. your minion is not getting its pillar then. did you modify your pillar top.sls at all? that's what will actually assign pillars to your minions
21:15 StDiluted I did. I’m using a salt master
21:15 Ryan_Lane we have a deployment method that builds artifacts
21:15 StDiluted so it wouldnt be exactly the same
21:15 the_drow_ base: '*': - salt
21:15 Ryan_Lane we push the artifacts to S3, and on the nodes we pull the artifacts
21:16 StDiluted *nod* we push our code to git, check it out, and do some deploy tasks.
21:16 StDiluted right now it’s a custom script that deploys
21:16 Ryan_Lane I have another kind of deployer as well
21:16 StDiluted but I’ve been looking at somethign like capistrano/ec2-cap
21:16 Ryan_Lane that I'd eventually like to add my artifact generation to
21:16 Ryan_Lane https://github.com/trebuchet-deploy
21:16 Ryan_Lane ^^ that's used at Wikimedia Foundation
21:17 Ryan_Lane it's a git based deployment system that uses salt
21:17 StDiluted or possibly something like etcd/zookeeper to detect new instances tha tgot spun up from autoscale and deploy to them
21:17 StDiluted ah cool
21:17 timoguin the_drow_: link the rest of your pillar data (cleaned up of course). it's expecting a nested dict like salt['cloud']
21:17 Ryan_Lane I've been pretty bad about making it useable outside of wikimedia
21:17 aquinas_ joined #salt
21:17 Ryan_Lane but in the last week I've been adding some AWS example code
21:17 Ryan_Lane it's not fully usable yet
21:17 StDiluted I’ll keep an eye on it
21:17 the_drow_ ok, just a minute. my gf just spilled 3 secs glue on herself
21:18 StDiluted hahaha
21:18 StDiluted oops
21:18 Ryan_Lane StDiluted: https://github.com/trebuchet-deploy/trebuchet/tree/add-example/example
21:18 ekristen Ryan_Lane: you work for wikimedia?
21:18 Ryan_Lane ekristen: I used to
21:18 Ryan_Lane I work for Lyft now
21:18 ekristen ah
21:19 timoguin the_drow_: SAVE HER!
21:19 dccc joined #salt
21:19 blackhelmet joined #salt
21:20 ekristen I don’t see how using masterless on hundreds of servers is easier — seems to be way more complex, how do you keep everything the sync’d — then if there is no master you can’t autodiscover services between servers — seems like a lot of manual configuration
21:20 ekristen glad it works for you though
21:20 ekristen :)
21:21 Ryan_Lane ekristen: naming conventions
21:21 Ryan_Lane and eventually etcd or zookeeper
21:21 Ryan_Lane naming conventions solve basically all problems, though
21:22 the_drow_ timoguin: https://bpaste.net/show/2e632c1d6cdf
21:22 timoguin I really wanna pair CoreOS and Salt, but the chicken/egg stuff blows up my head
21:22 Ryan_Lane I'm not a fan of coreos
21:22 dcmorton joined #salt
21:22 Ryan_Lane I've been using it
21:22 Ryan_Lane I'd rather be on ubuntu
21:22 ekristen Ryan_Lane: I could see how naming conventions could work to a point
21:23 timoguin the_drow_: hmm, that looks correct assuming your top.sls is applying that SLS to your minion.
21:23 unstable joined #salt
21:23 vejdmn joined #salt
21:23 ekristen CoreOS is neat, still a long way to go before its usable
21:23 Ryan_Lane past that, haproxy + zookeeper works pretty well for all external services
21:23 timoguin 'saltutil.refresh_pillar' and 'pillar.get salt' on the minion should give you those pillar values
21:24 Ryan_Lane or haproxy + etcd
21:24 the_drow_ timoguin: but it doesn't
21:24 the_drow_ vulcand will be much better :)
21:24 ekristen Ryan_Lane: well since I have a salt master I just use salt + haproxy to handle that
21:24 Ryan_Lane I don't like relying on a service that's a SPOF
21:24 the_drow_ but that's horrible :P
21:24 Ryan_Lane and salt master are definitely that
21:24 unstable If I'm running a salt command on 200 boxes, how can I do it in chunks of 25
21:24 unstable to keep the load not as high
21:24 ekristen SPOF?
21:24 timoguin the_drow_: I'm not sure what's going on then. Maybe try running the minion in the foreground to see if there are any errors
21:25 Ryan_Lane yes. I can't have 3 salt masters spread across availability zones
21:25 timoguin there may be a syntax error that's causing the pillar to fail loading
21:25 ekristen oh single point
21:25 Ryan_Lane zookeeper can be
21:25 ekristen Ryan_Lane: why not?
21:25 UtahDave unstable: --batch 25
21:25 Ryan_Lane ekristen: because how does 0mq work in that situation?
21:25 timoguin You can totally have 3 salt master in different availability zones.
21:25 Ryan_Lane where do events go?
21:26 timoguin But multi-master is still pretty hacky
21:26 Ryan_Lane where does data get returned?
21:26 Ryan_Lane how does the job cache work?
21:26 unstable UtahDave: huzzah! Thanks for the help.
21:26 Ryan_Lane I've never gotten reasonable answers for that and the last time I tried multi-master salt I decided it's not any better than single master from an availability POV
21:26 UtahDave you're welcome, unstable
21:27 UtahDave Ryan_Lane: We've made a LOT of improvements to multi master for 2014.7.  It was arguably pretty raw in previous releases
21:27 ekristen Ryan_Lane: fair questiions
21:28 timoguin Ryan_Lane: yea I'm wanting to getting it working with salt-eventsd so I can dump everything externally rather than relying on the masters
21:28 DaveQB joined #salt
21:28 Ryan_Lane I think salt-api + ELBs + external job cache + master job cache may work
21:29 the_drow_ timoguin: It's trying to connect to a master
21:29 Ryan_Lane but events may still be broken
21:29 UtahDave also, there's master job cache. Minions return to the master over zmq as usual, but the master keeps all that data in your favorite database
21:29 timoguin the_drow_: edit your minion config to say file_client: local
21:30 ekristen timoguin: what do you mean by using salt-eventsd and dump it externally?
21:30 the_drow_ timoguin: done. same result.
21:30 timoguin ekristen: someone created a package called salt-eventsd that listens to the event bus on the master and dumps everything into a database
21:31 Ryan_Lane I think the master job cache solves that problem now
21:31 ekristen timoguin: interesting
21:31 UtahDave yep.
21:31 timoguin ekristen: https://github.com/felskrone/salt-eventsd
21:31 kickerdog timoguin: tried out the latest develop salt-cloud code, still broked.
21:31 kickerdog [ERROR   ] EC2 Response Status Code and Error: [400 400 Client Error: Bad Request] {'Errors': {'Error': {'Message': 'Network interfaces and an instance-level security groups may not be specified on the same request', 'Code': 'InvalidParameterCombination'}}, 'RequestID': '0fd8788e-ffef-4712-8ab9-80c9f8c6911a'}
21:31 kickerdog [ERROR   ] There was a query error: 'str' object does not support item assignment
21:31 ekristen kickerdog: whats your profile look like
21:32 UtahDave salt-eventsd is pretty useful if you want to be able to dynamically put events in different places.  If you just want it all in a database the master job cache will do that just fine
21:32 ekristen kickerdog: sounds like your profile is written incorrectly
21:32 the_drow_ timoguin: It won't pick up my config
21:32 the_drow_ Arggg
21:32 ekristen master job cache is what sort of db? what version of salt did that show up?
21:32 kickerdog timoguin: http://pastebin.com/iYrGTydX
21:33 SheetiS kickerdog: https://github.com/saltstack/salt/issues/14963 looks like this bug so probably already a known issue
21:33 Ryan_Lane ekristen: pretty sure it's 2014.7
21:33 Ryan_Lane would be nice if the docs mentioned that
21:34 timoguin kickerdog: are you defining an iam_profile in your aws-provider config? looks like that's what's causing that issue
21:34 ekristen kickerdog: what does your profile look like?
21:34 timoguin I'm not using iam profiles for my minions atm and it's working fine
21:34 ekristen kickerdog: provider profile*
21:34 kickerdog um, I don't think i'm using a iam profile
21:35 ekristen kickerdog: what is in your provider file?
21:35 ekristen please remove your sensitive info
21:35 timoguin the_drow_: does the minion have file_roots and pillar_roots defined? so it knows where to look for them?
21:36 the_drow_ nope. it should use the default no?
21:36 timoguin it should, yea.
21:36 kickerdog @ekristen http://pastebin.com/7TdTJmLM
21:36 ekristen securitygroup: default
21:36 ekristen that is your problem
21:36 ekristen remove that
21:36 ekristen and you should be good
21:37 kickerdog ah, nuts! Thanks for your help
21:37 the_drow_ I'm lost... Completely
21:37 the_drow_ Why is this so hard?
21:37 sherbs_tee jinja templates in pillar are ignoring cmd.retcode: http://pastebin.com/kyvzVrG9
21:37 baconbeckons joined #salt
21:39 ekristen kickerdog: anytime, let me know if that doesn’t work for some reason
21:40 timoguin the_drow_: I'd get it to where you can set pillar variables at all. And then try again.
21:41 the_drow_ timoguin: It's still trying to connect to a master
21:42 nlb joined #salt
21:42 timoguin the_drow_: weird. i know that was an issue a while back, but should have been fixed. clear /var/cache/salt, restart minion, try again?
21:42 sherbs_tee UtahDave: could use some more magic :)
21:43 UtahDave what's up?
21:43 sherbs_tee looks like jinja templates are ignoring the value of cmd.retcode
21:43 sherbs_tee unless I'm missing something crazy: http://pastebin.com/kyvzVrG9
21:44 Vye joined #salt
21:45 jalaziz joined #salt
21:45 sherbs_tee for pillar, that is
21:47 the_drow_ timoguin: I just tried with salt-ssh and I get the same error with the pillar not being defined
21:47 UtahDave sherbs_tee: pillar is compiled on the master, so your pillar.get command is running on the master itself, not on the minion
21:48 sherbs_tee UtahDave: but that's ok...I'm just grabbing part of the path with that piece
21:48 timoguin the_drow_: you shouldn't need salt-ssh. you're running the saltutil.refresh_pillar and pillar.get commands on the minion itself, right?
21:48 kermit joined #salt
21:49 the_drow_ yes
21:49 sherbs_tee UtahDave: it's the part where the if statement compares new_role to 0
21:49 the_drow_ But I tried it with salt-ssh just to see if it solves my problem
21:49 the_drow_ salt-ssh is installed locally here :)
21:49 sherbs_tee UtahDave: and if I print the value of new_role, it shows properly
21:49 timoguin the_drow_: Is it still trying to connect to a master?
21:50 the_drow_ Hold on. checking
21:50 kingel joined #salt
21:50 UtahDave try adding single quotes around the 0        if new_role == '0'
21:51 sherbs_tee processing...
21:51 Ryan_Lane any word on debs for 2014.7? :)
21:51 Ryan_Lane will they be available when the release occurs?
21:52 UtahDave :)  That's the plan.
21:52 halfss joined #salt
21:52 sherbs_tee UtahDave: same result :/
21:52 Ryan_Lane it would be awesome if we could have some before release
21:52 steve1 Hello.  I've been using salt in master-less mode for a while, but I recently started to integrate in a master.  I'm experiencing very fickle minion-master connections.  Even with the minion running on the master, doing a "salt salt-master\* test.ping" more often returns nothing than the master's minion replying to the ping.  It'll reply blazingly faster for a few seconds after restarting the minion service, then go back to fickle.  I have the mast
21:52 the_drow_ timoguin: yes
21:52 Ryan_Lane I've been building stuff lately that could definitely use it
21:53 Ryan_Lane steve1: IRC cuts off messages that are too long
21:53 iggy ^
21:53 UtahDave Ryan_Lane: we're working on automating all that. We're going to have rpms and windows installers building nightly soon.  debs should be soon after
21:53 iggy I'd guess zmq
21:53 Ryan_Lane steve1: yours got cut off at: I have the maste
21:53 steve1 my bad, I'll re-post from "maste"…
21:54 steve1 … I have the master's IP hard-coded in all the /etc/salt/minion.d/master.conf files.  Calling "salt-call test.ping" from the minion always works too.  It just seems to be a problem with the master => minion calls.  Any idea what might be going wrong?
21:55 UtahDave steve1: what versions of salt on your master and minions?
21:55 linjan joined #salt
21:55 steve1 2014.1.10 (Hydrogen)
21:56 bmonty joined #salt
21:56 ingwaem joined #salt
21:57 the_drow_ UtahDave: can you please help? I'm trying to install salt on a fresh machine using the salt-formula and the salt minion I installed using salt-bootstrap isn't picking up the pillar and tries to connect to a master even though file_client is local
21:57 timoguin the_drow_: waaaaait a minute. gitfs doesn't work with masterless. that could have something to do with it.
21:57 ingwaem Greetings all, does anyone by chance have a sample profile for vsphere salt cloud?
21:57 the_drow_ timoguin: I cloned with git manually
21:58 timoguin well i'm out of ideas then. heading home...
21:58 UtahDave steve1: try setting random_reauth_delay: 10     in your minion configs
21:58 the_drow_ I think it's time for the maintainers to step in...
21:58 UtahDave steve1: If you look in your job cache you'll see that all the command ran just fine. It's just the salt master not waiting on the command line correctly
21:59 ekristen kickerdog: that work for you?
21:59 the_drow_ UtahDave basepi ping?
21:59 UtahDave the_drow_: what salt-formula are you using?
21:59 the_drow_ UtahDave: salt-formula.... the one that manages salt
22:00 UtahDave I have no idea what you're talking about, the_drow_ .  do you have a url?
22:00 kickerdog ekristen: it did
22:00 ekristen fantastic
22:00 kickerdog New issue though… bootstrap doesn't like RHEL7
22:00 kickerdog ERROR: Stable version is not available on RHEL 7 Beta/RC. Please set installation type to git.
22:00 the_drow_ UtahDave: https://github.com/saltstack-formulas/salt-formula
22:01 kickerdog Is there a alternative to 'script: bootstrap-salt'
22:02 the_drow_ kickerdog: It's probably new. Issue a bug report
22:03 the_drow_ I have to get a master running till 10:00 am and it's already 1:00am and still no luck
22:03 sherbs_tee who's got experience with cmd.retcode in a jinja template (not CLI)?
22:03 UtahDave the_drow_: yum install salt-master
22:03 the_drow_ ubuntu...
22:03 sherbs_tee what gives? http://pastebin.com/kyvzVrG9
22:03 UtahDave the_drow_: sudo apt-get install salt-master
22:03 UtahDave I guess add the ppa first
22:04 the_drow_ and I want to configure salt using a formula since it will allow me to add it to source control
22:06 UtahDave so you're using salt to install salt?
22:06 the_drow_ yup
22:06 bhosmer joined #salt
22:07 the_drow_ frankly I'd rather not ssh into the machine at all and use salt-ssh to do it but salt-formula uses watch which is not supported on salt-ssh
22:07 Gareth UtahDave: Can't you use the bootstrap scripts to install Salt from the packages.
22:08 UtahDave Gareth: the bootstrap script uses packages by default
22:08 the_drow_ It's not the package I'm worried about. It's the configuration.
22:08 UtahDave you have to tell it to install from git
22:08 Gareth the_drow_: what configuration do you need to do?
22:08 Gareth UtahDave: thought so.
22:09 iggy I have a ~50 line long bootstrap script that sets up ssh keys (for private github repos) and does the package install and minimal config to get it to start managing itself
22:09 the_drow_ mainly salt-cloud and I want to be able to store it with git
22:09 iggy I don't think you can get away from bootstrapping at least some part of your system outside of salt
22:10 tkharju joined #salt
22:11 saltymoli joined #salt
22:12 UtahDave the_drow_ is this a vm you could spin up with salt-cloud?
22:12 the_drow_ not yet.
22:13 the_drow_ I don't have a salt master to spin it up with
22:14 the_drow_ ok. Now I launched a completely fresh machine.
22:14 kusams joined #salt
22:14 UtahDave salt-cloud doesn't require a master be running
22:14 the_drow_ So I can probably spin it up using salt-cloud. I have only used masterless salt until now so I have no clue
22:17 the_drow_ same error. 2014-09-23 22:16:55,368 [salt.crypt       ][WARNING ] SaltClientError:  2014-09-23 22:17:05,379 [salt.utils       ][ERROR   ] This master address: 'salt' was previously resolvable but now fails to resolve! The previously resolved ip addr will continue to be used
22:17 the_drow_ file_client is set to local
22:17 UtahDave the_drow_: can you pastebin your config files
22:18 the_drow_ sure
22:18 oz_akan joined #salt
22:18 sherbs_tee thoughts? http://pastebin.com/kyvzVrG9
22:19 the_drow_ UtahDave: https://bpaste.net/show/f06f296c32d6
22:19 the_drow_ installing from develop now to see if the problem is still there
22:19 UtahDave sherbs_tee: I'm sure it's just a jinja idiosyncrasy.  I wish whiteinge were here to help.  :)   You might try asking on the mailing list.
22:20 sherbs_tee awesome..ok
22:21 UtahDave the_drow_: OK, so how are you getting the files on there? How are you installing salt? What are the commands and their outputs you're trying on the cli?
22:21 UtahDave sherbs_tee: sorry I'm not more help with that. Jinja can be tricky
22:21 UtahDave back in a sec
22:21 sherbs_tee UtahDave: that's ok man...I appreciate that help
22:22 iggy sherbs_tee: ls /srv/salt/salt-pillar/role/mattdenv it's /srv/salt/salt-pillar/role/otherenv or is that what you're trying to figure out?
22:22 QuinnyPig UtahDave: Yeah, this is odd. I blame some of the custom nonsense.
22:22 the_drow_ UtahDave: salt-call state.highstate
22:25 the_drow_ UtahDave: salt still tries to connect to a master with develop even though file_client is local
22:25 the_drow_ Is this a severe regression or something
22:25 UtahDave the_drow_: what's the output you're getting?
22:26 UtahDave hey, QuinnyPig
22:26 Gareth sherbs_tee: I think I see your issue.
22:26 Gareth sherbs_tee: put self before
22:26 Gareth er
22:26 unstable left #salt
22:26 Gareth sherbs_tee: put self before + '/role/'
22:30 Gareth sherbs_tee: so, set new_role = salt['cmd.retcode']('ls ' + salt['pillar.get']('master:pillar_roots:base')[0] + self|replace('.','/') + '/role/')
22:30 sherbs_tee Gareth: you rock....will try that now
22:31 the_drow_ UtahDave: https://bpaste.net/show/2a63414acbca
22:31 the_drow_ The logs indicate that the salt minion still tries to connect to a master
22:32 tkharju joined #salt
22:32 sherbs_tee Gareth: actually, the code works as expected as-is...meaning, the path resolves correctly, and even cmd.retcode returns what I expect
22:32 the_drow_ My pillars are under /srv/salt/pillars
22:32 sherbs_tee Gareth: the problem is when I use new_role as a comparison...it ignores the id
22:32 sherbs_tee *if
22:33 the_drow_ well it isn't
22:33 UtahDave the_drow_: Where do you see it looking for the master?  Are you setting your pillar_roots and your file_roots in your minion config?
22:33 * the_drow_ facepalms
22:33 sherbs_tee Gareth: if you look under Output, you can see that the path builds correctly
22:34 the_drow_ /srv/pillars/
22:34 sherbs_tee Gareth: but it's like Salt doesn't care about the next line - {% if new_role == 0 %}
22:34 the_drow_ UtahDave: The logs say SaltClientError:  2014-09-23 22:17:05,379 [salt.utils       ][ERROR   ] This master address: 'salt' was previously resolvable but now fails to resolve! The previously resolved ip addr will continue to be used
22:35 Gareth snuffop: hlj
22:35 UtahDave the_drow_: I think you have to specify your pillar_roots in your minion config.
22:36 the_drow_ I used git pull to get the files in there
22:36 the_drow_ nevermind tired and I scrolled up by mistake
22:36 the_drow_ yes I do have to
22:36 Gareth sherbs_tee: You're ls command is failing....based on your directory structure it should fail.  /srv/salt/salt-pillar/mattdenv/role but you're looking for /srv/salt/salt-pillar/role/mattdenv
22:36 Gareth s/You're/Your/
22:37 sherbs_tee Gareth: that's what I'm saying...the latter is current how we have pillar laid out
22:38 ekristen UtahDave: any reason why upgrading to salt 2014.7rc1 would break salt-cloud, I haven’t tried, just curious if you knew of an out right reason why it might break
22:38 the_drow_ Ok, now to real problems and not just my own stupidity :P
22:38 UtahDave ekristen: are you seeing breakage?
22:38 yomilk joined #salt
22:38 the_drow_ Is this a bug with salt-formula? https://bpaste.net/show/8058425a4de8
22:39 SEJeff joined #salt
22:39 SEJeff I think I've ran into a bug and was curious if it was by design
22:39 SEJeff I've found that pillars can't access custom modules
22:39 SEJeff And I need it to :)
22:39 ekristen UtahDave: no — haven’t tried to re-setup salt-cloud with 2014.1.0rc1 and then upgrade yet, was more curious if you knew of any reason why it wouldn’t work with the newer version especially since it is built it now, thats all
22:39 sherbs_tee Gareth: oh I think I see the issue
22:39 SEJeff I made a pillar that was:
22:39 sherbs_tee more to come...
22:40 sherbs_tee thank you for looking at it
22:40 SEJeff modules: {{ salt.keys()|sort }}
22:40 SEJeff and it didn't return a single one of my custom modules. UtahDave: Is this by design?
22:41 UtahDave SEJeff: are you running a minion on your master?
22:41 SEJeff In this case, yes
22:42 UtahDave ekristen: My experience is that upgrading fixes any bugs i was seeing in the earlier version.  Test your current configs on another vm/machine, though.  Always test.
22:42 SEJeff For testing, we have a master on on this minion and pointed the minion to localhost.
22:42 ekristen UtahDave: yeah, working on it :)
22:42 UtahDave SEJeff: If you run salt 'id' saltutil.sync_modules, then your custom modules should show up, I believe
22:42 kiwnix joined #salt
22:43 the_drow_ nope. Just me again.. no bugs. carry on
22:44 UtahDave SEJeff: If that doesn't work, set the extension_modules option in your master config to a directory with a "modules" directory inside with your custom module. Restart the salt-master. I think that should work
22:44 UtahDave OK, I have to head home. I'll probably be on later tonight
22:44 SEJeff UtahDave, I already did that and it shows up fine with salt-call -d module.name. I think this is a bug :/
22:45 ajprog_laptop joined #salt
22:45 SEJeff A critical one for me at the moment
22:45 SEJeff UtahDave: see ya dude!
22:45 ekristen later UtahDave
22:45 UtahDave later!
22:46 UtahDave left #salt
22:46 the_drow_ see ya
22:47 jhauser joined #salt
22:49 Outlander joined #salt
22:52 anitak joined #salt
22:53 aquinas joined #salt
22:55 NotreDev joined #salt
22:57 bhosmer joined #salt
23:00 perfectsine joined #salt
23:00 drawks a new PR... lets see if jenkins plays along today
23:01 perfectsine_ joined #salt
23:05 kickerdog left #salt
23:06 gwmngilfen joined #salt
23:08 bmcorser joined #salt
23:10 ryuhei joined #salt
23:13 Sp00n joined #salt
23:15 the_drow_ I'm getting Git fileserver backend is enabled in master config file, but could not be loaded, are pygit2 and libgit2 installed? from the master logs but GitPython is installed
23:15 the_drow_ It should be supported no?
23:19 manfred which version of salt?
23:20 scott_w joined #salt
23:22 oz_akan joined #salt
23:23 baconbeckons joined #salt
23:24 ericof joined #salt
23:26 the_drow_ develop
23:26 the_drow_ manfred: ^
23:27 manfred so, i think throws that for the first couple messages, then it gets to the point where it checks for GitPython
23:28 the_drow_ hmm ok
23:29 mosen joined #salt
23:31 jeremyBass2 joined #salt
23:33 QuinnyPig joined #salt
23:34 kballou joined #salt
23:34 Kade_Hodkiewicz joined #salt
23:40 drawks "build #4889( 35 min and counting )
23:40 drawks uggggggg
23:42 fannet joined #salt
23:44 fannet hey everyone - is there a way to ensure the execution order of items within a single state file - in other words 1) install pkg 2) do some stuff w/ file system and 3) run a command
23:45 fannet from what I understand '- require' can only represent state files and packages ?
23:46 iggy well, it should go top-down
23:46 fannet 'should' ? :)
23:46 iggy but yeah, require's are the way to guarantee that
23:46 fannet so break each one out to its own sls ?
23:46 iggy I'm not aware of restrictions on require
23:47 iggy I think watch has more restrictions than require
23:47 catpiggest joined #salt
23:47 fannet i tried require <cmd.run reference> and it barfs
23:48 elfixit joined #salt
23:48 iggy as in you actually had require and cmd.run on the same line in your state file?
23:48 kusams joined #salt
23:49 fannet yea let me get a pastie
23:50 fannet http://pastebin.com/w1tAYErk
23:50 iggy oh, like that
23:53 iggy I would pull all those watches out first, and try with the require's
23:53 halfss joined #salt
23:54 iggy fannet: try just cmd: datadog-example
23:58 Jerald_Wisozk joined #salt
23:59 yomilk joined #salt

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