Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-06-16

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

All times shown according to UTC.

Time Nick Message
00:01 SheetiS I've not actually used the pkgrepo state on a non-rpm based linux distro... I had no idea of issues with custom repos for deb packages, heh.
00:10 benegget_ joined #salt
00:12 Ryan_Lane seems it only checks the apt keys if the sources file needs to be changed...
00:12 * Ryan_Lane grumbles
00:13 jonlangemak joined #salt
00:15 cberndt joined #salt
00:17 druonysus joined #salt
00:17 druonysus joined #salt
00:17 julez joined #salt
00:20 beneggett joined #salt
00:22 ProT-0-TypE joined #salt
00:24 murrdoc Ryan_Lane:  it is known
00:24 murrdoc that pkgrepo stinks for everything non ppa, but thats because has a lil bit of stink to it
00:24 murrdoc thoughts on doing a compound match for a pillar, with a : in it
00:25 Ryan_Lane you can change the separator
00:25 murrdoc what i want to is is salt -C 'I@"lvl1:lv2":value' test.ping
00:25 Ryan_Lane there's also a way to match :
00:25 murrdoc there is ?
00:25 Ryan_Lane I don't remember what it is
00:25 Ryan_Lane I opened a bug on this ages ago
00:25 c10 joined #salt
00:25 druonysus joined #salt
00:26 Ryan_Lane https://github.com/saltstack/salt/issues/5799
00:26 MatthewsFace joined #salt
00:28 murrdoc so use :: ?
00:33 rojem joined #salt
00:34 murrdoc thanks Ryan_Lane
00:40 rojem_ joined #salt
00:42 Ryan_Lane yw
00:43 Not_ joined #salt
00:43 Not_ left #salt
00:47 andrew_v joined #salt
00:48 XenophonF joined #salt
00:49 XenophonF anyone here running salt on opensolaris or one of the other illumos distributions?
00:49 nahamu On SmartOS.
00:49 nahamu We're pretty happy with it.
00:49 XenophonF how did you install it? from pkgsrc?
00:50 nahamu I'd been building standalone tarballs, but that build process recently broke and I haven't had time to debug it or redo it.
00:50 XenophonF gotcha
00:50 XenophonF hm, i might give smartos a try, then
00:50 nahamu (it was the way they used to do the Windows build, but they stopped)
00:50 XenophonF oh ok
00:51 nahamu SmartOS is very opinionated.
00:51 nahamu If it works for you it's great, but if you want a more traditional server I'd look at OmniOS first.
00:51 XenophonF well traditional for me would be sunos4 ;)
00:51 nahamu heh
00:52 XenophonF i'll look up omnios, too
00:53 XenophonF i'm running openindiana's hipster branch atm, but the package select is pretty bare
00:53 nahamu my build system (which is documented in the salt repo under pkg/smartos/esky) works for the 2014.1 and 2014.7 releases
00:53 XenophonF like, python 2.6 and not much extra
00:53 nahamu oh, OmniOS's package selection is even more bare
00:53 nahamu but you could use pkgsrc on top of that.
00:54 XenophonF at that point i might as well use smartos
00:54 nahamu if you're building a NAS you might find SmartOS gets in your way more than it helps
00:54 XenophonF nah, i'm just screwing around
00:55 nahamu if you want to run machines full of zones and VMs SmartOS is great.
00:55 XenophonF more exploratory than anything else
00:55 nahamu then try it all and see what you like. :)
00:55 XenophonF i might later try playing with manta
00:55 XenophonF it's piqued my interest
00:55 XenophonF thanks again nahamu
00:56 nahamu https://github.com/saltstack/salt/tree/2014.7/pkg/smartos/esky is where my notes are on "building" salt.
00:56 XenophonF got it
00:56 nahamu the end result is a tarball that's very easy to work with.
00:56 nahamu http://us-east.manta.joyent.com/nahamu/public/salt/salt-2014.7.5-esky-smartos.tar.gz is the latest one that should work.
00:56 rojem joined #salt
00:57 nahamu also have http://us-east.manta.joyent.com/nahamu/public/salt/salt-2014.1.13-esky-smartos.tar.gz if you needed something older to work with existing 2014.1 masters
00:57 nahamu have fun!
00:57 nahamu (in theory those tarballs should also work on OmniOS)
01:04 cruatta joined #salt
01:09 ageorgop joined #salt
01:11 markm joined #salt
01:12 otter768 joined #salt
01:13 rojem_ joined #salt
01:18 Xiao joined #salt
01:20 jonlangemak joined #salt
01:22 renoirb_ joined #salt
01:25 bhosmer_ joined #salt
01:26 c10 joined #salt
01:27 david_an11 joined #salt
01:29 beauby joined #salt
01:32 rojem joined #salt
01:33 jonlangemak joined #salt
01:33 Guest89 joined #salt
01:46 rojem_ joined #salt
02:03 Nazca joined #salt
02:04 rojem joined #salt
02:04 amcorreia joined #salt
02:06 julez joined #salt
02:08 mapu joined #salt
02:08 beauby joined #salt
02:10 rojem joined #salt
02:10 pipeep joined #salt
02:17 rojem_ joined #salt
02:27 blue0ctober joined #salt
02:28 blue0ctober is there a way to create a folder with a salt sate? I
02:28 blue0ctober I'm trying to create some symlinks to a folder that doesnt exisit
02:28 blue0ctober *
02:37 Gareth blue0ctober: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.directory
02:38 blue0ctober Gareth my google fu has failed me ty Gareth
02:38 Gareth no worris.
02:38 Gareth docs.saltstack.com is a good reference.  so are the sys.doc and sys.state_doc functions.
02:39 favadi_ joined #salt
02:41 beneggett joined #salt
02:43 writtenoff joined #salt
02:48 michelangelo joined #salt
02:52 favadi joined #salt
02:53 beauby joined #salt
02:54 dalexander joined #salt
02:57 murrdoc joined #salt
03:02 onorua joined #salt
03:09 cilkay Hello. I'm using a masterless minion. How do I ensure that some states are only invoked once. For example, once I've created the systemd script and enabled it for pm2, I don't have to do it ever again.
03:09 beauby joined #salt
03:09 timoguin joined #salt
03:10 cilkay Right now, the first time through, I'm doing "call-state --local state.highstate"
03:11 cilkay When I deploy code, for example, I only need to restart pm2. I don't have to create the systemd script and enable it all over again.
03:12 Aidin joined #salt
03:15 c10 joined #salt
03:19 theologian joined #salt
03:22 otter768 joined #salt
03:26 ageorgop joined #salt
03:26 druonysus joined #salt
03:32 eichiro joined #salt
03:34 nickg joined #salt
03:35 nickg i'm trying to use saltstack with aws and maybe im missing something but it doesnt appear as though salt-cloud was designed for use with aws autoscaling.  is that accurate?
03:45 favadi_ joined #salt
03:46 Prathee joined #salt
03:46 favadi_ joined #salt
03:46 evle joined #salt
03:49 smcquay joined #salt
03:53 prathee joined #salt
03:54 prathee is there a way to compare the .conf file present in the master and the minion, and if a difference is found in the contents of the two files, to be able to send a notification to the user asking if the changes are to be accepted...if the user(master) says 'yes' ..then no need to pull the .conf file from the master in the next run...if the user(master) says 'no' , then to overwrite the .conf file in the minion with the original copy fr
03:57 prathee original copy from the master*
04:00 Furao joined #salt
04:15 clintberry joined #salt
04:21 timoguin joined #salt
04:27 stanchan joined #salt
04:34 ITChap joined #salt
04:36 Xiao joined #salt
04:37 bfoxwell joined #salt
04:41 __number5__ nickg: you are right about salt-cloud, look at boto_asg/boto_lc states instead
04:46 prathee joined #salt
04:52 SheetiS joined #salt
04:52 mohae joined #salt
05:01 c10 joined #salt
05:06 ajw0100 joined #salt
05:18 catpigger joined #salt
05:22 cberndt joined #salt
05:22 Xiao joined #salt
05:23 otter768 joined #salt
05:23 TyrfingMjolnir joined #salt
05:24 Guest89 joined #salt
05:31 julez joined #salt
05:42 ggoZ joined #salt
05:44 malinoff joined #salt
05:48 Furao joined #salt
05:49 rdas joined #salt
05:52 bitwise joined #salt
06:02 colttt joined #salt
06:05 ramaseshan joined #salt
06:06 AndreasLutro joined #salt
06:06 ajw0100 joined #salt
06:07 bitwise joined #salt
06:11 flyboy joined #salt
06:19 wvds-nl joined #salt
06:23 stoogenmeyer joined #salt
06:31 c10 joined #salt
06:44 KermitTheFragger joined #salt
06:53 zz_ashmckenzie joined #salt
06:56 ndrei joined #salt
07:01 eseyman joined #salt
07:01 thalleralexander joined #salt
07:03 certainty joined #salt
07:08 itru joined #salt
07:09 Romlok joined #salt
07:18 kawa2014 joined #salt
07:18 trikke joined #salt
07:20 prathee joined #salt
07:21 fredvd joined #salt
07:22 Corey joined #salt
07:24 otter768 joined #salt
07:26 soren joined #salt
07:28 bluenemo joined #salt
07:29 julez joined #salt
07:30 Brew joined #salt
07:32 lb1a joined #salt
07:36 Grokzen joined #salt
07:43 c10 joined #salt
07:45 markm joined #salt
07:46 chiui joined #salt
07:49 joeto joined #salt
07:50 julez joined #salt
07:54 c10 joined #salt
07:55 dRiN joined #salt
07:57 al joined #salt
07:58 ggoZ joined #salt
07:58 ggoZ Hi guys
07:58 AndreasLutro hello
08:02 stoogenmeyer hey how would I go about leaving '{{' and '}}' intact in a jinja template, is there a different way then {% raw %}
08:02 ggoZ Does anyone has any examples of how to properly lookup job info through python api?
08:02 arount joined #salt
08:02 AndreasLutro stoogenmeyer: you could do {{ '{{' }}
08:03 arount hi folks, according to this page: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html any method exist to remove file ? I tried to do something like "file.remove" and "file.removed", but salt said "State 'file.removed' was not found in SLS 'nagios'"
08:04 arount I just want to remove a file in minion
08:04 AndreasLutro arount: absent will do it
08:04 ggoZ `runner.cmd` fails with exception, cmd_asyn/cmd_sync also fails with different kind of errors, and salutil.find_job returns empty results :(
08:04 arount AndreasLutro: always here to save my day, do you sleep or you are a vampire ?
08:04 arount AndreasLutro: thx btw :)
08:05 AndreasLutro not at all, I'm here on a strict 8-16 schedule ;)
08:06 arount AndreasLutro: I understood, your secret is safe with me
08:10 Xevian joined #salt
08:12 ProT-0-TypE joined #salt
08:16 ange hal58th: I changed it, apparently that's not the issue, still getting a render error
08:17 prathee joined #salt
08:18 ggoZ mkay, so how do I access jobs cache from different user than the one the salt-master is running on?
08:24 ange if anyone managed to get the ec2 autoscale reactor running without a render issue please ping me
08:26 guanophobic joined #salt
08:34 s_kunk joined #salt
08:35 CeBe joined #salt
08:35 s_kunk joined #salt
08:40 lothiraldan joined #salt
08:40 PI-Lloyd is there a way I can import specific key values from pillar into another pillar. I want to include some components of a pillar file but not the whole thing
08:42 FredFoo joined #salt
08:45 c10 joined #salt
08:47 ndrei joined #salt
08:47 babilen PI-Lloyd: There are no "pillar redirects" or "partial pillar updates" or things like that AFAIK
08:48 babilen (and you can't reference pillars in pillars either)
08:48 PI-Lloyd well that sucks
08:49 julez joined #salt
08:49 stanchan joined #salt
08:50 PI-Lloyd so can't even use a jinja "from <file> import <key>:<value>" ?
08:50 AndreasLutro you can {% set var = 'foo' %} and import it that way
08:51 babilen In a different pillar?
08:51 ingslovak joined #salt
08:51 AndreasLutro yeah
08:51 babilen How would you import a fully rendered pillar in another pillar?
08:52 PI-Lloyd I guess using an assignment as AndreasLutro would work as you would be importing the value
08:52 AndreasLutro er, let me clarify... you can {% set var = 'foo' %} in pillar a, and in pillar b {% from 'pillar_a.sls' import var %}
08:52 ndrei joined #salt
08:52 AndreasLutro I do that in a couple of cases
08:52 babilen I mean you can organise pillars in some sensible way using whatever yaml or Python allows you, but you simply can't say something like "foo:bar" should have the same value as "baz:bar" in the fully rendered pillar which is, I think, what PI-Lloyd wants to do
08:53 PI-Lloyd ok the scenario is... we have a cluster, with auth on it. user/pass are stored in pillar. We need to pull that from the pillar for that role and apply it to an application config
08:54 PI-Lloyd the way i'm thinking is that if we ever need to change that password, it's done in one place
08:54 PI-Lloyd rather than... changed it there, now where else it is stored
08:54 ange very odd (autoscale ec2 reactor still) : the notification comes in, the node is added ( I can see it in the salt-key list) and seems to be prepared a bit ( I can see the salt-minion deamon running and the custom grains set) but it fails to go further it seems and I can't get grains from the node (salt '<node id>' grains.items returns nothing, a  test.ping also  hangs and returns nothing)
08:54 ange https://gist.github.com/mcansky/2fe75bdc43be90c7721e
08:54 babilen But then "pillar" is an inherently ambiguous term in that it refers to the SLS file itself and the rendered form of those files (i.e. the resulting dictionary)
08:54 AndreasLutro true
08:55 AndreasLutro PI-Lloyd: you could, instead of providing the password in the application's pillar, provide a pillar key
08:56 AndreasLutro then do something like password: {{ salt['pillar.get'](application.password_pillar_key) }}
08:56 babilen PI-Lloyd: I'd simply organise it in YAML and then do the references in there. What I would love in that case would be a way to assign this in a "static" pillar that can then be explicitly referenced later on. Alas it does not yet exist (cf. https://github.com/saltstack/salt/issues/23910 )
08:57 sgargan joined #salt
08:57 babilen Or you just don't introduce that level of redirection at all and simply reference the original pillar to begin with
08:57 babilen (but that might conflate some concepts)
09:01 PI-Lloyd hmm, that needs to get implemented soon. That would solve so many problems we've had recently
09:03 sgargan joined #salt
09:04 cberndt joined #salt
09:09 sgargan joined #salt
09:13 ange I think the issue was between the keyboard and the chair ...
09:21 KermitTheFragger joined #salt
09:21 aqua^c joined #salt
09:22 cheine Shouldn't the 'docker.running' state create missing containers from the specified image? Because I get an error "could not be resolved to an existing container".
09:24 babilen cheine: That is correct
09:25 ndrei joined #salt
09:25 otter768 joined #salt
09:25 cheine I get this message: https://gist.github.com/cmhe/83f14c9c5f5afc54d18a
09:25 babilen Are you sure that the name of the container can be resolved? (i.e. have you set "image" to an image that does exist?)
09:27 cheine I will check. Maybe the error message is wrong then?
09:28 cheine No, if the image is missing, I get: "Comment: image "not existing" does not exist"
09:36 supersheep joined #salt
09:39 cheine Hmm... apparently also docker.installed has its problems: https://gist.github.com/cmhe/3fd556c87bb2de9725d6
09:59 iamtew joined #salt
10:01 joeto hi guys, I am tring to use http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.postfix.html to modify postfix main.cf, but inside sls faile is it possible to use this?
10:03 Sacro joeto: you use states inside state files
10:04 c10 joined #salt
10:04 AndreasLutro joeto: there doesn't seem to be any states that use that module, but you can use the "module" state functions to execute arbitrary module functions http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
10:10 joeto 10x guys, looks like this module cant be called in sls
10:10 joeto or at least I cant :D
10:12 joeto it return only errors whatever I do to make it works
10:12 shyju joined #salt
10:13 felixhummel joined #salt
10:15 keimlink joined #salt
10:17 babilen joeto: If you have to change a variety of things you might be interested in managing it explicitly with https://github.com/saltstack-formulas/postfix-formula
10:20 ksj joined #salt
10:23 aqua^c joined #salt
10:49 shyju left #salt
10:54 giantlock joined #salt
10:58 Furao joined #salt
11:02 ndrei joined #salt
11:03 prathee joined #salt
11:04 svetlana joined #salt
11:05 c10 joined #salt
11:11 iamtew joined #salt
11:19 c10 joined #salt
11:21 Berty_ joined #salt
11:26 otter768 joined #salt
11:26 sieve joined #salt
11:26 sieve mine_functions:
11:26 sieve network.ip_addrs: [eth0]
11:26 sieve grains.get: ['ec2']
11:26 sieve grains.get: ['localhost']
11:26 sieve This does not work :) "Pillar render error: Rendering SLS 'ip' failed."
11:27 sieve How can I pull multiple grains into the mine?
11:27 sieve I guess it does not like 2x grains.get.
11:27 sieve grains.get: ['ec2'], ['localhost']
11:27 sieve or grains.get: ['ec2', 'localhost']
11:28 sieve didnt seem to work
11:28 sieve I made an issue on Github:
11:28 sieve https://github.com/saltstack/salt/issues/24699
11:35 AndreasLutro sieve: you can't have duplicate keys in yaml. see https://docs.saltstack.com/en/develop/topics/mine/index.html#mine-functions-aliases for an example on how to work around it
11:38 arount sieve: not sure but maybe this ? http://pastebin.com/7WeB1JRb
11:38 arount arf, to slow :)
11:39 arount too*
11:42 moos3 joined #salt
11:43 yuhl_work___ joined #salt
11:45 aqua^c joined #salt
11:48 unused_phd joined #salt
11:49 GabLeRoux joined #salt
11:58 aparsons joined #salt
11:59 aparsons_ joined #salt
12:02 flyboy82 hi all, quick one. How do I define a multiline in a state in which I want each line to begin with 2 spaces?
12:02 linjan joined #salt
12:04 jonlangemak joined #salt
12:04 bluenemo joined #salt
12:05 AndreasLutro flyboy82: multiline what? string? what's the context?
12:05 flyboy82 yes, string
12:06 flyboy82 i want to replace a line with a multiline but want 2 spaces indentation in the file I'm working on
12:07 mage_ hello, any idea if I can use macros like thins in Jinja https://dpaste.de/JVeC/raw ?
12:07 mage_ it doesn't seems to work
12:08 mage_ I'm looking for a way to create a function with a param and return a dict that I could (re)use in my templates
12:09 blub_ joined #salt
12:09 AndreasLutro flyboy82: if you use either > or | to denote a multiline string in yaml, I think one of them will respect indentation - try that
12:09 flyboy82 | doesn't, I'll try with >
12:09 AndreasLutro mage_: you can use macros, yes - which part of this isn't working
12:10 AndreasLutro ?
12:10 blub_ hello there, I have a small question regarding formulas. I am trying to use this one here https://github.com/saltstack-formulas/apache-formula - which is working fine - but how to go about removing vhosts again?
12:11 flyboy82 > doesn't insert newlines
12:12 teryx510 joined #salt
12:12 AndreasLutro flyboy82: the file you're writing to, is it a file.managed with jinja templating or something else?
12:12 mage_ AndreasLutro: it looks like I can't do {% from "some/path/macros.jinja" import webapp with context %} {% set foo = webapp(somename) %} then use foo.webapp, foo.clone_dir, etc
12:12 blub_ would I have to use /etc/apache2/sites-enabled/vhostname.conf with file.absent or is there something else which is best practise when using formulas like this?
12:12 AndreasLutro mage_: well, jinja macros don't return objects, they're not functions - so that makes sense
12:13 AndreasLutro blub_: yes you would, it doesn't look like the formula takes this into account
12:13 mage_ AndreasLutro: yeah.. so no way to return a dict from a jinja macro :(
12:14 blub_ AndreasLutro: you mean doesnt take into account that someone would like to remove it again?
12:14 mage_ what should I use then ?
12:14 AndreasLutro blub_: yeah. in my states I have {% if enabled %} file.symlink for sites-enabled {% else %} file.absent {% endif %}
12:14 mage_ is there a simple way to "register" a custom function in salt and use it in my templates ?
12:15 AndreasLutro mage_: you could write a custom module
12:15 AndreasLutro which functions you can call with salt['module.function']
12:15 mage_ and how do I "register" my module in salt ?
12:16 AndreasLutro I don't remember, I think you just create a _modules directory in one of the file_roots
12:16 AndreasLutro docs should have you covered
12:16 mage_ ok :) I'll take look, thanks
12:16 blub_ AndreasLutro: ow ... i see. You didn't make a formula out of it i guess ? :-)
12:17 AndreasLutro blub_: nah I don't use formulas, I just keep every state in the main repo
12:17 AndreasLutro blub_: I can share the web state sls if you like
12:18 AndreasLutro but it probably contains a lot of noise
12:18 blub_ AndreasLutro: I would also have to reload that thing ... hmmm ... file.absent with watch_in ?
12:18 AndreasLutro blub_: yep
12:18 blub_ AndreasLutro: i dont mind noise ... i am used to it haha
12:18 blub_ AndreasLutro: Selectively deaf
12:19 AndreasLutro ok then! https://bpaste.net/show/18e0fbd72ba8
12:19 mage_ #extension_modules: <no default> .... should be that
12:23 blub_ AndreasLutro: that looks less noisy than I expected haha :-) thank you very much
12:25 trikke joined #salt
12:26 blub_ AndreasLutro: Awesome
12:26 c10 joined #salt
12:27 AndreasLutro good :p
12:27 cheine joined #salt
12:34 ggoZ joined #salt
12:35 ageorgop joined #salt
12:35 slav0nic joined #salt
12:36 hatchetjack joined #salt
12:38 c10 joined #salt
12:42 aparsons joined #salt
12:43 aparsons_ joined #salt
12:45 sieve AndreasLutro: Sadly that Alias example makes little sense to me
12:46 bhosmer joined #salt
12:46 aqua^c joined #salt
12:46 AndreasLutro sieve: it's just to prevent conflicts, if I have a website that responds to domain.com and sub.domain.com I don't want another website that also responds to sub.domain.com
12:47 jonlangemak joined #salt
12:48 sieve arount: It just uses the first item in the list and ignores the rest
12:49 sieve AndreasLutro: I get the idea of Aliases but I cant see how to adapt this for "grains.get"
12:49 mage_ AndreasLutro: https://dpaste.de/tRrU any idea ? :)
12:52 AndreasLutro sieve: no idea about that, I don't really use grains for anything but os detection
12:52 AndreasLutro mage_: one of your foo.get() calls are not on an object, turn on debug logging, you should find the line number in the stack trace
12:52 onorua joined #salt
12:53 mage_ let me check..
12:54 AndreasLutro oh actually nevermind
12:54 AndreasLutro mage_: in python you need __salt__['pillar.get']
12:54 mage_ ah..!
12:54 mage_ that should be that
12:55 trikke joined #salt
12:55 mage_ why __salt__ in python and salt in templates ?
12:55 AndreasLutro __getitems__ is the function being called under the hood when you do foo['bar']
12:55 AndreasLutro because double underscore is how you do globals in python, whereas in jinja it doesn't really matter
12:56 mage_ ok works better with __salt__ thanks
12:57 subsignal joined #salt
13:09 amcorreia joined #salt
13:12 FeatherKing joined #salt
13:14 fredvd joined #salt
13:14 Xevian joined #salt
13:19 keimlink joined #salt
13:22 mapu joined #salt
13:23 stoogenmeyer joined #salt
13:24 ferbla joined #salt
13:25 murrdoc joined #salt
13:26 wvds-nl joined #salt
13:27 otter768 joined #salt
13:27 ndrei joined #salt
13:28 Johann joined #salt
13:30 racooper joined #salt
13:31 giantlock joined #salt
13:35 Johann Hi guys - I thought I was on a minion but was salt master and executed rm -rf /var/cache/salt. I was able to restore that directory on the master from the prior day's snapshot.
13:35 tmmt ~.
13:35 Johann However the minion/master communication is now broken
13:36 Johann Here is the minion log: https://gist.github.com/johannmiller/af124a9279fb9f08ca12
13:36 murrdoc anyone successfully use this ? https://docs.saltstack.com/en/2014.7/ref/clients/index.html#salt.client.LocalClient.cmd
13:36 andreluiz joined #salt
13:37 murrdoc Ryan_Lane:  __opts__ = salt.config.minion_config('/etc/salt/minion')
13:37 murrdoc
13:37 Johann I will give this a shot  - do it master?
13:37 ndrei joined #salt
13:38 c10 joined #salt
13:39 babilen Johann: What exactly are you giving a shot?
13:41 Johann Sorry :) I was attempting to run that local client cmd from python shell.
13:42 Johann This is salt 2014.1.5
13:43 Johann I've tried restarting the salt-minion service as well, from the minion.
13:43 babilen Johann: Did you restart the minion after you've done that? I wouldn't necessarily expect that the removal of that directory causes that particular issue.
13:43 cpowell joined #salt
13:43 babilen Ah :)
13:44 loki_ joined #salt
13:44 loki_ Hi All
13:45 loki_ i have a simple test script in one of my minion
13:45 markm joined #salt
13:45 loki_ eg : echo hihihihih >> test.txt
13:45 mpanetta joined #salt
13:46 loki_ when i run salt command from master to invoke the script
13:46 loki_ its failing
13:46 Johann Here is the master log: https://gist.github.com/johannmiller/a5b728fdd2229e3ad292
13:46 loki_ the command i used is salt -S 10.94.2.x cmd.run "/test.sh"
13:47 loki_ an anyone please help me
13:48 Johann babilen: Yes I restarted the service after removing/replacing that dir. That was defintely the event that broken things
13:48 drlkf joined #salt
13:48 babilen Johann: Are you trying to run the salt-master as user "ubuntu" ?
13:49 babilen Ah, that must have been related to the client conf. (why you tried that is beyond me)
13:49 bhosmer_ joined #salt
13:49 babilen Did you restart the master too?
13:49 Johann I'm executing all commands as sudo
13:49 Johann No haven't restarted master.
13:49 babilen Please do
13:50 babilen (and then the minion)
13:50 murrdoc babilen:  u ever use salt python client api
13:51 loki_ can anyone help me with my issue?
13:52 Johann babilen: restarting now. What do mean about client conf?
13:52 trikke joined #salt
13:54 babilen Johann: I am not sure why you executed something in the Python repl
13:54 babilen loki_: What is "its failing" ?
13:55 c10 joined #salt
13:55 murrdoc damn thats cold babilen
13:55 timoguin joined #salt
13:55 murrdoc help a brother out
13:55 loki_ its not excecuting the script in my client
13:55 jdesilet joined #salt
13:56 babilen loki_: What is the entire content of the script, why do you think that it is not being executed, what output do you get when you run the salt command, ... ?
13:56 babilen murrdoc: "Please define the nature of the technical emergency" ;)
13:56 loki_ i just get the hostname i dont get any error
13:57 loki_ the content in the script is "echo hihihihih >> test.txt"
13:57 babilen loki_: Could you paste the output to, say, http://refheap.com ?
13:57 murrdoc babilen:  binary request, hvae you ever got https://docs.saltstack.com/en/2014.7/ref/clients/index.html#salt.client.LocalClient.cmd working
13:57 babilen Is that the entire content?
13:57 murrdoc or do u know of any code that does use that
13:57 babilen murrdoc: I haven't tried, so no
13:57 * murrdoc needs it
13:57 babilen sorry
13:57 murrdoc :(
13:57 Johann babilen: This is what I'm seeing in master.log: 2015-06-16 13:47:50,362 [salt.master      ][WARNING ] Caught signal 15, stopping the Salt Master
13:57 murrdoc uncontrollable bawling
13:58 loki_ i ran this command from master salt -S 10.94.2.194 cmd.retcode "/test.sh"
13:58 murrdoc basepi:  can we please have some working examples of https://docs.saltstack.com/en/2014.7/ref/clients/index.html#salt.client.LocalClient.cmd somewhere
13:58 murrdoc basepi:  please
13:58 loki_ he put was
13:58 loki_ client.tpaasint.trimblepaas.com:     0
13:58 babilen Johann: Okay, please stop the master (service salt-master stop) and then run "salt-master -ldebug" as the user that would normally run it.
13:58 loki_ but the script in the client did get excecuted
13:59 babilen loki_: Okay, does it work if you execute "/test.sh" directly on the minion? Why don't you have a shebang in there? Is the script executable?
13:59 loki_ yes its works perfectly
14:00 tzero joined #salt
14:00 loki_ yes its excecutable
14:00 * babilen is also not sure about pwd, but you might want to make that "echo 'hihihihihi' >> /test.txt"
14:00 babilen loki_: You shouldn't be able to execute a file that *only* contains "echo hihihihih >> test.txt" and nothing else simply by calling it.
14:01 loki_ ii am able to do it
14:02 Johann babilen: I think you may have saved me: [INFO    ] Worker binding to socket ipc:///var/run/salt/master/workers.ipc
14:02 linjan joined #salt
14:02 debian112 joined #salt
14:02 babilen loki_: Could you run "cat /test.sh", "setfacl /test.sh" and "/test.sh" on the minion and paste the output to http://paste.debian.net ?
14:02 loki_ ofcourse it contains #!/bin/bash
14:02 Johann Should I interrupt and restart it as a service?
14:02 babilen Johann: Okay, that looks sensible. Stop the master now again (ctrl-c) and run "service salt-master start"
14:02 CeBe1 joined #salt
14:03 babilen loki_: I explicitly asked "Is that the entire content?" -- sorry, just trying to work with what you tell me.
14:04 babilen s/setfacl/getfacl/ naturally
14:04 Johann babilen: I'm running highstate from minion and monitoring the output on master
14:05 babilen Johann: Can you ping the minion now on the master?
14:05 Johann babilen - Sorry I haven't cntrl-c ed the forerground process on master yet.
14:06 Johann highstate is still running from the minion - sudo salt-call state.highstate
14:07 babilen sure
14:08 babilen That would have just been the first thing I'd have tried, but a highstate is okay too
14:11 Johann You're right - I should have. I hadn't seen your message about interrupting the master
14:11 Johann Currently not seeing the normal output on the minion console
14:11 Johann However I am seeing a bunch of YAML processing on master
14:12 andrew_v joined #salt
14:14 GrueMaster joined #salt
14:16 sieve joined #salt
14:17 luke__ joined #salt
14:19 drlkf hello, I'd like to know how exactly are the service states checking for the existence and status of services ? I can't figure out how to make systemd mount units work with salt
14:23 Hazelesque Hi there
14:23 Hazelesque any reason that there are no docs for "salt.modules.ps" in 2015.5?
14:23 jalbretsen joined #salt
14:23 Hazelesque https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.ps.html is devoid of content
14:23 Hazelesque whereas https://docs.saltstack.com/en/2014.7/ref/modules/all/salt.modules.ps.html contains actual documentation
14:24 edrocks joined #salt
14:24 luke__ Hi all, I am trying to get a salt proxy working with 2015.5.2, I have it working with 2014.7, but using the same config I get the following:
14:24 viq joined #salt
14:24 luke__ [DEBUG   ] Minion 'saltminion' trying to tune in [ERROR   ] 'module' object has no attribute 'ProxyMinion' [WARNING ] ** Restarting minion **
14:25 clmsy joined #salt
14:25 luke__ has anyone been able to get a proxy minion started in 2015.5.2?
14:25 Johann babilen: Ok  - restarted salt-master as a service and tried test.ping - It doesn't return and I am still seeing this signal 15 error. https://gist.github.com/johannmiller/539eb2011f04416b26d1
14:29 Johann babilen - also, I had to run"sudo service salt-master start"
14:30 babilen But it worked when you run it with "salt-master -ldebug" ?
14:32 Johann Well, highstate exectuted from the minion didn't finish. I'll re-run with -ldebug then open another shell to try test ping.
14:35 aqua^c joined #salt
14:35 emaninpa joined #salt
14:35 keithhub joined #salt
14:36 Johann babilen - test.ping does not return with any info - but I see this in the console where I started the debug process: DEBUG   ] Published command details {'tgt_type': 'glob', 'jid': '20150616143426010262', 'tgt': 'jozy_aws_qa_ci_slave4', 'ret': '', 'user': 'sudo_ubuntu', 'arg': ['20150616143414680505'], 'fun': 'saltutil.find_job'}
14:36 _JZ_ joined #salt
14:38 iggy Hazelesque: search/file a bug
14:38 Johann Above that I can see it registered the test.ping with no ret value: [DEBUG   ] Published command details {'tgt_type': 'glob', 'jid': '20150616143414680505', 'tgt': 'jozy_aws_qa_ci_slave4', 'ret': '', 'user': 'sudo_ubuntu', 'arg': [], 'fun': 'test.ping'}
14:41 fxhp joined #salt
14:42 wendall911 joined #salt
14:47 darknight87 joined #salt
14:48 clintberry joined #salt
14:48 darknight87 Hi guys, I want Salt to run for 50 times(as long as the minion config is changed - meaning that's a valid run) and after that it should not run any config check on that minion. Is this possible? Is there a keyword?
14:50 iggy what do you mean run for 50 times?
14:53 darknight87 iggy, the master must run a config(say update a config file on a given client) only 50 times. Each file update(change) is considered as 1 count. Thus if the master and minion file is the same, no updates will be made during the check and this won't be included in the count
14:53 RabidCicada joined #salt
14:55 RabidCicada Hey saltians, is there a fullproof salt editor collection for editing in eclipse?  I've installed yedit for sls files...but I've seen jinja files can be troublesome.  I've seen people talk about django templates for jinja in general but haven't seen a complete solution for jinja/yaml combination in the same file
14:55 babilen Johann: Sorry, you might have noticed that I am busy with something else.
14:57 Johann babilen - No worries. This returns a bunch of True values - so that's good: sudo salt -t 60 '*' test.ping
14:59 jacksontj joined #salt
15:00 darknight87 iggy, what I mean is, the saltmaster checks and updates a file only 50 times. Then it stops checking. This is for a given minion
15:00 drlkf left #salt
15:00 favadi joined #salt
15:02 Johann babilen: When I run highstate - I see this  Salt request timed out. If this error persists, worker_threads may need to be increased. Followed by "Failed to authenticate, is this user permitted to execute commands?"
15:02 favadi joined #salt
15:03 Brew joined #salt
15:03 Johann However I do see console log messages indicating auth *is* working: Authentication accepted from jozy_aws_qa_jenkins_slave4\
15:06 babilen Johann: the minion can't communicate with the master (might be blocked by a firewall, network issue, configuration issue, ....)
15:06 babilen *shrug*
15:07 sdm24 joined #salt
15:07 * babilen has "Feierabend"
15:08 sgargan joined #salt
15:13 sgargan joined #salt
15:13 conan_the_destro joined #salt
15:13 iggy darknight87: there is no built-in functionlity like that
15:16 giantlock joined #salt
15:19 c10 joined #salt
15:22 slimmons iggy, last night you said "[18:38] <iggy> have a git.latest state that was targeted at the minion running on the master, then the dir where that is checked out is in your file_roots somewhere".  This is going to open up new worlds for me if you mean that you can simply install salt-master and salt-minion on the same server.  Is that what you meant?  I hadn't read that anywhere, but I couldn't think of a reason I couldn't.
15:23 Johann babilen: Is there a good way to test communication with master from minion? Everything is AWS and was working fine before re-creating /var/cache/salt
15:23 andrew_v joined #salt
15:24 iggy slimmons: yeah, it's not really mentioned specifically anywhere (which I think is kind of sad, but...)
15:25 drawsmcgraw slimmons: Amma 'bout to blow your mind. It's common practice to do that.
15:25 iggy slimmons: most of us run minions on the same machine as the master
15:26 slimmons I'm so happy right now.  That's such a simple thing that I was completely ignoring.  That's gonna help me a ton.  Thanks guys
15:26 slimmons or gals
15:26 slimmons internet pplz
15:27 thedodd joined #salt
15:27 otter768 joined #salt
15:29 luke__ I am trying to apply a state file to a junos proxy minion but the function is not available. Does anyone have experience with proxy minions? :                             mars:     'state.apply' is not available.
15:29 darknight87 joined #salt
15:30 Johann babilen: I'm seeing this on master in /var/log/salt/minion - 2015-06-16 15:27:20,401 [salt.utils       ][ERROR   ] This master address: 'salt' was previously resolvable but now fails to resolve! The previously resolved ip addr will continue to be used
15:31 Johann The ip addr of master has not changed
15:32 MTecknology *grumble* I only ever have issues with rhel minions connecting. The minion says it's ready to receive requests, but anything sent from the master never shows up.
15:33 moos3 joined #salt
15:44 mou joined #salt
15:52 sporkd2 anyone have experience passing the data values from a reactor state into a file.managed state?
15:53 sporkd2 i'm trying to pass kwarg: pillar: id: data['id'] and getting a multiple values for keyword pillar error
15:55 sporkd2 I see in the debug its passing this in data{ 'pillar': {'id': 'salt-master-vagrant'}
15:55 sporkd2 not sure where it thinks it's getting multiple values
15:58 sporkd2 sometimes typing things out really helps..... nvm :D
16:01 rbatiz joined #salt
16:02 Johann How to understand this discrepancy? On master I see happy messages like: This salt-master instance has accepted 37 minion keys, and "Authentication accepted from jozy_aws_qa_jenkins_slave4"
16:03 Johann However, I get on the minion and run "sudo salt-call state.show_highstate" and get "[WARNING ] SaltReqTimeoutError: Waited 60 seconds\n Minion failed to authenticate with the master, has the minion key been accepted?"
16:03 basepi murrdoc: you're just looking for more examples? there are a couple there, including a generalized one. It's pretty straightforward overall
16:03 rojem joined #salt
16:08 mapu joined #salt
16:10 murrdoc basepi:  i cant get it to work, I was hoping for more
16:10 murrdoc basically i need to run states against a minion across a system.reboot
16:10 erik_ joined #salt
16:11 murrdoc and since orchestrate cant handle that, i was thinking of having an external script run the states in order i need
16:11 erik_ hi all, can i get an example how to set up my SSH key for user root on the master to all minion?
16:15 kawa2014 joined #salt
16:18 basepi murrdoc: gist of what you have so far?
16:18 murrdoc sure
16:18 dyasny joined #salt
16:18 murrdoc let me water it down
16:19 linjan joined #salt
16:19 c10 joined #salt
16:21 murrdoc basepi:  https://gist.github.com/puneetk/ddaf0aa0e9797216299f its possible its horribly wrong, which could be my bad
16:23 aqua^c joined #salt
16:25 * Gareth shakes his head in murrdoc's direction
16:26 ajw0100 joined #salt
16:26 theologian joined #salt
16:27 murrdoc is it that bad ?
16:27 murrdoc should i sepukku ?
16:27 murrdoc maybe a transition to noc is in play
16:27 biped joined #salt
16:28 Gareth I didn't look :) But I'm sure you've done something else that warranted disapproval
16:28 biped I haven't done anything yet :(
16:29 murrdoc had me worried
16:29 XenophonF murrdoc: could you schedule a reboot at the very end of a state run using module.wait, kind of like how apache-formula has the apache-reload and apache-restart states set up? https://github.com/saltstack-formulas/apache-formula/blob/master/apache/init.sls#L10
16:30 XenophonF (that's the approach i was going to try for my domain controllers, anyway)
16:30 murrdoc u are confusing service.restart with system.reboot
16:30 aawerner joined #salt
16:33 murrdoc basepi:  please let me know thoughts on gist when u have a second
16:33 aparsons joined #salt
16:33 murrdoc XenophonF:  i hope i wasnt rude, but service.restart is solved easily with listen_in
16:33 XenophonF murrdoc: oh, no, i know they're different
16:34 murrdoc CMD="salt '${SERVER}' system.reboot && salt-run state.event 'salt/minion/${SERVER}/start' count=1 quiet=True && salt '${SERVER}' st
16:34 murrdoc ate.highstate"
16:34 murrdoc this is what i need to do
16:34 XenophonF it's the wrapping them in the module.wait state
16:34 murrdoc but cant because salt loses a server after system.reboot
16:35 XenophonF hm, i guess the master would think that the highstate job failed, wouldn't it
16:35 XenophonF since the minion would never come back from the system.reboot
16:35 aparsons_ joined #salt
16:38 XenophonF the other tack i was thinking of taking (again, in the context of a state formula that deploys a windows domain controller) was to schedule a one-time reboot five minutes after the end of the highstate job
16:39 murrdoc i need to react to all the reboots and states
16:39 murrdoc like when it comes back from reboot and server passes highstate i have to update something
16:40 murrdoc if it doesnt pass higstate i have to do certain other thing
16:40 XenophonF hm
16:40 smcquay joined #salt
16:42 basepi murrdoc: I don't see any big problems right off. Have you tried printing the results of each command to see where it's failing?
16:42 basepi Might be a timeout issue or similar
16:43 murrdoc thats a reactor state
16:43 stanchan joined #salt
16:43 murrdoc not sure where i would print it out
16:43 murrdoc and i cant run it as state python, it fails with no error
16:44 Antiarc joined #salt
16:46 cruatta joined #salt
16:47 bhosmer joined #salt
16:47 basepi If you run tit in python, you need to add a few lines on the bottom
16:47 sgargan joined #salt
16:48 basepi murrdoc: https://gist.github.com/basepi/e5d0013406c6f79f13b3#file-something-py-L35-L36
16:49 cruatta_ joined #salt
16:50 murrdoc :D
16:50 murrdoc i tried that , need to pass in minion_id
16:51 murrdoc kk will try some more today, check back in tomorrow
16:51 murrdoc thanks basepi
16:51 murrdoc at least i am sorta on the right track
16:51 basepi =)
16:53 stoogenmeyer joined #salt
16:53 MatthewsFace joined #salt
16:53 murrdoc more examples wont hurt :)
16:54 pix91 joined #salt
16:55 pix91 Is it possible to test to run minion standalone temporarily and let it be a part of network managed minion once again.
16:57 writtenoff joined #salt
16:57 KyleG joined #salt
16:57 KyleG joined #salt
16:58 Bryson joined #salt
17:01 theologian joined #salt
17:03 Johann Hey guys - can someone provide possible next steps? I've bumped worker_threads to 10 and restarted salt-master. Running top on master does not indicate that the machine is working very hard. https://gist.github.com/johannmiller/d69d90a4207dcc18f8c1
17:04 toastedpenguin joined #salt
17:05 SubOracle joined #salt
17:07 ahammond Johann, assuming your master is running on linux, have you done any kernel tuning?
17:07 ahammond Johann because salt over 0mq uses the heck out of tcp connections.
17:08 Johann ahammond : no I haven't - what would you recommend?
17:08 ahammond Johann that made a big difference for us. If you'd like I can post our "linux_kernel_tuning" formula
17:09 Johann Sure, that can't hurt!
17:09 iggy there's a page in the docs too
17:09 ahammond iggy, I found that basho's riak tuning guide translated really well for salt masters.
17:10 ahammond https://gist.github.com/ahammond/51bbee7881488c3b270c
17:11 snarfy joined #salt
17:12 beneggett joined #salt
17:14 aparsons joined #salt
17:14 ahammond Johann next question, how many minions and how big is your master box?
17:17 vexati0n is there ever going to be a Windows MSI version of the salt-minion installer?
17:18 iggy isn't there?
17:18 vexati0n not in any of the repos i can find
17:18 vexati0n only exe
17:18 cruatta joined #salt
17:18 vexati0n not even the enterprise repo has an MSI
17:18 losh joined #salt
17:19 tomh- joined #salt
17:20 c10 joined #salt
17:22 sk_0 joined #salt
17:23 iggy *shrug*
17:24 darknight87 joined #salt
17:24 forrest joined #salt
17:26 ange in a sls file is there a way to say run a small shell command and store the result in a variable ?
17:26 ange <% foo_hash = `cat /etc/foo | cut -d \; -f 2` %> ?
17:27 ajw0100 joined #salt
17:28 kevin-wk you could do it like {% set foo_hash = salt['cmd.run']('cat /etc/foo | cut -d \; -f 2') %}
17:28 otter768 joined #salt
17:28 Guest89 joined #salt
17:29 ange hummm interesting
17:29 nocturn joined #salt
17:31 fllr joined #salt
17:31 ageorgop joined #salt
17:32 coval3nce joined #salt
17:33 toastedpenguin joined #salt
17:33 coval3nce I’m using salt-cloud with a custom bootstrap script, the script and file_map successfully gets placed on the box, however when I try to use file_local salt-minion, it fails running ‘lspci-vmm’ as part of GPU grains enumeration.  The funny thing, if I use —keep-tmp with salt-cloud, login to the box, and run the deploy wrapper script manually, everything works fine.
17:33 Johann ahammond: Sorry, I got deep into some logs. The salt master is an AWS small instance - so 1 cpu and 2GB RAM. We have about 15 minions. Interestingly, the communication suddenly started working and I'm trying to understand why
17:33 coval3nce Also verified the failure happens when manually launching the deploy wrapper script via SSH from the salt-cloud jump box too.
17:34 coval3nce Any thoughts?
17:34 baweaver joined #salt
17:34 biped learner question: trying to write a formula for package install and configure.. requires execution of a command after a package with a lot of parameters... am I best served using cmd.wait, or creating a separate shell script and executing that
17:34 dyasny joined #salt
17:35 ange kevin-wk: thanks !
17:36 forrest biped: cmd.wait or cmd.run with a requires or something should be fine. Really depends on what you prefer if the script is super long
17:36 hal58th joined #salt
17:36 hal58th_ joined #salt
17:36 hal58th__ joined #salt
17:37 biped ok, the followup to that is that one of the parameters is a password I would prefer not to be persistent, my understanding that if I put the password in a pillar... its there visible with get.pillar call ?
17:37 stoogenmeyer joined #salt
17:37 kevin-wk only visible to hosts targeted to receive that pillar
17:38 kevin-wk but yes
17:38 pimpind left #salt
17:39 ageorgop joined #salt
17:39 spookah joined #salt
17:39 biped good to know.. so cmd.run to execute 'helper' script, and and another cmd.run to remove after execution to pacify the paranoid
17:40 biped tyvm sir !
17:40 kevin-wk i'm not sure i understand
17:41 snarfy joined #salt
17:41 kevin-wk "salt 'target' pillar.get password" will still show "hunter2" unless you remove that pillar
17:41 denys joined #salt
17:41 smkelly joined #salt
17:42 kevin-wk i imagine you were going to use file.managed to drop a script on the box from a template that used a pillar for the password, and then remove it?
17:43 biped would just keep the password inside the script, then remove the script afterwards
17:44 kevin-wk ok - but if you deliver the script with file.managed, and rm it later, the next highstate will recreate the file.  just null it out (cat /dev/null > file) instead and then replace: False in the file.managed (IIRC)
17:44 pf_moore joined #salt
17:44 biped aha. figured something like that was coming
17:44 ange {{ grains.get('blob.blip.foo', 'default') }} < is that legal (the . to get through nested keys) ?
17:46 biped was thinking about using test -e or whatnot to use the existence of the script on minion for 'state' ... maybe cat | wc
17:48 hal58th_1 joined #salt
17:48 hal58th_2 joined #salt
17:49 ange {{ grains.get('blob:blip:foo', 'default') }} is
17:49 hal58th_3 joined #salt
17:56 julez joined #salt
17:57 ggoZ joined #salt
17:58 bluenemo joined #salt
17:58 bluenemo joined #salt
18:01 ikarus joined #salt
18:10 aparsons_ joined #salt
18:11 ageorgop joined #salt
18:12 aqua^c joined #salt
18:18 beneggett joined #salt
18:20 baweaver joined #salt
18:22 ajw0100 joined #salt
18:22 Johann ahammond - where/how would your kernel tuning formula get depoyed?
18:24 nobrak hi folks, using salt-ssh 2015.5.2 and receiving 'network.addrs' is not available.
18:24 nobrak when trying to run salt-ssh 'slave*' network.addrs
18:25 hal58th joined #salt
18:26 hal58th_ joined #salt
18:27 iggy biped: someone on that box can still use the cp module to fetch the contents of that file
18:27 biped hmmm
18:28 iggy nobrak: there is no function network.addrs
18:28 iggy nobrak: there's network.ip_addrs
18:29 nobrak iggy: durrr...guess i need to learn to ready
18:29 nobrak **read
18:29 nobrak and type apparently
18:29 nobrak thanks
18:32 biped well, i'm not sure about other pattern options for this
18:34 pannon left #salt
18:35 ecerulm joined #salt
18:36 c10 joined #salt
18:36 XenophonF left #salt
18:39 alemeno214 joined #salt
18:44 conan_the_destro joined #salt
18:46 biped so let me ask it using another common example
18:47 biped letsay I would like to run something like mysql_install_db -u root -p somepassword after a package install
18:48 biped been poking through a lot of the formulas on github.. but still too new to suss out a best practice pattern
18:48 forrest biped: Did you already look at the best practices doc?
18:49 forrest also there is a mysql database state that you can use to setup mysql: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_database.html
18:49 babilen I am not sure the best practices doc is in line with current best practices
18:50 babilen But I haven't read it in a while
18:50 blorg joined #salt
18:51 biped well.. I just used mysql as an example
18:51 biped googling for the doc tho
18:53 biped cool, this will be a good read, ty forrest
18:54 forrest biped: np, if you find issues with that best practice doc, or stuff is confusing/not explained well enough please file an issue. I wrote it so feel free to provide feedback so someone can take a look at it.
18:54 coval3nce aha…think i am hitting https://github.com/saltstack/salt/pull/24382 per my error posted earlier
18:56 babilen biped: I'd also read https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html afterwards and take a look at the salt, influxdb and collectd formula (for example)
18:57 forrest yeah some of the formulas are a bit off the rails at this point as people keep adding crazy functionality
18:57 supersheep joined #salt
18:58 andrew_v joined #salt
18:59 murrdoc biped:  also check template formula
19:00 biped roger
19:00 ggoZ joined #salt
19:01 toastedpenguin joined #salt
19:02 babilen Oh yeah, definitely start with the template-formula
19:02 peters-tx joined #salt
19:02 murrdoc yeah its fixed
19:02 cilkay Hello. I'm using a masterless minion. How do I ensure that some states are only invoked once. For example, once I've created the systemd script and enabled it for pm2, I don't have to do it ever again.
19:02 Johann ~/.ssh/id_rsa plays no role in master/minion communication, right? That's all through 0mq?
19:02 iggy and ss-states or whatever
19:03 iggy https://github.com/SS-archive/salt-states
19:03 aparsons joined #salt
19:03 iggy Johann: for normal salt, yes... there is also a salt-ssh communication option
19:10 hybridpollo joined #salt
19:12 scoates is there a "right" way to provision a systemd .service file and then call daemon-reload?
19:12 hasues joined #salt
19:12 hasues left #salt
19:13 pix91 left #salt
19:13 slimmons if I already have a state set up for an exterior minion, and I want to create a minion on my salt-master (which I've already done now), how would I specify a specific part of a state just apply to the minion on the master?  I want to git clone to the minion on the master using git.latest state (as discussed earlier).  I just haven't seen a way to apply git.latest to the minion on the master, while applying the rest of the state to the
19:13 esharpmajor joined #salt
19:14 scoates I guess this is good enough. https://github.com/saltstack/salt/issues/16778
19:15 Johann iggy: is there some parameter I can check on master to check? on master, if I 'chmod 400 .ssh/id_rsa' I get an EauthAuthentication exception when I try 'sudo salt-cp -L <minion_id> /home/ubuntu/.ssh/id_rsa /home/ubuntu/.ssh/id_rsa'
19:16 iggy Johann: salt-ssh uses a different binary (salt-ssh), so you'd know if you were using it
19:16 forrest slimmons: I'd add a grain on the master's minion that notates it as the master, then create a new state that does that work you want, which is only applied via a matching grain in the top.sls.
19:16 sdm24 slimmons: in your state, add {% if grains['id'] == '<minionid>
19:16 forrest yeah or you could do that
19:16 Gilou joined #salt
19:17 forrest Just depends on whether you prefer a cleaner state file or not
19:17 forrest if you don't care, just do that
19:17 sdm24 and then make sure to close the %}, and have an {% endif %} at the end
19:17 slimmons I haven't worked with grains at all yet, so I guess it's time.
19:17 forrest slimmons: Start with what sdm24 suggested then, it's easier to implement
19:17 slimmons will do, thanks
19:18 tmclaugh[work] joined #salt
19:18 sdm24 no problem
19:18 scoates …or maybe not (-:
19:20 tmclaugh[work] Hi, anyone have apublicly available salt tree I can look at?  Even a small personal one?
19:20 tmclaugh[work] Our tree was written by a person just familiar enough to get by
19:21 tmclaugh[work] I’m looking for examples of correct ways to organize and layout states and data.  Just like I can look at a Puppet tree and have an idea if it’s probably reasonable to navigate or a terrible mess about to fall over
19:22 iggy https://github.com/SS-archive/salt-states
19:27 intel joined #salt
19:28 evilrob joined #salt
19:29 otter768 joined #salt
19:30 Johann iggy: thanks. I don't see how that exception gets raised... mystery. I think the real problem I'm having is timeouts on the minion. I see this in the minion log. 2015-06-16 19:23:32,573 [salt.minion      ][WARNING ] The minion failed to return the job information for job 20150616192211040565. This is often due to the master being shut down or overloaded. If the master is running consider incresing the worker_threads value.
19:30 Johann The master is not overloaded and I've already bumped worker_threads to 10
19:31 Johann Someone suggested ulimit as a possible source? # open files?
19:31 Johann I've bumped that from 1024 to 12000 (totally arbitrary!) does not help
19:34 cilkay Is it feasible to have a conditional in top.sls? E.g. in pseudo code - if install: install elif update: update?
19:35 babilen no
19:36 babilen You always describe the "end state"
19:36 cruatta_ joined #salt
19:37 c10 joined #salt
19:38 cilkay OK, then how do you deal with those two states? In the "install" state, I need to create users, config systemd scripts, etc. In the update state, I don't need to do that all over again.
19:38 sdm24 The order of top.sls is (generally) the order the states will run in
19:39 sdm24 so if create is first, it will run, then update will run
19:39 cilkay How do you not have "create" run a second time?
19:39 cilkay I'm using a masterless minion, btw.
19:40 ProT-0-TypE joined #salt
19:40 sdm24 do you mean in a second highstate call? There are a couple ways. Easiest is removing it from top.sls. Another option is to have the state add a custom grain and value, then add {% if grains['custom'] != 'value' %}, or unless statements to each ID
19:40 cilkay I'm building the VM via Vagrant and using the salt provisioner. Right now, when I run "vagrant up", the server will be built from scratch, all software installed, daemons started, systemd configured, etc.
19:41 CF430769 joined #salt
19:41 cilkay sdm24: Yes, exactly, in a second highstate call.
19:41 cilkay Removing what from top.sls?
19:41 sdm24 the install state
19:41 sdm24 so top.sls will only contain update
19:42 sdm24 and manually call the install state with salt '<target minion(s)>' state.sls install
19:42 cilkay I don't have that option, unfortunately. I don't have a master and I have no access to the remote servers.
19:43 cilkay That's why I thought of a conditional in top.sls.
19:43 sdm24 salt-call state.sls install
19:43 sdm24 then it only runs on the local minion
19:44 keithhub left #salt
19:44 cilkay Oh, so I don't even have to use the vagrant provisioner. I could have a cron job @reboot, that invokes the salt-call.
19:44 babilen cilkay: You don't have two states. One is the the state in which things are being setup and then you have a state in which things are being kept "up to date". You can use, say, pkg.latest (git.lates, ...) to describe the latter, but I personally prefer to upgrade my minions explicitly and manually. The state is simple "latest FOO in BAR". You might also be interested in reading documentation on orchestrate i
19:44 babilen f you *really* have to to multiple things ...
19:44 babilen ... (on various minions) in several steps.
19:45 julez joined #salt
19:45 coval3nce if you are updating salt itself, isn’t there a minion option for havin salt service automatically restart?  http://docs.saltstack.com/en/latest/ref/configuration/minion.html#update-restart-services
19:48 coval3nce havent used it myself, but remember it from RTFM'ing
19:50 ajw0100 joined #salt
19:52 ndrei joined #salt
19:54 forrest cilkay: Your states should be written in such a way that you only have one 'true' setup
19:54 forrest why on earth would you provision a server, then change all the settings?
19:54 forrest why would you not just set those settings on the first run
19:55 cilkay It's not the settings that change. It's the software that's deployed on that machine.
19:55 sgargan if I had a custom beacon that I wanted to sync out to one or more minions, what would be the best way to go about it?
19:55 forrest you're removing software and installing different software on the same system?
19:55 forrest Did we talk about this before?
19:55 forrest I know I discussed this with someone before who was basically using the same server for multiple different pieces of software
19:56 benegget_ joined #salt
19:56 cilkay No, that wasn't me. It's software that we're building, a Node.js application, that's under heavy development.
19:57 forrest I don't see the big deal. Create the states that check out the code if it's in git, or install your updated package which you are running each time.
19:57 baweaver joined #salt
19:57 forrest provision should be the same. If you don't want to initdb on postgres every time or something then add some unless states, etc.
19:57 ProT-0-TypE left #salt
19:58 cilkay I don't have access to those remote machines and we don't want the Windows sysadmins anywhere near a Linux shell.
19:58 forrest who has access to the remote machines?
19:58 cilkay No one. They have to be self-maintaining based on the salt scripts that I write.
19:59 forrest so you have access.
19:59 cilkay They're masterless minions.
19:59 forrest I also have masterless minions
19:59 cilkay No, I don't, by firewall policy.
19:59 forrest so how is the salt code getting there.
19:59 forrest I also don't see how the updating is different than the provisioning.
19:59 forrest it's the same thing, configure the system, ensure it is in X status, update the code.
19:59 cilkay We give the sysadmins a zip file and tell them "put the contents of this zip file here".
19:59 forrest are you a developer?
20:00 forrest Why aren't your sysadmins writing the salt code?
20:00 giantlock joined #salt
20:00 forrest There's been a lot of overengineering going on lately in here with setups, so we spend a bunch of time working around stuff that people could easily solve if their org wasn't disfunctional.
20:00 forrest *dysfunctional
20:01 aqua^c joined #salt
20:01 HappySlappy joined #salt
20:01 baweaver joined #salt
20:02 cilkay We're talking hundreds of different organizations all with their own culture. Some of them revel in this stuff. Others complain because it's "too complicated". We have no control over the policies or control over these hundreds of organizations and have to cater to their needs and demands.
20:03 forrest Okay, then write your states to configure the box the same way every time. If your app needs a different config between initial install and update, something is either wrong with how your app works, or how your salt setup works.
20:05 cilkay I get that. The only thing that wasn't clear to me was the scenario you mentioned with the PG initdb. The "unless" test gives me a clue, thank you.
20:06 forrest Yeah, sorry if it comes across harshly, just been dumping lots of time into helping people solve problems lately that aren't REALLY problems.
20:06 cilkay I have other situations like the PG initdb, though not necessarily as potentially destructive as that.
20:06 forrest And we could have resolved it in 5 minutes if everyone stepped back and figured out what they really needed :\
20:07 cilkay I put installation specific parameters, like db connect strings, hostname, fqdn, version number, etc. in one file that my salt recipe reads and builds the server automatically from that.
20:08 markm joined #salt
20:08 forrest Yeah that's a good way to do it.
20:09 cilkay Rebuilding /etc/hosts, /etc/hostname, /etc/sysconfig/interfaces every single time is benign. A PG initdb isn't. :)
20:10 LtLefse yeah, the key is to make your states idempotent
20:10 LtLefse so if you are using cmd states, "unless" and "creates" are your friend
20:11 Guest89 joined #salt
20:12 s_kunk joined #salt
20:12 s_kunk joined #salt
20:16 sgargan Im seeing an issue with some of the saltutil commands
20:17 ggoZ joined #salt
20:17 sgargan i was trying to run saltutil.refresh_beacons saltutil.sync_beacons as mentioned in the docs, but i get 'saltutil.sync_beacons' is not available.
20:18 sgargan running 2015.5.2 on the master and the minion
20:20 c10 joined #salt
20:25 MatthewsFace joined #salt
20:26 subsignal joined #salt
20:29 sk_0 joined #salt
20:40 alexanderilyin joined #salt
20:41 iggy it should be in 2015.5.2
20:41 baweaver joined #salt
20:44 alexanderilyin Hi, I want automate monitoring that states are not failing, so what is the best way?
20:44 Deevolution Anyone seen issues with custom renderers returning error messages along the lines of:  Rendering SLS 'hosts.saltmaster1' failed, render error:
20:44 Deevolution render() got multiple values for keyword argument 'env'
20:44 timoguin joined #salt
20:46 alexanderilyin When I run `sudo salt --log-file=/var/log/salt/master_zabbix --log-file-level=error -b 20 -t 60 -C ‘id1 or id2' state.sls my.state test=TrueWhen I run `sudo salt --log-file=/var/log/salt/master_zabbix --log-file-level=error -b 20 -t 60 -C ‘id1 or id2' state.sls my.state test=True
20:46 alexanderilyin I got error in output 'Data failed to compile: ... The function "state.sls" is running as PID 9116 and was started at ...' but exitcode is 0 and error log is empty.
20:47 alexanderilyin and `salt` does not accept --retcode-passthrough option.
20:49 tedbot joined #salt
20:50 tedbot quick question: how do you declare multiple filenames in a requisite?
20:50 tedbot ^ can't find that in the docs
20:51 tedbot an example would be where a few custom config files would be required before starting a service
20:52 tedbot "require -> file -> names" gives an illegal syntax error
20:52 tedbot 2014.7.1
20:52 tedbot I'll take an rtfm link
20:53 smcquay joined #salt
20:55 iggy tedbot: -require takes a list
20:56 iggy - require:\n  - file: /path/to/1\n  - file: /path/dir/2
20:56 tedbot iggy: nice, ok...I had that initially but didn't like the way that looked
20:56 sgargan iggy i guess somehow I have 2 versions on my host
20:56 tedbot iggy: but, staying true to Python, explicit is better than implicit
20:57 sgargan i’d bootstrapped it and then tried to upgrade with pip
20:57 tedbot iggy: thanks
20:57 sgargan seems that the ppa only has 2015.5.0
20:58 sgargan how would I upgrade that to .2?
21:01 tedbot left #salt
21:02 cruatta joined #salt
21:03 smcquay joined #salt
21:07 patrek joined #salt
21:07 dgk joined #salt
21:09 rdavis joined #salt
21:09 rdavis Hello folks.
21:09 rdavis Recently there were some changes made to pepper specifically https://github.com/saltstack/pepper/commit/52abd48f6a8cf15b8b5bf1bca8f236b9bd149147 that I want to use, and it doesn't look like it's made it over to PyPi yet, is there a way to kick that off?
21:10 baweaver joined #salt
21:10 iggy pip can install directly from git
21:10 rdavis Oh.
21:10 rdavis Didn't know that, thanks.
21:11 c10_ joined #salt
21:12 baweaver joined #salt
21:12 Guest89 joined #salt
21:18 stanchan joined #salt
21:19 rdavis Still would be nice to get PyPi updated. :p
21:19 rdavis I don't think I can do that myself or I would.
21:19 supersheep joined #salt
21:20 ecerulm joined #salt
21:21 forrest rdavis: https://github.com/saltstack/pepper/issues/33
21:21 forrest you can plus one that if you want
21:21 rdavis Oh, thanks.
21:21 rdavis plus one?
21:21 forrest Just comment saying you'd also like to see that or something
21:21 rdavis oh, thanks.
21:22 heaumer joined #salt
21:22 ekristen joined #salt
21:22 rdavis Is there anyone who can help me with my pull request and let me know where I need to fix things so that my tests pass?
21:23 rdavis The console output from the test job is really hard to parse it all and actually get to the bottom of it.
21:23 rdavis Sorry if I'm bothering anyone, but the link is: https://github.com/saltstack/salt/pull/24720
21:29 coval3nce this there a way to use some kind of manual requisite in the salt-cloud map files?
21:30 otter768 joined #salt
21:31 darknight87 joined #salt
21:36 johann joined #salt
21:45 moos3 joined #salt
21:46 Ryan_Lane murrdoc: yeah, I've used that
21:49 aqua^c joined #salt
21:52 Ryan_Lane murrdoc: I actually use it a lot
21:53 cruatta_ joined #salt
21:54 Ryan_Lane murrdoc: we have a bunch of scripts that use salt modules, especially custom ones
22:03 murrdoc what u mean ?
22:04 edrocks joined #salt
22:04 murrdoc the local Cmd stuff ?
22:04 murrdoc Ryan_Lane:  if you , i ll take a genericised example please :)
22:04 murrdoc if u can
22:09 smcquay joined #salt
22:12 Guest89 joined #salt
22:14 Zachary_DuBois joined #salt
22:24 Zachary_DuBois joined #salt
22:24 slimmons hey, when I use grains, my jobs never complete .  It returns true, but then just freezes.  I have to ctrl+c to stop it.  If I run: salt -G 'fqdn:myfqdn' test.ping    it runs forever (or, at least over 5 minutes)    if I run salt 'myserverID' test.ping it's immediate
22:38 Singularo joined #salt
22:52 baweaver joined #salt
22:52 mackstick joined #salt
22:54 ange is the 2nd part of https://gist.github.com/mcansky/1406d1b3b32912d5c064 correct for a reactor ?
22:57 ange slimmons: do you have a lot of minions ?
22:58 bhosmer_ joined #salt
23:04 maschinetheist joined #salt
23:04 maschinetheist left #salt
23:11 markm joined #salt
23:13 londo joined #salt
23:20 bfoxwell joined #salt
23:26 baweaver joined #salt
23:26 Nazca joined #salt
23:28 notnotpeter joined #salt
23:29 Edgan joined #salt
23:30 flebel joined #salt
23:31 otter768 joined #salt
23:38 aqua^c joined #salt
23:41 druonysus joined #salt
23:41 druonysus joined #salt
23:48 aqua^c joined #salt
23:50 c10 joined #salt
23:53 conan_the_destro joined #salt
23:54 ndrei joined #salt
23:55 aparsons joined #salt
23:57 aparsons_ joined #salt
23:58 cruatta joined #salt

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