Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-06-12

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

All times shown according to UTC.

Time Nick Message
00:01 forrest agliodbs, set hrdb versus {{ hr_db }}
00:02 dsolsona_ joined #salt
00:02 forrest none of your other set variables have underscores
00:02 agliodbs forrest: correct
00:02 pssblts joined #salt
00:02 forrest is that how it is supposed to work?
00:02 forrest where is hr_db set?
00:02 forrest and where is hrdb referenced?
00:02 manfred forrest: it isn't
00:02 manfred that was the problem
00:02 agliodbs forrest: no, hr_db is a typo.  there's a bug in the jinja template.  The problem is that salt is misreporting the *location* of the bug
00:03 manfred forrest: it points to the wrong variable as the error
00:03 forrest oh gotcha
00:03 arthabaska joined #salt
00:03 agliodbs manfred: I have no clue why it chose the variable it did to report.  I'd understand an off-by-one error, but that seems completely random.
00:04 manfred yeah
00:04 dsolsona joined #salt
00:05 forrest I've had it happen where it will report the line underneath the referencing one, but yea this is odd
00:05 forrest it should be erroring out on that first one
00:06 alanpearce joined #salt
00:08 agliodbs so, now question:
00:08 manfred agliodbs: needs more .get('variable', '')
00:09 agliodbs this might be an obvious question, but can I do {% if %} in *any* sls file?
00:09 manfred pillar['postgresql']['postgresql_version'] -> salt['pillar.get']('postgresql:postgresql_version', '')
00:09 manfred agliodbs: yessir
00:09 agliodbs manfred: oh, thanks!
00:09 layer3switch joined #salt
00:09 agliodbs manfred: I'm sure the way we're dealign with pillar data is fairly brain-dead
00:10 manfred agliodbs: less [''] and less .get()
00:10 agliodbs ok
00:10 manfred and yeah, you get to set a default
00:10 agliodbs manfred: is there any way to just get all the pillar variables in one category and make them local varables?
00:10 manfred agliodbs: um... don't believe so
00:10 agliodbs e.g. .get_all()
00:11 agliodbs bummer
00:11 manfred agliodbs: pillar.item will return a dictionary or list of everything under one thing
00:11 pdayton1 joined #salt
00:11 manfred agliodbs: salt['pillar.item']('postgresql', {})
00:11 manfred you can run them from the command line
00:11 manfred salt-call pillar.item 'postgresql'
00:12 manfred or pillar.items
00:12 manfred salt-call sys.doc pillar
00:12 scoates joined #salt
00:12 ipalreadytaken joined #salt
00:14 agliodbs manfred: is there any way to do a regex match in a jinja if statement?
00:14 agliodbs "matches" was removed from jinja2
00:14 manfred yes...
00:14 manfred hold on
00:15 manfred oh really...
00:15 manfred hrm
00:16 pdayton joined #salt
00:17 layer3switch joined #salt
00:18 manfred agliodbs: all i see is replace http://jinja.pocoo.org/docs/templates/#replace
00:18 agliodbs manfred: it appears that the answer is no
00:18 agliodbs manfred: poco removed it from jinja2 and never replaced it with anything
00:18 manfred lame
00:19 agliodbs I'm surprised this doens't come up for Salt more often
00:19 forrest you can use mako if you want agliodbs
00:19 agliodbs mako?
00:19 forrest in fact you can use mako and jinja, or just python
00:19 manfred or the pydsl
00:19 manfred agliodbs: http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.pydsl.html
00:20 manfred the pydsl is kind of awesome
00:20 forrest here's the full list if you want it as well: http://docs.saltstack.com/en/latest/ref/renderers/
00:20 forrest yea pydsl is cool
00:20 manfred you just write out your states in a big dictionary and return it
00:20 manfred https://github.com/saltstack-formulas/salt-cloud-reactor/blob/master/reactor/autoscale.sls
00:20 forrest jeez what slacker wrote this code....
00:20 forrest :P
00:20 manfred THIS ONE!
00:21 manfred i am probably just going to change it to an sls, since it would be super easy to do
00:21 agliodbs wow, that's awesome!
00:21 forrest it's a good example to have though manfred
00:21 agliodbs why didn't anywone tell me abotu this before
00:21 forrest hah
00:21 agliodbs damn, can I use the pydsl for pillars?
00:21 manfred forrest: forrest it is essentially this https://github.com/saltstack-formulas/ec2-autoscale-reactor/blob/master/reactor/ec2-autoscale.sls
00:22 forrest ahh
00:22 manfred that is basically what I took it from mostly
00:22 manfred it is a super simplified version of that
00:22 manfred heh
00:22 mogman1 joined #salt
00:22 forrest agliodbs, I think it can be used in any sls file, manfred do you remember if it can be used in pillars (the pydsl)
00:22 manfred yes
00:23 forrest there aren't any examples that I'm aware of though
00:23 manfred agliodbs: i was thinking about being silly and writing a chef cookbook renderer, but then I decided i didn't want to troubleshoot it
00:23 forrest bleh
00:23 manfred should just be __pillar__
00:23 manfred just like in the states
00:23 manfred just like __opts__ is in these ones ^^
00:23 forrest manfred, if you have any examples, that would be very cool to add to the render page
00:24 manfred i do not unfortunately, I will try and add some.
00:24 forrest awesome
00:24 jab416171 forrest, thanks again for your help. I now see how to search for command line stuff with the modules
00:24 forrest jab416171, yea no problem!
00:26 agliodbs can I import "re", though?>
00:27 manfred agliodbs: yes
00:27 manfred it is python
00:27 manfred agliodbs: look at this one https://github.com/saltstack-formulas/ec2-autoscale-reactor/blob/master/reactor/ec2-autoscale.sls
00:30 londo_ joined #salt
00:31 agliodbs would this be correct usage?
00:31 agliodbs http://pastebin.com/SLTEaPrD
00:32 jimklo joined #salt
00:32 manfred no
00:32 manfred you return your state
00:32 manfred uhh
00:32 layer3switch joined #salt
00:34 layer3switch joined #salt
00:34 agliodbs not getting it then.  I'm trying to copy the examples ...
00:34 manfred one second
00:35 alekibango joined #salt
00:36 manfred agliodbs: http://paste.gtmanfred.com/6RKB0c/
00:36 TyrfingMjolnir joined #salt
00:36 manfred agliodbs: and that .get won't work like that
00:36 manfred have to use the __salt__ function
00:36 agliodbs which .get()?
00:36 n8n joined #salt
00:36 manfred agliodbs: http://paste.gtmanfred.com/m24/
00:37 manfred your __pillar__.get() it would have to be __pillar__.get('handyrep').get('hrdb
00:37 manfred ')
00:37 agliodbs well,I'm OK with that too
00:37 manfred or __salt__['pillar.get']('handyrep:hr_db')
00:38 manfred but this one should do what you were thinking http://paste.gtmanfred.com/6RKB0c/
00:39 manfred so you are just returning a json ized version of the yaml for state.sls
00:39 Shenril joined #salt
00:39 agliodbs ah, ok
00:40 manfred all the dictionaries in the list, are just your
00:40 manfred - yaml lists
00:40 manfred because they are actually ordered dictionaries
00:40 agliodbs do I return "none" if I don't want it to do anything?
00:40 manfred maybe?
00:40 manfred that i don't know
00:40 agliodbs ok
00:40 manfred you might need to return an empty {}
00:40 agliodbs now the other question is if I can use this dsl to create a pillar
00:41 agliodbs which is where I can *really* use it
00:41 manfred that i do not believe you can do
00:41 manfred i think it only renders states
00:41 manfred but I could be wrong
00:41 forrest manfred, no I believe you are correct from the way the documentation is worded
00:41 agliodbs same with #!py ?
00:41 manfred it would be worth a shot, just throw a #!pydsl at the top of a file and see if it freaks out
00:41 agliodbs bummer
00:41 forrest The pydsl renderer allows one to author salt formulas (.sls files) in pure Python
00:42 mgw joined #salt
00:42 forrest yea agliodbs try!
00:42 forrest if it works, then you can write some great docs with some cool examples that everyone will benefit from
00:42 manfred heh
00:42 forrest I've gotta go guys, best of luck
00:42 manfred i think forrest is obsessed with documentation
00:42 agliodbs manfred: SyntaxError: 'return' outside function (<string>, line 18)
00:43 manfred on mine?
00:43 agliodbs yah
00:44 agliodbs oh, failed ot indent correctly, moment
00:44 manfred ahh
00:48 mogman1 joined #salt
00:49 agliodbs yay! worked!
00:49 manfred nice
00:49 agliodbs now, to try the pillar
00:49 manfred i was about to say, i am pretty sure i did it right
00:51 agliodbs hmm
00:51 agliodbs the return info for that is a little troublesome
00:51 manfred for pillars?
00:51 agliodbs no, this is the state
00:51 agliodbs http://pastebin.com/hmVpJPJP
00:51 agliodbs that's what that module returns
00:52 manfred hrm
00:52 manfred idk
00:52 redondos joined #salt
00:55 agliodbs manfred: I think it's failing to match the grain id, and that's the result of the empty dict
00:55 manfred maybe
00:55 manfred grainid?
00:55 manfred or pillar?
00:55 agliodbs it's certainly not checking for the actual database, because I just tried deleting the database, and the item didn't fail
00:56 blarghmatey joined #salt
00:56 manfred it looks like it isn't running anything at all from your state, so i bet your are right that it isn't matching and is returning a {}
00:56 agliodbs yah
00:57 manfred salt-call pillar.get 'something:something' and that returns the value?
00:57 manfred you are looking for*
00:58 agliodbs no, it's the grain id I'm looking for
00:59 ajolo joined #salt
00:59 manfred ahh ok, so you switched it to __salt__['grain.get']('some:thing') ?
00:59 manfred grains.get*
00:59 bhosmer joined #salt
01:00 cliffstah joined #salt
01:01 hoodow joined #salt
01:01 TheThing joined #salt
01:02 agliodbs no, I didn't, but I can try that
01:02 agliodbs I'm not clear on why __grains__.get() doesn't work though
01:02 mgw joined #salt
01:03 lude wwwww~.
01:03 lude `.~.~
01:03 lude .~.
01:03 lude apologies
01:03 agliodbs would be nice if I could put print statements in here ...
01:05 blarghmatey joined #salt
01:05 bhosmer joined #salt
01:08 alanpearce joined #salt
01:13 jslatts joined #salt
01:16 blarghmatey joined #salt
01:19 pdayton joined #salt
01:25 MZAWeb joined #salt
01:26 mspah_ joined #salt
01:27 kickerdog joined #salt
01:33 agliodbs I just can't seem to get pydsl to work, and it seems like I might be the very first user of it, given that I can't find a single blog example or stackexchange question ...
01:34 manfred it is super under used
01:34 manfred agliodbs: i will take a shot at it when I get home in a bit
01:34 agliodbs manfred: the stuff you gave me seems like it shoudl be the py renderer, not the pydsl renderer
01:35 agliodbs but when I run it under !py, salt crashes
01:35 manfred oh oh yeah my bad
01:35 manfred i mixed them up
01:37 jnials joined #salt
01:38 Eugene joined #salt
01:40 layer3switch joined #salt
01:40 ajolo joined #salt
01:45 druonysus joined #salt
01:47 TOoSmOotH joined #salt
01:48 dancat joined #salt
01:49 ml_1 joined #salt
01:50 agliodbs manfred: here's the working example: http://pastebin.com/G2UDbMQ1
01:51 manfred nice
01:51 manfred i like that better than the #!py renderer
01:51 agliodbs yah, easier to read
01:51 agliodbs now if only I could get it to return a useful comment message
01:55 pdayton joined #salt
01:57 alekibango joined #salt
02:01 tmwsiy_ joined #salt
02:08 ajprog_laptop joined #salt
02:08 alanpearce joined #salt
02:09 cedwards joined #salt
02:14 rgarcia_ joined #salt
02:19 \ask joined #salt
02:21 otter768 joined #salt
02:22 ajw0100 joined #salt
02:36 z3uS joined #salt
02:39 kickerdog left #salt
02:40 agliodbs manfred: still here?
02:46 agliodbs manfred: I just rewrote my pillar in python, and got it to work.  yay!
02:51 TaiSHi Anyone using php formula for php5-fpm in ubuntu ?
02:52 ajolo_ joined #salt
02:53 MatthewsFace joined #salt
02:54 bhosmer joined #salt
02:55 logix812 joined #salt
02:57 Katafalkas joined #salt
03:03 \ask joined #salt
03:05 Shenril joined #salt
03:08 manfred agliodbs: awesome
03:08 agliodbs manfred: can I ask one quick question?
03:08 manfred sure
03:09 agliodbs manfred: can I reference a pillar from another pillar?  I tried in the python pillar, and it didn't seem to work
03:09 manfred i am just pouring some of this http://www.beeradvocate.com/beer/profile/32171/105020/?ba=July2Nov
03:09 alanpearce joined #salt
03:09 manfred agliodbs: that i don't believe you can do
03:09 agliodbs ok
03:10 n8n joined #salt
03:10 agliodbs ok, thanks for confirmation
03:15 mogman1 joined #salt
03:22 MatthewsFace joined #salt
03:23 smcquay joined #salt
03:24 rgarcia_ joined #salt
03:28 mgw joined #salt
03:36 blarghmatey joined #salt
03:41 hardwire joined #salt
03:46 malinoff joined #salt
03:49 possibilities joined #salt
03:56 blarghmatey Does anyone know when the environ module got added into saltstack? I'm running the 0.17 release and getting a failure when trying to run environ.get
03:57 manfred it isn't in a release yet?
03:57 manfred at least environ.get isn't
03:57 arthabaska joined #salt
03:58 manfred blarghmatey: it isn't in .17 https://github.com/saltstack/salt/tree/0.17/salt/modules
03:58 manfred https://github.com/saltstack/salt/tree/2014.1/salt/modules
03:58 manfred or 2014.1
03:58 manfred so it won't be in until helium
03:59 blarghmatey manfred: Thanks. I guess I'll have to try a different approach.
04:04 mosen joined #salt
04:10 alanpearce joined #salt
04:14 dsolsona joined #salt
04:15 schimmy joined #salt
04:18 anuvrat joined #salt
04:20 schimmy joined #salt
04:27 taterbase joined #salt
04:29 ipalreadytaken joined #salt
04:31 mateoconfeugo joined #salt
04:34 Eugene I'm going to go crazy. I have 'state_verbose: True' and 'state_output: terse' in /etc/salt/master. I've restarted the salt-master service, restarted the whole damned box. Still getting full-style output on states. WTF?
04:35 mateoconfeugo joined #salt
04:35 Eugene version 2014.1.4 from epel.
04:38 mateoconfeugo joined #salt
04:39 mateoconfeugo joined #salt
04:40 l0x3py joined #salt
04:42 Shenril joined #salt
04:43 bhosmer joined #salt
04:46 felskrone joined #salt
04:49 mgw joined #salt
04:56 JeroenH_ joined #salt
04:59 mgw joined #salt
05:01 ramteid joined #salt
05:05 jnials joined #salt
05:11 alanpearce joined #salt
05:11 eliasp joined #salt
05:14 jalbretsen joined #salt
05:16 kvbik joined #salt
05:24 Outlander joined #salt
05:29 harkx joined #salt
05:44 allanparsons joined #salt
05:49 ipalreadytaken joined #salt
06:00 ndrei joined #salt
06:03 harkx joined #salt
06:11 alanpearce joined #salt
06:15 ipalreadytaken joined #salt
06:23 bhosmer joined #salt
06:25 slav0nic joined #salt
06:32 bhosmer joined #salt
06:33 picker joined #salt
06:34 travisfischer joined #salt
06:36 TheThing joined #salt
06:49 Nazzy joined #salt
06:58 schimmy1 joined #salt
07:01 schimmy2 joined #salt
07:09 neilf_ IF salty vagrant is deprecated,  is it still meant to be linked to from http://salt.readthedocs.org/en/v0.17.5/topics/tutorials/quickstart.html ?
07:12 alanpearce joined #salt
07:17 andabata joined #salt
07:17 ml_1 joined #salt
07:26 TheThing joined #salt
07:29 sverrest joined #salt
07:31 TheThing joined #salt
07:39 ipalreadytaken joined #salt
07:42 simon_q joined #salt
07:42 ipalread_ joined #salt
07:43 Katafalkas joined #salt
07:43 ipalread_ joined #salt
07:45 cast joined #salt
07:46 CeBe joined #salt
07:55 Lomithrani joined #salt
07:57 alanpearce joined #salt
07:59 anuvrat joined #salt
08:05 TheThing joined #salt
08:07 ipalreadytaken joined #salt
08:08 darkelda joined #salt
08:12 jdmf joined #salt
08:15 hopthrisC joined #salt
08:21 bhosmer joined #salt
08:23 babilen neilf_: Probably not
08:27 workingcats joined #salt
08:35 tmmt sawuit: /win 2
08:37 linjan_ joined #salt
08:38 TheThing joined #salt
08:51 harkx joined #salt
08:53 Adamba joined #salt
08:54 Adamba Hey guys
08:54 Adamba Can someone help me with Saltstack variables?
09:04 Adamba joined #salt
09:05 MrTango joined #salt
09:07 lae joined #salt
09:09 pdayton joined #salt
09:11 greyhatpython joined #salt
09:11 greyhatpython joined #salt
09:13 shiin joined #salt
09:17 shiin when I make a file.directory that requires a user, salt keeps printing red errors if I test=True, because the user and group dont exist yet. is there a clean way to describe those kinds of dependencies?
09:18 Katafalkas joined #salt
09:23 briner
09:26 babilen Hi all - I am using the users-formula to create users which is working perfectly fine. But I am unsure how to require the presence of a specific user given that it is simply created by listing it in pillars
09:27 babilen The best approach I can think of is to require a suitable state (or even the entire SLS) from the user formula, but you might be able to think of a better solution
09:28 babilen shiin: There is no "assume the previous states worked" speculative output
09:29 babilen shiin: What would you like it to do? I mean the output is correct as the user does not exist (yet). It's the same for services whose startup script is not yet present as the package containing it has not yet been installed
09:31 Katafalkas joined #salt
09:34 xintron joined #salt
09:34 xintron The file.symlink, is there some way to chdir before making the symlink (and then be able to make it relative)?
09:36 anuvrat joined #salt
09:37 babilen xintron: Why would you have to chdir beforehand? If you want a symlink from /foo/bar/baz → ../quux then you would use /foo/bar/baz as name and ../quux as target wouldn't you?
09:37 xintron ah, true, that makes sense :)
09:38 babilen yay ;)
09:38 babilen err, that should have been :)
09:42 simonmcc I’ve just published kitchen-salt v0.0.18 https://github.com/simonmcc/kitchen-salt/blob/master/CHANGE.md (you can now test a complete file_root with multiple formula/state collections)
09:48 AdamSewell joined #salt
09:58 shiin babilen: I would expect that on test=True there wont be errors if users dont exist yet, that will be generated due to a require statement anyway.
09:59 slav0nic joined #salt
10:01 babilen shiin: That would require salt to be able to model the *outcome* of states rather than simply run specific tests to check if a state has been achieved.
10:01 shiin babilen: so those errors are intended behavior?
10:01 babilen shiin: I am not saying that it is not possible to implement this, but it is far from trivial
10:01 shiin I understand.
10:04 babilen shiin: I mean what should happen if the state you require also has dependencies? But even if you only model to depth1 you need to specify the possible outcomes of every state *if it is successful*. That can be done and is comparable to a planning system (cf. http://en.wikipedia.org/wiki/Automated_planning_and_scheduling ) and algorithms do exist to handle this efficiently
10:05 Lomithrani first time it is happening to me I get all kind of  http://pastebin.com/CqptWQ5G
10:06 Lomithrani Would it be possible that it's because the server has neverbeen  restarted since salt was installed ?
10:07 babilen shiin: What salt does, essentially, is to define the outcome of specific checks that, if the outcome is as expected, mean that the state has been achieved. If not then the state is executed. It knows nothing about the *desired* outcome and if the implementation of a state does not actually change the outcome then the state will be repeated over and over again.
10:09 babilen It is an interesting problem and *iff* salt would model the outcome of states in a suitable logic it would allow it to order states completely automatically and it might even be able to tell you "You wanted to run state FOO which needs BAR and BAZ to be true, but no currently configured state has BAR or BAZ as outcome. You probably wanted to include the QUUX state as that would make BAR and BAZ come true"
10:10 bhosmer joined #salt
10:10 babilen Things like this are done to enable autonomous actions in agents to be performed in the right order to achieve a certain goal, but is IMHO out-of-scope for salt even though it would be awesome if something like this could be done.
10:11 babilen You could essentially ask salt "given all formulas and states you know what would I have to do to have a running PostgreSQL server with three databases?" .. "Okay, do that!"
10:11 babilen </offtopic>
10:14 Lomithrani everyone ever ran into this http://pastebin.com/CqptWQ5G ?
10:14 babilen Lomithrani: Use a nicer pastebin such as http://refheap.com, http://paste.ubuntu.com, http://paste.debian.net or http://pastie.org if you want to make IRC a better place. Could you paste the actual state/SLS that causes this error?
10:14 Lomithrani -everyone +anyone
10:15 TyrfingMjolnir joined #salt
10:26 TyrfingMjolnir joined #salt
10:39 bhosmer joined #salt
10:47 seblu joined #salt
10:47 TyrfingMjolnir joined #salt
10:56 harkx joined #salt
10:58 Lomithrani joined #salt
10:59 shiin babilen: yet still, if test=True none of the conditions are going to be evaluated anyway, so why spill errors? it could as well be default behavior to list what *would* change, without failing on things that arent changed yet, that arent parse errors due to typos and all.
11:03 babilen shiin: The behavior of that states is entirely undefined if it's requisites aren't met. What kind of output would you expect though?
11:04 shiin I would -not- expect an error due to a user or group not existing. it simply should take that as a requirement (hence the require: user: shiin)
11:06 \ask joined #salt
11:06 dpac|away joined #salt
11:10 babilen shiin: It obviously cannot create a file that is owned by a user that is not present.
11:11 babilen shiin: The state therefore fails and you get an error because the user is not there.
11:11 shiin babilen: thats fine if the require: statement wouldnt actually fulfill those requirements, but Im only test-driving with test=True
11:12 shiin it can never be fulfilled that way, it works if I dont test-drive it.
11:12 shiin so its not an error
11:12 babilen shiin: How should salt know that the require statement fulfills that requirement?
11:12 shiin it wouldnt, but its only testing.
11:13 babilen So the outcome is undefined and you therefore get an error. Salt simply says "To be best of my knowledge I have no idea what happens if you run this state as the user you want to use here cannot be found"
11:15 babilen And yeah, the state can never be fulfilled as its requisites aren't given yet.
11:16 babilen (and salt can't know that they would be)
11:16 bitnibble joined #salt
11:17 bitnibble Hi, can anyone point me to an example of applying a cloud map from within python (I'm thinking via saltcloud.cloud.Map somehow but I'll take alternatives)?
11:17 bitnibble map.interpolated_map() and map.read() are both empty dicts so I think there's something wrong with the option dictionary I'm passing it
11:17 babilen As I explained earlier: Salt doesn't know that the user state you require actually creates that user and would make the check it uses to see if the requested user is present to not fail. The require statements are simply a way to define dependencies (well, edges between nodes for state) to allow salt to order them in such a way that every state that is required by another state runs before that state.
11:17 bitnibble I'm preparing the option dictionary like this: all_cloud_opts = dict(master_opts.items() + minion_opts.items() + cloud_map_opts.items() + cloud_opts.items())
11:18 babilen I guess that it simply sorts the resulting state-graph topologically and doesn't do anything apart from that. There is no "this states needs the user and I know that FOO creates users so I have to run that state first" logic going on.
11:19 shiin in other cases it doesnt fail like that. such as: the group requires the user first, but the group doesnt fail with an error if the user wont be created.
11:20 babilen shiin: Creating the group does not require the user
11:20 shiin my bad, its the other way around. the point remains the same though. I explicitly state require: group: shiin in user: - name: shiin
11:21 shiin and that passes through test=True just fine, like in many other cases where require defines an order in which states would be executed.
11:22 babilen shiin: Could you paste the exact state you are talking about to http://paste.debian.net and the output you are referring to? It would make it easier to make factually correct statements without having to make too many assumptions.
11:22 babilen (at least I'd like to try)
11:23 logix812 joined #salt
11:24 babilen shiin: Please include the file.directory state also.
11:25 ggoZ joined #salt
11:27 shiin babilen: http://paste.debian.net/104613/
11:28 babilen ta
11:28 babilen shiin: "User shiin is not available Group shiin is not available" is exactly the correct statement. You simply cannot create a directory that is ownded by shiin:shiin if that user or group is not present.
11:30 babilen shiin: You can, however, create a user if the group has not yet been created. The outcome would be, well, suboptimal, but it can be done. One might argue that the user.present state should check that the requested uid/gid or group is available and/or has been created already.
11:30 babilen (so that that state fails too)
11:32 babilen You have to differentiate between requirements of a state that cause it to fail in the sense that running the actions of the state would cause an error and those requirements (i.e. require statements) in salt that simply result in a correct ordering of states.
11:35 shiin I see. I understand there is a difference.
11:42 jrdx joined #salt
11:55 MrTango joined #salt
11:59 bhosmer_ joined #salt
12:05 snomn joined #salt
12:06 DaveQB joined #salt
12:07 Lomithrani babilen: sorry I was away for lunch , pretty basic sls http://paste.debian.net/104622/
12:08 * babilen contextualises himself again
12:08 Lomithrani I get that issue http://pastebin.com/CqptWQ5G
12:08 Lomithrani first time I get that error , and I've been usiing that script on many server
12:11 babilen Lomithrani: Looks fine (is that the entire file and output?
12:11 babilen )
12:12 Lomithrani Nope , I just took a part of it (I have confidential data on this file) but I mean the output are function by function , what could lead to him not find the pkg.installed function ?
12:12 babilen Lomithrani: Which master/minion version is that?
12:13 Lomithrani 2014.1.1
12:13 babilen OS?
12:13 Lomithrani smartos
12:14 babilen Can you install *other* packages? Is openjdk7 a package on smartos?
12:14 * babilen knows nothing about smartos
12:14 Lomithrani yeah yeah , I have run this sls file a while (2 weeks or so)
12:15 Lomithrani and it worked pretty well
12:15 Lomithrani I just set up a new instance , (same as usual)
12:15 Lomithrani and just this time nothing works
12:16 babilen Do you have selinux enabled? But then I cannot debug that further as I have no experience with that setup at all.
12:17 Lomithrani I don't know what selinux is so I will guess I don't have it enabled :D
12:17 viq Lomithrani: what platform is this?
12:17 viq ah, smartos
12:18 Lomithrani I might have taken an old sls and the name of the package might be wrong I will check if I have other version of that sls
12:19 alanpearce joined #salt
12:19 Lomithrani but if I recall
12:19 Lomithrani when the name of the packet is wrong
12:19 Lomithrani its not that error
12:19 viq Lomithrani: does the pkg module work on this host via cli ?
12:20 flavio joined #salt
12:20 viq say 'salt host pkg.version something'
12:20 Lomithrani yes (as I installed salt through it)
12:20 Lomithrani oh wai
12:20 Lomithrani I'll try that
12:21 Lomithrani "Could not access /opt/local/var/cache/salt/master. Path does not exist." if I do "salt App01 pkg.version nano"
12:21 flavio hi guys, I'm struggling to find a way to know what a minion is currently doing. I just plugged a minion into the system and called the state.highstate on it. I would like to know how many states it has executed, what it's currently doing,....
12:21 vejdmn joined #salt
12:21 flavio how can I do that?
12:22 Lomithrani flavio: yes you have logs
12:22 viq flavio: halite kinda has a progress bar
12:23 Lomithrani flavio: the most pratical way remains launching minion in debug mode "salt-minion -l debug"  and you will see what happens on it
12:23 flavio Lomithrani: on the master I just have the master log, which doesn't provide any feedback (maybe I have to increase the logging level?)
12:24 * flavio looks at what halite is
12:25 Luke joined #salt
12:25 flavio Lomithrani: I would prefer to trigger the highstate from the master. I'm going to install a bunch of machines. I'm installing them via kickstart, then I add all the software I need (and configure it) using salt
12:26 flavio hence I keep calling salt as soon as new machines are added
12:26 Lomithrani flavio: I experienced the same issue few days ago got quite frustrated not knowing what was happening when on the master . I didn't know halite , it looks like something that could sove your issue
12:27 Lomithrani viq: no idea about my issue ?  why this ""Could not access /opt/local/var/cache/salt/master. Path does not exist."" would it be that my salt install didn't go as planned ?
12:27 Lomithrani I can test.ping for exampel
12:28 viq Lomithrani: check your master config? Maybe adjust the paths there? And/or check whether paths salt expects are there
12:29 Lomithrani ok but it's really weird because I haven't change a thing and it used to work , I think I'll just provision a new machine a delete this one , something might have gone wrong when provisioning it
12:29 Lomithrani thanks anyway :)
12:30 viq Lomithrani: it seems like an issue with master, not minion
12:31 viq At least the  log you showed
12:31 flavio Lomithrani: do I have to install halite on the minion?
12:31 viq flavio: no, that's on master, and only on master
12:31 * flavio is a bit confused (but keeps reading)
12:31 viq flavio: halite == web frontend to master
12:32 viq with maybe a bit of additional functionality
12:33 ipmb joined #salt
12:35 Lomithrani viq: actually I got confuse in my terminal "App01:    'pkg.version' is not available." is the result I get for "salt App01 pkg.version nano"
12:36 viq Lomithrani: and now is the time to go to minion and read the logs
12:36 viq And possibly start minion in debug mode
12:38 z3uS joined #salt
12:38 Lomithrani pretty much nothing
12:39 Lomithrani http://paste.debian.net/104627/
12:39 bhosmer joined #salt
12:40 Lomithrani looks like it doesnt know the function pkg.installed
12:40 viq Lomithrani: (stop running minion first and) run minion in debug mode, see what that gives
12:40 Lomithrani already did it
12:40 viq mostly interested in what it tries to use as pkg provider
12:40 Lomithrani oh wait might have killed java process isntead
12:41 viq :D
12:41 Lomithrani no , same output
12:42 Lomithrani we agree that "salt-minion -l debug &" is correc t?
12:42 viq Lomithrani: it's the startup output that's interesting, not really the command output at this point
12:42 Lomithrani oh ok
12:42 viq I prefer to use screen/tmux and not & but that's me ;)
12:42 Lomithrani (so do I but not installed  :p )
12:43 viq why would you do that to yourself !? ;)
12:44 Lomithrani http://paste.debian.net/104629/
12:44 Lomithrani because I'm not supposed to even log once on my minions in theory
12:44 Lomithrani I only do when something is wrong
12:44 viq [DEBUG   ] Loaded pkgin as virtual pkg
12:44 viq so that seems fine...
12:46 urban joined #salt
12:46 Lomithrani well I'll try to do what I told you and create a new one
12:46 Lomithrani see if I've got the same issue
12:46 * viq nods
12:46 blarghmatey joined #salt
12:47 davet joined #salt
12:47 elfixit joined #salt
12:51 andredieb_ joined #salt
12:51 TheThing joined #salt
12:55 bhosmer_ joined #salt
12:56 Lomithrani http://paste.debian.net/104633/ :(
12:56 Lomithrani same output
12:56 bitnibble left #salt
12:59 viq and again a 'salt App01 pkg.version something' ?
13:00 Lomithrani 'pkg.version' is not available.
13:01 Lomithrani https://github.com/saltstack/salt/issues/9331
13:01 Lomithrani seeems a bit like my issue
13:01 Lomithrani guys speaking about SELinux
13:03 viq maybe start minion with -l trace and see what happens on startup and when you do the pkg.version command?
13:03 vbabiy joined #salt
13:04 Lomithrani I'll try my script on local first see if its not a wrong version of it
13:04 viq Lomithrani: also they're talking about issues with the pkg provider. You're much more likely to be affected by issues with provider than selinux, seeing as you're not on linux and I doubt solaris/smartos pulled in all the bits nexessary for selinux support
13:06 rojem joined #salt
13:10 racooper joined #salt
13:10 Lomithrani of course everything works perfectly fine locally with the same setup .... :(
13:12 viq what do you mean by 'locally' ?
13:12 chiui joined #salt
13:13 taterbase joined #salt
13:13 Lomithrani well not through joyent cloud , running vm manually on virtual box and smartos
13:13 Lomithrani but os of the machines are the same
13:13 Lomithrani only one thing might have change it's :     - name: ./activator -Dconfig.file=conf/prod.conf start
13:14 Lomithrani could that have broke the sls file ?
13:14 Lomithrani I just added "-Dconfig.file=conf/prod.conf"
13:15 viq uhm, what?
13:15 viq paste, because I'm not sure what you mean
13:16 briner hello, I'm trying to use file.blockreplace and the content that I want to insert is a multiline. And the yaml compiler is raising an error:
13:16 briner - content : |
13:16 briner #  SAP settings
13:16 briner kernel.msgmni = 1024
13:16 briner kernel.sem = 1250 256000 100 1024    <======================
13:16 briner vm.max_map_count = 2000000
13:16 briner - append_if_not_found : True
13:17 briner with a:  Rendering SLS "base:sysctl" failed: Unknown yaml render error; line 14
13:18 briner it feels that we can not give anything in the yaml multiline contexe
13:18 briner context
13:18 viq briner: sounds stupid, but try increasing indent by a single space
13:19 briner ah
13:19 bmcorser joined #salt
13:20 briner viq, you are a winner !!!
13:20 dude051 joined #salt
13:20 briner it works..  was it documented ??
13:21 viq I don't know, but I saw someone here on IRC yesterday debugging a very similiar issue
13:22 resmike joined #salt
13:22 viq http://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html seems to show deeper indentation for similiar constructs
13:24 viq http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed also shows deeper indentation
13:24 briner viq, thanks big time !
13:24 jaimed joined #salt
13:24 viq :)
13:28 shiin left #salt
13:28 ilako joined #salt
13:29 AirOnSkin joined #salt
13:29 racooper briner,  also, please use a pastebin and don't paste multi-line output. that could trigger anti-spam countermeasures.
13:32 jergerber joined #salt
13:32 jaimed joined #salt
13:32 xinkeT joined #salt
13:37 babilen briner: I have no idea why that is necessary, but I playes a bit with it yesterday and deeper indentation caused it to work. This is against YAML specification and specific to the YAML parser used and I would think twice before relying on that behaviour.
13:38 babilen briner: At least my understanding of YAML was that | + identically indented block would be all that is needed and not that a specific level of indendation (and only that) would be usable.
13:38 kermit joined #salt
13:40 babilen briner: My recommendation would be to not rely on this idiosyncrasy, but to use content_pillar and to write the pillar in Python. You can then either hardcode the string in that pillar or read it from a file on disk.
13:40 mattmtl joined #salt
13:43 babilen The way this is done is something along the lines of http://paste.debian.net/104641/ (a pillar is essentially just a python dictionary) -- The only problem with that approach is that blockreplace doesn't take content_pillar as argument. You therefore have to render that file yourself using data from a pillar or something along those lines.
13:44 babilen Alternatively write that state in Python (cf. http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html ) and populate content accordingly
13:45 babilen Or use pydsl or whatnot ..
13:45 babilen http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.pydsl.html
13:46 babilen I guess that, if you want to use blockreplace, the latter approach would be the most appropriate
13:47 quickdry21 joined #salt
13:49 MZAWeb joined #salt
13:49 Lomithrani input : http://paste.debian.net/104637/    output: http://paste.debian.net/104642/     masterOs: base64 14.1.0   minionOs: 14.1.0   both on cloud joyent.        locally I run a zone with sameOS (14.1.0 as a minion) masterOS:ubuntu , same input , but no error in the output ... any Idea ?
13:49 Lomithrani me again :)
13:49 Lomithrani tried to reinstall a lot of things still the same issue :(
13:50 Tekni joined #salt
13:51 Lomithrani note that #pkgin in openjdk7 works on both minions
13:51 Lomithrani and that pkgin is the pkg used by salt
13:59 TheThing joined #salt
14:00 xinkeT joined #salt
14:02 sectionme joined #salt
14:07 sectionme Is there an easy way to inject custom jinja2 filters for use in sls files? Basically, pillar stores plaintext passwords, passwords get encrypted in the configuration files which are generated on the master and synced over. Open to alternative methods.
14:09 wassabie joined #salt
14:09 wassabie Hello
14:11 Lomithrani joined #salt
14:11 Kraln joined #salt
14:12 allanparsons joined #salt
14:12 derelm joined #salt
14:12 Tekni joined #salt
14:13 babilen sectionme: Not really ... I would resort to writing pure Python in that case. https://github.com/saltstack/salt/issues/12761 is the issue in question
14:13 ajprog_laptop joined #salt
14:15 masterkorp Hello everyone
14:15 masterkorp The state "runit" in sls riemann.client is not formed as a lis
14:15 sectionme babilen: I already have an implimentation in pure python just not sure how to inject it to be availible in a SLS or template.
14:15 masterkorp i am getting this on my state
14:16 babilen sectionme: Implementation of what exactly? I was referring to write the state or pillar in Python
14:16 pdayton joined #salt
14:16 babilen sectionme: http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html
14:16 sectionme babilen: Ah, custom pillar, I get ya thinking.
14:16 babilen sectionme: And why do you use plaintext passwords and not hashes?
14:17 sectionme babilen: Not my call I'm afraid, I've raised the issue though.
14:17 babilen sectionme: Yeah, something like: http://paste.debian.net/104641 (very very basic example, you probably want to write more code/use with statement/exception handling/...)
14:18 babilen sectionme: I would strongly advise against storing plaintext passwords anywhere.
14:18 sectionme babilen: So would and did I :)
14:20 babilen The user state, for example, expects password hashes (that is "mkpasswd -m sha-512" for example)
14:20 babilen example^2
14:22 UtahDave joined #salt
14:22 TheThing sectionme, if I recall correctly, you can call custom cmd commands in state files in jinja like: {{ salt['cmd.run']('command') }} or something like that
14:23 masterkorp https://github.com/saltstack/salt/issues/3322
14:23 masterkorp this seems to be the cause
14:23 masterkorp but honestly i still don't know how to work around it
14:24 jeremyBass joined #salt
14:25 kaptk2 joined #salt
14:25 masterkorp any ideas ?
14:26 babilen masterkorp: Could you show us the state in question on http://paste.debian.net ?
14:26 UtahDave masterkorp: don't use the short dec.
14:26 masterkorp babilen: http://pastie.org/private/9fqnem2zdhyhsoonz0ukog
14:27 masterkorp UtahDave: short dec ?
14:27 UtahDave pkg.installed  is a shortcut state declaration
14:27 masterkorp i don't
14:27 babilen masterkorp: Your indentation for /etc/serv ... is off.
14:27 UtahDave use    pkg:\n  - installed
14:28 babilen masterkorp: You want those to be on the same level as runit
14:28 masterkorp is is ?
14:29 babilen (and "runit: \n pkg.installed" would be fine (no need to repeat the name and you can use the shortcut)
14:29 masterkorp babilen: well i tried it
14:29 masterkorp also i like this one
14:29 babilen masterkorp: You nested states (/etc/service/riemann-tools is nested under runit and not an independent unit)
14:29 mgw joined #salt
14:29 masterkorp but both do not work
14:30 masterkorp and that is a problem ?
14:30 fedgoat joined #salt
14:30 babilen masterkorp: http://paste.debian.net/104648/ does not work?
14:31 masterkorp then why riemann-tools work ?
14:31 babilen masterkorp: And yes, that is a problem.
14:31 masterkorp ok it works thank you sir
14:32 babilen masterkorp: You have "ID: \n [FUNCTION]+" .. you can recycle the ID and add multiple functions, but IIRC that doesn't work for file and *definitely* doesn't work if you try to nest IDs
14:32 Lomithrani viq: I thought it would interest you , it seems that it may be a path problem I don't know how to solve it yet , but it's due that I installed salt through a script before the PATH variable was set on my os so salt doesn't have it and it can't find the pkgin.
14:33 smurfy_ joined #salt
14:33 masterkorp babilen: yeah i know that, i was just desperate to try and make it work
14:35 babilen masterkorp: I also find your riemann-tools state to be unintuitive. I would have expected something like: http://paste.debian.net/104649/ but you can, naturally, use more descriptives IDs (which would then necessitate to use the long format with "- installed" and to give the name in "- name"
14:35 babilen "name" is a bit weird in that it is not the name of the state, but rather the argument handed to the function
14:35 babilen (which, by default, uses the name/id of the state)
14:35 Flusher joined #salt
14:36 babilen masterkorp: Does that clear up the confusion?
14:36 Flusher joined #salt
14:36 babilen http://paste.debian.net/104650/ would be even shorter
14:37 masterkorp babilen: yes I own you a beer :)
14:37 babilen \o/
14:37 jmoretti joined #salt
14:38 spiette joined #salt
14:38 jmoretti joined #salt
14:38 Katafalkas joined #salt
14:39 jcsp joined #salt
14:39 babilen http://paste.debian.net/104652/ is yet another variation. I typically use what I demonstrated in http://paste.debian.net/104650/
14:40 masterkorp yeah i just use the pkg: \n -installed
14:40 masterkorp but i follow that too
14:41 UtahDave babilen: nice and clean. I like those examples
14:42 Kenzor_ joined #salt
14:44 rojem joined #salt
14:44 masterkorp UtahDave: "just the way i like my p***y" :p
14:45 CheKolyN joined #salt
14:45 masterkorp dun dun dun
14:46 babilen masterkorp: Okay, I don't want to lie to you. Due to certain considerations I *actually* use something like http://paste.debian.net/104654/ -- The main advantage of doing that is that you can have other "pkg.installed: - name: ruby-dev" states somewhere else without having to fear clashes in the state ID
14:47 babilen (or build-essential-package or so)
14:47 snomn joined #salt
14:48 masterkorp i see, that is another option
14:48 UtahDave masterkorp: I'd appreciate not attempting jokes like that here.  Thanks.
14:49 masterkorp but that OCD part of me wants me to be consistency
14:49 babilen I haven't quite made up my mind as to which style I prefer and see all of them used in the wild.
14:49 masterkorp UtahDave: okay, i just could not resist that one
14:49 Katafalkas joined #salt
14:49 babilen Just not sure what's the best way is to deal with the need to have *globally* unique state IDs
14:50 babilen masterkorp: Please do next time. This is a support channel and, in particular, comments like that can also alienate people quite easily. (as in: I wouldn't even want to see it in an offtopic channel)
14:51 masterkorp yeah i got it
14:51 masterkorp sorry guys
14:51 babilen ta
14:51 praveen joined #salt
14:52 thedodd joined #salt
14:53 UtahDave thanks for understanding, masterkorp. We want everyone to feel welcome here.
14:55 babilen One more word regarding the unique state ids: I still haven't decided if I want to be able to define multiple, say, pkg.installed states which makes it easy to compose states *even though* they configure overlapping functionality *or* if I would prefer to have salt bail early if the same thing is defined in two places.
14:57 jslatts joined #salt
14:57 fedgoat joined #salt
14:58 babilen My understanding is (currently, though that might be wrong) is that states are being merged and that additional settings would be combined ... and that identically defined settings would overwrite each other ...
14:59 babilen How would http://paste.debian.net/104656/ behave?
15:01 babilen That would cause foo to be installed from evilrepo wouldn't it (as it is listed later) ?
15:02 patrek joined #salt
15:02 pdayton joined #salt
15:02 sverrest joined #salt
15:03 babilen Guess I will have to read more code to actually understand the exact behaviour. I think that this would *not* be merged (due to unique state IDs), but that the states would simply be run after each other with the last one winning (in terms of its options)
15:05 jonbrefe joined #salt
15:08 jonbrefe1 joined #salt
15:09 agend joined #salt
15:09 agend hi
15:10 agend I have a problem with coping binary file to minion, I have version 1.0.3 on master, and no matter what I do I have version 1.0.1 on minion - does salt has some kind of cache?
15:11 masterkorp guys what if i want to expend the service state to to support another service manager ?
15:11 masterkorp like runit ?
15:12 masterkorp where is the documentation ? how do i test it ? what is the documentation procedure ?
15:12 masterkorp tell me stuff guys
15:12 UtahDave masterkorp: :)  Yeah, you can totally do that.   Just a minute
15:12 UtahDave agend: can you pastebin what you've tried so far?
15:14 agend here u r: http://pastebin.com/FnVqmXX3 - file managed, it worked once - I somehow switched from version 1.0.0 to 1.0.1 but then it stopped to work
15:14 jmoretti left #salt
15:15 UtahDave masterkorp: basically you'd create another module in   salt/modules, such as   service_runit.py  that has a __virtual__() function that returns service, when appropriate.
15:15 UtahDave masterkorp: Then you'd just implement the required functions like the other service modules
15:16 masterkorp i see is there a systemd module so i can follow by example ?
15:16 masterkorp i will need to generate files too
15:16 fneves joined #salt
15:16 repl1cant joined #salt
15:16 fneves Hi all
15:16 UtahDave masterkorp: I think so. look at the salt/modules/rh_service.py
15:16 fneves I've been dealing with some strange behaviour when running the highstate
15:17 fneves sometimes it returns without any outuput
15:17 UtahDave agend: can you try making sure that the file at   salt://go/bin/ob   is actually modified
15:17 fneves Seen this issue https://github.com/saltstack/salt/issues/5192
15:17 fneves and it has been closed
15:17 masterkorp UtahDave: thanks
15:17 masterkorp also you do awesome presentations :)
15:17 fneves I'm using the last version of sal
15:18 fneves anyone experienced the same problem?
15:18 UtahDave fneves: It probably means your minion didn't respond to the master fast enough.  have you checked the job cache to see if the job actually completed?
15:18 UtahDave masterkorp: :)  thanks!
15:18 fneves it completed
15:18 agend UtahDave: it is - when I make ob --version on master I can see 1.0.3, on minion it says 1.0.1
15:18 fneves but I need the output
15:19 UtahDave fneves: try adding   -t 30   or something like that when you run the command
15:19 fneves otherwise I can offer no guarantee that it successfully ran without checking the logs manually
15:19 fneves ok
15:19 fneves Will try that
15:19 fneves any reason why this might be happening?
15:19 fneves or still under investigation?
15:19 smcquay joined #salt
15:20 Sacro joined #salt
15:20 Ahlee Salt is an asyncronous process, there's likely no issue here as UtahDave said
15:20 UtahDave fneves: the master asks the minions every 5 seconds if the minion is still processing the job.  If the minion doesn't respond quickly enough to that query, then the master stops listening on the cli.
15:20 Sacro UtahDave: ping
15:20 UtahDave hey, Sacro!
15:20 agend UtahDave: even deleting the file on minion doesn't help - looks like minion takes it from some cache
15:20 fneves ok
15:20 Sacro Hey UtahDave! Long time no see
15:21 UtahDave how've you been, Sacro?
15:21 Sacro Ah, you're attempting to fix it for me
15:21 fneves but shouldn't the master then output something like "Timeout expired"?
15:21 Ahlee fneves: no
15:21 Sacro I'm good, back working again which is nice, and I got first choice of tooling
15:21 fneves so it takes an optimistic approach?
15:21 viq Lomithrani: interesting. Maybe you could set PATH in the script you're installing it with?
15:21 UtahDave Sacro: Yeah, I think that new chocolatey.py should fix that for you.  It would be great if you could test it.
15:22 UtahDave nice!
15:22 Lomithrani viq: Yes I solved le problem with adding an export at the beginning of my script , works like a charm
15:22 viq sweet
15:22 Sacro UtahDave: hoping so, it's a pain having to work around bugs in chocolatey and salt :(
15:22 UtahDave yeah.
15:22 Ahlee fneves: that's a good way of putting it.  Check in your job cache to verify, though.
15:23 Ahlee While it's probable it was a timeout, odd things do happen.
15:23 Sacro I need to work out how to manage a syndic properley, running highstate on it whenever i change things gets tiring
15:23 fneves ok
15:24 Sacro UtahDave: the other thing is to stop it bootstrapping :\
15:25 Sacro I have - require module: chocolatey everywhere
15:25 Sacro Looking good so far though
15:27 Lomithrani Question : Is it possible to have a sls file that runs a script that modify itself.  : I need all my cassandra minions to have a key that need to be calculated with the numbers of cassandra server  (eg  key = minion number * cassandra number)  so I'd like to run a script that would calculate the number and then with a file managed with jinja template give it the number with the context
15:27 Sacro hmm, wait, yours should stop bootstrap from being called
15:28 UtahDave Lomithrani: yeah, you can use jinja in your sls files
15:28 Lomithrani or easier is there a way to know how many minions are called Cassandra* for instance
15:29 timoguin Lomithrani: that sounds like a good use for a runner.
15:30 timoguin maybe one that collects the stats via exec modules and then inserts the stat in a managed file on each minion?
15:30 Sacro UtahDave: would be nice to have a bootstrap that passes the -Pre option too
15:31 Sacro hmm, though having said that, there's no way to do it as there's no install-pre.ps1
15:31 Lomithrani timoguin: nice lead thanks I'll dig into that seems to be able to do what I want indeed
15:34 pass_by_value joined #salt
15:37 Katafalk_ joined #salt
15:38 UtahDave Sacro: does it look like I can send in a PR with that change?
15:41 Joseph joined #salt
15:42 nicksloan left #salt
15:42 ajolo joined #salt
15:43 Sacro UtahDave: looks good so far!
15:43 Sacro That and chocolatey 0.8.24-beta2 seems to deploy all the things I need
15:44 UtahDave OK, I'm going to send in the PR.   Thanks for testing that!  That helps a ton.
15:44 Sacro Now I need a state for it, rather than using module.run
15:44 UtahDave Hm. Yeah, we should probably get a state in there.
15:45 Sacro A state would be fantastic, especially if it used pkg.installed
15:45 UtahDave Sacro: I'm planning on working on an update to the windows salt pkg manager.  I'm thinking it would be cool to have it use chocolatey transparently.
15:45 Sacro Yeah it would, most packages I need are on there
15:46 Sacro I thought a highstate synced modules?
15:46 tligda joined #salt
15:46 Sacro for some reason it's doing a bootstrap :(
15:46 ipalreadytaken joined #salt
15:47 alekibango joined #salt
15:47 UtahDave Sacro: what do you mean by a bootstrap?
15:48 rozay joined #salt
15:48 rozay rozay thats my nick name
15:48 rozay I have a quick question for a company project I am working on
15:49 jimklo joined #salt
15:49 rozay I need to do remote testing through one of our linux servers. This remote testing involves running command line scripts through ssh
15:49 Sacro UtahDave: it's reinstalling chocolatey 0.8.23 from the bootstrapper
15:50 UtahDave Sacro: how are you setting that up to happen?
15:50 rozay These command line scripts will be running graphics tests on  a GPU board that is connected to another machine. All I want back are the results from the graphics tests and them to run automatically on a certain board when I hit go.
15:50 rozay Will this SaltStack help me do this type of automated testing?
15:51 viq rozay: sure, salt can run remote commands and give you back the results
15:52 babilen rozay: You can run commands on remote boxes easily with it, yeah. See http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html
15:52 rozay Ok and I will be building an application on top of it to make it more personalized
15:52 babilen rozay: One might argue that it is a bit overkill if that is *all* you do
15:52 Joseph does anyone know if salt's cloud controller could handle windows hyperV?
15:52 babilen rozay: But if you have to manage the content of some files, have more than one box, want to install some packages it would make perfect sense.
15:53 Lomithrani Is there a list of all tha var I can use in jinja ? like graind:id and such ?
15:53 UtahDave Joseph: We don't have support for hyperv directly right now, but it could be added.
15:54 rozay Yes I will have multiple GPU boards plugged in, and I need a way to use some software that as soon as I plug in a new GPU board, I can get on a remote computer and SSH into that machine that the board is plugged in to and have those scripts run automatically
15:54 jalbretsen joined #salt
15:54 rozay and put results on server as well
15:54 Joseph UtahDave: interesting. currently my org has a virtual appliance that they plan to deploy on openstack. But openstack isn't playing well with OVAs, vmware, and hyperv
15:54 UtahDave Yeah, we have some other hardware companies that do similar things with salt, rozay
15:54 druonysus joined #salt
15:54 druonysus joined #salt
15:54 Joseph for their usage openstack is overkill and saltstack would probably fit the bill
15:54 Joseph but i need to figure out if there's going to be some feature gaps there
15:55 rozay Thanks for yall's help!!!
15:55 UtahDave Joseph: does hyperv have an api?
15:55 babilen rozay: You mean that you actually want to trigger that automagically on plugging in of the board?
15:55 Joseph UtahDave: yes but i don't know if its restful
15:55 rozay babilen: yes I want that to be automated scripst
15:56 Joseph http://msdn.microsoft.com/en-us/library/hh850074(v=vs.85).aspx
15:56 babilen rozay: So hardware plug in and the system does the rest?
15:56 rozay scripts that run when I want them to and not have to run every single test
15:56 rozay I am thinking of a framework that will work, then build an application that I can personalize to what we need
15:56 viq rozay: if you want something simpler look at http://rundeck.org/
15:56 babilen rozay: Sorry, telephone ..
15:57 Sacro UtahDave: all my pkg installations require module: chocolatey
15:57 rozay I am researching a lot of these softwares and ran in to rundeck. Doing research on which ones will be the best fit to present
15:57 UtahDave Joseph: looks like libvirt has a hyperv driver, too: http://libvirt.org/drvhyperv.html
15:57 rozay babilen: telephone?
15:57 Sacro and chocolatey: module.run -name chocolatey.bootstrap
15:57 babilen rozay: Somebody called me ;)
15:58 rozay oh haha
15:58 viq rozay: if you want stuff to happen automatically, look up salt reactor system
15:58 viq !reactor
15:58 wm-bot4 http://docs.saltstack.com/en/latest/topics/reactor/index.html#reactor
15:58 rozay !reactor
15:58 wm-bot4 http://docs.saltstack.com/en/latest/topics/reactor/index.html#reactor
15:58 Joseph UtahDave: the problem is QA. They need to test the environment as a customer would so they need to luanch the virtual appliance in a hyperv etc.
15:58 rozay oh thats neat
15:59 masterkorp UtahDave: so, now how do i test this ? :)
15:59 Joseph UtahDave: got a run...will check back in a little while. Thanks for the tips
15:59 UtahDave Sacro: module.run is going to run every single time.
16:00 rozay viq: this is great! So I have about 5 graphics tests that I need to run automatically back to back, but will specify how long each runs
16:00 rozay Just to give yall an idea of what exactly I am trying to do here
16:01 Sacro UtahDave: yeah, but the bootstrapper should spot the fact it's installed
16:02 Sacro I can't work out how to do module.wait on either one folder or the other
16:02 UtahDave ah, so that part isn't a salt problem?
16:02 wendall911 joined #salt
16:02 viq rozay: I don't know that much about reactor system and salt internals, and I'm programming illiterate, so writing my own is somewhat daunting - and that would be needed here. You probably would need to figure out how your tests would get the data back to you, as salt wouldn't necessarily provide that for you.
16:03 m1crofarmer joined #salt
16:03 Sacro UtahDave: Nah, it's now seeing chocolatey in c:\programdata\chocolatey and using it
16:04 vejdmn joined #salt
16:05 rozay viq: Well when you run them locally, on the command line, all it does is you type in you're test then hit enter. This starts the graphic test running on the board and when you stop it, it gives you back the frames per second.
16:05 repl1cant anyone having an issue with the latest Salt on Windows not logging when run as a service? If I run from the command line it does ..
16:05 rozay So the results are just text of the fps and thats all we really need
16:05 kballou joined #salt
16:06 repl1cant it also seems to crash when you tell it to restart when watching a file
16:06 Gareth morning morning
16:07 viq rozay: when running via salt you can't really give input to script, just pass parameters, and you can't really stop it either, you'd have to have the tests exit themselves after some time
16:07 repl1cant oh wait, I think I found the logging one
16:07 repl1cant https://github.com/saltstack/salt/issues/11032
16:07 repl1cant lemme try that
16:07 viq rozay: also if it would be done automatically, without you running the scripts explicitly... where would the output go?
16:08 vejdmn joined #salt
16:09 UtahDave repl1cant: also, the windows salt-minion currently can't restart itself.  I have that fixed in develop
16:09 rozay it would go into the server and show on the machine that is remotely SSHed in to the machine that has the GPU boards plugged into it
16:09 viq rozay: with salt there is no ssh involved
16:09 rozay I think Salt maybe a lot more complex than what I am requiring?
16:09 repl1cant UtahDave: any known work around?
16:09 rozay Oh well there is my problem
16:10 rozay Thank you for you're time. I guess SaltStack will not be the solution for today
16:10 viq rozay: you could do it
16:10 rozay how so?
16:10 viq rozay: just, you need to plan it out. Because you mentioned wanting to do this automatically, eg via the reactor system - in which case you'd have to change how things work
16:11 vejdmn joined #salt
16:11 felskrone joined #salt
16:11 viq If you don't want to change how your scripts work then yeah, salt doesn't seem like the best solution in this case
16:11 possibilities joined #salt
16:11 rozay Well each graphics test is already built in my directory
16:12 repl1cant UtahDave: or a link to the specific bug with the patch? Can't seem to find it
16:12 rozay basically what I want is to have these run back to back for a certain time that I say
16:12 rozay and then when they are done (even when they are locally plugged in it does this) it return the fps for that time
16:12 rozay pretty simple if done locally
16:12 viq rozay: I think you'd have to build that into your scripts. Say, pass them a parameter telling them how long they should run
16:12 rozay just through the putty command line
16:12 UtahDave repl1cant: https://github.com/saltstack/salt/pull/13170
16:12 penguin_dan joined #salt
16:13 rozay I see. I am an intern so I dont even really know how these scripts are built yet. Ill have to talk to my manager about that
16:13 repl1cant UtahDave: Awesome, thanks!
16:14 viq rozay: with just that change it would make it much easier to do with salt. It still would not necessarily be enough to run them via reactor, without any user interaction, but it would make it pretty easy to run them via salt cli
16:14 viq rozay: you'd probably face exactly the same issue with rundeck
16:15 linjan_ joined #salt
16:15 rozay That's fine my manager said we need open source stuff so we can build it the way we need it
16:16 UtahDave rozay: salt is fantastic for building applications on top of.
16:16 viq rozay: also rundeck can use salt for remote execution ;)
16:16 rgarcia_ joined #salt
16:17 viq http://rundeck.org/plugins/2013/07/26/salt-step.html
16:18 rozay yea thats what I was thinking, use salt and build an app on top that will allow me to run these scripts automatically and for a specific time
16:20 viq You probably could use the reactor system to run them automatically, but you'd probably need to modify the scripts themselves so they'd exit after some time
16:20 arthabaska joined #salt
16:21 rozay Ok yea I will have to figure it out. Doing some more research on rundeck right now too to see if that can be of help
16:21 repl1cant joined #salt
16:21 rozay also how does salt connect to another machine? if it doesn't use SSH
16:21 viq salt minions connect to master
16:22 viq using salt's own "protocol"
16:22 rozay So every machine that I want to use for remote testing will need to have salt and know each other?
16:23 viq No, they will only need to know the master
16:23 viq But yes, all machines will need to have salt installed... Unless you'll be playing with salt-ssh
16:23 rozay the master will be the server so they will need to know him
16:23 viq Yes
16:23 viq (also, you may want to check out ansible while you're at it)
16:23 rozay salt ssh?
16:24 rozay yes I have some ansible information as well...is that sounding like a better idea for my certain project?
16:24 viq !salt-ssh
16:24 viq !ssh
16:24 viq http://docs.saltstack.com/en/latest/topics/ssh/
16:25 viq That's up to you to figure out, they offer slightly different things
16:25 Katafalkas joined #salt
16:25 rozay Ok I will look in to both Salt and Ansible
16:25 viq ansible is simpler in that it just uses ssh and only needs python on the remote ends. salt is more powerful if you're willing to run the minions
16:26 viq also if you're talking about scripts, you may want to have a look at https://rerun.github.io/rerun/ - I found it useful at my previous work
16:27 rozay See the thing with salt ssh is that it wont allow me to do these tests at once. it seems like it will be manual just as if I were doing it through putty remotely
16:27 viq What do you mean "at once"?
16:28 rozay When I say at once, I want to be able to get into the GPU board machine and say "Go!"
16:28 rozay So all these tests will run backk-to-backl
16:28 rozay for a specified time
16:28 rozay so I can get up and leave after I say go
16:28 rozay and the tests will run and return information through the server (just the fps rate)
16:29 rozay after that specific graphics test is completed
16:29 mgw joined #salt
16:29 viq And how salt-ssh doesn't let you do that?
16:29 Sacro UtahDave: any eta on a release?
16:30 KyleG joined #salt
16:30 KyleG joined #salt
16:30 viq Sacro: I think I heard rc1 is due on 18th
16:31 teskew joined #salt
16:31 racooper I have a gitfs question.  Would it be considered good practice to have pillars in a separate repo from state configs, or can/should they be stored in the same repo?
16:32 rozay viq: oh I didn't see that it said it will run "salt routines" when connected through ssh
16:32 rozay maybe this could work, depending on how I build my application
16:32 shaggy_surfer joined #salt
16:32 viq racooper: I believe with gitfs you _cannot_ have them in same repo
16:33 ramteid joined #salt
16:33 viq rozay: salt-ssh is meant to be the same thing as normal salt, just with a different communication channel
16:34 rozay got you,
16:34 timoguin racooper: viq is right. you'd need to configure two separate repos, one for file roots and one for external pillar
16:34 rozay Im trying to decide if this will wokr
16:34 rozay let me research rundeck and ansible a little bit and come back
16:34 rozay and rerun
16:34 racooper thanks viq, timoguin. it's not clear in the documentation.
16:35 viq rozay: rerun is a different beast, it's a framework for creating scripts
16:35 viq But useful for that
16:36 Katafalkas joined #salt
16:36 forrest joined #salt
16:38 alanpearce joined #salt
16:40 rozay viq: what is salt cli?
16:41 rozay command line?
16:41 rozay can you send me a link to that?
16:41 racooper "man salt"?
16:42 viq rozay: uhm, just using salt from terminal, like here http://docs.saltstack.com/en/latest/topics/tutorials/walkthrough.html#sending-the-first-commands
16:42 dlam joined #salt
16:43 agliodbs can I confirm something: I can't reference a pillar from another pillar, correct?
16:44 viq agliodbs: correct
16:44 * agliodbs searches for feature request
16:45 dlam haha i asked that same question yesterday
16:45 Nazzy_ joined #salt
16:46 viq agliodbs: pillars are compiled at the same time, so, uhm, you don't know the values because you don't know the values yet
16:46 ccase joined #salt
16:46 ninkotech joined #salt
16:46 ajolo_ joined #salt
16:46 rozay viq: I am reading this and see a problem
16:47 redondos joined #salt
16:47 redondos joined #salt
16:47 rozay Only the master can send commands to the other minions.
16:47 rozay What if I am on a minion machine and want to send commands to the other minion?
16:47 viq !publish
16:48 viq rozay: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.publish.html
16:50 rozay wow you are a damn good guy
16:51 racooper can someone clarify the difference between client_acl and external_auth settings?
16:51 UtahDave racooper: client_acl controls what local users on your Salt Master can do.   external_auth controls what users in ldap or similar can do
16:52 Sacro Aside from the is .salt a file or a folder issue
16:52 racooper but external_auth can use local users via PAM, right?
16:52 Sacro or is that fixed now?
16:55 chrisjones joined #salt
16:56 Sacro Eugh, fix was commited, but doesn't appear to be released yet
16:59 ekristen joined #salt
17:00 Sacro oh well, hometime!
17:08 jimklo joined #salt
17:09 schimmy joined #salt
17:12 schimmy1 joined #salt
17:13 debian112 joined #salt
17:14 debian112 what did salt get rid of the external_ip: grain in saltversion: 2014.1.4?
17:14 bhosmer joined #salt
17:15 UtahDave debian112: because it was causing a lot of problems and wasn't optional.
17:16 UtahDave debian112: I've actually been working on a replacement.
17:17 Ryan_Lane joined #salt
17:20 agliodbs viq: there's already a feature request.  I added my own comment to it
17:20 jhulten joined #salt
17:20 agliodbs viq: I could solve my personal problem just by loading a yaml file using pyyaml, but I'm worried about breakage when the repo gets moved.
17:21 rojem joined #salt
17:22 Katafalk_ joined #salt
17:23 UtahDave debian112: we moved the external_ip grain to salt-contrib if you still want to use it
17:25 shaggy_surfer joined #salt
17:25 bhosmer_ joined #salt
17:27 gmoro joined #salt
17:31 bmatt so I've got an interesting pillar management question
17:31 bmatt I've got a formula that expects to read a dict {foo: ['bar', 'quux']}
17:32 bmatt and I've got pillar data that's {plugh: {$minionid: {foo: ['bar', 'quux']} } }
17:32 bmatt how can I get that foo down into the "root" of the pillar data?
17:33 picker joined #salt
17:34 viq {% if grains['id'] == 'minionid' %} foo: ['bar', 'quux'] {% endif %}       ?
17:34 bmatt hm, that's not a horrible solution
17:34 Joseph joined #salt
17:34 bmatt because I can template my pillar sls files
17:34 bmatt thanks viq, I'll test that
17:41 n8n joined #salt
17:42 davet joined #salt
17:43 ajolo__ joined #salt
17:46 kermit joined #salt
17:48 Katafalkas joined #salt
17:48 ml_1 joined #salt
17:49 schmutz joined #salt
17:50 vejdmn joined #salt
17:52 repl1cant UtahDave: Added some comments to that pull request 13170
17:52 repl1cant UtahDave: Doesn't seem to work on 2008
17:53 catpig joined #salt
17:53 happytux joined #salt
17:59 druonysus joined #salt
18:00 alainv Why would the rabbitmq module functions be working fine but the "rabbitmq_vhost" functions be showing "function is not available"
18:01 alainv (2014.1.4)
18:02 alainv Or, well, okay, clearly that module is not in the minion's salt modules folder, I'm just not sure why it isn't :p
18:03 druonysus joined #salt
18:03 UtahDave repl1cant: Hm. ok, looking
18:04 alainv Bah, module =/= state, more coffee needed
18:05 UtahDave repl1cant: can you try running   Powershell: 'Restart-Service salt-minion'     in a terminal and see if it successfully restarts the minion?
18:06 resmike joined #salt
18:06 KennethWilke joined #salt
18:07 Joseph are the cloud configuration files in yaml?
18:08 UtahDave Joseph: yep!
18:08 Joseph great
18:08 Joseph so access control question
18:08 repl1cant UtahDave: already did that :-) Works NP
18:08 Joseph in regards to salt cloud/cloud controller
18:09 Joseph UtahDave: is there a best practice for how to say something like "unix user X is allowed to execute salt cloud but not doing anythign else with saltstack"
18:09 Joseph is it as basic as just setting up sudo?
18:09 UtahDave repl1cant: can you run   salt-call cmd.run 'where powershell'
18:09 UtahDave Joseph: I'd recommend using the client_acl option in your master config
18:10 Joseph UtahDave: changes require service restart?
18:11 repl1cant C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
18:11 repl1cant so it finds it
18:11 repl1cant for giggles i remove the non-powershell restart commands from win_service to force it
18:11 repl1cant same results
18:13 Joseph UtahDave: does this mean i need to open up permissions /etc/salt/master?
18:13 fllr joined #salt
18:13 UtahDave Joseph: you'll need to restart, but I don't think you have to open up permissions to anything
18:14 Joseph salt: error: Failed to load configuration: [Errno 13] Permission denied: '/etc/salt/master'
18:14 Joseph UtahDave: in addition this doc says i do http://docs.saltstack.com/en/latest/ref/clientacl.html
18:14 Joseph i'd rather not open permissions though :)
18:14 UtahDave Hm. didn't realize that.
18:14 Joseph me neither...makes me sad :)
18:14 Joseph lol
18:14 austin987 joined #salt
18:14 Joseph either i am going to have to play games with sudo
18:14 Joseph open up perms on other
18:15 Joseph or create a special unix group with read access
18:15 Joseph the last one seems the most secure+least hassle
18:15 Joseph hate sudo
18:15 Joseph and perms on other is just a bad bad idea
18:15 fllr Hey guys. I'm trying to setup salt cloud with my softlayer cluster, but I keep getting this error: https://gist.github.com/felipellrocha/d336c1a84c53e967fed5
18:16 UtahDave Joseph: the docs don't say you have to change permissions for  /etc/salt/master
18:17 dlam hey can i just print out the value of some pillar variable?  i wanna see what it is on this 'database' minion i got  :D
18:17 UtahDave fllr: can you pastebin your sanitized   /etc/salt/cloud.providers   ?
18:17 Engineer joined #salt
18:17 fllr UtahDave: Yeah
18:18 Joseph UtahDave: correct they name other directories but that could just be a doc omission.
18:18 fllr UtahDave: https://gist.github.com/felipellrocha/c26964f9f2d7e95de8fa
18:18 UtahDave Joseph: no, I'm pretty sure you don't have to give the user rights to /etc/salt/master
18:19 Joseph well...it doesn't work if permissiosn aren't open
18:19 Joseph and it hrows a file perm error on that file
18:19 Joseph and if i do open perms then it does work
18:19 Joseph so is that bug in the code or a documentation gap?
18:19 UtahDave fllr: try 2 spaces for your indentation
18:20 BrendanGilmore joined #salt
18:20 UtahDave Joseph: I'm not sure. Could you open an issue on that?  I'd like to start a discussion on that.
18:20 Joseph okay
18:20 Joseph sure
18:20 UtahDave thanks!
18:21 Engineer joined #salt
18:21 Joseph UtahDave: btw what's the acl for salt-cloud in general? Not clear since its a separate binary
18:21 dlam ooo found it, 'salt-call pillar.get somevariable'
18:21 fllr UtahDave: Does that make a difference?
18:21 fllr UtahDave: Same thing...
18:23 UtahDave fllr: what version of Salt are you on?
18:23 travisfischer joined #salt
18:25 vexati0n what version is "Helium" ?
18:25 vexati0n I'm really needing cp.push_dir
18:27 Ryan_Lane vexati0n: Helium is the next release. it's not out yet
18:28 Joseph UtahDave: here you go https://github.com/saltstack/salt/issues/13418
18:28 vexati0n Ryan_Lane: thanks
18:28 Ryan_Lane yw
18:28 UtahDave thanks, Joseph!
18:28 UtahDave Ryan_Lane++
18:30 Joseph UtahDave: if i want people to be able to execute salt-cloud, should i do an acl on that or just set up sudo for the binary?
18:30 rozay Rozay, thats my nickname!!!!!!!
18:30 rozay first to guess where that quote is from gets $1,000
18:31 UtahDave salt-cloud was folded into Salt itself, but I'm not sure if client_acl works with it.
18:31 jhulten left #salt
18:31 Joseph UtahDave: yes i know that salt-cloud binary is just a wrapper that points to python modules in the core saltstack
18:31 Joseph UtahDave: but i am not sure what modules to enable in the acl
18:32 Joseph UtahDave: sudo on that isn't a big deal for me at least
18:33 timc3_ joined #salt
18:33 Joseph UtahDave: however, i think there's a security issue with salt-cloud. Without prompting me, its taking the public key from the private key that i am injecting into the VM and /etc/salt/pki/master/minions. That means the minion is joined in without explicit consent.
18:33 Joseph I find that highly problematic from ops and security point of view
18:33 smurfy_ joined #salt
18:34 UtahDave Joseph: Why's that?  This happens by design.
18:34 vexati0n unngh. what's the Salt command to make customers stop calling me all day
18:34 Joseph UtahDave: if i want to salt bootstrap the node, then fine. But i specifically overrode the salt boostrap scirpt. I just want salstack to launch the VM full stop. I most certainly do not want it be a minion.
18:35 Joseph In addition, the hole contract with key exchange is that unless i on the salt master accept the key, then its not part of the saltstack deployment. This contract is being borken without my consent.
18:35 UtahDave Joseph: did you add --no-deploy when you spun up the new VM?
18:36 Joseph UtahDave: no i did not. What is that? Where is that documented? I don't see it in the salt-cloud help
18:36 Joseph UtahDave: i can't find that documented in the salt-cloud documentation either
18:37 UtahDave Joseph: salt-cloud --help
18:37 Joseph yes
18:37 rgarcia_ joined #salt
18:37 Joseph looking
18:38 Joseph okay trying
18:40 alanpearce joined #salt
18:41 Joseph UtahDave: nope still puts the key in there. Also, i don't like that i'd have to disable auto deploy just so i'd avoid the key insertion
18:42 forrest what's the point of using salt-cloud to provision a system if you don't want to use salt on it?
18:42 forrest if you just want a VM, just spin it up via their API
18:44 Joseph forrest: i am looking into use saltstack as a cloud controller so salt would be the API in other words or some such
18:44 forrest that makes no sense
18:44 forrest salt-cloud was designed to spin up instances and join them to salt
18:44 forrest if you don't want to use that, I'm sure there are plenty of tools out there for just spinning up instances.
18:45 UtahDave Joseph: I'm sure there's a way to do what you're wanting to do.  techhat thought that --no-deploy wouldn't push out keys.
18:45 UtahDave forrest: Yeah, but salt-cloud should be your one stop shop    :)
18:45 forrest UtahDave, hah, I guess.
18:46 UtahDave Joseph: Would you mind opening an issue on that?  If it's not deploying without seeding the keys, then either that needs to be fixed or there's another way to do it. But that's obviously not documented
18:47 ajolo__ joined #salt
18:47 Joseph got it
18:48 UtahDave thanks, Joseph!
18:48 fllr UtahDave: Sorry, I got distracted with the opening ceremony of the world cup. Lol
18:49 fllr UtahDave: I'm at the latest
18:49 harkx joined #salt
18:49 UtahDave :)
18:52 fllr UtahDave: I think I installed salt cloud wrongly. I installed my salt instance using the bootstrapper, but it came without the salt cloud binary... Also, I installed the other python dependencies, but I'm not sure I got the right versions.
18:53 shaggy_surfer joined #salt
18:55 BrendanGilmore joined #salt
18:56 Joseph forrest: what UtahDave says. I don't like have a billion different APIs for a billion different interfaces. I want just one.
18:56 fedgoat joined #salt
18:57 forrest Joseph, *shrug*, different opinions then I guess. I see no reason to expose something like salt-cloud for machine provisioning when I don't want it to join to Salt.
18:57 Chrisje joined #salt
18:57 chamunks joined #salt
18:58 Joseph forrest: if saltstack become a viable alternative to openstack and i think it could if a scheduler ever gets implemented, then that could be a very popular option then. There are lots of times i want to launch a vm but NOT have it configurable via salt.
18:59 forrest Yea I guess, just seems weird to me. What's the point of having all of these parts of your infrastructure if you can't manage them? I just imagine people creating random machines all over the place with no hook into salt, no idea what is on them, etc.
18:59 forrest seems like a mess.
19:00 kermit joined #salt
19:01 rozay Salt is so intricate
19:01 Ahlee heh
19:01 Joseph forrest: depends on the scenario. In my environment, we have developers who want a sandbox that they wanat configured their way and they don't want anything trying to do something for them. so the VM is owned by them and they get to do whatever they want with it. However, the booting of a VM from image and allocating that to a hypervisor is something that i want handled by salt.
19:01 forrest Joseph, why wouldn't you just use a machine with docker/LXC in that scenario?
19:02 Joseph forrest: moreover i don't want to have to deal with salt hitting vms that i don't need to support
19:02 Joseph forrest: inertia. developers like their VMs.
19:02 Joseph forrest: but i agree docker/LXC looks very promising.
19:02 forrest also seems like that gives your devs free reign to screw stuff up, and the old phrase of 'it worked in dev!' to become a legit scapegoat.
19:02 forrest Your devs wouldn't even notice the difference between docker and a real machine if you don't tell them
19:03 ahale joined #salt
19:03 modafinil_ joined #salt
19:03 funzo joined #salt
19:03 Ahlee unless they measure the latency the cgroups introduce
19:03 repl1cant UtahDave: salt node 'powershell.exe "Restart-Service salt-minion"'
19:03 Ahlee microseconds, sure, but it's there
19:03 Ahlee and some of us care ;)
19:03 repl1cant cause the service to stop as well, not restart
19:04 gamingrobot joined #salt
19:04 Nazzy_ joined #salt
19:04 forrest Ahlee, heh, in that case we get into the vms fighting for contention over disk, everyone needs their own physical
19:04 Kelsar joined #salt
19:04 forrest oh wait, what about contention on the network, everyone needs their own datacenter!
19:04 Joseph forrest: that's not clear to me actually. They are working on network applications that require extremely high throughput. YOu could certainly be right though. I need to play around with docker a lot more just havent gotten the chrance.
19:04 Ahlee forrest: we're playing with docker just for the vmware-esque hardware abstraction
19:05 Joseph forrest: don't joke about that. you know someone will say that and be serious!!
19:05 Ahlee need to play more with how docker containers can get access to kernel bypass techs, etc
19:05 forrest heh
19:05 Joseph You are going to jinx us all
19:05 kedo39 joined #salt
19:05 Joseph also i was having problem with docker on centos and figuring out the right kernel version
19:05 cb joined #salt
19:05 Joseph does it work with centos 6.4 nicely? I was finding the install instructions dodgy
19:05 forrest yea, might be worth checking the new version now that they say it's 'production ready'
19:05 jbub joined #salt
19:06 forrest I don't know, we use lxc because docker had issues.
19:06 Joseph forrest: oh are they finally saying that?
19:06 forrest yea, they said so monday morning
19:06 forrest in the changelog
19:06 Jarus joined #salt
19:06 Joseph forrest: interesting....i looked at docker a few months ago but then got frustrated with kernel versioning.
19:06 Joseph i'll need to go back soon
19:07 Ahlee forrest: yeah, looking forward to what happens now that docker has google consuming it
19:07 UtahDave repl1cant: Hm. maybe we'll have to fork off the process to get it to work.
19:07 Ahlee R.I.P. lmctfy :(
19:08 forrest Ahlee, we'll see, it will either be great, or have so many google managers working on it instead of engineers, they'll make it crappy
19:08 Ahlee UtahDave: looks like the same issue as issuing service.restart salt-minion under linux - the return doesn't work so the second part doesn't execute
19:09 Ahlee i wrote a crude runner that restarts all kernel:Windows minions via wmi
19:09 Ahlee hard coded plain text domain admin passwords ftw
19:10 smurfy__ joined #salt
19:10 jalbretsen joined #salt
19:11 TristanMatthews joined #salt
19:12 jaimed joined #salt
19:14 AirOnSkin joined #salt
19:15 UtahDave Ahlee: did you see that kubernetes runs on top of salt?
19:16 UtahDave Ahlee: Hm. maybe I should look at using wmi for the restart.  Do you have an example of that?
19:19 ccase joined #salt
19:19 jimklo joined #salt
19:20 Joseph forrest: i love how every single bloody linux program is just flatly incapable of making it easy to set the http proxy for the thing
19:20 Joseph i am look at you docker
19:23 forrest yea proxies in general suck
19:23 forrest making them work with anything is a pain in the ass
19:24 Joseph forrest: socks5 are my favorite btw
19:24 Joseph NOT
19:24 forrest heh
19:24 Ahlee UtahDave: indeed!
19:24 Ahlee to kubernetes, that is
19:24 Joseph forrest: and the funny thing is that http proxy is working. There's something in the docker program itself that is ignoring the environment variable
19:24 Joseph sigh oh well this saltstack not docker
19:24 Ahlee UtahDave: one second
19:24 sectionme joined #salt
19:24 Joseph maybe there's an IRC for that ha!!
19:27 dlam hey i wanna set up a code deployment thing, that goes to each of 10 computers at a time, and deploys some release!  anyone know what to google to find docs about that?
19:27 Joseph dlam: that's a bit general. Waht do you mean "code deployment" thing?
19:27 Joseph you probably just want to enforce a state across the machines
19:27 dlam oops i mean,   "deploy to production"
19:28 rojem joined #salt
19:28 dlam like i fixed some stuff, and wanna deploy it to production
19:28 Joseph dlam: are you just installing/updating software with the OS package managmeent tool>?
19:28 Ahlee dlam: on successful build i package my software up into an rpm, push it to an internal repo and have salt run pkg.installed on that rpm
19:28 dlam meh, not really, this is just a 'git checkout' and commands like that
19:29 dlam oooo pkg.installed
19:29 Joseph lol
19:29 Joseph and there are modules for git too
19:29 Joseph :)
19:29 dlam :D  ima noob
19:29 Joseph no harm in that
19:29 Joseph do you know about saltstack's state management ?
19:30 dlam oh yeaaaa so actually, im not *that* noob, i got salt states which set up the entire environment
19:30 dlam i just wondered if salt did "code deployment" stuff too, i guess git will work
19:30 dlam git states mebbe
19:30 jcockhren dlam: first, get off my lawn. ;)
19:31 Joseph code deployment means a lot of different things to a lot of different people so you'd need to be clearer about what you want to do
19:31 jcockhren dlam: 2nd, how you package your apps matters a bit
19:31 xzarth_ joined #salt
19:31 Joseph that said, saltstack should do most typical code depoloyments just fine
19:31 jcockhren dlam: in terms of 'code deployments' are you using fabric-style or system packages?
19:31 dlam ohhh oops, good point i was uber broad:  it's a django web application which yeah, is fabric-style
19:32 dlam omg i gotta go eat food, but thanks!
19:32 jcockhren heh
19:32 Ahlee heh
19:32 jcockhren "omg food"
19:32 jcockhren basically what I took from that
19:33 Joseph jcockhren: hey...if we could all be that excited babout the simple things in life we'd stop being the jaded, cynical sys admins and be happy go lucky people
19:33 Joseph or something
19:34 jcockhren or just stop being sys admins. ;p
19:34 Joseph jcockhren: fair point
19:34 JasonSwindle joined #salt
19:34 MatthewsFace joined #salt
19:35 Joseph jcockhren: do you know when i lost faith in humanity? When i realized that 9 times out of 10, the reason someone is having a network problem is because they couldn't be bothered to set up DNS resolution correctly. And no /etc/hosts does nnot count!!
19:35 shaggy_surfer joined #salt
19:36 jcockhren heh. Then there's teaching people how to 'copy-n-paste'
19:36 Joseph Customer: every time i make an RPC call it hangs for 30 seconds?  Me: are you pointing to a valid DNS server? customer: oh, i guess its hitting one that  doesn't exist and timing out.
19:37 Joseph jcockhren: i am immune to most things but still can't forgive when i am forced to do work on windows. I didnt' think anything could make me miss bash but windows proved me wrong.
19:40 vejdmn joined #salt
19:41 jcockhren heh
19:41 Joseph jcockhren: cygwin is the only thing that allows me to retain sanity
19:43 jcockhren Joseph: the last time I had to do anything in cygwin/mingw was compiling Qt
19:43 jcockhren I left it at that
19:43 Joseph jcockhren: that sounds awful. Actually me and cygwin are fighting because make won't compile the saltstack docs for me. I don't know why
19:43 Joseph They compile just fine on an actual linux os
19:44 jcockhren there's the solution: use linux
19:44 jcockhren :shipit:
19:44 jcockhren I'm excited for 2014.1.5
19:44 Joseph jcockhren: hahaha...actually i've toyed with the idea of just getting a decked out dell laptab with centos instaleld
19:44 Joseph jcockhren: oh whats in that?
19:45 ajolo joined #salt
19:45 jcockhren tons of bug fixes
19:45 Joseph jcockhren: is there a change log out?
19:46 jcockhren and my personal favorite: https://github.com/saltstack/salt/issues/12641
19:47 Joseph jcockhren: nothing beats that vile external_ips grain. How that ever got into core i'll never know.
19:47 jcockhren actually, the changelog in PR doesn't do the justice to the huge effort of all the contributors
19:47 TheRealBill joined #salt
19:48 jcockhren even though the changelog will seem skimpy. contributors closed tons of regressions and new bugs
19:48 Joseph link?
19:48 Joseph can'
19:48 Joseph t find it
19:48 jcockhren https://github.com/saltstack/salt/pull/13394
19:49 jcockhren like I said, it doesn't list no where near the fixes that have been applied
19:50 jcockhren pretty amazing effort. Now if there was only a way to communicate that effort better...
19:50 jcockhren then I think people could see that aside from flashy new features, the contributors are kickin' butt
19:50 patarr joined #salt
19:50 jcockhren or at least trying super-duper hard
19:51 patarr Hi all. I am wondering what the most elegant and salty (heh) way to create a state that controls a config, and alters it conditionally based on where it goes.
19:51 patarr Currently I'm doing it with jinja and the hostname conventions we use inlined in the YAML. But I was wondering what some of you guys do.
19:52 Joseph jcockhren: yea i would not have any idea about the effort if you hadn't said something
19:52 jcockhren basepi, UtahDave ^
19:52 Joseph jcockhren: ha!
19:53 Joseph patarr: have you looked the salt formulas?
19:53 patarr Joseph: no
19:53 Joseph patarr: look at vhosts https://github.com/saltstack-formulas/apache-formula/tree/master/apache/vhosts
19:54 Joseph patarr: may not be exactly what you are looking for but its in the general area
19:54 patarr ah that looks interesting. Thanks Joseph
19:58 babilen The apache formula does need some love though
19:58 Joseph babilen: are you considering marriage?
19:58 Joseph i joke I joke!
19:59 rgarcia_ joined #salt
19:59 babilen I might at one point in the future, but it would turn into a horrible ménage a trois as I focus on nagios right now
19:59 basepi jcockhren: not 100% sure what you're pointing ^ to
19:59 basepi ;)
19:59 basepi my release notes?  good or bad?  =P
20:00 Joseph babilen: nagios! next thing you are going to tell me is it'll be a foursome with ganglias
20:00 Joseph basepi: its patarr's comment "I am wondering what the most elegant and salty (heh) way to create a state that controls a config, and alters it conditionally based on where it goes"
20:00 babilen Joseph: No, xnbd is next
20:00 Joseph *googles xnbd*
20:01 basepi "alters it conditionally based on where it goes" <--- not sure what that means.  i mean, you can do a file.managed and alter that file.managed for each file location you're managing....
20:02 jcockhren basepi: heh. Just saying that the effort for 2014.1.5 was great and that more people need to know. and that usually the effort made is massive regardless of the changelog size
20:03 babilen Joseph: I typically approach things by writing states and configuration files in the style outlined in http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html -- That is: You define "hard" platform-specific values in map.jinja and let the user customise it via pillars.
20:03 jcockhren basepi: not a critique of the changelog. Just some praise for the committers b/c sometimes it's hard to see
20:03 Joseph babilen: not a bad approach though i think it falls apart if pillar values get too big
20:03 basepi jcockhren: =D  and those are only the fixes that got cherry-picked.  the number of changes that are going into the next feature release is *staggering*
20:04 basepi 7300 commits since 2014.1 was branched
20:04 babilen Joseph: Get too big? I don't quite follow.
20:04 basepi sorry, 7400 commits, my bad.  =D
20:04 Joseph babilen: my understanding is that if the pillar is big enough it can slow things down
20:04 jcockhren basepi: https://github.com/saltstack/salt/issues/12641 is also there I think, but not in the changelog
20:04 Joseph i am thinking a MxNxY combintatorial
20:05 Joseph basepi: sheesh do you sleep and eat?
20:05 basepi jcockhren: don't think so, I don't think the lazyloader is in there
20:05 basepi Joseph: hehe, luckily it's not just me.  in fact, not very many of those commits are mine, i spent too much time cultivating the issue tracker and salt-users
20:06 basepi Just have an awesome core team and awesome community members!
20:06 Joseph basepi: do you know when the parallelization of salt states on minion is going to happen?
20:07 babilen Joseph: I have, to be honest, not encountered that problem. Do you have a reference for that perchance?
20:09 Joseph babilen: i do not. I think forrest is the one that mentioned about it.
20:09 Ryan_Lane my colleague is working on a boto module/state for cloudwatch and it does something pretty awesome
20:09 jcockhren basepi: so this changeset isn't being cherry-picked? https://github.com/jacksontj/salt/commit/85b08f36fd86951cfebde81ecfda0a7b7eca93bd
20:09 Ryan_Lane it'll take all cloudwatch metrics currently defined in AWS and output them in sls format for the state
20:09 Joseph Ryan_Lane: wow!!
20:10 Ryan_Lane yep. how awesome is that?
20:10 jcockhren basepi: that'll be https://github.com/saltstack/salt/pull/13148
20:10 Joseph Ryan_Lane: my pet project is to work through out how saltstack could completely replace openstack.
20:10 Ryan_Lane heh
20:11 Joseph If get that working, i'll be somewhat awesome
20:11 Ryan_Lane well, I'm not a proponent of that ;)
20:11 * Ryan_Lane is on the openstack user committee
20:11 Joseph Ryan_Lane: ahh
20:11 Ryan_Lane I think we should be embracing openstack and docker very heavily :)
20:11 Joseph Ryan_Lane: well openstack drives me insane
20:11 Ryan_Lane :D
20:11 Joseph Ryan_Lane: icehouse was a nightmare to set up
20:12 Ryan_Lane I've been using it since bexar, so I'm just used to it :)
20:12 Joseph Ryan_Lane: lol i know. i have a hadoop background so hadoop is "easy" for me to set up. But objectively setting up and administering hadoop is awufl.
20:12 Ryan_Lane indeed
20:12 Ryan_Lane anyway, I think adding virtualization support to salt is cool too
20:13 Ryan_Lane it's not like we're stepping on each other's toes :)
20:13 Joseph Ryan_Lane: i am actually really excited about docker
20:13 Ryan_Lane yeah, me too, especially with google's new project
20:13 Joseph Ryan_Lane: i think docker might be the solution to openstack's installation nightmare
20:14 patarr I want to play with openstack and docker soo bad.
20:14 Ryan_Lane installation and upgrade are the two biggest issues in openstack
20:14 Joseph Ryan_Lane: shudders!!
20:14 Ryan_Lane http://www.slideshare.net/ryan-lane/openstack-atlanta-user-survey
20:14 patarr yeah. openstack seems like a behemoth that is overkill for my institution..
20:15 Joseph Ryan_Lane: not all of this is on openstack. I think the core problem is that software defined networking is still too raw.
20:15 UtahDave Ryan_Lane: I set up my first multi node openstack setup yesterday, using salt!
20:15 Ryan_Lane UtahDave: awesome
20:15 Joseph UtahDave: what release of openstack?
20:15 Ryan_Lane Joseph: neutron is a piece of crap
20:16 Joseph Ryan_Lane: YES YESY YES OMG YES A THOUSAND TIMES OVER
20:16 UtahDave icehouse
20:16 Joseph Ryan_Lane: i was literally shaking in rage trying to make it work
20:16 Joseph nova networking might be crude but it works!
20:16 Ryan_Lane just keep using nova-network for nwo
20:16 Ryan_Lane *now
20:16 misterbonnie joined #salt
20:16 Joseph Ryan_Lane: indeed...learned that the hard way :)
20:16 basepi Joseph: No idea on the parallelization.
20:16 misterbonnie left #salt
20:16 Joseph UtahDave: what type of networking did you do?
20:17 patarr is there a way to have multiple file.managed under one identifier?
20:17 basepi jcockhren: no, it was not cherry-picked.  Pretty sure the LazyLoader only exists in develop
20:17 patarr I want to have one ident like nginx_conf that has multiple managed files.
20:17 patarr That way i can just require: -file nginx_conf in other clauses
20:17 UtahDave Joseph: just flat networking. That's the part that I haven't sorted out.  This is mostly a proof of concept for buiding it out with Salt
20:17 UtahDave patarr: nope
20:18 Joseph UtahDave: i warn you now. do not try to do anything else.
20:18 patarr darn
20:18 Joseph There be dragons there
20:18 repl1cant UtahDave: Quick hack, needs to be 'saltized' but it works http://pastebin.com/aezH67Pz
20:18 smurfy_ joined #salt
20:18 davidone joined #salt
20:18 UtahDave Joseph: Ryan_Lane: I have to confess to something unholy that I did.  I built my test openstack setup on DigitalOcean.   :)
20:18 Ryan_Lane heh
20:19 patarr UtahDave: is there any way to sort of aggregate a couple into one? Like I have nginx_certs, nginx_files, etc. Can I have nginx_conf: - require: file nginx_certs nginx_files?
20:19 repl1cant and when I say it works, it restarts the process. no info provided back
20:19 Joseph UtahDave: thats kinda funny
20:19 repl1cant well, restarts the salt-minion service and doesn't simply stop it
20:19 sectionme joined #salt
20:19 UtahDave repl1cant: That looks pretty good. Thanks for sharing that.
20:19 Joseph Ryan_Lane: i actually do want to upgrade because in havana there's some blasted bug in the scheduler that periodically just causes the scheduler to error out and fail to allocate vms and forces me to restart all the compute services on all the nodes.
20:20 UtahDave Joseph: :)  I know!  But for testing purposes it actually worked ok.
20:20 repl1cant i'll attach it to the pull request you sent, needs to be cleaned up
20:20 Joseph UtahDave: i tried to do openstack in an AWS VM. That uh didn't work.
20:20 UtahDave repl1cant: thanks!  that's a huge help.
20:21 Joseph Ryan_Lane: "what did you like about openstack? Not a lot"
20:21 Joseph ha!!
20:21 Ryan_Lane heh
20:21 mgw joined #salt
20:21 Joseph Ryan_Lane: i like openstack a whole hell of a lot more than paying the vmware tax
20:21 Joseph i'll definitely say that
20:21 Joseph And the documentation is actually quite good
20:22 Joseph something saltstack should probably be trying to implement cough cough
20:22 patarr you guys use openstack as a vmware alternative? could something like oVirt suffice instead?
20:22 Joseph to imitate
20:22 forrest you're saying our docs aren't good compared to openstack?
20:23 Joseph forrest: advanced users not a huge difference. But for beginners, i think openstack is way better.
20:23 Joseph forrest: The fact that people go to the IRC to ask basic questions about states after reading doc is not a good sign IMHO
20:23 Joseph states are easy after all. This is why i love them.
20:24 Joseph forrest: plus the docs are schizophrenic with how they define terms and where you can find stuff. And yes i know its  being worked on. I am one of the people trying to imrpove it
20:24 Ryan_Lane openstack this release got to a place where docs not only weren't the #1 issue, but where people actually gave good reviews of the docs
20:25 Joseph Ryan_Lane: yes, i would agree with that. my #1 issue is neutron.
20:25 Joseph I want to kill it and dump it in an unmarked grave
20:25 Ryan_Lane Joseph: we have a doc sprint on July 10th
20:25 fllr joined #salt
20:25 forrest yea I'm not saying it to be combative, I'm saying in a sense of what is openstack doing that we aren't
20:25 Joseph Ryan_Lane: ui was wondering when the date for that was.
20:25 patarr could anyone tell me why salt thinks that a certain package is installed when it's not?
20:25 forrest it's good openstack has good docs on how to use it, because their process on how to contribute is garbage
20:25 Joseph forrest: yes saltstack is way better on contributing
20:26 Luke joined #salt
20:26 forrest patarr, can you gist the error and the state?
20:26 Ryan_Lane forrest: openstack has a doc leader, does sprints often, has a style guide, etc etc
20:26 forrest Ryan_Lane, yea that's fair
20:26 Joseph Ryan_Lane: what do you use to generate docs?
20:26 Katafalkas joined #salt
20:26 Ryan_Lane they have a team
20:26 forrest someone who I am sure is paid to work on the docs though right?
20:26 patarr forrest: I think it may have been my typo of -sources: salt: myrpm. lol
20:26 Ryan_Lane Joseph: you'd need to ask anne gentle
20:26 Joseph forrest:  has to be. no other way they'd get something that coherent
20:26 forrest patarr, ahh
20:26 Ryan_Lane forrest: yes. paid
20:26 forrest Ryan_Lane, well, there you go
20:27 Ryan_Lane saltstack inc should hire a docs person ;)
20:27 Joseph Ryan_Lane: yes exactly. I used to be a tech writer. I know good documentation when i see it. It was clear the tech writer understood what they were writing about and thought through how to organize it in a logical manner.
20:27 Ryan_Lane a leader, not someone charged with actually writing them
20:27 Joseph Saltstack was written by Tom, who we all love, who uh likes to do stream of consciouss documentation :)
20:27 Joseph docs i mean
20:28 Ryan_Lane salt's docs are at least pretty extensive
20:28 Joseph If i had a month, and could work on nothing but the docs, i could probably make some significant improvements
20:28 Joseph but uh i actually need to work 40 hours a week ahem
20:28 gothix joined #salt
20:28 gothix joined #salt
20:28 Joseph Ryan_Lane: once you are an advanced user they fit the bill well enough. Its the high learning curve they unnecessarily impose on the user who is starting out that concerns me
20:29 Ryan_Lane yep
20:29 Joseph I'd hate the docs to be the reason someone gives up on salt
20:29 Ryan_Lane it's hard for newbies. that's why our doc sprints are targeted at new people right now :)
20:29 Joseph I wasn't a novice that long ago and i struggled for much longer then necesasry getting states, grains, and pillars
20:29 forrest the funny thing is, our getting started docs are still much better than puppet/chef
20:29 Ryan_Lane forrest: that's not a high bar ;)
20:29 vexati0n grains i love. states and pillars i have no clue how to even begin using those
20:29 vexati0n luckily i don't need to yet
20:29 forrest yea which is what makes it funny
20:29 Joseph forrest: oh i can believe that.puppet ....oh man i dont even want to think about it
20:30 gothix what would the bnest way be to deal with havig to have 2 sets of base configs i need one for in house and one for AWS
20:30 Joseph forrest: in other words as long as we suck less then everyone else we win :)
20:30 Ryan_Lane people join orgs already using puppet or chef, so they learn it because they have to
20:30 forrest Joseph, that reminds me, did you ever finish those docs you were working on rewriting?
20:30 jdmf joined #salt
20:30 Joseph gothix: two file server environments?
20:30 Joseph forrest: no :( but i plan to complete them before the doc sprint
20:30 forrest ok
20:30 resmike joined #salt
20:31 Joseph forrest: part of my issue is that its a complete rewrite of the states tutorial and i am not sure how to integrate it into the existing doc structure which is foobared IMHO
20:31 Joseph forrest: so i gave up on linking and am just focusing on getting the content in
20:31 Ryan_Lane people want to switch to salt/ansible and have issues getting started
20:31 Joseph forrest: i figured we can work out how best to integrate them in the sprint
20:31 Joseph Ryan_Lane: i think people are  crazy to switch to ansible
20:31 gothix Joseph, no one but want to serve as if there were two some of my configs can be used by both but not all
20:32 Joseph gothix: pardon...could you rephrase?
20:32 forrest Joseph, I think there are other issues we need to resolve first that deal with major issues, that will require a major redesign of the structure.
20:32 vexati0n gothix: you mean you have 2 types of minions, and each type requires a different base config ?
20:32 Joseph forrest: this is my two cents on that https://github.com/saltstack/salt/issues/13358
20:32 forrest we should be trying to knock out the existing issues during the sprint if we can, as opposed to spending a bunch of time designing a structure
20:33 Joseph forrest: here's my problem. What good does my content do if no one can find it?
20:33 gothix Joseph, so my in house config set uses base '*' and i need to expand it to work in  AWS but not all of my configs will work there
20:33 Joseph gothix: are you referring to salt state files?
20:33 forrest Joseph, I'm not disagreeing with you, but a redesign of the whole structure is a lot of work, yes it needs to be done, but a 4 hour sprint is not the place to do that
20:33 gothix Joseph, yes states like for auditd and ssh and ldap etc,
20:34 troyready joined #salt
20:34 Joseph forrest: agreed but that goes back to my original question. I have this content. Where am i supposed to put it so that people can find it?
20:34 resmike joined #salt
20:34 Joseph without redesigng the structrue
20:34 forrest Are you making new pages?
20:34 Joseph forrest: yes
20:34 gothix Joseph, so both AWS and my ins house cant use the same ldap set up for example
20:34 forrest so put them in the docs structure like everything else has been for the time being?
20:34 Joseph gothix: have you looked jinja templating?
20:35 Joseph i don't kno what that means. All i see is a doc/topics/ and then a bunch of folders and RST
20:35 Joseph just drop them in the topics folder ...?
20:35 Joseph and then link them where?
20:35 forrest no come on man
20:36 forrest how about into... tutorials?
20:36 gothix Joseph, yes I am already using that but i think i may need to use environments and specify a separet base for each one but then i run in to the problem of confilcting id's
20:37 CeBe1 joined #salt
20:37 Joseph which already has a set of state tutorials
20:37 layer3switch joined #salt
20:37 forrest but you said you were writing new files
20:38 Joseph forrest: i can certainly just delete the existing state tutorials and replace with my own
20:38 forrest you can't update the existing state tutorials?
20:38 Joseph its a complete rewrite
20:38 forrest well, if they're bett,er why not?
20:38 forrest *better
20:38 forrest worst case, your docs suck, we revert back to prior to your commit.
20:38 layer3switch joined #salt
20:38 forrest not a big deal
20:38 Joseph okay
20:38 forrest or we fix what needs to be fixed.
20:39 forrest yea don't worry about doing that, it will get a review before being merged if it's a huge change anyways. We can discuss it on the PR too
20:40 Joseph forrest: got it
20:40 Joseph gothix: can you show me yuour top.sls?
20:42 alanpearce joined #salt
20:42 smcquay joined #salt
20:42 resmike joined #salt
20:43 Katafalkas joined #salt
20:44 gothix Joseph, http://pastebin.com/HyVFUR3s
20:45 resmike joined #salt
20:45 Doqnach`` joined #salt
20:45 gothix Joseph, i know i cant do it like this because of conflicting id's there must be a clean way
20:46 gothix Joseph, im already using multiple file roots
20:46 ajolo_ joined #salt
20:47 Joseph whats the error
20:47 gothix no error but conflicting ids
20:48 gothix is there a clean way to have what i would call multiple base trees
20:50 Ryan_Lane -_-
20:50 Ryan_Lane I'm seeing zmq calls when using salt-call again
20:50 resmike joined #salt
20:50 Ryan_Lane using --local
20:52 resmike joined #salt
20:52 vejdmn joined #salt
20:52 Joseph you should be able to jinja in the top file
20:53 dcolish joined #salt
20:53 gothix okay ill try that out
20:53 UtahDave Ryan_Lane: :(    what version are you seeing this on?
20:54 Ryan_Lane I think something is firing an event
20:54 Ryan_Lane something is causing a module reload, which is causing the event to fire
20:54 Ryan_Lane it happened after I used the virtualenv_mod state
20:54 UtahDave actually, that makes sense. I be there's no check for --local
20:55 Ryan_Lane I'm using head
20:56 Ryan_Lane UtahDave: https://github.com/saltstack/salt/issues/13426
20:57 UtahDave Yeah, I'm not surprised that was missed. on --local it should probably just fire locally instead of attempting to send it up to the master.
20:58 Ryan_Lane it's not a major issue, but it adds 10-20 seconds to runs whenever it happens
20:58 tedski using the salt-api, how does one specify the returner for a job
20:58 resmike joined #salt
20:58 UtahDave Ryan_Lane: That's way too long.
20:59 ckao joined #salt
21:01 Ryan_Lane UtahDave: agreed ;)
21:01 rozay ROZAY, THATS MY NICKNAME
21:01 jcockhren rozay++
21:02 smcquay joined #salt
21:04 joehillen joined #salt
21:04 resmike joined #salt
21:05 joehillen joined #salt
21:07 resmike joined #salt
21:11 ggoZ joined #salt
21:12 resmike joined #salt
21:13 jimklo joined #salt
21:23 Ahlee tedski: the REST api?
21:24 Ahlee tedski: it's another arg, if so
21:24 rallytime joined #salt
21:27 tedski Ahlee: yeah, it's not documented.  I wound up starting the master in debug to see how --return=foo is passed in the dict that's pub'd to the minion.
21:27 tedski Ahlee: it's 'ret'
21:29 Ahlee wait.
21:29 Ahlee it is?
21:29 * Ahlee checks his stuff
21:29 Ahlee :(
21:29 Ahlee i'm fired
21:29 Ahlee sorry tedski
21:31 Katafalk_ joined #salt
21:33 tedski Ahlee: no worries :)
21:34 sectionme joined #salt
21:35 jbirdman joined #salt
21:36 smcquay joined #salt
21:39 druonysus joined #salt
21:40 kermit joined #salt
21:41 rozay rozay++
21:42 rozay ROOOOOZAY THATS MY NICKNAME, COCAINE RUNNIN THROUGH MY BIG VEINS
21:43 alanpearce joined #salt
21:43 babilen rozay: I don't think that comments like that are appropriate in here (or any support channel really)
21:44 robawt what's the best way to debug salt?  is it still tmux?
21:44 rozay babilen: sorry it is from a Rick Ross song, and I just heard that line so I got a little excited
21:46 babilen rozay: AFAIK there is no #salt-offtopic, but you might be interested in #defocus or any of the various #*-offtopic channels on this network. There are also other networks that might be of interest.
21:46 rojem joined #salt
21:46 babilen robawt: Start it with "-ldebug" (master and minion) is one way.
21:47 rozay Ok
21:47 robawt babilen: no way to step through salt states?
21:47 ajolo__ joined #salt
21:47 robawt or set breakpoints?
21:47 robawt because that'd be mega awesome
21:47 rozay Well I have a question for a project I am working on regarding Salt...unless you were already on here earlier today when I explained it
21:48 babilen robawt: I am not aware of one, which doesn't necessarily mean that it doesn't exist. I guess that it would have come up by now in here.
21:49 layer3switch joined #salt
21:52 rozay joined #salt
21:52 rozay say it again man
21:52 rozay I accidently closed out
21:53 druonysuse joined #salt
21:53 druonysuse joined #salt
21:57 Katafalkas joined #salt
21:57 Luke joined #salt
21:59 TristanMatthews Hello, everyone: I'm wondering if anyone can point me to documentation or where I should look in the code to understand how to get salt-cloud using ec2 to launch an instances from a root volume snap shot. I've been looking at http://docs.saltstack.com/en/latest/topics/cloud/aws.html but can't seem to get it working.
22:00 debian112 joined #salt
22:00 debian112 hello
22:03 Joseph TristanMatthews: what's yoru error?
22:03 debian112 what did salt get rid of the external_ip: grain in saltversion: 2014.1.4?
22:03 Joseph debian112: do you mean why?
22:04 shaggy_surfer joined #salt
22:04 TristanMatthews Joseph: I've been trying to do it by adding it to the list of volumes in my cloud.profile and it seems to just ignore that line and bring new install.
22:05 debian112 Joseph: I was looking at the release notes: I did an upgrade in my staging environment and sure enough the grain "external_ip" was removed
22:05 Joseph debian112: yes are you asking why that happened?
22:06 debian112 Joseph: yes
22:06 Joseph TristanMatthews: can you show your cloud.profile?
22:06 n8n joined #salt
22:06 schimmy joined #salt
22:07 debian112 I was just wondering because I have a state that requires that grain.
22:07 Joseph debian112: because the grain attempted to contact an external IP address. A lot of end users, including myself, are in a DC with isolated networks that don't permit external network access. Consequently, anytime a grain load would happen you'd get a horrible network latency because the external ips grain would need to go through a network time out
22:07 Joseph I don't think it was removed complete. I think you can still find it in a contrib directory somewhere if you still want to use it
22:08 debian112 ok, yeah that makes sense.
22:08 schimmy1 joined #salt
22:08 debian112 Joseph: thanks I will hunt it down
22:08 UtahDave debian112: it was removed because it was causing problems for people the way it was implemented.
22:09 UtahDave debian112: but you can find it here: https://github.com/saltstack/salt-contrib/tree/master/grains
22:09 UtahDave drop it in your   /srv/salt/_grains/    on your master and run salt \* saltutil.sync_grains    and your minions will have it available.
22:09 andrej joined #salt
22:10 UtahDave debian112: I've actually been working on a better replacement we can put in salt proper, but it's not ready yet
22:11 andrej Our network guys are changing stuff around a bit, separating office & data centres for increased resiliance and security
22:11 andrej For me this means I have to set-up syndicatin, I guess
22:11 debian112 UtahDave: ok, I will deploy it that way so I don't break a state.
22:11 andrej Is there an easy way to "transfer" minions from the original master to a new syndicated one?
22:12 gothix_ joined #salt
22:12 andrej Or will I need to generate new minion keys for all of them, and slap them onth the relevant new masters?
22:12 debian112 UtahDave: I have to use the reactor system if I want the node to get it automatically when it first connects right?
22:13 utz joined #salt
22:13 alekibango joined #salt
22:16 utz need some help with nodegroup syntax real quick if someone is willing to help.  i've tried every possible solution i can think of in the past 10 minutes and nothing is working.
22:17 tedski utz: sure, go ahead and ask
22:17 TristanMatthews Joseph: I just started a google group post about it and put the code there, https://groups.google.com/forum/#!forum/salt-users
22:17 utz nodegroups:
22:17 utz VIR: 'G@id:VIR*'
22:17 utz DES: 'G@id:DES*'
22:17 utz WKS: 'G@id:VIR* G@id:DES*'
22:17 utz the WKS nodegroup doesn't work
22:18 utz what is the correct syntax for what i'm looking to do?
22:18 TristanMatthews Joseph: looks like I pasted the link wrong. https://groups.google.com/forum/#!topic/salt-users/QqgOz3uXEo8
22:19 tedski utz: you need either an "and" or "or"
22:19 Joseph TristanMatthews: so where in this cloud profile do you say "boot the VM from this snapshot"?
22:19 utz tedski: i tried that. perhaps i didn't it wrong. let me try again real quick
22:20 Joseph utz: whats the error?
22:20 tedski utz: WKS: 'G@id:VIR* or G@id:DES*'
22:20 druonysus joined #salt
22:20 utz tedski: you're magic. that did it. i think what i had tried before was 'G@id:VIR* or DES*'
22:21 tedski utz: right, the compound match is "this match or that match" so each "match" needs to work in independent form
22:21 utz tedski: thanks a ton.
22:21 TristanMatthews Joseph: I guess that is exactly what I have no idea how to do from the docs. I was trying to specify that for the root volume /dev/xvda1 I wanted it to use the snapshot. But that clearly isn't working.
22:21 tedski utz: np, anytime.
22:22 utz does anyone know if you can nest nodegroups into nodegroups yet? I saw that basepi had said they were working on it.
22:22 TristanMatthews Joseph: I also tried to put it into the block_device_mappings, with no luck.
22:23 Joseph TristanMatthews: if this was openstack, i would just say put the name of the snapshot in the image property. however i am not sure if amazon treats AMI and EBS differently
22:24 Joseph if i recall correctly the ec2 api requires a ebs id or some such
22:24 Joseph i wonder if you just set in the image if it would work
22:26 druonysus joined #salt
22:26 TristanMatthews Joseph: Doing it with ec2 command line tools you both pass the ami and reference it as a drive
22:27 TristanMatthews ok, I'll play with it some more and see if I can figure it out.
22:27 Joseph TristanMatthews: yea i am not experience in the AWS implementation in openstack. You would assume there would be a way to do that since booting a VM from EBS is a commmon use case
22:27 TristanMatthews maybe I need to just create ami's and reference those
22:27 Joseph TristanMatthews: that sounds like a pain
22:28 utz also, any Windows admins in here who have successfully called a remote powershell script from a local python script using subprocess.call()?  because of subprocess.call()'s default shell parameter, when I try to pass "shell='powershell'" to salt, salt thinks it's getting two shell parameters.
22:28 TristanMatthews Joseph: yeah, it is, but if I can get salt to programmatically then it will be less bad.
22:29 Joseph TristanMatthews: if its not htere, its probably just a feature gap. However, i have found that a salt cloud functionality is fairly complete for openstack but the docuemtnation is lacking. postting to the google group is probably the best way to know one way or the other
22:29 Joseph Or you could just look at the python modules :)
22:30 DaveQB joined #salt
22:31 TristanMatthews Joseph: Yeah its fairly easy to make it work with boto.
22:37 pdayton joined #salt
22:40 Ryan_Lane TristanMatthews: have you looked at the boto states/modules?
22:40 Ryan_Lane they aren't integrated into salt cloud
22:40 Ryan_Lane there's no module to launch individual instances, but there's some for launch config and autoscaling groups
22:43 alanpearce joined #salt
22:45 urban left #salt
22:47 Engineer joined #salt
22:47 ajolo joined #salt
22:47 eliasp joined #salt
22:50 TristanMatthews Ryan_Lane: Yeah, I'm using boto to launch the VPC and create my master instance.
22:50 Ryan_Lane TristanMatthews: I meant one of the salt ones: http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.boto_asg.html
22:51 Katafalk_ joined #salt
22:51 Ryan_Lane take a look at the module index for the boto_ states and modules
22:56 JordanTesting Afternoon.
22:56 TristanMatthews Ryan_Lane: Thanks, I'll take a look
22:58 Ryan_Lane TristanMatthews: feel free to submit more boto_ modules/states in the same style :)
22:59 Ryan_Lane I'd be happy to review them
23:01 shaggy_surfer joined #salt
23:07 jonbrefe joined #salt
23:10 rallytime joined #salt
23:13 Ryan_Lane grains_dirs in the minion config doesn't seem to work for me...
23:13 Ryan_Lane is there something special I need to do for that to load?
23:17 L_morningstar joined #salt
23:18 L_morningstar left #salt
23:21 thayne joined #salt
23:22 KyleG Does anyone know if it's possible for me to have something like "{% if grains['host'] in NODE GROUP" in my sls files?
23:22 mosen joined #salt
23:31 dsolsona joined #salt
23:33 dsolsona_ joined #salt
23:40 Katafalkas joined #salt
23:44 alanpearce joined #salt
23:47 ajolo_ joined #salt
23:51 timc3_ joined #salt
23:54 Shenril joined #salt
23:56 arthabaska joined #salt
23:58 Luke_ joined #salt

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