Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-09-01

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

All times shown according to UTC.

Time Nick Message
00:01 jxm_ joined #salt
00:06 snc joined #salt
00:06 Vaelatern When I install the package personally, the response is green: Version 3.4.4 of package 'python' is already installed
00:08 brotatochip joined #salt
00:08 woodtablet left #salt
00:09 mattp_ what is the right way to take a raw file on a minion, and get that into a sls state file on the master?
00:09 mattp_ if that raw file is parsed into a data structure that can be acted on like pillar
00:09 mattp_ should I use ext_pillar script?
00:09 mattp_ is there some way im not seeing if i write it as an execution module function?
00:10 Vaelatern Salt version is 2015.8.5
00:24 raspado joined #salt
00:25 amcorreia joined #salt
00:28 subsignal joined #salt
00:31 flowstate joined #salt
00:33 ssplatt joined #salt
00:38 nicksloan joined #salt
00:39 pipps joined #salt
00:43 netcho joined #salt
00:45 sjmh joined #salt
00:46 west575 joined #salt
00:48 jimklo_ joined #salt
00:51 John_Kang joined #salt
00:53 chrichip joined #salt
00:56 flowstate joined #salt
00:57 _JZ_ joined #salt
01:02 west575 joined #salt
01:02 Siddy11 joined #salt
01:03 jenastar joined #salt
01:03 TRManderson joined #salt
01:03 pipps joined #salt
01:05 TRManderson Is there a way to get salt to pay attention to the HTTP proxy I'm stuck behind when running states?
01:06 TRManderson because googling 'salt http proxy' is fairly useless
01:07 TRManderson nvm, found it in minion config
01:10 TRManderson though it doesn't seem to be affecting anything
01:25 k_sze joined #salt
01:26 k_sze Using SaltStack 2015.5, how can I prevent "Minion did not return. [No response]" all the time?
01:26 k_sze My minion is at a remote location. I have got all the proper packet routings and I can ping it and SSH into it with no problem ever.
01:27 k_sze But running salt jobs usually results in that message, and sometimes the job fails with "SaltReqTimeoutError: SaltReqTimeoutError: after 180 seconds, ran 3 tries" after a while.
01:29 ssplatt joined #salt
01:31 whytewolf TRManderson: you have to use a http proxy between your minions and the master?
01:31 ajw0100 joined #salt
01:32 alexhayes joined #salt
01:33 TRManderson I have to use a http proxy on the minion to connect to the outside world
01:33 TRManderson minion and master communicate freely
01:33 whytewolf ahhh ok
01:34 ninjada joined #salt
01:37 whytewolf TRManderson: maybe take a look at this bug. and see if it help you figure it out. https://github.com/saltstack/salt/issues/23617
01:37 saltstackbot [#23617][OPEN] file.managed with proxy broken in 2015.5 | Hey all, I have a state that looks something like this:...
01:39 chrichip joined #salt
01:40 TRManderson ty whytewolf
01:41 whytewolf np
01:46 catpigger joined #salt
01:46 cyborg-one joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.11, 2015.8.11, 2016.3.2 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:56 flowstate joined #salt
01:58 debian112 joined #salt
01:58 subsignal joined #salt
02:08 jaybocc2 joined #salt
02:17 chrichip joined #salt
02:20 bastiand1 joined #salt
02:26 hosttor joined #salt
02:28 mosen joined #salt
02:29 netcho joined #salt
02:31 west575 joined #salt
02:32 Kruge joined #salt
02:36 nethershaw joined #salt
02:43 ninjada_ joined #salt
02:47 evle joined #salt
02:55 chrichip joined #salt
02:56 flowstate joined #salt
02:59 subsignal joined #salt
03:02 cliluw joined #salt
03:03 DEger joined #salt
03:11 johnkeates joined #salt
03:16 pipps joined #salt
03:23 rem5_ joined #salt
03:33 jenastar joined #salt
03:43 hasues joined #salt
03:43 hasues left #salt
03:45 west575 joined #salt
03:49 jaybocc2 joined #salt
03:53 debian112 joined #salt
03:55 ninjada joined #salt
03:56 flowstate joined #salt
03:57 SwisterTwister joined #salt
03:57 brotatochip joined #salt
04:01 subsignal joined #salt
04:04 sp0097 joined #salt
04:08 kshlm joined #salt
04:13 mpanetta_ joined #salt
04:14 justan0theruser joined #salt
04:14 debian112 joined #salt
04:27 jaybocc2 joined #salt
04:29 sjmh joined #salt
04:30 netcho joined #salt
04:35 sjmh joined #salt
04:36 brotatochip joined #salt
04:38 gadams joined #salt
04:39 APLU joined #salt
04:39 liviudm joined #salt
04:39 linovia joined #salt
04:40 abele joined #salt
04:40 djural joined #salt
04:40 nonades joined #salt
04:40 Freek joined #salt
04:40 JamieH joined #salt
04:41 phtes joined #salt
04:41 futuredale joined #salt
04:42 ajw0100 joined #salt
04:42 rome_390 joined #salt
04:42 Matthew_ joined #salt
04:42 munhitsu_ joined #salt
04:43 mattl joined #salt
04:43 FreeSpencer joined #salt
04:43 FreeSpencer joined #salt
04:43 emid joined #salt
04:43 hu-dabao joined #salt
04:46 beardo joined #salt
04:46 skeezix-hf joined #salt
04:52 McNinja joined #salt
04:54 ajv joined #salt
04:54 justanotheruser joined #salt
04:58 flowstate joined #salt
04:58 jaybocc2 joined #salt
05:02 subsignal joined #salt
05:05 smakar joined #salt
05:06 imanc joined #salt
05:06 SteamWells joined #salt
05:06 SwisterTwister left #salt
05:06 johtso joined #salt
05:06 kutenai joined #salt
05:14 supermike_ joined #salt
05:14 czchen joined #salt
05:14 bmcorser joined #salt
05:15 d3c4f joined #salt
05:15 CaptTofu joined #salt
05:15 moy joined #salt
05:15 antonw joined #salt
05:20 onlyanegg joined #salt
05:33 ub joined #salt
05:37 John_Kang joined #salt
05:37 netcho joined #salt
05:38 kshlm joined #salt
05:41 amy_ joined #salt
05:41 pipps joined #salt
05:46 ub2 joined #salt
05:47 west575 joined #salt
05:56 flowstate joined #salt
05:59 jaybocc2 joined #salt
06:04 subsignal joined #salt
06:05 bocaneri joined #salt
06:07 sp0097 left #salt
06:08 ravenx joined #salt
06:11 ravenx hi guys, is it possible to use the output of one state
06:11 ravenx as input into another state
06:11 ravenx basically i want the stdout's values
06:11 ravenx is there anyway of a chieving that?
06:12 kus joined #salt
06:13 DEger joined #salt
06:19 _JZ__ joined #salt
06:19 leev_ joined #salt
06:20 elkektetet joined #salt
06:21 wryfi_ joined #salt
06:21 ventris_ joined #salt
06:21 my10c joined #salt
06:22 Veers joined #salt
06:22 rideh joined #salt
06:22 zer0def joined #salt
06:23 unusedPhD_ joined #salt
06:24 jor joined #salt
06:25 dariusjs joined #salt
06:27 Cidan joined #salt
06:28 roxtrongo joined #salt
06:28 jxm_ joined #salt
06:34 k_sze Is it possible to write something that makes salt output a custom message at the end of a particular job/state?
06:35 ntropy k_sze: depends on your exact needs, but reactor might be what you want https://docs.saltstack.com/en/getstarted/event/reactor.html
06:37 k_sze ntropy: thanks for the hint, I'll check that out.
06:43 west575 joined #salt
06:45 CeBe joined #salt
06:47 jaybocc2 joined #salt
06:52 fracklen joined #salt
06:55 fracklen joined #salt
06:57 toanju joined #salt
06:57 flowstate joined #salt
07:02 yuhlw_ joined #salt
07:07 ninjada_ joined #salt
07:12 mohae_ joined #salt
07:21 Ch3LL joined #salt
07:23 twiedenbein joined #salt
07:24 robbintt joined #salt
07:24 jfindlay joined #salt
07:25 ninjada joined #salt
07:27 dariusjs joined #salt
07:27 rdas joined #salt
07:31 DEger joined #salt
07:31 netcho joined #salt
07:37 armguy joined #salt
07:37 west575 joined #salt
07:38 rvaldes joined #salt
07:41 fannet joined #salt
07:43 Reverend if file.recurse doesn't find a specified path on salt:// does it error?
07:43 Reverend I know managed does...
07:43 Reverend I'm wondering if I can make a file not error if it' not there, but still copy it over if it is
07:43 Reverend :S
07:46 __number5__ Reverend: what file.recurse supposed to copy if the salt:// source not exists?
07:46 Reverend just a /var/www/vhosts/default
07:46 Reverend some of our servers won't have a default vhosts, as the main site will be a defualtserver on nginx
07:47 Reverend but things like varnish etc need it for Elastic Load balancer health checks :(
07:47 __number5__ you just need a emtpy parent folder always exists
07:47 Reverend oh
07:47 Reverend noice
07:47 Reverend thanks dude!
07:48 __number5__ np
07:53 Reverend oh sweet jeeezus. "keep_symlinks"
07:53 Reverend <3
07:55 keimlink joined #salt
07:55 flowstate joined #salt
07:57 babilen Reverend: You *might* want to look at https://github.com/saltstack-formulas/nginx-formula also (in particular the ng variant)
08:04 jhauser joined #salt
08:06 Reverend I've taken a look... but we have soooo much customs stuff with varnish/ssl termination etc that it's probably better for us to do it ourselves. :/
08:06 subsignal joined #salt
08:06 Reverend but thank you all the same.
08:06 Reverend apprecaited.,
08:10 ronnix joined #salt
08:11 babilen Reverend: What I typically do is to use nginx.ng.pkg and nginx.ng.service to install it and then manage files in sites-{enabled,available} explicitly (while watching the nginx service state)
08:14 flebel joined #salt
08:14 Reverend I see.
08:14 Reverend does that copy all sites-available to each minion, and you just enabled each inividual one for whatever is needed?
08:15 fracklen Hey! I'm having trouble with the mine... It seems, that when I add new minions and run 'mine.update', it works as expected. I also set a 'mine_interval: 300'... But when the minion has lived for a couple of days, the mine stops working for that minion. 'mine.update' has no effect, and queries to the mine return empty sets for the minion. Help?
08:15 cyborg-one joined #salt
08:15 Reverend babilen ^ - sorry, forgot to tag ya :)
08:16 babilen Reverend: No problem. Enabling them essentially boils down to a symlink (but I guess you know that), so I just ensure that the files and symlinks I want are present on the minion.
08:17 Reverend yeah. We're gonna have luke 300+ sites running each on their own server, so having all 300 on all boxes will be a bit messy :P
08:17 Reverend at least, if that's how I understand you're working :S
08:17 Reverend babilen ^
08:20 Reverend I'm currently doing a source on salt://nginx/files/{{ grains['ec2_tags']['Client'] }}/vhosts so that only the client Vhosts are copied up to the minions.
08:20 fracklen If I run 'mine.send network.ip_addrs', it correctly updates the mine. But running 'mine.update' doesn't update anything.
08:23 dariusjs joined #salt
08:25 babilen Reverend: I meant: I am *only* copying the files I want on that minion to the minion
08:25 Reverend ohhhhh
08:25 babilen (much like your approach)
08:25 Reverend hmmm
08:25 lero joined #salt
08:26 babilen Alternatively: Define a list of "enabled" vhosts in pillars and only create symlinks for those
08:26 babilen But then it really depends on the rest of your deployment
08:26 Reverend hmm. I'll have to have a look again :P
08:26 raspado joined #salt
08:27 Reverend I thinkt he grain/ pillar approach is nice. for sure. Seeing as that's basically salt's bread and butter :L
08:30 Elsmorian joined #salt
08:32 N-Mi joined #salt
08:36 netcho joined #salt
08:38 netcho joined #salt
08:41 amy_ joined #salt
08:42 ravenx my question may have been missed:   does anyone know if i can use the output of one state as input to another
08:42 ravenx aka:  the stdout of a state as an argument
08:43 fracklen ravenx: I don't think so... I would make a custom state for that...
08:45 ravenx o_o
08:45 ravenx i have no idea how to make a custome state
08:45 ravenx lol
08:49 west575_ joined #salt
08:49 Rumbles joined #salt
08:50 mage_ are pillar data only merge in the top.sls file?
08:50 mage_ merged*
08:51 dariusjs joined #salt
08:52 mage_ I'm including some.sls in my.sls and it looks like pillar data aren't merged, unless some.sls and my.sls are included in the top.sls file
08:52 mage_ is it expected?
08:54 nkuttler_ joined #salt
08:54 MTecknol1gy joined #salt
08:54 sybix_ joined #salt
08:54 babilen ravenx: https://docs.saltstack.com/en/latest/ref/modules/ + https://docs.saltstack.com/en/latest/ref/states/writing.html
08:54 babilen mage_: Why do you expect them to be merged if you don't target both to the minion?
08:55 darix- joined #salt
08:55 jeblair_ joined #salt
08:55 babilen Ah, you are including one in the other
08:56 babilen https://docs.saltstack.com/en/latest/topics/pillar/#including-other-pillars might be of interest (check the defaults/key config)
08:56 babilen Not sure if that does merging though
08:56 mrueg_ joined #salt
08:57 bergei joined #salt
08:57 flowstate joined #salt
08:59 klaas joined #salt
08:59 Dev0n joined #salt
08:59 RandyT joined #salt
08:59 MK_FG joined #salt
08:59 alinuxninja joined #salt
08:59 Derailed joined #salt
09:00 renoirb joined #salt
09:00 jgelens joined #salt
09:00 toanju joined #salt
09:01 MaZ- joined #salt
09:02 impi joined #salt
09:03 fleaz joined #salt
09:03 fracklen joined #salt
09:03 pppingme joined #salt
09:03 M-MadsRC joined #salt
09:03 LeProvokateur joined #salt
09:03 colttt joined #salt
09:03 cmek_ joined #salt
09:03 pprkut joined #salt
09:03 akw_ joined #salt
09:03 Satyajit joined #salt
09:03 goal_ joined #salt
09:03 kevc joined #salt
09:03 dandelo joined #salt
09:03 Edur joined #salt
09:03 inire joined #salt
09:03 babilen mage_: This is the age old https://github.com/saltstack/salt/issues/3991
09:03 saltstackbot [#3991][OPEN] Feature request: `extend` functionality in pillar .sls | Currently defining defining pillar key the second time will overwrite the contents of the first definition, i.e.:...
09:03 babilen (and a pain in the arse)
09:04 pppingme joined #salt
09:05 mage_ ok .. :)
09:05 roock joined #salt
09:05 bastiandg joined #salt
09:05 Rumbles_ joined #salt
09:06 subsignal joined #salt
09:14 dariusjs joined #salt
09:18 ravenx btw, i can only have one top file right?
09:28 giany hi, I'm trying to figure out why when I do cp.push it fails with this message: http://pastebin.com/pUAQpr2H
09:28 giany any ideas?
09:37 netcho joined #salt
09:39 DEger joined #salt
09:40 Rumbles joined #salt
09:40 darvon joined #salt
09:42 west575 joined #salt
09:42 damona joined #salt
09:50 richardl Hi everyone got a question for you
09:50 richardl I am working on the best method to share files that are made on a minion with another minion
09:51 richardl what is the best method inside a state without user intervention to make these minions share there files
09:55 flowstate joined #salt
10:06 netcho joined #salt
10:07 subsignal joined #salt
10:11 jaybocc2 joined #salt
10:21 babilen richardl: /msg judd v libc-bin
10:21 babilen nvm
10:23 babilen richardl: I wrote some code that allows minions to request files from other minions via the reactor system (send as payload in the event's data)
10:24 babilen That obviously doesn't work well for large files
10:24 babilen You could store them in the mine or setup genuine means (that is a !salt option) for the minions to share their data
10:28 BlackBishop joined #salt
10:30 babilen Alternatively use one of the sdb modules to store your data there
10:31 babilen (or write your own)
10:32 BlackBishop how would I go if I'd want to remove package X only if package Y is not present ( don't remove it if it has dependencies )
10:35 babilen I wouldn't approach the problem like that as you no longer describe what you want to achieve, but rather create "rules" whose outcome depends on the minion state
10:35 smcquay joined #salt
10:35 babilen You should be explicit as to which package you want to be present
10:35 richardl babilen: Cool can you send me the link?
10:35 teryx510 joined #salt
10:35 babilen richardl: No, I can't share that
10:36 babilen (my reactor based code that is)
10:36 BlackBishop babilen: I want to remove net-snmp on all machines that don't have opsview ! ( opsview which is a nagios fork of some sort wants net-snmp )
10:36 richardl babilen: Okay but can you point me in the direction so I can wrtie me own?
10:36 babilen BlackBishop: And you don't manage opsview installations?
10:36 BlackBishop I guess I could set some pillars ( monitoring ) on those machines, and not remove on the monitoring machines ..
10:37 babilen BlackBishop: That is you have multiple people/teams/tools performing installations and you need salt to be aware of the minion state? (and state that is *not* managed by salt)
10:37 BlackBishop and no, salt doesn't manage the opsview install/config
10:37 babilen Who does?
10:38 BlackBishop another team with puppet
10:38 babilen (and: Why not?)
10:38 BlackBishop because it's their stuff on those machines and they want to take care of that part
10:38 BlackBishop ( creating alerts, checks and stuff )
10:39 impi joined #salt
10:39 babilen Get them to uninstall net-snmp then
10:39 BlackBishop no can do, orders come from different sides.
10:39 BlackBishop I'll just tag those machines ... it's ok
10:39 babilen But to answer your question: You could, for example, test with pkg.version if it is installed or write a custom grain that returns "opsview: True"
10:40 babilen I would, however, strongly advise to write a lot of "if FOO then BAR" salt code. Salt is meant to be declarative in that you describe the state you want to achieve, rather than procedural in that you define rules about actions that need to be taken if a certain state is present
10:41 babilen Your Salt codebase will become hard to maintain soon if you follow that rule ..
10:41 babilen This obviously assumes that teams work well together and that you don't have five different tools undoing each other's work
10:51 ronnix joined #salt
10:54 mage_ how could I do the following: on machine A extract some archive THEN copy a file from the extracted archive to machine B THEN do some other stuff on machine A .. ?
10:55 mage_ shoudl I use orchestration?
10:55 mage_ and how could I copy a file from minion A to minion B ...?
10:56 flowstate joined #salt
10:58 giany mage_: https://docs.saltstack.com/en/latest/topics/tutorials/minionfs.html
11:03 bergei hi, I get this execption when running salt-run virt.migrate https://gist.github.com/anonymous/ee29e271dcf6f05a24052abd6c5ae925 has anyone seen this before?
11:04 babilen richardl: https://www.refheap.com/122686 (totally not working code) -- You would then define reactors on the master to wire them together. You essentially call request_file on one minion, that raises the saffron/file/request event with some file ID in the payload .. you use that to call create_some_file on the minion with the filestore.
11:06 Ish_ joined #salt
11:06 babilen richardl: create_some_file raises the saffron/data/new or saffron/data/cached events with the payload in data['content'] -- Ah, made a mistake. You want to pass a dictionary on line 190 in with 'content' as key and file_content as value
11:07 babilen richardl: If I ever get time I might release this properly, but right now it just isn't ready
11:08 Ish_ Is there a way to use command line options (https://docs.saltstack.com/en/latest/ref/cli/) when using the python client API (https://docs.saltstack.com/en/develop/ref/clients/index.html#sshclient)?
11:08 subsignal joined #salt
11:12 jaybocc2 joined #salt
11:16 richardl babilen: Thank you
11:17 impi joined #salt
11:19 babilen richardl: I'm not sure if this is the best option right now
11:20 bakins joined #salt
11:21 Baryka joined #salt
11:21 Baryka Hello
11:24 Baryka I am having question related to merging pillars, anyone could try to answer me here?
11:24 babilen Only if you ask your question ;)
11:24 Baryka :)
11:25 mage_ giany: thanks :)
11:25 Baryka Ok, am trying to make this command work as I expect:
11:25 Baryka salt qa state.apply mp-update saltenv=qa test=true pillar='{"mp":{"version":"v2.2","version_sha256":"abcd"}}'
11:25 amcorreia joined #salt
11:26 babilen That would define the pillar in its entirety
11:26 Baryka I have the pillars with the mp key and subkeys like version and others defined in pillar file. What i am trying to do is to overwrite only specific subkeys like version
11:26 AndreasLutro I think proper pillar merging on the command line was only recently added
11:27 babilen https://github.com/saltstack/salt/issues/18429
11:27 saltstackbot [#18429][MERGED] Pillars passed from command-line override pillar subtrees instead of merging | assuming a pillar containing:...
11:27 babilen Baryka: Which version of salt are you using?
11:27 Baryka i've read this issue, but i though it was 2 years ago and fixed heh
11:28 Baryka 2016.3.0 Boron
11:29 ronnix_ joined #salt
11:29 AndreasLutro you need to upgrade to 2016.3.1 or newer
11:29 AndreasLutro see https://github.com/saltstack/salt/pull/33764
11:29 saltstackbot [#33764][MERGED] Merge instead of update pillar overrides | An earlier commit (made in develop the 2015.8 release branch was...
11:31 Baryka I'll read this issue and try to  update. Thanks for very fast response
11:31 Baryka and btw, it will probably work on 2015 version?
11:32 AndreasLutro probably
11:34 Baryka hm aparently it's zeroing pillars on 2015.8.8.2 in staging
11:34 AndreasLutro 2015.8.12 is the newest
11:35 Baryka then 2 updates awaiting to test ;)
11:36 west575 joined #salt
11:38 keimlink joined #salt
11:48 jaybocc2 joined #salt
11:52 Rumbles joined #salt
11:56 Max___ joined #salt
11:58 tnahak joined #salt
11:58 tnahak Hello
12:01 teryx510 joined #salt
12:07 Reverend hi tnahak
12:07 cyborg-one joined #salt
12:09 subsignal joined #salt
12:13 nicksloan joined #salt
12:16 DEger joined #salt
12:16 barmaley joined #salt
12:24 jaybocc2 joined #salt
12:28 raspado joined #salt
12:32 mapu joined #salt
12:40 manji has anyone noticed minion runs timing out on 2016.3.3 on jessie ?
12:40 manji even for really simple states
12:40 ronnix joined #salt
12:43 catpig joined #salt
12:44 akhter joined #salt
12:44 mavhq joined #salt
12:49 mbrgm joined #salt
12:49 amcorreia joined #salt
12:49 mbrgm hi! is there a simple way to concatenate (ala `cat file1 file2 > result`) several files using a salt state?
12:54 gh34 joined #salt
12:54 ekristen joined #salt
12:55 Reverend there's not much documentation for the nginx-ng formula is there :P
12:57 ssplatt joined #salt
12:58 nicksloan joined #salt
13:00 ferbla joined #salt
13:01 drawsmcgraw left #salt
13:02 pppingme joined #salt
13:02 dariusjs joined #salt
13:03 goudale joined #salt
13:04 goudale hi all, may I ask someone to look at my issue ?  https://github.com/saltstack/salt/issues/35938  : )
13:04 saltstackbot [#35938][OPEN] Minion ID not set when using salt-call inside a masterless docker container | Description of Issue/Question...
13:05 goudale thanks saltstackbot, you are truely a friend
13:06 drawsmcgraw joined #salt
13:11 JohnnyRun joined #salt
13:17 Tanta joined #salt
13:18 oida joined #salt
13:18 lubyou joined #salt
13:18 lubyou hi
13:19 lubyou question regarding environments and gitfs - if I have multiple environments and top_file_merging_strategy=same, then I cannot have a global state that automatically applies to all environments, can I?
13:20 bluenemo joined #salt
13:24 flowstate joined #salt
13:27 dariusjs joined #salt
13:27 psy0rz joined #salt
13:27 mbrgm left #salt
13:28 VSpike joined #salt
13:30 VSpike Hi. I'm using the users formula, and I've hit a case where I need root.root ownership of a user's home directory (because of SFTP chroot)
13:31 VSpike The best solution I could think of was to set the formula via pillar not to create the user's home, and then add a file.directory state to do it and make sure it executes first
13:31 VSpike I was trying this https://bpaste.net/show/9d1febbc4502
13:31 VSpike The users formula will already be included in a different, more general SLS for all Linux hosts
13:34 VSpike The error is https://bpaste.net/show/5636c2471a5f which is why I added the include of "users" at the top .. but it didn't seem to help
13:34 VSpike What's the best way to solve this?
13:39 kshlm joined #salt
13:40 dendazen joined #salt
13:41 dendazen i have cmd.script in my state, how can get output of that script when running 'salt state.sls my_state_with_the_script'?
13:41 dendazen preferably to stdout
13:42 dendazen to shell terminal where i am running the salt command.
13:47 ninjada joined #salt
13:48 flowstate joined #salt
13:51 salato I can't find what is this error about, http://paste.debian.net/801108/ any help?
13:53 jerredbell joined #salt
13:57 colegatron joined #salt
13:58 ronnix joined #salt
14:00 ninjada joined #salt
14:04 goudale joined #salt
14:05 ninjada joined #salt
14:08 _JZ_ joined #salt
14:09 jaybocc2 joined #salt
14:09 mpanetta joined #salt
14:10 antipsychiatry joined #salt
14:12 barmaley joined #salt
14:13 ronnix joined #salt
14:16 Ish_ joined #salt
14:23 cmarzullo mysql_grants.present isn't a state module. (only looked at it briefly)
14:23 cmarzullo https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.html
14:26 oida joined #salt
14:29 armonge joined #salt
14:30 salato ok the cause was I needed python-mysqldb package
14:32 ajw0100 joined #salt
14:32 edrocks joined #salt
14:35 ALLmightySPIFF joined #salt
14:41 flowstate joined #salt
14:43 kojiro joined #salt
14:47 tiwula joined #salt
14:57 edrocks joined #salt
14:58 kojiro We normally run salt-ssh, but sometimes I want to see what states apply to an instance, so I do 'salt-call --local --id $minion_id state.show_highstate`. For some reason, this call doesn't see all the pillars that the actual remote minion can see.
14:59 bdrung_work joined #salt
14:59 kojiro Like "Rendering SLS `base:foo.configure' failed: Jinja variable 'dict object' has no attribute 'example'"
15:00 kojiro Why does that work on an ssh target, but not with salt-call local?
15:01 jimklo joined #salt
15:02 ajw0100 joined #salt
15:03 goudale kojiro: is the id actually set ?
15:04 goudale what's the output of `salt-call --local --id $minion_id test.ping` ?
15:05 kojiro [ERROR   ] Could not cache minion ID: [Errno 2] No such file or directory: './etc/salt/minion_id'
15:05 DEger joined #salt
15:05 ninjada joined #salt
15:06 kojiro Does salt-call not respect a Saltfile in the cwd?
15:07 goudale may i have request the full log (command and output) ?
15:08 raspado joined #salt
15:08 nicksloan joined #salt
15:11 subsignal joined #salt
15:16 hasues joined #salt
15:16 hasues left #salt
15:19 numkem joined #salt
15:19 ninjada joined #salt
15:20 ninjada joined #salt
15:23 schemanic_ joined #salt
15:24 schemanic_ hey, on windows, what works better? the Windows Software Repo or using Chocolatey through salt?
15:28 Ish_ joined #salt
15:28 edrocks joined #salt
15:29 goudale kojiro: take a look at https://github.com/saltstack/salt/issues/35938
15:29 saltstackbot [#35938][OPEN] Minion ID not set when using salt-call inside a masterless docker container | Description of Issue/Question...
15:33 VSpike schemanic_: I found the repo worked better
15:33 amy joined #salt
15:33 schemanic_ VSpike, can you speak to why? I'm lead to believe that dependencies aren't managed this way
15:34 VSpike schemanic_: no, that's true. I think I found that at the time, the salt stuff to install and use chocolatey was pretty broken, and I found that the quality of chocolatey installers was pretty variable, to say teh least
15:34 VSpike So the repo - while not great itself - seemed like a slightly better option
15:35 schemanic_ mmm,  That's true too. for some stuff it's not the best.
15:35 VSpike I suspect the salt/choco integration stuff has been fixed since then - a lot of work has been done on the windows side of salt over the last couple of years
15:35 VSpike If you're used to installing your stuff with chocolatey and you know it works, that's probably the way to go
15:36 schemanic_ yeah, I'm targeting choco for my windows workstations
15:36 schemanic_ Now I just need a way of hosting custom software that needs to be deployed
15:36 VSpike You can create a custom windows repo with only your own stuff in it
15:36 VSpike I've done that for a few things
15:37 schemanic_ VSpike, I'm aware of that - my issue is that we dont have any local hardware do do it with just a network share
15:37 schemanic_ I'm trying to see if it can be done from s3 or something
15:39 sfxandy joined #salt
15:39 schemanic_ wait
15:39 schemanic_ can I use the salt file server for that?
15:39 VSpike Yep
15:40 VSpike I think the windows repo might have to be git hosted, but I could be wrong
15:40 rem5 joined #salt
15:41 VSpike I just have mine on github https://github.com/fastmarkets/fm-winrepo-ng since it's not private stuff
15:41 schemanic_ No I dont want a windows repo, I want a chocolatey repo
15:42 VSpike Oh, I see
15:43 schemanic_ Like, can I put chocolatey packages into /srv/salt/chocolatey/files and then say the package source is salt://chocolatey/files/mything.nupkg
15:43 VSpike Probably not, but I suspect you could mirror the packages to the local machine and then point choco at that
15:43 VSpike i.e. do a file.managed first to c:\packages or whatever and then use that
15:44 sfxandy hi everyone.  quick question, is there any way to flatten a list i.e. a list with potential duplicates in Jinja/Salt?
15:44 schemanic_ mmm
15:44 schemanic_ thats a good way forward
15:45 schemanic_ wait though
15:45 schemanic_ there's totally a -s flag on the choco install command
15:45 schemanic_ https://docs.saltstack.com/en/latest/ref/states/all/salt.states.chocolatey.html
15:53 VSpike Can anyone explain why this sls code https://bpaste.net/show/9d1febbc4502 produces this error https://bpaste.net/show/5636c2471a5f ?
15:53 amcorreia joined #salt
15:55 win_salt VSpike, I think when you include it needs to be the file name, and when you require it needs to be the state label.
15:56 oida joined #salt
15:56 brotatochip joined #salt
15:57 edrocks joined #salt
16:01 sjmh joined #salt
16:03 lane_ joined #salt
16:03 jaybocc2 joined #salt
16:07 whytewolf VSpike: does users live at salt://users
16:10 VSpike whytewolf: yep .. it's the users formula
16:10 Lionel_Debroux joined #salt
16:10 Baryka On the latest stable passing pillars in CLI finally has worked
16:11 Baryka but it was probably necesary to upgrade master and minion
16:12 pipps joined #salt
16:12 Baryka but since am going to use it in the simple script it's  probably necesary to escape each double quato when I have pillar=pillar='{"mp":{"version":"$VAR"}}' ...
16:12 Baryka awww, bad paste
16:13 VSpike whytewolf: it's in /var/cache/salt/minion/files/beta/users/init.sls on the minion
16:14 haam3r joined #salt
16:16 VSpike perhaps I could require_in to a specific state in the users formula, like user: users_physicals_user
16:16 whytewolf VSpike: not sure why it is failing. just tested and it worked perfectly fine for me
16:16 VSpike whytewolf: perhaps the error message is misleading
16:16 VSpike maybe that's not the problem at all
16:17 win_salt VSpike, are you trying to require_in the state named "users_{{ name }}_user" in the official users formula
16:17 armonge joined #salt
16:17 whytewolf VSpike: https://gist.github.com/whytewolf/53a6e50d3aa4b32495b69f76d38a3728 this was my test setup
16:19 subsignal joined #salt
16:20 win_salt whytewolf, your set up is different.  You are using require, he is using require_in
16:20 whytewolf oh i missed that.
16:20 win_salt you can require users/init.sls but I think you need to require_in a specific state inside users/init.sls
16:21 whytewolf no
16:21 whytewolf actually i think you are right. you need to require_in a state. sls won't work right that way
16:22 win_salt it will, but you need to use the state id, thats why this error is there: Ensure that a state with an ID of 'users' is available
16:24 edrocks joined #salt
16:24 VSpike Ah I see
16:24 whytewolf I did compleatly miss he was using _in
16:25 jaybocc2 joined #salt
16:25 VSpike It would be better if the users formula allowed me to specify to ownership of the home dir, but that's probably bit niche
16:25 whytewolf very niche.
16:26 whytewolf normally ownership is the user :P
16:26 whytewolf group directories typically handled "elsewhere"
16:26 VSpike This is for SFTP chroot..
16:27 whytewolf oh fun
16:27 VSpike It requires the ownership to be root.root and the perms to be 755
16:27 whytewolf that always makes me nervous
16:27 VSpike Heh
16:27 DEger joined #salt
16:28 whytewolf but yeah as soon as you said SFTP chroot i knew exactly what you wanted..
16:30 whytewolf guess a lot of "niche" cases like that one are why i forgo even working with formulas and just write my own
16:30 pipps99 joined #salt
16:33 VSpike whytewolf: I used to, then I made the effort to move a lot of stuff to formulas, and sometimes I question the value with hindsight
16:34 VSpike I figured for cases like that it would be better to submit a PR to the formula, or at least maintain a fork if it's very niche
16:34 VSpike Some formulas like users seem worth having .. others like PHP are pretty awful and I think my own code was better
16:34 VSpike Of course, mine was only tested on Ubuntu 14.04 but for me that wasn't really an issue :)
16:35 whytewolf yeah. one of the things about your own core. they work in your enviroment. and since they don't have to have the tests for things that will never be in your enviroment they tend to run a little faster
16:36 VSpike So, that answers a question i was wondering.. when doing a require, if you have a state with an ID and an explicit name that is different, which do you use?
16:36 VSpike The answer appears to be: the name, not the ID
16:36 whytewolf should be either
16:37 VSpike The ID didn't work
16:37 VSpike Maybe require_in is different again
16:37 cyborg-one joined #salt
16:37 whytewolf humm. I have always used ID when using require [or require_in}
16:38 kojiro joined #salt
16:39 pipps joined #salt
16:39 whytewolf ack. they wrote that part of the doc like legalese
16:40 whytewolf https://docs.saltstack.com/en/latest/ref/states/highstate.html#requisite-reference
16:41 woodtablet joined #salt
16:45 edrocks joined #salt
16:46 impi joined #salt
16:49 onlyanegg joined #salt
16:50 jgarr I have a problem on my salt master that happens every 3-4 days (running 2016.3.2) After a little while running the master will return inconsistent minion counts. I should have ~4000 minions but occasionally it'll return sporadic 100-1000 minions in test.ping, manage.up or manage.alived. restarting the master fixes the problem but I can't pinpoint what is causing the problem. Anyone know a good way to see what
16:50 jgarr is going on when minions don't return from test.ping?
16:51 iggy jgarr: are all the minions updated too?
16:51 jgarr yes, everything is the same version
16:52 iggy what's the network look like?
16:52 iggy I used to see stuff like that on older versions (or if keepalives are turned off) with "odd" network setups
16:53 badon joined #salt
16:53 jgarr They're all routable without proxies. about 1/2 are internal to our datacenter and 1/2 are in aws using a 10g direct connect
16:53 jgarr when they stop responding it's very sporatic. test.ping will return 100-400 nodes which changes every run. It's also not all in aws or all internal that stop responding
16:54 jgarr I saw similar errors to this in our logs https://github.com/saltstack/salt/issues/34215 and on our last master restart enabled ipc_write_buffer but I'm not sure that's causing the problem
16:54 saltstackbot [#34215][MERGED] salt-master crashes every few days | Description of Issue/Question...
16:55 jgarr if I look at raw connections to the master I still see all of the minion connictons (~4000 socket connections on the host)
16:56 jgarr I'm just trying to prepare to know what to look for the next time it happens
16:57 iggy weird... I was going to ask about test.ping, but answered
16:59 iggy did you check manage.alived or any of the other manage functions that don't actually send commands to see if the minions are connected?
16:59 jgarr I'm also not sure the diff with manage.alived and manage.up (docs show the same thing)
16:59 iggy the docs are different
16:59 iggy but yeah, it's maybe not super clear
17:00 iggy up sends command alived doesn't
17:00 jgarr yes, when the problem is happening there's low load on the host (my first suspect) but test.ping and manage.* commands all show the same thing
17:01 bastiand1 joined #salt
17:01 iggy and the connections are in established state (vs time_wait or something else)?
17:01 west575 joined #salt
17:01 jgarr you mean the socket connections?
17:01 iggy yeah
17:01 jgarr I don't think I checked the state. just count
17:02 iggy might be worth checking next time it happens
17:02 jgarr I'll check that. I thought to look at the salt bus but with so many nodes it's just too noisy
17:02 iggy and there's no correlation with subnets or anything?
17:03 jgarr no, the aws hosts are on a different subnet but some will return and some wont
17:03 iggy do you have the option of setting up another master and moving some of the minions to it?
17:03 jgarr I thought maybe it was a latency thing but that still didn't explain it
17:03 brotatochip joined #salt
17:04 jgarr We eventually want to use syndic but right now we're still testing
17:05 jgarr hoping the tests go well to replace our current solution
17:05 jgarr managing what hosts connect where is not the easiest thing to implement
17:06 edrocks joined #salt
17:06 iggy put the same master keys on another master, use the master to write the new master hostname in the salt config?
17:06 iggy I'm curious at what minion count you start seeing issues
17:07 iggy but if that's not really viable for you, there's other thigns to check
17:07 jgarr not sure. we jumped from 0 -> 4000 right away. I made a few minor tweaks to the minion/master config to help with that many hosts but not sure I did all the right things
17:07 jgarr I've never run salt at this scale so was trying to find other things to check when things break
17:08 MTecknology joined #salt
17:08 barmaley joined #salt
17:09 iggy you did all the open files stuff right?
17:09 ronnix joined #salt
17:10 jgarr you mean ulimits?
17:13 jimklo joined #salt
17:14 iggy yeah, there's a page in the docs that talks about that and other basic stuff
17:15 iggy we have more than 4000 minions, but they aren't on one master :/
17:15 iggy so I'm kind of shotting in the dark here
17:16 flowstate joined #salt
17:22 ageorgop joined #salt
17:26 jimklo joined #salt
17:27 pipps joined #salt
17:27 teryx510 joined #salt
17:29 wendall911 joined #salt
17:29 keimlink joined #salt
17:30 jenastar joined #salt
17:31 kulty joined #salt
17:34 jgarr k, I'll double check the docs. I'm hoping 1 master will be able to handle the load but if not we'll have to see if it's worth it to create more and use syndic
17:37 gmoro joined #salt
17:39 akhter joined #salt
17:44 bltmiller joined #salt
17:46 GreatSnoopy joined #salt
17:50 steveoliver left #salt
17:51 rem5 joined #salt
17:53 bantone is there way to unapply a state that has been applied to a minion
17:54 hexa- write the state that reverts it
17:54 bantone hm that works
17:54 hexa- todays configuration management tools are unfortunately only one-way :)
17:56 XenophonF bantone: here's an example of an ".absent" state that I wrote
17:56 XenophonF bantone: https://github.com/irtnog/openstack-formula/blob/master/keystone/absent.sls
17:56 XenophonF basically reversing everything that .../keystone/init.sls does
17:57 XenophonF some things it doesn't undo because that would require a lot of information about the target environment
17:58 XenophonF e.g., it doesn't delete keystone tenants, roles, or users
17:58 XenophonF i dunno - when i wrote the keystone.absent SLS, i was only undoing changes that i consdered "local"
18:02 djinni` joined #salt
18:03 tapoxi joined #salt
18:07 jxm_ joined #salt
18:10 jenastar left #salt
18:11 subsignal joined #salt
18:11 xbglowx joined #salt
18:14 subsignal joined #salt
18:14 gmoro joined #salt
18:16 hoonetorg joined #salt
18:26 subsignal joined #salt
18:26 ageorgop joined #salt
18:28 DEger joined #salt
18:28 jaybocc2 joined #salt
18:29 netcho joined #salt
18:32 ageorgop left #salt
18:34 DammitJim joined #salt
18:35 ub joined #salt
18:35 DEger joined #salt
18:35 kevinqui1nyo joined #salt
18:38 jimklo joined #salt
18:38 ub2 joined #salt
18:39 gmoro joined #salt
18:39 ageorgop joined #salt
18:42 regretio joined #salt
18:43 regretio is there a way to completely isolate minions connected to the same master? e.g. two clients who should never be able to see anything about the other
18:43 pipps99 joined #salt
18:43 regretio only way i can see is with pillar and separate top files
18:48 danieloliveira joined #salt
18:49 danieloliveira hi all
18:49 danieloliveira I am using saltstack to deploy some docker continers but I came up with a problem
18:49 danieloliveira SYSLOG
18:49 danieloliveira dockerng has no support to syslog driver
18:50 danieloliveira does anybody found a workaround?
18:57 bltmiller joined #salt
19:00 bltmiller joined #salt
19:01 tapoxi regretio define "not see anything"
19:01 sp0097 joined #salt
19:02 toanju joined #salt
19:02 mohae joined #salt
19:04 brotatochip joined #salt
19:05 mohae__ joined #salt
19:05 sjmh joined #salt
19:06 tmkerr joined #salt
19:07 lovecraftian joined #salt
19:07 lovecraftian joined #salt
19:07 jaybocc2 joined #salt
19:08 tmkerr I'm trying to create an environment variable on a minion with environ.setenv but I don't think it's working the way I want it to. The state is successful, however when I try to echo the variable on the minion it's empty.
19:12 BattleChicken joined #salt
19:12 BattleChicken good afternoon - has anyone done much with packer.io in combination with salt?  I assume so, figured i would ask.. get feedback on how well it works.
19:13 roock joined #salt
19:17 cscf tmkerr, the docs say that states.environ is: "Support for getting and setting the environment variables of the current salt process."
19:17 cscf tmkerr, where are you trying to echo it?  As a cmd.run, or just on a shell on the minion?
19:18 tmkerr cscf, on a shell on the minion
19:18 cscf tmkerr, the docs seem to imply that the environ changes only apply to salt-minion
19:19 tmkerr yea, any way  I could get it to work that way?
19:19 cscf tmkerr, you'll probably want to insert a line into /etc/environment
19:19 tmkerr ahhh
19:19 tmkerr ok thanks
19:19 cscf np
19:20 ageorgop joined #salt
19:21 jimklo joined #salt
19:23 xbglowx joined #salt
19:23 bltmiller joined #salt
19:25 chrichip joined #salt
19:32 edrocks joined #salt
19:32 pipps joined #salt
19:33 netcho joined #salt
19:42 brotatochip joined #salt
19:45 flowstate joined #salt
19:45 flowstate joined #salt
19:52 onlyanegg joined #salt
19:53 jimklo joined #salt
19:54 mapu joined #salt
20:00 sjorge joined #salt
20:03 StolenToast I'm trying to extract an archive into a folder that already exists but archive.extracted stops if the folder exists, even though the contents are not what I want
20:06 Taters_ joined #salt
20:09 pipps joined #salt
20:13 cscf StolenToast, use if_missing, like the docs say
20:16 ssplatt joined #salt
20:20 takeda joined #salt
20:21 toddnni left #salt
20:22 ageorgop joined #salt
20:23 takeda Hi, I have issues identifying to salt-api and am getting 401 errors despite providing working login and password. The reason I am using api is so I can have salt generate and auto accept a new key for a new node through PUT /keys call. If there's a better way to do it I would like to hear about it as well.
20:24 StolenToast cscf: my understanding from the docs was that if_missing lets me specify a separate directory, and if THAT directory exists then it will NOT extract the archive to the "name" directory
20:24 StolenToast is that right?
20:26 sp0097 joined #salt
20:30 flowstat_ joined #salt
20:32 brotatochip joined #salt
20:33 JPT joined #salt
20:34 ferbla joined #salt
20:34 sjorge joined #salt
20:35 Elsmorian joined #salt
20:40 ronp_usa1 joined #salt
20:41 pipps joined #salt
20:44 pipps joined #salt
20:46 ageorgop joined #salt
20:51 cyborg-one joined #salt
20:54 chrichip joined #salt
20:56 bltmiller joined #salt
20:58 brotatochip joined #salt
21:00 bltmiller joined #salt
21:02 haam3r joined #salt
21:02 GreatSnoopy joined #salt
21:07 subsignal joined #salt
21:08 rem5_ joined #salt
21:10 ageorgop joined #salt
21:15 teryx510 joined #salt
21:15 brotatochip joined #salt
21:16 pipps joined #salt
21:29 mohae joined #salt
21:30 west575 joined #salt
21:31 sfxandy joined #salt
21:35 dendazen joined #salt
21:41 flowstate joined #salt
21:42 Taters_ joined #salt
21:54 flowstate joined #salt
21:55 ageorgop1 joined #salt
22:00 ajw0100 joined #salt
22:03 takeda joined #salt
22:04 pipps99 joined #salt
22:08 brotatochip joined #salt
22:08 subsignal joined #salt
22:09 flowstate joined #salt
22:10 akhter joined #salt
22:12 takeda Hi, I have issues identifying to salt-api and am getting 401 errors despite providing working login and password. The reason I am using api is so I can have salt generate and auto accept a new key for a new node through PUT /keys call. If there's a better way to do it I would like to hear about it as well.
22:12 justanotheruser joined #salt
22:21 pipps joined #salt
22:24 bltmiller joined #salt
22:27 pipps joined #salt
22:27 ninjada joined #salt
22:32 pipps joined #salt
22:32 whytewolf takeda: well. you could generate the keys on the master then push them to the minion using third party systems such as s3 or other methods.
22:33 whytewolf takeda: however about your 401. not enough info given
22:33 sp0097 joined #salt
22:34 takeda whytewolf: that's the issue I'm having I couldn't get much info in logs or in the output, I upgraded to salt 2015.8, and see a bit more, but still not much.
22:35 takeda [INFO    ] [api_acl] Authentication sucessful for user kickstart from IP 127.0.0.1
22:36 takeda previously it was saying 2016-09-01 22:25:21,564 [salt.loaded.int.netapi.rest_cherrypy.app][INFO    ][13985] [api_acl] Authentication not checked for user kickstart from IP 127.0.0.1
22:36 takeda but I added to api_acl
22:36 takeda I'm still getting 401
22:37 takeda as for using 3rd party tool, I would prefer to use as little 3rd party tools as possible
22:37 takeda I wanted to bootstrap things similarly as is done in chef
22:37 barmaley joined #salt
22:37 idontbyte joined #salt
22:42 colegatron_origi joined #salt
22:51 pipps joined #salt
22:51 brotatochip joined #salt
22:51 dendazen joined #salt
22:55 flowstate joined #salt
22:57 ninjada joined #salt
23:00 _JZ_ joined #salt
23:02 pipps joined #salt
23:04 edrocks joined #salt
23:10 subsignal joined #salt
23:11 west575 joined #salt
23:12 pipps joined #salt
23:12 ninjada joined #salt
23:14 pipps joined #salt
23:14 debian112 joined #salt
23:14 sp0097 joined #salt
23:19 onlyanegg I found the test=true option for salt and salt-call to see if there will be differences. Is there a way to see what the differences will be?
23:20 ageorgop joined #salt
23:20 iggy the states/modules that support that will already show you that (unless you've turned down output)
23:20 brotatochip joined #salt
23:24 onlyanegg got it, thanks iggy. had to change state output to full.
23:25 ageorgop joined #salt
23:27 DEger joined #salt
23:43 _JZ_ joined #salt
23:44 DEger joined #salt
23:50 amcorreia joined #salt
23:55 flowstate joined #salt
23:56 ninjada joined #salt

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