Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-11-02

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

All times shown according to UTC.

Time Nick Message
00:03 foundatron joined #salt
00:07 Rubin postgres_user.present seems to take the ID as the username even if name is set :o
00:07 Rubin ugh nvm i see
00:07 Rubin (typo)
00:17 pipps99 joined #salt
00:21 stooj joined #salt
00:25 Klas joined #salt
00:32 flowstate joined #salt
00:38 abednarik joined #salt
00:41 stooj joined #salt
00:44 mohae joined #salt
00:47 MikaT joined #salt
00:48 stooj joined #salt
00:52 nicksloan joined #salt
00:59 stooj joined #salt
01:02 spuder joined #salt
01:03 ninjada_ joined #salt
01:06 edrocks joined #salt
01:10 vifon joined #salt
01:15 fracklen joined #salt
01:24 klaas joined #salt
01:24 promorphus joined #salt
01:32 mpanetta joined #salt
01:35 felskrone joined #salt
01:41 jwon joined #salt
01:44 jwon joined #salt
01:45 flowstate joined #salt
01:48 netcho joined #salt
01:52 fracklen joined #salt
02:03 akhter joined #salt
02:05 DEger joined #salt
02:08 fracklen joined #salt
02:09 netcho joined #salt
02:12 ninjada joined #salt
02:22 nawwmz joined #salt
02:25 netcho joined #salt
02:41 flowstate joined #salt
02:41 catpiggest joined #salt
02:46 jimklo joined #salt
02:50 sp0097 joined #salt
02:59 klausfiend joined #salt
02:59 klausfiend hi there
02:59 DEger joined #salt
03:00 klausfiend i'm currently trying to figure out my best approach to an issue that's affecting Yum
03:00 klausfiend specifically, on Xen guests, it will crash with an illegal instruction unless you disable certain crypto methods via environment variable
03:01 klausfiend in a state file, this is trivial to work around using environ.setenv
03:01 klausfiend but is there a way to pass an environment variable into a function from the Salt command line?
03:02 klausfiend e.g., NSS_DISABLE_HW_GCM=1 salt-ssh <target> pkg.list_upgrades
03:02 klausfiend ?
03:02 klausfiend thanks
03:03 ninjada joined #salt
03:09 edrocks joined #salt
03:18 bastiand1 joined #salt
03:20 spuder joined #salt
03:40 flowstate joined #salt
03:43 _JZ_ joined #salt
03:48 DEger joined #salt
03:53 justanotheruser joined #salt
04:01 ninjada_ joined #salt
04:26 mohae_ joined #salt
04:26 Yog joined #salt
04:26 netcho joined #salt
04:32 pipps joined #salt
04:39 MajObviousman klausfiend: hmm, that's an interesting question
04:39 MajObviousman did you find an answer yet?
04:39 * MajObviousman is also curious
04:40 jas02_ joined #salt
04:41 flowstate joined #salt
04:45 nawwmz joined #salt
04:51 cryptolukas joined #salt
05:03 pipps joined #salt
05:03 Ni3mm4nd joined #salt
05:06 iggy klausfiend: things like cmd.run have the ability to pass env variables, but there's not a general way that covers all execution modules
05:07 iggy I would normally say your best bet would to get on the box itself and use salt-call (with the env set)
05:09 iggy for salt-ssh maybe there's something you can set in ~/.ssh/config to pass them through?
05:09 iggy of course... getting rid of xen would be my first move... </troll>
05:11 hemebond Can't you set it in the YUM config?
05:18 _JZ_ joined #salt
05:30 samodid joined #salt
05:32 onlyanegg joined #salt
05:39 flowstate joined #salt
05:44 spuder joined #salt
05:47 alex_zel joined #salt
05:59 zulutango joined #salt
06:00 ninjada joined #salt
06:03 bocaneri joined #salt
06:08 Straphka joined #salt
06:11 edrocks joined #salt
06:11 samodid joined #salt
06:11 ninjada joined #salt
06:23 fracklen joined #salt
06:27 netcho joined #salt
06:33 evle joined #salt
06:33 cyborg-one joined #salt
06:39 flowstate joined #salt
06:42 jas02 joined #salt
06:43 jas02_ joined #salt
06:53 sarlalia1 joined #salt
06:57 sgo_ joined #salt
06:57 cryptolukas left #salt
06:58 sarlalia1 joined #salt
07:02 fracklen joined #salt
07:17 Mattch joined #salt
07:24 bluenemo joined #salt
07:25 bluenemo Hi guys. I thought there is no continue in jinja? https://github.com/saltstack-formulas/shorewall-formula/blob/master/shorewall/init.sls#L27 Is there in salt's jinja?
07:26 hemebond http://jinja.pocoo.org/docs/dev/templates/#loop-controls
07:28 bluenemo I see. Since what salt version is that enabled?
07:29 hemebond Nothing to do with Salt. It's Jinja.
07:29 bluenemo where can I see what jinja version salt is using?
07:30 AndreasLutro salt --versions
07:31 bluenemo ah, cool, I only knew --version x)
07:31 haam3r joined #salt
07:35 Elsmorian joined #salt
07:36 m4rx joined #salt
07:40 flowstate joined #salt
07:50 fracklen joined #salt
07:54 fracklen joined #salt
07:59 stooj joined #salt
08:06 ponyofdeath joined #salt
08:08 toanju joined #salt
08:08 toanju joined #salt
08:12 fracklen joined #salt
08:13 edrocks joined #salt
08:13 samodid joined #salt
08:16 fannet joined #salt
08:18 DEger joined #salt
08:20 akhter joined #salt
08:21 stooj joined #salt
08:23 fracklen joined #salt
08:28 netcho joined #salt
08:29 fracklen joined #salt
08:37 JohnnyRun joined #salt
08:37 dariusjs joined #salt
08:37 bigfoot_ joined #salt
08:39 flowstate joined #salt
08:40 dariusjs joined #salt
08:41 fracklen joined #salt
08:44 jas02 joined #salt
08:44 neilf__ joined #salt
08:48 netcho joined #salt
08:54 geomacy joined #salt
08:59 ronnix joined #salt
09:03 Reverend joined #salt
09:06 Reverend hey guys. is there any way to do a 'if module is available for this minion' in jinja
09:06 Reverend as in, if nginx is going to be installed, add the nginx user to gitpush
09:06 Reverend other wayt round: add the gitpush user to the nginx group.
09:10 babilen Reverend: Make the "add the nginx user to gitpush" bit part of your "install nginx" states or pillar data
09:11 Reverend i litterally just had that thought too
09:11 om2 joined #salt
09:11 Reverend make the gitpush state a requirement before nginx
09:11 Reverend and then do the groups on nginx install
09:11 Reverend ^ is that what you're thinking too/
09:14 Reverend babilen: how do you actually make a state require another state? :S
09:14 babilen Well, I'm not exactly sure what you refer to by "add the nginx user to gitpush", but the general idea was: "If you want to do something together with other things make them part of the same SLS"
09:14 babilen https://docs.saltstack.com/en/latest/ref/states/requisites.html
09:15 Reverend thank you darling.
09:15 Reverend and what I mean by that is, add the gitpush user to the nginx group. (i got it the wrong way round)
09:15 Reverend we need a bot in here that regurgetates docs pages like: "@requisites" or something :P
09:16 k_sze[work] jobs.lookup_jid looks so different now.
09:17 k_sze[work] The output used to look pretty much identical to the immediate output of a job run.
09:23 mikecmpbll joined #salt
09:29 av_ joined #salt
09:30 akw joined #salt
09:30 ntropy joined #salt
09:31 dariusjs joined #salt
09:33 pipps joined #salt
09:38 ivanjaros3916 joined #salt
09:40 flowstate joined #salt
09:40 SaltyVagrant_ joined #salt
09:41 kbaikov joined #salt
09:45 jas02 joined #salt
09:46 Reverend any advice on installing RPMs ? -_- this is making me want to blown my own brains all over my monitor
09:47 Reverend http://pastebin.centos.org/56831/
09:50 kbaikov joined #salt
09:54 Reverend fixed; http://pastebin.centos.org/56836/     -___-
09:54 * Reverend facepalms
09:55 sebastian-w joined #salt
10:03 cyborg-one joined #salt
10:07 netcho joined #salt
10:17 fannet joined #salt
10:33 ponyofdeath joined #salt
10:34 felskrone joined #salt
10:36 nawwmz joined #salt
10:38 abednarik joined #salt
10:40 flowstate joined #salt
10:42 akhter joined #salt
10:48 ronnix joined #salt
10:50 amcorreia joined #salt
10:56 ronnix joined #salt
11:00 abednarik joined #salt
11:03 onlyanegg joined #salt
11:05 jhauser joined #salt
11:07 sh123124213 joined #salt
11:15 edrocks joined #salt
11:16 N-Mi joined #salt
11:31 Trauma joined #salt
11:32 butters_ joined #salt
11:39 GreatSnoopy joined #salt
11:40 unixer joined #salt
11:40 unixer Hi all
11:41 unixer The FreeBSD base SSL update that just came out broke the minion on FreeBSD 11.0
11:41 sgo_ joined #salt
11:42 andrei_pashkin joined #salt
11:43 andrei_pashkin I have a problem: I've made a pull request, and there are some tests failing (for example: https://jenkins.saltstack.com/job/PR/job/salt-pr-linode-ubuntu14-n/6299/testReport/integration.modules.state/StateModuleTest/test_onfail_requisite/)
11:43 andrei_pashkin But on local machine everything is OK
11:43 unixer I am using 2016.3.3
11:43 andrei_pashkin What could cause that?
11:44 unixer Rebuilding the port didn't help
11:45 IgorK__ joined #salt
11:45 IgorK__ Hello
11:45 unixer Hi
11:46 IgorK__ can anybody help me with running command in salt master
11:46 IgorK__ salt minion1 cmd.run '/bin/bash --login -c "source $(which virtualenvwrapper.sh)"'
11:46 IgorK__ ?
11:46 unixer maybe Igork
11:46 IgorK__ this gives me ERROR mesg: ttyname failed: Inappropriate ioctl for device
11:47 jas02 joined #salt
11:47 unixer what OS is minion1 running?
11:47 IgorK__ ubuntu
11:48 andrei_pashkin @Igork__, try execute simpler commands, what would happen? Like "echo hello!"
11:48 IgorK__ they works
11:49 unixer why not just put the full path to virtualenvwrapper.sh?
11:50 IgorK__ this nothing changes
11:50 dariusjs joined #salt
11:50 IgorK__ e.g. salt minion1 cmd.run "source /usr/local/bin/virtualenvwrapper.sh"
11:52 IgorK__ joined #salt
11:52 IgorK__ sorry I reconnected
11:52 unixer There is probably something in virtualenvwrapper.sh causing the problem. Can you pastebin it?
11:52 IgorK__ this command "salt minion1 cmd.run "source /usr/local/bin/virtualenvwrapper.sh"" will give /bin/sh: 1: source: not found
11:53 IgorK__ yes
11:53 andrei_pashkin As I understand, the error means, that something expected an interactive terminal to be present but it doesn't
11:54 IgorK__ here is gist for virtualenvwrapper.sh but he is a huge
11:54 IgorK__ https://gist.github.com/mymtwcom/f274e55eb9688a422decbefb78c5264b
11:54 AndreasLutro what are you actually trying to do? run a python script from within a virtualenv?
11:55 unixer I don't understand what using salt to source an environment script accomplishes. Once the execution module finishes and bash exits, it will lose all the variables and functions
11:55 unixer The virtualenvwrapper should be sourced by the scripts you are trying to run with salt.
11:56 IgorK__ I want to install in separated environment project's requirements. For this I use virtualenvwrapper
11:56 AndreasLutro why not use the salt state or module "virtualenv"
11:56 akhter joined #salt
11:57 IgorK__ virtualenv not so much comfortable
11:57 AndreasLutro well if you go by comfortableness, you should just ssh to the machine and install the virtualenv using that
11:58 AndreasLutro salt has virtualenv states and modules. use them
11:59 IgorK__ no, If I have problem with envwrapper, I shouldn't find alternatives. wrapper should work
12:00 unixer I think I see the problem
12:01 IgorK__ <unixer> Do I need to create shell script, which will be source the virtualenvwrapper.sh?
12:01 unixer One of the functions is setting up tab completion
12:01 unixer I am not certain, but I bet that is what is causing the ioctl errors
12:01 IgorK__ oh
12:01 m4rx joined #salt
12:02 IgorK__ yes tab completion there as I remember for commands mkvirtualenv and others. If I correctly understood you
12:03 unixer This script looks like it is meant to be run to setup an environment for interactive use. The function that sets that up is called when virtualenvwrapper_initialize runs
12:03 unixer This script looks like it is meant to be sourced, and used to setup an interactive environment
12:04 unixer You have a few options
12:04 unixer abandon it and use the salt modules AndreasLutro mentioned
12:04 IgorK__ ok, how can you help to do it
12:04 IgorK__ ?
12:04 unixer or comment out the tab completion since it won't apply to salt
12:05 IgorK__ ok, thank you a lot
12:06 unixer I get that you are trying to setup environments for python dev
12:06 IgorK__ yes
12:06 akhter joined #salt
12:07 unixer The modules AndreasLutro suggested do just that:
12:07 unixer https://docs.saltstack.com/en/latest/ref/states/all/salt.states.virtualenv_mod.html#module-salt.states.virtualenv_mod
12:08 IgorK__ yes, I saw that already
12:11 unixer I would play around with it a bit on a test machine, see if it does what you want it to do. cmd.run can be very dangerous, so should be used only as a last resort
12:14 IgorK__ but how can I use them ('source some.sh') without cmd.run? I don't know another ways. And there are also exists commands like 'mkvirtualenv'
12:15 IgorK__ http://virtualenvwrapper.readthedocs.io/
12:15 DammitJim joined #salt
12:18 fannet joined #salt
12:25 unixer dont
12:25 unixer because after you source it, the next time you run salt cmd.run, those functions and variables will be lost
12:26 unixer you will end up having to create a script that sources it and does what you want or have complex and convoluted command that is error prone and will likely bite you in the butt later
12:28 unixer you will end up with something like this salt minion cmd.run 'bash -l -c "source env.sh && some_other_command arg1 arg2"'
12:29 unixer better: salt minions state.sls virtualenv.pydev
12:29 unixer or: salt minions virtualenv.create /path/to/env
12:30 edrocks joined #salt
12:31 IgorK__ ok, think that will stop on creating environments in separated path
12:31 mavhq joined #salt
12:31 IgorK__ thank you
12:32 IgorK__ as here "salt minions virtualenv.create /path/to/env"
12:33 MrGats joined #salt
12:34 tyler2016 I figured out the problem with the minion on FreeBSD 11.0
12:34 tyler2016 You have to rebuild the python27 port
12:35 sgo_ joined #salt
12:35 tyler2016 The update that came out removed some SSL2 stuff, so when salt tries to "import ssl", it throws an exception because it is looking for functions in .so files that don't exist
12:36 tyler2016 recompiling it removes the references to the removed code.
12:41 infrmnt joined #salt
12:44 flowstate joined #salt
12:45 _aeris joined #salt
12:49 Reverend joined #salt
12:57 Reverend is there any way I can get salt to give me a blue-green deployment on it's minions?
12:57 Reverend or will i need to do that myself and just use salt as the provisioner?
13:01 jav joined #salt
13:02 racooper joined #salt
13:11 losh joined #salt
13:13 scoates joined #salt
13:14 amontalban joined #salt
13:14 amontalban joined #salt
13:14 ronnix joined #salt
13:23 Antiarc joined #salt
13:23 nicksloan joined #salt
13:25 edrocks joined #salt
13:27 netcho joined #salt
13:27 Trauma joined #salt
13:28 m4rx joined #salt
13:29 m4rx joined #salt
13:31 abednarik joined #salt
13:35 wangofett joined #salt
13:37 cscf Reverend, what do you mean by  blue-green ?
13:37 NaCl_ joined #salt
13:38 m4rx joined #salt
13:39 kojiro joined #salt
13:42 Guest40790 HI guys wondering if you have ever seen anything like this ? <script src="https://gist.github.com/anonymous/7e31397744914ad05b4f255871dd6be0.js"></script
13:43 cscf Guest40790, in what context?  or did you paste the link wrong?
13:43 Guest40790 sorry my bad :P
13:43 Guest40790 https://gist.github.com/anonymous/7e31397744914ad05b4f255871dd6be0
13:44 Guest40790 when calling dockerng.image_present i get tuple index out of range
13:45 cscf Guest40790, do your master and minion versions match?
13:45 Brew joined #salt
13:45 stack hi, can I check the existence of a salt:// file before including it?
13:45 Guest40790 Masters running salt 2015.8.10 (Beryllium)
13:46 Guest40790 how can i check the minion version ?
13:46 Guest40790 wait got it
13:46 Tanta joined #salt
13:47 Guest40790 minions running   salt-minion 2015.8.7 (Beryllium)
13:47 tyler2016 A few things to try
13:47 tyler2016 make sure the master/minion are the same version
13:47 tyler2016 refresh the data on the minions
13:48 Guest40790 will they be the exact same version so my minion will need to be 2015.8.10
13:48 Guest40790 ?
13:48 jas02 joined #salt
13:48 kojiro joined #salt
13:50 tyler2016 I don't remember the rule off hand, but I think as long as the master is a newer version than the minion you are ok, but should keep them on the same version
13:50 whatevsz joined #salt
13:51 mavhq joined #salt
13:51 tyler2016 Try salt minion saltutil.sync_all
13:52 kojiro joined #salt
13:52 tyler2016 also saltutil.refresh_pillar
13:53 Guest40790 Still persists after that :(
13:54 wangofett joined #salt
13:54 tyler2016 try saltutil.clear_cache
13:55 Guest40790 still appears
13:55 tyler2016 hmm
13:56 Guest40790 will always work if I dont have a further line in the dockerfile
13:56 Guest40790 if I only have a single RUN line
13:56 Guest40790 it seems to take it fine and can create the image
13:56 numkem joined #salt
13:56 Guest40790 any more than that I get the tuple error :(
13:57 jschoolcraft joined #salt
13:57 Guest40790 is dockerng expecting a one liner or somthing ?
13:57 JPT joined #salt
13:57 tyler2016 I don't know, don't use docker. That is definitely a python error though
13:58 tyler2016 Try running the state with more verbosity
13:58 cscf I've heard that sometimes docker itself doesn't like multiple RUN lines.  Might be unrelated, though.
13:58 tyler2016 Can you login to the minion and try it with salt-call
13:59 Guest40790 @cscf can manually build an image from teh dockerfile
13:59 tapoxi joined #salt
14:00 tapoxi good morning everyone
14:00 tyler2016 hi
14:00 tapoxi anyone using the openssh formula? it disabled sftp access, do I need to add the subsystem line?
14:01 tyler2016 Guest40790, what does: salt-call -l debug state.sls your_docker_state output
14:01 subsignal joined #salt
14:02 Guest40790 same error have a log though
14:02 Guest40790 will paste
14:05 subsigna_ joined #salt
14:05 Guest40790 cant seem to redirect the whole log with > think ive grabebd the docker bit though
14:05 Guest40790 https://gist.github.com/anonymous/8523fd28a02c2c950e460f2037c29e41
14:05 Reverend cscf: deploying to one box, making sure it works, then the next, rinse repeat
14:06 Reverend ^ in reference to blue-green
14:06 cscf Reverend, like, salt 'minion1' state.apply and only run the rest if it returned no errors?
14:07 Reverend yeah
14:07 cscf Reverend, you could use orchestration
14:07 dyasny joined #salt
14:07 Reverend okay, thanks. I'll take a look :)
14:07 Reverend <3
14:07 cscf I don't know if that's the nice solution, though
14:09 Reverend I'll take a look. I was just wondering if anyone had used something that did that
14:09 Reverend it's not a requirement, it's just a nice to have so we don't f'up the whole network with one state.apply :P
14:11 antpa joined #salt
14:12 Guest40790 @tyler do you think its worth a bug report or an issue my side ?
14:16 cscf Reverend, well, one can always just specify 1 minion, wait for it, then '*'.  I'm literally waiting for one right now.
14:17 CrummyGummy Hi
14:17 Reverend cscf: doesn't sound like a bad idea
14:18 CrummyGummy Hi
14:18 CrummyGummy sorry..
14:19 fannet joined #salt
14:20 CrummyGummy I have a git pillar defined as ext_pillar but it sets the branch as master. Here's a config snippet. Any ideas why I had to go in and set the branch manually?
14:20 CrummyGummy ext_pillar:
14:20 CrummyGummy - git:
14:20 CrummyGummy - production http://raven/git/salt-pillar:
14:20 CrummyGummy - name: production
14:20 CrummyGummy - env: base
14:20 mpanetta joined #salt
14:23 jav joined #salt
14:24 racooper CrummyGummy,  please use gist or a pastbin....
14:25 xet7 joined #salt
14:27 pipps joined #salt
14:29 pipps99 joined #salt
14:30 CrummyGummy sure, I just figured for 6 lines..
14:32 CrummyGummy Also, now that I have my config working, the master is hardly responding. can't win...
14:32 Guest40790 @tyler2016 think its worth reporting or my side ?
14:33 racooper Guest40790,  this is IRC, not twitter or facebook ;) @user may not work like you expect in most IRC clients
14:33 CrummyGummy How do I boot old minions? They just seem to stick around forever
14:33 abednarik joined #salt
14:34 racooper you can delete old minions manually with salt-key, and may be able to automate it with reactor events (though I'm not totally sure on that last part)
14:35 CrummyGummy thanks
14:37 dendazen joined #salt
14:38 CrummyGummy wierd, I had an accepted key and an unaccepted key with the same name.
14:39 racooper speaking of reactors: I know it has to be possible for an event on one minion to fire a state targeting a different minion, but I'm missing something in trying to get that to run.
14:39 racooper I vaguely recall there was a minion setting that had to be changed, but I can't remember what it is now.
14:41 dariusjs joined #salt
14:47 CrummyGummy racooper: Thanks
14:48 keltim joined #salt
14:48 Ni3mm4nd joined #salt
14:50 mapu joined #salt
14:50 jas02 joined #salt
14:50 spuder joined #salt
14:52 johnkeates joined #salt
14:53 jas02_ joined #salt
14:53 tiwula joined #salt
14:55 hasues joined #salt
14:55 jas02 joined #salt
14:59 edrocks joined #salt
15:00 CrummyGummy Any idea why I'm getting timeouts on the salt master now? I've upped it to 15 threads but I only have 1 minion.
15:00 CrummyGummy SaltReqTimeoutError, retrying. (3/3)
15:01 racooper https://groups.google.com/forum/#!topic/salt-users/Zq38NKjd1z4
15:01 CrummyGummy https://gist.github.com/anonymous/e7ea8ee6a4f9277da079427e5d5ecfd5
15:02 pipps joined #salt
15:07 spuder joined #salt
15:13 writtenoff joined #salt
15:13 jimklo joined #salt
15:15 nawwmz joined #salt
15:16 flowstate joined #salt
15:21 flowstate joined #salt
15:23 onlyanegg joined #salt
15:27 rherna joined #salt
15:30 quasiben joined #salt
15:32 jimklo joined #salt
15:38 xenocode joined #salt
15:40 DammitJim joined #salt
15:41 DammitJim can I target minions with a List that has regular expressions?
15:41 racooper https://docs.saltstack.com/en/latest/topics/targeting/
15:42 racooper using the compound matcher with E@
15:42 DammitJim racooper, but for a list AND compound matcher?
15:43 DammitJim so, something like: 'myserv(prod|dev),myotherserver'
15:43 DammitJim that would target: myservprod, myservdev, and myotherserver
15:43 racooper try it and see, not sure.  fire against test.ping or something non-distructive
15:43 DammitJim yeah, it doesn't work
15:43 sp0097 joined #salt
15:43 DammitJim that's why I was asking if it was possible
15:43 DammitJim so I knew I am not doing something wrong
15:43 racooper may have to do 9myserver(prod|dev) and myotherserver
15:44 racooper s/9/'/
15:44 danlsgiga DammitJim: I guess you need to using 2 compound structures
15:44 danlsgiga DammitJim: E@ and L@
15:44 racooper try again: salt -C 'E@myserver(prod|dev) and myotherserver' test.ping
15:44 DammitJim oh
15:45 racooper and/or, I'd have to test which is correct
15:45 DammitJim dammit... is salt-cloud not supported in 2015.5.3?
15:45 danlsgiga DammitJim: Example: salt -C 'E@myserver(prod|dev) and L@myotherserver,myotherserver2' test.ping
15:46 danlsgiga DammitJim: Actually, instead of 'and' its 'or'
15:46 DammitJim that was it!
15:46 DammitJim cool
15:50 beowuff joined #salt
15:51 DEger joined #salt
15:51 jas02_ joined #salt
15:54 DammitJim does service.dead disable the service from starting on boot?
15:56 babilen DammitJim: It doesn't, do you want it to?
15:56 DammitJim oh, I need enable=False
15:56 babilen indeed
15:56 DammitJim oh yeah, I have that in place
15:56 DammitJim I guess when performing an upgrade, ubuntu probably re-enables it
15:58 spuder joined #salt
16:00 patarr joined #salt
16:00 DammitJim weird... I ran the service.dead with enable: False
16:00 DammitJim and I got: Service tomcat7 is already disabled, and is dead
16:01 DammitJim I went to the server and sudo service tomcat7 status told me cat: /var/run/tomcat7.pid: No such file or directory, but then said: * Tomcat servlet engine is running with pid
16:03 yuhlw____ joined #salt
16:08 wm-bot4 joined #salt
16:10 Rumbles joined #salt
16:10 amcorreia joined #salt
16:17 fracklen joined #salt
16:17 edrocks joined #salt
16:19 MeltedLux joined #salt
16:20 fannet joined #salt
16:20 toastedpenguin joined #salt
16:22 RandyT good day
16:22 RandyT anyone here using AWS that is running into some scripting errors today?
16:22 No_Wizard_Here joined #salt
16:22 RandyT Seeing the following related to profile processing. "TypeError: string indices must be integers, not str"
16:23 whytewolf DammitJim: that sounds like a bad init script
16:23 RandyT this was working as of about 12 hours ago...
16:23 samodid joined #salt
16:24 The joined #salt
16:24 RandyT not sure if this is possibly related to resource identifier string change message from AWS that I  have been ignoring for last few months?
16:24 The left #salt
16:25 The-Loeki joined #salt
16:26 * whytewolf shrugs
16:26 mohae joined #salt
16:28 RandyT appears resource ID length deadline is Dec 13.. so not that..
16:28 lompik joined #salt
16:42 fracklen joined #salt
16:42 jimklo joined #salt
16:42 jimklo joined #salt
16:43 RandyT so I have tracked this issue down to the following ability to pass string of 'use-instance-role-credentials' is no longer valid.
16:43 RandyT https://docs.saltstack.com/en/latest/topics/cloud/aws.html#access-credentials
16:44 Edgan joined #salt
16:44 RandyT I cannot be the only one that this is impacting
16:45 iggy did you check the issue tracker?
16:46 RandyT iggy: just getting there...
16:47 pidydx joined #salt
16:48 flowstate joined #salt
16:48 pidydx Since pip.installed with update reports change even if nothing changed is there a way to get the version of an installed python module when applying a state?
16:48 RandyT looking at the code, I may be hitting expiration issue
16:49 pidydx maybe saving the output of a pip list command into a variable that can be reused in a template
16:50 iggy pidydx: the problem with things like looking up versions is that the lookup happens when the states are rendered at the beginning of the run... not after the upgrade happens
16:50 iggy I hit this all too often :/
16:50 iggy usually end up having to write custom states to do what I need
16:50 pidydx I wish the upgrade bug would just get fixed :(
16:50 sh123124213 joined #salt
16:50 kojiro joined #salt
16:52 kojiro joined #salt
16:52 Rolypoly joined #salt
16:53 flowstat_ joined #salt
16:53 iggy is there an issue open for it?
16:54 gtmanfred yes https://github.com/saltstack/salt/issues/24216
16:54 saltstackbot [#24216][OPEN] pip.installed: upgrade: true always makes changes | I want to keep the latest version of a pip package installed, but every time I run highstate it reports changes....
16:55 pidydx Yup: https://github.com/saltstack/salt/issues/24216
16:55 saltstackbot [#24216][OPEN] pip.installed: upgrade: true always makes changes | I want to keep the latest version of a pip package installed, but every time I run highstate it reports changes....
16:55 pidydx oh beat me to it
16:55 pidydx long standing issue at that :(
16:58 joselfr joined #salt
17:00 Yopes joined #salt
17:03 CEH joined #salt
17:03 pidydx iggy: So even if a salt.shell is set to watch a pip.installed for change it will still run the command before the  change happens?
17:06 pipps joined #salt
17:11 flowstate joined #salt
17:12 wangofett joined #salt
17:20 gheistbane joined #salt
17:21 subsignal joined #salt
17:21 pipps joined #salt
17:23 dps joined #salt
17:29 pipps joined #salt
17:38 Guest40790 Question im trying to map my docker container to a free port on the docker Host is there a salt grain which can get free ports ?
17:39 Reverend all the ports. just aim for somewhere 30K+ and you're gonna hit a free one guaranteed :P
17:40 akhter joined #salt
17:40 iggy you could write one, I don't think that's a good idea though
17:40 iggy probably better to have like a network function do it
17:41 iggy (if you list every open port in grains... your grains will basically become unreadable if you ever have to see what's there)
17:41 Guest40790 Im assigning multiple containers for different apps id be happy if salt could check if it port 10001 was in use if not use 10002 ect
17:42 Guest40790 * if so
17:42 iggy I don't know of anything to do that
17:42 iggy (in salt)
17:42 Edgan iggy: every open port with ephemeral connections, yeah, but open listening ports seems like a reasonable list
17:42 iggy if you write something, I'm sure the salt devs would love to see a PR for it as that sounds like useful functionality
17:43 iggy still think a network function would be better
17:43 iggy grains can be cached, a module is going to check right when you run it
17:43 Reverend Guest40790: sorry - for the sake of my sanity, can you do `/nick <insert something here>`
17:43 Reverend :)
17:44 iggy {% new_port = salt['network.get_random_port'](min=1024) %}
17:44 iggy or something
17:44 iggy {% new_port = salt['network.get_next_avail_port'](start=10001) %}
17:45 iggy shouldn't be too difficult to write that up
17:45 Guest40790 yea
17:45 Guest40790 terrible at python though :D
17:45 Guest40790 ahh well no time llike the present to leanr
17:45 Guest40790 ahh well no time llike the present to learn
17:45 ivanjaros joined #salt
17:46 gtmanfred Guest40790:is there any reason that you wouldn't just let docker assign the ports like it already does if you don't supply a destination port, and then just pull the information about the port from the docker.info?
17:47 shadoxx left #salt
17:49 Guest40790 thought i needed to assign a port exposed
17:49 Guest40790 if docker will do it by magic that would be easier
17:50 gtmanfred yeah, it will do it, just specify the port you want to expose, and docker will assign one
17:50 gtmanfred one being a public port to forward to the container's exposed port
17:51 gtmanfred then you should be able to use docker.info or docker.inspect execution module to find the port that is exposed for each container
17:51 mpanetta joined #salt
17:53 jas02_ joined #salt
17:53 Guest40790 Awesome thanks :D
17:54 bltmiller joined #salt
17:56 Trauma joined #salt
17:59 nicksloan joined #salt
18:00 pipps joined #salt
18:01 pipps99 joined #salt
18:02 mavhq joined #salt
18:04 druonysus joined #salt
18:10 jas02_ joined #salt
18:15 nickg joined #salt
18:16 infrmnt joined #salt
18:16 hasues left #salt
18:18 onlyanegg joined #salt
18:21 fannet joined #salt
18:23 subsignal joined #salt
18:25 DammitJim joined #salt
18:29 sh123124213 joined #salt
18:35 jas02_ joined #salt
18:36 tapoxi joined #salt
18:40 west575_ joined #salt
18:40 sh123124213 how do I run salt-minion or master in debug mode through pycharm ?
18:41 druonysus joined #salt
18:43 gtmanfred you could add 'log_level: debug' to the configuration file?
18:43 gtmanfred https://docs.saltstack.com/en/latest/ref/configuration/logging/
18:43 gtmanfred or pass -l debug to the command that pycharm runs?
18:44 sh123124213 nah, through pycharm but I figured I just start salt-minion in debug mode and it works ( through scripts dir )
18:44 stooj joined #salt
18:45 pipps joined #salt
18:45 Elsmorian joined #salt
18:47 CrummyGummy_ joined #salt
18:48 timfi joined #salt
18:50 druonysus What is the best version of Salt to go with in a production environment? On CentOS 7, I noticed that the salt bootstrap script installed 2016.3.3... I feel like that might be a bit too far behind
18:50 gtmanfred that is the newest version
18:51 gtmanfred 2016.3.4 will be released later today
18:51 druonysus k
18:51 druonysus thanks
18:51 gtmanfred and then sometime this month we are trying to release 2016.11
18:52 pipps joined #salt
18:53 mikecmpbll joined #salt
18:54 pipps99 joined #salt
18:56 Tanta I use the EPEL repos
18:56 impi joined #salt
18:56 Tanta not the most recent version, but it works well enough and is stable
18:58 sh123124213 gtmanfred : when you say released you mean it will be available in the repos ?
18:59 gtmanfred yes
18:59 iggy I'm getting ERR_ADDRESS_INVALID for docs.saltstack.com
19:00 PerilousApricot joined #salt
19:00 gtmanfred hrm, loads here
19:01 iggy maybe chrome being an asshole
19:01 iggy sorry for the noise
19:01 gtmanfred :)
19:02 jhauser joined #salt
19:02 flowstate joined #salt
19:03 Tanta_G joined #salt
19:04 catpig joined #salt
19:05 PerilousApricot joined #salt
19:09 nidr0x joined #salt
19:10 nicksloan joined #salt
19:16 s_kunk joined #salt
19:20 Rubin whats the best way to setup minions to periotically run highstate regularly? just cron it?
19:21 cscf Rubin, are you running masterless?
19:21 Rumbles_ joined #salt
19:21 Rubin no i have a master
19:21 Rubin though the master isnt yet itself running as a minion
19:22 cscf Rubin, then why not schedule it from the master?
19:22 Rubin via cron?
19:22 cscf Sure
19:22 whytewolf Rubin: https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs
19:22 cscf I thought you meant scheduling the minions to salt-call by themselves
19:22 gtmanfred Rubin: there is also the salt scheuduler
19:22 Rubin either way
19:23 Rubin oh that looks nice whytewolf/gtmanfred
19:24 Rubin can i just put top.sls as the scheduled function?
19:25 flowstate joined #salt
19:25 whytewolf or you could use state.apply with no args
19:26 Rubin or state.highstate ?
19:26 Rubin is state.apply the same?
19:26 kojiro state.apply == state.highstate
19:26 Rubin kk
19:26 akhter joined #salt
19:26 Rubin oh it even does splaying and stuff nice
19:26 whytewolf state.apply == (state.highstate OR state.sls <state>)
19:32 Rubin how do i specify the target if i do this from the master?
19:32 Rubin ie '*' ?
19:33 mauli_ joined #salt
19:33 whytewolf sceduleing happens on the minion. the examples are through pillar so you assign those pillars to the minion you want the schedule to run on
19:33 bltmiller joined #salt
19:34 Rubin oh. that page made it sound like you could do it on the master too
19:34 whytewolf if you are using the states you apply those states to the minion you want it to run on
19:36 Rubin maybe i can put schedule.present in them to do it that way
19:36 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.schedule.html
19:41 sgo_ joined #salt
19:41 Rubin should i schedule refresh_pillar too?
19:44 swa_work joined #salt
19:45 bltmiller I need to start piping my emails though sed 's/slapstick/saltstack/'
19:45 GreatSnoopy joined #salt
19:46 keimlink joined #salt
19:48 amontalban joined #salt
19:48 pipps joined #salt
19:51 cscf bltmiller, autocorrect?
19:51 bltmiller cscf: oh you know it
19:53 swills joined #salt
19:59 subsignal joined #salt
20:02 ivanjaros joined #salt
20:04 edrocks joined #salt
20:06 bantone joined #salt
20:10 toanju joined #salt
20:15 hemebond joined #salt
20:22 fannet joined #salt
20:26 upb just wondering about the scheduler. i need to apply a state on a minion, but it should be applied at the first moment a certain condition is present (a seconds idle counter in a file on the minion is > n)
20:27 haam3r joined #salt
20:27 upb could i build.this with the scheduler? to retry periodically until the condition is present, thenactuwlly run the state and get rid of the retrying job?
20:28 upb essentially a package should be upgraded when the minion is "not in use"
20:34 pipps99 joined #salt
20:36 mapu joined #salt
20:53 KajiMaster joined #salt
20:59 ALLmightySPIFF joined #salt
21:01 whytewolf upb: sounds like what you want is beacons not the scheduler
21:02 upb i'll check it out, thx
21:02 racooper I just finished figuring out something similar with an inotify beacon
21:02 om2 joined #salt
21:06 upb damn, this sounds like exactly what id need but my minions are windows
21:07 pipps joined #salt
21:10 flowstate joined #salt
21:11 pipps joined #salt
21:14 Elsmorian joined #salt
21:15 ALLmightySPIFF joined #salt
21:16 felskrone joined #salt
21:16 whytewolf ahhh windows ... the pain in any CM's side
21:19 swills joined #salt
21:24 gtmanfred whytewolf: caught this one https://github.com/saltstack/salt/pull/37425
21:24 saltstackbot [#37425][OPEN] get cachedir_index add and del moved to __utils__ | I also checked and did not see these functions used anywhere else that wasn't already using __utils__
21:26 whytewolf I never understood the difference between salt.util and __utils__
21:27 pipps joined #salt
21:27 gtmanfred well, __utils__ has __opts__ injected into it
21:27 gtmanfred instead of always having to pass it through
21:27 gtmanfred we are switching to __utils__ cause it is injected into all the cloud providers now
21:28 gtmanfred we had to switch to it for some of the cloud cache stuff
21:28 gtmanfred and these got missed in newer branches from where the change was made
21:28 whytewolf ahhh kewl
21:28 Edgan gtmanfred: any idea when the next 2016.11rc might come out?
21:29 gtmanfred nope
21:29 gtmanfred well, kind of, we tagged it internal today
21:30 Edgan gtmanfred: so rc2 "soon"?
21:30 gtmanfred ¯\(°_o)/¯
21:30 swills joined #salt
21:30 Edgan haha
21:31 whytewolf rc2 = time(now+rand(now+heatdeathuniverse))
21:31 gtmanfred i already found a bug in it
21:31 gtmanfred in rc2*
21:32 pipps joined #salt
21:34 tongpu joined #salt
21:34 fracklen joined #salt
21:37 bltmiller joined #salt
21:37 Edgan gtmanfred: there are ALWAYS bugs, it is how you know it is salt :\
21:37 Edgan gtmanfred: is it a blocker bug?
21:37 gtmanfred Edgan: see the pr i linked above
21:37 gtmanfred where nova throws an error on create and delete
21:38 Edgan gtmanfred: for me, cloud is not blocking
21:38 gtmanfred heh, well, we will see if it is or not...
21:39 whytewolf nova driver ... would block rackspace/ hp cloud users
21:39 flowstate joined #salt
21:40 gtmanfred there are enough people using in that i bet it gets blocked
21:53 Rumbles_ joined #salt
21:54 jas02_ joined #salt
21:58 pipps joined #salt
22:03 fracklen joined #salt
22:07 ninjada joined #salt
22:07 foundatron joined #salt
22:07 bltmiller joined #salt
22:07 ninjada joined #salt
22:08 edrocks joined #salt
22:08 subsignal joined #salt
22:11 fxdgear joined #salt
22:14 netcho joined #salt
22:17 pipps99 joined #salt
22:17 justanotheruser joined #salt
22:18 swills joined #salt
22:23 fannet joined #salt
22:23 stooj joined #salt
22:33 RandyT hey salts
22:34 RandyT can someone provide an example as to what an ec2 profile should look like when trying to attach an existing ebs volume?
22:34 RandyT https://docs.saltstack.com/en/develop/topics/cloud/aws.html#attaching-volumes
22:34 RandyT I find this from the command line and a vague mention of volume_id further up in the doc
22:36 fxdgear joined #salt
22:37 notnotpe_ joined #salt
22:37 stooj joined #salt
22:37 RandyT I find this code reference which suggest that volume_id is a key to BlockDeviceMapping
22:37 RandyT https://github.com/saltstack/salt/blob/develop/salt/modules/boto_ec2.py#L806
22:37 RandyT but not clear where "Device" belongs in that construct
22:40 flowstate joined #salt
22:43 abednarik joined #salt
22:51 subsignal joined #salt
22:56 jas02_ joined #salt
22:56 ninjada joined #salt
22:56 systo joined #salt
23:04 dendazen joined #salt
23:06 jas02 joined #salt
23:08 ninjada joined #salt
23:15 bltmiller calling bash experts
23:15 bltmiller I have a problem with: salt '*' cmd.run "groups $(whoami)". I think whoami is getting evaluated before being sent over to my minions
23:18 danlsgiga hey guys... how can I filter salt exceptions and reply custom errors when issuing commands to the salt-api?
23:19 bltmiller my own follow-up: using single-quotes around my bash fixed it
23:19 tiaz bltmiller: um. why don't you just run groups by itself
23:19 tiaz oh, to get the username in the output?
23:20 tiaz ... isn't salt connecting to all of those as the same user?
23:20 bltmiller it's a connecting piece to some other magic trickery
23:20 bltmiller our setup is quite a mess, by necessity :/
23:20 bltmiller rather, it's a victim of policies
23:21 tiaz unfortunate
23:21 bltmiller terribly so.
23:22 tiaz anyway, you also should be able to get away with escaping the control characters in that, but single quoting is less messy looking
23:22 bltmiller aye
23:22 bltmiller regarding my gimped environment, it spawned this nice little post: http://btmiller.com/2016/05/23/install-saltstack-without-root-privileges.html
23:24 k_sze[work] joined #salt
23:24 akhter joined #salt
23:28 druonysus joined #salt
23:34 subsignal joined #salt
23:35 fxdgear joined #salt
23:38 hemebond So are you running salt-minion as root?
23:38 bltmiller nope
23:38 hemebond Oh, you're not.
23:39 hemebond So what's the point? What are you using Salt for?
23:39 bltmiller everything
23:39 bltmiller nginx, tomcat, elasticsearch, hazelcast, postgres, ... it all gets installed locally
23:39 hemebond Locally as in ... under... user directory?
23:39 bltmiller yes
23:40 bltmiller lots of ./configure && make && make install
23:40 bltmiller and lots of tarballs
23:40 hemebond Were you the one using Salt to manage their laptop?
23:40 flowstate joined #salt
23:40 bltmiller lol no
23:40 bltmiller I do know a guy at my old job that was trying to do that!
23:40 hemebond Then is this for doing stuff on a multi-user machine?
23:41 bltmiller our user directory is really just a service account
23:41 bltmiller in most, if not all, cases each server has only that service account
23:42 hemebond So your server runs everything under the same restricted account?
23:42 bltmiller yyyyyyup.
23:43 telecode101 joined #salt
23:47 bltmiller what a great idea! right??
23:47 bltmiller sarcasm doesn't translate nicely over text. perhaps I should have included /s
23:51 abednarik joined #salt
23:56 jas02_ joined #salt

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