Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-07-29

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

All times shown according to UTC.

Time Nick Message
00:03 amontalban Anyone know what this error is all about? failed: Jinja variable str object has no element 0
00:03 amontalban (The same SLS is working in my vagrant test box, but when I want to deploy it in production fails)
00:03 manfred amontalban: 2014.1.5 on the one that is failing?
00:04 amontalban manfred: I'm using 2014.7 from GIT
00:04 manfred on both?
00:05 amontalban The weird thing is that if I run it on y vagrant box with --local it works without issues
00:05 ghartz joined #salt
00:05 bonezed guys, does anybody know what project has replaced salmon? (monitoring with salt)
00:05 amontalban In production if I use master-minion it fails with that
00:06 amontalban At first I thought it was a version issue
00:06 amontalban As the master had an older version
00:06 amontalban But I updated to 2014.7 and still the same
00:09 badon joined #salt
00:11 darrend joined #salt
00:13 amontalban manfred: Did you saw a bug on 2014.1.5? Maybe it's related or something
00:14 manfred it was a bug in 2014.1.5, but only in a specific file, and fixed in 2014.1.6
00:14 DaveQB joined #salt
00:14 manfred without providing us with the full stacktrace, i have no idea what your real error might be
00:14 mosen bonezed: i didnt even know about salmon, thanks!
00:15 vejdmn joined #salt
00:15 amontalban manfred: http://pastebin.com/cQcF3P48
00:16 manfred please run with -l debug
00:20 amontalban manfred: ok, let me get it
00:25 laubosslink joined #salt
00:31 higgs001 joined #salt
00:32 rgarcia_ joined #salt
00:34 KyleG joined #salt
00:34 KyleG joined #salt
00:34 manfred laubosslink: you want the file.search module
00:35 manfred http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.search
00:35 bhosmer joined #salt
00:35 manfred {% if salt['file.search']('this') %}
00:35 manfred will pass if it finds something, will fail if it doesn't
00:38 oz_akan joined #salt
00:42 bhosmer joined #salt
00:48 zandy joined #salt
00:50 alanpearce joined #salt
00:50 allanparsons joined #salt
00:51 allanparsons hey
00:52 allanparsons so i think i found a bug in publish.publish
00:52 Gareth yeah?
00:52 allanparsons if i run state.highstate one tim
00:52 allanparsons time*
00:52 allanparsons it doesnt work...
00:52 allanparsons i get no data back
00:52 allanparsons if i run it a second time, data comes back
00:53 allanparsons am i missing something about how the publish module works? or is supposed to work?
00:55 otter768 joined #salt
00:57 MindDrive joined #salt
00:58 juniorzoid joined #salt
01:04 amontalban manfred: sorry for the delay, here is the state.highstate ran from the master with -l all
01:04 amontalban http://pastebin.com/tMfqh3S4
01:05 amontalban Let me know if you need anything
01:06 manfred can you provide the percona.setup sls file?
01:07 amontalban Let me see if I can sanitize it
01:09 amontalban manfred: http://pastebin.com/QjB4472N
01:09 rome joined #salt
01:09 yomilk joined #salt
01:11 otter768 joined #salt
01:14 manfred can i see your git_cluster pillar?
01:14 manfred {% set cluster_master = pillar['git_cluster'][0] %}
01:14 jaimed joined #salt
01:15 amontalban git_cluster: ['git-east.domain.com','git-west.domain.com']
01:17 manfred what if you run salt-call state.highstate -l debug on the minion?
01:17 amontalban Let me check
01:17 milky joined #salt
01:18 stickystyle joined #salt
01:18 amontalban Same error :\
01:18 manfred still doesn't show what line it is erroring on?
01:19 manfred what about salt-call state.show_sls percona.setup -l debug ?
01:19 amontalban Nope, that's whats driving me nuts
01:19 amontalban On master?
01:19 manfred salt-call is run on the minion
01:19 amontalban Yeah, sorry :P
01:20 manfred i like to do troubleshooting on the minion, cause that is where the states are actually rendered
01:20 manfred the jinja is just passed to the minion
01:20 manfred so sometimes you get better error messages
01:21 amontalban - No matching sls found for 'percona.setup' in env 'base'
01:22 amontalban Didn't know about this commands
01:22 amontalban I have an env called gitserver
01:22 manfred oh
01:22 manfred what about salt-call state.show_sls percona.setup saltenv=gitserver -l debug
01:23 amontalban manfred: http://pastebin.com/XSF8G4zi
01:24 amontalban Almost the same
01:24 TheThing joined #salt
01:24 amontalban What's weird is this line: Executing command u'test -d /var/lib/mysql/gitlab' in directory '/root'
01:24 manfred oh
01:24 amontalban There is no "u" in my SLS on that line
01:24 manfred i missed that
01:24 manfred amontalban: that is python
01:24 manfred acting as expected
01:25 amontalban Sorry, didn't get it
01:25 manfred one second
01:26 manfred hrm...
01:27 TheThing joined #salt
01:27 manfred i think this is your problem
01:27 manfred git_cluster: ['git-east.domain.com','git-west.domain.com']U
01:27 manfred is that what it actually is set like in the file?
01:27 manfred or do you have it like this
01:27 manfred git_cluster:
01:27 manfred - git-east.domain.com
01:27 manfred - git-west.domain.com
01:27 manfred ?
01:28 amontalban The first (Without the U)
01:28 manfred change it to what I gave you
01:28 manfred so that it is a yaml list
01:28 manfred hrm, nope that appears to be valid :(
01:29 amontalban That will propably break other usages of that dict doesn't it?
01:29 manfred it is a list
01:29 manfred both of those are lists
01:29 manfred they are literally equivalent as it turns out
01:29 amontalban manfred: oh ok sorry I'm new on the Python thing :D
01:29 manfred i was unaware that you could do [ ] in yaml
01:30 amontalban The main problem is that it works on a vagrant box
01:30 manfred yeah, it should work
01:30 amontalban Running with --local
01:30 manfred can you run salt \* pillar.get git_cluster?
01:30 manfred it sounds almost like nothing is getting returned for that pillar
01:31 manfred the only one I think that it makes sense to error on, is that one, the error on the test command is fine, because it was expected
01:32 manfred it shouldn't throw you out of the rendering
01:32 amontalban git-east.domain.com: - git-east.domain.com - git-west.domain.com
01:32 manfred actually
01:32 manfred ok
01:32 amontalban Sorry, it got unformatted
01:32 manfred what about
01:32 manfred salt-call grains.get ip_interfaces:eth1
01:32 manfred does that return your expected ip address?
01:33 amontalban Well, that I just saw it when I sent you the SLS
01:34 amontalban In production I do not have an eth1 interface
01:34 amontalban It's on EC2
01:34 amontalban There is a way to get the public IP of EC2 in salt?
01:35 manfred you could use cloud.query
01:35 manfred but using the ip_interface grain would be the better way if you don't need a different minions ip address
01:35 manfred it looks fine
01:35 manfred i don't know why it is failing
01:36 manfred so this line is         my_ip: {{ salt['grains.get']('ip_interfaces:eth0')[0] }} in your actual environment?
01:36 bchung joined #salt
01:39 sirtaj joined #salt
01:40 amontalban manfred: ok thanks for your help I will test with eth0 instead of eth1
01:40 amontalban I have to figure out how to get the public IP in order to get it properly configured
01:41 TheThing joined #salt
01:45 higgs001 joined #salt
01:45 amontalban manfred: YOU ARE THE MAN!
01:45 manfred :)
01:45 manfred thanks
01:45 amontalban It was that eth1 thing
01:45 manfred cool
01:45 amontalban Thank you very much
01:45 manfred np
01:45 manfred make sure to get the second reference to eth1 in that state as well
01:45 amontalban Should I fill a bug or something?
01:46 manfred nah, there wasn't a bug, and it not showing exactly the line it on is just a problem that happens with the way jinja is rendered
01:46 amontalban Oh ok, great
01:46 amontalban Thanks, have a good one
01:47 manfred np you too
01:49 mosen how do people distribute custom execution modules normally?
01:49 zandy joined #salt
01:51 manfred drop them in /srv/salt/_modules
01:51 rgarcia_ joined #salt
01:51 manfred mosen: http://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
01:51 mosen woops, sorry did not read that section :)
01:52 manfred no worries
01:52 Tusker joined #salt
01:54 Tusker heys guys, sorry for a beginner question, but I was wondering how to deal with dependencies on files downloaded, rather than depend on packages.
01:55 Tusker i have /srv/salt/java/init.sls, which has include: - java.jdk7oracle
01:56 manfred Tusker: you can use require: to require any other state, specifically that a fail be downloaded and placed in the correct place
01:56 Tusker i want jdk7oracle to depend on java.download-java, which will download a zip file from a URL and intall it
01:57 manfred Tusker: just
01:57 manfred require:
01:58 manfred - archive: <java extracted id>
01:58 gzcwnk I am trying to follow this, http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.alias.html#module-salt.states.alias
01:58 manfred and require the archive.extracted state
01:58 manfred Tusker: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.archive.html
01:58 manfred Tusker: http://docs.saltstack.com/en/latest/ref/states/requisites.html
01:59 colinjohnson joined #salt
01:59 gzcwnk so ive written, http://pastebin.com/wnZCmS1b but its failing
01:59 dstokes is the pillar arg in http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.state supposed to be a yaml dictionary?
01:59 manfred gzcwnk: you have too many layers
01:59 gzcwnk huh?
02:00 dstokes my values aren't being loaded into the pillar with - pillar: \ thing: stuff
02:00 manfred gzcwnk: that isn't a valid state
02:00 gzcwnk oh i odnt need aliases_setup?
02:00 manfred gzcwnk: you want
02:00 manfred root:
02:00 manfred alias.present
02:00 manfred - target: its-unix@lists.vuw.ac.nz
02:01 manfred or
02:01 gzcwnk thanks
02:01 manfred aliases_setup2:
02:01 manfred alias.present:
02:01 manfred name: root
02:01 manfred bah
02:01 manfred aliases_setup2:
02:01 manfred alias.present:
02:01 manfred - name: root
02:01 manfred - target: its-unix@lists.vuw.ac.nz
02:01 manfred that
02:01 rome joined #salt
02:02 manfred both do the same thing, just one doesn't need a name: because the stateid is the name
02:02 gzcwnk too brief
02:02 gzcwnk thanks i'll put this in as too why the documentation is brief
02:03 manfred gzcwnk: http://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html start there to better understand how states work and how to read and use that documentation
02:03 KaaK_ how are pillars and states typically tested out?
02:04 manfred dstokes: no, it is a regular python dictionary
02:04 manfred dstokes: it just adds them to your /srv/pillars for just that one run
02:06 otter768 joined #salt
02:08 amontalban manfred: this looks ok to you or I'm just doing nonesense?
02:08 amontalban {{ salt['cmd.run']('curl http://169.254.169.254/latest/meta-data/public-ipv4') }}
02:08 amontalban (To get public IP in an EC2 instance)
02:09 manfred should be fine, as long as you are not on ubuntu, because ubuntu doesn't come with curl by default
02:09 manfred might want to make it curl -s
02:09 Luke joined #salt
02:10 amontalban manfred: great thanks man!
02:10 manfred np
02:13 Tusker manfred: i need to go for lunch  now, will test out your recommendations when I get back, thanks
02:13 manfred kk, np
02:15 gzcwnk ive already read that...
02:17 elfixit joined #salt
02:35 rypeck joined #salt
02:35 druonysuse joined #salt
02:35 druonysuse joined #salt
02:37 CeBe1 joined #salt
02:40 druonysus joined #salt
02:46 druonysuse joined #salt
02:47 joehillen joined #salt
02:48 manfred !peers | manfred
02:48 wm-bot4 manfred: http://docs.saltstack.com/en/latest/ref/peer.html
02:48 manfred nice
02:51 alanpearce joined #salt
02:51 ajw0100 joined #salt
03:02 malinoff joined #salt
03:04 Tusker manfred: what does the pkg.installed: directive do?  does that mean it will attempt to install a system controlled package, or does it indicate that the sls is a package ?
03:05 Lomithrani joined #salt
03:05 manfred nginx:
03:05 manfred pkg.installed
03:05 malinoff Tusker, it will try to make sure that specified package is installed (it does nothing if it is installed already, or installs the package)
03:05 manfred when you run that state, it returns true if the nginx is already installed
03:06 manfred or it installs the package
03:06 Tusker ok, so I can use require without the pkg.installed ?
03:06 manfred no
03:06 manfred you have to have the pkg.installed state, and then you require that
03:06 Tusker what happens if my package is a zip file from a URL ?
03:07 manfred cause you are only requiring a pkg state with the name nginx in
03:07 malinoff Tusker, requisites must point to a state ID, not a common package name, or shell or whatever else
03:07 manfred then requrie the stateid of the block
03:07 manfred Tusker: http://docs.saltstack.com/en/latest/ref/states/requisites.html
03:07 Tusker yeah, I read that
03:07 manfred malinoff: it can point to the name: of a state if you want, or the state id
03:07 malinoff in manfreds example state ID is "nginx"
03:07 manfred but you could have
03:07 manfred packages:
03:07 manfred pkg.installed:
03:07 manfred - name: nginx
03:07 manfred and specify either
03:07 colinjohnson joined #salt
03:07 manfred pkg: packages
03:08 manfred or pkg: nginx in your require: block
03:08 malinoff manfred, if you CAN do that it does not mean you SHOULD do that. I'd suggest to always use only state IDs
03:08 manfred but you aren't specifying pkg.installed: nginx in the requires, (which is also not possible) so you have to define all the blocks
03:08 manfred malinoff: unless you are requiring something inside the same state id
03:09 brendanburns joined #salt
03:09 malinoff manfred, there are exceptions of course, but i don't think it is ok to say about that to a salt newbie
03:09 Tusker ok, so my /srv/salt/java/init.sls has java: pkg.installed: - require - sls : jdk7oracle
03:09 manfred malinoff: http://paste.gtmanfred.com/nA5J/
03:10 Tusker so, salt will consider that package installed if a) the salt state is true b) the package is installed via rpm/apt etc ?
03:10 manfred Tusker: then it should require every state in the jdk7oracle sls file
03:10 manfred Tusker: it won't attempt to even install the package unless that sls succeeds
03:10 Tusker ok, but what happens if I don't want it to worry about the package management system at all ?
03:11 manfred then you are going to have a bad time
03:11 manfred need to make sure the packages are installed
03:11 Tusker can I do something like consider a state true, if the file exists after being extracted ?
03:12 manfred yes
03:12 manfred the archive state has that
03:12 Tusker so, i do salt '*' state.sls java
03:12 manfred Tusker: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.archive.html
03:12 manfred - if_missing: /opt/graylog2-server-0.9.6p1/
03:13 Tusker ok, so can I make an archive state depend on another state ?
03:13 manfred you can have any state depend on anystate
03:13 manfred require: is an internal keyword
03:13 manfred that can be added to anything
03:13 Tusker ah ok
03:13 manfred samething with everything in the requisites document
03:13 Tusker ok
03:15 manfred https://github.com/saltstack/salt/blob/develop/salt/state.py#L42
03:15 manfred that is the list of all the global internals
03:15 Tusker so, in /srv/salt/java/init.sls, can I simply do java: archive: - require: - sls: jdk7oracle.installed
03:16 manfred what is your goal?
03:16 manfred what is in /srv/salt/jdk7oracle/installed.sls ?
03:16 manfred what exactly are you unzipping? java or the repository data?
03:16 Tusker essentially, I want to deploy the latest tomcat (zip, not package managed), with the latest java (zip, not package managed)
03:17 manfred ok
03:17 manfred hold on
03:17 Tusker so, I want to do something like salt '*' state.sls tomcat, and it cascades and does everything necessary
03:17 manfred so
03:18 manfred i wouldn't use state.sls, i would use a top.sls file and state.highstate
03:18 manfred and second, gimme a second
03:18 Tusker no rush
03:18 manfred in this case since you are just unzipping things, you don't actually need to use require, you can just include the jdk7oracle.installed one
03:19 Tusker i'll need to actually download tomcat and java, so will need python and wget etc
03:20 manfred why do you need python and wget? salts archive state can download and extract them for you
03:20 Tusker java is a bit finicky... with accepting licence on the download page
03:20 Tusker and no direct URL
03:20 Comradephate joined #salt
03:21 manfred are you using debian/ubuntu or centos/redhat?
03:21 higgs001 joined #salt
03:21 manfred https://groups.google.com/forum/#!topic/salt-users/ynKNND9qxiI
03:21 manfred there is a saltstate for oracle jav
03:21 manfred a
03:21 manfred for ubuntu
03:21 manfred that accepts the license
03:21 Tusker yes, I saw that
03:22 Tusker so, I am deploying on a old redhat system which doesn't have tomcat7 packages
03:22 manfred ahh
03:22 Tusker and only has openjdk 7
03:22 rome joined #salt
03:23 manfred how old? can you use the oracle java .rpm files and just put them in /srv/salt/ to reference with salt://java.rpm in a pkg.installed state under source:
03:23 Tusker i suppose I can do that
03:23 Tusker it would be simpler, but I was trying to ramp up my learning of salt, hence trying to do everything with sls
03:24 manfred you would still be doing it with a sls...
03:24 manfred just like
03:24 manfred oracle-java:
03:24 manfred - pkg.installed:
03:24 manfred bah
03:24 manfred oracle-java:
03:24 manfred pkg.installed:
03:24 manfred - source: salt://java.rpm
03:24 manfred and then you drop the java rpm into /srv/salt/
03:24 manfred on the master
03:25 TyrfingMjolnir joined #salt
03:25 Tusker ok, and for tomcat7, just use remote archive ?
03:26 manfred http://paste.gtmanfred.com/aP4/
03:26 manfred that is how i would do it essentially, you would have to probably add some things to make it work exactly
03:27 Tusker thanks
03:27 Tusker i'll give it a try
03:28 manfred yup, i have to go do an unscheduled maintenance for a customer, so I will be gone for a while
03:28 Tusker ok, hope it goes smoothly for you
03:29 manfred me too
03:29 manfred :P
03:29 manfred silly rhcs clusters
03:30 Luke joined #salt
03:31 rome joined #salt
03:39 savvy-lizard joined #salt
03:45 FeatherKing joined #salt
03:48 jonbrefe joined #salt
03:50 sontek joined #salt
03:50 TheThing joined #salt
03:52 alanpearce joined #salt
03:58 FeatherKing joined #salt
04:00 FeatherKing i am trying to use a cmd.run in a state module and then update a grain after. the grains.present that i am running doesnt seem to actually update. Is this a case for reload_modules: True on the grains.present?
04:01 FeatherKing the real scenario is running an update and storing the new version in a grain
04:01 markhayden joined #salt
04:03 brendanburns joined #salt
04:05 ckao joined #salt
04:06 mosen joined #salt
04:08 rome joined #salt
04:11 markhayden joined #salt
04:14 aquinas joined #salt
04:16 beneggett joined #salt
04:20 jhauser joined #salt
04:21 brendanburns joined #salt
04:29 Ryan_Lane joined #salt
04:29 Ryan_Lane joined #salt
04:34 Ryan_Lane joined #salt
04:38 war2 joined #salt
04:41 manfred you shouldn't need to do that, it should become present as soon as you have set the grain (i don't believe it will be applied until the next runthrough though, so you won't be able to check for the grain being present until after the state run has finished... i am not 100% on that either)
04:42 mosen you develop salt manfred?
04:42 manfred mosen: i help
04:42 manfred currently #12, working on being #11
04:43 mosen all good, you seem to know everything about the workings
04:43 manfred i know a lot about it
04:43 manfred there are still some portions that I haven't touched yet
04:43 manfred but i have read a lot of it
04:45 Tusker manfred: ok, so I have tomcat and java all installing nicely now, but would like to install a default set of tomcat configuration files in a particular directory, ie, /var/lib/tomcat/conf, so it can copy over the basic configuration files from the zip archive, but then use the tomcat module to deploy applications, how could I achieve that ?
04:46 manfred there is a tomcat salt state
04:46 manfred there is also the file.managed states
04:46 manfred that is what I would state with
04:46 Tusker ok
04:50 aw110f joined #salt
04:51 matthiaswahl joined #salt
04:52 oz_akan joined #salt
04:53 alanpearce joined #salt
04:54 oz_akan joined #salt
04:55 FeatherKing manfred: was that a response for me
04:55 manfred FeatherKing: one of them was
04:59 FeatherKing manfred: is there a way i can tell if the grains.present is really running after the cmd.run is finished? it seems like it probably is running, but maybe the update isnt done yet
04:59 manfred ¯\(°_o)/¯
04:59 FeatherKing if i run state.show_sls the order is correct and I have a require on the grains.present
05:00 manfred check salt-call grains.get and see if it is set?
05:00 FeatherKing i feel like its working partially
05:00 FeatherKing let me try
05:00 FeatherKing shows the pre-updated version
05:01 FeatherKing and i have a state with the same code, if i run that state after the update, as a separate process, it updates the grain correctly
05:01 FeatherKing so the code itself is ok
05:01 FeatherKing but at run time its not seeing the version change
05:01 FeatherKing if they are in the same state
05:02 manfred sorry, i just got done doing a maintenance on a RHCS, 8 hours after my shift was over, i am going to bed :) I can try and help if you are still having problems tomorrow, but I am spent for tonight
05:02 FeatherKing np i should be doing more fun things than this
05:02 FeatherKing ill hit ya tmrw
05:08 oz_akan joined #salt
05:10 badon joined #salt
05:13 bhosmer joined #salt
05:21 Comradephate joined #salt
05:30 markhayden good evening all. trying to install salt on new ubuntu server and getting the following error when trying to start master: 2014-07-28 22:28:19,987 [salt.utils.verify][WARNING ] Unable to bind socket, error: [Errno 99] Cannot assign requested address
05:30 markhayden anyone have time to help me debug a bit?
05:30 markhayden would be much appreciated.
05:33 Sauvin joined #salt
05:36 colinjohnson joined #salt
05:41 ghartz joined #salt
05:50 xcbt joined #salt
05:51 markhayden hrm. still getting [salt.utils.verify][WARNING ] Unable to bind socket, error: [Errno 99] Cannot assign requested address….anyone out there?
05:52 markhayden left #salt
05:53 markhayden joined #salt
05:53 alanpearce joined #salt
05:54 rgarcia_ joined #salt
05:56 Katafalkas joined #salt
06:05 taterbase joined #salt
06:05 kwmiebach_ joined #salt
06:08 simonmcc_ joined #salt
06:08 kermit joined #salt
06:08 wiqd joined #salt
06:09 pwiebe_ joined #salt
06:09 scristian joined #salt
06:09 gldnspud_ joined #salt
06:09 codekobe_ joined #salt
06:11 babilen markhayden: Are you setting the "interface" in your master configuration? Do you set it to a locally configured interface? Could you paste your configuration file and the output of "ip a" to http://paste.debian.net if you are unsure?
06:12 * babilen needs coffee
06:12 manytrees joined #salt
06:13 halis joined #salt
06:13 markhayden babilen >> http://paste.debian.net/112313/ output of the ip a
06:14 babilen And what do you set "interface: .." to?
06:15 stevednd manfred: When pillar files are flattened, is it possible to declare that a nested hash value in the later file completely win out, rather than merge with the file above it?
06:15 markhayden interface: 10.0.0.1
06:16 babilen markhayden: You don't have that ip configured and, conversely, cannot bind to it.
06:17 babilen 192.168.167.130 would be an option or configure an interface with 10.0.0.1
06:17 markhayden haha. aparently i need coffee too :)
06:17 babilen :D
06:18 markhayden sweet. now getting “ [WARNING ] Although 'dmidecode' was found in path, the current user cannot execute it. Grains output might not be accurate. “ so excited that its a different error :D
06:18 markhayden i owe u coffee
06:19 * babilen hands markhayden a cup of his freshly brewed Ethiopian
06:19 * markhayden pours in whiskey
06:20 babilen Too early for that and I prefer whisky, but enjoy your setup! ;)
06:20 roolo joined #salt
06:21 markhayden haha. its 11:21pm here. no better time for whiskey.
06:27 taterbase joined #salt
06:27 gldnspud_ joined #salt
06:28 kwmiebach_ joined #salt
06:29 codekobe_ joined #salt
06:29 simonmcc_ joined #salt
06:31 pwiebe_ joined #salt
06:32 scristian joined #salt
06:32 EWDurbin joined #salt
06:35 sontek joined #salt
06:46 kjkoster5489 joined #salt
06:51 Ryan_Lane1 joined #salt
06:54 alanpearce joined #salt
06:57 aw110f joined #salt
07:01 beneggett joined #salt
07:05 aw110f_ joined #salt
07:15 duncanmv__ joined #salt
07:15 chiui joined #salt
07:15 aw110f_ joined #salt
07:16 alanpearce joined #salt
07:17 xcbt joined #salt
07:24 gywang joined #salt
07:24 gywang `The grains interface is derived by executing all of the "public" functions found in the modules located in`,  What does this public mean ?
07:24 oz_akan joined #salt
07:25 gywang How can I define "private" functions which won't be executed by salt
07:25 malinoff gywang, _this_function_is_private, __and_this_too
07:27 mosen I sometimes have problems with imports in that sense :)
07:27 Tusker ok... have tomcat installed... but how to make the service startup ?   I have tomcat-service: service: - name: tomcat - running -enable: True - reload: True
07:27 Tusker but it comes back complaining '[ERROR   ] The named service tomcat is not available'
07:27 Tusker there exists /etc/init.d/tomcat
07:27 Tusker and I can run it manually on the minion
07:29 babilen gywang: You should use a single underscore for private functions. Dunder (double-underscore) ones are specific to Python's internal methods and I wouldn't recommend to use them for your own names
07:33 markhayden ahoy. i have a master and minion running on ubuntu but when i run salt-key i dont have any accepted or unnaccepted keys. am i missing a step for creation here?
07:33 matthiaswahl joined #salt
07:38 linjan joined #salt
07:42 gywang It seems that there is something wrong with multiprocessing in custom grains
07:42 gywang I have grains like this http://pastie.org/9428861#
07:44 gywang But when exec saltutil.sync_grains, error cames http://pastie.org/9428863
07:47 gywang If I don't use multiprocessing, everything will be ok
07:47 eliasp Tusker: if you're on an Upstart based distribution, Salt will use Upstart's service interface to control services, which are not represented by scripts in /etc/init.d/ (SysV-style) but service definitions in /etc/init/
07:47 eliasp Tusker: so you'd either have to make sure, Upstart's SysV-backwards-compatibility is enabled or use a proper Upstart service for Tomcat
07:49 eliasp Tusker: if you're on a systemd-based distribution, services are controlled via 'systemctl' … services are represented by service units in /usr/lib/systemd/system:/run/systemd/system:/etc/systemd/system … see also: http://www.freedesktop.org/software/systemd/man/systemd.unit.html
07:53 oz_akan joined #salt
08:02 Lomithrani left #salt
08:03 linjan joined #salt
08:04 ml_1 joined #salt
08:05 ndrei joined #salt
08:05 Lomithrani joined #salt
08:06 Lomithrani how can I make a state execute after another one nomatter what the result of this one is ?
08:07 ml_1 joined #salt
08:08 ml_1 joined #salt
08:09 quanta_1 joined #salt
08:10 darkelda joined #salt
08:10 ml_1 joined #salt
08:10 Tusker eliasp: ok, thanks, that makes sense
08:10 quanta_1 How to remove some lines that was added via file.accumulated?
08:11 ml_1 joined #salt
08:11 Tusker eliasp: upstart is installed (upstart-0.6.5-13.el6_5.3.x86_64) so will have to write an upstart service defintion
08:12 ml_1 joined #salt
08:14 ml_1 joined #salt
08:14 ml_1 joined #salt
08:15 ml_1 joined #salt
08:17 ml_1 joined #salt
08:27 CeBe joined #salt
08:32 bhosmer joined #salt
08:35 emostar when setting up a new server using salt-cloud, is there a way to specify the salt-minion version that gets installed?
08:35 gamazeps joined #salt
08:35 babilen Lomithrani: require the first in the second
08:35 Lomithrani well but then if it fails the second won't execute will it ?
08:35 babilen Ah, yeah :)
08:36 Lomithrani But actually I figured out that just putting them in the right order in the sls file is enough
08:36 babilen Lomithrani: You could simply list it after that state in the SLS file (which are being worked on from top to bottom)
08:36 Lomithrani because of the auto_order thing
08:36 babilen yeah
08:36 eliasp Lomithrani: this "mostly  works", but isn't deterministic… there's a way to do it…
08:36 eliasp Lomithrani: http://docs.saltstack.com/en/latest/ref/states/ordering.html#the-order-option
08:37 babilen I don't like that, but it looks appropriate
08:37 eliasp so with "- order: ..." you can make it deterministic
08:37 Lomithrani So our whole prereq thingy I understood why it didnt work babilen , and solved it by just ordering them in the file.
08:37 babilen yeah, your definitions were off (sorry, it was too late and I was too tired to really get into it)
08:37 babilen What was it?
08:38 Lomithrani Actually prereq was perfect , but the thing with prereq it execute the state as a test , and it failed because of the memory heap (thats why I wanted to shut down the service before executing the compiling)  So because the test failed it didn't prereq and then the compiling failed.
08:40 Lomithrani eliasp : yeah I saw that , but I have to do require on other state as well so it doesnt fit my need. But just putting them in the right order seem to work so I'll just go with it.
08:40 eliasp ok
08:54 oz_akan joined #salt
08:59 xzarth joined #salt
09:00 bhosmer joined #salt
09:01 FL1SK joined #salt
09:02 CeBe joined #salt
09:04 intellix joined #salt
09:12 babilen Lomithrani: Yes, it *has* to execute it (how would it be able to tell if there are changes), which is naturally a bit problematic in your case.
09:13 giantlock joined #salt
09:13 Lomithrani babilen: yes ^^ I'd like a prereq option that run if it try to execute not succeed to execute :)
09:19 slav0nic joined #salt
09:23 ml_1 joined #salt
09:38 topochan joined #salt
09:48 martoss joined #salt
09:48 martoss left #salt
09:50 buhman joined #salt
09:50 buhman left #salt
09:50 buhman joined #salt
09:55 oz_akan joined #salt
09:57 oz_akan joined #salt
09:59 ramishra joined #salt
10:02 martoss joined #salt
10:09 feco joined #salt
10:09 feco hi
10:10 feco I'm pretty new to Salt hence I came here with some (probably basic) questions
10:10 feco I hope you can help
10:11 feco just installed Salt on a centOS machine successfully, connected up a minion, but now I came to write some states/modules
10:11 feco however, there's no salt directory in /srv
10:11 feco any ideas?
10:13 mortis_ only 1 talk involving saltstack at oscon this year?
10:14 kachi8 joined #salt
10:15 nkuttler feco: um, create it? also check if the master is configured to use that?
10:18 feco nkuttler: I thought the installer should take care of that. Yeah, uncommented the lines in master to use that - again I assumed this would get salt-master to create it on restart. Thanks, I guess I'll try creating the folders myself then.
10:21 ggoZ joined #salt
10:21 totte joined #salt
10:27 babilen feco: yes, you have to create those directories yourself. I personally use GitFS (cf. http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html) rather than plain files on disks.
10:27 babilen (welcome to salt btw!)
10:28 feco thanks babilen :)
10:33 Tusker ok guys
10:33 Tusker thanks for your help, things are running well now :)
10:41 MrTango joined #salt
10:45 * iamtew scratches his beard
10:45 iamtew after a few days of playing with salt, I'm really starting to like it :)
10:54 babilen +1
10:56 iamtew although the documentation is a rabbit-hole.. I have some many browser tabs of different sections open now, trying to read up on the different things! however that is most likely my own fault for being to eager making it all work perfectly from the start :P
10:57 feco hmm, where do you place the actual installers?
10:57 feco I'm on 3.3.2.3 - http://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html#setting-up-the-salt-state-tree
10:58 oz_akan joined #salt
10:58 feco running salt '*' state.highstate goves me an error
10:58 feco running salt '*' state.highstate gives me an error
10:58 feco Package not found
11:01 feco I'm with iamtew on the rabbit hole theory - I feel a bit lost reading the docs
11:01 babilen feco: Which error did you get?
11:01 babilen (and what have you done so far?)
11:02 intellix joined #salt
11:02 feco http://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html#setting-up-the-salt-state-tree
11:02 feco up to 3.3.2.4
11:03 feco then I got the missing file error
11:03 babilen Okay, and which error do you get?
11:03 feco clearly since the installer file is nowhere near
11:03 feco but where should you keep it?
11:03 babilen Which error do you get?
11:04 feco ID: apache     Function: pkg.installed       Result: False      Comment: Package apache not found in the repository.      Changes:
11:04 babilen Which distribution are you installing on?
11:04 feco it's a windows server
11:05 feco there's only 1 minion linked up and that's a windows server
11:05 babilen Well, you will have to figure out the name of the apache package on Windows then. I have, fortunately, no experience *at all* with it, but lets see if I can figure it out for you.
11:05 feco can you have your own installers in salt?
11:05 feco let's say I have the installer for win apache
11:05 feco can I just get that file across and place it somewhere on the master?
11:06 babilen "apache: \n - pkg.installed" is equivalent to "apache: \n - pkg.installed \n \t - name: apache" -- which assumes that you can install the "apache" package. This package has to be available, which it obviously isn't in the win_repo
11:07 babilen And yes, you can reference your own packages (once again, no idea about Windows, forgive that), but lets please take this step-by-step and check the name of the Apache package in the win repo
11:07 feco ok
11:07 babilen http://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html is the documentation for that
11:07 babilen (which should also answer your question about installers)
11:08 babilen 'salt 'YOURMINION' pkg.list_pkgs' might be of interest. Lets see if you can search that repo online somewhere.
11:08 feco thanks babilen, but I had to create salt directory for myself - I don't have anything in there apart from the files I just created
11:09 babilen Yeah, sure .. the winrepo is a repository that is being provided by the salt community (but I have never had to use it as we are (and will be) a Debian shop)
11:09 feco joined #salt
11:09 feco successfully closed the chat window :)
11:10 babilen https://github.com/saltstack/salt-winrepo is the repo and it doesn't have apache.
11:10 iamtew we noticed :)
11:10 babilen Yeah, sure .. the winrepo is a repository that is being provided by the salt community (but I have never had to use it as we are (and will be) a Debian shop)
11:10 ghartz joined #salt
11:11 babilen Installing, say, firefox might be a better idea as that seems to be available.
11:11 feco ok lets try that :)
11:11 babilen I'm sorry, I never really understood how MS Windows deals with package repositories ;)
11:12 babilen To be honest: I am still not sure how to actually use that salt-winrepo
11:13 babilen Package name should be "Firefox" and it appears that you have to specify a version. (cf. http://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#install-windows-software )
11:15 babilen So a "Firefox: \n pkg.installed" or "Install firefox: \n pkg.installed: \n - name: Firefox" (or so) should be the corresponding state.
11:16 iamtew so I'm fairly new with salt, been doing puppet for the last couple of years, but I'm not sure how to setup my minions to check in with the master to stay up to date. would this be the equivalent of the scheduling jobs? http://docs.saltstack.com/en/latest/topics/jobs/index.html#scheduling-jobs
11:16 iamtew because it seems like it's only for running jobs on specific states...
11:17 babilen iamtew: Minions don't ask the master for the latest state, but you have to *explicitly* run state.highstate on the minions that you want to bring up-to-date.
11:18 iamtew oh, okay
11:18 iamtew so I could perhaps make a cronjob on each minion to just run every 15 minutes then I guess
11:18 babilen You can, naturally, run highstates on a set schedule (e.g. once every hour), but I wouldn't necessarily do that. You can automate a lot of things and it really depends on what you want to do (see, for example, http://docs.saltstack.com/en/latest/topics/reactor/index.html for an event based system)
11:18 crane joined #salt
11:19 iamtew okay, I will take a look at that page
11:19 babilen iamtew: No, you would use the scheduler on the salt master to periodically trigger a highstate. But then: Do you *really* want that? I like to have a lot more control over the point in time when things are being pushed into production.
11:19 iamtew true, makes sense
11:19 babilen The minions never do anything .. they always react to things they have been told by the master.
11:20 iamtew ok thanks, it's getting a bit clearer
11:20 iamtew I think I'm too used with the whole Puppet model of config management, I need to read up a bit more on how all these things work in salt :)
11:20 iamtew thanks, I'll check out the reactor doc as well
11:20 babilen My workflow is typically: Check things into git, push it. Run "salt-run fileserver.update" and "salt '*' saltutil.refresh_pillars" on the master. Then check what would happen with "salt 'some-minion.*' state.highstate test=True" followed by "salt 'some-minion.*' state.highstate"
11:22 babilen It is all being pushed done from the master. This doesn't mean that the master cannot react to things (and then fire off new commands), but it is never the case that a minion is actively requesting something. Minions can fire events and the master can react to those though.
11:22 babilen Is there something specific you'd like to do that I can help you with?
11:22 babilen (or that you don't understand)
11:22 zandy joined #salt
11:23 babilen feco: Did you manage to get firefox installed on your Windows minion?
11:23 feco not yet
11:23 babilen What's the problem?
11:23 feco hmm
11:23 feco ran sal '*' pkg.install 'Firefox'
11:24 feco salt*
11:24 feco then had this inresponse:
11:24 feco Minion:
11:24 feco ----------
11:24 babilen And that's it?
11:25 feco yeah
11:25 babilen (and please use a pastebin such as http://refheap.com or http://paste.debian.net )
11:26 babilen Hmm, is Firefox installed already? Is Firefox being listed if you run the "salt 'YOURMINION' pkg.list_pkgs" command I mentioned earlier? What *is* the output of that command? (replace YOURMINION with the correct name or *)
11:27 feco checking
11:28 ndrei joined #salt
11:28 feco no FIrefox is not listed
11:28 feco I have Salt Minion, C++
11:28 feco maybe I'm not calling the right sls file
11:29 babilen http://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#git-hosted-repo -- you probably forgot to configure the package repository
11:30 feco I checked out that repo to srv/salt/win - is it ok like that?
11:30 babilen That is being set to /srv/salt/win/repo and you would have to copy the sls files in https://github.com/saltstack/salt-winrepo there
11:30 feco hmm
11:31 feco ah I cloned it...
11:31 feco not a checkout
11:31 feco sec let me delete the directory
11:31 babilen I guess, are the sls files in /srv/salt/win/ ? (i.e. do you have /srv/salt/win/firefox.sls )
11:31 feco yeah I cloned the repo to win
11:31 babilen It's okay, I use "clone" as a generic VCS term. "Cloning" is the git lingo.
11:31 feco ah ok
11:31 feco yeah I have ../win/firefox.sls
11:32 babilen Okay, did you run "salt-run winrepo.update_git_repos", "salt-run winrepo.genrepo" and "salt '*' pkg.refresh_db" ?
11:32 feco no
11:32 feco do I run in the exact same order?
11:32 babilen I would probably clone the repo into /srv/salt/win/salt-winrepo and add that as additional value to my master config (so that you can have multiple repositories)
11:33 babilen feco: I never did any of this before, I am simply following the documentation :)
11:33 babilen TIAS!
11:33 babilen (or rather asking you to follow it)
11:34 feco hehe, nah that's cool babilen - I have never done anything like this before either so, still you're more experienced than me
11:35 feco I appreciate your help
11:35 babilen Sure, I've been using salt for longer, but this "salt on windows" thing is entirely new to me :)
11:36 babilen What baffles me a little bit is the "The default repo is one hosted on Github.com by SaltStack,Inc., which includes package definitions for open source software." -- Does that imply that it will be checked out automatically? (so that all you have to do is run "salt-run winrepo.update_git_repos", "salt-run winrepo.genrepo" and "salt '*' pkg.refresh_db") or does that mean: Our default repo, that you still have to checkout and configure, is ....
11:38 babilen feco: http://docs.saltstack.com/en/latest/ref/configuration/master.html#win-gitrepos -- Remove your local checkout, edit your master config and add the bit at the bottom. Restart the master and run the "salt-run winrepo.update_git_repos", "salt-run winrepo.genrepo" and "salt '*' pkg.refresh_db" commands
11:39 baoboa joined #salt
11:39 feco ok let me try that
11:40 Katafalkas joined #salt
11:40 TheThing joined #salt
11:41 feco ok updated master config
11:46 feco hmm the last command "salt '*' pkg.refresh_db" gives me an empty line
11:46 ujujinsan left #salt
11:47 hobakill joined #salt
11:48 feco timed out
11:49 feco check this:
11:50 feco https://www.refheap.com/88686
11:58 babilen Okay, can you install Firefox now?
11:58 zandy joined #salt
12:00 martoss joined #salt
12:01 babilen Is this Windows Server 2003?
12:01 babilen (the minion)
12:02 babilen And it appears that you haven't completely removed /srv/salt/win/repo/ before adding the git repo to your master config. You might also have to install python-git on the master so that it can checkout the git repo.
12:03 feco it's 2008
12:03 feco let me try to run that command again
12:03 babilen And you removed your local clone, haven't you?
12:03 feco yeah I removed that before
12:04 feco it's now installed in /srv/salt/win/repo/salt-winrepo.git
12:04 babilen "that command" is inherently ambiguous and it would be much preferred if you were to make exact references.
12:04 babilen Okay, but that happened automagically when you ran "salt-run winrepo.update_git_repos" didn't it?
12:05 feco hmm
12:05 feco presumably yes
12:05 feco it did create the structure by reading the value out of master config
12:05 babilen Okay, can you install Firefox now? I have no idea what that wmi_provider is about though.
12:06 baffle joined #salt
12:06 feco running that command again now
12:06 feco seems like it's doing something
12:08 feco I think it hangs
12:08 blarghmatey joined #salt
12:09 babilen That's not food.
12:09 babilen Err, *good :)
12:09 feco :)
12:09 babilen Well, it isn't food either, but still ...
12:09 jas-_ joined #salt
12:10 feco hehe yeah, hmm ,I'm wondering whether you need to actually change anything in the master config file
12:10 feco like the worker threads
12:10 feco now it returned with ERROR
12:10 babilen On linux I would now start the minion in debug mode by running "salt-minion -ldebug" to see what exactly it is doing. But what happened? The command timed out?
12:10 feco https://www.refheap.com/88687
12:11 babilen Ah, errors, much better!
12:11 feco I still have th workers commented out - so presumable it uses its deafult values
12:11 babilen You are running the master as root, don't you?
12:11 feco yeah
12:11 diegows joined #salt
12:12 babilen That might mean that it is having problems executing commands on the minion. Can you run "salt '*' test.ping" ?
12:12 feco hmm weird
12:12 feco it hangs too
12:12 feco it didn't do this before
12:13 feco I could ping it like 2 hours ago
12:13 babilen could you restart the windows minion?
12:13 feco sure
12:13 ggoZ Anybody ever tried/thought of using salt instead of init system to launch daemons  at startup?
12:13 babilen ggoZ: No, that doesn't really make sense
12:14 nyx joined #salt
12:14 babilen feco: And the Windows minion is running as a user that is allowed to perform administrative tasks?
12:14 ggoZ babilen: well, that would be one less system to learn and use.
12:14 feco babilen: yes it runs under SYSTEM
12:14 babilen ggoZ: Please forgive me, I should not judge that unconditionally. What are you trying to do and why would you want to use salt for starting services?
12:15 ggoZ babilen: nothing serious, just daydreaming :)
12:15 babilen feco: Can you somehow execute the minion on a command line with "-l debug" as option to see what it is doing? Is it answering to pings after you restartet it?
12:16 feco bab: no it doesn't
12:16 feco bab: on a command line with "-l debug" - you mean in windows?
12:17 feco oh babilen
12:18 feco I did get this time out error after running salt '*' pkg.refresh_db
12:18 miqui joined #salt
12:19 babilen I guess that you have to install that wmi provider thingie on the minion
12:20 babilen Ah, no .. that appears to be only necessary on MS Windows Server 2003
12:21 babilen Oh, and you can tab-complete nicknames in IRC. Try "bab<TAB>" if you don't want to type my nickname all the time. ("b<TAB>" should actually be all you need, cycle with multiple tabs)
12:21 feco oh that's neat :)
12:21 feco thanks babilen
12:21 feco :D
12:21 babilen You are welcome
12:22 babilen I still have no idea how to continue debugging your windows minion. It obviously cannot talk to your master anymore, but I have no idea why. The authentication issue is also interesting, but these are simply areas of the salt codebase that I am not familiar with at all :(
12:23 CeBe joined #salt
12:23 feco I'll try to restart the master again
12:24 feco ok this is interesting
12:24 feco I still have 3 threads running
12:24 feco after killing salt
12:24 feco the install FIrefox one
12:24 feco and 2 pings
12:24 pclermont joined #salt
12:26 babilen "killing salt" ? On the minion? On the master?
12:27 feco ok got a respons on ping now
12:27 feco "killing salt" = stopping the service
12:27 feco :)
12:27 babilen Which service?
12:28 feco salt-master
12:28 babilen Okay, what does "salt-run jobs.active" give you?
12:28 feco it's fine now
12:28 feco sec
12:28 Katafalk_ joined #salt
12:28 feco it's empty now
12:28 feco {}
12:28 feco the ping came back "True"
12:28 babilen Okay, but you ran that before and it contained the three jobs?
12:29 scoates joined #salt
12:29 feco https://www.refheap.com/88688
12:30 feco after typing "ps -ef | grep salt"
12:30 feco I'll try to install FIrefox now
12:31 feco hmm it's hanging again
12:31 feco oh!
12:31 feco it did it :)
12:31 feco neat
12:32 ericof joined #salt
12:32 babilen Ah, wonderful
12:33 babilen Still a bit mysterious :)
12:33 feco babilen: so I reckon you can create your own repos, then just write similar packages?
12:33 feco mysterious indeed :)
12:34 babilen Yes, you essentially just create a git repo and write states such as those in the salt-winrepo for your own software (as documented on http://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#usage )
12:35 babilen Then add that repo to win_gitrepo on the master and packages in there should be available after refreshing the package db (with those three commands earlier)
12:35 feco so win_gitrepo can have multiple references to as many repos as you like
12:37 babilen Sure
12:37 superted666 joined #salt
12:37 blarghmatey joined #salt
12:39 feco thanks babilen for your help and time - I shall go and experiment now! :)
12:39 babilen Have fun :)
12:40 TheThing joined #salt
12:40 nicksloan joined #salt
12:40 feco hehe ta :)
12:41 briner joined #salt
12:41 nicksloan can anyone share their strategy for deploying SSL keys with salt?
12:42 che-arne joined #salt
12:43 vbabiy joined #salt
12:43 babilen nicksloan: Put them in your pillar and reference that in file.managed via content_pillar
12:44 babilen (that way only minions that should see them can see them)
12:44 nicksloan babilen: what is freaking me out is that my salt configuration is kept in version control, so based on that strategy, at least two servers see them that shouldn't, and one of those is github.
12:45 babilen no no no
12:45 babilen I keep my pillars directly on the master and nowhere else (different repo from the state one)
12:46 nicksloan hmm
12:46 babilen Well, I am lazy sometimes and clone them on my local machine (encrypted and should be safe) and then push to the master, but I would not at all consider pushing it to a third-party repo.
12:47 nicksloan makes sense
12:47 babilen The GPG Renderer in Helium (next salt release) is something I'm waiting for
12:47 babilen http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html
12:47 nicksloan I might do a second pillar that is only on the master for sensitive data
12:48 babilen That's what we do -- sensitive data should, preferably, only be in a single place.
12:48 nicksloan since I quite like keeping some trivial details in my pillar in version control
12:48 nicksloan babilen: but you still end up with the sensitive stuff also on the master
12:49 nicksloan though, I guess that has a very limited set of services running, and hopefully has firewall settings that keep it safe.
12:49 babilen Sure, you cannot get around that. The master is providing the data for the minions. Why do you consider that a problem? If your master has been compromised a few leaked keys are the least of your problems
12:49 nicksloan babilen: yeah
12:49 babilen Well, not the most minor problem either, but still :)
12:49 nicksloan just working through it mentally to make sure I don't have any issues with it.
12:51 babilen I am, actually, rather interested in some security statements from salt upstream. I've been asked what kind of exploits salt might be prone to, but I couldn't really answer that.
12:51 babilen *vulnerable
12:52 babilen It is noticable a topic that is rather absent from a lot of discussions -- http://www.cvedetails.com/vulnerability-list/vendor_id-12943/product_id-26420/Saltstack-Salt.html comes to mind
12:53 Katafalkas joined #salt
12:55 juniorzoid left #salt
12:56 geekmush joined #salt
12:57 cruatta joined #salt
12:59 mpanetta joined #salt
12:59 TheThing joined #salt
13:00 sxar joined #salt
13:00 nicksloan yeah. Definitely worrying
13:00 ramteid joined #salt
13:01 rome joined #salt
13:02 racooper joined #salt
13:02 rome_ joined #salt
13:07 ericof joined #salt
13:07 davet joined #salt
13:12 ajprog_laptop joined #salt
13:16 xcbt joined #salt
13:17 nyx joined #salt
13:18 scoates joined #salt
13:19 rome_ joined #salt
13:19 rome__ joined #salt
13:28 ajprog_laptop joined #salt
13:36 vejdmn joined #salt
13:38 rome joined #salt
13:38 rome_ joined #salt
13:39 mapu joined #salt
13:41 Katafalk_ joined #salt
13:44 rome joined #salt
13:45 rome_ joined #salt
13:45 oz_akan joined #salt
13:48 lnxnut joined #salt
13:48 ipmb joined #salt
13:48 rome joined #salt
13:48 slav0nic joined #salt
13:49 UtahDave joined #salt
13:49 UtahDave left #salt
13:50 kaptk2 joined #salt
13:51 rome joined #salt
13:54 higgs001 joined #salt
13:54 pclermont joined #salt
13:55 pclermont joined #salt
13:56 pclermont joined #salt
13:58 ph8 joined #salt
14:00 sontek joined #salt
14:03 beneggett joined #salt
14:03 brendanburns joined #salt
14:04 aquinas joined #salt
14:07 rypeck joined #salt
14:09 Ahlee *shrug* trade off to be made, as always, between convinience and security
14:17 housl joined #salt
14:18 quickdry21 joined #salt
14:18 tedski joined #salt
14:19 AnswerGuy joined #salt
14:19 torrancew joined #salt
14:19 ixokai_ joined #salt
14:19 Katafalkas joined #salt
14:20 tempspace joined #salt
14:23 Micromus joined #salt
14:23 NV joined #salt
14:24 xt joined #salt
14:24 Ozack1 joined #salt
14:24 Kalinakov Quick question, using the lvm states, how would I create a volume using 100% of the available space, if I don't know how much space will be there?
14:26 aquinas joined #salt
14:27 dstokes does salt provide a method for rendering sls files for testing? (to check var values etc) difficult searching through the debug output
14:27 dstokes Kalinakov: probably grains
14:28 CeBe joined #salt
14:29 rome joined #salt
14:29 dstokes Kalinakov: not seeing anything for disk size in _my_ grains, but i'd be trivial to add your own http://docs.saltstack.com/en/latest/topics/targeting/grains.html#writing-grains
14:30 bhosmer joined #salt
14:30 Kalinakov Ok, that's kinda what I was looking for. I didn't see it anywhere either so at least I don't feel bad I missed it.
14:30 Kalinakov Thanks peoples.
14:32 alaskasalt joined #salt
14:35 elfixit joined #salt
14:37 rallytime joined #salt
14:38 Guest79789 joined #salt
14:39 martoss joined #salt
14:44 jalbretsen joined #salt
14:44 quickdry21_ joined #salt
14:46 nyx joined #salt
14:46 TheThing joined #salt
14:46 colinbits joined #salt
14:49 helderco joined #salt
14:51 ghartz joined #salt
14:52 scoates_ joined #salt
14:53 colinbits joined #salt
14:53 jonbrefe joined #salt
14:55 martoss joined #salt
15:00 jslatts joined #salt
15:01 kballou joined #salt
15:01 vejdmn joined #salt
15:01 conan_the_destro joined #salt
15:02 shorty_mu joined #salt
15:02 shorty_mu left #salt
15:11 robinsmidsrod joined #salt
15:11 to_json joined #salt
15:13 Katafalk_ joined #salt
15:14 teskew joined #salt
15:20 dstokes i've been fighting with the pillar arg here for a while now http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.state
15:21 dstokes is it supposed to be a dict, or a boolean maybe? docs are pretty sparse. can't seem to get pillar info passed to state call
15:22 dstokes pretty sure it's supposed to be a yaml dict https://github.com/saltstack/salt/blob/develop/salt/states/saltmod.py#L183
15:31 Ahlee hrm, salt version doesn't get logged to the minion log file on startup?
15:32 jslatts joined #salt
15:32 dstokes Ahlee: not afaik. what's the use case for logging the version?
15:33 Ahlee dstokes: I just updated a windows minion, it has two versions now and it's complaining about the key being old (testing the upgrade process from 0.17.x to 2014.1.x)
15:33 Ahlee so, given the lack of removing the old, the log entries, I'm guessing it started 0.17 again
15:33 Ahlee dstokes: you can try using https://github.com/saltstack/salt/blob/develop/tests/saltsh.py for rendering tests
15:34 Ahlee but for me, I just have a stand alone that I apply and reapply states while working through
15:34 Ahlee I know lots of people have asked about a validator/etc, but it's a hard nut to crack and so far remains a wish list item
15:35 dstokes Ahlee: not famililar with windows, but i have run into having multiple minion installed (bootstrap, apt)
15:35 TheThing joined #salt
15:35 aquinas left #salt
15:35 dstokes Ahlee: saltsh looks pretty awsm
15:36 Ahlee dstokes: when it works, it's awesome
15:36 beneggett joined #salt
15:36 markhayden joined #salt
15:36 Ahlee getting pillars and whatnot in it is interesting.  I hope to play with it more when i finish the 2014.1.x upgrade
15:36 Guest59421 I have a minion on Ubuntu 12.04.4 LTS and I'm trying to use the parted (partition) module but it's 'not available' I checked the __virtual__ function for the module and it's checking salt.utils.which('parted') and salt.utils.which('lsblk') both of which I've verified are installed via 'which' on the command line.  Any ideas?
15:36 dstokes you have to run it from source tho yeah?
15:36 Ahlee Yes
15:37 dstokes that makes it slightly less useful, but anyway
15:37 beneggett joined #salt
15:38 dimeshake Guest59421: do you need pyparted or some other library/bindings?
15:39 beneggett joined #salt
15:40 amontalban Guest59421: Are you using 2014.7?
15:40 cpowell joined #salt
15:41 Guest59421 amontalban: I'm using  Salt: 2014.1.7
15:41 Guest59421 dimeshake: I'm not sure I didn't see it in the :depends: list of the module
15:41 Guest59421 and the module itself shows up in sys.list_modules
15:41 tinuva joined #salt
15:42 Guest59421 where on disk would that module be installed?
15:42 che-arne joined #salt
15:42 amontalban Guest59421: /usr/lib/python2.7/dist-packages/salt/modules/parted.py
15:43 amontalban I'm using it on the same Ubuntu version
15:43 amontalban But on 2014.7
15:43 ndrei joined #salt
15:43 amontalban IIRC I had issues with older versions with same error as you
15:43 ramishra joined #salt
15:43 Guest59421 ok so 2014.7 is newer than 2014.1.7 ?
15:44 Ahlee lovely, guess I just had to delete the c:\salt\conf\pki\minion\minion_master.pub file
15:44 ramishra joined #salt
15:44 amontalban Guest59421: yeah
15:44 Ahlee that makes upgrading even bigger pain
15:44 Guest59421 amontalban: I checked the file and sure enough the function isn't there :)  looks like I'm upgrading today
15:44 meteorfox joined #salt
15:44 ramishra joined #salt
15:44 amontalban Guest59421: (it's not a stable release, be carefull)
15:45 Guest59421 amontalban: ok then there probably isn't an egg release for it (that's how I installed / upgraded)
15:45 amontalban Guest59421: egg release?
15:46 amontalban I installed via bootstrap
15:46 Guest59421 amontalban: yea the machine was bootstrapped with salt-cloud and it installed salt via an egg
15:46 amontalban wget -O install_salt.sh https://bootstrap.saltstack.com && sudo sh install_salt.sh -P git 2014.7
15:46 Guest59421 I'll probably just copy the module locally and use it until the next stable release
15:46 DaveQB joined #salt
15:47 amontalban Guest59421: ok
15:47 dstokes looks like my saltmod.states pillar issue might be a version issue. the commit that added the feature isn't in the tag (2014.7) i'm using v2014.7-68-gbafffdc https://github.com/saltstack/salt/commit/bafffdc5ade2a55ae8a283846b809142fd4f53e8
15:47 dstokes jfyi
15:47 Guest59421 thanks folks!
15:50 dimeshake dstokes: thanks for mentioning what it was.
15:51 * dstokes gives thumbs up
15:53 dstokes would really love more frequent, stable releases. pegging sha's in production feels so gross
15:53 nahamu 2014.7 isn't even released yet.
15:54 egalano joined #salt
15:54 dstokes i know, but before that i was using "develop". latest stable is from >6 months ago
15:54 dstokes missing lots of critical features
15:55 nahamu the 2014.1 point releases have been pretty frequent and every 6 months for a new major release seems pretty frequent to me.
15:55 rgarcia_ joined #salt
15:55 nahamu if you want to live on the bleeding edge, you pay the price of living on the bleeding edge...
15:55 che-arne joined #salt
15:55 nahamu the backporting workload appears to me to be bad enough as is without cutting a new release more frequently than every 6 months.
15:56 beneggett joined #salt
15:56 nahamu but that's just my opinion...
15:58 dstokes nahamu: > 1500 commits since the last stable release seems like a little much don't you think. huge surface area to cover when trying to avoid regressions / bugs
15:58 dstokes also, just my opinion ;)
15:59 Ahlee i'm still happily on 0.17 :)
16:00 babilen impossible!
16:00 mike25de Ahlee:  I also have 0.17
16:00 jcockhren I'm on 2014.1.7
16:00 mike25de at some point i tried to update ... and most of my states were fucked..
16:01 Ahlee yeah, i'm finding that now.
16:01 manfred mike25de: 2014.1.5?
16:01 manfred which one did you try to update to?
16:01 manfred .1 and .5 were terrible
16:01 mike25de manfred:  i tried to update ... to the release from january this year... not sure which one
16:01 mattmtl joined #salt
16:01 Katafalkas joined #salt
16:02 manfred 2014.1.0 was in rc until middle of february, so 0.17.5?
16:02 mike25de is such a pitty ... that an update is messing everything.
16:02 mike25de i think it was february... it was a stable something with 2014.X
16:02 manfred one of the big things i saw was people updating the minions before updating the master
16:02 manfred 2014.1.7 is pretty solid though
16:02 dstokes also, i miss semver ;_;
16:02 mike25de manfred:  first i have updated the master of course.. then i had a test minion ... and was really shitty .
16:03 mike25de then .. i rolled back the master.. and kept 0.17 ...
16:03 darkelda joined #salt
16:03 kermit joined #salt
16:03 manfred 2014.1.1 had a regressions with 0.17 minions iirc
16:03 mike25de my states were not complicated... mostly install apps and copy conf files
16:04 * bmatt wonders if there are plans to maintain backports for hydrogen after helium is released
16:04 mike25de i would like to ..  update sometimes... when a stable release is in place.
16:04 manfred mike25de: 2014.1.7 is probably worth a shot.
16:04 tligda joined #salt
16:05 mike25de manfred:  i will set up a new master... and couple minions ... and i will use the same states as i have now... to see if it's worth it.
16:05 mike25de have you guys been using docker with salt? ... that is what would interest me next.
16:06 manfred i have, it is pretty awesome
16:06 babilen I use it for testing my states in vagrant and I have a few containers (docker repo)
16:06 manfred mike25de: have you seen salt air 20? https://www.youtube.com/watch?v=EVq6hn25lYM
16:06 mike25de no manfred i have not
16:06 mike25de thanks manfred
16:07 wendall911 joined #salt
16:07 KyleG joined #salt
16:07 KyleG joined #salt
16:07 N-Mi joined #salt
16:07 N-Mi joined #salt
16:13 ipmb_ joined #salt
16:14 brendanburns joined #salt
16:14 khaije1 joined #salt
16:15 joehillen joined #salt
16:17 Comradephate joined #salt
16:17 MatthewsFace joined #salt
16:18 nyx joined #salt
16:21 amontalban Hey guys, anyone knows the best way to setup DNS servers in a Ubuntu 12.04.4 LTS running in EC2 (i.e DHCP configured)
16:21 amontalban It seems that editing the /etc/resolv.conf isn't recommended
16:21 amontalban Maybe editing /etc/network/interfaces.d/eth0.cfg ?
16:23 colinbits joined #salt
16:24 FeatherKing joined #salt
16:24 bhosmer joined #salt
16:25 KyleG amontalban: Shouldn't your DHCPD server be supplying the correct nameservers?
16:25 egalano joined #salt
16:26 manfred amontalban: ec2 should specify the dns servers when you dhcp, otherwise you can just drop nohook resolv.conf in /etc/dhcpcd.conf and then just set /etc/resolv.conf manually
16:27 amontalban KyleG: Yeah, I'mean they do provide DNS servers but they seem to have a higher cache than Google one
16:27 manfred other than that... maybe set the DNS in whatever the eth0 configuration is, where it specifies that it should dhcp
16:27 amontalban manfred: Ok will check on that, thanks man!
16:27 jY amontalban: you can control it if you are in a vpc
16:28 Gareth morning
16:29 amontalban jY: Unfortunately i'm on standard network with this instances in particular
16:33 Katafalkas joined #salt
16:34 amontalban For anyone that may need this, I think that the best approach will be option #1 (http://www.cyberciti.biz/faq/dhclient-etcresolvconf-hooks/)
16:34 amontalban Sorry, #2 :)
16:37 ChrisCox joined #salt
16:38 beneggett joined #salt
16:38 carmony Can you require an entire sls file?
16:38 carmony in a state declaration
16:39 bmatt carmony: - require: - sls: foo
16:40 Lomithrani left #salt
16:42 smcquay joined #salt
16:43 amontalban carmony: yeah, remember to include it first
16:46 halis joined #salt
16:46 Ryan_Lane1 joined #salt
16:47 schimmy1 joined #salt
16:47 cheus joined #salt
16:49 nyx joined #salt
16:51 jaimed joined #salt
16:52 forrest joined #salt
16:52 carmony whats the best way to have cmd.run also have /usr/local/bin in it's path
16:52 carmony I should say $PATH env variable
16:53 troyready joined #salt
16:54 rap424 joined #salt
16:54 MrTango joined #salt
16:56 ndrei joined #salt
16:59 elfixit joined #salt
16:59 che-arne joined #salt
16:59 che-arne|2 joined #salt
17:01 chrisjones joined #salt
17:01 FeatherKing manfred: i have a thought about my version grain not refreshing
17:01 FeatherKing (from last nigths late discussion)
17:02 chiui joined #salt
17:02 FeatherKing recap, i run an update in a state file and then update a grain with the version, but the version grain doesnt actually update
17:03 FeatherKing anyway i think salt is evaluating the grain when it renders the whole state file, so when the update runs, it has previously determined that the grain is correct, even though it has really changed
17:04 m1crofarmer_ joined #salt
17:04 FeatherKing i tried to put reload_modules: True on the grain
17:04 FeatherKing but thats not refreshing
17:04 aw110f joined #salt
17:04 Katafalkas joined #salt
17:04 FeatherKing anyone can chime in really, i feel like this is a reload modules thing but im not getting it to set the new version grain
17:06 ml_1 joined #salt
17:06 conan_the_destro joined #salt
17:07 * retrospek trips conan
17:07 rgarcia_ joined #salt
17:11 bezeee joined #salt
17:15 Jeff___ joined #salt
17:17 bezeee left #salt
17:19 thayne joined #salt
17:21 Jeff___ I'm looking for a way to monitor file changes on specific minions - Is this something anyone has done before?
17:22 JPaul joined #salt
17:25 forrest Jeff___, you could use the reactor: http://docs.saltstack.com/en/latest/topics/reactor/
17:26 bigl0af joined #salt
17:28 Voziv joined #salt
17:28 taterbase joined #salt
17:28 bezeee joined #salt
17:29 v0rtex joined #salt
17:29 bigmstone joined #salt
17:29 carmony joined #salt
17:29 Ahlee joined #salt
17:30 lz-dylan joined #salt
17:30 Jeff___ Any ideas on shipping reactor events to a service like Flapjack?
17:30 Jeff___ Thanks btw, that's a huge help!
17:36 n0arch joined #salt
17:36 JPaul joined #salt
17:37 bmatt hm, does s0undt3ch visit #salt?
17:37 bmatt I'm curious about the logic in the salt-bootstrap fix
17:38 forrest bmatt, no he doesn't
17:38 forrest can you link his PR?
17:38 bmatt https://github.com/saltstack/salt-bootstrap/pull/437
17:38 bmatt he fixes it in https://github.com/s0undt3ch/salt-bootstrap/commit/7a0d439146fb9d3d3435aec9d7639138f63ec0ac
17:38 bmatt but I don't see how salt-api ever gets installed
17:38 forrest I don't see how his change fixes it
17:38 forrest bmatt, he's on IRC at s0undt3ch
17:39 williamthekid joined #salt
17:39 forrest so you can just message him directly if you want, I don't know if he'll be around yet though
17:39 bmatt well, he restarts the services if the salt-api command is in the path
17:39 bmatt which is... certainly one approach, I guess
17:39 forrest he's not going to install the api
17:39 bmatt right, so why have the test?
17:40 bmatt I can't think of an execution path that results in salt-api being installed before bootstrapping, which I think would be a condition for that to happen
17:42 ede joined #salt
17:43 john5223 joined #salt
17:43 jY is there anything out there to do state file testing.. like given this grain or host over top.sls apply states and test results
17:46 manfred FeatherKing: i am doing chat today :( and don't have spare time to look. sorry
17:47 ipmb joined #salt
17:50 FeatherKing manfred: np, i have a workaround by shelling out to salt-call, but it seems unelegant when i have a state module for grains.present
17:51 zandy joined #salt
17:52 manfred have you tried using the module.run state instead of doing a salt-call with cmd.run ?
17:53 FeatherKing i havent but that still seems workaround-ish since the grains.present is not seeing the change in grain value.  i will look at it, at the very least maybe a quicker work around
17:53 manfred FeatherKing: it just does a regular salt-call https://github.com/saltstack/salt/blob/develop/salt/states/module.py#L192 with some extra check stuff
17:54 FeatherKing ah
17:54 manfred it is a cleaner work around, but yeah
17:54 manfred grains.present should work
17:54 FeatherKing like the state.show_highstate shows it has already evaluated the grain
17:54 FeatherKing i wonder if it just never checks it again
17:54 FeatherKing or show_sls
17:54 manfred have you tried throwing like 6 identical grains.present into the same state run to see if they all execute, or if just the first one does and the rest say the value is already set?
17:55 FeatherKing at different points in the state you mean?
17:55 manfred yeah
17:55 FeatherKing i have not, i will
17:55 manfred just like, throw 6 of them into a file setting some random grain
17:55 manfred and see if it runs all of them, or just one
17:55 manfred because if it doesn't refersh the grains until the end of the whole run, then you would see the grain.present get run 6 times
17:56 manfred but if it does it correctly, you would only see it one once and then say it was completed the other 5 times
17:56 FeatherKing and in my case the grain should change halfway through the state run
17:57 manfred well, even then
17:57 manfred this is just to test if it registers a grain that has changed in the same state run
17:57 CeBe joined #salt
17:57 FeatherKing right
17:57 gmoro joined #salt
17:58 vejdmn joined #salt
18:00 jslatts joined #salt
18:05 vejdmn joined #salt
18:05 druonysus joined #salt
18:10 TheThing joined #salt
18:11 oz_akan_ joined #salt
18:21 zandy joined #salt
18:31 ipmb_ joined #salt
18:31 beneggett joined #salt
18:31 kermit joined #salt
18:35 bigl0af joined #salt
18:35 bezeee joined #salt
18:36 ekristen joined #salt
18:37 lz-dylan joined #salt
18:39 jslatts joined #salt
18:39 intellix joined #salt
18:40 ndrei joined #salt
18:40 nyx joined #salt
18:41 m1crofarmer joined #salt
18:41 v0rtex joined #salt
18:42 rome joined #salt
18:42 Ahlee joined #salt
18:43 JPaul joined #salt
18:43 ghartz joined #salt
18:43 khaije1 so if I don't want to include any states in my base/top.sls file what should go there? (all the value is kept in other environments)
18:44 intellix joined #salt
18:44 khaije1 a top file is required to be in the base environment, no?
18:44 Voziv joined #salt
18:45 intellix joined #salt
18:47 ede joined #salt
18:48 n0arch joined #salt
18:49 bezeee you should be able to keep an empty top.sls file
18:49 bezeee I’ve just started testing out salt but I found that to work
18:51 ronc joined #salt
18:51 bigmstone joined #salt
18:52 jaimed joined #salt
18:52 rome joined #salt
18:53 khaije1 mkay
18:54 djaime joined #salt
18:54 carmony joined #salt
18:56 TheThing joined #salt
18:56 MTecknology joined #salt
18:57 utahcon joined #salt
18:57 hvn joined #salt
18:57 luminalflux joined #salt
18:58 xcbt joined #salt
18:59 TheThing joined #salt
19:03 dublincrt joined #salt
19:04 jalaziz joined #salt
19:09 m1crofarmer joined #salt
19:13 kermit joined #salt
19:14 peters-tx joined #salt
19:20 ksalman how can i debug this error Minion failed to authenticate with the master, has the minion key been accepted?
19:20 ksalman the master is set to accept, and open_mode
19:21 koyd ksalman: what does salt-key -L report on the master?
19:22 babilen joined #salt
19:22 ksalman koyd: it does not host this particular minion
19:22 ksalman s/host/show
19:22 jY ksalman: stop the master and run it in debug mode
19:22 zandy joined #salt
19:23 m1crofarmer joined #salt
19:27 FeatherKing manfred: i am seeing what you described, the first one creates the grain the next 5 dont do anything
19:28 manfred interesting
19:28 FeatherKing manfred: however i think my issue may lie in the jinja
19:28 FeatherKing i grab that value like this
19:28 manfred oh
19:28 manfred FeatherKing: yeah, jinja is all rendered before any states are run
19:28 FeatherKing yeah
19:28 manfred so if you are checking the grain in jinja, it won't be available
19:28 FeatherKing not checking thte grain, but grabbing the value for the grain
19:28 manfred yeah
19:28 FeatherKing i think it is still the issue thouugh
19:29 FeatherKing because at jinja rendering it is rendered and done
19:29 FeatherKing {{salt['cmd.run']("awk -F'=' 'FNR == 1 {print$2} FNR == 2 {print$2}' version.properties | paste -d. -s")}}
19:29 retrospek ksalman: confirm that your minion can resolve the name you provided for the master
19:29 FeatherKing so this jinja is never executed again
19:29 FeatherKing not sure how to grab the contents of the file dynamically
19:30 FeatherKing mid-state
19:31 ksalman FeatherKing: it can resolve the name, and the minion key match what is on the master
19:32 manfred FeatherKing: what are you grabbing it for?
19:32 ksalman err
19:32 TheThing joined #salt
19:32 FeatherKing its a program version for an internal app
19:32 manfred ok
19:32 ksalman retrospek: it can resolve the name, and the minion key match what is on the master
19:32 manfred so
19:32 FeatherKing that awk combines two lines, major and minor
19:32 manfred are you passing that to a command or something later on?
19:33 FeatherKing i was going to use that grain as logic to know if servers have been hit by the update
19:33 FeatherKing or reporting as to who is on what ver
19:33 manfred FeatherKing: you are either going to want to use an overstate/orchestrate runner, so that you can do all the way up to the grains.present, and then move over and do the second run which will be able to grab that grains information
19:33 retrospek is version.properties managed by salt or external?
19:33 manfred FeatherKing: http://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html#states-overstate
19:33 FeatherKing this is external, replaced by the update itself
19:34 retrospek you can just make a custom grain that parses that file for you
19:34 manfred so yeah, you coudl do that
19:34 manfred instead of doing a grain.present
19:34 FeatherKing the custom grain would work mid state? not sure if you read all the way back
19:34 manfred just have a grain module that checks the specified file
19:34 manfred oh wait
19:34 manfred no
19:34 manfred because the grains are populated at teh beginning
19:35 retrospek what do you mean by 'mid'?
19:35 manfred so it won't check when the file appears in the middle of that state run
19:35 retrospek that's why i asked if it was external
19:35 manfred retrospek: he starts the state run, and that fiel doesn't exist yet
19:35 manfred it appears in the middle, and then he does the grains.present
19:35 FeatherKing it exists but maybe an old version
19:35 retrospek ok then it is managed by salt effectively
19:35 retrospek different problem
19:35 manfred retrospek: kind of
19:35 manfred FeatherKing: ok,
19:35 manfred so
19:35 retrospek no no kind of. either is or isnt :)
19:35 manfred http://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
19:36 manfred FeatherKing: you are going to have to make a custom state
19:37 retrospek a custom grain will by default only load on minion start. you can make your own state with grain to handle when it updates
19:37 manfred ^^
19:37 manfred that is the way to do it
19:37 retrospek just handle the reload logic correctly when it is invoked as it may have changed (or stayed the same but you reread it anyhow)
19:38 manfred retrospek: reload is not what he needs
19:38 manfred cause he is referencing it in jinja
19:38 manfred which is all rendered before he gets to the point that he is going to use it
19:38 retrospek no i mean the state will reload the grain data
19:38 manfred doesn't even need to do that
19:38 retrospek er not state, module
19:38 manfred just have the state check the file
19:38 manfred the custom state check for the file*
19:41 alekibango joined #salt
19:42 FeatherKing so the custom state will grab the version, and my upgrader state will just run that custom state and use the results ?
19:42 FeatherKing i am looking here http://docs.saltstack.com/en/latest/ref/states/writing.html#full-state-module-example
19:42 manfred whatever state your are using
19:42 manfred to deploy your application
19:43 manfred where you need that grain value
19:43 manfred make a custom state of that
19:43 allanparsons joined #salt
19:43 manfred just copy it to /srv/salt/_state on the master
19:43 allanparsons fyi - logged that pillar.pillar issue... https://github.com/saltstack/salt/issues/14605
19:43 manfred and modify it to pull whatever information you needed from the file
19:43 fragamus joined #salt
19:43 allanparsons it ** randomly ** works (but never on first try)
19:44 Katafalkas joined #salt
19:47 Katafalkas joined #salt
19:50 FeatherKing manfred: i feel like maybe the terminology is getting mixed a bit but, i am running an upgrade.sls that i wrote and calling by salt 'server' state.sls upgrade.sls. you dont mean copy that into _state right? you mean a whole python module
19:51 manfred no
19:51 manfred the state that you have defined inside the upgrade.sls
19:51 manfred it has an actual block
19:51 manfred that may use file.managed or something
19:51 FeatherKing correct
19:51 manfred whatever it is that is using that value that you are defineing
19:51 FeatherKing several blocks, one for the actual update itself
19:52 manfred ls salt/states/file.py
19:52 manfred rewrite it to use your value, and drop it in
19:52 FeatherKing kkkkkkkkkk
19:52 FeatherKing i am with you
19:52 FeatherKing ok ok, ty i have a mtg real quick will report back in a bit
19:54 bhosmer_ joined #salt
19:57 joshpaul joined #salt
19:59 Whissi joined #salt
20:01 khaije1 I asked this question yesterday but haven't yet figured it out, does file_roots support the use of relative paths and if so, how does that work? (any example?)
20:02 TheThing joined #salt
20:05 laubosslink joined #salt
20:05 retrospek allanparsons: with that if commented did you ever see 'test-foo-ip' produced?
20:05 Sauvin joined #salt
20:06 retrospek khaije1: it does not sadly
20:06 allanparsons yes retrospek - second run saw it
20:06 allanparsons lemme find line in my report
20:06 retrospek but first did not?
20:06 allanparsons oh i did not see foo produced
20:06 TheThing joined #salt
20:06 retrospek well i mean foo where it's your machine names
20:06 khaije1 retrospek: oh thats quite surprising, but good to know
20:06 allanparsons oh
20:06 allanparsons yeah
20:06 retrospek you have two productions. test-foo and test-foo-ip
20:07 retrospek the latter is jinja
20:07 retrospek filtered by an if. clearly if you have no test-foo-ip in the output that if is failing
20:07 allanparsons no - i commented out test-SERVER-ip (that's commented out)
20:07 allanparsons but first run produced test-127.0.0.1
20:07 retrospek khaije1: you can get around it somewhat with environments but depending on your use case it may be difficult
20:07 allanparsons second produced test-10.X.....
20:08 retrospek i ran into it back in 0.9.x days when doing jails
20:08 retrospek they may have fixed it though
20:08 khaije1 retrospek: I'm going to add a feature-request unless you know a reason I shouldn't?
20:08 allanparsons test-foo-ip wont be produced, @retrospec:  https://github.com/allanparsons/salt-couchbase/blob/master/states/couchbase/server.sls#L27
20:08 retrospek well, add that back in. strip out the if clause. do you have test-host-ip for all your intended interfaces?
20:09 allanparsons the first state.sls fails (127.0.0.1)
20:09 allanparsons if i run the exactly sls on the same box after 3 - 4 minutes or so
20:09 allanparsons i get the actual IP
20:09 retrospek oh wait
20:09 allanparsons in my output search for:    ID: test-127.0.0.1
20:10 allanparsons and then search for:  ID: test-10.X.11.73
20:10 retrospek are you pushing that sibling network config (for machine A) in the same highstate (for machine B) and expecting it to have A's IP address before trying to run state on B?
20:12 allanparsons @retrospek, yes
20:13 allanparsons when i bootstrap a box, i sync grains immediately
20:13 allanparsons so that IP address on A should immediately visible by machine B via publish.publish, no?
20:13 mechanicalduck joined #salt
20:13 allanparsons i dont have to do anything special in a highstate to make that IP address available do i?
20:14 repl1cant joined #salt
20:14 Katafalkas joined #salt
20:17 m1crofarmer_ joined #salt
20:17 bezeee I’m coming up to speed for salt and am liking the idea of “roles” via custom grains
20:18 bezeee like here: http://docs.saltstack.com/en/latest/topics/targeting/grains.html#grains-in-the-minion-config
20:19 bezeee question…how is the minion config bootstrapped in a cloud evironment?  Example, a new webserver is created and needs a “websrever” role…how are folks getting the minion config down to the new instance before salt is called?
20:22 rome joined #salt
20:22 zandy joined #salt
20:23 retrospek allanparson: ok as long as you sync before highstate that should be stable right
20:24 retrospek laubosslink: if the entire structure is managed by salt you want 'recurse'
20:24 zandy joined #salt
20:27 khaije1 joined #salt
20:28 ashb joined #salt
20:28 retrospek allanparsons: if you eliminate the if do you get the entire test-x-y block too?
20:28 retrospek either that if is malformed or the publish is. not sure which
20:29 allanparsons retrospek - i made no change.  first run i get localhost, second run i get OK results.
20:29 shankar joined #salt
20:29 shankar hi
20:29 allanparsons that if statement is executing... i push a 10. address to the array.  and then after the IF, i push a 127.0.0.1 ip address to the array and then take the first element
20:29 erjohnso joined #salt
20:30 herlo joined #salt
20:30 allanparsons see:  https://github.com/allanparsons/salt-couchbase/blob/master/states/couchbase/server.sls#L26
20:30 allanparsons so that if definitely executes... but milage varies between runs
20:34 beneggett joined #salt
20:35 kermit joined #salt
20:36 khaije1 just want to make sure I've got the right idea here... to define custom roles on the master, I add the info to /etc/salt/grains on the master ... yes?
20:39 JordanTesting anyone ever seen "expected <block end>, but found '?'" when trying to parse an sls file?
20:40 JordanTesting the line is it pointing to from what I can see ... is proper (copy and paste from a working file)
20:41 _foka joined #salt
20:41 JordanTesting http://pastebin.com/zXJ0gxZy :(
20:42 khaije1 or is nodegroup the way this is done ... ?
20:43 JordanTesting khaije1: set the grains on the minions
20:43 JordanTesting either with the file, or with the grains command
20:43 khaije1 JordanTesting: I'm trying to avoid trusting the minion in any way
20:43 JordanTesting then node groups
20:44 khaije1 ya these are looking good, cheers JordanTesting!
20:44 JordanTesting the grains are parsed from the minion when you call them
20:44 schimmy joined #salt
20:45 schimmy1 joined #salt
20:46 khaije1 makes sense, had a feeling I was grasping after the wrong term/notion
20:47 roolo joined #salt
20:48 KaaK_ is it possible to factor common pillar data out in to central pillar -- for reference between several other pillars? perhaps say, DB info shared between several applications' pillar data
20:55 TLI joined #salt
20:56 dude051 joined #salt
20:59 beneggett joined #salt
21:00 JordanTesting figured out my issue... indentation in my loop :/
21:01 viq joined #salt
21:01 Tian joined #salt
21:02 khaije1 nodegroups .... sooo good!
21:04 TLI joined #salt
21:04 retrospek allanparsons: which implies the publish isnt working
21:04 khaije1 here's a question, what are the constraints on nodegroup names? can it be any comma or whitespace delimited string?
21:05 khaije1 s/quotation mark/comma/
21:11 beneggett joined #salt
21:18 repl1cant joined #salt
21:20 kermit joined #salt
21:22 zandy joined #salt
21:23 higgs001 joined #salt
21:26 ipmb joined #salt
21:26 martoss joined #salt
21:27 Katafalkas joined #salt
21:27 kachi8 joined #salt
21:30 druonysuse joined #salt
21:32 beneggett joined #salt
21:41 Katafalkas joined #salt
21:42 nextdoorwarren joined #salt
21:43 TheThing joined #salt
21:45 mechanicalduck joined #salt
21:46 rgarcia_ joined #salt
21:47 Tian left #salt
21:48 rome joined #salt
21:53 scoates joined #salt
21:53 beneggett joined #salt
22:00 allanparsons retrospek - correct...
22:00 allanparsons so, a bug?
22:04 bhosmer joined #salt
22:08 beneggett joined #salt
22:13 rome joined #salt
22:17 oz_akan joined #salt
22:20 TheThing joined #salt
22:22 zandy joined #salt
22:25 logix812 joined #salt
22:30 MatthewsFace joined #salt
22:36 rome joined #salt
22:39 JasonR joined #salt
22:42 ajprog_laptop joined #salt
22:43 TheThing joined #salt
22:52 Outlander joined #salt
22:54 torch_ joined #salt
22:54 smcquay joined #salt
22:54 DaveQB joined #salt
23:02 Ryan_Lane1 what is the inclusion order for pillar files from the top file?
23:03 Ryan_Lane1 I'd think that things later in the top file would overwrite things earlier....
23:03 Ryan_Lane1 but I'm not seeing that behavior
23:03 manfred Ryan_Lane1: one second
23:03 manfred i gotta find the link
23:04 aw110f joined #salt
23:04 jY Ryan_Lane1: better off using hiera for that
23:04 Ryan_Lane1 definitely not hiera
23:04 Ryan_Lane1 maybe reclass
23:04 Ryan_Lane1 but not hiera
23:05 manfred ugh, if i can find it
23:07 manfred Ryan_Lane1: i can't remember where the document is
23:07 manfred but
23:07 manfred https://github.com/saltstack/salt/issues/1432#issuecomment-6259202
23:07 manfred they are additive, not overwritting
23:08 Ryan_Lane1 the pillars themselves overwrite
23:08 manfred if it is the same value?
23:09 manfred it sounds like it does a .update on the pillar dictionary
23:09 Ryan_Lane1 yes
23:09 Ryan_Lane1 which is why I need them to load in a specified order
23:10 manfred Ryan_Lane1: check the last message in that
23:10 Ryan_Lane1 sigh
23:10 manfred apparently you can also use order: in there
23:10 manfred https://github.com/saltstack/salt/issues/1432#issuecomment-30337597
23:10 Ryan_Lane1 yeah
23:10 manfred unfortunately there is not a better way that I can find
23:10 Ryan_Lane1 doing that now
23:10 manfred good luck sir
23:10 Ryan_Lane1 that kind of sucks
23:10 manfred agreed
23:11 manfred i would think that it would go from the top to the bottom of the list, assuming that the top.sls file is an ordered dict
23:11 jpl1079 joined #salt
23:11 rap424 joined #salt
23:12 manfred Ryan_Lane1: i will dig into how it does that when I get a minute
23:12 Ryan_Lane1 I'm going to comment on that bug
23:12 manfred yar
23:13 rome joined #salt
23:14 rome_ joined #salt
23:15 gzcwnk joined #salt
23:16 aberdine joined #salt
23:16 manfred Ryan_Lane1: how does it break that?
23:17 Ryan_Lane1 manfred: the files aren't read sequentiall
23:18 Ryan_Lane1 if top files aren't read in order, then it isn't apparent from reading the code how things are going to run
23:18 manfred it shouldn't matter for states, since you wont overwrite them because it doesn't allow two state ids of the same type
23:19 manfred or two blocks with the same stateid*
23:19 manfred it would only matter for pillars
23:19 Ryan_Lane1 yeah. I changed the comment to say similar to
23:19 manfred cool
23:20 manfred Ryan_Lane1: but how does it specifically affect the listen stuff?
23:21 manfred if pillars*
23:21 manfred or does it just affect your current config because you are overwritting one specific dict in only some minions?
23:22 Ryan_Lane1 I have things set up by environment
23:22 Ryan_Lane1 I have common settings for *
23:22 Ryan_Lane1 and override them in environments, where necessary
23:22 manfred ahh
23:22 manfred ok makes sense
23:22 Ryan_Lane1 I noticed some environments were working and others weren't
23:22 zandy joined #salt
23:22 Ryan_Lane1 because the inclusion order was different for some reason
23:22 Luke joined #salt
23:23 manfred makes sense
23:25 mosen joined #salt
23:27 jY order will be different due to pillars being parsed into a dict
23:27 jY dicts don't have order
23:27 Ryan_Lane1 ordereddicts do
23:27 jY yes but it doesn't use that
23:27 manfred jY: we use ordered dicts almost everywhere
23:27 manfred except pillars
23:27 jY oh really?
23:27 manfred so
23:27 jY ya
23:27 manfred yes
23:27 manfred jY: all states and stuff are ordered dicts
23:27 jY that's what i thought
23:27 jY ya
23:27 Ryan_Lane1 everything should be ordered
23:28 Ryan_Lane1 it's way less confusing that way
23:28 jY seems to me it was an oversight
23:28 jY and not ordered dicts might break shit for others?
23:28 Ryan_Lane1 well, it may not
23:28 Ryan_Lane1 *now
23:28 manfred so
23:28 Ryan_Lane1 since it'll change the order
23:29 jY on that note.. what do people use to do integration testing?
23:29 manfred the reason I think it wasn't done, the original intent wasn't to overwrite stuff, it was just to extend pillars
23:29 manfred but if it is a use case, it should at least be an option on the master to order the pillars
23:29 rome joined #salt
23:29 jY manfred: that's a good idea
23:30 manfred Ryan_Lane1: order_pillars: True?
23:30 Ryan_Lane1 it should likely change how the state ordering changed
23:31 Ryan_Lane1 pillar_auto_order: False <-- previous behavior
23:31 Ryan_Lane1 (consistency is a good thing, make it consistently named with the same option for states ;) )
23:32 manfred dk
23:32 manfred kk
23:32 manfred i will add it to my list :P
23:32 manfred might get to it in a minute, I am waiting on something else to finish building
23:33 manfred for some reason I decided to do lfs again.
23:33 Ryan_Lane1 cool :)
23:33 Ryan_Lane1 lfs?
23:33 manfred linux from scratch
23:33 Ryan_Lane1 :D
23:33 Ryan_Lane1 sorry to hear that
23:33 manfred heh
23:33 Ryan_Lane1 I use Ubuntu from the cloud
23:33 manfred i wanted to see how the high io bare metal servers were
23:33 Ryan_Lane1 you're generally going to get worse performance from linux you build yourself
23:34 manfred yeah
23:34 Ryan_Lane1 unless you *really* know what you're doing :)
23:34 manfred http://www.rackspace.com/cloud/servers/onmetal/
23:34 manfred i just wanted to go through the toolchain
23:34 Ryan_Lane1 ahhh, ok
23:35 beneggett joined #salt
23:37 manfred i wanted to fiddle with the highio ones
23:37 manfred cause holy shit
23:38 snuffeluffegus joined #salt
23:39 rome joined #salt
23:40 MatthewsFace joined #salt
23:41 mpoole hey guys, I use salt right now to manage hosts and I'm looking at a solution whereby, when a master merge is made, instead of the salt-master propagating the change to the minions, we do a run with test=True and report the changes for the whole network
23:42 mpoole does anyone do anything similar ?
23:44 forrest mpoole, what do you mean a master merge? A git merge?
23:44 mpoole so the current process is that we use gitfs on the master monitoring a git master branch
23:44 mpoole we go through a staging > master PR process using github
23:45 forrest so once it pulls in changes, you are automatically running a highstate?
23:45 mpoole yes
23:45 mpoole the minion does
23:45 Comradephate joined #salt
23:45 Ryan_Lane1 you could use an overstate for it instead
23:45 Ryan_Lane1 where you run highstate with test=True, then run highstate
23:46 Ryan_Lane1 or you don't want to run the highstate at all?
23:46 druonysuse can you only use a singe external pillar of any kind? We are trying to set two gitfs repos as two external pillars and it is only pulling the first in the list
23:46 mpoole well it should be approved using N  system we create then highstate runs
23:46 forrest mpoole, The master config has a section for module configuration to run everything as test = True
23:46 mpoole so we merge to master
23:46 forrest have you looked at that?
23:46 manfred mpoole: have you seen salt-api?
23:47 manfred you could remotely run it and get the repsonse back, then operate on that and force another run without the test=True
23:47 mpoole I'll look at all these things
23:47 mpoole thanks guys
23:47 manfred al through the api
23:47 mpoole I think it would be pretty cool if we merge to master and get a report back of what changes on ALL boxes with test=True then run something else to apply
23:48 mpoole it's not a HUGE network so scale isn't a concern
23:48 mpoole I'll take a look at those solutions
23:48 mpoole thanks all
23:48 manfred you can do that through salt-api
23:48 manfred or run it through saltapi, have it dump to a mysql database
23:48 manfred or some other returner
23:48 manfred and evaluate on that data
23:49 ghartz joined #salt
23:49 Carl_ joined #salt
23:50 ajprog_laptop joined #salt
23:52 Luke joined #salt
23:53 thayne joined #salt
23:53 Carl_ Question here: I was wondering if it's possible to use an "include:" statement in my top.sls file. The purpose of this is to not get an unwieldy long top.sls file. So far from my testing, it will render another top.sls file but not apply the configuration.
23:54 mpoole ase:
23:54 mpoole '*':
23:54 mpoole - thingtoinclude
23:54 mpoole ?
23:54 mpoole base*
23:54 Carl_ hmmm, more like this.
23:55 Carl_ include:
23:55 Carl_ - anotherfolder.top
23:55 Ryan_Lane1 if you have a ton of stuff in your top file you may want to reconsider how you're organizing things.
23:55 Carl_ base:
23:55 Ryan_Lane1 you can do includes from inside of sls files, too
23:56 mpoole currently I have SLS's for service types
23:56 Ryan_Lane1 same
23:56 mpoole then they include apps
23:56 Carl_ hmmm ok.
23:56 rome joined #salt
23:57 Carl_ I wanted to include another top.sls and have that file organize a certain project.
23:57 Carl_ But thanks for the advice
23:57 Ryan_Lane1 ah. I see
23:58 Ryan_Lane1 it's not possible to include other tops from a top
23:58 Carl_ All right, thank you. Ryan_Lane1
23:58 Ryan_Lane1 yw

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