Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-05-07

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

All times shown according to UTC.

Time Nick Message
00:01 bemehow joined #salt
00:03 stevednd I'm creating a custom state, and I only want to execute if another state changes(cmd.run creating an ssh key in this case). What exactly do I need to do to make that happen? Right now my state executes even if the other state is 'Clean'
00:10 bhosmer joined #salt
00:19 ipalreadytaken joined #salt
00:19 honestly joined #salt
00:21 schmutz joined #salt
00:22 bhosmer joined #salt
00:22 joehoyle joined #salt
00:28 jnials joined #salt
00:31 RandalSchwartz usually a watch does that
00:31 RandalSchwartz watch : cmd : otherstate
00:32 RandalSchwartz or rather watch: \n - cmd: otherstate
00:34 tr_h joined #salt
00:38 stevednd RandalSchwartz: That's the thing. That was the first thing I tried, but it just executes regardless
00:38 stevednd is there something special I have to implement in my state file?
00:39 stevednd or rather my custom state module
00:39 RandalSchwartz well - does your command always run?
00:39 RandalSchwartz or does it have an if or unless?
00:40 RandalSchwartz I had to add a flag file to mine
00:40 RandalSchwartz unless : [ -f /etc/foo/THIS-HAS-RUN ]
00:40 RandalSchwartz and then I create /etc/foo/THIS-HAS-RUN
00:40 RandalSchwartz so the cmd.run will run only once
00:41 stevednd I have an unless condition verifying that the ssh key is created
00:41 RandalSchwartz hmm.  that should work then
00:41 stevednd Name: ssh-keygen -t rsa ... - Function: cmd.run - Result: Clean
00:41 RandalSchwartz works for me, in other works
00:41 stevednd there's the output line from salt
00:42 stevednd and sure enough my state file sends out the email for it, even though it hasn't changed
00:43 zain_ joined #salt
00:43 RandalSchwartz weird
00:47 stevednd am I supposed to test or check anything in my state module?
00:51 bemehow joined #salt
00:56 joehh nrgaway: was called away - sounds good
00:58 taion809 joined #salt
00:59 mateoconfeugo joined #salt
01:09 Ryan_Lane1 joined #salt
01:10 Shenril joined #salt
01:11 schmutz joined #salt
01:16 n8n joined #salt
01:17 mgw1 joined #salt
01:18 Cidan joined #salt
01:19 possibilities joined #salt
01:24 rupsky joined #salt
01:24 xzarth joined #salt
01:35 ajolo joined #salt
01:42 Vijay_ joined #salt
01:45 Vijay_ Hi
01:45 Vijay_ i need your help to automate hadoop installation using salt
01:45 Vijay_ my hadoop master is different than salt master
01:45 Vijay_ how can i push hadoop master's hostnames to master file
01:45 Vijay_ and also how can i update the datanodenames in hadoop
01:45 Vijay_ also how can i do this when i launch hadoop in aws
01:45 Vijay_ please help me
01:46 ilbot3 joined #salt
01:46 Topic for #salt is now Welcome to #salt | 2014.1.3 is the latest | SaltStack trainings coming up in SLC/NYC/London: http://www.saltstack.com/training | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:46 __number5__ Vijay_: should be create a dns record for your hadoop master, and update the route53 whenever you have new IP address for it
01:48 jnials joined #salt
01:58 Vijay_ joined #salt
01:58 Vijay_ Hi, i got disconnect, sorry
01:59 Vijay_ please guide me how can i automate hadoop installation with salt
01:59 Vijay_ i am stuck at supplying the master hostname to datanodes
01:59 Vijay_ and adding datanode names dynamicaaly to master's config
02:00 Vijay_ also how this can be achived with AWS by using salt-cloud
02:04 jnials joined #salt
02:04 mrj joined #salt
02:05 Joseph_ joined #salt
02:05 Joseph_ has anyone got the archive state module to work http://salt.readthedocs.org/en/v2014.1.1/ref/states/all/salt.states.archive.html#module-salt.states.archive
02:06 mrj joined #salt
02:06 n8n joined #salt
02:07 Vijay_ Joseph - yes it works for me
02:08 Joseph_ here's my state https://gist.github.com/jaloren/0c8d45f50ee865f0de9d
02:08 Joseph_ whenever i do a highstate run, it just says the "directory already exists" and that it completed successfully but nothing is untarred on the minion
02:08 jnials joined #salt
02:09 Vijay_ i could not see yout state
02:09 Vijay_ and i guess u r monitoring the directory using if_missing option
02:09 Vijay_ u can specify a file inside it
02:09 Vijay_ to minotor
02:09 Joseph_ try this https://gist.github.com/jaloren/33212edbcea70dffebc0
02:09 Joseph_ i have omitted that option
02:11 Vijay_ oh, but still it thinks that tgz is already extracted to the directory, u got to remove it or use if_missing
02:11 mateoconfeugo joined #salt
02:12 Joseph_ actually that's the werid thing
02:12 Vijay_ as idempotent rule, target directory already exists , so i wint untar
02:12 Joseph_ the directory is completely empty
02:12 Vijay_ *wont
02:12 Joseph_ well okay but this is where i am confused
02:12 Joseph_ i tried it when the directory did not exist
02:12 Joseph_ and then it blows up
02:12 Vijay_ right, but for salt its directory and exists as per your config
02:13 Vijay_ u mean if u remove the dir, it extracts ?
02:13 Vijay_ salt will not check if dir is empty
02:13 Vijay_ unless u specify it
02:13 Joseph_ but if its empty why won't it just extract the tar into the directroy?
02:14 Vijay_ salt is not aware its empty, it looks at dir level
02:15 Joseph_ so if the tarball actually contains a directory inside of it, i need to expliciltly tell salt about this with the the missing option?
02:16 Vijay_ yes and no, your state is looking at upper leve
02:16 Vijay_ l
02:16 Vijay_ its thinking that u already have a directory when it needs to be untarred
02:16 Vijay_ so it will not replace that directory
02:18 Joseph_ so lets say i have tarball foobar.tar and the minion has a directory /tmp
02:18 Joseph_ and i want to untar foobar.tar in directory /tmp
02:19 Joseph_ so i set the source to the salt file server
02:19 Joseph_ and the name to /tmp
02:19 Joseph_ why is anythiong more needed?
02:20 Vijay_ is it not working for first run too ?
02:22 Joseph_ it says it succeeds but nothing is untarred
02:22 Vijay_ when u ran it first time, it didn't work ?
02:23 Joseph_ correct....the salt master returned a success status but nothing was actually untarred on the minion
02:24 Vijay_ try setting source_hase: None
02:24 Shenril joined #salt
02:24 Vijay_ source_hash: None
02:25 Joseph_ okay
02:28 Joseph_ Command 'tar --version | grep bsdtar' failed with return code: 1
02:29 Vijay_ r u able to untar it manually ?
02:30 Joseph_ yep
02:30 war2 joined #salt
02:30 Joseph_ if i use the  is missing option then it works
02:30 Joseph_ on an unrelated note
02:31 Joseph_ i am getting driven insane by a salt minion timeout issue
02:31 Joseph_ [INFO    ] jid 20140506213016807308 minions set(['ic-hadoop22.ic.intel.com']) did not return in time
02:31 jnials joined #salt
02:36 Vijay_ hadoop121:   archive:     - extracted     - name: /opt     - source: salt://hadoop-1.2.1.tar.gz     - source_hash: None     - archive_format: tar     - tar_options: z     - if_missing: /opt/hadoop-1.2.1
02:36 Vijay_ i am using this
02:36 Vijay_ and works for me
02:43 Vijay_ can soemone help me with hadopp automated installation through salt
02:55 jnials joined #salt
02:55 nosleep77 joined #salt
02:56 ipalreadytaken joined #salt
02:58 jnials joined #salt
03:00 ipalreadytaken joined #salt
03:00 malinoff joined #salt
03:06 jnials joined #salt
03:06 ipalreadytaken joined #salt
03:09 jnials joined #salt
03:10 Comradephate joined #salt
03:13 ml_1 joined #salt
03:22 bl4sphemy joined #salt
03:23 jnials joined #salt
03:27 georgemarshall joined #salt
03:31 robawt joined #salt
03:32 pixelgremlins joined #salt
03:33 echos left #salt
03:42 wedgie left #salt
03:44 jnials joined #salt
03:47 jnials joined #salt
03:49 catpigger joined #salt
03:55 joehoyle joined #salt
03:59 mgw joined #salt
04:01 n8n joined #salt
04:04 sgviking joined #salt
04:04 ckao joined #salt
04:06 jnials joined #salt
04:07 jnials joined #salt
04:09 ipalreadytaken joined #salt
04:09 kermit joined #salt
04:12 mizukage joined #salt
04:16 l0x3py joined #salt
04:19 pixelgremlins left #salt
04:20 ajw0100 joined #salt
04:22 arthabaska joined #salt
04:22 Ryan_Lane joined #salt
04:36 ravibhure joined #salt
04:37 war2 joined #salt
04:48 Ryan_Lane joined #salt
04:49 epcim joined #salt
04:52 jdog joined #salt
04:54 spidermo joined #salt
04:55 spidermo Hello, anyone care to assist a noob with a KeyError with salt-call?
05:00 anuvrat joined #salt
05:01 robawt joined #salt
05:02 __number5__ spidermo: pastebin your error log?
05:03 spidermo Ok, give me a minute.
05:06 spidermo Here it is: http://pastebin.com/jYTx2eWL
05:07 spidermo Here is the versions report if that helps as well:
05:07 spidermo Salt: 2014.1.3          Python: 2.7.3 (default, Feb 27 2014, 19:58:35)          Jinja2: 2.6        M2Crypto: 0.21.1  msgpack-python: 0.1.10    msgpack-pure: Not Installed        pycrypto: 2.4.1          PyYAML: 3.10           PyZMQ: 13.0.0             ZMQ: 3.2.2
05:08 manfred spidermo: do you have precise64 file_roots configured ? http://docs.saltstack.com/en/latest/ref/states/top.html
05:10 spidermo I did not, trying it now.
05:10 spidermo It did appear to read the top.sls just fine though
05:11 manfred looks like it just didn't match an environment named precise64
05:13 spidermo Much thanks, that appears to have gotten me past that error.
05:14 lz-dylan joined #salt
05:14 manfred yw
05:15 lz-dylan howdy folks
05:30 bones050 joined #salt
05:33 n8n joined #salt
05:35 jnials joined #salt
05:37 mgarfias i'm trying to use a state in my 'base' env in a 'dev' env and it just seems to be ignored.  Is this even possible?
05:37 dmick left #salt
05:40 picker joined #salt
05:41 tr_h joined #salt
05:46 CeBe joined #salt
05:55 arthabaska joined #salt
05:55 travisfischer joined #salt
05:57 Etch joined #salt
06:06 smaboshe joined #salt
06:11 fragamus joined #salt
06:11 n8n joined #salt
06:12 mgw joined #salt
06:15 Daemonik joined #salt
06:18 Daemonik IRC topic displays "2014.1.3 is the latest" but isn't 2014.1.4 out?
06:22 uestra joined #salt
06:29 briner joined #salt
06:29 feiming joined #salt
06:30 ravibhure joined #salt
06:30 feiming Hi guys, I had created a moosefs-formula and would like to include it in to the salt-formula list
06:30 feiming https://github.com/feiming/moosefs-formula
06:30 schimmy joined #salt
06:34 schimmy1 joined #salt
06:35 Etch joined #salt
06:43 Daemonik joined #salt
06:44 ipalreadytaken joined #salt
06:49 hhenkel Daemonik: Yes, I would say so - irc topic and release notes were late the past releases....
06:50 briner how can I use different sls for different os ? I try mixing in <salt_base>/email-smarthost/init.sls to get an include different by using jinja with grains but without success. Could someone point me to the right direction. In my case, I wish to use two different sls, as for debian I do use exim, and with redhat I'll use postfix
06:52 ghartz briner, did you look at this ? http://docs.saltstack.com/en/latest/topics/tutorials/states_pt3.html#using-grains-in-sls-modules
06:56 briner ghartz, I tried really hard. I'm just not understanding the error that I get,
06:56 ghartz which is ?
06:56 toastedpenguin joined #salt
06:57 briner which seems really outside of the scope : lunidebrepos1.unige.ch:
06:57 briner Data failed to compile:
06:57 briner ----------
06:57 briner No matching sls found for 'email_smarthost' in env 'base'
06:57 ipalreadytaken joined #salt
06:58 ghartz paste your sls
06:59 briner ohhh I finally get
06:59 briner it
06:59 ghartz ok :)
07:01 briner extra question. Is there a way to write module with the path in relatif
07:03 briner I mean, inside a module, when you use salt:// or that you use include you have to give the full path. Can it be relatif.
07:04 ml_1 joined #salt
07:05 ghartz no idea
07:05 ghartz it should be ok but never tested
07:06 sfello joined #salt
07:06 briner I was unable to create an relative module.
07:07 briner I think somehow, salt should behave the same way as .py works for python
07:14 Kenzor joined #salt
07:16 harobed_ joined #salt
07:18 TamCore Any ideas why {% set users = sudoers.get('somehost.my.net', {}) %} gives the expected result, but {% set users = sudoers.get(minion_id, {}) %} not?
07:23 joehoyle joined #salt
07:25 anuvrat joined #salt
07:29 ajw0100 joined #salt
07:36 martoss joined #salt
07:38 martoss1 joined #salt
07:47 MrTango joined #salt
07:47 bram_ joined #salt
07:55 topochan joined #salt
08:00 lz-dylan joined #salt
08:19 zsoftich1 joined #salt
08:25 topochan joined #salt
08:29 Doqnach joined #salt
08:30 malinoff joined #salt
08:45 nocturn joined #salt
08:49 selenite29 joined #salt
08:58 briner I try to use smtp.send_msg. But it says that the in for version hellium. But aren't we in hydrogen: "salt 2014.1.1"
08:59 briner I'm a bit unsure !
08:59 giantlock joined #salt
09:00 uestra joined #salt
09:11 superted joined #salt
09:13 dpac|away joined #salt
09:14 topochan joined #salt
09:14 che-arne joined #salt
09:23 gtmtech joined #salt
09:26 N-Mi joined #salt
09:26 N-Mi joined #salt
09:27 LordOfLA joined #salt
09:32 bhosmer joined #salt
09:32 LordOfLA joined #salt
09:49 selenite29 briner: from what I know, yes we are (http://docs.saltstack.com/en/latest/topics/releases/)
09:50 selenite29 briner: does the error message tell you that is for hellium version only ?
09:52 selenite29 briner: because smtp.send_msg isn't depecrated in the doc
10:03 faldridge joined #salt
10:14 Corey joined #salt
10:19 hhenkel Hi all, any hint how I could test my state files before checking them into git?
10:19 viq hhenkel: vagrant?
10:19 hhenkel Therefore, is there a way to test a single sls file?
10:19 viq state.sls your_state
10:20 viq hhenkel: also https://github.com/simonmcc/kitchen-salt
10:20 hhenkel viq: Which state file is used then, I would guess the one available in git, right?
10:20 viq hhenkel: not if you're running this in vagrant against your local files on disk
10:21 viq Or if all you need is linux it will be much quicker to test in docker/lxc
10:22 hhenkel viq: docker/lxc might be an option
10:22 simonmcc Viq hhenkel test-kitchen can use lxc instead of vagrant/virtualbox
10:22 viq simonmcc: yeah, I saw in description
10:23 hhenkel simonmcc: Currently reading the introduction...I'm running fedora as a desktop with salt on sles... :(
10:23 topochan joined #salt
10:24 simonmcc hhenkel: none of that should stop you from using test-kitchen :)
10:24 hhenkel We're planning to build a new env, then with tests via jenkins and so on. Currently we're starting to manage the legacy env with salt.
10:25 simonmcc Set sles as you platform in .kitchen.yml :)
10:25 hhenkel I will give it a try, that's for sure.
10:25 viq simonmcc: would kitchen be able to run some tests in lxc and some in full blown virtualbox?
10:25 simonmcc We have test-kitchen running as a gating job on gerrit commits, via Jenkins, I should really write that up
10:25 hhenkel simonmcc: You're in a european time zone (just in case)?
10:26 viq simonmcc: seeing as some of our boxes are freebsd and openbsd, so lxc is not an option there
10:26 simonmcc hhenkel: yeah, in Europe, on my phone at the moment, should be back at my desk in 60min
10:27 hhenkel simonmcc: okay, I find it quite hard to reach out to some people here in the channel as it seems like a lot of people are in the us
10:27 simonmcc Test-kitchen can also use remote compute resource, aws, openstack etc
10:27 N-Mi joined #salt
10:27 N-Mi joined #salt
10:28 simonmcc You can override the compute resource using .kitchen.local.yml, so on dev workstations we use vagrant/virtualbox, Jenkins overrides this to use vagrant/lxc
10:31 viq simonmcc: is the override global, or can you do this per OS to test on?
10:32 linjan joined #salt
10:34 bhosmer joined #salt
10:37 elfixit joined #salt
10:42 hhenkel viq: Just to get an idea...can you describe how you develop salt states with git?
10:44 viq hhenkel: if I want to test before commiting, I set up some machines with vagrant, use provisioning to set up salt there, mount the local checkout there, and apply the states there seeing if they do what I want. If they do, I commit and push.
10:46 hhenkel viq: okay, thanks. You don't create a new branch then for development?
10:47 harobed joined #salt
10:47 viq hhenkel: sometimes I do, sometimes I don't. I'm a beginner in git-land
10:47 hhenkel viq: okay, thanks again.
10:48 viq hhenkel: I guess it also depends how big changes I am making, and do I care about tracking my current work, and do I expect to need to push before I'm done with this
10:48 gildegoma joined #salt
10:51 harobed joined #salt
10:51 jeddi joined #salt
10:51 harobed joined #salt
10:53 harobed joined #salt
10:54 harobed joined #salt
10:55 harobed joined #salt
10:56 harobed joined #salt
10:57 harobed joined #salt
10:58 harobed joined #salt
10:58 DelPede joined #salt
10:58 harobed joined #salt
10:59 Luke joined #salt
10:59 diegows joined #salt
10:59 harobed joined #salt
11:00 viq oh, shame https://github.com/lincolnloop/salmon is not maintained anymore, it looked interesting
11:00 viq I wonder what are they doing now instead
11:00 harobed joined #salt
11:07 bhosmer joined #salt
11:10 sroegner joined #salt
11:11 babilen I have to populate known_hosts on one minion with fingerprints from other minions -- What are sensible ways to get hold of this information and implementing this?
11:12 babilen Something in the back of my brain whispers "salt mine", but I am not sure if that is even a remotely applicable idea here
11:14 viq Either mine or publish interface
11:14 babilen publish interface?
11:14 viq http://docs.saltstack.com/en/latest/ref/peer.html
11:15 babilen I am also not sure how I would implement the state on one minion if I have to have finished provisioning the others before I have access to that information
11:15 viq mine allows you to store the stuff and use the cache. publish allows you to query it live
11:16 babilen Well, all I want to say is: add all fingerprints for all other minions to root's known_hosts ... the *other* minions therefore have to be available and if I install more their respective information has to be added too
11:17 babilen reactor + {mine,peer communication} ?
11:17 viq Or periodic highstate, or state.sls ssh_keys or whatever
11:17 babilen I really have to spend some time reading the salt docs cover to cover :)
11:17 viq http://docs.saltstack.com/en/latest/topics/jobs/schedule.html
11:18 kyr0_ joined #salt
11:18 kyr0_ joined #salt
11:19 viq So yeah, you can do it via reactor if you want it *now* (though not 100% sure it will be available right then if you were to get stuff via mine), or periodic if you're fine with "yeah, let's make sure every 5/15/whatever minutes that we have everything"
11:20 ninkotech_ guys, i am now working on library which uses kind of gossip protocol  (udp+tcp, msgpack, encrypted) for communication and keeping info about cloud state. would that be interesting for you as method of communication between minions and master?   it might come handy when you have >>hundreds machines.
11:20 viq Or, you know, both, to have it updated *now* when machine joins, but eg have it automatically kept up to date when machines are removed or come back up again or whatever
11:21 viq ninkotech_: I believe current zmq recommendation is to keep at most around 9-10k minions per master ;)
11:21 viq ninkotech_: but I have no idea, I don't know enough about insides of the project
11:22 babilen viq: It is a requirement of a service (lsyncd) that runs on the "master" and needs that information from the "slaves" -- Essentially I have to express "Add my fingerprint to known_hosts on master and the lsyncd config there and restart that service"
11:22 ninkotech_ viq: i know zmq a bit. but i decided to not use it for this. udp beats zmq fairly well :D
11:23 ninkotech_ viq: problem is, that master can get into problems and you are out of control
11:23 viq ninkotech_: there's a new protocol in the works, RAET if my memory serves. I _think_ it's UDP-based, but would have to look it up
11:23 ninkotech_ p2p communication, using viral methods, is very good to stay available
11:23 ninkotech_ viq: i will need to check that up.
11:24 viq ninkotech_: also AFAIK they're trying to make the transport pluggable, so integrating your idea should be made easier
11:24 ninkotech_ if salt transport will be pluggable, i will try hard to make it reality
11:25 ninkotech_ https://github.com/saltstack/raet ?
11:25 viq ninkotech_: probably, I haven't looked at it
11:26 ninkotech_ looks interesting... solves similar problems that i do
11:26 viq ninkotech_: also http://salt.readthedocs.org/en/latest/search.html?q=raet&amp;check_keywords=yes&amp;area=default
11:26 ninkotech_ viq: thanks for tips
11:27 viq babilen: with reactor there's one quirk as far as I'm aware - there's no way to distinguish between "a node connected" and "a node connected _for the first time_" - though with states and mine/publish it shouldn't be that much of an issue
11:28 viq babilen: kinda depends, do you want to have a cached state of everything on your network, or do you want a list of machines available _now_, as if they aren't available then what's the point of connecting to them anyway
11:29 babilen the latter
11:30 viq Then that sounds like a case for publish interface. Now the question if you're going to run it from reactor, schedule, or both
11:30 viq I guess I'd opt for both or schedule
11:30 babilen Well, I have my fleet of slaves and data should be rsynced to them ... I therefore need to be able to log into them (rsync transport is SSH) and the lsync configuration must reflect the current state
11:30 * viq nods
11:30 viq why not file.recurse though?
11:31 ninkotech_ viq: btw 10k nodes is problem for every technology :)
11:31 viq ninkotech_: you're welcome, glad to be able to help :)
11:31 viq ninkotech_: yeah :P Though I heard that chef recommends up to 20k per master
11:31 ninkotech_ most stuff will get into problems when you have 10k connections
11:32 viq babilen: oh, nevermind, I see - "notice changes and push them out".
11:32 babilen viq: I waited for that question -- Well, the reasons for that are: 1. I am simply implementing existing solutions in salt 2. Customers can't be given access to our salt infrastructure at the moment
11:32 * viq nods
11:32 ninkotech_ viq: my gossiping girls just make some friends and talk to just few of them every iteration.... yet they all know eveyrthing soon.
11:33 ninkotech_ no need to 10k connections, 1-5 are enough
11:33 viq ninkotech_: I think I heard about a protocol like that recenty-ish... dunno if it was zookeper, etcd or something literally called gossip
11:34 babilen viq: I would have opted for file.recurse if I had to implement the deployment in salt as well. We do, however, not do that at the moment and our customer just pushes data to the master :)
11:35 ninkotech_ viq:  what i do is similar to this: http://www.serfdom.io/docs/internals/simulator.html
11:35 viq ninkotech_: ...over TOR/i2p, and you have a nice botnet ;)
11:35 viq babilen: if they had stuff in git you could do commit-hooks ;)
11:36 ninkotech_ viq: right. even american army is using this style of communication
11:36 ninkotech_ (for bots in the field)
11:36 darrend joined #salt
11:36 viq interesting
11:36 ninkotech_ power of the propaganda!
11:36 ninkotech_ :D
11:36 viq I guess the initial authentication can be a bit of an issue...
11:37 ninkotech_ yea, thats why i have good crypto, keys for every node etc
11:37 ninkotech_ not shared key like serfdom.... grr
11:38 ninkotech_ anyway, i dont have it ready for prime time yet... :)  it will take some time
11:40 ninkotech_ i will come back in 1-2 months
11:42 sfello joined #salt
11:54 feiming joined #salt
12:01 uestra joined #salt
12:06 to_json joined #salt
12:09 bastion1704 joined #salt
12:14 jeddi joined #salt
12:15 Kumar joined #salt
12:15 Kumar Hi
12:15 Kumar salt mine is working from command line
12:15 tessellare joined #salt
12:15 Kumar but fails from jinja template through sls file
12:16 Kumar root@myserver1:/srv/salt# salt rhserver1 mine.get \* grains.item rhserver1:     ----------     rhserver1:         ----------         fqdn:             rhserver1         roles:             - hadoopmaster root@myserver1:/srv/salt#
12:16 Kumar root@myserver1:/srv/salt# cat minetst.sls /tmp/mydbhosts:   file:     - managed     - source: salt://myhosts2     - template: jinja root@myserver1:/srv/salt#
12:16 Kumar root@myserver1:/srv/salt# cat myhosts2 {% for fqdn in salt['mine.get']('roles=hadoopmaster', 'fqdn', expr_form='grain').items() %} {% endfor %} root@myserver1:/srv/salt#
12:17 Kumar please help mw how can i get it working through sls using jinja template
12:17 Kumar pls
12:17 malinoff joined #salt
12:18 Kumar root@myserver1:/srv/salt# salt --version salt 2014.1.3 root@myserver1:/srv/salt#
12:20 feiming joined #salt
12:24 harobed_ joined #salt
12:24 topochan joined #salt
12:27 miqui joined #salt
12:31 chenrano2002 joined #salt
12:36 jslatts joined #salt
12:37 jslatts left #salt
12:37 jslatts joined #salt
12:40 History_Hound joined #salt
12:41 Nerz joined #salt
12:42 Nerz hey all got a quick question say i had a set of exectuables i wanted to rapidly integrate into a salt repo. As these all have differing parameter inputs for installing any ideas how i could automate this?
12:44 babilen Nerz: What do you mean by "integrate" ? What do you want to do with them?
12:44 selenite29 joined #salt
12:44 Nerz install them across a group of VMs i have
12:44 Nerz using the salt minion
12:44 babilen Nerz: Install == copy to specific directories?
12:45 dmorrow joined #salt
12:46 Nerz maybe this is my total ignorance but installing a package and copying it to a directory are two different things
12:46 Nerz and it seems my first question was vauge
12:47 Nerz say i have an exe that requires a few yes no accept EULA
12:47 babilen Nerz: You used "executables" before which, to me, implied "file" -- Could you provide a little more detail?
12:48 Nerz so an msi has a defined standard which salt loves and can install these msi's to my target box
12:48 babilen Are you installing software on a specific operating system? (e.g. Windows or Linux) -- How is that software made available to you and what do you want to automate with salt?
12:48 babilen Ah, windows then
12:48 Nerz thanks for the patience babilen
12:48 Nerz yeah windows
12:48 jaycedars joined #salt
12:49 feiming joined #salt
12:49 babilen I know almost nothing about Windows, but go on - others would probably need that information too.
12:49 Nerz exe's require alot more config in salt
12:50 Nerz what i am looking for is a tool that can automatically spin up an exe you click through and will give you the command line parameters to install this without the user input
12:50 ipmb joined #salt
12:50 Nerz yeah i lived for unix too so this is a major learning process for me
12:51 babilen Well, unsurprisingly I am not aware of such a tool. Say you were to found that tool that tells you "your click on button 3 translates to
12:52 babilen "--some-option-set" .. would you then be able to automate the installation? Or am I misunderstanding the "will give you the command line parameters to install this without the user input" ?
12:52 babilen Are you sure that such a mapping is always possible?
12:53 Nerz i am certain such mapping for all is impossible
12:53 malinoff joined #salt
12:53 babilen ##windows might know about such a tool if it exists
12:53 dstanek02 joined #salt
12:53 Nerz well i thought this would be a good place to start
12:53 * babilen was under the impression that salt offered some kind of tacked-on package management system for windows too
12:53 Nerz yeah it has http://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html
12:54 babilen Nerz: Sure, I am just the wrong person to talk to about this particular problem. Sorry - I'll remain quiet now :)
12:54 babilen And you can't integrate your software with that system?
12:55 babilen Or is that exactly what you are trying to do?
12:55 babilen And you just don't know what to set as "install_flags" ?
12:55 Nerz no problem thanks. Its not about i cant, i am looking for the appropraite tool to take large amounts of exe's and only once have an appropriate installation flags to be used on my group of VM's
12:56 bram_ joined #salt
12:58 Nerz they have a set of sls on here https://github.com/saltstack/salt-winrepo
12:59 babilen yes, exactly
12:59 Nerz i was wondering if there was a tool that could take an exe and porduce me the flags i could pump into that sls
12:59 dmorrow Hello everyone, I was wondering could someone answer the following question relating to managed files and jinja, it seems in all examples I have seen the jinja file needs to be passed to the minion via the source: salt:// syntax, is it possible to have a jinja template on a target minon already and then run the jinja template against it ? My use case is , that we would like to bundle jinja templates in our software, that will be bundled in
12:59 dmorrow a zip , the step of installation is that the release is extract ( containing the jinjas too) then turn the jinja files into their real files using the pillar data. I hope my question is clear and would be most appreciative for any direction.
12:59 babilen Nerz: No idea, I'd recommend ##windows too ... sorry :(
13:00 Nerz no problem cheers babilen
13:01 babilen Nerz: But at least you now have a much better question for #salt: "Is there a way to (semi-)automatically generate SLS files for not yet packaged software in the way it is done in salt-winrepo? I have $NUMBER of EXE files that have to be called with ...."
13:02 jslatts dmorrow: you could probably write a custom state to do that
13:03 mik3 what should i do to handle dependencies on apt/yum based systems when installing a .deb or .rpm from salt://? specify all the depdencies in the state??
13:03 Kumar anyone about my salt mine issue ?
13:05 babilen mik3: You could either do that and require those in the state to install the package, setup a proper local repository for that software or unconditinally call "apt-get -f install" as command after installing a .deb ... My recommendation would be to create a proper repository and to configure that with http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html
13:05 babilen mik3: For Debian you probably want to use reprepro or, if that is overkill for you you, dpkg-scanpackages or any other suitable tool listed on https://wiki.debian.org/HowToSetupADebianRepository
13:06 babilen mik3: I would consider the "apt-get -f install" call a hack and my recommendation would be to go down the "local repo" route.
13:08 faldridge joined #salt
13:08 mik3 a local repo could probably result in more unresolved deps correct?
13:09 babilen mik3: You naturally would have to make all dependencies that aren't in the standard repositories available in your local one too. This does not differ from the way you'd install software manually at all.
13:10 mik3 that seems like a lot of work to satisfy deps for one package
13:10 babilen I should maybe point out that I assume that you have your Linux systems configured to be able to properly install packages from their respective standard repositories
13:10 mik3 of course
13:10 babilen mik3: Are those dependencies not in the normal repositories?
13:11 mik3 they are, it's just not installing them
13:11 babilen What is "it" ?
13:11 babilen pkg.installed installs dependencies
13:11 mik3 it's an amanda-backup-server .deb and it requires xinetd, not exotic at all
13:11 mik3 this didn't install deps
13:12 babilen "this" ? How are you installing amanda-backup-server now?
13:12 mik3 from local repo, salt://amanda/thefilename.deb
13:12 zirpubolci joined #salt
13:12 babilen mik3: Mind pasting the entire state?
13:13 mik3 sure just a second
13:13 rojem joined #salt
13:15 briner hello, how do we do to manage a file with one or two lines of it with values depending of grains['fqdn']
13:15 mik3 babilen: http://pastebin.mozilla.org/5091443
13:16 briner I've done some stuff, it kinda works but at each time, it pushes the original files, and thin apply twice a file.sed.
13:16 babilen mik3: ah, thank you!
13:16 mik3 sure
13:16 briner and as if the file change I send an email, i found myself at sending email at each occurence of this state
13:17 briner I try to put in the file that I copied in the minion, some jinja commands, but that fails !
13:18 babilen mik3: I haven't used that before and assume that salt is in a way buggy here in that it only calls "dpkg -i salt://amanda/amanda-backup-server_3.3.5-1Ubuntu1304_amd64.deb" and does nothing about dependencies
13:18 sfello joined #salt
13:19 ndrei joined #salt
13:19 mik3 babilen: yeah it doesn't seem like i'm asking it to perform magic...kind of surprised it doesn't handle this well
13:19 babilen mik3: In this particular case it is probably easiest to just have a "xinetd: pkg.installed" state in that SLS and then "require: - pkg: xinetd" in your amanda-backup-server state
13:19 mik3 ok, thanks for confirming
13:19 briner Should I use file.acumulator
13:19 briner ??
13:20 Networkn3rd joined #salt
13:20 babilen mik3: Keep in mind that dpkg is not concerned with dependency resolution at all as that functionality is provided by apt. The latter operates on repositories and not on single .deb files.
13:20 mik3 babilen: ahh ok, makes sense
13:21 babilen mik3: If you were in a position that you end up with a lot of custom/third-party .deb files that all have to be installed I would recommend to go down the "local debian repository" route as that would allow salt to actually use the aptpkg functionality which, unsurprisingly, used apt and not dpkg and would therefore handle dependencies well.
13:22 babilen mik3: Can't comment on the rpm world there
13:24 babilen mik3: I would also like to point out that amanda-server is packages in Debian (amanda-client / amanda-server) and also in Ubuntu (e.g. http://packages.ubuntu.com/trusty/amanda-server )
13:24 babilen *packaged
13:24 mik3 yeah the amanda-server package on ubuntu is maintained strangely
13:24 mik3 s/maintained/packaged/
13:24 babilen mik3: How so?
13:25 briner Oh, I see that I should use the option template in file.managed
13:25 babilen mik3: Maybe a bug report against the package in Debian would be good so that you can use the default/standard packages in the future?
13:25 saltygmo joined #salt
13:26 mik3 it deviates from the way the official amanda server/client .deb .rpms and yum-based packages are packed, like the user/templated file layout etc, mostly/all cosmetic differences
13:26 babilen briner: yeah, you want to use a jinja template and refer to grains['fqdn'] in there.
13:27 mik3 babilen: it's all cosmetic, nothing buggy perse, i did originally build an amanda state using only apt/yum based packages
13:27 mik3 it was workign fine i guess but i ran into issues getting it all uniform with a state
13:27 mik3 so decided to use official .debs and .rpms
13:27 babilen mik3: Okay, just wanted to be thorough and had the impression as if you would happily use the standard package *iff* some issues were fixed. I am not the amanda maintainer and cannot judge if their decisions have merit or if it would make sense to use a more "standard" configuration.
13:28 mik3 babilen: i'm open to both methods, but doing it with the .deb and .rpm's from zmanda == less work for me/less file states to define
13:28 dstanek joined #salt
13:29 dstanek_zzz joined #salt
13:29 jaimed joined #salt
13:29 dstanek joined #salt
13:30 malinoff joined #salt
13:31 mpoole joined #salt
13:31 racooper joined #salt
13:32 jaimed joined #salt
13:32 alunduil joined #salt
13:34 jeffasinger joined #salt
13:35 Etch joined #salt
13:38 Sypher https://github.com/saltstack-formulas/elasticsearch-logstash-kibana-formula <-- why has this been cloned instead of a fresh repo like all others?
13:38 giantlock joined #salt
13:39 miqui joined #salt
13:42 GorillaSteve joined #salt
13:45 mpanetta joined #salt
13:45 smaboshe left #salt
13:46 GorillaSteve left #salt
13:47 dmorrow_ joined #salt
13:49 joehoyle joined #salt
13:51 dmorrow joined #salt
13:52 faldridge joined #salt
13:55 jrdx joined #salt
13:55 it_dude joined #salt
13:55 kzx joined #salt
13:55 faldridg_ joined #salt
13:58 selenite29 joined #salt
14:01 GradysGhost joined #salt
14:03 joehoyle joined #salt
14:03 it_dude joined #salt
14:03 feiming joined #salt
14:10 jnials joined #salt
14:10 ajprog_laptop joined #salt
14:11 chenrano2002 joined #salt
14:14 sfello joined #salt
14:17 thedodd joined #salt
14:18 kaptk2 joined #salt
14:21 theo-slc joined #salt
14:21 nicker joined #salt
14:22 nicker hello
14:23 Teknix joined #salt
14:23 nicker some problem in configuring salt, somebody can helo
14:23 nicker some problem in configuring salt, somebody can help
14:24 tedski welcome, nicker.  if you ask a question regarding your problem, people are sure to help.  it might take a while for someone to see your question and answer, but help is nearly certain.
14:27 irctc491 joined #salt
14:28 irctc491 Question on env_present for PATH
14:28 irctc491 My salt state is PATH:   cron.env_present:     - value: '/usr/local/bin/sox:/usr/bin/sox'
14:28 gothix joined #salt
14:28 gothix joined #salt
14:29 irctc491 on highstate the follow error : State cron.env_present found in sls crons is unavailable
14:29 tedski 2014.1.x?
14:30 tedski irctc491: which version of salt?
14:30 irctc491 0.17.0
14:31 quickdry21 joined #salt
14:31 tedski 0.17.0 didn't have an env_present method in the cron state
14:31 tedski present, absent, and file are your only options
14:31 briner babilen, yep, I found the way to do it... and as usual with salt, it just works !
14:31 jeremyBass1 joined #salt
14:32 irctc491 Okay thank you
14:32 babilen briner: hmm?
14:32 babilen What did you end up doing?
14:32 RandalSchwartz left #salt
14:32 tedski irctc491: no prob.. see here for docs: https://salt.readthedocs.org/en/v0.17.0/ref/states/all/salt.states.cron.html?highlight=states.cron
14:32 briner using file.managed, with template = jinja and source = salt://...
14:33 babilen irctc491: Maybe upgrading to the current salt version would be an option?
14:33 tedski irctc491: yeah, like babilen recommended, env_present is available in 2014.1
14:33 babilen briner: Yeah, exactly :) -- Reading http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html helped me with writing states like that
14:34 briner babilen, I'll take a look
14:37 irctc491 Trying to use file
14:38 bhosmer joined #salt
14:39 * babilen reads https://github.com/saltstack/salt/pull/12544
14:39 babilen basepi: I managed to find it myself this time ^^^ ;)
14:40 basepi =)
14:42 war2 joined #salt
14:43 obimod joined #salt
14:43 rushm0r3 joined #salt
14:47 jalbretsen joined #salt
14:51 topochan joined #salt
14:52 opapo joined #salt
14:52 mrj joined #salt
14:55 simonmcc anybody here heading to OpenStack Summit in ATL next week?
14:56 lz-dylan joined #salt
14:58 dstanek simonmcc: i'll be there!
14:59 epcim_ joined #salt
15:01 it_dude joined #salt
15:02 chenrano2002 joined #salt
15:02 mateoconfeugo joined #salt
15:05 mateoconfeugo joined #salt
15:07 fragamus joined #salt
15:07 simonmcc dstanek: cool! I didn’t see much salt stuff on the schedule, heard of any other salt related stuff going on?
15:09 dstanek simonmcc: no, but a bof/openspace type thing may be nice
15:09 opapo joined #salt
15:09 dstanek biggest issue is that the calendar is really full including nights
15:10 wendall911 joined #salt
15:10 dstanek simonmcc: i'd love to network with more salt people though - right now EWDurbin is the only person i know really using salt
15:10 jnials joined #salt
15:11 simonmcc I’ll be in ATL from Sat evening to Thu evening, bound to be a gap in there somewhere :)
15:13 jrizzo joined #salt
15:14 stevednd basepi: no one could help me yesterday, maybe you can. I wrote a custom state module that should only be called when another state has changes. So I added a watch statement, but it's being called every time, even when the other state is 'Clean'. Do I have to do something special to my state module?
15:19 travisfischer joined #salt
15:22 CeBe joined #salt
15:23 obimod_ joined #salt
15:24 theo-slc What is the state to make sure a file/directory DOES NOT exist?
15:25 timoguin file.missing
15:25 jeffasinger file.absent
15:25 Kenzor http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.absent
15:25 Kenzor absent
15:25 theo-slc yep. thanks
15:25 timoguin well, missing does a boolean check, absent will actually remove it
15:25 babilen stevednd: You want http://docs.saltstack.com/en/latest/ref/states/requisites.html#prereq
15:27 joehoyle joined #salt
15:27 stevednd babilen: prereq means my state module would run before the actual state in question, doesn't it? This would work because my state depends on a file created by the other state
15:28 MTecknology I'm currently ssh'd into 64 servers using terminator to send the same stuff to the servers and having to watch each window for small differences. This is just one of multiple batches that need to be done. Why? Because I need to upgrade the system and upgrade salt and apply patches for salt to run correctly. What is this teaching me? It's teaching me how much I love it when salt works nice and
15:28 MTecknology perfect.
15:29 joehoyle_ joined #salt
15:29 danielbachhuber joined #salt
15:29 obimod_ hey ya'll, anyone know what i can do to correct this test statement???
15:29 obimod_ [INFO    ] Executing command 'test $(openssl version) = "OpenSSL 1.0.1g 7 Apr 2014"' in directory '/tmp'
15:29 obimod_ [ERROR   ] Command 'test $(openssl version) = "OpenSSL 1.0.1g 7 Apr 2014"' failed with return code: 2
15:29 obimod_ [ERROR   ] output: /bin/bash: line 0: test: too many arguments
15:30 obimod_ figured a 3-liner wasn't worth the pastebin
15:30 obimod_ four, yea, but 3, no
15:30 obimod_ it doesn't work with the quotes around $(openssl version) either
15:31 xmj man test
15:31 timoguin oh snap
15:31 obimod_ i have, it should work
15:31 ajolo joined #salt
15:31 MTecknology no, it shouldn't
15:32 obimod_ really?
15:32 obimod_ aww
15:32 xmj well, wrap it in ""
15:32 MTecknology I want to just give you the answer, but xmj is right, the man page has this one for you
15:32 obimod_ "=" is used to compare two strings..
15:32 obimod_ xmj: it still fails
15:32 obimod_ this was "trying something new" which didn't even work in console so I don't know why I tried it
15:32 xmj lol, what does openssl version actually give?
15:33 obimod_ some 2012 version
15:33 xmj you need to do test "$(openssl version) = ..."
15:33 obimod_ OHHHHH
15:33 xmj as i said, man test. cf EXAMPLES
15:33 MTecknology test "$(openssl version)" == 'OpenSSL 1.0.1e 11 Feb 2013'
15:34 tligda joined #salt
15:34 xmj or that
15:34 obimod_ love you both
15:34 obimod_ <3
15:34 obimod_ in a purely academic way
15:34 obimod_ there's no examples in the man page, for my defense : )
15:35 xmj change your operating system already
15:35 xmj obimod_: http://www.freebsd.org/cgi/man.cgi?test#end
15:35 alunduil joined #salt
15:36 obimod_ lol i wonder how to read time machine backups on ubuntu
15:36 jcockhren obimod_: that actually is possible
15:36 jcockhren time machine backups are based on the apple talk protocol
15:36 teskew joined #salt
15:37 obimod_ joined #salt
15:37 jcockhren so you _could_ b/c a linux directory to time machine
15:37 obimod_ b/c?
15:37 tedski time machine backups are just sparsebundles
15:38 obimod_ oh okay
15:38 obimod_ simple enough
15:38 obimod_ because
15:38 obimod_ b/c = because
15:38 obimod_ it's early
15:39 xmj if b/c is because, then jcockhren doesn't make much sense :p
15:40 jcockhren oh!
15:40 tedski yes, i do believe b/c is intended to be the verb in jcockhren's sentence.
15:40 jcockhren haha
15:40 jcockhren b/c = backup
15:40 timoguin leave jcockhren alone!
15:40 jcockhren haha
15:41 obimod_ [INFO    ] Executing command 'test "$(openssl version)" == \'OpenSSL 1.0.1e 11 Feb 2013\'' in directory '/tmp'
15:41 obimod_ [ERROR   ] Command 'test "$(openssl version)" == \'OpenSSL 1.0.1e 11 Feb 2013\'' failed with return code: 1
15:41 obimod_ [ERROR   ] output:
15:41 premera joined #salt
15:41 obimod_ ooo
15:41 obimod_ : )
15:41 obimod_ haha
15:41 MTecknology use double quotes inside of single quotes
15:42 MTecknology actually... no
15:42 xmj jesus christ lol
15:42 MTecknology It's telling you about the return code. test will return either 0 or 1
15:42 obimod_ ugh time to go to a highschool and tell kids how i love my job to promote stem
15:42 basepi stevednd: mind if i pm you?  you're misunderstanding `watch`, which is a pretty common mistake
15:42 tedski is this #linux now?s
15:42 obimod_ lol
15:43 obimod_ i can't even execute a proper test command and i'm talking to kids... god help them
15:43 tedski obimod_: please teach them the importance of rtfm :)
15:43 xmj tedski: more like, #shell
15:43 stevednd basepi: I just figured it out, I made my main method just a blank dummy, and implemented a mod_watch function that does the actual work
15:43 tedski xmj: true.
15:43 xuru joined #salt
15:43 basepi stevednd: awesome!  there's also now an `onchanges` requisite that will do what you were trying to do at first.  but it won't be in until the next feature release
15:43 basepi it's in the develop branch now
15:44 xmj obimod_: test "$(openssl version)" = "foo" ||echo bar
15:44 xmj what does that say?
15:44 stevednd does 'onchanges' apply globally, or is it only for some states?
15:45 babilen stevednd: Ah, sorry -- I thought that "run before state_foo, but only if state_foo has changes" was exactly what you wanted
15:46 obimod_ xmj: totally though I tried that already... it worked
15:46 obimod_ xmj: echo bar? bar..
15:46 xmj kaaaching.
15:47 xmj replace foo with your openssl string and you should be good.
15:47 kaptk2 joined #salt
15:47 xmj meanwhile, salt trolls me. it deliberately tells me a package that is - require:'d isn't installed, while it is.
15:48 obimod_ xmj: ohh cool
15:48 frasergraham joined #salt
15:48 obimod_ xmj: oh right, i knew that, doh!
15:49 obimod_ okay off to teach rtfm
15:49 conan_the_destro joined #salt
15:50 frasergraham joined #salt
15:50 jcockhren rtfm.com has been registered since 1994
15:50 joehillen joined #salt
15:51 xmj one of these days i should reread the BOFH docs
15:53 bl4sphemy joined #salt
15:54 theo-slc can salt easily enforce the key/value pairs in a XML file?
15:55 kermit joined #salt
15:55 meteorfox joined #salt
15:55 xmj how do I tell salt to pull packages from specific repositories?
15:55 xmj i.e. python-pip from EPEL, postgresql91-devel from pgdg91
15:56 Eugene pkg.installed, fromrepo
15:57 Eugene Though keep in mind yum's behaviour when confronted by multiple repos containing the same package name(and what `yum update` will do).
15:57 joehoyle joined #salt
15:57 xmj "magic."
15:58 Eugene It prefers the one with the highest version #, and then the highest release #
15:58 * xmj is really not a big fan of having to deal with multiple thirdparty repos in the first place. it's just wrong design.
15:59 rojem joined #salt
15:59 Eugene Overlay repos are handy, and I find that using includepkgs= limits them to only what you want
16:00 Eugene Though that requires use of file.managed for your yum.repos.d/foo.repo, rather than relying upon salt's pkgrepo.managed(which lacks that feature)
16:00 Eugene Hmmm.... maybe should file a feature request for that
16:00 mgw joined #salt
16:01 joehoyle_ joined #salt
16:01 xmj Eugene: I rather prefer working with OSes where I don't need them.
16:01 chenrano2002 hello, what's the different betwwn  list_nodes and list_nodes_full
16:02 Eugene Something something rolling release
16:02 xmj we're using the file.repo
16:02 xmj er, file.managed. Anyhow
16:02 xmj How do I make my pip.installed part of the state find the - require: - pkg: python pip ?
16:02 malinoff joined #salt
16:03 xmj because, while pip installs successfully, the pip.installed crashes on not being able to find it.
16:03 chenrano2002 salt-cloud -f list_nodes ec2 can return the ec2 instance data. while salt-cloud -f list_nodes_full ec2 return nothing
16:04 darkelda joined #salt
16:04 jcockhren xmj: gist your sls file. I'll help
16:05 manfred curl -F 'f:1=<-' ix.io < /srv/salt/something/whatever.sls
16:05 xmj jcockhren: https://dpaste.de/enbQ/raw
16:06 xmj pip-packages fails, missing python-pip (from python-headers), and postgresql91-devel can't be found for $whatever reason. yum search postgresql91-devel works
16:06 jcockhren xmj: it should be "- require: python-headers"
16:07 jcockhren the value of the 'pkg' in the require is a state ID
16:07 jcockhren not na package name
16:07 jcockhren a*
16:07 manfred xmj: you match on the stateid, or the name if you are in the same state id
16:07 xmj eurgh, i think I tried that too.
16:07 pydanny joined #salt
16:07 jcockhren totally. mistyped that. sorry
16:07 jcockhren " - pkg: python-headers"
16:08 manfred xmj: they name of that pip state anyway is python-headers because you didn't provide a name
16:08 frasergraham joined #salt
16:08 alunduil joined #salt
16:08 bhosmer joined #salt
16:08 manfred xmj: if you used names: instead of pkgs: it could be require: pkg: python-pip, because names splits it into a bunch of different states with that as the name, but you would be running one comand per package
16:08 fragamus joined #salt
16:09 fejjerai joined #salt
16:10 xmj pkgs: doesn't work, failing with Could not find any downloads that satisfy the requirement pip-packages
16:10 rlarkin I have an idea for a key signing service...looking for feedback.  I use master to deploy a dozen minions.   I install salt-master on all the minions.  I deploy a 'key sign' minion configured with all  12 original instances as it's masters.
16:10 joehoyle joined #salt
16:10 xmj so i'll try names.
16:10 vejdmn joined #salt
16:10 manfred xmj: what?
16:10 chenrano2002 left #salt
16:10 rlarkin each minion can us salt 'keysign' cmd.run 'gensig'
16:11 manfred xmj: put pkg: python-headers in that require statement
16:11 xmj hm, i might have confused which pkg you meant
16:11 schimmy joined #salt
16:11 Nerz ....
16:11 manfred because that is the name of the pkg block
16:11 manfred or the stateid of that state
16:12 xmj that i have
16:12 viq Huh. Salt on minion installed and running. Has proper address of master configured. Can telnet to said master on ports 4505 and 4506. Yet minion's key does not appear on salt-key -L and in logs I only see "SaltReqTimeoutError: Waited 60 seconds"
16:12 xmj then i got another error, leading pip to not be able to install pip-packages.
16:13 manfred xmj: paste that state again please
16:13 schimmy1 joined #salt
16:14 piotrc joined #salt
16:14 xmj https://dpaste.de/jqCq/raw
16:14 xmj so it works for devpi and wheel, and for whatever reason supervisord won'tfunction. oddness
16:14 rupsky joined #salt
16:15 KyleG joined #salt
16:15 KyleG1 joined #salt
16:15 manfred oh, then it sounds like supervisord needs something else installed as well, i think allan was going through and there is a supervisord state that does the whole install for you
16:16 xmj actually, nevermind.
16:16 manfred maybe not
16:16 manfred hrm
16:16 xmj the package is called 'supervisor' on cheeseshop. and yes, it does require setuptools too
16:16 manfred ok, cool
16:16 __alex_ hi, i'm using gitfs as state/pillar backend. the task that refreshes the states from git is often gone, it's not fetching new stuff anymore. restart salt-master fixes this. any idea?
16:18 ajolo_ joined #salt
16:18 babilen __alex_: I arrived at the point that I simply restart salt-master before I am doing *anything* that would rely on changed data in gitfs
16:18 xmj ok, i'll outsource my rant about centos' setuptools version (0.6c11) to /dev/null.
16:18 babilen It's ugly, but I prefer that to the fact that I kick of a highstate run and half my minions get new states/data just because the master decided that refreshing data halfway through the run is a good idea (rather than at the beginngin)
16:19 forrest joined #salt
16:19 __alex_ ouch
16:19 babilen __alex_: I would very much prefer a "Make sure GitFS is up-to-date" feature for anything that relies on a GitFS state/pillar
16:19 babilen __alex_: Maybe others have a better idea
16:20 londo__ joined #salt
16:20 viq OK, WTF? Telnet works, and I see it on master in tcpdump, but restarting minion process doesn't generate any traffic
16:20 __alex_ babilen: i regret switching to gitfs
16:21 KyleG joined #salt
16:21 KyleG joined #salt
16:21 babilen __alex_: Apart from that I am very happy with GitFS and a restart of the master doesn't really take that long.
16:21 babilen __alex_: Is there anything else you have problems with?
16:21 viq babilen: you are aware of salt-run fileserver.update ?
16:21 __alex_ babilen: not being updated is one reason, writing new stuff with a edit/commit/push/show_highstate cycle is not nice
16:21 babilen viq: Does that refresh external pillars too?
16:21 viq babilen: yup
16:21 Heartsbane joined #salt
16:21 Heartsbane joined #salt
16:21 viq babilen: it's an "update git"
16:21 babilen viq: Ah, then no .. I wasn't aware of that.
16:22 timoguin __alex_: that's why you use something like vagrant / docker for testing states
16:22 viq Of course you need to tell machines to refresh the pillars... But this updates git on master, including the pillar git
16:22 babilen I thought I would have to trigger salt.modules.saltutil.refresh_pillar() in addition to that
16:22 timoguin because that push, refresh, reapply cycle is a bitch
16:22 xuru left #salt
16:23 __alex_ timoguin: vagrant vm as minion or own master?
16:23 timoguin either or
16:23 * xmj successfully landed in dependency hell.
16:23 timoguin i have a multi-machine setup for testing, as well as masterless
16:24 babilen viq: Ah, okay .. I will change our internal documentation from "service salt-master restart" / "systemctl salt-master restart" to "salt-run fileserver.update" then.
16:24 xmj wow
16:24 babilen viq: I would personally very much prefer a "whenever you hit a state/pillar make sure your git is up-to-date" option in /etc/salt/master or command line flag
16:24 xmj does anyone have some state regarding devpi / wheel / supervisord lying around?
16:25 xmj because.. mine's totally not going ahead, I blame myself.
16:25 __alex_ timoguin, babilen: thanks
16:26 babilen __alex_: I am very used to git in my daily work so I don't really see the "edit, add, commit, push" procedure as overhead.
16:27 viq babilen: feature request time? ;)
16:27 timoguin also, i mount my states/pillars on vagrant vms via the folder sync, so i can edit locally without having to actually push to test
16:27 xmj what's more, i'm stuck in an immense dependency hell.
16:27 joehoyle joined #salt
16:27 __alex_ babilen: same here, but i commit typos sometimes, did i miss a precheck maybe?
16:27 babilen __alex_: In fact I like it that I can use standard git workflows with other people in my team and that we have all the git goodness (from "git blame" over feature branches to "git bisect")
16:28 __alex_ babilen: i think i saw using mongodb as state/pillar backend somewhere
16:28 babilen __alex_: You mean a git commit hook that checks for correct salt syntax?
16:28 babilen __alex_: That's too hipster for us ;)
16:28 __alex_ if i find the time i'll try that, since some admin webpage can modify that data
16:29 viq There's a lot of potential external pillars
16:29 __alex_ babilen: i forgot even to put on my nerd glasses when i mentioned mongo :\
16:30 viq trying to find a list
16:30 viq http://salt.readthedocs.org/en/latest/ref/pillar/all/index.html?highlight=pillar
16:30 babilen __alex_: But a pre-commit hook framework for standard tests would be nice ...
16:31 viq WTF? minion says it's trying to connect to master, but no packets on wire...
16:31 mgw joined #salt
16:31 babilen __alex_: We typically roll out on "throw away VMs" (vagrant, setup clones), before pushing anything in production though
16:31 timoguin you guys should check out kitchen-salt as well. it allows you to automate unit and integration tests
16:32 timoguin fire up vm, apply states, check that everything is in the correct state, pass/fail
16:32 babilen Sounds great
16:32 timoguin it's all ruby, which turns a lot of people off.
16:33 timoguin Test Kitchen was original a Chef testing framework
16:33 babilen ah, yeah
16:33 * babilen is not a ruby person
16:33 timoguin but, still, i think it's pretty nicely put together
16:33 timoguin me neither, but it doesn't skurr me
16:33 babilen I mean one of the big points in the pro columns for salt when we decided to adopt it was "Not Ruby"
16:33 bemehow joined #salt
16:33 cvbge hi, i'm working with custom execution modules. i know they have to return a json-serializable object. however, if by mistake anything else ends up there, i get no feedback in minion logs (debug level). on the master side i get "Minion did not return" as if after timeout. debuggins such modules is difficult and salt-call works fine. do you know anything about it?
16:38 cruatta joined #salt
16:38 rupsky_ joined #salt
16:39 smcquay joined #salt
16:41 sgviking joined #salt
16:41 mikeslat joined #salt
16:42 cruatta joined #salt
16:44 schimmy1 joined #salt
16:44 rojem joined #salt
16:44 KennethWilke joined #salt
16:45 gq45uaethdj26jw6 joined #salt
16:46 KyleG joined #salt
16:46 KyleG joined #salt
16:46 mgw Is there any general interest in an ext_pillar that pulls user and group info from ldap? If so, what should the resulting pillar data look like?
16:48 viq http://salt.readthedocs.org/en/latest/ref/pillar/all/salt.pillar.pillar_ldap.html
16:49 stephas joined #salt
16:50 lz-dylan joined #salt
16:52 joehoyle_ joined #salt
16:53 druonysus joined #salt
16:53 druonysus joined #salt
16:53 [diecast] joined #salt
16:54 epcim joined #salt
16:54 mgw viq: I'm somewhat familiar with that, but does it work well for users and groups?
16:55 mgw If so, are there any state formulae that utilize the resulting data?
16:57 viq mgw: I haven't tried this personally. As for using it, I guess it's just a pillar
16:57 chrisjones joined #salt
16:57 viq And you use pillars the same way, no matter where they come from
16:57 jnials joined #salt
16:57 taterbase joined #salt
16:58 joehoyle joined #salt
16:59 yidhra joined #salt
17:00 mgw viq: yeah, I'll look into it in more detail. I'm hoping for a solution (existing or to be created by me) that simply pulls posixAccount and posixGroup entries and creates the users and groups
17:00 viq huh, even log_leve: trace doesn't show anything useful
17:01 pydanny joined #salt
17:02 ml_1 joined #salt
17:03 viq https://groups.google.com/forum/#!topic/salt-users/gH7DHC0Ck88
17:03 juanlittledevil joined #salt
17:04 juanlittledevil good morning (pst) peeps…. I got a quick question for you guys. about the cron state.
17:04 juanlittledevil how are you guys handling changes to crontab entries?
17:04 forrest joined #salt
17:04 travisfischer joined #salt
17:05 juanlittledevil changing crontab entries in a state end up as new lines in crontab files.
17:05 cruatta just do a file managed on your /etc/cronttab ;)
17:06 juanlittledevil so what's the point of the state then?
17:07 timoguin flexibility to be able to do things lots of different ways.
17:07 juanlittledevil LOL
17:07 timoguin then again if the cron state isn't working as expected there'd be no objections to fixing it
17:08 n8n joined #salt
17:08 timoguin you can also call cmd.run and just echo things into crontab, or throw stuff into /etc/cron.{daily,hourly}
17:09 cvbge viq: where you referring to my log_level problem? i checked trace level too, but the only additional info is "Check main poller timeout 1" which repeats many times
17:09 forrest or just put them in cron.d, because crontabs are dumb.
17:10 cruatta +1 forrest
17:11 cvbge it would be really helpful to have such info at least in logs. i was just wondering if it is possible and if not, if it is worth filing a ticket
17:11 mpanetta_ joined #salt
17:11 viq cvbge: no, I'm refering to my problem where a minion starts, but doesn't generate any traffic towards the master
17:12 cvbge viq: sorry :)
17:12 viq cvbge: no problem ;) I saw your question, but I have never touched custom modules, so no help from me
17:12 juanlittledevil hmmm seems like templating a file.managed might be the most flexible.
17:14 R2D2__ joined #salt
17:14 mpanetta_ joined #salt
17:16 lz-dylan hey there! does anyone know how to call an operation from a formula that doesn't pertain to a specific package?
17:17 lz-dylan I'm basically wondering how to run an apt-get upgrade from within an sls file
17:17 saurabhs joined #salt
17:17 viq lz-dylan: cmd.run or saltutil
17:18 explodes joined #salt
17:18 viq lz-dylan: also, you are aware of refresh=True ?
17:18 lz-dylan @viq: is looking at the apt-formula repo barking up the wrong tree, then?
17:18 viq lz-dylan: what are you trying to do?
17:19 viq http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.pkg.html might be of use
17:20 schmutz joined #salt
17:20 lz-dylan viq: when provisioning a new instance, I want to grab and install upgraded packages from upstream before starting work. just a shortcut to 'new instance; apt-get update; apt-get upgrade; (do smart things)"
17:20 lz-dylan (clicks link)
17:21 viq lz-dylan: when next version comes out you'll have http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.uptodate
17:21 lz-dylan relevantly, I can do this from the CLI but don't know the SLS syntax to run stuff without an associated task/package
17:21 timoguin lz-dylan: at the most basic level, you can use cmd.run without SLS files to shell out
17:21 explodes does anyone here run over 100 miles
17:21 timoguin *within SLS files
17:22 lz-dylan @viq that looks excellent
17:22 explodes maybe does a marathon on a weekend for practice
17:22 viq for now you can use http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.saltmod.html with http://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.upgrade
17:22 kermit joined #salt
17:22 lz-dylan whereupon I reveal how new I am to all this: does salt have scheduled releases or just "when it's ready"?
17:23 timoguin lz-dylan: you should also be able to do pkg.upgrade, which is equivalent to apt-get dist-upgrade
17:23 viq lz-dylan: notice the pkg.uptodate stuff will come with Helium, so next major release - it isn't available yet unless you run from git
17:23 rupsky_ joined #salt
17:23 timoguin afaik there is not direct equivalent to apt-get upgrade
17:23 viq lz-dylan: I believe more of "when it's ready"
17:23 war2 joined #salt
17:24 lz-dylan cool beans.
17:25 rojem joined #salt
17:25 lz-dylan so from its most basic, is there a way to stuff a cmd.run into an SLS file and now have it be the child of a particular task?
17:25 viq lz-dylan: yes
17:25 viq http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.cmd.html
17:27 viq lz-dylan: especially have a look at cmd.wait
17:27 jcsp joined #salt
17:29 lz-dylan which I'm interpreting as 'make up an arbitrary state name because my prior perception that state names must exactly match the name of the package they manage was incorrect, and work from there.'
17:29 Dattas joined #salt
17:30 viq sure
17:31 viq They can, but they don't have to
17:32 viq lz-dylan: http://pbot.rmdir.de/WSHmdqyTgBVIWc1DVCQU1g both those do the same thing
17:32 Ryan_Lane joined #salt
17:32 Networkn3rd joined #salt
17:33 FarrisG joined #salt
17:36 timoguin lz-dylan: yep, it's a unique ID.
17:36 sfello joined #salt
17:45 epcim joined #salt
17:46 elfixit joined #salt
17:50 erjohnso joined #salt
17:51 zekoZeko vi /init.sls
17:54 mgarfias i can't figure out how to run a state in a 'base' env from another env.  is this possible?  I'd like to avoid duplicating the state across if i can
17:56 babilen viq: I guess it is feature request time, yeah :)
17:56 lurking_dev joined #salt
17:58 jnials joined #salt
17:59 druonysuse joined #salt
17:59 druonysuse joined #salt
18:00 Rojematic joined #salt
18:02 jnials_laptop joined #salt
18:04 nadley__ joined #salt
18:05 pas joined #salt
18:07 mgw joined #salt
18:08 pas Hi, I am running a bash script via a state file and the app started by the script is getting the wrong file encoding. Is there a LANG or LOCALE setting for salt that I'm missing?
18:08 stephas joined #salt
18:14 joehoyle joined #salt
18:15 big_area joined #salt
18:15 Gareth morning morning
18:16 TyrfingMjolnir joined #salt
18:17 Darnoth joined #salt
18:18 Vye joined #salt
18:21 Networkn_ joined #salt
18:22 jeffasinger pas: do you want to pass an environment variable into the app?
18:24 pas I don't think I should have to. The system local is correct and if I run the bash script on the system the character encoding is UTF-8 but when restarted by salt it ends up running with ANSI_X3.4-1968
18:26 schimmy joined #salt
18:26 bhosmer joined #salt
18:27 schimmy2 joined #salt
18:27 pas I even tried this in the cmd.name and it still didn't work - export LANG=en_US.UTF-8 ;/raid/prog/bin/services.sh restart
18:30 pas I also tried a require locale.system and that returns "Comment: System locale en_US.UTF-8 already set" but the app is started with ANSI_X3.4-1968 :(
18:32 juanlittledevil left #salt
18:33 jeffasinger Hmm, I haven't run into anything like that before, but I'm not that experienced with salt
18:34 ajolo_ joined #salt
18:39 stevednd when defining mine_functions on a minion is there a way to give them arbitaray names? I want to be able to get a list of all minion IPs, and then also a list of just the internal IPs(cidr: 192.0.0.0/8)
18:43 Katafalkas joined #salt
18:45 bhosmer joined #salt
18:45 mgw joined #salt
18:47 sfello joined #salt
18:47 zirpubolci joined #salt
18:50 fragamus joined #salt
18:52 stephas joined #salt
18:54 oz_akan_ joined #salt
18:55 pas FYI. I've solved my problem. I needed an env - JAVA_OPTS: "-Dfile.encoding=UTF-8"
18:59 to_json joined #salt
18:59 joehoyle_ joined #salt
19:01 to_json1 joined #salt
19:01 ekristen joined #salt
19:04 [diecast] joined #salt
19:04 ghartz_ joined #salt
19:05 jaycedars joined #salt
19:06 donatell0 joined #salt
19:06 jcockhren I like how 2014.1.4 silently got released
19:08 timoguin jcockhren: silently?
19:08 timoguin i saw emails to salt-users and salt-announce
19:08 jcockhren I see. that's my problem. I don't do the email-lists
19:08 jcockhren (maybe I should eh)
19:08 timoguin prawly. :)
19:09 stephas joined #salt
19:09 steveoliver I'm confused about how to setup my salt state tree for multiple environments.  It seems like I could do this a couple different ways.  I'm trying to follow http://docs.saltstack.com/en/latest/ref/states/top.html, looking at the file_roots example, i'm not sure if each subdirectory (base, dev, qa, prod) are their own branch checkouts, or if those are directories from the same branch.  So: branches? or directories?  or both??
19:10 steveoliver …and i'm trying to imagine/plan a workflow … not quite seeing it all come together yet
19:14 viq steveoliver: if you're using gitfs then those are branches
19:18 deepimage joined #salt
19:19 deepimage left #salt
19:21 diegows_ joined #salt
19:21 XenophonF joined #salt
19:21 XenophonF can I do something like
19:21 XenophonF filename:
19:22 XenophonF file.replace:
19:22 XenophonF ....
19:22 XenophonF file.replace:
19:22 XenophonF ....
19:22 KennethWilke XenophonF: I don't think it'll let you do that, since in yaml that'd be a associative array with 2 values for 1 key
19:22 XenophonF or do i need to put that into states with two different IDs?
19:22 KennethWilke but you can ID them separately
19:23 XenophonF gotcha
19:23 steveoliver viq: if i do want to use gitfs for state trees, should my file_roots still contain the different base: dev: prod: environments pointing to subdirectories like the example shows? (http://docs.saltstack.com/en/latest/ref/states/top.html)
19:23 KennethWilke now if you can do filename:\n  file:\n    - replace:\n    - replace:
19:23 viq steveoliver: no, that's for file backed environments
19:23 UtahDave joined #salt
19:23 KennethWilke i dunno, maybe!
19:23 KennethWilke :)
19:23 steveoliver viq: ok
19:24 steveoliver viq: i want fileserver_backend: - roots and - git ?
19:24 KennethWilke i dunno if ordering is guarenteed there
19:24 XenophonF thanks KennethWilke, I'll try that
19:25 XenophonF ordering isn't important for me, as the edits i'm making don't depend on one another
19:25 KennethWilke steveoliver, i think gitfs first then roots
19:25 faldridg_ joined #salt
19:25 KennethWilke i feel i've had an issue with the ordering of that before
19:25 KennethWilke np XenophonF
19:25 KennethWilke lemme know if that option works, i'm curious about that
19:26 steveoliver then gitfs_remotes: - git://…myrepo (with master, dev, prod)? then I just call out the environments matching branches in top.sls, right?
19:26 steveoliver thanks KennethWilke
19:26 ipalreadytaken joined #salt
19:26 KennethWilke you're welcome steveoliver, i think you have it right
19:29 steveoliver so if i wanted to keep state tree in git, and other files outside of git, i can keep the files in whatever location is defined for the 'base' environment in file_roots, right?
19:30 gtmtech joined #salt
19:30 XenophonF KennethWilke: I got a conflicting ID "replace" error so separate states it is :)
19:30 oz_akan_ joined #salt
19:30 KennethWilke lol well we learned something!
19:30 KennethWilke good to know
19:30 gtmtech Hi
19:30 gtmtech Can anyone give me an example of how to use salt.shadow.set_password in an sls file ?
19:31 XenophonF now here's another question about state ordering
19:31 gtmtech salt.modules.shadow.set_password(name, password, use_usermod=False)
19:31 XenophonF is it possible to have more than one "- watch:" or "- require:"?
19:32 UtahDave XenophonF: yeah, watch and require are both lists
19:32 XenophonF like i'm thinking: id:\n cmd.wait:\n  - watch:\n    - file: ...1\n    - file: ...2
19:32 XenophonF ah ok good
19:33 UtahDave yep, you can have as many items as you wish under watch and require.
19:33 XenophonF then i can use more sensible IDs too, like "create file", "change 1st setting in file", "change 2nd setting in file", and "restart service"
19:33 XenophonF good
19:33 XenophonF then the ordering doesn't matter
19:34 faldridge joined #salt
19:35 KennethWilke yeah that sounds good XenophonF
19:38 martoss joined #salt
19:39 steveoliver anyone know of any state tree/formulae git repos that implement branch based environments?
19:40 mgw joined #salt
19:41 donatell0 joined #salt
19:42 ChrisC1 joined #salt
19:42 ChrisC1 hey everyone!
19:42 ChrisC1 question for anyone
19:42 ChrisC1 how do you document your states, top files, pillars, etc.?
19:43 XenophonF not that i'm an expert, but i just put comments right into the .sls files and so on
19:43 XenophonF plus i use really wordy IDs like "create the mail relay access control list"
19:43 donatell0 i am using the gitfs backend for my states directory. when i try to copy a folder on a minion using file.recurse in state, I see that symlinks dont get traversed to copy the files being linked to  (though the symlink and the files being pointed to are part of the git repo too). does anyone have a way to workaround this?
19:43 ChrisC1 agreed, alwaus a good idea
19:43 XenophonF that way the state documents itself
19:44 ChrisC1 i guess i was looking more for a centralized location, off-server
19:44 jab416171 donatell0, iirc git doesn't support symlinks
19:45 big_area joined #salt
19:45 * timoguin wonders what all would need to be done to make sphinx build docs from SLS comments
19:46 ChrisC1 timoguin: don't laugh, i was originally looking for a confluence plugin
19:46 timoguin i ain't laughin'. :)
19:46 donatell0 jab416171: git does seem to support it - my symlinks are internal to the git repo itself (just my way of sharing common configuration between different server roles) - i can clone the repo and the sym-links do appear to work correctly in the cloned repo
19:47 rupsky_ joined #salt
19:47 ChrisC1 i've deployed a salt instance for a client of ours servers, and want to include the documentation in their space within our central confluence
19:47 stephas joined #salt
19:47 ChrisC1 i've already resigned to doing it all manually, but it would be cool to "export" the entire state tree or something of the like
19:47 jnials joined #salt
19:48 donatell0 also, i can see that file.recurse state has some sym link related options, but no combination of settings seems to traverse the symlinks and copy the files being pointed to
19:49 Networkn3rd joined #salt
19:51 jab416171 interesting, that's new to me donatell0
19:52 Ahlee ChrisC1: how is that different from cloning the repo?
19:52 mgw joined #salt
19:53 ChrisC1 Ahlee: forgive me for being naive, noob here
19:53 ChrisC1 what do you mean?
19:53 Ahlee ChrisC1: what do you mean by documenting the state tree
19:53 Ahlee when I hear state tree, i think https://github.com/saltstack/salt/tree/develop/salt/states
19:54 Ahlee or do you mean the state files you've written
19:54 ChrisC1 yes
19:54 ChrisC1 the state files i've written
19:54 ChrisC1 like
19:54 steveoliver bah — who actually /develops/ salt state trees using gitfs backend? … what am I supposed to commit and push to test any changes?  or edit the master's cached git files directly? …
19:54 Ahlee I docoument them like I would any code
19:54 Ahlee and commit them into our source control
19:54 ChrisC1 right
19:54 Ahlee for the most part, the states are 'self documenting' and I have a link to salt's documentation
19:55 ChrisC1 yeah
19:55 ChrisC1 agreed
19:55 Ahlee to me it'd be like saying you have to document this sql query
19:55 Ahlee although salt's not nearly as declaritve
19:55 ChrisC1 well
19:55 Ahlee it's declarative enough
19:55 ipmb joined #salt
19:55 ChrisC1 i guess i would like to be able to look at the documentation, know the purpose of each SLS, whether or not they're included in the highstate, etc. etc.
19:56 Ryan_Lane salt-call publish.publish is killing me, so I opened an issue: https://github.com/saltstack/salt/issues/12610 :)
19:56 Ahlee Good question on whether it's included, short of test=True.  As for purpose, that can be resolved with established naming convention
19:57 Ahlee i.e., a single state file called "install" with just a 400 line init.sls is bad
19:57 druonysuse joined #salt
19:57 druonysuse joined #salt
19:57 ChrisC1 oh agreed
19:57 ChrisC1 i think we're on the same page, just curious
19:57 Ahlee yeah.
19:58 steveoliver i guess i could probably develop salt states in a local file_roots location then move them to the git repo when they are tested to work...
19:58 Ahlee We also do not use highstate ChrisC1, and all states are specifically targeted on demand
19:58 Ahlee but our servers aren't ephemeral, and once they're installed they tend to last for years
19:59 Ahlee or until they burn out
19:59 timoguin steveoliver: develop locally with git, mount the states on a vagrant vm, and test it there before commiting and pushing
19:59 Ryan_Lane1 joined #salt
20:00 rojem joined #salt
20:00 ChrisC1 Ahlee, our servers aren't exactly common either, but there are a number of things that should be included in all
20:00 ChrisC1 for the most part though i'm using grains to target servers in my top file
20:00 steveoliver timoguin: thx
20:00 XenophonF that's how I do it too, ChrisC1
20:01 XenophonF acutally, i use grains plus ID matches
20:01 XenophonF since my hostnames include role info in them
20:01 ChrisC1 oh how i WISH our hostnames included role info in them
20:01 ChrisC1 that was one of the major pains when i initially started learning salt
20:01 XenophonF like everything named *bsdweb* is going to have Apache 2.4 and mod_security installed and configured the same way
20:01 ChrisC1 as it seems it was designed and coded with that in mind
20:03 XenophonF ChrisC1: I've gone through a couple of iterations, but my latest scheme is based closely on http://www.mnxsolutions.com/devops/a-proper-server-naming-scheme.html.
20:03 to_json joined #salt
20:03 savvy-lizzard joined #salt
20:03 XenophonF i used to use something that looked like loc-or-rol-42
20:03 XenophonF loc=location, or=organization, rol=role/function
20:03 rojem joined #salt
20:04 ChrisC1 XenophonF: i'm with you 100%, unfortunately overhauling our scheme isn't in the cards for me
20:04 XenophonF now i'm using locslaosfunc42
20:04 Ahlee the problem i have with those naming schems is they treat servers like special snowflakes stil
20:04 Ahlee i won't want to have to say this server is a web server
20:04 Ahlee it's jsut a server
20:04 XenophonF that has merits too
20:05 Ahlee but, at the same time
20:05 Ahlee i won't try to deny that i've run commands against server1004 when i meant to target server1040
20:05 rupsky_ joined #salt
20:05 Ahlee i do dig that doc though XenophonF
20:06 Ahlee will definitely need to peruse in more depth
20:06 XenophonF nice thing about salt (and similar tools) is that you can target hosts a bunch of different ways
20:06 XenophonF like, i have a common config for each operating system that i apply using a grains match 'os:FreeBSD', 'os:Centos', and so on
20:06 mpanetta Is it possible to use salt-cloud to bootstrap a master as well as minions?
20:07 UtahDave mpanetta: yep!
20:07 mpanetta Oooo
20:07 mpanetta Any docs that I can look at?
20:07 UtahDave mpanetta: if you're using a map, you can add    makemaster: True
20:07 mpanetta Ah sweet
20:07 UtahDave let me find the doc real quick
20:07 mpanetta Will it also install the minion?
20:07 mpanetta Ok
20:07 mpanetta Ideally I want both.
20:08 jcockhren !help
20:08 wm-bot4 I'm a documentation bot. To control me, please use #salt-bot to avoid channel spam. See this URL for my commands: http://meta.wikimedia.org/wiki/WM-Bot
20:08 XenophonF Well, thanks to you all, I've gotten to the point where I no longer have Salt questions.  :)  Now, I have sendmail questions.  :(
20:08 UtahDave yeah, it still installs both
20:08 mpanetta Awesome!!
20:08 UtahDave http://docs.saltstack.com/en/latest/topics/cloud/misc.html#setting-up-new-salt-masters
20:09 UtahDave look like you can add that option to the profile as well as the map file
20:09 mpanetta Perfect
20:09 mpanetta UtahDave: You have made my day :)
20:10 UtahDave :)
20:10 rojem joined #salt
20:10 mpanetta You gonna be at Openstack conf?
20:10 jpz joined #salt
20:11 Ryan_Lane1 annoyingly openstack summit has sessions for: chef, puppet and ansible
20:11 Ryan_Lane1 no salt
20:11 mpanetta I thought they were going to have something for salt?
20:11 mpanetta I need to go look again...
20:11 martoss1 joined #salt
20:12 Ryan_Lane1 there's something in the demo theatre
20:12 XenophonF left #salt
20:12 Ryan_Lane1 ah. looks like things have been added since I last looked
20:14 retr0h Ryan_Lane1: sure hope there are salt talks at the summit
20:14 KennethWilke i wish more of the openstack community embraced salt
20:14 Ryan_Lane1 the infra team uses salt
20:14 Ryan_Lane1 I think part of the problem is that salt isn't embracing openstack enough
20:15 KennethWilke don't all of those config management tools conflict with heat a lil bit?
20:15 KennethWilke salts not?
20:15 mpanetta KennethWilke: Heat uses them AFAIK
20:15 mpanetta It has hooks in to them
20:15 KennethWilke mpanetta, really?! wow that's fun
20:15 mpanetta I think so
20:16 faldridge joined #salt
20:16 Ryan_Lane joined #salt
20:16 uestra joined #salt
20:19 UtahDave Ryan_Lane1: We've been trying to get on the ops unconference on Friday, but haven't heard back
20:20 rupsky_ joined #salt
20:21 retr0h UtahDave: yeah would make sense to get you in the friday slots
20:21 Joseph_ joined #salt
20:21 retr0h turn the ansible/chef/puppet talks into 30 min and add another IMO
20:22 Joseph_ I have a jinja templating question. Here is my sls https://gist.github.com/jaloren/bd3b49105746ef5a7b76
20:22 ange when using a specific source for a deb package, is there a way to force the update when changing the version ?
20:22 Joseph_ when i try to do a highstate, the compilation fails with the following error  Rendering SLS "cruise:templatetest" failed: Jinja syntax error: expected token 'colon', got '}'; line 5
20:22 Joseph_ i tried adding a colon but i still get the same error
20:23 KennethWilke ah Joseph_ i think it's because you have the double curlys in there
20:23 KennethWilke for the {{ dir }}
20:23 Joseph_ but i want to refer to a variable from the for loop
20:23 Joseph_ how do i do that?
20:23 nadley__ joined #salt
20:23 KennethWilke it's just 'dir' when you're in between the {% ... %} stuff
20:23 Joseph_ ohhh
20:23 Joseph_ totally didn't find that in the salt documentation :)
20:23 KennethWilke and {{ dir }} when you want that variable interpolated outside of a control structure
20:24 KennethWilke yeah, that's something you'll find a bit more in the jinja docs
20:24 druonysus joined #salt
20:24 druonysus joined #salt
20:25 Joseph_ ahh
20:25 KennethWilke Joseph_: http://jinja.pocoo.org/docs/templates/
20:25 KennethWilke it touches on those two delimiters in the synopsis here
20:26 jab416171 what's the standard method for testing salt states? some dummy VM/set of VMs that mimic production VMs that you highstate?
20:26 jab416171 I know you can test=True but that doesn't feel sufficient
20:26 KennethWilke jab416171: i like going that route myself, to always know I can deploy from scratch
20:26 KennethWilke that whole continuous deployment stuff
20:28 zsoftich1 I am having an issue where running salt '<minion>' state.highstate works, but on the minion running salt-call state.highstate does not
20:28 zsoftich1 it fails to pull in the pillar data
20:28 Ryan_Lane UtahDave: who'd you ask?
20:28 Ryan_Lane UtahDave: you should have asked me ;)
20:28 Ryan_Lane I'm on the user committee and we're organizing that
20:29 Ryan_Lane UtahDave: send me an email to remind me. ryan@ryandlane.com
20:29 zsoftich1 doing salt-call pillar.items returns the correct data but doing a pillar.get 'var' does not
20:29 Joseph_ has anyone used pyobjects instead of jinja templates https://github.com/saltstack/salt/pull/10517
20:29 Joseph_ ?
20:32 UtahDave Ryan_Lane: sure, I'll do that!   anteaya had me email tom fifield about the unconference.
20:37 gothix how would i match on a role in pillar i keep getting errors  Got a bad pillar from master, type str, expecting dict:
20:37 gothix which when i fix that i get a yaml reneering error
20:37 gothix rendering error
20:37 NullWagon joined #salt
20:38 martoss joined #salt
20:46 darkmatter joined #salt
20:46 KyleG joined #salt
20:46 KyleG joined #salt
20:49 NullWagon joined #salt
20:51 martoss joined #salt
20:55 MTecknology There's no 2014.1.4 for windows yet?
20:55 echos joined #salt
20:56 timoguin the windows build is always behind
20:56 repl1cant saw on the mailing list that the dude that maintains the windows package is @ a conference
20:57 faldridge joined #salt
20:57 echos left #salt
20:57 timoguin yea it'd be nice to automate the process. i don't any reason it couldn't be
20:57 MTecknology repl1cant: tell him to learn from me! (not allowed)
20:58 MTecknology http://docs.saltstack.com/en/latest/topics/installation/windows.html <-- 2014.1.3-1 (packaging bugfix)   heheh.... I think I was bitten hard by that bug...
20:59 MTecknology dunno what the bug is, but I think I was smoked by it
21:00 cruatta joined #salt
21:00 tligda joined #salt
21:02 alunduil joined #salt
21:03 ChrisC1 joined #salt
21:06 lionel joined #salt
21:06 bhosmer joined #salt
21:09 Ansem joined #salt
21:09 Ansem Anyone have any weirdness mixing Node, Supervisor.d and Salt?
21:09 Ansem I can't get it to restart my damned programs
21:12 JasonSwindle joined #salt
21:13 KennethWilke Ansem: I dunno about the node part, but i've done the supervisord and salt part
21:14 Ansem Any weird problems?
21:14 KennethWilke I recall an instance where i was using lanching uwsgi with supervisor but my watches wouldn't restart uwsgi via supervisor
21:15 Ansem How did you resolve?
21:15 KennethWilke that was being caused by uwsgi's signal handling, i needed to modify my supervisor config to sent a SIGINT or something
21:15 KennethWilke i dunno if node is like uwsgi, where it has it's own concept of how to interpret what signals
21:15 stephas joined #salt
21:15 KennethWilke and to note that problem is the same with or without salt
21:15 Ansem for the most part Node is pretty c like in handling signals
21:15 Ansem I'll see what happens when I do it manually without salt though
21:17 JordanRinke Am I setting something wrong, or is this a bug? http://pastebin.com/LNQsc4id
21:17 WarheadsSE left #salt
21:17 JordanRinke this is the only state I have using the fileserver salt:// bits right now.
21:18 lz-dylan joined #salt
21:19 KennethWilke JordanRinke: it looks like your path object is a list there, but is being treated like a string
21:19 KennethWilke JordanRinke: can you post your sls file?
21:21 jeff1066 joined #salt
21:21 JordanRinke that was it, I had 2 in it via: http://stackoverflow.com/questions/22582479/how-can-i-check-for-file-existence-in-salt-file-server changed it to just source: salt:// and it works
21:21 JordanRinke didnt realize what the error was saying
21:21 KennethWilke :p
21:21 xuru joined #salt
21:22 jeff1066 left #salt
21:23 eriko joined #salt
21:24 JordanRinke thx
21:24 KennethWilke np
21:24 kermit joined #salt
21:24 JordanRinke yall really need to implement some kind of bitcoin tipping bot in here
21:24 lionel joined #salt
21:24 [diecast] joined #salt
21:24 ange just beer
21:24 ange or wine
21:24 ange or cheese even
21:25 KennethWilke +1 beer tip
21:25 KennethWilke :p
21:25 mgarfias i like beer
21:25 KennethWilke as long as it's fancy beer
21:25 mgarfias rolling rock
21:25 mgarfias (kidding, stuff tastes like feet)
21:25 KennethWilke lol
21:26 ange KennethWilke: you don't offer cheap beer to people helping you
21:26 tligda joined #salt
21:26 ange mgarfias: so you tasted you feet at some point ?
21:26 KennethWilke i'd drink rolling rock over a bud or miller any day!
21:26 KennethWilke ange: agreed
21:27 KennethWilke that would be bad protocol
21:29 ange I don't think the SYN would be even received indeed
21:29 KennethWilke '-j DROP' the undesirables?
21:30 KennethWilke won't even have the decency to -j REJECT
21:31 cewood joined #salt
21:32 harobed_ joined #salt
21:33 harobed_ joined #salt
21:33 bl4sphemy joined #salt
21:34 harobed_ joined #salt
21:35 harobed_ joined #salt
21:38 stephas joined #salt
21:39 Shish joined #salt
21:40 thedodd joined #salt
21:44 flebel joined #salt
21:45 faulkner joined #salt
21:45 mgw joined #salt
21:45 n8n joined #salt
21:49 xuru left #salt
21:49 sroegner joined #salt
21:53 NullWagon joined #salt
22:01 bemehow joined #salt
22:02 cruatta_ joined #salt
22:08 Ryan_Lane is there a way for me to call an execution module from a state and assign its output to a variable?
22:09 joehoyle joined #salt
22:11 forrest Ryan_Lane, can't you do {% var = __salt__['cmd.run']('ls -la') %} or something?
22:11 forrest err set var
22:11 Ryan_Lane heh. didn't try :)
22:12 Ryan_Lane that's good to know, though. guess I'll try that
22:14 forrest I think it works
22:18 [diecast] joined #salt
22:18 anteaya Ryan_Lane: I didn't know you were one of the organizers for the Friday thing - glad you are able to help UtahDave
22:18 Ryan_Lane well, I have to convince people to add it still
22:18 Ryan_Lane so far I haven't seen any emails requesting it, though
22:20 UtahDave Ryan_Lane: did you not get my email?  Or are you referring to someone else?
22:20 stephas joined #salt
22:20 Ryan_Lane I got yours. I meant I didn't get any about salt and the friday thing
22:20 UtahDave gotcha.
22:28 rojem joined #salt
22:28 ldlework left #salt
22:31 aw110f joined #salt
22:33 aw110f Hi I'm having issues trying to sync custom grains, the minions are able to return the new custom grains but targeting nodes using the new custom grains don't seem to work
22:34 aw110f well actually, I have to restart the minion service for the master to be able to target the minions with the custom grains
22:34 UtahDave aw110f: Hm. sounds like the master's minion grain cache isn't getting updated when new grains are introduced
22:34 aw110f i'd rather not have to restart the minion everytime i have a new custom grain to push out
22:35 aw110f UtahDave: any work around?
22:35 to_json joined #salt
22:36 UtahDave aw110f: Hm. have you tried running saltutil.sync_all  ?
22:36 aw110f yes
22:37 aw110f and saltutil.sync_grains as well
22:38 aw110f tried running highstate from the minion, which I rather not have to, but that was a suggestion from the docs also
22:38 war2 joined #salt
22:39 UtahDave aw110f: I'm trying to find if there's a way to force a grain cache refresh
22:40 aw110f I can tell my custom grain is being called automatically every 10 minutes or so because my grain writes a file
22:41 war3 joined #salt
22:42 aw110f # Cache grains on the minion. Default is False.
22:42 aw110f # grains_cache: False
22:42 ajprog_laptop joined #salt
22:42 aw110f # A value of 10 minutes is a reasonable default.
22:42 aw110f #
22:42 aw110f # If the value is set to zero, this check is disabled.
22:42 aw110f #grains_refresh_every = 1
22:43 l0x3py joined #salt
22:44 UtahDave Hm.  There's this:  https://github.com/saltstack/salt/issues/10248
22:44 UtahDave and this: https://github.com/cachedout/salt/commit/aba5e7ab37865b35f8bcfc0e2af47b098b9f8083
22:44 UtahDave trying to figure out how to call the force_refresh
22:47 UtahDave aw110f: can you try   salt 'minion id' saltutil.sync_grains  refresh=True     ?
22:50 quickdry21 joined #salt
22:53 Daemonik joined #salt
22:54 ajolo joined #salt
22:54 stephas joined #salt
22:56 aw110f didnt work =(
22:56 rupsky__ joined #salt
22:58 UtahDave aw110f: Yeah, that open issue hasn't been resolved.  Would you mind commenting on that issue?  That will help move it forward a bit
22:58 aw110f sure, I'll setlle with restarting the minion for now
22:58 UtahDave I think right now all you can do is delete the grains cache file on the master to force it.  Not the best way
22:59 aw110f delete the cache file on the master and do the sync_grains?
22:59 UtahDave yeah, I think that might work
23:01 aw110f sorry, where is the cache file to delete?
23:02 cruatta joined #salt
23:02 UtahDave I think it's in /var/cache/salt/master
23:03 rupsky__ joined #salt
23:06 Daemonik I have a few dozen nodes I want to specify in a nodegroup in /etc/salt/master.d/nodegroup-group2_.conf , how may I "line break" and break up my string of a few dozen servers into multiple lines for better readability?
23:09 aw110f UtahDave: I haven't cleared the cache yet but found this command salt-run cache.grains and it list my custom grains and correct key values
23:10 aw110f salt -G against the custom grain still don't work, just throwing it out there...
23:11 ange is there a way to avoid salt changing 'true' to 'True' ?
23:12 rupsky__ joined #salt
23:13 rupsky__ joined #salt
23:22 bemehow joined #salt
23:23 aw110f deleted /var/cache/salt/master/file_lists/roots/base.p
23:23 aw110f and directory /var/cache/salt/master/minions
23:23 aw110f ran sync_all
23:24 aw110f still cant target nodes by custom grains
23:25 jslatts joined #salt
23:25 JordanRinke me waves at UtahDave
23:25 JordanRinke bah
23:26 ajolo joined #salt
23:26 * JordanRinke waves at UtahDave
23:26 JordanRinke stupid fingers
23:31 joehoyle joined #salt
23:34 uestra joined #salt
23:38 \ask joined #salt
23:43 gothix_ joined #salt
23:44 DaveQB joined #salt
23:46 aw110f UtahDave: thanks for the suggestions but restarting the minions was the only way to refresh the new grain.  I put in a comment to the git issue you referred me to.
23:58 Ryan_Lane aw110f: what version of salt are you running?
23:58 Ryan_Lane ah. nevermind. there's an open issue

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