Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-02-06

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

All times shown according to UTC.

Time Nick Message
00:00 SEJeff_work madduck, ping
00:00 scoates is there a sensible way to update minions (via salt)?
00:00 scoates http://paste.roguecoders.com/p/3eb4160c5a3560ed772652e8aad849af.txt <-- pillar caching problem
00:00 SEJeff_work madduck, Aren't you the git annex author / maintainer? If so, your website is horribly broken. Just a friendly heads up
00:00 brianhicks joined #salt
00:04 clintonius scoates: for updating salt minions: https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.saltutil.html
00:05 clintonius last command
00:05 clintonius salt.modules.saltutil.update(version=None)
00:09 pydanny joined #salt
00:14 dfinn1 joined #salt
00:17 yomilk joined #salt
00:18 oz_akan_ joined #salt
00:19 oz_akan_ joined #salt
00:21 alunduil joined #salt
00:28 scalability-junk SEJeff_work: author and maintainer is joey hess and he usually is using the username joehy afaik.
00:29 scalability-junk SEJeff_work: why horribly broken?
00:29 joehh babilen: I don't keep them in git
00:29 babilen ah, okay
00:29 joehh are you familiar with git-buildpackage?
00:30 babilen joehh: Simply thought that I could base my local backport on your packaging in git, but ended up grabbing the .dsc trifecta instead
00:30 babilen joehh: Sure, quite familiar
00:30 joehh babilen: that is exactly what I do
00:30 babilen joehh: And you simply use a .pbuilderrc that allows you to switch to wheezy by setting DIST?
00:31 babilen joehh: But the dependencies where slightly different (python-msgpack and so on ..)
00:32 Ryan_Lane can someone give me an example of passing an env into a cmd call?
00:32 joehh roughly - I specify slightly more than that (arch and path to cow location)
00:32 Ryan_Lane there's no example in the module documentation and it's not very clear from the docs how I need to pass it in
00:32 joehh I maintain a set of patches that I apply then tweak as required
00:32 joehh these would be better done as a branch in/with git/gbp
00:33 joehh but I haven't yet "integrated"/figured out how to do different branches and cowbuilder in gbp
00:33 babilen joehh: How do you deal with package renames in the BD then? This is exactly why I used the bpo .dsc and not the git version. BTW, are (would) the package on saltstack be identical to the one in wheezy-backports? (assuming same version)
00:34 babilen joehh: You can quite easily set --git-debian-branch if you want to switch to a different "master"
00:35 babilen joehh: git-build-package --git-debian-branch=wheezy-backports for example
00:35 babilen *git-buildpackage naturally
00:37 joehh I deal witith the package names via patches
00:37 joehh typical patch: http://pastebin.com/E50X9ET1
00:38 joehh The backports should be identical - though I apply more care and checking for compliance with debian policy for ones uploaded to main archive
00:38 babilen ack
00:39 babilen extra lintian run with --pedantic? ;)
00:39 joehh Any changes I make for debian policy reasons should be in next regular backport, but there can be "drift"
00:39 MrTango joined #salt
00:39 joehh that sort of thing
00:41 babilen Sure, I know the drill. From my perspective it would be appreciated if you could have backports in git too. I'm tired now and will be back tomorrow, but I wouldn't mind testing a setup that could be adopted.
00:42 elfixit1 joined #salt
00:42 joehh I'll give it a go and let you know how I go
00:42 joehh I'd be hapy to simplyfy the anagign of patches
00:42 joehh managing
00:43 joehh :)
00:44 joehh thanks for our asistancei ntalkign through ti
00:44 babilen joehh: I've never played with gbp pq and different branches, but it shouldn't be too arcane. I'll have a look at it tomorrow. Might just base my local branch (including the aforementioned patches) on that and share the packaging-style with you.
00:44 joehh athanks
00:45 babilen joehh: For now: Thanks for your work and have a good night
00:46 mgw joined #salt
00:48 frosty996 left #salt
00:48 mgw joined #salt
00:50 jcsp1 joined #salt
00:50 felixhummel_ joined #salt
00:51 vejdmn joined #salt
00:54 tinyhippo joined #salt
00:54 tinyhippo joined #salt
01:01 Dale_ joined #salt
01:02 fridiculous joined #salt
01:02 fridiculous my gitfs can't find my top file
01:03 drawsmcgraw left #salt
01:03 fridiculous and there aren't many examples of using gitfs, and the structure of both the master config with the state file roots within the git repo
01:05 fridiculous anyone feeling generous ?
01:09 philipsd6 I'd like to see some more examples of that myself fridiculous
01:10 clintonius I am setting up gitfs tonight for the first time. If I get it working I will be in this room and you can ask me questions
01:12 joehh joined #salt
01:12 babilen I'm already using it and am very happy with it so far, but then it is impossible to solve problems without much more data than what fridiculous provided
01:13 EntropyWorks so reading the salt-cloud setup docs and well I've been poking for a few hours now and can't get it to work.  anyone have a actual how-to for openstack?
01:14 zain fridiculous: make sure you're on the master branch
01:14 zain (of your gitfs repo)
01:15 EntropyWorks just a MalformedResponseError when trying to do 'salt-cloud --list-images yazz' where yazz is the provider name in /etc/salt/cloud.providers.d/openstack.conf
01:16 EntropyWorks something just isn't right in my config I guess... 'code: 405 body: {"message": {"response" : "Not Allowed" }}'
01:16 diegows joined #salt
01:21 BenCoinanke joined #salt
01:22 xzarth joined #salt
01:26 thayne joined #salt
01:28 fridiculous clintonius let me know how far you get
01:28 fllr joined #salt
01:30 clintonius fridiculous: Will do.
01:30 favadi joined #salt
01:31 fllr Hey guys. How can I change the loading order os pillars? I want -all to be loaded before - dev, that way dev overwrites all. https://gist.github.com/felipellrocha/be141678f92587db423d
01:32 babilen fridiculous: what are you having problem with exactly?
01:33 davet joined #salt
01:36 mgw joined #salt
01:37 fridiculous babilen, basically here's my set up
01:37 fridiculous http://pastebin.com/8gUWRKui
01:37 clintonius fllr: that should work. http://docs.saltstack.com/topics/pillar/#pillar-namespace-flattened
01:37 fridiculous where i'm using normal roots otherwise
01:37 fridiculous srv/salt
01:37 fridiculous brb
01:37 fridiculous in 40 min...
01:40 pydanny joined #salt
01:41 fllr clintonius: No, I want it to be overwritten... so that my dev environment can have slightly different settings as prod...
01:43 Gifflen joined #salt
01:43 saurabhs joined #salt
01:44 fllr clintonius: except dev is being loaded before all, so all overwrites dev. I want it to be the other way around
01:44 clintonius fllr: isn't that what that section says? pillars share the same namespace. So if you have multiple sls pillar files loading for an box, the bottom one will load over the top one
01:44 clintonius oh, so you aren't seeing it work that way when you do it
01:45 dave_den Ryan_Lane: You mean like: salt 'minion' cmd.run 'echo $FOO' env='{FOO: "barbarbar"}'
01:46 clintonius interesting. perhaps it matches the more exact regex first, so *dev first, then *
01:46 fllr clintonius: that's what I thought too... but somehow salt is loading -dev first... :\
01:46 Ryan_Lane hm. I got an error when I tried that, but I may have been missing some quotes
01:46 Ryan_Lane I got a key error from salt
01:46 Ryan_Lane for the variable name
01:47 dave_den Ryan_Lane: that works on 0.17.4
01:47 clintonius fllr: for kicks and giggles did you try swapping the order to see what would happen?
01:47 Ryan_Lane yep. using that version
01:48 fllr clintonius: ... yes...
01:48 clintonius I figured you would have :-) looks like overwriting in that way might not work. In our instance anything that needs to be variable has its own setting in *prod, *qa, and *dev
01:48 clintonius but I can see why you would want to do what you are doing
01:52 dave_den fllr: what version are you running?
01:55 fllr dave_den: 0.17.5
02:00 gjaber joined #salt
02:01 gjaber Does salt minions cache only the states relevant to them?? or do they cache the hole states root folder??
02:01 gjaber whole*
02:03 favadi joined #salt
02:04 dave_den fllr: hrm, it works on a 0.17.5 master for me
02:05 dave_den fllr: you can run you salt-master in debug mode to see how it renders the pillar
02:05 sgviking joined #salt
02:05 fllr dave_den: I'm on masterless mode... lemme get you the debug mode data
02:06 dave_den gjaber: it will cache only the statefiles relevant to them
02:07 fllr dave_den: https://gist.github.com/felipellrocha/40ce8b36624818639af4
02:12 pdayton joined #salt
02:15 strgcloud joined #salt
02:19 ravibhure joined #salt
02:20 dave_den fllr: weird
02:20 dave_den it works correctly until i change my minion id to 'something.local' and do the '*local' glob like you have
02:22 snuffeluffegus joined #salt
02:22 dave_den but if i leave my minion id as blah.net and do '*net' it works correctly again
02:24 fllr dave_den: That is weird... at first I thought loading order was based on glob value, but then *net wouldn't work either, i think...
02:28 AdamSewell joined #salt
02:28 tvle joined #salt
02:29 dave_den anything but 'local' works correctly
02:30 fllr ...the hell...
02:30 dave_den '*loca*' works, '*local*' doesn't
02:31 dave_den my minion id is "xxxlocalzzz.com"
02:32 retran joined #salt
02:35 fllr ...that is such a weird issue... =p
02:36 jimallman joined #salt
02:37 retran how do i decide if i should use puppet or salt
02:37 tedski retran: by experimentation, analysis, and decision making.
02:38 fllr dave_den: yeah, you're right... i changed it to *loc* and it worked... huh...
02:38 retran that could be the answer to most questions
02:38 retran in the world
02:39 tedski i agree
02:39 dave_den fllr: https://github.com/saltstack/salt/issues/10227
02:39 tedski retran: are you asking for a recommended test plan?  are you asking for factors to consider?
02:39 retran factors to consider
02:40 tedski one of the main driving factors for choosing salt on my team was that the team is strong in python
02:40 tedski so, we know we can help diagnose/fix when we hit bugs
02:41 tedski another factor is scalability
02:41 tedski puppet has trouble in the tens of thousands of nodes
02:41 tedski salt's architecture seems more suited for that
02:41 clintonius dave_den: nice find!
02:41 clintonius weird bug
02:44 dave_den fllr's the weird one, he found it ;)
02:44 fllr \o/ my first salt bug... :~)
02:51 MTecknology Is it possible to run file.copy on the master to push a file down to minions?
02:54 MTecknology file.copy seems to run minion only; file.manage_file needs a lot more options than just source/dest it seems
02:57 MTecknology oooh... I need cp.get_file it seems
03:00 jalbretsen joined #salt
03:05 mgw MTecknology: there's also salt-cp if it's a one-off situation
03:05 dancat joined #salt
03:06 Mua joined #salt
03:07 Mua joined #salt
03:07 pydanny joined #salt
03:09 Mua_ joined #salt
03:10 MTecknology mgw: heh... that's what I was searching for!
03:12 yomilk joined #salt
03:13 gwmngilfen|afk joined #salt
03:15 mapu joined #salt
03:26 _ikke_ joined #salt
03:29 sinh__ joined #salt
03:38 AdamSewell joined #salt
03:38 sgviking joined #salt
03:51 ajw0100 joined #salt
03:55 thayne joined #salt
03:57 oz_akan_ joined #salt
03:59 davet joined #salt
04:09 gjaber joined #salt
04:10 gjaber what data do minions cache?? do they cache the whole root folder of the states, or only the folders that are pertinent to that minion based on the top file??
04:13 pydanny joined #salt
04:14 __number5__ gjaber: you can check in /var/cache/salt/minion on minion machine
04:14 xfactor973 joined #salt
04:18 gjaber right now my setup doesnt use the top file to target specific systems. I could set up something to run a couple of tests, but I was looking for more direct answer
04:19 gjaber do you know where I could read up the behavior of the salt cache??
04:20 forrest joined #salt
04:28 fllr joined #salt
04:31 __number5__ gjaber: AFAIK, the minion only cache the part related to it, i.e. what master sent to it
04:32 gjaber nice, thank you
04:36 __number5__ np
04:52 jdenning joined #salt
04:54 tvle joined #salt
04:59 DaveQB joined #salt
05:03 Ryan_Lane joined #salt
05:07 jeremyfelt joined #salt
05:07 Tekni joined #salt
05:22 tvle joined #salt
05:25 middleman_ joined #salt
05:33 oz_akan_ joined #salt
05:34 master joined #salt
05:34 minion_ joined #salt
05:35 kolaman joined #salt
05:39 minion_ :babilen i have done these things ( "salt '*' state.sls mypackage.sls" or "salt '*' state.highstate" or "salt '*' pkg.install pkgs='["svn", "apache"]'" ) but i it results the same
05:40 Led_Zeppelin joined #salt
05:42 minion_ i have an top.sls but please let me know what should be in top.sls
05:43 malinoff http://docs.saltstack.com/ref/states/top.html
05:50 minion_ this link has the contents of top.sls http://pastebin.com/Yr2cjMR8
05:57 minion_ @rome:~$ sudo salt '*' state.sls mypackage.sls paris:     Data failed to compile: ----------     No matching sls found for 'mypackage.sls' in env 'base'
05:58 minion_ @rome:~$ ls /srv/salt/ edit  mypackage.sls  top.sls
05:58 dave_den salt '*' state.sls mypackage
05:59 minion_ @rome:~$ sudo salt '*' state.sls mypackage paris:     Data failed to compile: ----------     Rendering SLS "base:mypackage" failed: Unknown yaml render error; line 4  --- top.sls: ========    base:     <======================     '*':     - mypackages       mypackages.sls:      ================= [...] ---
06:00 xmj dpaste is beautiful
06:05 minion_ let me know how to correct the paste
06:05 shadowsun He just did
06:05 shadowsun http://dpaste.com/
06:06 dave_den minion_: you need a ":"  after '*'. So it should be '*':
06:07 dave_den minion_: http://yaml-online-parser.appspot.com/?yaml=base%3A%0A+%27*%27%3A%0A++-+basepackages&amp;type=json
06:07 dave_den that is helpful to figure out what's wrong with your yaml format.
06:10 ausmarton joined #salt
06:18 Psyke joined #salt
06:22 djaykay joined #salt
06:22 Troic_ joined #salt
06:22 Troic_ joined #salt
06:26 pdayton joined #salt
06:34 oz_akan_ joined #salt
06:34 jimallman joined #salt
06:35 kalloc joined #salt
06:39 thayne joined #salt
06:47 clearclaw joined #salt
06:51 Katafalkas joined #salt
06:55 sroegner joined #salt
06:55 mephx joined #salt
06:56 pdayton1 joined #salt
06:57 patrek joined #salt
06:59 zzzirk joined #salt
07:01 mugsie joined #salt
07:03 djaykay joined #salt
07:04 kalloc joined #salt
07:12 middleman_ joined #salt
07:13 funzo joined #salt
07:13 zzzirk joined #salt
07:16 elithrar joined #salt
07:22 dirjax joined #salt
07:26 yomilk joined #salt
07:26 kalloc joined #salt
07:31 tomspur joined #salt
07:31 tomspur joined #salt
07:31 Shenril joined #salt
07:33 xmj terminalmage: good job on the FreeBSD ports/pkg issue
07:46 dirjax joined #salt
07:49 Iwirada joined #salt
07:50 fllr joined #salt
07:53 oz_akan_ joined #salt
07:54 _fllr_ joined #salt
07:58 kolaman joined #salt
08:00 kolaman %k
08:07 Franz__ joined #salt
08:09 gildegoma joined #salt
08:09 gammalget joined #salt
08:12 pmcg joined #salt
08:13 martoss joined #salt
08:16 martoss1 joined #salt
08:17 bbinet joined #salt
08:22 slav0nic joined #salt
08:22 slav0nic joined #salt
08:24 anuvrat joined #salt
08:30 y0j joined #salt
08:40 giantlock_ joined #salt
08:43 sroegner joined #salt
08:44 Egya_Koo left #salt
08:44 yomilk joined #salt
08:46 yomilk_ joined #salt
08:49 zooz joined #salt
08:50 mike25ro joined #salt
08:50 Poooogles joined #salt
08:50 miguitas joined #salt
08:51 Poooogle_ joined #salt
08:53 krak3n` joined #salt
08:54 oz_akan_ joined #salt
08:54 fllr joined #salt
09:04 juso joined #salt
09:09 krak3n` joined #salt
09:16 carlos joined #salt
09:22 kalloc joined #salt
09:24 zooz joined #salt
09:26 BogdanR Hi. I have salt 0.17.4 and I would like to upgrade to 0.17.5 so I would also get salt-cloud
09:26 BogdanR How would I do that?
09:27 BogdanR I used the bootstrap script to install salt
09:27 babilen How can I see what data I get from a pillar during jinja rendering? Or are there examples of typical Python datastructures resulting from specific pillar definitions?
09:27 babilen Or more generally: What are good ways to debug jinja rendering bugs?
09:28 kalloc joined #salt
09:29 Hipikat babilen: `salt the_minion_id pillar.items [particular-item]` - if it fails to render there's usually an explanation of why/where. that's gotten me through some fairly large pillar configurations.
09:30 stewpot joined #salt
09:31 Hipikat also i've noticed that the exact error messages got more useful and verbose in the current git/develop version than in stable (and it no longer just borks on the first error)
09:31 babilen Hipikat: I don't mean the pillar itself, but using data from the pillar in states
09:32 stewpot I am having trouble with file.append in a salt state.. where I want to add the mysql settings to the bottom of /etc/salt/minion
09:32 stewpot as per http://pastebin.com/gx51DTUw
09:33 stewpot the problem is that I keep getting errors.. or if it doesn't error it does not do anything.. says it has completed but has not appended the configuration to the end of the file
09:33 babilen Hipikat: I am simply pretty new and miss my Python REPL when developing salt states that are rendered with jinja and am simply not sure which datastructures a certain pillar configuration results in. "Oh, it is a dictionary! Interesting, lets see if I have lists as values."
09:33 mike25ro stewpot: maybe ...adding 'mysql.port: localhost' ... will work?
09:33 Hipikat babilen: aah, right so what the states look like after the pillar's been them. that… is an answer i too would like. :)
09:34 mike25ro stewpot:  i am also new... but i know i had some issues with dots..
09:34 Hipikat (after fumbling through massive formulas via trial and error)
09:35 Hipikat babilen: i empathise with all of that.
09:35 babilen Hipikat: Which is exactly what I am doing right now, but thought that there must be a better way :-/
09:36 Hipikat i'm sure there is. maybe if we keep talking about it… >.>
09:36 babilen It is just a little tricky to debug Python errors when you don't even know which statement was called and what data is was called with. Let alone the guessing game that is the relation between pillar definition and the resulting Python data
09:38 Hipikat yeah surely there's a simple answer to "where's it most useful to stick `pdb.set_trace()` when states don't render"… but i'm guessing with all the async 0mq stuff that may not actually be true(?)
09:39 Hipikat but it's not in the Troubleshooting docs (unless i've skimmed too fast)
09:39 babilen You might be able to help with this problem specifically though (I can learn the "this is how you solve this problem in general later") -- I am having pillars such as http://paste.debian.net/80425/ and would like to implement a fairly simple state that essentially iterates through items (tuples?) in roles more or less like: for role_name, active: if active: - role_name
09:40 aurigus joined #salt
09:42 Hipikat babilen: well i'm working on a big fat formula that contains the string "{% for" in it 7 times which may or may not contain relevant examples? https://github.com/hipikat/wsgi_still/blob/master/wsgi_still/init.sls
09:43 babilen Hipikat: btw, explicitly running "salt-master -l debug" seems to yield some useful information
09:45 krak3n` joined #salt
09:47 MrTango joined #salt
09:47 stewpot I am now getting the following error
09:47 stewpot AttributeError: 'OrderedDict' object has no attribute 'splitlines'
09:47 stewpot when trying to do a file.append text:
09:48 kadel joined #salt
09:51 pmcg joined #salt
09:53 stewpot when I use the file.append example here : http://hveem.no/saltvirt it just works..
09:54 fllr joined #salt
09:54 oz_akan_ joined #salt
09:56 oz_akan__ joined #salt
09:59 zooz joined #salt
10:00 ajw0100 joined #salt
10:03 sroegner joined #salt
10:08 Whissi joined #salt
10:09 ndrei joined #salt
10:13 BogdanR So, I installed salt with the bootstrap script on centos-6.4 and now I would like to upgrade it.
10:13 BogdanR I want to get salt-cloud?
10:13 BogdanR When will the package with the latest version be pushed to epel?
10:18 ckao joined #salt
10:20 yomilk joined #salt
10:20 ay joined #salt
10:20 mike25ro hi guys ... weird issue ... i have 2 servers with identical (in theory) structure... i have installed salt-minion on both of them (centos 6.4) and on the master... for one of them i see the corect fqdn ... for the second just localhost.localdomain . I want to mention that the records in /etc/hosts are correct and the ones in /etc/sysconfig/network are also correct ... is is possible that salt-minion caches some information regarding the hostname? I want t
10:21 andersb joined #salt
10:24 packeteer remove and re-add that incorrect one on the master?
10:28 mike25ro packeteer: i have removed the file from the minions_pre of course
10:28 mike25ro the minions is not accepted yet.. just pending
10:29 mike25ro i have also reinstalled the salt-minion package... on the minion
10:29 mike25ro where does salt-minion get it's grains... or how are the grains generated?...
10:30 Franz___ joined #salt
10:30 mike25ro i suppose the grains['id'] is the ... fqdn that is sent to the master ...
10:34 mike25ro i have managed to find the answer: /etc/salt/minion_id caches the ID of the minion
10:37 pdayton joined #salt
10:39 kalloc joined #salt
10:39 packeteer been a few months since i was a user... busy elsewhere. sorry
10:47 clearclaw joined #salt
10:50 Katafalkas joined #salt
10:52 krak3n` joined #salt
10:54 fllr joined #salt
10:57 oz_akan_ joined #salt
11:02 clearclaw joined #salt
11:10 harobed_ joined #salt
11:17 elfixit1 joined #salt
11:20 zooz joined #salt
11:21 ay_ joined #salt
11:23 symroe joined #salt
11:28 pdayton joined #salt
11:31 pdayton joined #salt
11:35 yota joined #salt
11:38 jeffrubic joined #salt
11:46 Shenril joined #salt
11:48 gadams999 joined #salt
11:48 Franz__ joined #salt
11:52 Whissi joined #salt
11:52 ndrei joined #salt
11:54 fllr joined #salt
11:58 oz_akan_ joined #salt
12:08 sroegner joined #salt
12:10 symroe I have a question about pillars over different envs: https://gist.github.com/symroe/8842926.  Should I post this to the mailing list, or is this a good place?
12:21 Tanoti joined #salt
12:25 brianhicks joined #salt
12:25 Tanoti I'm writing an execution module and need to write out a file that has the same owner, group and permissions as a source file. What is the best way to get the current settings and apply them to the file I am creating?
12:27 ksk Tanoti: we implemented "set_owner_and_group()" in our own internal python lib over here..
12:29 blee joined #salt
12:30 Tanoti ksk: What commands do I need to look up then for the getting and setting of the permissions? I'm new to Python but have been programming in other languages for years so I know what I want to achieve, just not how :)
12:34 ksk Tanoti: see "os" module
12:35 Tanoti ksk: thanks
12:36 ndrei joined #salt
12:37 Katafalkas joined #salt
12:37 jrdx joined #salt
12:38 mike25ro ksk ... i am also quite new to this world... are there some.. good python tutorials? I am used with PHP - have used it for 14 years + ... but i would like to learn py, just wondering what would be a good approach.. or if you guys have already some tips about some good tutorials
12:45 ksk im new to python, too ;)
12:45 ksk and im just learning by doing, not that kind of tutorial guy
12:46 crane i'm not sure... what is salt trying to tell me? http://dpaste.com/1588697/
12:48 Schmidt joined #salt
12:48 sroegner crane: doesn't like your putting file.managed and file.symlink under the nginx id
12:48 jeddi the internetz are full of good python tutorials.
12:49 sroegner b/c they're bot file state
12:49 jeddi prolly the most famous --> http://learnpythonthehardway.org/
12:51 crane sroegner, sorry, i don't get this. i put it now in an own id but i still get the same error
12:52 sroegner crane: but the name (path) _is_ identical right
12:52 ksk crane: i do know you!
12:52 felskrone joined #salt
12:53 sroegner crane
12:53 sroegner crane: nope
12:53 sroegner crane: sry
12:54 fllr joined #salt
12:54 isomorphic joined #salt
12:55 timc3 joined #salt
12:56 timc3 Is there a way of grain matching based upon a package that is installed (not by Salt yet).
12:58 madduck SEJeff_work: not I, joeyh is…
13:05 backjlack joined #salt
13:06 iMil joined #salt
13:06 iMil joined #salt
13:10 crashmag joined #salt
13:19 symroe joined #salt
13:26 faldridge joined #salt
13:26 BogdanR Hi. I am using a jinja template to define the name of the packages dependent on the distro.
13:27 BogdanR Now I have the php-mbstring package required in CentOS, but this package is already included in Debian
13:28 BogdanR If I don't specify it in the Debian section wouldn't it give an error when it looks for that package ?
13:28 Franz__ joined #salt
13:28 pydanny joined #salt
13:42 mpanetta joined #salt
13:42 pydanny joined #salt
13:42 Ahlee timc3: you can set the grain yourself if you find the package present
13:43 ipmb joined #salt
13:43 Ahlee grains.setval mysoftware: version
13:43 Ahlee or something
13:43 Ahlee er, nix that :
13:43 timc3 Ahlee: and how do I find the package present?
13:43 brianhicks joined #salt
13:43 mpanetta joined #salt
13:44 Ahlee you could check for hte presense of a file, check the database of your distro for the file, grep it out from a listing of installed package
13:44 Ahlee depends on how sure you want to be
13:50 rhand joined #salt
13:51 juicer2 joined #salt
13:52 danielbachhuber joined #salt
13:54 fllr joined #salt
13:55 xmj moin, how can i use salt's network.system to set a gateway ipv6 device?
13:55 jslatts joined #salt
14:00 Kenzor joined #salt
14:00 oz_akan_ joined #salt
14:01 _mlen joined #salt
14:01 kermit joined #salt
14:02 timc3 Ahlee: Do I need to create some custom grains to check for the presence of a script?
14:03 Ahlee timc3: grains are just a fact about a system
14:03 Ahlee if you want to use a grain to do that, you certainly can
14:03 Ahlee i.e., http://docs.saltstack.com/ref/states/all/salt.states.grains.html#module-salt.states.grains
14:04 gmoro joined #salt
14:04 oc joined #salt
14:04 Ahlee if you want to target based on a package being installed, you could create a grain to denote the software is installed there
14:04 tessellare joined #salt
14:05 diegows joined #salt
14:05 oz_akan_ joined #salt
14:10 bezaban joined #salt
14:11 lessismore joined #salt
14:14 zzzirk joined #salt
14:15 juicer2 joined #salt
14:15 vejdmn joined #salt
14:19 lessismore Hello, I am watching a ssh_knwon_hosts.present in a git.latest.  The problem is that the ssh_known_hosts.preseent is executed every time I run the highstate.
14:20 lessismore Maybe is because of the chaning of the hostname hash?
14:25 lessismore Oh, got it, I was trying to save both dsa and ecdsa, and they rewrite each others
14:25 oeuftete hmmm... trying to use pkg.latest to upgrade docker (from 0.7.6 to 0.8.0).  But salt insists they already have the latest.  A direct apt-get install shows otherwise.  Ring any bells?  I can post logs.
14:26 lessismore So I guess I can only save the strongest one... wich I guess is the ecdsa.  Someone can confirm?
14:27 lessismore oeuftete: do you have any refresh = False?
14:27 blee_ joined #salt
14:28 oeuftete lessismore: I don't think so
14:29 lessismore I just checked, refresh applies to pgk.installed nont to pkg.latest
14:29 lessismore Maybe you added a non trusted repo?
14:29 blee joined #salt
14:30 BRYANT__ joined #salt
14:30 oeuftete I added the docker repo with its key, if that's what you mean
14:30 dangerousbeans joined #salt
14:31 oeuftete https://gist.github.com/oeuftete/521ce626ec7cd76a0538
14:31 lessismore So you do not have any warning about missing key when run apt-get update?
14:32 oeuftete right, no warning
14:33 lessismore what is the oupute of dpkg -l lxc-docker?
14:34 oeuftete un  lxc-docker                            <none>
14:35 lessismore hmmm, never run into this type of issue...
14:35 lessismore what about do a dry-run test to install it apt-get install -s lxc-docker
14:36 lessismore this should ouput common problem (eg. missing dependecies)
14:36 oeuftete lxc-docker-0.8.0 to be installed, lxc-docker-0.7.6 to be removed, NEW lxc-docker lxc-docker-0.8.0
14:38 oeuftete ok, I just did this on another machine and it worked.  I've lost track of exactly what I've done, but I had installed then removed the 0.8.0 version, so I think that's interfering with the determination of latest somehow?
14:38 lessismore did you removed the repo with the old docker?
14:38 oeuftete the repo?  No
14:39 ipmb joined #salt
14:39 tedski which version is this on?
14:39 oeuftete minion 0.17.5
14:40 tedski okay, just checking... i made some changes to the sources install method on develop recently... wanted to make sure you weren't finding a new bug of mine :)
14:40 tedski *whew*
14:41 oeuftete salt master is 2014.1.0rc1-125-gca52099 ... but I think this issue would be all on the minion side
14:41 lessismore there are some inconsistencies...
14:41 tedski correct
14:41 tedski that's where apt.py (in 0.17.5) runs
14:42 lessismore eg: dpkg -l should show the insalled version that apt-get -install -s show
14:42 lessismore another problem is that also apt-cache -q policy should show the two versions
14:43 lessismore salt called apt-cache -q policy in your pastebin and show only the version 0.8.0
14:43 JasonSwindle joined #salt
14:44 lessismore maybe an apt-get install -f can fix this
14:45 gnu-man1 joined #salt
14:45 blee joined #salt
14:54 fllr joined #salt
14:58 quickdry21 joined #salt
14:58 oeuftete for me to fix it directly on the target machine, a plain old apt-get install will do it.
15:02 racooper joined #salt
15:07 AdamSewell joined #salt
15:07 AdamSewell joined #salt
15:10 Gordonz joined #salt
15:10 lessismore oeuftete: to try to debug it further, what about to install and purge it manually and retry with salt
15:11 tyler-baker joined #salt
15:11 tyler-baker joined #salt
15:11 oeuftete lessismore: meh... for now, I'd kinda rather leave it in the broken state so that if I want to test salt-only solutions or fixes, it's there.  It's only a test VM I use only for salt testing
15:12 ndrei joined #salt
15:12 jeremyBass1 joined #salt
15:13 vejdmn joined #salt
15:13 mapu joined #salt
15:13 vejdmn1 joined #salt
15:14 Gordonz joined #salt
15:15 favadi joined #salt
15:18 jimallman joined #salt
15:18 FarrisG joined #salt
15:19 vejdmn joined #salt
15:19 gadams999 left #salt
15:20 snuffeluffegus joined #salt
15:20 FarrisG joined #salt
15:23 tyler-baker joined #salt
15:23 tyler-baker joined #salt
15:27 kolaman joined #salt
15:27 SaltStackker joined #salt
15:27 SaltStackker hello everyone!
15:27 timc3 Hello
15:29 oeuftete new question: is there a way with the user (or any other) state to add supplementary groups to only users that exist?  Or do I need a cmd.run with an onlyif to achieve that?
15:29 cedwards SaltStackker: hello
15:30 cedwards oeuftete: I believe you can set supplementary groups with the user state, but I'd have to dig up an example
15:30 oeuftete cedwards: yes, I think I can.  But I only want to add the supplementary group if the user already exists, and not create them if they're not already there
15:31 xmj cedwards: do you know why terminalmage's ports/pkg magic on freebsd failed the jenkins tests?
15:31 SaltStackker I'm running a saltmaster and a bunch of minion in a virtualized environment and i'm using git for both the pillar and the saltstates. So far I've only worked with a test environment and now I'm interested in moving from my current provider to AWS (at least for prod) and I'm not sure whether I should use cloudformation or also whether i should use some virtual private cloud and have saltmaster add automatically minions, i'm a bit con
15:31 isomorphic joined #salt
15:32 SaltStackker i've read a few documents and presentations but not sure if all were up to date and what's the current state of affairs with some autoscaling cloud formed environment
15:33 cedwards xmj: I don't
15:34 JasonSwindle joined #salt
15:35 oeuftete in the end, I did this for conditional supplementary group add: https://gist.github.com/oeuftete/8846511
15:39 dccc_ joined #salt
15:39 pydanny joined #salt
15:40 cro joined #salt
15:43 ekristen joined #salt
15:43 ekristen whats the best way to install a package on a whole bunch of systems using salt?
15:44 cedwards ekristen: probably pkg.install
15:45 cedwards ekristen: check out 'salt '*' sys.doc pkg.install' for details
15:45 cnelsonsic joined #salt
15:46 pass_by_value joined #salt
15:46 ekristen thats what I was looking for, thanks
15:46 Kenzor SaltStackker: ever heard of OpenStack + Heat?
15:47 Kenzor https://wiki.openstack.org/wiki/Heat
15:47 fllr joined #salt
15:48 goncalo joined #salt
15:49 fllr joined #salt
15:51 zzzirk joined #salt
15:51 Ahlee hrm. jobs.lookup_jid <valid jid> is just returning (no external job cache on this master, so it's just going to hte filesystem)
15:51 Ahlee thoughts?
15:52 gmoro joined #salt
15:53 SaltStackker Kenzor: I heard of openstack, I didn't know about Heat, I'm reading about it although so far i'm not quite clear on how it would integrate with the saltstates
15:53 alunduil joined #salt
15:54 SEJeff_work madduck, Ah, I mixed up my debian folks. Sorry about that.
15:54 oeuftete lessismore: on my earlier problem about the package upgrade, I think it's clearly that the current version it determines is wrong... it gets "1".  On the machines where it's working, it gets "0.7.5" (for example) before, and "0.8.0" after.  I see that now in the pastebin as well.
15:55 Ahlee stupid zombie master and multiple minion processes
15:55 Gifflen joined #salt
15:55 krak3n` joined #salt
15:55 oeuftete If I run 'salt host pkg.version lxc-docker', I get "1" back on the problem machine.
15:56 Kenzor joined #salt
15:57 MTecknology Installing net-snmpd and setting up v3 users via salt is a surprisingly giant pain in the butt. It makes it incredibly tempting to do just v1
15:59 madduck SEJeff_work: no worries, we are all happy to help.
16:01 che-arne joined #salt
16:02 SEJeff_work madduck, If only you could choose a good init system ;)
16:03 Ahlee I still feel there is no good init system, just less bad ones.
16:03 madduck SEJeff_work: we have one ;)
16:03 SEJeff_work madduck, Debian has standards... ALL OF THEM!
16:03 Ahlee systemd, upstart, launchd, sysvinit... I have a special hatred for them all
16:04 madduck SEJeff_work: you must be mistaken; we have one standard and it's called policy and currently it dictates sysv
16:04 SEJeff_work I don't drink the systemd camp's koolaid. That being said, it is insanely better as a packager and a user than upstart in my experience
16:04 madduck i don't think we should continue the discussion here ;)
16:04 Ahlee i'll agree with that SEJeff_work
16:04 SEJeff_work madduck, That was a lame attempt at humor based on the yak shaving argument with Canonical vs the world
16:04 SEJeff_work fair enough
16:05 anitak joined #salt
16:07 symroe joined #salt
16:07 madduck SEJeff_work: I just can't stand it when other people troll; that's clearly my role ;)
16:08 SEJeff_work As a debian developer, it is your god given right!
16:08 madduck it is my duty
16:08 SEJeff_work +1
16:09 Iwirada left #salt
16:14 timc3 In a salt state or pillar file can I check for the presence of a directory?
16:15 codekoala timc3: http://docs.saltstack.com/ref/modules/all/salt.modules.file.html#salt.modules.file.access ?
16:15 codekoala timc3: better yet http://docs.saltstack.com/ref/modules/all/salt.modules.file.html#salt.modules.file.directory_exists
16:16 timc3 So then I can write that in to my .sls file - sounds good
16:16 pdayton joined #salt
16:16 codekoala I would imagine so... I'm on week 2 with salt
16:16 codekoala only dabbling in my free time
16:16 timc3 codekoala: Same here, though only about 1 week in
16:16 codekoala nice!
16:17 rgbkrk joined #salt
16:19 ggoZ joined #salt
16:19 jalbretsen joined #salt
16:21 kadel joined #salt
16:22 dave_den hurgle
16:23 BenCoinanke joined #salt
16:23 jaimed joined #salt
16:24 JasonSwindle joined #salt
16:24 cachedout joined #salt
16:29 forrest joined #salt
16:31 timc3 In my pillar can't I do something like this: {% if salt.file.directory_exists('/srv/mountedstorage') %}
16:35 tvle joined #salt
16:36 jeremyfelt joined #salt
16:38 rlarkin joined #salt
16:42 forrest Corey, are you around?
16:43 gadams999 joined #salt
16:46 dave_den timc3: you would use the 'salt' dict to execute salt modules from within a template:  {%- if salt['file.directory_exists']('/srv/mountedstorage') -%}
16:47 timc3 dave_den: Can that be in a pillar file?
16:47 ndrei joined #salt
16:47 dave_den timc3: it would be executed on the master if it's in a pillar file.
16:48 timc3 dave_den: So then it wouldn't actually find the correct dir on the minion. I think it's time to fork the formula I was using.
16:53 TronPaul_ joined #salt
16:53 ndrei joined #salt
16:54 TronPaul_ is there any way for a masterless salt minion to use gitfs, or barring that any good guides for periodicly updating salt/pillar for a masterless minion?
16:55 cweisel joined #salt
16:56 lyddonb joined #salt
16:58 dpn` joined #salt
16:59 gadams999 left #salt
17:00 Ahlee It appears that if you grains.setval foo bar, you can't grains -G foo:bar without a restart of the minion, is this a known limitation/bug as far as anybody is aware?
17:00 kermit joined #salt
17:00 Ahlee grains.item foo returns foo, so it definitely has the value
17:00 Ahlee erm, returns bar, but yeah.
17:02 bemehow joined #salt
17:06 fllr joined #salt
17:06 elfixit1 joined #salt
17:06 rgbkrk Ahlee - What are you hoping to store in grains that you can't store in pillar?
17:07 rgbkrk Grains are supposed to be static for minions, with fast lookups.
17:07 rgbkrk From a design perspective.
17:07 Ahlee correct, but pillar matching is annoying
17:08 Ahlee and if setval exists, I'd assume it was immediate
17:08 Ahlee and once I set the value, I want it to be fast lookup, without being dependent on ext_pillar or the likes
17:10 rgbkrk Does it work if you use setval then use saltutil.sync_grains
17:10 rgbkrk oh wait, that's for the _grains folder on the master
17:11 Ahlee yeah, and no, neither saltutil.sync_all nor saltutil.sync_grains allows the newly set grain to be targeted via
17:11 timc3 I've been trying to find documentation on the _grains folder, but haven't found anything yet.
17:11 Ahlee so yeah, I will have to move to pillars, sadly
17:11 ndrei joined #salt
17:12 rgbkrk What were you hoping to store in grains?
17:13 rgbkrk timc3 - yeah, the only docs I've seen for _grains is at http://docs.saltstack.com/topics/targeting/grains.html#writing-grains
17:13 Ahlee i store a variety of information in grains about the server - environment (independent of salt's environemtn), current application responsibility, information about it's physical networking layout, etc
17:13 codekoala Ahlee: what version of salt are you using? I just tried it on a build from git yesterday and it worked without restarting the minion
17:14 Ahlee codekoala: 0.17.2
17:14 codekoala interesting
17:14 Ahlee i'll set up a test environment with 0.17.5 and try again
17:15 rgbkrk That sounds fairly static. Have you tried creating /etc/salt/grains or adding grains to /etc/salt/minion on each minion
17:15 rgbkrk Because then you can actually manage those via git too
17:15 Ahlee rgbkrk: yeah, I know it works with that method
17:15 Ahlee i'm trying to aovid restarting the minion, though, since salt isn't good at restarting minions
17:16 rgbkrk When you bootstrap for the first time though, you only have to restart it once
17:16 rgbkrk If you're having to restart a minion over and over, that sounds non-static and awkward
17:16 Ahlee indeed.
17:17 dave_den Ahlee: strange, it works for me on 0.17.5
17:17 mgw joined #salt
17:17 rgbkrk Sounds like an upgrade will help
17:17 Ahlee ok, 0.17.5 is slated to go to staging Friday
17:17 rgbkrk Sweet
17:18 rgbkrk Will the grains stick around after a restart
17:18 rgbkrk When using setval?
17:18 Ahlee yeah, setval just appneds to /etc/salt/grains
17:18 rgbkrk oh ok, cool
17:18 Ahlee which is why i thought i'd be able to target via setval grains
17:19 _fllr_ joined #salt
17:23 whiteinge Ahlee: sounds like a bug. the new grain should be sent back up to the master's cache
17:23 whiteinge Ahlee: there's a window into the master's current cache with this runner:
17:23 whiteinge http://docs.saltstack.com/ref/runners/all/salt.runners.cache.html
17:24 driks joined #salt
17:27 quickdry21 joined #salt
17:27 rjc joined #salt
17:29 dave_den whiteinge: it wouldn't matter if the grain got back to the master's cache before using 'G@grain:newval', as long as the salt-minion was aware of the new grain itself, right? The salt command is simply published over PUBSUB and it's up to the minion to compare the grain match
17:29 thayne joined #salt
17:29 whiteinge Ahlee: oh also, using the 'at' command to restart the minion seems to be pretty reliable. E.g.,:
17:30 whiteinge echo "/sbin/service salt-minion restart" | at now + 1 minute
17:31 Ahlee whiteinge: yeah, but we don't run atd on servers
17:31 Ahlee so, testing installing then starting at start of restart state, running, then making sure a scheduled shutdown happens after
17:31 whiteinge dang. though that's probably for the best :)
17:31 zzzirk joined #salt
17:32 tvle joined #salt
17:32 Ahlee i can't make anything easy on myself
17:32 whiteinge dave_den: you are very right about that if the pub is actually sent out. if salt immediately returns the "no minions matched, no command sent" message than the master would have short-circuited before the publish
17:33 austin987 joined #salt
17:33 Ahlee whiteinge: looking like mid 20s for your trip here
17:34 whiteinge Ahlee: ^^ dave_den raises a good point. what error do you see when targeting with that grain? may help narrow down where the fail is
17:34 m87carlson joined #salt
17:35 rowleyaj joined #salt
17:35 Ahlee no error, as it's joining other nodes that have the grain
17:35 dave_den i admittedly have not looked at the targeting code in a few months, but even if there is no grain match on the master for any minions, it should still send out the command over pubsub.
17:36 Ahlee in this case, there were already two servers with this app
17:36 whiteinge sounds like dave_den is right then and the fail is on the minions
17:36 whiteinge also: i can handle mid-20's
17:36 Ahlee will poke it a bit after lunch
17:36 * whiteinge packs flannels and whiskey
17:36 Ahlee tis a balmy 7 here now, negative windchills
17:37 xmltok joined #salt
17:37 dave_den as a test, you can run any minion in debug mode and send out:  salt -C 'G@nograin:nowhere' test.ping
17:38 dave_den and you will see the minion checking for the grains teget on the command
17:38 dave_den teget/target
17:42 whiteinge i'm reading salt/client/__init__.py +230 right now. you may be right about that
17:42 JasonSwindle Ahlee:  it is -2 C / 28 F here in South Texas
17:42 whiteinge the jid is created before the pub though so the message is misleading...
17:42 quickdry21 joined #salt
17:43 dave_den I'm surprosed it's not working for Ahlee, though. The grains.setval code just sets the grains in the /etc/salt/minion/grains file, then calls saltutil.sync_grains, which then calls saltutil.refresh_modules, which fires a minion event which is where the salt-minion gets the refresh_modules command and should pick up that new grain setting.  None of that has changed between 0.17.4 and 0.17.5
17:43 utahcon dumb question: salt['pillar.get']('revision_ots', salt['pillar.get']('revision', 'master'))
17:43 bemehow joined #salt
17:44 utahcon will that return the value of revision_ots, or the value of revision (if revision_ots isn't available), or master if both revision_ots and revision aren't available?
17:44 utahcon ie: can you nest pillar.get commands like that?
17:44 bemehow joined #salt
17:44 utahcon is there a better way to get that type of behavior?
17:45 Corey Congratulations to Pedro on being the 4th most merged pull requestor in all of GitHub last year.
17:45 Franz__ joined #salt
17:45 whiteinge +1
17:45 forrest ahh there you are Corey
17:45 Franz__ joined #salt
17:45 Ahlee dave_den: i'm on 0.17.2
17:45 synfin joined #salt
17:46 Corey forrest: Indeed.
17:46 whiteinge utahcon: what you've got should work as you described. that's a fine way to do it
17:46 Corey forrest: Yeah, I was working on a best practices doc, but yours is further along than mine.
17:46 forrest Corey, ahh gotcha
17:46 Corey forrest: Put yours somewhere I can pull request against?
17:47 utahcon whiteinge: thanks
17:47 forrest I wanted to have mine done sooner, but ironically I didn't get sick from the conference, but from my coworkers
17:47 forrest Corey, it's in my repo if you just want to fork off that, I just don't want to push it to the main repo :\
17:47 forrest actually, whiteinge, is there a flag to add to ensure a file isn't built in the docs?
17:48 forrest if we can do that Corey, then I can push it to the main repo
17:48 Corey forrest: No worries, I can pull request against your branch.
17:48 Corey forrest: Link?
17:49 forrest https://github.com/gravyboat/salt
17:49 forrest hopefully  there won't be any upstream merge conflicts
17:50 forrest Corey, keep in mind it's still missing a lot example wise and such, was just trying to hammer it out then refine it later
17:50 Corey forrest: Yours is interesting. I've got a few more to add that are less Salt-specific.
17:51 utahcon joined #salt
17:51 forrest Corey, that sounds good, I was just trying to get some stuff out there to visualize the improvement of states and such, but it still needs quite a few sections
17:52 whiteinge forrest: if you don't want warnings about it not being in the TOC you can put :orphan: at the top (see index.rst for an example)
17:52 whiteinge if you dont' want it built at all you could change the file extension
17:52 whiteinge er. actually there's a config setting to ignore files too
17:52 kaptk2 joined #salt
17:52 whiteinge http://sphinx-doc.org/config.html#confval-exclude_patterns
17:53 forrest gotcha cool
17:54 troyready joined #salt
17:55 Ryan_Lane1 joined #salt
17:55 fllr joined #salt
17:57 philipsd6 I'm happy to see some Best Practices being documented! I've been hammering out my own, and finding it difficult to have a consistent rationale. So thanks forrest, Corey.
17:58 philipsd6 On another topic, has anyone started work on a module for Infoblox IP Address Management (IPAM) ?
17:58 philipsd6 I'm considering spending some effort toward that if I can afford the time, since we use that here.
17:58 forrest philipsd6, yea it's been needed for a while, especially after saltconf
17:58 Gordonz joined #salt
17:59 tvle joined #salt
18:01 forrest I don't think anyone has worked on an infoblox module, that would be cool though.
18:04 Gordonz joined #salt
18:05 philipsd6 They have a web api with python sample code, so maybe it won't be too difficult.
18:06 philipsd6 I have so many things I want to do with Salt, it's hard to focus. :D
18:07 Linuturk joined #salt
18:07 Linuturk what's the best way to map out multiple Rackspace/Openstack regions using salt-cloud map files?
18:08 seanz Greetings, esteemed humans. Is there an event system that lets salt react to system events, as opposed to outside code reacting to salt events?
18:08 Linuturk do I have to create a provider for each region?
18:08 Linuturk can I map a single profile to multiple regions?
18:08 Linuturk profile to provider*?
18:08 cedwards seanz: are you looking for the reactor system? http://docs.saltstack.com/topics/reactor/index.html
18:09 forrest seanz, I was just gonna ask if you were serious or joking since you used reacting so much :P
18:09 Ahlee so I was just unable to reproduce my grain not being targeted
18:10 seanz Not joking, but I read the Salt Event System, which is the opposite of what I was looking for.
18:10 seanz I guess I *am* looking for the reactor system.
18:10 forrest gotcha
18:10 seanz Thanks for the link, cedwards.
18:10 Ahlee of course, the minion that didn't pick up the grain originally wasn't running with debug, so the only thing in the error was zeromq errors, which I'm guessing means the minion was in a bad state and couldn't send back to the master the grains cache
18:11 dave_den seanz: you mean something like udev being able to fire a salt event when a new device is plugged in?
18:11 seanz dave_den: I mean a small daemon or script that can determine when my suck Java process is *finally* ready, as opposed to using a sleep command in a salt state block.
18:12 seanz Something that's a bit more adaptable to different hardware configurations.
18:12 Ahlee but, on yet another minion with the 0mq errors, it just worked
18:12 Ahlee so now i have no idea what happened
18:12 Ahlee if i come up with reproduction steps i'll open an issue
18:15 gadams999 joined #salt
18:16 jankowiak joined #salt
18:17 Ryan_Lane1 joined #salt
18:23 kermit joined #salt
18:25 joehillen joined #salt
18:26 KyleG joined #salt
18:26 KyleG joined #salt
18:31 AdamSewell Is anyone here able to update the salt-cloud package in the Ubuntu ppa repo?
18:31 Ahlee top.sls matching, it runs entire file for environment, rght?  so if i have env=foo, and a '*': and also further down a G@bar:baz, as long as the minion has the grain it will apply states under both * and G@ right?
18:35 Ahlee also, state.highstate also calls saltutil.sync_modules?
18:36 amckinley joined #salt
18:36 juso joined #salt
18:36 amckinley1 joined #salt
18:37 dave_den Ahlee: are '*' and 'G@bar:baz' listed under the 'foo' environment in top.sls?
18:38 Ahlee dave_den: Yes.
18:38 Ahlee just gonna test it now
18:38 Ahlee I so dislike top.sls
18:50 vejdmn joined #salt
18:51 ausmarton joined #salt
18:52 alunduil joined #salt
18:55 Thiggy joined #salt
18:57 JasonSwindle joined #salt
18:59 alunduil joined #salt
19:00 kickerdog joined #salt
19:00 kickerdog hey, is 0.8.11-saucy1 that latest salt release?
19:00 kickerdog salt-cloud*
19:01 JasonSwindle1 joined #salt
19:01 Gordonz_ joined #salt
19:02 cedwards kickerdog: i believe so
19:02 quickdry21 joined #salt
19:02 kickerdog thanks. the default configs don't match up with the new config docs.
19:02 kalloc joined #salt
19:02 TronPaul_ is there a way to invert a grain match? for example match all minions where virtual is not VirtualBox?
19:02 ajw0100 joined #salt
19:03 alunduil joined #salt
19:03 AdamSewell kickerdog, where did you find that?
19:05 dave_den TronPaul_: salt -C '* and not G@virtual:VirtualBox'  http://docs.saltstack.com/topics/targeting/compound.html
19:05 kickerdog i'm on http://docs.saltstack.com/topics/cloud/index.html#using-salt-cloud, but after I installed salt-cloud and started going through, for example /etc/salt/cloud, the default config doesn't seem to match up the documentation so it starts off confusing.
19:05 TronPaul_ dave_den, would that work in a top file?
19:06 TronPaul_ 'not virtual:VirtualBox'?
19:06 dave_den yes. set '- match: compound'
19:06 Ahlee you have to match * and not
19:06 Ahlee you can't just say not
19:06 dave_den there's an example on that page.
19:07 Ahlee ok, i think i finally know how this is supposed to work.  gitfs really, really makes top.sls confusing if you're not smart and check in a top.sls into each branch
19:07 TronPaul_ it'd feel nicer if it wasn't considered compound, but that should work, thanks
19:07 Gordonz joined #salt
19:08 Franz__ Hello..I'm trying to generate rpm packages from source. After cloning the repository and have checked out v2014.1.0rc3
19:09 Franz__ I have tried setup.py to use setyp.py ... but I get error on some man pages missing..anyone can help me?
19:10 Franz__ I'm using a fedora 20
19:13 thayne joined #salt
19:15 nebuchadnezzar joined #salt
19:17 whiteinge kickerdog: the salt-cloud docs that are on saltstack.com are for the version that is included with the latest salt release and not for the old stand-alone version
19:18 kickerdog I get that, but the version of salt-cloud currently in the ubuntu repo contains a lot of defaults for the standalone and not the new method.
19:18 whiteinge yeah. i'm looking now and it doesn't look like the salt-cloud docs for 0.8.11 are online :(
19:19 cro joined #salt
19:19 kickerdog no worries
19:20 whiteinge it would be easy enough to get RTD to build them. the guy that has those powers is traveling today though
19:20 whiteinge you can eyeball them here: https://github.com/saltstack/salt-cloud/tree/develop/salt_cloud/doc
19:20 timc3 Can salt manage a host without the minion installed? I just want to ssh and have some directories setup
19:20 kickerdog whiteinge: thanks!
19:21 Corey whiteinge: WHo has those powers?
19:22 forrest I'm going to guess Dave
19:22 whiteinge looks like redbeard2 is the one with RTD powers for the salt-cloud project
19:22 Corey forrest: Don't be silly, Dave has no real power.
19:22 cedwards timc3: you can try salt-ssh for that.
19:22 forrest Corey, lol
19:22 timc3 cedwards: thanks
19:22 dave_den timc3: http://docs.saltstack.com/topics/ssh/index.html
19:23 forrest whiteinge, that reminds me, is there anyway with the official docs to have versioning like RTD has?
19:23 forrest I can't remember if we talked about this or not at some point
19:23 timc3 dave_den: thanks
19:23 sroegner so here is a real beginner question: does order in top.sls matter?
19:23 whiteinge forrest: yeah, it's on the todo list
19:23 forrest whiteinge, cool
19:23 dave_den sroegner: yes, if you have states or pillars with the same names
19:24 sroegner dave_den: sounds fantastic
19:24 sroegner my puppet-infested mind never even assumed that
19:25 forrest lol
19:25 dave_den sometimes it's not so fantastic.
19:25 dave_den but yes, order does matter
19:25 hunter joined #salt
19:25 mgw2 joined #salt
19:26 sroegner i am trying to mix states files from different formulas and that seems to do the trick
19:26 sroegner just wanted to make sure it's not just coincidence
19:28 vejdmn joined #salt
19:32 alexthegraham joined #salt
19:35 druonysus joined #salt
19:35 druonysus joined #salt
19:35 alexthegraham Stupid new guy question: how to I get only the first value in a list of returned grains values. ie - I want the osmajorrelease first returned value
19:35 cro joined #salt
19:36 forrest alexthegraham, you can use some python stuff in your values, so you could do [0] if it's split by spaces, but if it's dots do a .split('.')[0] or something like that
19:37 kickerdog joined #salt
19:37 Gordonz joined #salt
19:38 alexthegraham salt '*' grains.get osmajorrelease[0] ?
19:39 forrest well, I think osmajorrelease is gonna return something like 7.2.3 right?
19:39 Ahlee no
19:40 alexthegraham Nope, it returns two values on separate lines. osrelease returns it like that.
19:40 forrest ahh ok, the joys of not having some boxes here :P
19:40 Ahlee it https://gist.github.com/jalons/bf2c871c74093913d4f7
19:41 alexthegraham Right, so if I just wanted the '6' from that, how would I get it?
19:41 Ahlee i have similar questions on how to work with the values you get back in the mine
19:41 Ahlee alexthegraham: well, how opposed are you to instantiating a salt.localclient in a python script and manipulating there? ;)
19:42 martoss joined #salt
19:43 alexthegraham That seems like a lot of effort (and extra time) when all I want to do is reference the first value in a list returned by grains. :\
19:43 ndrei joined #salt
19:44 JasonSwindle joined #salt
19:44 Gareth morning
19:44 forrest hey Gareth
19:45 forrest alexthegraham, yea the docs don't have an example of how to pull one of those values from a command line query, I'm trying to remember if there was an example somewhere..
19:46 Ahlee how dirty do you feel? salt \* grains.get osmajorrelease | grep -m 1 - | awk '{print $NF}'
19:46 forrest bleh
19:47 forrest there should be a way to do it straight from the grain call
19:48 cro joined #salt
19:49 alexthegraham I'm with forrest on this one. Should be something as simple as salt '*' grains.get osmajorrelease:[0}, but I haven't found documentation and trial and error is getting me nowhere.
19:50 KyleG osrelease returns "10.0" for me on a BSD 10 system
19:53 n8n joined #salt
19:54 alexthegraham Yup. It returns 6.5 on my CentOS box, but what I want is to have a match in my top.sls file for all os_family:RedHat osmajorrelease:6, but osmajorrelease returns 6 5, not just 6.
19:54 rgbkrk joined #salt
19:56 dlam joined #salt
19:57 erchn joined #salt
19:57 erchn hi all
19:58 erchn anyone know of a way to generate a hash of a string (sha1 or md5, whatever) in Salt/Jinja?
19:58 erchn I don't see a built-in Jinja filter
19:59 erchn maybe a custom module...
20:00 Ahlee erchn: http://docs.saltstack.com/ref/modules/all/salt.modules.file.html#salt.modules.file.extract_hash ?
20:01 erchn ahlee, thanks but I think that only allows pulling the hash of a file, not a string
20:01 Ahlee nope, not it at all
20:01 Ahlee osrry
20:01 erchn np, thanks anyway
20:02 ggoZ joined #salt
20:02 Ryan_Lane1 joined #salt
20:05 Mua joined #salt
20:05 vejdmn joined #salt
20:05 zzzirk is there a way to use gitfs on a masterless minion?  I'm using salt to provision some vagrant instances and want to leverage some salt formulas
20:13 erchn well that was about the easiest module ever written :-)
20:13 erchn aside from test.ping I suppose
20:17 terminalmage xmj: are you talking about the pull request that was merged last night?
20:18 terminalmage for the ports bug?
20:26 jperras hi everyone. Are there any special configurations required to run the test suite on os x?
20:26 oz_akan_ joined #salt
20:26 jperras Other than setting up the project as documented for development
20:26 hunter joined #salt
20:27 pass_by_value joined #salt
20:27 cachedout jperras: Not that I can think of offhand. You need to make sure your python path can see the salt-testing dir.
20:27 jperras right, I've got a virtualenv setup for that
20:27 jperras however, on first run of the tests I receive the following output: http://pastebin.com/vp4X0czh
20:28 cachedout You aren't running a salt master or minion in addition to the tests are you?
20:28 jperras along with some test failures for the tests that (I assume) require a minion
20:28 mgw joined #salt
20:28 jperras cachedout: I am
20:28 cachedout Oh. Shut those down first. :]
20:28 jperras ah, do the ports conflict?
20:29 cachedout That could be what you're seeing here.
20:30 clintberry joined #salt
20:30 n8n joined #salt
20:30 jperras so, is it some sort of PID collision that prevents the tests from running properly?
20:31 oz_akan_ joined #salt
20:31 kalloc joined #salt
20:32 Ryan_Lane1 joined #salt
20:32 clintberry Does anyone know if it is possible to configure virtual machine boxes in sls files? meaning, instead of using the CLI and salt-virt to spin up boxes, I have a state file that says a certain box needs to exist. Then when I run high state on the VM host if those boxes aren't there it creates them?
20:32 cachedout Looks like the IPC sockets can't bind, from the stacktrace you posted.
20:33 jperras gotcha
20:34 fllr joined #salt
20:35 erchn clintberry, I think you're looking for some of the new saltcloud functionality that's not quite released yet
20:36 erchn I believe it's due out in the 2014.1 full release
20:36 clintberry erchn: isn't salt cloud for amazon and such? I am just using salt-virt on kvm
20:36 erchn sorry, you're right, got myself mixed up
20:37 felixhummel joined #salt
20:37 clintberry no worries. There isn't a single sls config example. I don't think salt-virt was meant to work that way
20:38 clintberry I guess I can create my own extension that uses salt-virt to do what I need
20:38 KyleG joined #salt
20:38 KyleG joined #salt
20:47 cewood joined #salt
20:53 Mua_ joined #salt
20:54 quickdry21 joined #salt
20:55 austin987 joined #salt
20:56 bemehow joined #salt
20:57 mgw clintberry: just saw your messages re virt. What is your overall goal?
20:57 clintberry mgw: My goal would be able to re-create my entire stack by just calling high-state. Including creating the appropriate VMs, giving them the correct host names and IPs, etc
20:58 clintberry Maybe I am just being lazy, but that would be so cool
20:59 mgw clintberry: have you looked at overstate?
20:59 clintberry The idea being, I call highstate on my VM host, it looks at the state file and sees that it should have a VM named http-server-01 and it should have 512 of ram. Check if it exists, if not, create it. If ram is different, change the ram, etc
20:59 mgw Is your entire stack always going to be on one VM host?
20:59 clintberry mgw: only briefly. I thought that was for managing multiple salt masters
20:59 clintberry mgw: no, on several hosts
21:00 mgw overstate is for orchestrating actions across minions
21:00 wolfpackmars2 joined #salt
21:00 clintberry oh, I had that wrong. You think that might give me what I want?
21:00 clintberry I will go look at it now
21:00 bemehow in top.sls where only base env is specified are the 'sls state files' evaluated in alphabetical order too, or are they ordered by the precedence?
21:00 ndrei joined #salt
21:01 bemehow http://pastebin.com/FmkM7m1L
21:01 Vivi-Idle joined #salt
21:02 mgw clintberry: I'm not sure, I've actually not used overstate. Depending on your stack, you might look at reactor too.
21:03 clintberry mgw: Okay thanks, i will read that as well.
21:03 mgw http://docs.saltstack.com/ref/states/overstate.html
21:04 mgw http://docs.saltstack.com/topics/reactor/index.html
21:05 clintberry mgw: does my request make sense to you though, or am I thinking wrong?
21:05 Thiggy joined #salt
21:06 clintberry Like my dev stack has a load balancer, two web servers, a database server, all on VMs
21:06 mgw clintberry: yes, that's what reactor and overstate are for, I believe
21:07 oz_akan_ joined #salt
21:08 Mua joined #salt
21:08 mgw clintberry: so you could start the whole thing by firing an event (event.fire_master), have reactor listening for that event, and then fire off overstates, cmds, state runs, etc to build up your stack. I've used the event system in a custom runner too, watching for systems to come up before proceeding to the next step.
21:09 clintberry okay, that makes sense
21:12 joehoyle joined #salt
21:13 mgw clintberry: I'm not sure how you'd keep track of ensuring all your workers were up before bringing up the LB. I believe there is some work on a more complex reactor system. basepi might have more info on that.
21:14 clintberry cool, I will check it out
21:15 fllr joined #salt
21:17 xmltok is there a high convienence, low security mode to the salt master where it will override a minion key if it already exists? i have a problem with reused hostnames in my internal cloud
21:18 xmltok open_mode?
21:18 mgw xmltok: yes
21:18 mgw but, as they say, never use that
21:19 joehoyle Hey, I have the custom ec2 grains, but the items are only incldued in grains.items like 20% of the time when caliing it from the master, any idea why that would be?
21:23 Katafalkas joined #salt
21:26 basepi clintberry: yes, we're currently working on an advanced reactor system built on a library called IOFlow, stay tuned for more information in the coming months
21:26 basepi it will allow us to make more informed decisions than reacting to a single event.
21:26 clintberry awesome, thanks basepi
21:27 mgw basepi: yeah, that's what I was talking about… is it only part of raet at the moment? (looking for it in the code)
21:27 basepi Yes, I think RAET is the first place it will be heavily used
21:27 basepi But we're going to extend it to the reactor as well
21:28 basepi (I don't know many more details, I'm not really involved with that part of the project)
21:28 bhosmer joined #salt
21:30 pdayton left #salt
21:35 blee_ joined #salt
21:35 kalloc joined #salt
21:36 jalbretsen joined #salt
21:43 zzzirk joined #salt
21:47 alekibango joined #salt
21:50 hunter joined #salt
21:50 gnu-man1 joined #salt
21:52 UtahDave joined #salt
21:52 gnu-man1 joined #salt
21:52 UtahDave forrest: ANN:  I'm back!
21:53 forrest I'm surprised to see you back online already
21:53 forrest assumed you would sleep for a few days
21:54 ChoHag Olin McBastard, +Smith has been possessed!
21:55 Gareth damn.  Now we have to stop talking about UtahDave.
21:57 dfinn joined #salt
21:58 dfinn I'm running into an issue where I think salt should be refreshing a service but it doesn't seem to be working.  i've got salt configuring to manage the salt-minion config files on all the minions.  it should restart the minion when it sees a change to /etc/salt/minion but that doesn't seem to be happening.  does this look correct?
21:58 dfinn http://pastebin.com/7p9TiuGG
21:58 UtahDave lol. thanks, gareth!
22:00 UtahDave dfinn: I think that looks correct.  Which os are you on?
22:00 forrest dfinn, salt has a hard time restarting the minion itself, this was suggested earlier echo "/sbin/service salt-minion restart" | at now + 1 minute
22:01 dfinn how would that actually look in the sls file?
22:01 dfinn i'm on cent 6.4
22:01 whiskybar joined #salt
22:03 [diecast] joined #salt
22:03 rlarkin joined #salt
22:04 ajw0100 joined #salt
22:06 atom_ joined #salt
22:07 kickerdog joined #salt
22:07 synfin joined #salt
22:10 synfin joined #salt
22:12 rlarkin Is anyone running salt states in a jenkins job?
22:13 ChoHag Hah! Salt.
22:13 ChoHag I thought this was dwarf fortress. Sorry.
22:13 dirjaway Hah! Pepper.
22:13 ChoHag Only just noticed.
22:16 UtahDave rlarkin: look at jenkins.saltstack.com
22:17 hunter joined #salt
22:17 kermit joined #salt
22:18 JasonSwindle UtahDave:  Howdy!
22:19 rlarkin I've been looking at that.  I can't click the 'configure' to see how the execute shell commands are written...when I run salt 'somenode' state.highstate the job FINISHES a few seconds later even though it takes 10 minutes to run.
22:19 seanz left #salt
22:19 toofer joined #salt
22:19 ajw0100 joined #salt
22:21 rlarkin I've tried wrapping ina script and then prefixing with #!/bin/bash , or exec...
22:22 rstone joined #salt
22:22 dfinn UtahDave, I tried this but it still didn't restart the minion: http://pastebin.com/k8NuaCzm
22:22 Corey ...and UtahDave returns.
22:22 UtahDave hey, JasonSwindle!
22:22 UtahDave Corey, my man!
22:23 Corey UtahDave is just happy that I let him be the big spoon in Brussels.
22:23 UtahDave rlarkin: the user jenkins is running as must have rights to execute the Salt commands.
22:23 blee_ whoa
22:23 blee_ shit just got real
22:23 JasonSwindle Corey:  Howdy!
22:23 rlarkin Oh, yeah, I did configure jenkins to run as root.
22:23 hunter joined #salt
22:23 UtahDave rlarkin: let me check the confiugurateion
22:24 rlarkin ThankYou
22:24 UtahDave ha ha, Corey.   :)
22:27 Bryan joined #salt
22:28 pydanny joined #salt
22:29 thayne joined #salt
22:29 christopherl joined #salt
22:30 aleszoulek joined #salt
22:32 christopherl can someone take a look at this salt-cloud error, i'm so confused. http://pastebin.com/AJBNuKhj
22:32 JasonSwindle christopherl: Can we have the map file named cloud ?
22:33 christopherl one sec
22:34 christopherl http://pastebin.com/2ZZHKXCQ
22:35 kalloc joined #salt
22:36 UtahDave rlarkin: here's some screenshots of the configuration page:  https://www.dropbox.com/sh/8u926hwuvutik0b/xrNfYZK07L
22:38 rtty joined #salt
22:38 rlarkin thx UtahDave!
22:39 UtahDave you're welcome1
22:39 rlarkin I see one difference is you're calling a python script and I've been wrapping in a bash script.
22:40 rlarkin env is probably different
22:42 Mua_ joined #salt
22:47 JordanRinke_ joined #salt
22:49 hunter zzzirk: did you figure out if gitfs works on masterless minions?
22:52 dfinn i know this isn't the right place but it's related to this hack I'm trying to put in place to get the minion to restart when it's config file is updated.  anyone know how to tell the at command to not send an email for a job?
22:52 joehillen left #salt
22:52 joehillen joined #salt
22:53 zzzirk no, I haven't
22:53 snuffeluffegus joined #salt
22:53 dfinn i was able to get it to work with the at command but it is going to send an email every time, which means every high state, which means every half hour form every server.  kind of annoying
22:54 dfinn so I'm trying something like sleep 5m && /etc/init.d/salt-minion restart but that doesn't work, it ends up stopping the minion and never starting it
22:54 Gordonz joined #salt
22:56 hunter zzzirk: if you do ping me - I'd love to use that too.
22:56 zzzirk will do.  in the short term I've just clone the repos in question, but I would rather not have to do tht
22:57 hunter That was my plan as well. I can live with that but like you would prefer not to.
23:01 hunter joined #salt
23:04 sroegner joined #salt
23:07 zzzirk exactly
23:08 martoss joined #salt
23:14 yomilk joined #salt
23:16 zzzirk at one point I spun up another vagrant VM as a salt master and used that as a solution, but that also is less than ideal for my situation
23:18 christopherl left #salt
23:21 ggoZ1 joined #salt
23:22 ggoZ2 joined #salt
23:27 alekibango joined #salt
23:28 Gifflen joined #salt
23:29 dfinn ah crap, using the at command won't work even once I got it to not email.  every time that sls is run it restarts salt-minion and it looks like salt-minion does a high state every time it's started so that creates a nice little loop of constantly restarting
23:30 elfixit1 joined #salt
23:31 UtahDave dfinn: the minion should only do a highstate on startup if you configure the "startup_states" option in its config
23:31 dfinn I didn't configure that and it's doing that on it's own
23:31 dfinn let me double check the config
23:31 dfinn nope, it's commented out
23:33 kloplop321 joined #salt
23:33 kloplop321 I must congratulate you on your persistence and progress.
23:33 kloplop321 gah, wrong channel
23:33 KyleG lol
23:34 kloplop321 I have a possibly ill-informed question.
23:34 alunduil joined #salt
23:35 hunter joined #salt
23:35 kloplop321 How should a minion use the salt event system to notify another minion that aggregates these specific events?
23:35 kloplop321 I feel like trying to send over the minion socket isn't right.
23:35 kalloc joined #salt
23:39 kaptk2 joined #salt
23:39 jnials joined #salt
23:39 jalbretsen joined #salt
23:39 joehillen joined #salt
23:41 joehoyle joined #salt
23:58 reign joined #salt
23:59 sctsang Hi All, I was wondering if there is a way to cmd.run, that will return the output and error codes.
23:59 che-arne joined #salt

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