Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-07-30

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

All times shown according to UTC.

Time Nick Message
00:00 MatthewsFace joined #salt
00:02 zsoftich1 joined #salt
00:05 napsterX joined #salt
00:06 murrdoc joined #salt
00:06 murrdoc ecsalt-master-pkgs:
00:06 murrdoc pkg.latest:
00:06 murrdoc - pkgs:
00:06 murrdoc - salt-master
00:06 murrdoc - State 'ecsalt-master-pkgs' in SLS 'master.package' is not formed as a list
00:06 murrdoc wtf
00:08 dude051 joined #salt
00:09 digitalhero joined #salt
00:09 iggy is that everything?
00:10 murrdoc there were two states in the file
00:11 murrdoc i indented one, because i am a effing idiot
00:11 murrdoc but didnt indent the other
00:11 * iggy heads out for real this time
00:11 murrdoc {% set lc = salt['grains.get']('lc', '' ) %}
00:11 murrdoc {% if lc|length >0 and lc == 'yomaman' %}
00:11 murrdoc ecsalt-master-configsp:
00:11 murrdoc pkgrepo.managed:
00:11 murrdoc so that state function was indented
00:11 murrdoc but this wasnt
00:11 murrdoc so it failed
00:17 kevinquinnyo joined #salt
00:19 dude051 joined #salt
00:21 murrdoc joined #salt
00:22 geekatcmu murrdoc: there's a reason I now do pyobjects for everything.
00:22 geekatcmu ALso?  Your "lc|length >0" check is entirely redundant.
00:25 murrdoc you explain that claim sir
00:25 murrdoc oh cos the equivalency
00:25 murrdoc pyobjects is painful
00:25 murrdoc yaml for the win
00:27 murrdoc geekatcmu:  ^
00:27 geekatcmu yes, the equivalency covers the >0 test.
00:27 geekatcmu And YAML is such a finicky, picky, PITA I refuse to use it.
00:28 murrdoc you are managing the states for life
00:28 murrdoc me ? i have handed them off
00:28 geekatcmu Never mind that the salt docs say, "it's just YAML" when in fact it's a subset, and when things don't parse correctly you've got very little idea where they went wrong.
00:28 geekatcmu Nah, have the guys here are using pyobjects.
00:29 geekatcmu s/have/half/
00:30 murrdoc i may or may not hand off my whole code base
00:30 murrdoc already
00:30 murrdoc the yaml has helped
00:33 bhosmer joined #salt
00:34 quasiben joined #salt
00:35 geekatcmu different strokes and all that
00:36 fllr joined #salt
00:37 murrdoc i have about ~8 python state/module modules
00:37 murrdoc that i call with yaml
00:37 phx murrdoc, those are the thingies that actually being run on the minions?
00:38 murrdoc yes
00:38 murrdoc they live in the file_roots/_(states|modules) dir
00:38 murrdoc geekatcmu:  we should meet at next saltstack conference
00:38 phx and they are automaticly transfered to the minions upon a state run?
00:39 phx never used those myself
00:39 geekatcmu Assuming they let me out, that'd be fun
00:39 geekatcmu I've written a couple _runners/_states/_modules, too.
00:39 geekatcmu But I'm also doing some complicated crap
00:42 murrdoc yeah
00:42 murrdoc it would be fun to compare notes
00:42 mosen never done any runners
00:43 geekatcmu I wouldn't have to if mines worked with multi-master
00:43 mosen I dont even know what the mine storage is
00:44 jmoreau joined #salt
00:44 geekatcmu it's just files on disk
00:44 digitalhero joined #salt
00:44 geekatcmu but if you have multi-master, a minion's mine data only goes to the first master the minion successfully connected to (or maybe it's just the first one in the list?).
00:45 mosen h right
00:45 geekatcmu In any event, it means that mine.get will only return data for minions that happen to have updated the master you're actually querying.
00:45 mosen i thought itd be some kinda distributed database
00:45 geekatcmu mine data is flat files.
00:45 geekatcmu mine.p, per minion
00:45 mosen i see
00:46 cpowell joined #salt
00:48 monkey66 joined #salt
00:48 Aidin joined #salt
00:53 bfoxwell joined #salt
00:53 pdayton joined #salt
00:53 omegamike joined #salt
00:54 otter768 joined #salt
00:54 bfoxwell joined #salt
00:56 pdayton joined #salt
00:56 mcncn joined #salt
00:56 TyrfingMjolnir joined #salt
00:59 Aidin joined #salt
01:00 nikob joined #salt
01:06 napsterX joined #salt
01:20 beauby_ joined #salt
01:33 beauby_ joined #salt
01:34 digitalhero joined #salt
01:37 digitalhero joined #salt
01:38 quasiben joined #salt
01:43 scoates joined #salt
01:45 pipps joined #salt
01:45 jodv joined #salt
01:45 digitalhero joined #salt
01:55 omegamike joined #salt
01:56 ajw0100 joined #salt
01:57 cpowell joined #salt
01:59 quasiben joined #salt
02:05 napsterX joined #salt
02:35 lompik joined #salt
02:39 evle joined #salt
02:40 breakingmatter joined #salt
02:42 digitalhero joined #salt
02:44 jmoreau joined #salt
02:56 clintberry joined #salt
03:03 peters-tx joined #salt
03:05 druonysus joined #salt
03:08 hasues joined #salt
03:08 hasues left #salt
03:14 dendazen joined #salt
03:24 ITChap joined #salt
03:34 gcfhvjbkn joined #salt
03:39 favadi joined #salt
03:41 Bryson joined #salt
03:51 MatthewsFace joined #salt
04:07 dude^2 joined #salt
04:11 Alekti joined #salt
04:30 breakingmatter joined #salt
04:37 micko joined #salt
04:41 ageorgop joined #salt
04:45 jmoreau joined #salt
04:46 claytron joined #salt
04:50 sakaYK joined #salt
04:51 aw110f joined #salt
04:52 eightyeight joined #salt
04:54 aw110f_ joined #salt
05:00 cowpunk22 joined #salt
05:13 joeto joined #salt
05:24 malinoff joined #salt
05:25 calvinh joined #salt
05:26 clayton1 joined #salt
05:27 ildiroen joined #salt
05:30 catpiggest joined #salt
05:31 calvinh joined #salt
05:41 napsterX joined #salt
05:44 jodv joined #salt
05:45 jodv joined #salt
05:46 jmoreau joined #salt
05:49 clayton2 joined #salt
05:51 otter768 joined #salt
05:59 stoogenmeyer_ joined #salt
06:04 clintberry joined #salt
06:08 AndreasLutro joined #salt
06:09 womble joined #salt
06:10 womble Are there recommended patterns for storing salt formulas, pillars, etc in revision control amongst a team?  I'm having the very deuce of a time finding anything at all.
06:12 zz_ashmckenzie joined #salt
06:15 calvinh_ joined #salt
06:16 Steven- joined #salt
06:19 breakingmatter joined #salt
06:19 ThomasJ womble: Not sure, but I seem to recall EMC talking a bit about how they manage it over there in http://saltstack.com/saltstack-at-scale-automating-the-automation/
06:20 ThomasJ iirc they more or less treat it as any other software development
06:20 ThomasJ http://www.slideshare.net/stevendgonzales/saltconf2015-saltstack-at-scale-automating-your-automation
06:22 BlackJackAc3 joined #salt
06:23 dopesong joined #salt
06:24 stephanbuys joined #salt
06:25 womble ThomasJ: Except that you normally don't deploy software by running 'salt '*' state.apply' from somewhere... that's the bit that's causing some mental anguish.
06:25 MatthewsFace joined #salt
06:25 sakaYK joined #salt
06:26 ThomasJ Then I'm a bit confused. Are you concerned about the storing and management of the data, or the actual deploying of it?
06:28 babilen To me it sounded as if you are asking for sensible patterns to organise your repositories (as in: .../webserver/apache.sls or ... github.com/website.sls ...)
06:29 womble ThomasJ: Yes.  Storing and managing the data is related to how to deploy it.
06:29 babilen That is, however, somehow at odds with your other comment :)
06:29 babilen womble: salt '*' state.highstate
06:30 womble babilen: That needs to be run on the salt master, yes?
06:31 ThomasJ womble: Can also be triggered from the minions
06:31 ThomasJ We have the minions call highstate every hour + on startup
06:32 ThomasJ That way we ensure that routine alterations to formulas and pillars are picked up in a timely manner from the production repo
06:32 ThomasJ salt-call state.highstate
06:32 womble Right, but how should formula/pillar/state/whatever development happen?  Hack on your workstation, commit, push, checkout on the salt master and state.highstate from there?
06:34 ThomasJ For my part, hack on workstation, push to QA, test, pull to production and wait for it to be automatically picked up by the hourly runs or push manually from master
06:34 babilen womble: We are using GitFS and different branches. I typically develop on (a) local vagrant box(es) that mimic the production environmet in the "dev" branch. Once I'm happy with that I merge (or have it merged) into "qa" (if available) which corresponds to a number of boxes that more closely resemble the production environment and are available to everyone.
06:34 babilen Once that works it goes to prod and is being rolled out to the actual production environment
06:35 babilen (we don't have qa in many places though, so basically just dev on vagrant, merge into prod, push, highstate)
06:36 womble babilen: You're doing an explicit highstate to roll out each set of changes?
06:36 womble ThomasJ: You're using a cronjob or similar to do a periodic "pull" on each minion?
06:36 babilen In a slightly newer setup I'm not using GitFS for formulas anymore, but https://github.com/saltstack-formulas/salt-formula/blob/master/pillar.example#L132
06:36 keimlink joined #salt
06:36 ThomasJ womble: We use salts own scheduler except for our CentOS 5 build systems where the scheduler does not work
06:36 babilen womble: Yes, I'm running them explicitly
06:38 ThomasJ womble: http://pastebin.com/cMTRaKAk
06:39 womble ThomasJ: That looks handy.
06:39 babilen womble: This is, for example, due to the fact that services can't just restart at random points in time. Some of the database servers really take quite some time (tens of minutes) for a full cycle and doing such a thing has to be coordinated.
06:39 ThomasJ Works for us, but in a more critical environment like babilen is illustrating, this would not fly
06:39 babilen ThomasJ: Ah, I'm relieved to see that. I dreaded that you called salt-call from a cronjob :)
06:39 womble ThomasJ, babilen: Thanks for your help.  I've got some pointy sticks to wave at people now, to stop doing the things they're doing.
06:39 ThomasJ babilen: Now, I'm a special kind of crazy, but not quite that bad :P
06:40 babilen It's really just the database servers ...
06:40 babilen I hate them
06:40 babilen 40 minutes cycle :(
06:40 ThomasJ Ouch
06:40 babilen Only to find out that it was a "remove whitespace" change in the MySQL formula. That doesn't fly and I have, as of now, not really found a good solution to deal with that ...
06:40 babilen ThomasJ: They are monsters
06:42 * ThomasJ just needs to automate formula top.sls generation from pillars now and I'll be a happy camper
06:42 babilen I guess the solution to that would be "more sharding" or something, but it isn't my setup, just something running here
06:42 babilen ThomasJ: That sounds good ... I'd be happy to see that
06:44 ThomasJ Its already pillar driven, but you still have to manually add an entry in formulas top.sls. But all the actual matching to determine what goes where now happens unified in the pillar top.sls
06:45 ThomasJ Essentially http://www.willplatnick.com/2015/06/21/salt-pillar-driven-design-pattern/ with some modifications
06:49 babilen Now you, essentially, just have to iterate over your entire pillar, search for %s:INSTALLED and take it from there (or something along those lines)
06:50 ThomasJ Yup
06:51 KermitTheFragger joined #salt
06:51 ThomasJ Avoids the issue of having to manage two separate top files which essentially needed to be more or less the same anyway
06:59 kawa2014 joined #salt
07:03 trikke joined #salt
07:03 jmoreau joined #salt
07:03 ildiroen joined #salt
07:05 stoogenmeyer_ joined #salt
07:10 _JZ_ joined #salt
07:11 khebbie joined #salt
07:16 Nazca joined #salt
07:19 omegamike joined #salt
07:26 soren joined #salt
07:26 Ztyx joined #salt
07:33 eseyman joined #salt
07:34 calvinh joined #salt
07:34 colegatron joined #salt
07:35 impi joined #salt
07:49 bhosmer joined #salt
07:52 otter768 joined #salt
07:57 arount joined #salt
07:58 arount Hi there, in a custom module I whould like to: 1- Check if a file exists on the Master, 2- If exists, copy this file to the minion
07:58 arount But I'm not sure how to do that, salt.modules.file seems to works only on minion
07:59 Ztyx joined #salt
07:59 arount And I'm not sure if I use built-in python method (os.path or something like that) this code will be executed on the minion or master
08:00 ITChap joined #salt
08:02 babilen Why wouldn't it exist?
08:04 arount babilen: I whant to update an app on X minions, so from my master I whant to do something like "salt * mymodule.upgrade <VERSION>", the upgrade process need to check if a crypted archive of code exist on master and generate it if not
08:05 arount because all versions availables are stored on master and should be push to minion only when upgrading
08:05 babilen Your module runs on a particular minion. If you want to do something on the master you would have to do so explicitly ..
08:05 arount but, in a module, if I do "os.path.isfile('/tmp/zob'), What I'm checking ? If /tmp/zob exists on master or on minion ?
08:06 irctc804 joined #salt
08:06 irctc804 Hi guys , Any idea how can we set up global variable in jinjja template
08:06 babilen Why don't you implement a method that generates the needed files, call that on the master and *then* call the "upgrade" code on the minion?
08:07 babilen irctc804: What do you mean by global?
08:08 irctc804 http://pastebin.com/e8PpaTS5
08:08 irctc804 II am facing the similar issue
08:08 breakingmatter joined #salt
08:08 babilen .. I should just start to /ignore pastebin.com links :)
08:09 irctc804 babilen: the value set inside the inner loop using "set"  is not reflecting outside the loop , its considering as local variable
08:09 gcfhvjbkn joined #salt
08:09 Xevian joined #salt
08:10 arount babilen: sorry, but I don't understand the solution you suggest
08:10 babilen I can't quite see that, but I get what you are referring to.
08:10 babilen arount: You would have to call whatever it is that generates the needed data on the master *on the master directly". (e.g. "salt 'your-master' yourmodule.generate_foobar")
08:12 babilen irctc804: Can't you set it earlier or do you have to set it in the loop? I mean that is how the scope works there.
08:12 arount That's the best practice ? Because, if I do that, when I start my upgrade module I'm assuming the file exists and is stored in a particular dir, but if anything failed I have 0 security
08:13 irctc804 babilen: I wanted to set a flag inside the loop and , need  use an if condition outside the loop
08:13 arount if something append and my file is not find on the master, my minion can't check that and will return a dirty traceback
08:13 babilen irctc804: And you cannot get hold of that data outside of the loop? (think |filter, ...)
08:14 napsterX joined #salt
08:17 ingslovak joined #salt
08:18 irctc804 babilen: Sorry I didn't get your question . The reason for setting the flag is jinjja doesn't support beak from for loop :(
08:18 babilen I guess I should open that pastebin.com link :)
08:18 irctc804 babilen::)
08:20 khebbie joined #salt
08:21 babilen I simply hate that website .. it preys on the great unwashed that google "pastebin" and aren't aware of the many good alternatives such as http://refheap.com, http://paste.debian.net, http://paste.ubuntu.com, https://gist.github.com, http://dpaste.com/, http://sprunge.us/, ....
08:21 arount (psss: gist!)
08:22 arount (oops, you said it ! sry)
08:24 irctc804 babilen: https://gist.github.com/seenae/a82896b838be1fe218a0 for u :)
08:25 Rene-_ joined #salt
08:25 Rene-_ good morning
08:25 babilen irctc804: Why don't you set it to 'YES' in the fifth line if that is what you want?
08:26 * babilen hands Rene-_ a nice cappuccino
08:26 Rene-_ gracias :-)
08:27 Ztyx joined #salt
08:27 Rene-_ has anybody of you ever experienced that state.highstate does not consider all declared states for a role? I mean it is just missing to run some states?
08:29 irctc804 babilen: I have an if condition inside loop and depends on that condition I am setting the flag. Its like https://gist.github.com/seenae/a82896b838be1fe218a0
08:29 bregalad http://paste.lisp.org/ and http://dpate.com/ are some of my favorites :)
08:31 shiin joined #salt
08:33 shiin I'm trying to understand how the salt jenkins jobs create junit compatible output for each test. Is there any documentation to that, or access to the job configuration to see what's being called there and how? I have written some execution modules and am trying to keep the project structure very close to salt, so I'd prefer not to have to change to an entirely different test framework.
08:33 babilen irctc804: {% set the_var = 0 in elements %} ?
08:34 babilen irctc804: Or be more explicit: {% if 0 in elements %} .... {% else %} ....
08:39 saltuser joined #salt
08:40 Ztyx joined #salt
08:41 Ztyx joined #salt
08:42 saltuser Hi! Is this a bug or a feature when on redhats "salt -v '*' pkg.refresh_db" gives "TypeError encountered executing pkg.refresh_db: refresh_db() takes exactly 3 arguments (0 given). See debug log for more info." ?
08:42 saltuser on debian everything runs fine
08:43 jakubm joined #salt
08:43 jakubm morning
08:44 jakubm quick question - can syndic fail over between multiple masters ?
08:47 ksj joined #salt
08:47 babilen jakubm: Don't conflate those concepts and read: http://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html
08:48 babilen syndics are for hierarchies
08:50 babilen Rene-_: No, I have not encountered that. How do you target those states, which states ran and which didn't? Use a pastebin such as http://refheap.com, http://paste.debian.net, http://paste.ubuntu.com, https://gist.github.com, http://dpaste.com/, http://sprunge.us/, ....
08:51 jakubm babilen: thanks for the link - that hasn't showed up in my search for saltstack multi syndic
08:52 babilen jakubm: Also google for "saltstack multi master" -- there are other articles worth reading. My impression is that the multimaster pki one is the one you are looking for, but those are the query terms you were looking for
08:53 babilen "multimaster" = horizontal, "syndic" = vertical
08:53 babilen No idea what'll happen if you mix both (i.e. multi-syndics) though
08:54 babilen But then a master is, in the end, a master :)
08:54 Rene-_ I have a top.sls like here: https://gist.github.com/breskeby/22053955264c6c233189
08:55 Rene-_ with roles declared. but when apply state.highstate on a minion with that role. common.base and common.git (from the list of states) are not applied
08:55 Rene-_ manually applying them works fine though
08:55 jakubm babilen: the idea is to have one master of masters and use 2+n syndics in each datacenter. not sure if i'm approaching it from the right angle
08:55 fredvd joined #salt
08:56 babilen jakubm: It doesn't sound wrong, I simply have no experience with syndic and multimaster at the same time
08:56 jakubm Rene-_: you target the roles wrong
08:57 Rene-_ what do you mean?
08:57 jakubm Rene-_: http://docs.saltstack.com/en/latest/topics/targeting/compound.html
08:57 jakubm Rene-_: it should be something like: 'I@roles:foo'\n- match: compound\n- states.to.apply
08:58 jakubm Rene-_: catching my drift?
08:58 jakubm ;]
08:58 Rene-_ why are some states then applied and some aren't?
08:58 jakubm Rene-_: excelent question! I don't know
08:59 jakubm Rene-_: is this the whole top.sls there?
08:59 Rene-_ no I have other roles
08:59 babilen Isn't "match: pillar" simply the equivalent of "salt -I "somepillar:value" ... ?
08:59 jakubm babilen: I'm not sure now to be honest
08:59 Rene-_ and in my setup the role is declared in a pillar
09:00 jakubm babilen: might be - I always used the method from the docuymentation
09:00 babilen I mean sure, one can also use the compound matcher, but a "salt -I 'roles:build-vm-linux' test.ping" should match the minions Rene-_ wants to match
09:00 jakubm babilen: agree
09:01 babilen It's just that "-match: pillar" isn't well documented
09:01 jakubm Rene-_: try runnig the command babilen wrote and see if that matches anything
09:01 jakubm babilen: i haven't found many references to it
09:01 joeto joined #salt
09:01 Rene-_ yes it matches all the expected boxes
09:01 jakubm babilen: and if its not documented how the hell the poor folk suppose to know about it?
09:01 Rene-_ sorry minions ;-)
09:02 babilen Once you have done that, turn it into "salt -I 'roles:build-vm-linux' state.sls common.git" and show us the output of that and the highstate run
09:03 babilen jakubm: They read the source! In the end it is quite easy .. there are multiple matchers and they have a name. You can list them in the top.sls as "- match: NAME_OF_MATCHER" and the target expression will be evaluated with that matcher. Some of which are better documented than others ... The salt command line tool is a good reference for all of them and good for playing with it.
09:04 Rene-_ output is as expected I think: https://gist.github.com/breskeby/7a26140620bc74c884a6
09:04 babilen Okay, and if you run the highstate?
09:04 babilen Sorry, I trust your statement, but seeing something yourself is .. well .. different :)
09:05 Rene-_ I totally understand what you mean :-)
09:05 Rene-_ highstate takes a while though ;-)
09:05 babilen So far I'm still in the "should work" camp
09:05 Rene-_ I'm defnitely in the "SHOULD WORK" camp :-)
09:06 babilen Could it be that you are, for some reason, using an old version of the top.sls that still lacks the common.git and common.base entries?
09:07 babilen salt 'one_of_those_minions' state.show_highstate -- might be interesting
09:08 omegamike joined #salt
09:10 monkey661 joined #salt
09:10 babilen That might be quite a lot of data (and you might not want to share all of it), but could you check if the git states (and whatever you have in base) are part of it?
09:10 Rene-_ here the output of highstate: https://gist.github.com/breskeby/840ddfc271a58a7add3b
09:10 Rene-_ I checked already
09:11 Rene-_ no git found
09:11 babilen https://github.com/saltstack-formulas/sysctl-formula and/or http://docs.saltstack.com/en/latest/ref/states/all/salt.states.sysctl.html might be of interest
09:12 Rene-_ ?
09:13 Rene-_ ah you mean instead of doing it manually
09:13 babilen "salt-run fileserver.file_list" lists common.git, doesn't it? What about "salt 'some_minion" state.show_top" or ""salt 'some_minion" state.show_sls common.git" ?
09:14 babilen Rene-_: Yeah, just something that met my eye (it's unrelated to the problem we are debugging)
09:15 Rene-_ it lists - common/git/init.sls
09:16 babilen it == show_top ?
09:22 Rene-_ interestingly show_top does not show it.
09:23 babilen Where is top.sls located?
09:24 Rene-_ show top output: https://gist.github.com/breskeby/59075f2dd78bd82ebe14
09:24 babilen Which sort of implies that common.base should be applied
09:24 babilen (contrary to your statement earlier)
09:24 Rene-_ show sls output https://gist.github.com/breskeby/be6d506531c3fcd2a99d
09:25 Rene-_ agree. let me check again
09:25 stoogenmeyer__ joined #salt
09:25 babilen No idea why common.git is not there, but that's another inconsistency I noticed
09:25 Rene-_ yes common.base is applied
09:25 Rene-_ sorry but common.git is not
09:25 babilen okay *phew*
09:26 babilen Well, that at least makes sense
09:26 Rene-_ btw I appreciate your help a lot here :-)
09:28 babilen Could you paste your common.git state SLS file and also run "salt-run cache.clear_all" then "salt-run fileserver.update" and check if "salt 'ubuntu4.buildfarm.gradle.org' state.show_top" lists common.git ?
09:29 Rene-_ common.git: https://gist.github.com/breskeby/95d8ff506562c5dc0e77
09:29 xf10e joined #salt
09:29 xf10e morning/tzag everyone
09:30 Rene-_ clear_all gives me "False"
09:30 Rene-_ is that normal?
09:30 babilen Rene-_: A bunch of salt people typically prefer what is called "short-dec-style" these days which means that you would write "git: pkg.installed" rather than "git: pkg: - installed" ...
09:31 babilen But that state couldn't be much simpler ... :)
09:31 babilen Rene-_: I think that it's normal, but am not sure *why* it does that.
09:31 Rene-_ common.git just does not show up
09:32 babilen Somebody wants to win the hide&seek championship :)
09:32 Rene-_ that are those days when I'm really pissed about salt
09:32 babilen Where does your top.sls come from? Is it a local file? A git checkout? GitFS? ...
09:33 Rene-_ GitFS
09:33 Ztyx joined #salt
09:34 babilen What does "cat /var/cache/salt/master/gitfs/refs/base/top.sls" give you?
09:35 Rene-_ @babilen just noticed your based in berlin too?
09:35 jakubm joined #salt
09:35 babilen I am indeed
09:35 babilen Want to come over, have a coffee and work from here?
09:35 Rene-_ what a coincident
09:35 CeBe joined #salt
09:35 Rene-_ were are you now?
09:35 babilen pm okay?
09:35 Rene-_ ok
09:36 xf10e babilen: I don't drink coffee but would join another day ;)
09:37 babilen s/coffee/tea ?
09:38 xf10e yeah, s/t like that
09:40 babilen Rene-_: ... so, what about /var/cache/salt/master/gitfs/refs/base/top.sls ?
09:40 fgimian_ joined #salt
09:40 jim__ joined #salt
09:42 Rene-_ top.sls: https://gist.github.com/breskeby/4ff95567aeaed0be118a
09:43 babilen Is that in /var/cache/salt/master/gitfs/refs/base/top.sls ?
09:43 Rene-_ it contains the common.git
09:43 Rene-_ yes
09:43 fllr joined #salt
09:45 babilen Lets assume that GitFS is shit and nuke that directory (i.e. "rm -rf /var/cache/salt/master/gitfs/"). Restart the master, donate biscuits to the church of emacs, jump around the desk on one leg (once clockwise, once counter-clockwise, ...) ... and hope for a change
09:46 Rene-_ you mean restarting the salt-master process?
09:47 babilen yeah
09:50 Ztyx joined #salt
09:51 Rene-_ still jumping around the desk...
09:52 otter768 joined #salt
09:57 breakingmatter joined #salt
09:58 saltuser Is it possible to match two parameters in map.jinja files?For example "os_family" and "osmajorrelease"?
10:01 jakubm saltuser: yes
10:01 xf10e jakubm: at once?
10:01 Rene-_ how long should an update of the gitfs repo take once I whiped it out?
10:02 jakubm xf10e: hm. not sure
10:06 Rene-_ restarting didn't help at all. not common.git there
10:06 Rene-_ fuck me
10:08 saltuser I saw an example where one could use merge but i'm not sure that running filter_by twice will match with each other
10:09 c10b10 joined #salt
10:09 crashmag joined #salt
10:13 hoonetorg joined #salt
10:14 saltuser i'm trying to concoct a mapfile that would account for different debian and centos releases. So far it seems numerous "if" statements are the only way :(
10:20 dexter91x joined #salt
10:23 kbyrne joined #salt
10:37 erazer joined #salt
10:37 erazer hi
10:37 erazer file.rename can be used to rename a directory with subdirs?
10:39 erazer i get an error telling that the target directory is not present
10:40 gcfhvjbkn joined #salt
10:41 Aidin joined #salt
10:42 jakubm joined #salt
10:45 sasa joined #salt
10:50 amcorreia joined #salt
10:51 evle joined #salt
10:53 dexter91x joined #salt
10:53 bhosmer joined #salt
10:57 omegamike joined #salt
11:01 xf10e saltuser: filter by osfinger, contains distroname and release
11:04 favadi joined #salt
11:08 saltuser xf10e: that seems to give pretty arbitrary results, I got "CentOs Linux-7" and "CentOS-6"
11:08 saltuser xf10e: There isn't any consistent pattern
11:09 saltuser Although I haven't noticed that grain before :)
11:10 erazer i want to unpack a zip and then rename the created directory
11:10 trikke joined #salt
11:10 erazer my code samples are here:
11:10 erazer https://gist.github.com/anonymous/36f3e49404004d293bcf
11:11 erazer unfortunately neither the first nor the second approach i have tried works
11:13 erazer i think in the second case the module function is evaluated before the archive is unpacked
11:14 omegamike joined #salt
11:16 viq joined #salt
11:17 erazer it seems that the directory cannot be renamed because it does not exist upon compilation and is created during unzipping?
11:19 xf10e saltuser: that's a bug! it should be CentOS-7, CentOS-6 and Debian-7.0, Debian-8.0
11:19 bhosmer joined #salt
11:25 erazer i have found the error
11:25 erazer i have to ommit the slash after the dirname
11:26 erazer in the first example
11:26 erazer then it works
11:29 dopesong joined #salt
11:29 hoonetorg iggy: all: regarding salt-formula salt-cloud: isn't it possible to install salt-cloud (at least on CentOS 7) with epel packages (salt-cloud and python-libcloud and python-crypto) ? why does salt-formula use pip?
11:31 Ztyx joined #salt
11:31 hoonetorg (i must say we only use rpm packages on rh/fed and and deb on deb/ubu, no other package managers like pip, gem ... allowed, if a package does not exist, we build it from gem or pip, but these packages exist!)
11:32 fllr joined #salt
11:35 impi joined #salt
11:42 trikke joined #salt
11:43 Ztyx joined #salt
11:45 seenae joined #salt
11:45 seenae Hi
11:46 breakingmatter joined #salt
11:47 seenae salt-call s3.put bucket_name s3source dest , this comand is working fine for me
11:47 seenae I am writing a custome module
11:47 seenae Trying t execute the same command from the module __salt__['s3.put'] (bucket_name) (s3dest) (dest)
11:48 seenae II am getting Passed invalid arguments: 'NoneType' object is not callable
11:48 seenae Any clue ?
11:48 AndreasLutro seenae: do you know how to pass multiple arguments to a function?
11:49 trikke joined #salt
11:49 babilen seenae: You should use (bucket_name, s3dest, dest)
11:49 babilen (assuming all of them are variables and that they are different from None)
11:53 seenae babilen: Oh ok Let me try
11:53 otter768 joined #salt
11:55 jakubm joined #salt
11:58 shiin I'm trying to understand how the salt jenkins jobs create junit compatible output for each test. Is there any documentation to that, or access to the job configuration to see what's being called there and how? I have written some execution modules and am trying to keep the project structure very close to salt, so I'd prefer not to have to change to an entirely different test framework.
11:58 Rene_ joined #salt
12:00 mage_ what do you think of the following to manage postgresql config https://dpaste.de/JUC5 ? I wonder if there is a "clean" way to replace the for-loop easily .. ?
12:02 Rene_ joined #salt
12:04 seenae Thanks babilen , It worked :)
12:04 lloesche joined #salt
12:06 seenae babilen: I asked about global variable earlier
12:06 seenae babilen: http://stackoverflow.com/questions/4870346/can-a-jinja-variables-scope-extend-beyond-in-an-inner-block?answertab=active#tab-top , used this solution
12:06 seenae Thanks for the help :)
12:06 DammitJim joined #salt
12:07 babilen seenae: I still consider that a very suboptimal approach
12:07 babilen I mean why aren't you using the foo in bar approach I mentioned?
12:07 DammitJim good morning babilen
12:09 fgimian joined #salt
12:09 babilen It is early afternoon, but okay, good morning ;)
12:09 KermitTheFragger joined #salt
12:10 DammitJim oh, sorry babilen ... you know... us people living in the Americas thinking we are the center of the world
12:10 DammitJim good afternoon man
12:11 babilen You are always late to the day ;)
12:12 DammitJim babilen, I actually hate that... my father-in-law always does this to me. We go on vacation and he has to be at the hotel or resort way ahead of time
12:12 DammitJim he scouts out the place and when we get there, he starts telling me about all the things we can do and how we can do them
12:12 Rene_ joined #salt
12:12 DammitJim I'm like... leave some of the adventure for me, dude!
12:13 babilen Yeah, that's just mean
12:13 DammitJim LOL
12:13 DammitJim or I wake up and he has already made the coffee
12:13 DammitJim I'd like to make the coffee for him one day
12:14 DammitJim now, about salt... since you are way ahead of me... hehehe
12:14 * babilen chuckles :)
12:18 kawa2014 joined #salt
12:24 impi joined #salt
12:28 bhosmer joined #salt
12:28 impi joined #salt
12:29 oznah joined #salt
12:34 oznah a user added by salt has three commas after their fullname. Have you seen this before. http://pastebin.com/M38LLqhf
12:34 lompik joined #salt
12:37 calvinh_ joined #salt
12:38 AndreasLutro oznah: it's entirely normal, the commas indicate empty fields for room number, phone number etc
12:38 babilen Join the turquise ribbon for a better web and boycott pastebin.com! Use http://refheap.com, http://paste.debian.net, ...
12:39 babilen oznah: Where does it have that?
12:39 erazer left #salt
12:41 babilen If you are referring to /etc/passwd then, yeah, that's okay
12:42 oznah sorry, yes I meant /etc/passwd
12:43 babilen That's the GECOS field and contains data such as the room number, telephone number apart from the full name ... those are simply empty in your case
12:43 oznah ok that makes sense. I thought there may be some sort of hidden characters or something
12:44 oznah minor annoyance subsided
12:47 joehh1 packages for 2015.5.3 for ubuntu going up to ppa in salt-testing now
12:55 babilen deb-uh-aaahn two?
12:56 XenophonF joined #salt
12:56 XenophonF https://github.com/search?l=&amp;q=iteritems+user%3Asaltstack-formulas&amp;ref=advsearch&amp;type=Code
12:56 oznah Is there an easy way to tell if gitfs fileserver is working or not? I am getting a continuous flow of python errors when starting master after setting up gitfs config. see logs here http://pastebin.com/yPkjGNAB
12:56 XenophonF why do people use the iteritems() method?
12:56 XenophonF it's deprecated
12:57 XenophonF the items() method works in both Python 2 and Python 3 and provides the same semantics (even though the implementation differs)
12:57 AndreasLutro XenophonF: items() creates a copy of the entire dict in python 2, iteritems() is more memory efficient
12:58 AndreasLutro in python 3, iteritems() was renamed to items()
12:58 AndreasLutro same as range vs xrange
12:58 snaggleb joined #salt
12:59 XenophonF given that most people are iterating over small dicts in pillar or grains, why does memory efficiency matter?
12:59 XenophonF none of these formulas will work if running salt under python 3
13:00 XenophonF seems like a case of premature optimization, to me
13:00 clintberry joined #salt
13:00 babilen Yeah, .items() would, in most cases, be a much more sensible default
13:00 AndreasLutro more of a habit for me
13:02 joehh1 babilen: yes
13:02 babilen cool, very nice :)
13:02 babilen ta!
13:03 XenophonF according to https://github.com/saltstack/salt/issues/11995, saltstack is working on python 3 support
13:03 saltstackbot [#11995]title: Python 3 compatibilty | Salt is currently not compatible with python 3. Ubuntu trusty and above default to using python 3, so it would be really nice to be able to run salt in the default python version.
13:03 Deevolution joined #salt
13:03 furrowedbrow1 joined #salt
13:03 clintber_ joined #salt
13:06 babilen "Ubuntu trusty and above default to Python3" -- I'd rather say that "Python upstream defaults to Python3". Installing salt for py2 is still no problem on those Ubuntu versions, but doing so would simply pull in an additional Python version.
13:06 numkem joined #salt
13:08 lrojas joined #salt
13:08 pdayton joined #salt
13:08 clintberry joined #salt
13:09 BradThurber joined #salt
13:10 manfred babilen:  they actually do not completely
13:10 manfred https://www.python.org/dev/peps/pep-0394/
13:10 racooper joined #salt
13:10 manfred for the time being, all distributions should ensure that python refers to the same target as python2 .
13:10 manfred which they changed, sometime after archlinux went to python3
13:11 chiui joined #salt
13:11 manfred that is an easy argument to get people all pissy and spammy in #python too
13:14 manfred https://bugs.archlinux.org/task/28639
13:14 Aidin joined #salt
13:15 jakubm joined #salt
13:16 Tecnico1931 joined #salt
13:16 babilen manfred: This has nothing to do with what "/usr/bin/python" refers to, but which Python version will be installed by default. /usr/bin/python should *always* refer to python2
13:17 babilen https://wiki.ubuntu.com/Python/3
13:17 mage_ any idea how could I use a backreference from a regex into a jinja {{ }} expression ?
13:17 breakingmatter joined #salt
13:17 babilen In particular: "What this does not mean: /usr/bin/python will point to Python 3. No, this is not going to happen (unless PEP 394 advocates otherwise, which is doubtful  ...")
13:18 mage_ I have https://dpaste.de/BAAy but at line 5 the {{ cfg[\\1] }} doesn't work .. any idea ?
13:20 babilen manfred: Note that you are using https://docs.python.org/2/library/stdtypes.html#str.replace there and not https://docs.python.org/2/library/re.html#re.sub
13:20 babilen err, mage ^
13:20 mage_ mmh
13:21 fllr joined #salt
13:21 babilen arr
13:21 babilen No, my bad
13:21 babilen Forget that, I was thinking of something else
13:22 mage_ :)
13:26 clintberry joined #salt
13:26 AndreasLutro mage_: that's almost definitely not possible, the {{ }} stuff is compiled before the regex is ran
13:27 mage_ ah shit :(
13:27 perfectsine joined #salt
13:27 kbyrne joined #salt
13:27 AndreasLutro if you don't want to mess with the distro's pg config file, why don't you just include a separate config file with overrides?
13:27 trikke joined #salt
13:28 mage_ yep that's another option
13:30 babilen https://github.com/saltstack-formulas/postgres-formula/ might be an option too
13:31 calvinh joined #salt
13:35 aleluja joined #salt
13:38 c10b10 joined #salt
13:38 perfectsine joined #salt
13:41 stephanbuys joined #salt
13:44 babilen Can I see the Saltstack Enterprise UI somewhere? I know that it is $sell_your_soul, but some people might like "clicky-bunty"
13:45 mpanetta joined #salt
13:47 dgutu_ joined #salt
13:48 cpowell joined #salt
13:48 digitalhero joined #salt
13:48 cpowell joined #salt
13:50 trikke joined #salt
13:50 Tecnico1931 joined #salt
13:51 pdayton joined #salt
13:52 subsignal joined #salt
13:54 manfred babilen:  from what I hear, there are redoing the whole thing, and it isn't done yet
13:54 manfred babilen: redoing it from the one they showed at salt conf
13:54 otter768 joined #salt
13:55 markm joined #salt
13:55 jdesilet joined #salt
13:56 babilen I haven't seen anything and http://saltstack.com/saltstack-enterprise-4-0/ is just marketing foo
13:56 mapu joined #salt
13:57 manfred yeah
13:57 manfred To be honest
13:57 manfred the old one wasn't worth mouch
13:57 manfred much*
13:57 manfred it had a bunch of name confusion (The Jobs tab was for running states???!?!!!?)
13:57 babilen .. maybe if they were to open source it ... ;)
13:58 manfred the usefull part was the reports, and they weren't dynamic, but that is supposedly where a lot of time is being put in
13:58 manfred they tried open source, halite was awful
13:58 TooLmaN joined #salt
13:58 manfred Apparently Tom is more involved in the new one :)
13:59 furrowedbrow joined #salt
13:59 manfred I hope they do a Salt Air video about it, and bring back more Salt Air videos
13:59 kaptk2 joined #salt
14:01 Mstaaravin joined #salt
14:01 Mstaaravin good morning fellas
14:02 Mstaaravin https://docs.saltstack.com/en/latest/topics/ssh/index.html#define-cli-options-with-saltfile
14:02 Mstaaravin anyone can explain me that, i can't understand how really works Saltfiles
14:02 bhosmer joined #salt
14:04 murrdoc joined #salt
14:04 murrdoc damnit xeno
14:05 murrdoc XenophonF:  did u change all dict.iteritems
14:05 murrdoc to dict.items
14:07 joeto joined #salt
14:07 manfred does jinja support a .items?
14:07 murrdoc jinja hands it off to python
14:08 manfred sure, but is it smart enough to translate it to items in python3? I would assume that was all handled in the library
14:08 elfixit joined #salt
14:09 manfred i was unaware that .items was a thing
14:09 trikke joined #salt
14:09 manfred in jinja*
14:10 murrdoc .items isnt a jinja function
14:10 murrdoc its a python function
14:10 murrdoc all the jinja functions/filters normally get called as |functionname
14:10 murrdoc all the python-y functions get called as .functionname
14:11 babilen (and there is a certain overlap between jinja filter and Python methods)
14:11 murrdoc for eg babilen
14:13 AndreasLutro .items is a class method, which jinja does no translation of
14:13 murrdoc right
14:16 fllr joined #salt
14:19 cberndt joined #salt
14:22 XenophonF murrdoc: no, i didn't make any changes yet
14:23 dude051 joined #salt
14:23 calvinh_ joined #salt
14:23 XenophonF i only use a few of those formulas, but since i made the effort to do the search, if figured i might as well go ahead and submit issues for those other formulas in case other people ran into trouble
14:25 jakubm joined #salt
14:27 DoM[PAtoneS] joined #salt
14:28 perfectsine joined #salt
14:33 DoM[PAtoneS] Hello folks. Anyone has any documentation on how to work with git to test your changes when you have multiple environments? It works ok if everyone works from the main tree, but when you need to merge the changes it is hard to cherry pick them. I was not able to find much on how to set it up where a lot of people can make and test their own changes. We have 3 salt masters dev, qe, and prod. I
14:33 DoM[PAtoneS] was thinking to add the branch to the file root, but I can see how it can get out of hand. My colleague prefers that everyone have their own master. In this case we will be changing the dev servers config all the time. I do not like none of the aproaches. Right now we work off the main branch. It causes issues because you have to look at each change and ask around before you merge
14:36 joehh1 packages for unstable and wheezy going up to debian.saltstack.com in the -testing repos (wheezy-testing and unstable-testing) now
14:36 BradThurber_ joined #salt
14:36 joehh1 jessie building slowly.... will upload when finished
14:36 b18 joined #salt
14:43 elfixit joined #salt
14:47 cowpunk22 joined #salt
14:48 mage_ any idea for https://dpaste.de/mt4g .. ?
14:49 mage_ for an unknow reason Salt is commenting with my regex
14:51 repl1cant joined #salt
14:51 debian112 joined #salt
14:52 XenophonF DoM[PAtoneS]: here's how i do it
14:53 XenophonF DoM[PAtoneS]: i have development, testing, staging, and production environments
14:53 XenophonF DoM[PAtoneS]: and so my state tree has development, testing, staging, and production branches
14:54 XenophonF DoM[PAtoneS]: i develop things in dev (fake data), test things in test (copy of prod data)
14:54 XenophonF DoM[PAtoneS]: i merge changes i want to push to production into the staging branch
14:55 DoM[PAtoneS] the problem is the testing. we have a bunch of people making modifications. The merge from one environment to the other works fine. The problem is when a lot of people make changes. Some might not be ready
14:55 XenophonF DoM[PAtoneS]: i apply those changes selectively using the state module
14:55 XenophonF i.e., salt minion state.sls blahblah saltenv=staging
14:55 Bryson joined #salt
14:55 XenophonF DoM[PAtoneS]: then cherry pick the changsets you want to merge
14:56 XenophonF DoM[PAtoneS]: or merge selected files using "git checkout development foo/bar/baz.sls"
14:56 DoM[PAtoneS] XenophonF: That is the problem part the cherry picking. Too many people too many different timezones
14:56 jondonas joined #salt
14:56 DoM[PAtoneS] XenophonF: Maybe if every person could cherry pick their own? That could work
14:59 XenophonF DoM[PAtoneS]: after applying configs from the staging branch to our production servers, we run our user acceptance tests - whatever those are
14:59 XenophonF DoM[PAtoneS]: if we have to revert, we re-run highstate, which re-applies configs from the production branch
14:59 XenophonF DoM[PAtoneS]: if we pass our UATs, then we merge staging to production
15:00 XenophonF DoM[PAtoneS]: that way, the production branch is always what we're running in production
15:01 kawa2014 joined #salt
15:01 XenophonF DoM[PAtoneS]: if a straight "git merge" or "git cherry-pick" doesn't work for you, you can always use "git checkout <branch> <pathname>" from the target branch
15:01 DoM[PAtoneS] XenophonF: We do the samething.
15:01 DoM[PAtoneS] XenophonF: git-checkout does not work because we only have the master
15:01 DoM[PAtoneS] XenophonF: branch
15:02 pdayton1 joined #salt
15:02 XenophonF DoM[PAtoneS]: my master branch (i.e., base environment in Salt) is empty, on purpose
15:02 jakubm joined #salt
15:02 XenophonF DoM[PAtoneS]: only thing it has is README, STYLE, and top.sls
15:02 DoM[PAtoneS] XenophonF: How do u test your changes for example app1 in dev
15:03 XenophonF DoM[PAtoneS]: i make heavy use of state.sls
15:03 primechuck joined #salt
15:03 XenophonF !salt.modules.state
15:03 XenophonF hey iggy how do i make your bot do its thing?
15:03 XenophonF !salt modules.state
15:03 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
15:03 XenophonF nevermind i figured it out :)
15:04 XenophonF so, DoM[PAtoneS], i run a command like "salt-call state.sls blahblah saltenv=development" on my dev box
15:04 repl1cant joined #salt
15:04 XenophonF it's OK if it breaks
15:04 XenophonF DoM[PAtoneS]: our SOP is that top-level salt state modules are self-contained
15:05 DoM[PAtoneS] XenophonF: I do that also. It works as long only one person is doing changes there. I guess it is kind how it works
15:05 XenophonF DoM[PAtoneS]: there's a few of us making changes to the same branch
15:05 XenophonF DoM[PAtoneS]: it's dev, so it's OK if things break
15:06 XenophonF DoM[PAtoneS]: sometimes we make conflicting changes, so we have to merge things by hand
15:06 XenophonF DoM[PAtoneS]: we don't always use the testing environment
15:06 XenophonF DoM[PAtoneS]: a lot of times we go straight from dev to staging
15:07 DoM[PAtoneS] XenophonF: We also use git-lab I think the gui has this limitation. It looks like it works well for you. I am going to recommend that every person that makes changes. Cherry picks their changes into testing
15:07 XenophonF DoM[PAtoneS]: good luck!
15:07 DoM[PAtoneS] XenophonF: Thank you very much for the information. It cleared my head quite a bit
15:08 DoM[PAtoneS] XenophonF: Even know it is almost that we do now. We can now do it better
15:08 XenophonF DoM[PAtoneS]: if you want/need example state and pillar trees, i've posted my personal ones on github at https://github.com/irtnog/salt-states and https://github.com/irtnog/salt-pillar-example
15:08 XenophonF DoM[PAtoneS]: those are just my home network, so it's just me and it's pretty small
15:10 bhosmer joined #salt
15:10 DoM[PAtoneS] XenophonF: I am going to check it out. We have a large environment, but when you read from someone else perspective it always helps
15:11 PredatorVI joined #salt
15:11 * PredatorVI pops down the farm, grabs a Shetland Pony and slaps PredatorVI with it!
15:12 XenophonF DoM[PAtoneS]: i'm hoping someone sees my configs and tells me how to do it better :)
15:12 DoM[PAtoneS] XenophonF: I have pretty much the same thing at home also.
15:14 zsoftich1 joined #salt
15:16 zmalone joined #salt
15:17 djstorm joined #salt
15:18 PredatorVI iggy:  Did you get a chance to glance over my updatewar state we were chatting about yesterday?
15:22 Brew joined #salt
15:22 PredatorVI Anyone know of a tutorial that goes over more complex Requisites usage?
15:22 digitalhero joined #salt
15:23 N-Mi joined #salt
15:32 bhosmer joined #salt
15:35 tru_tru joined #salt
15:36 colegatron joined #salt
15:36 XenophonF PredatorVI: Ryan Lane's blog, maybe? he was doing some weird stuff with requisites, IIRC
15:36 XenophonF (weird from my perspective)
15:37 BradThurber joined #salt
15:39 XenophonF PredatorVI: this is what i was thinking of - http://ryandlane.com/blog/2015/04/02/saltconf15-sequentially-ordered-execution-in-saltstack-talk-and-slides/
15:40 PredatorVI XenophoneF:  Thanks...looking now
15:41 XenophonF PredatorVI: here's another one - http://ryandlane.com/blog/2015/01/06/truly-ordered-execution-using-saltstack-part-2/
15:42 pdayton joined #salt
15:46 iggy hoonetorg: never looked at it tbh, if it's possible, make it an option for that distro using the normal mapping features and send a PR
15:46 iggy XenophonF: very carefully... it only does a few things as of yet, if you have suggestions, let me know
15:46 iggy !salt states.file.managed
15:46 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
15:47 iggy that's about the only thing it knows as of yet
15:47 XenophonF iggy: LOL
15:47 XenophonF "very carefully" is something my dad would say all the time :)
15:47 iggy PredatorVI: just got out of a meeting, give me a few minutes
15:48 shiin I'm trying to understand how the salt jenkins jobs create junit compatible output for each test. Is there any documentation to that, or access to the job configuration to see what's being called there and how? I have written some execution modules and am trying to keep the project structure very close to salt, so I'd prefer not to have to change to an entirely different test framework.
15:48 pdayton joined #salt
15:48 Shirkdog joined #salt
15:51 Shirkdog joined #salt
15:52 digitalhero joined #salt
15:52 dbanck joined #salt
15:53 Brew joined #salt
15:55 pipps joined #salt
15:55 BradThurber joined #salt
15:55 joehh1 jessie going up now
15:55 otter768 joined #salt
15:56 iggy people will be glad to hear that
15:56 PredatorVI iggy:  thanks
15:58 alemeno22 joined #salt
15:58 fllr joined #salt
15:59 alemeno22_ joined #salt
16:02 [1]PredatorVI joined #salt
16:03 digitalhero joined #salt
16:04 akafred joined #salt
16:04 remzed joined #salt
16:05 eccentricson joined #salt
16:05 eccentricson Good morning #salt!  Quick question, I'm using a users formula that I found on github that has been wokring.  Not sure what has changed (not in version control yet).  I get the following error when running the state.sls Rendering SLS 'base:users' failed: Jinja variable 'str object' has no attribute 'get'
16:06 iggy you'd have to paste the state probably
16:06 alemeno22 joined #salt
16:07 eccentricson I was hoping the 'str object' was going to be the indicator of "God Eccentricson, you're an idiot.  Do this" :D  Let me put it up on the webs somewhere
16:07 antonw joined #salt
16:07 iggy gist is preferred
16:07 eccentricson Here it is: https://gist.github.com/anonymous/409d9d94a6757cb79188   iggy:
16:08 iggy is there a line number?
16:08 eccentricson None what so ever :(
16:09 eccentricson the entire error:
16:09 eccentricson Data failed to compile: ----------     Rendering SLS 'base:users' failed: Jinja variable 'str object' has no attribute 'get'
16:09 joeyparsons joined #salt
16:11 munhitsu joined #salt
16:11 markm joined #salt
16:12 neilfse__ joined #salt
16:13 LtLefse eccentricson: I see 18 instances of user.get and 1 instance of users.get in there
16:14 LtLefse line 68
16:14 eccentricson O interesting!!  Ok.  Let me take a look at that, thank you!
16:15 eccentricson I changed it to user.get adn that didn't fix it.  I don
16:15 hillna joined #salt
16:15 eccentricson I don't see where users. would have to be used.
16:15 iggy run it via "salt-call -l debug state.sls <whatever>" on the minion itself
16:16 copelco joined #salt
16:16 mattl joined #salt
16:16 eccentricson scrubbing data, and posting to gist
16:16 eccentricson I don't see anything obvious from the output
16:17 eccentricson https://gist.github.com/anonymous/101d9372b29150625ef3
16:18 XenophonF eccentricson: are you using https://github.com/saltstack-formulas/users-formula?
16:18 XenophonF like, the current version of it?
16:19 eccentricson updated 3 days ago!
16:19 eccentricson Let me try that
16:19 akoumjian joined #salt
16:20 bhosmer joined #salt
16:20 XenophonF what happens if you run it like "salt-call state.sls users pillar='{users:{testuser}}'"?
16:20 XenophonF start with a test case, minimal pillar data, and work your way up to something more complex
16:21 eccentricson Sorry, I just updated the state and it worked XenophonF.  However, I did do a pillar.items and all of the users were in the pillar data
16:21 XenophonF OK glad it's working now
16:21 lkannan joined #salt
16:21 zer0def joined #salt
16:21 iggy yeah, anytime you have issues with formulas, check to see if someone already fixed it
16:22 iggy we're pretty good about merging in fixes pretty quick
16:22 JonGretar joined #salt
16:22 basepi joined #salt
16:22 eccentricson Makes sense!  Thanks so much for your guys' help!  I didn't think this formula was sitll managed. :)
16:23 XenophonF they all are
16:23 Ch3LL_ joined #salt
16:23 jalbretsen joined #salt
16:24 frankS2 joined #salt
16:24 mihait joined #salt
16:24 colegatron joined #salt
16:24 grepory joined #salt
16:24 pdayton joined #salt
16:25 iggy I generally merge 4 PRs per day to formulas
16:25 iggy and there are at least 5 other devs that are as active or more active than I am
16:25 cowpunk22 joined #salt
16:26 davedash joined #salt
16:27 eccentricson o wow!  That's awesome!  One day, I'll get to the point of building jinja files, etc.
16:27 eccentricson Then I can help contribute as well
16:28 ramblinpeck joined #salt
16:29 XenophonF speaking as a saltstack-formulas end user/sometimes contributor, the maintainers there are pretty great
16:29 SVQTQ Hey guys. I used to deploy my servers using salt-cloud -p $PROFILE $CUSTOMER --parallel. I currently created cloud-maps, but this asks me if I'd like to proceed. And I deploy using a script, so I'd rather have it to just pass without prompting. Is there an option for this? (like -y)
16:29 XenophonF and if you're new to salt, eccentricson, reading through the formulas will teach you a lot about it even if you don't end up using them
16:30 XenophonF SVQTQ: man salt-cloud says there's a -y option
16:30 viq joined #salt
16:31 jodv joined #salt
16:31 XenophonF left #salt
16:33 dopesong_ joined #salt
16:33 aparsons joined #salt
16:33 bbbryson joined #salt
16:34 CeBe joined #salt
16:35 LinuxHorn joined #salt
16:36 SVQTQ man salt-cloud doesn't really show me a -y option, but I'll just try it.. :)
16:36 MatthewsFace joined #salt
16:37 collinanderson joined #salt
16:37 m0nky joined #salt
16:37 iggy what version of salt?
16:38 SVQTQ 2015.5.2
16:38 amcorreia joined #salt
16:39 iggy it's only in 2015.8+
16:39 iggy oh wait, no, it should be in 2015.5
16:40 SVQTQ I will deploy one now, so I'll report back here :)
16:40 zipkid joined #salt
16:43 ramishra joined #salt
16:43 SVQTQ -y worked << Thanks.
16:46 murrdoc joined #salt
16:46 Tritlo joined #salt
16:47 SVQTQ Since I changed my script to deploy using a map the minion doesn't highstate any longer.. Which file debugs all this? just add --debug to the salt-cloud deployment?
16:48 iggy does the profile/provider still specify a highstate to be run?
16:48 iggy or do you use a reactor to do that?
16:49 SVQTQ reactor
16:49 SVQTQ I can just specify in my profile/provider to run a highstate?
16:49 iggy what is the event you are matching?
16:49 SVQTQ let me check
16:50 SVQTQ salt/minion/*/start
16:50 jchadwick joined #salt
16:50 SVQTQ is the event
16:50 SVQTQ aha
16:50 phx iggy, are you around?
16:50 iggy salt-cloud has events that might work better for these
16:50 * iggy hides
16:51 * phx nukes iggy's cover
16:51 phx for this: {% if salt['file.exists']('/etc/puppet/puppet.conf') % i get: failed: Jinja variable 'dict' object has no attribute 'file.exists'
16:51 SVQTQ is an event I check on
16:51 SVQTQ 'salt/cloud/*/created
16:51 phx could you please give me some tops/whatever on this?
16:52 iggy !salt modules.file
16:52 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html
16:52 iggy find something in there that works
16:52 phx thanks
16:52 iggy file.file_exists
16:53 iggy probably didn't want it to get confused with python built-ins
16:53 phx file.file_exists
16:53 murrdoc also file.directory_exists
16:54 colegatron joined #salt
16:54 phx strange
16:55 phx http://pastebin.com/0fXNfP0f
16:56 phx file_exists works, but it seems like the sls is getting an empty result
16:56 phx how should i debug/fix this?
16:56 SteamWells joined #salt
16:57 ageorgop joined #salt
16:57 kutenai joined #salt
16:57 phx got it
16:57 iggy service.<what>
16:58 impi joined #salt
16:58 phx yup, changed it to service.dead
16:58 phx my minions are getting self-conscious and killing puppets
16:58 murrdoc HAH
16:58 murrdoc show it to forrest
17:00 SVQTQ how can I tell salt to install nginx and run it's service in one state? http://hastebin.com/wakaruviki.sm the pasted text throws an error
17:02 BradThurber question: I do a salt '*' state.highstate then turn around and do salt-run jobs.active and see only one Job ID that lists the separate minions as Running. If I come back later, and do a salt-run jobs.lookup_jid the results only are shown for one minion. How can I see the results for all minions?
17:03 jondonas joined #salt
17:03 gcfhvjbkn joined #salt
17:03 gcfhvjbkn joined #salt
17:03 shawnbutts joined #salt
17:04 cowpunk22 joined #salt
17:04 iggy BradThurber: salt '*' saltutil.find_job <jid>
17:06 madssj joined #salt
17:06 dopesong joined #salt
17:06 zzzirk joined #salt
17:06 BradThurber iggy: that shows me a list of the minions but no other data for each
17:07 Ztyx joined #salt
17:08 digitalhero joined #salt
17:10 zzzirk Does anyone know if there is an alternative ubuntu repository for salt packages to http://ppa.launchpad.net/saltstack/salt/ubuntu?  I have thus far been unable to find one but perhaps my google-fu just isn't strong enough today.
17:10 iggy zzzirk: what doesn't that one offer?
17:10 manfred zzzirk:  i do not believe there is one, what do you need
17:11 linjan_ joined #salt
17:11 zzzirk packages that aren't latest and greatest.  we have discovered that over time we have been installing packages ranging from 2014.1.x (many different versions) to 2014.7.x (many different versions) and no only 2015.x is available.
17:12 jodv joined #salt
17:12 zzzirk the debian repo at debian.saltstack.com has about everything from what I can see, but I can't find an ubuntu repo that offers the same
17:12 iggy 2014.1 is long since desupported, 2014.7 won't see any more releases
17:13 zzzirk yes I am aware of that
17:13 UtahDave joined #salt
17:14 UtahDave jacksontj: Hey, could you take a peek at https://github.com/saltstack/salt/issues/25852  ?
17:14 saltstackbot [#25852]title: Salt loader is not loading Salt vars in reactor python renderer | My master's versions report:...
17:14 iggy ppa:saltstack/salt2014-7
17:14 CeBe joined #salt
17:15 UtahDave The LazyLoader is apparently causing problems with the py renderer
17:15 zzzirk iggy: outstanding, that is what I need.  thank you!
17:17 hasues joined #salt
17:18 hasues left #salt
17:19 clintberry joined #salt
17:27 sarlalian joined #salt
17:27 theologian joined #salt
17:28 debian112 joined #salt
17:28 forrest joined #salt
17:35 gekitsuu joined #salt
17:35 domel joined #salt
17:40 domel what would be the best approach to manage multiple server installations of (lets say apache) in multi os environments (Redhat) Centos Ubuntu and solaris in terms of sending specific values to each minion such as external fqdn in virtual host files without creating extra templates for each site host etc..
17:41 digitalhero joined #salt
17:42 iggy pillars probably (look at how the formulas do it for a half decent example)
17:44 domel would that mean creating a pillar for each server?
17:45 iggy for each class, probably
17:45 markm joined #salt
17:45 iggy there are ways to do some amount of inheritance of some of that data
17:46 drawsmcgraw joined #salt
17:46 iggy PredatorVI: not really any thougths on your problem
17:47 iggy other than what I said yesterday about making a state that does the stop, replace, start and just trigger that off the file's changing
17:50 jaybocc2 joined #salt
17:50 jaybocc2 2015.5.3 should be out on debian today
17:56 otter768 joined #salt
18:02 repl1cant joined #salt
18:02 wt joined #salt
18:08 impi joined #salt
18:08 pcdummy joined #salt
18:08 PredatorVI joined #salt
18:08 bhosmer joined #salt
18:09 Tod-Work joined #salt
18:11 omegamike joined #salt
18:13 nzero joined #salt
18:16 rideh joined #salt
18:19 cowpunk22 joined #salt
18:20 [1]PredatorVI joined #salt
18:23 drawsmcgraw Targeting pop quiz
18:24 drawsmcgraw According to the docs(http://docs.saltstack.com/en/latest/topics/targeting/globbing.html), this should work:
18:24 drawsmcgraw salt 'edh-dev-[01-08]*' test.ping
18:24 drawsmcgraw But it doesn't. It won't match any minions. B-U-T
18:24 drawsmcgraw This does work:
18:24 drawsmcgraw salt 'edh-dev-0[1-8]*' test.ping
18:25 drawsmcgraw Is this a bug? I'd call that bug
18:25 iggy no
18:26 iggy that's not how sequences work
18:26 drawsmcgraw iggy: oh?
18:26 drawsmcgraw So I misunderstand bash sequences?
18:26 drawsmcgraw (honest question. Really am confused now)
18:27 digitalhero joined #salt
18:27 iggy yeah, that's not how they work... it's a sequence between single digits
18:28 drawsmcgraw But this works: salt 'edh-dev-[01-10]*' test.ping
18:28 ksalman joined #salt
18:29 Mate [01-10] means either 0, or something in the range 1..1, or 0
18:29 Diaoul joined #salt
18:29 eccentricson drawsmcgraw: correct.  In bash you would do 0{1..8}.  If you did {01..08} it'll negate the 0's anyways
18:29 SeeDickCode joined #salt
18:30 drawsmcgraw Ah.... I see
18:30 TooLmaN_ joined #salt
18:30 perfectsine_ joined #salt
18:30 SeeDickCode joined #salt
18:30 quasiben1 joined #salt
18:31 DoM joined #salt
18:31 eccentricson You can test this via an echo command       "echo 0{1..8}' and 'echo {01..08}' and 'echo {01-08
18:31 eccentricson }'
18:31 DoM I can also confirm it is single digits [0-9]
18:32 mikepea_ joined #salt
18:32 digitalhero joined #salt
18:32 ashb_ joined #salt
18:32 bbhoss_ joined #salt
18:32 goki_ joined #salt
18:32 abele_ joined #salt
18:32 dbanck_ joined #salt
18:33 drawsmcgraw well that's a TIL for me. Thanks everyone! I'll do better next time
18:33 tru_tru_ joined #salt
18:34 patrick__ joined #salt
18:34 sybix_ joined #salt
18:34 eccentricson drawsmcgraw: it's what we are here for :)
18:34 munhitsu_ joined #salt
18:34 bhosmer Will salt-cloud by default try to use the IAM role with EC2 or are keys definitely required?
18:35 DammitJim does one normally add a line to a config file or does one usually just replace the whole file on a minion?
18:35 kbyrne joined #salt
18:35 forrest I usually just manage entire files
18:35 mattl_ joined #salt
18:36 sirex joined #salt
18:37 bhosmer I think this might be my answer: https://github.com/saltstack/salt/issues/9893
18:37 saltstackbot [#9893]title: Cloud: Support launching EC2 using IAM roles from metadata | The current EC2 Salt Cloud provider requires providing an AWS key and secret for a specific user to be able to launch a new instance. If the master is running on an EC2 instance, the EC2 instance can be assigned an IAM role with temporary credentials that can be used to launch a new instance. This makes it possible to not hard code the key and secret into the cloud pro
18:37 drawsmcgraw DammitJim: If Salt is in charge of the whole file, I file.manage() the whole thing.
18:37 copelco joined #salt
18:38 drawsmcgraw Otherwise, I use an accumulator with file.blockreplace() to manage just my portion.
18:38 DammitJim all I am doing is making sure that  /etc/modules has the bonding module in it
18:38 drawsmcgraw I'd file.append that thing. Salt's pretty good at not appending the same line twice.
18:38 DammitJim ah! cool
18:38 DammitJim thanks
18:38 DammitJim I"ll learn how to do that, then
18:39 drawsmcgraw yep!
18:39 DammitJim how do I go about doing stuff if I need to "sudo stop networking"
18:39 DammitJim :(
18:39 DammitJim I'm basically setting up teaming
18:39 DammitJim on NICs
18:41 jchadwick joined #salt
18:41 Tritlo joined #salt
18:41 Bart_ joined #salt
18:41 Bart_ Hi Everyone
18:41 DammitJim can I replace a file while it's being used by a service?
18:42 DammitJim like if I replaced /etc/network/interfaces?
18:42 Bart_ Simple quick question, any way to "overwrite" minion public keys
18:42 mh888 joined #salt
18:42 Bart_ I have the master set to "accep all keys" but when a hostname is already there, it will not overwrite that key.
18:42 zipkid joined #salt
18:43 Bart_ So when I reformat a minion with the same hostname I still need to go delete the Key on the Master
18:43 eccentricson Could possibly utilize reactor to delete the key maybe?
18:43 jaybocc2 iggy: what command can i use to list installed modules and grains etc
18:44 jaybocc2 you sent it to me before but i can't find it in my history
18:46 mh888 Hi guys, if I have a service restart watching a file change, while the file is also in the same .sls file, the service won't restart
18:46 Bart_ eccentricson: You think the reactor works before "minion binds"
18:47 mh888 is it because I should have the file change and service restart in different .sls files?
18:47 iggy jaybocc2: salt-call -g (for grains)
18:47 rideh joined #salt
18:47 mh888 I am new
18:47 mh888 to salt
18:47 iggy mh888: there is no reason for them to be in different files
18:48 iggy mh888: paste your state files to gist
18:49 kutenai joined #salt
18:51 Ludo- Hi! What is the best way to see only the errors when I do a state.highstate
18:51 Ludo- ?
18:55 iggy state_verbose: False
18:55 Dr_Death joined #salt
18:58 mh888 iggy: https://gist.github.com/myrah/a97ca5107eb7fb2908e8
18:58 digitalhero joined #salt
18:59 iggy the watch should be on the id, not the actual path of the file (so in your example - file: xxx_conf)
18:59 robinsmidsrod joined #salt
19:00 iggy you could also use watch_in on the file pointing at - service: service_xxx_restart
19:00 digitalh_ joined #salt
19:00 mh888 thanks. will give that a try
19:01 mh888 so is watch_in means watched by
19:02 lrojas joined #salt
19:02 digitalhero joined #salt
19:03 eccentricson Bart_: I've never used reactor, but it comes to mind
19:05 zer0def joined #salt
19:06 Ludo- iggy: should I put that in the sls formula? or can I put it in the salt command line or in a more global way?
19:06 omegamike joined #salt
19:08 iggy Ludo-: I generally put it in my master config file (which is where the salt command pulls it's config from)
19:14 mh888 Iggy: please take another look https://gist.github.com/myrah/a97ca5107eb7fb2908e8
19:14 mh888 thanks
19:14 mh888 the top is to run a script if file not exists
19:14 alemeno22 joined #salt
19:15 iggy cmd.run can't run salt:// uri's, you want cmd.script for that
19:15 PredatorVI joined #salt
19:16 alemeno22 joined #salt
19:16 mh888 just change cmd.run to cmd.script
19:16 zmalone joined #salt
19:16 mh888 that's all??
19:17 mh888 added watch_in and watch
19:17 iggy assuming your obfuscation isn't actually hiding other issues
19:18 iggy you don't need watch and watch_in... just one or the other
19:18 iggy and indent it correctly
19:18 wt joined #salt
19:19 mh888 ic. not both watch and watch in
19:19 mh888 :)
19:19 napsterX joined #salt
19:20 mh888 iggy: thank you!
19:20 PredatorVI Is it accurate to say that states are run in the order listed in the SLS file unless using a Requisite statement to alter the order?
19:20 forrest Yes
19:21 PredatorVI ok
19:24 ferbla joined #salt
19:28 SubOracle joined #salt
19:31 cowpunk22 joined #salt
19:32 BradThurber_ joined #salt
19:36 VR-Jack2 joined #salt
19:36 thekabal joined #salt
19:36 thekabal left #salt
19:36 thekabal joined #salt
19:37 thekabal Is there a way to have Salt returns (like, the results from cmd.run, for example) to be returned ordered (numeric, alpha, etc)?
19:38 chiui joined #salt
19:42 ksalman has anyone tried running Salt-call via cygwin ssh?
19:42 ksalman on windows?
19:42 ksalman it appears to run but hangs at [INFO    ] Executing command 'Powershell "Get-WmiObject win32_service | where {$_.startmode -eq \\"Auto\\"} | select-object name"' in directory 'C:\\cygwin\\home\\Administrator'
19:42 ksalman until i hit enter
19:43 ksalman i don't know why it hangs and works after I hit enter
19:44 ayee 2015-07-30 19:43:48,715 [salt.master                              ][WARNING ][18934] Authentication failure of type "eauth" occurred.
19:44 ayee 2015-07-30 19:43:48,716 [cherrypy.access.29160464                 ][INFO    ][22159] 127.0.0.1 - - [30/Jul/2015:19:43:48] "POST /login HTTP/1.1" 401 742 "" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2"
19:44 Ztyx joined #salt
19:44 PredatorVI One more ordering question...if I have a state (id) using multiple modules (e.g., service.running and file.managed) do modules run in the listed order and is that guaranteed (unless using other requisites)?
19:44 ayee eh, I don't know why my salt-api curl request is failing. I'm trying to use ldap. If I got python-ldap errors outputted somewhere, I could probably figure out what's wrong. but it just says authentication failure in /var/log/salt/master
19:45 ayee Should I be putting the salt-api andor the master into a higher verbosity mode, or debug mode?
19:45 Fiber^ joined #salt
19:45 fersur3 joined #salt
19:46 fersur3 How can I fetch multiple grains with grains.get ?
19:47 ksalman fersur3: salt-call grains.item os host
19:47 forrest ksalman: I have never tried that.
19:47 cowpunk22 joined #salt
19:47 ksalman =(
19:48 forrest PredatorVI: It runs in the order that the state file is ordered in as far as I'm aware even within the same ID. You could always just test it and confirm.
19:48 * ayee changes /etc/salt/master to log_level_logfile: debug
19:48 forrest ksalman: The only thing you should be sad about is using windows ;P
19:49 ksalman forrest: I am very sad indeed
19:49 forrest cygwin + windows + salt seems like a recipe for disaster
19:49 ksalman pretty much
19:49 alemeno22 joined #salt
19:49 ksalman I don't know how else I'd do it
19:49 thekabal Is there a way to have Salt returns (like, the results from cmd.run, for example) to be returned ordered (numeric, alpha, etc)?
19:49 ksalman we deploy windows via images, and the images have cygwin/ssh already configured. So the automation script ssh into the vm and does a state.highstate
19:50 ksalman but it just hangs
19:50 ferbla @thekabal I don't think there is a way to sort the return in salt
19:50 BradThurber joined #salt
19:50 thekabal @ferbla :( Sad, thanks.
19:51 ayee heh, debug outputs the same logging for the auth stuff
19:51 ayee bleh
19:51 PredatorVI ksalman:  Is there a reason you can't use the native windows salt-minion?
19:51 ayee I'll try 'trace'
19:53 ajw0100 joined #salt
19:53 ksalman PredatorVI: how do you mean native?
19:53 ksalman the VM has a random name, so I cant run state.highstate from the salt-master
19:54 ksalman because I don't know the minion id
19:55 Mate you could select it by ip or fqdn
19:55 ksalman hm.. that's a thought
19:56 Mate like salt -G fqdn:foo state.highstate
19:57 digitalhero joined #salt
19:57 otter768 joined #salt
19:59 Jahkeup joined #salt
19:59 ferbla @thekabal no problem
20:00 soren joined #salt
20:02 PredatorVI ksalman: I didn't think through my question and was thinking maybe the minion binaries were not based on the actual windows client.  If using the master as Mate suggested, could you use the remote win32 API instead of SSH?  I admit not using SSH with windows much so I don't know the issues w/ SSH.
20:02 PredatorVI *If NOT using the master*
20:03 PredatorVI In a past life we used the pywin32 module do to some cool stuff with windows remotely.
20:04 tru_tru joined #salt
20:04 [1]PredatorVI joined #salt
20:06 [1]PredatorVI joined #salt
20:08 jaybocc2 ksalman, cygwin/ssh on windows doesn't run with true administrative priviliges
20:08 nzero joined #salt
20:09 jaybocc2 that may be part of the issue, you can configure your minion config with a custom minion id if you like by setting 'id: minion-custom-id' in /etc/salt/minion
20:09 jaybocc2 and then use the salt master to call highstate against that minion.
20:11 voileux joined #salt
20:11 jaybocc2 haven't worked with windows in a while, but when we were doing windows and chef, I had tremendous issues with cygwin, frequently because it just doesn't actually have true administrative priviliges and is just not the right way to administer windows until ssh is native, WinRM or a remote agent like chef-client or salt-minion is best.
20:12 r0cketman joined #salt
20:12 bhosmer joined #salt
20:14 r0cketman Hey, peeps.  I'm somewhat of a n00b with salt, so please don't flame me for this one.  When the -L option is run (i.e., 'salt -L $somelist $salt.command'), does the master run the command against all in $somelist concurrently, or sequentially (step-through)?
20:14 jodv r0cketman: concurrently
20:14 r0cketman Good to know.  Thanks, jodv!
20:15 jodv r0cketman: if you want sequential, look at the cli option for batching
20:15 ksalman jaybocc2: thanks. I am now redoing the script to not do things via cygwin
20:15 pdayton1 joined #salt
20:15 PredatorVI r0cketman:  I thought I saw an option to  force sequential
20:15 PredatorVI if needed
20:15 womble left #salt
20:15 voileux joined #salt
20:16 r0cketman jodv: Excellent.  Will do.
20:19 napsterX joined #salt
20:21 jaybocc2 r0cketman, PredatorVI, jodv: batching (-b num_or_percent) is broken in 2015.5.2 and supposedly fixed in 2015.5.3 but i haven't gotten it yet as its not available in the repo
20:22 ayee "Authentication module threw missing auth.ldap.basedn in master config"
20:22 ayee hmm, I have that error in /var/log/salt/master
20:22 jodv jaybocc2: oh really?  i knew it was broken in the RC (back when it was 2015.2), but i thought it was fixed in the 2015.5.2 release
20:22 ayee o, I see.. there is a mandatory setting I'm missing
20:23 jaybocc2 iggy: i meant the way to see what _modules and _grains are sync'd , not the actual grain output, if you recall the command lmk.
20:23 jaybocc2 jodv: yeah :-/
20:24 jaybocc2 jodv: https://github.com/saltstack/salt/issues/24875 and https://github.com/saltstack/salt/issues/24617
20:24 saltstackbot [#24617]title: Un-handled exception: ValueError: list.remove(x): x not in list while pkg.refresh_db | Hi,...
20:24 iggy jaybocc2: they'll show up in /var/cache/salt/minion/extmods/
20:25 r0cketman jodv: what am I missing here?  I get no return. 'salt -L /home/rgoddard/dot8.txt -b 2 test.ping'
20:25 jaybocc2 ok, wasn't there also a command that listed all that for the env on master?
20:25 jaybocc2 r0cketman: pastebin or gist what you saw... but its probably the batch bug
20:26 r0cketman Oh, right!  Sorry!
20:26 jodv r0cketman: you're missing the list of minions
20:26 jodv :)
20:26 icflournoy joined #salt
20:27 r0cketman Oh, I'm mis-understanding the -L, then.  I thought it was to be able to use a file as a list.  So, the list of minions needs to be quoted after the -L?
20:27 jodv should be comma-delimited like:  salt -L 'minion1,minion2,minion3' test.ping
20:28 jodv r0cketman: ya.  if the file contains a comma-delimited list, you could do: salt -L "$(cat filename)" test.ping
20:28 r0cketman There we go!  I'll give that a spin.  Right now, my list is only 10-15, but after testing, it will jump to 30-40.
20:30 r0cketman jaybocc2 and jodv: I'm on version 2015.5.2 and the batch mode works fine.
20:31 fersur3 If I created a file /root/something.sh on a minion, how can I retrieve that file from the salt master?
20:33 icflourn1y joined #salt
20:33 r0cketman jodv: running my command with the $(cat... works just fine.  Perfectly, in fact.  Thanks!
20:33 jodv fersur3: cp.get_file_str I think
20:34 jodv that'll cat it
20:34 jodv r0cketman: cool :)
20:35 r0cketman jodv: I assume I could use grep or egrep in that parentetical, too?  I.e., salt -L "$(grep foo filename)"?
20:35 jodv r0cketman: yeah, its just shell expansion, nothing salt specific
20:35 r0cketman jodv: Beautiful.
20:39 voileux joined #salt
20:43 Ztyx joined #salt
20:45 XenophonF joined #salt
20:45 XenophonF how would i tell an archive.extracted state just to extract some of the files in a tar file?
20:48 XenophonF hm... maybe the --strip-components and --include arguments...
20:53 forrest XenophonF: Repack the archive with just the files? Seems like too much work to do to me.
20:54 XenophonF i'm trying to avoid having to rehost/redistribute the files (logback-1.1.3 in case you're wondering), but that seems like the easiest way forward
20:54 XenophonF i wish they posted the build artifacts somewhere, like slf4j does
20:55 forrest XenophonF: You could ask them
20:55 forrest They have an IRC right? Maybe see if they can do that
20:55 forrest doesn't seem unreasonable to me, or create an issue for them to look at
20:55 XenophonF actually, i took my own advice and S'ed the FW :)
20:56 XenophonF found the build artifacts on maven.org
20:56 forrest nice
20:57 XenophonF i am going to try to find them on IRC though and ask - that's a good idea
20:57 XenophonF thanks!
21:00 omegamike joined #salt
21:01 XenophonF there's _one_ person in their irc channel =)
21:04 asoc_ joined #salt
21:04 aqua^c_ joined #salt
21:05 drawsmcgraw joined #salt
21:05 cwyse joined #salt
21:05 amcorreia joined #salt
21:07 honestly joined #salt
21:07 aparsons joined #salt
21:09 murrdoc joined #salt
21:09 skullone joined #salt
21:10 FineTralfazz joined #salt
21:11 murrdoc basepi:  when u have a second
21:11 sirex joined #salt
21:11 basepi For you, murrdoc, I can give 3 seconds
21:11 basepi Time's up, later.
21:11 basepi ;)
21:11 basepi What can I do for you?
21:12 forrest So rude
21:12 forrest this guy
21:12 forrest who is he even, JEEZ
21:13 murrdoc basepi:  !
21:13 murrdoc i need someone with smarts in the python api
21:14 murrdoc please :)
21:14 murrdoc need to saltify this
21:14 murrdoc reboot_highstate_cmd = "/usr/bin/salt '{0}' system.reboot && "\
21:14 murrdoc "/usr/bin/salt-run state.event 'salt/minion/{0}/start' count=1"\
21:14 murrdoc " && /usr/bin/salt '{0}' state.highstate".format(minion_id)
21:14 murrdoc subprocess.call([ reboot_highstate_cmd ])
21:14 murrdoc thoughts ?
21:14 geekatcmu I like trains.
21:15 XenophonF did somebody say spaceship?
21:15 druonysus joined #salt
21:15 druonysus joined #salt
21:15 clintberry joined #salt
21:15 robawt i love spaceships
21:15 murrdoc ugais
21:16 KyleG joined #salt
21:16 KyleG joined #salt
21:16 XenophonF murrdoc: you want to run a highstate, reboot, then re-run highstate?
21:17 murrdoc i want to reboot, come back from reboot and run highstate
21:17 forrest murrdoc: Did you look at: https://github.com/saltstack/salt/issues/6792
21:17 saltstackbot [#6792]title: Handling restarts and the continuation of jobs. | This issue comes from the IRC where a discussion sprung up on the best way to handle reboots for updates or other tasks. As an example I need to perform the following actions:...
21:17 murrdoc without setting up a reactor
21:18 murrdoc except
21:18 murrdoc i cant code that state
21:18 napsterX joined #salt
21:18 c10b10 joined #salt
21:19 murrdoc right ?
21:21 aparsons joined #salt
21:24 Ztyx joined #salt
21:32 XenophonF given that i have to sometimes reboot after adding windows roles/features, it'd be nice if one could
21:33 XenophonF or after certain kernel/library updates
21:34 smcquay left #salt
21:42 * babilen itemizes XenophonF
21:45 murrdoc XenophonF:  why did u make 28 issues
21:45 murrdoc for iteritems vs items
21:45 murrdoc when u could hvae just sent the pulls
21:46 ayee external_auth:
21:46 ayee pam:
21:46 ayee saltapi:
21:46 ayee - .*
21:46 ayee Does that work in /etc/salt/master, in order to uset he salt api with no auth?
21:46 ayee the quick and dirty that accepts any auth
21:47 ayee I am getting this 401 unauthorized: https://gist.github.com/anonymous/663bba87cd43d41091d0
21:48 taryn joined #salt
21:48 taryn is there a minimum/reccomende amount of ram for a salt master?
21:48 basepi murrdoc: you should be able to put that into the orchestrate runner. using state.event and everything.
21:49 forrest murrdoc, XenophonF: I saw those as well, it's not a huge deal, but in the future please just send PRs instead of opening that many issues, I just did a 'mark all as read'
21:49 ajw0100 joined #salt
21:49 murrdoc basepi:  how do i pass in a minion id to the orchestrate
21:49 forrest taryn: Depends on the size of your infra.
21:51 taryn forrest: any estimates?
21:51 taryn and the infra size is small
21:51 forrest taryn: Probably a gig or two of ram and a few cores at least, inodes are usually the most important.
21:51 forrest taryn: I don't know what 'small' means
21:51 forrest small to me is like 50-200 machines
21:51 basepi murrdoc: hrm, interesting. You *might* be able to pass in `pillar=` and have it available in the orchestrate sls, but I am completely unsure.
21:51 forrest small to you is 5-10? I don't know, can you be more specific?
21:51 taryn forrest: yeah
21:52 murrdoc basepi:  yeah, but i need to do all of that from python api
21:52 forrest taryn: on the 5-10, or 50-200?
21:52 taryn forrest: 5-10, but we might have a bunch of vms
21:52 basepi If it works from the CLI it should *probably* work from the python client API
21:53 forrest taryn: If you can scale the master up I'd say start off small, Salt is pretty efficient.
21:53 taryn forrest: how small?
21:53 basepi if it doesn't maybe put in an issue
21:53 taryn forrest: 128MB memory?
21:53 forrest no
21:53 forrest what
21:53 forrest that's barely enough for the OS
21:53 taryn really?
21:53 taryn cuz I've got a few 32MB zones
21:53 forrest taryn: On a VM running a full OS??
21:53 forrest 32mb?
21:53 taryn in a zone
21:53 forrest I am confused
21:54 taryn forrest: yeah, not for salt though
21:54 forrest I am thinking VMs, which to me are machines running a full OS.
21:54 forrest are you talking about oracle VM zones?
21:54 taryn not oracle, but yes
21:54 forrest If so I have no idea
21:55 forrest 128 megs seems like nothing to me, but if it's for a single process, maybe? I don't usually track it that closely
21:55 forrest I've never used zones before, sorry :(
21:56 aparsons joined #salt
21:56 ayee o, I'm suupposed to use 'auth' as the eauth module
21:56 ayee not pam, I think?
21:56 murrdoc basepi:  thanks man
21:58 otter768 joined #salt
21:59 jodv joined #salt
21:59 nzero joined #salt
21:59 ayee external_auth:
21:59 ayee auto:
21:59 ayee saltapi:
21:59 ayee - .*
22:00 ayee hmm, this gets me 503 service unavailable
22:01 zsoftich joined #salt
22:03 Ztyx joined #salt
22:05 DanyC joined #salt
22:07 DanyC hi folks, quick q: anyone knows if pkgrepo.managed can create/ supports creating multiple repo within a single repo file? I have looked over docs but the example is only 1:1 between a repository & repo file
22:08 DanyC i came across https://github.com/saltstack/salt/issues/16705 but no sure it does suport it or not. Any help much appreciated!
22:08 saltstackbot [#16705]title: Should pkg.mod_repo support multiple repos? | With `zypper` you can add repository by using simple command:...
22:09 forrest DanyC: As far as I know it only supports a single repo per entry. Pretty sure that's more commonly the standardized way I've seen in the past few years, each repo has a unique file.
22:12 alemeno22 joined #salt
22:12 XenophonF forrest: sorry - i'll try to find time to do the pull requests next week
22:12 forrest XenophonF: No worries! It should happen, I was just like "WHAT IS ALL THIS SPAM RABBLE RABBLE RABBLE" this morning.
22:13 DanyC forrest: thanks for reply. Well you say that but the standard / default CentOS base looks like http://vault.centos.org/4.2/CentOS-Base.repo and this is what i'm trying to replicate using Salt
22:13 forrest DanyC: You're right I should have specified extra repos, my bad.
22:14 forrest DanyC: If you really want a bunch of repos in a single file, just do a managed file, drop it on, and then do a cmd.run to yum clean all
22:14 pipps99 joined #salt
22:15 bfoxwell joined #salt
22:17 DanyC forrest: i could but the idea was to do something like this baseurl: http://{{pillar['repoip']}}/centos/elasticsearch-1.4/ and built it dinamically based on whatever repo IP is available per location/ env
22:17 forrest you could loop through the pillar entries
22:17 subsignal joined #salt
22:19 napsterX joined #salt
22:19 DanyC forrest: right i see. Is a good enough workaround i guess. Should i understand/ take it that having multiple repo per file is a low hanging fruit hence not much "love" to it?
22:20 XenophonF left #salt
22:20 forrest DanyC: I don't know as I'm not on the dev team. I'll put it this way, you're the first person I've seen ask this question in probably 6-8 months and I'm in here pretty much every day.
22:20 forrest So maybe?
22:21 forrest It's pretty easy to workaround via loops, so it doesn't get brought up much I'd imagine
22:21 _JZ_ joined #salt
22:22 forrest DanyC: Feel free to comment on that issue you linked though, terminalmage might have an update since last time. The dev team is usually pretty responsive.
22:22 sunkist joined #salt
22:22 kalessin joined #salt
22:22 DanyC forrest: indeed. I'll do that. Thanks a bunch for your reply, much appreciated and keep doing it !
22:23 Karunamon Hi folks - wondering what the proper syntax is for a logical OR in the midst of a jinja template is (itself inside of a pillar). Something like: {% if grains['os'] == ( 'RedHat' or 'CentOS'' ) %}
22:23 forrest DanyC: NP, sorry I couldn't provide a better answer :)
22:23 Karunamon that version doesn't error but it doesn't work either
22:23 DanyC forrest: in our world, good enough is the king ;)
22:23 forrest DanyC: Haha.
22:23 ingslovak joined #salt
22:24 forrest Karunamon: use the os_family grain
22:24 forrest Karunamon: Then you can just match against RedHat and it will catch all variants, which includes centos
22:24 forrest Karunamon: https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L939
22:25 cowpunk22 joined #salt
22:25 ayee Can I use a secret key, like an api key to auth to salt-api? versus username/password stuff
22:25 Karunamon forrest: Neat! Okay, so that fixes that use case. Still, wondering what the right way to write that bit of code is should I run into a need for it in the future
22:27 forrest Karunamon: Did you try {% if grains['os'] == 'RedHat' or grains['os'] == 'CentOS' %}
22:27 forrest Karunamon: I can't find a good example in the jinja docs of using it, also you have an extra ' in your statement from above.
22:28 omegamike joined #salt
22:37 lompik joined #salt
22:38 gcfhvjbkn joined #salt
22:39 gcfhvjbkn joined #salt
22:40 gcfhvjbkn joined #salt
22:40 gcfhvjbkn joined #salt
22:41 gcfhvjbkn joined #salt
22:42 gcfhvjbkn joined #salt
22:42 gcfhvjbkn joined #salt
22:43 gcfhvjbkn joined #salt
22:44 gcfhvjbkn joined #salt
22:44 gcfhvjbkn joined #salt
22:45 gcfhvjbkn joined #salt
22:45 gcfhvjbkn joined #salt
22:46 gcfhvjbkn joined #salt
22:47 gcfhvjbkn joined #salt
22:47 gcfhvjbkn joined #salt
22:48 gcfhvjbkn joined #salt
22:49 gcfhvjbkn joined #salt
22:49 gcfhvjbkn joined #salt
22:50 gcfhvjbkn joined #salt
22:50 gcfhvjbkn joined #salt
22:51 gcfhvjbkn joined #salt
22:52 gcfhvjbkn joined #salt
22:52 gcfhvjbkn joined #salt
22:53 gcfhvjbkn joined #salt
22:54 gcfhvjbkn joined #salt
22:54 gcfhvjbkn joined #salt
22:55 patrick__ left #salt
22:55 gcfhvjbkn joined #salt
22:56 gcfhvjbkn joined #salt
22:56 gcfhvjbkn joined #salt
22:57 gcfhvjbkn joined #salt
22:57 jodv joined #salt
22:57 gcfhvjbkn joined #salt
22:57 loz-- joined #salt
22:58 gcfhvjbkn joined #salt
22:59 gcfhvjbkn joined #salt
22:59 Aidin joined #salt
22:59 gcfhvjbkn joined #salt
22:59 taryn ...
22:59 taryn left #salt
23:00 gcfhvjbkn joined #salt
23:00 gcfhvjbkn joined #salt
23:01 gcfhvjbkn joined #salt
23:01 mosen joined #salt
23:02 gcfhvjbkn joined #salt
23:02 gcfhvjbkn joined #salt
23:03 gcfhvjbkn joined #salt
23:04 gcfhvjbkn joined #salt
23:04 gcfhvjbkn joined #salt
23:04 alemeno22 joined #salt
23:05 gcfhvjbkn joined #salt
23:06 gcfhvjbkn joined #salt
23:06 nzero joined #salt
23:07 gcfhvjbkn joined #salt
23:08 gcfhvjbkn joined #salt
23:09 gcfhvjbkn joined #salt
23:10 gcfhvjbkn joined #salt
23:11 gcfhvjbkn joined #salt
23:11 gcfhvjbkn joined #salt
23:12 gcfhvjbkn joined #salt
23:12 MatthewsFace joined #salt
23:13 gcfhvjbkn joined #salt
23:13 gcfhvjbkn joined #salt
23:14 gcfhvjbkn joined #salt
23:15 gcfhvjbkn joined #salt
23:15 gcfhvjbkn joined #salt
23:16 gcfhvjbkn joined #salt
23:16 gcfhvjbkn joined #salt
23:17 gcfhvjbkn joined #salt
23:18 gcfhvjbkn joined #salt
23:19 gcfhvjbkn joined #salt
23:20 gcfhvjbkn joined #salt
23:20 napsterX joined #salt
23:20 gcfhvjbkn joined #salt
23:21 omegamike joined #salt
23:21 gcfhvjbkn joined #salt
23:21 gcfhvjbkn joined #salt
23:21 dhscholb joined #salt
23:22 gcfhvjbkn joined #salt
23:23 dhscholb hey all, I need to have salt send an email (or some kind of notification) if there are any failures for a scheduled highstate call
23:23 gcfhvjbkn joined #salt
23:23 gcfhvjbkn joined #salt
23:23 dhscholb is there a "global failure email address" I can set
23:23 dhscholb ?
23:24 pipps joined #salt
23:24 gcfhvjbkn joined #salt
23:25 gcfhvjbkn joined #salt
23:25 gcfhvjbkn joined #salt
23:26 gcfhvjbkn joined #salt
23:26 gcfhvjbkn joined #salt
23:27 gcfhvjbkn joined #salt
23:28 gcfhvjbkn joined #salt
23:29 gcfhvjbkn joined #salt
23:30 gcfhvjbkn joined #salt
23:30 iggy there's an smtp returner, probably not what you want though
23:30 gcfhvjbkn joined #salt
23:31 gcfhvjbkn joined #salt
23:32 gcfhvjbkn joined #salt
23:32 gcfhvjbkn joined #salt
23:33 gcfhvjbkn joined #salt
23:33 dhscholb yeah, it would only need to email on failure
23:33 gcfhvjbkn joined #salt
23:34 dhscholb i'm aware of the onfail requisite, but that's a per-state settign
23:34 dhscholb i'd want a global option
23:34 gcfhvjbkn joined #salt
23:35 gcfhvjbkn joined #salt
23:35 gcfhvjbkn joined #salt
23:36 gcfhvjbkn joined #salt
23:36 dhscholb is there a way to customize highstate to set an onfail requisite for it?
23:37 gcfhvjbkn joined #salt
23:37 gcfhvjbkn joined #salt
23:38 gcfhvjbkn joined #salt
23:38 gcfhvjbkn joined #salt
23:39 gcfhvjbkn joined #salt
23:40 gcfhvjbkn joined #salt
23:40 gcfhvjbkn joined #salt
23:41 gcfhvjbkn joined #salt
23:42 gcfhvjbkn joined #salt
23:42 gcfhvjbkn joined #salt
23:43 gcfhvjbkn joined #salt
23:43 gcfhvjbkn joined #salt
23:44 gcfhvjbkn joined #salt
23:45 gcfhvjbkn joined #salt
23:45 gcfhvjbkn joined #salt
23:46 gcfhvjbkn joined #salt
23:47 gcfhvjbkn joined #salt
23:47 gcfhvjbkn joined #salt
23:48 zsoftich1 joined #salt
23:48 gcfhvjbkn joined #salt
23:48 iggy I've never heard of a way to do what you're asking
23:49 gcfhvjbkn joined #salt
23:49 iggy I would personally feed my output to something else (cloudwatch/gce monitoring-logging/prometheus/etc) and have it notify me
23:49 gcfhvjbkn joined #salt
23:49 mosen are there returners for those kinda things?
23:50 gcfhvjbkn joined #salt
23:50 gcfhvjbkn joined #salt
23:51 gcfhvjbkn joined #salt
23:52 gcfhvjbkn joined #salt
23:52 gcfhvjbkn joined #salt
23:53 gcfhvjbkn joined #salt
23:53 pipps joined #salt
23:54 gcfhvjbkn joined #salt
23:54 gcfhvjbkn joined #salt
23:55 gcfhvjbkn joined #salt
23:55 gcfhvjbkn joined #salt
23:56 gcfhvjbkn joined #salt
23:57 markm joined #salt
23:57 gcfhvjbkn joined #salt
23:57 nzero joined #salt
23:57 gcfhvjbkn joined #salt
23:58 gcfhvjbkn joined #salt
23:59 gcfhvjbkn joined #salt
23:59 otter768 joined #salt
23:59 gcfhvjbkn joined #salt

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