Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-02-14

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

All times shown according to UTC.

Time Nick Message
00:03 jfelchner joined #salt
00:10 jfelchner Hey all, so I'm having some serious difficulty with `ext_pillar`.  I currently have this: https://gist.github.com/jfelchner/70576ea3c58c44f6ad6b
00:10 jfelchner Inside of the `/srv/pillar/keys` directory I have: `/srv/pillar/keys/foo/rsa` and `/srv/pillar/keys/foo/rsa.pub`
00:11 jfelchner I'm just doing a minion/master on the same server right now and I've verified they're both there.
00:11 onlyanegg joined #salt
00:11 jfelchner My assumption based on the docs would be that I would `salt '*' pillar.get 'keys:foo:rsa'` and it would output the private key contained in `/srv/pillar/keys/foo/rsa`, however it doesn't return anything.
00:11 jfelchner Anyone have any ideas?
00:13 brianfeister joined #salt
00:17 jfelchner And yes I do have 'keys' in my pillar's `top.sls` file.
00:18 teryx510 joined #salt
00:25 jimklo joined #salt
00:27 amcorreia joined #salt
00:31 sauvin joined #salt
00:31 sauvin joined #salt
00:32 jfelchner Basically it's like it's reading it as pillar data rather than converting it into the structure outlined in the docs.
00:33 sauvin joined #salt
00:33 tweakism jfelchner: shouldn't ext_pillar: definition be in the master config file, not a file named keys.sls?
00:33 tweakism I think that's your issue.
00:34 jfelchner tweakism ok now we're getting somewhere! :)  Lemme try that.  I was under the expectation that they're defined inline.  Gimme a sec.
00:36 tweakism it's kindof nice actually, 'cause I think it means you can query on ext_pillar data in targeting/etc. of regular pillar data
00:36 tweakism but I haven't tested it yet.
00:41 scoates joined #salt
00:44 ZiLi0n Hello everyone, so as far as I can understand salt states can be grouped in top.sls file, and highstate can run all of them. However I don't always want to run all states... would be the way to create more than one top.sls file and give it to highstates as a param? Basically I want to be able to do different actions, like "upgrade" (which require many smaller substacks to get there), or "deploy", etc...
00:45 tweakism I think, you don't want a highstate, I think a highstate is by definition everything top.sls defines
00:45 tweakism not sure though, I'm new.
00:46 honestly ZiLi0n: you can use includes for that
00:46 ZiLi0n thanks tweakism. the thing is I don't see other way to run more than one salt state unless I use highstate
00:47 ZiLi0n mmm includes, that sounds good. An include is defined in a salt state and it can include other salt states?
00:48 tweakism Warning though, I'm pretty sure you can't include the same state multiple times, so if two different files include the same state, you can't include both of those files.
00:48 ZiLi0n thanks honestly, just find it in the website. it sounds like that is exactly what I need
00:48 tweakism just keep that in mind as you structure stuff.
00:49 scoates joined #salt
00:49 jfelchner ZiLi0n I think you're talking about `salt.modules.state.sls`
00:50 ZiLi0n tweakism thanks a lot! I would give it a try, I will keep that in mind
00:50 jfelchner Oh, you're not talking about running from the CLI. nm.
00:51 jfelchner tweakism Ok so `/etc/salt/master` is definitely the right place for `ext_pillar` so that's getting me closer.  Unfortunately after a `service salt-master restart` and refreshing my pillars, those files don't show up.  I completely deleted the `keys.sls` file.
00:51 ZiLi0n Hi jfelchner, no no I am talking about running from the CLI. But I was wondering how I could create a sls file that could aggregate other sls that I could select depending on what I need to do
00:52 jfelchner ZiLi0n gotcha.  Well if you ever just need to run from the command line using a script or something I think `salt.modules.state.sls` is what you want.
00:52 tweakism jfelchner: could you pastebin [the non-sensitive parts of] your /etc/salt/master ?
00:52 jfelchner You can specify arbitrary states to run.
00:53 jfelchner tweakism is enormous.  I'm just using the default one installed with the bootstrap script right now.  I'll gist the part I just added though.
00:53 tweakism ok
00:53 ZiLi0n right, but only one I think. I just want to run one sls, that will run 10 sls files for me automatically in the order declared. I think the include is exactly what I was looking for
00:54 onlyanegg hey all, I have a jinja question. I have this: {%- set portalList = pillar['context']['resources']|list() %} which gives me a list of all the keys (in this case 'portals') directly under 'resources'. I'd like to create a list of the names of all the portals, ie. pillar['context']['resources']['portal']['name'] for each portal.
00:54 onlyanegg How can I do this?
00:56 jfelchner tweakism https://gist.github.com/jfelchner/d2b0373afd9f3d45b9f0
00:58 mohae joined #salt
00:58 jfelchner tweakism if you refresh I just added the `ls` output of the root I'm specifying.
00:59 tweakism so, I don't think file_tree does what you want.
00:59 Lionel_Debroux_ joined #salt
00:59 tweakism see docs at https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.file_tree.html
01:00 jfelchner Yeah that's what I've been staring at for the last two hours haahaha
01:01 tweakism it looks like it would expect a directory structure of /srv/pillar/files/keys/hosts/<minion_id>/ based on your config
01:01 jfelchner As I read it it uses the directories off of a root to create the key hierarchy in pillar and when it finds a file it uses the contents of that file as the value for the key.
01:01 tweakism but I think you can just skip ext_pillar, and define a normal pillar
01:02 jfelchner The problem I'm trying to solve is that I don't want tons of huge certs and private keys cluttering my pillar files.
01:02 tweakism jfelchner: are you wanting keys defined per-host, or site-wide-default, or both?
01:02 jfelchner These particular ones I want defined publicly for all hosts.
01:02 jfelchner There will be some host-specific ones.
01:03 jfelchner I thought that the `hosts` subdirectory was an option.  Not a requirement.  Lemme try it.
01:03 srinivas joined #salt
01:04 srinivas_ joined #salt
01:04 edrocks joined #salt
01:05 tweakism I'll look at the code and see.
01:06 jfelchner tweakism I just tried the host-specific version and it worked. :)
01:06 jfelchner Any idea if I can define something for all hosts?
01:07 tweakism it definitely only looks in /hosts/ and /nodegroups/, checked code.
01:07 tweakism yeah,
01:08 tweakism with a normal pillar_roots (instead of ext_pillar)
01:08 tweakism and a top.sls with a '*' target
01:08 jfelchner tweakism but I'd have to define those inline with a multi-line string?
01:08 tweakism yeah, I'm trying to remember
01:08 tweakism there was a way to avoid that
01:08 tweakism I hope I'm not just thinking of file_tree
01:09 iceyao joined #salt
01:09 jfelchner Cool.  I don't want to take up a ton of your time, but I've been doing salt all of about 3 days and loving it but I ran into this and I was like "wut?"  Seems like a common issue people would run into.
01:10 tweakism meh, I'm learning, this is good for me.
01:10 tweakism I'm working on implementing some very similar stuff too
01:10 tweakism currently writing some python to generate some data files; next step is to get salt to import them
01:11 tweakism so this is all importantf or me to understand clearly
01:11 jfelchner Plus defining global certs/keys inline is problematic since if you want to change them, rather than just replacing files, now you have to edit YAML.
01:12 iceyao_ joined #salt
01:12 tweakism agreed.
01:17 tweakism I know I saw a solution to this; searching.
01:20 tweakism you could definitely write a custom external pillar; it should be fairly straightforward
01:20 tweakism you can even start with the source of file_tree as a base
01:21 tweakism just add an all/ directory beside hosts/ and /nodegroups/ and incorporate it into the code.
01:22 jfelchner tweakism awesome.  I'll give that a go and maybe submit a PR.  Thanks!
01:22 tweakism oh, also
01:22 jfelchner (I have hardly done any Python)
01:22 tweakism you could define an all nodegroup in /etc/salt/master
01:22 jfelchner OHHHHHHH
01:22 tweakism and then use nodegroups/all/ in file_tree :)
01:23 tweakism damn tweakism you're a genius.
01:23 jfelchner Boom!  I think that's the winner!
01:23 jfelchner I agree! ;)
01:23 jfelchner And I haven't used nodegroups before so this'll give me something new to learn. :+1:
01:24 tweakism sweet; I can use this myself too
01:24 jfelchner tweakism thanks again for all your help!
01:24 tweakism np
01:25 HimanshuSalt joined #salt
01:27 HimanshuSalt Hi, I looking for help in using salt python api, LocalClient, I am running salt master on host 'foonix1' and minion on 'foonix2', when i run test.ping from cli, it respond fine
01:28 HimanshuSalt I am using client_acl setting in master for local user (on foonox1) 'himanshu'
01:28 HimanshuSalt but as I write small python code using LocalClient, its throwing error http://dpaste.com/3FX0YKM
01:29 HimanshuSalt I tried docs, but could not understand what exactly 'load' means in the exception
01:30 nyx_ joined #salt
01:33 grumm_servire joined #salt
01:36 tracphil joined #salt
01:42 HimanshuSalt Anyone?
01:48 GreatSnoopy HimanshuSalt, did you execute your python code on the salt master ?
01:57 pfallenop joined #salt
02:02 brianfeister joined #salt
02:05 HimanshuSalt @GreatSnoopy Yes
02:06 HimanshuSalt but I ran the code as user 'himanshu'
02:06 HimanshuSalt as i am able to run salt cli command without sudo
02:06 HimanshuSalt as I have configured 'client_acl' for user 'himanshu' in salt master config
02:09 HimanshuSalt Basically i am running code on master 'foonix1' only, but as user 'himanshu', as user 'himanshu' as permission in salt master config to run command 'test.ping' without auth
02:10 GreatSnoopy it looks to me more like you cannot import the salt packages
02:10 GreatSnoopy if you would run that on the client that's what you would get
02:11 HimanshuSalt ohk, but which package?
02:11 GreatSnoopy do you have the salt master installed in a venv or from source in nonstandard locations ?
02:12 GreatSnoopy HimanshuSalt, do you have both python3 and 2.7 on that machine ? try runnig your code with 2.7
02:12 GreatSnoopy what os do you have there
02:13 HimanshuSalt salt master is running from standard localtions only, all configs are on standard paths also. But yes its a virtual environment. 'foonix1' and 'foonix2' running ubuntu 14.2
02:13 GreatSnoopy i see you have stuff in /usr/local
02:13 saltycracker joined #salt
02:14 HimanshuSalt yes and i have python 3+ and python 2.7 also
02:14 HimanshuSalt let me try with python 2.7
02:14 fracklen joined #salt
02:14 GreatSnoopy thing is, you need to use the same env for salt and your test program
02:15 HimanshuSalt Awesome, thanks GreatSnoopy, it worked in 2.7 :)
02:15 GreatSnoopy :)
02:15 HimanshuSalt seem like env issue
02:15 HimanshuSalt any idea, how can i use it with python 3.4
02:16 HimanshuSalt as library for same are in place
02:16 quasiben joined #salt
02:16 HimanshuSalt in /usr/local
02:16 mike_ joined #salt
02:17 HimanshuSalt thanks for the time, i will take a look into same, not a big deal. Its just the exception was bit unclear to me.
02:17 HimanshuSalt thanks again
02:17 GreatSnoopy i'm not sure if salt works with 3, you may want to ask a dev about that
02:17 catpigger joined #salt
02:18 HimanshuSalt sure i will look into same
02:21 tweakism OK; wth is up w/ this error  https://gist.github.com/anonymous/74e7a4d2112d0891116c
02:21 grumm_servire joined #salt
02:21 tweakism I don't see a problem with the code.
02:21 srinivas joined #salt
02:22 totzky joined #salt
02:26 kevinquinnyo joined #salt
02:28 donmichelangelo joined #salt
02:29 berserk joined #salt
02:37 overyander joined #salt
02:37 tweakism oh damn, I see the buug
02:37 tweakism lol, syntax error in current released file... nice :)
02:39 nikogonzo tweakism: i didn't see it, can you point it out?
02:46 grumm_servire joined #salt
02:46 tweakism sure
02:46 tweakism in https://github.com/saltstack/salt/blob/af26817cc8a6717d9e414324bbd4e7b6a1b42d11/salt/pillar/file_tree.py
02:46 tweakism prefix is defined at line 207
02:46 tweakism but only if the check on line 206 passes
02:46 tweakism so if norm_dir_path == norm_top_dir, prefix doesn't get defined, but still gets referenced at line 233
02:46 Vaelatern joined #salt
02:46 nikogonzo thanks
02:46 tweakism hrm, now, let's see when that would be the case.
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.5 | Register for SaltConf16: http://saltconf.com/register/ | Paid support available for open source Salt! https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
02:58 grumm_servire joined #salt
03:02 scoates joined #salt
03:04 tweakism nikogonzo: I can't come up w/ any situation where that check wouldn't be true
03:04 tweakism I mean, once, which is enough to trigger the exception
03:04 cyborg-one joined #salt
03:04 tweakism surely someone would have noticed if dir_tree was broke?
03:04 tweakism jfelchner: did dir_tree work for you?
03:04 tweakism sorry, file_tree
03:05 tweakism and sorry, I meant, I can't come up w/ any scenario where the check wouldn't always fail once, meaning I don't see how this code could work for anyone.
03:07 srinivas joined #salt
03:08 grumm_servire joined #salt
03:09 jfelchner tweakism I did a nodegroup with the definition 'S@10.0.0.0/8' and it worked like a charm :)
03:09 jfelchner brb
03:11 tweakism wth
03:14 calculon joined #salt
03:32 overyander joined #salt
03:36 tweakism still not seeing it.
03:37 tweakism I wish jfelchner would come back so I can confirm his version, but I'm running 2015.8.5 and this file doesn't seem to have changed through develop
03:38 beardedeagle joined #salt
03:39 beardedeagle do you guys have any documentation on salt-pack? Kinda flying blind here.
03:42 tweakism heh, ok... one thing that would make it work... would be if none of your files ended in a newline.
03:43 tweakism but it seems unlikely that that would be the case, since unix text editors really should (POSIX requirement) always end files in a newline.
03:44 tweakism (for this reason, keep_newline is kindof a weird option... it should default to true, not false, and there should be a way to list globs from which newlines *should* be removed, which you can't do as implemented.)
03:51 brianfeister joined #salt
03:54 fracklen joined #salt
03:56 tweakism I can make some improvements and make a pull request, if you like.
04:02 malinoff joined #salt
04:04 treaki_ joined #salt
04:09 anmol joined #salt
04:13 brianfeister joined #salt
04:17 cliluw joined #salt
04:19 Glasswalker joined #salt
04:26 tweakism oh, and also that it claims it ignores keep_newline for "binary" files (which, 'binary files', what does that even mean?), but there's no actual logic in the code to do anything like that
04:27 tweakism it only checks whether the file ends in '\n' and whether keep_newline indicates it should strip a final newline or not.
04:32 zz_Cidan joined #salt
04:35 Cidan joined #salt
04:38 racooper joined #salt
04:44 onlyanegg joined #salt
04:45 tristianc joined #salt
04:53 quasiben joined #salt
04:56 anmol joined #salt
04:56 JPT joined #salt
05:19 AndreasLutro joined #salt
05:29 beardedeagle left #salt
05:30 beardedeagle joined #salt
05:42 fracklen joined #salt
05:51 kevinquinnyo joined #salt
05:52 kevinquinnyo joined #salt
06:01 kevinquinnyo joined #salt
06:03 kevinquinnyo joined #salt
06:06 kevinquinnyo joined #salt
06:08 josuebrunel joined #salt
06:19 overyander joined #salt
06:20 totzky joined #salt
06:34 malinoff joined #salt
06:46 Vaelatern joined #salt
06:55 jaybocc2 joined #salt
06:57 onlyanegg joined #salt
07:07 slav0nic joined #salt
07:15 joe_n joined #salt
07:25 felskrone joined #salt
07:29 traph joined #salt
07:31 fracklen joined #salt
07:31 overyander joined #salt
07:37 jxm_ joined #salt
07:45 subsignal joined #salt
07:46 evle joined #salt
07:54 patchedmonkey joined #salt
07:56 jaybocc2 joined #salt
08:03 onlyanegg joined #salt
08:09 jakwas joined #salt
08:19 onlyanegg joined #salt
08:23 giantlock joined #salt
08:38 onlyanegg joined #salt
08:46 toddnni joined #salt
08:46 antpa joined #salt
08:56 jaybocc2 joined #salt
09:00 antpa joined #salt
09:03 antpa joined #salt
09:05 CeBe joined #salt
09:07 ruxu joined #salt
09:08 rem5 joined #salt
09:15 wwwbukolaycom joined #salt
09:32 joe_n joined #salt
09:39 onlyanegg joined #salt
09:48 subsignal joined #salt
09:53 anthpa joined #salt
09:57 onlyanegg joined #salt
10:02 atmosx joined #salt
10:07 Himanshu joined #salt
10:15 antpa joined #salt
10:19 antpa joined #salt
10:39 onlyanegg joined #salt
10:57 jaybocc2 joined #salt
11:00 pjammer joined #salt
11:09 grumm_servire joined #salt
11:16 onlyanegg joined #salt
11:24 cyborglone joined #salt
11:24 denys joined #salt
11:28 onlyanegg joined #salt
11:34 cberndt joined #salt
11:34 bhosmer_ joined #salt
11:36 grumm_servire joined #salt
11:39 antpa joined #salt
11:41 pjammer git as a fileserver backend, eh? Salt keeps getting better and better as I read more about it.
11:41 jgm3 joined #salt
11:42 pjammer Maybe I missed something, but is there an approximate size/resource minimum for the Salt Master box?
11:42 pjammer Chef recommends a 4GB minimum in it's literature.
11:44 babilen memory?
11:44 pjammer sorry, yes.
11:45 babilen Should work, but then that depends on what you do and how many minions you have. I'd give it plenty of cores if they come cheap...
11:47 rem5 joined #salt
11:47 onlyanegg joined #salt
11:47 pjammer cool, thanks babilen
11:50 subsignal joined #salt
12:01 bhosmer__ joined #salt
12:05 onlyanegg joined #salt
12:08 kevinquinnyo joined #salt
12:09 fracklen joined #salt
12:13 jimklo joined #salt
12:17 wych joined #salt
12:18 malinoff joined #salt
12:21 onlyanegg joined #salt
12:24 RandyT joined #salt
12:36 onlyanegg joined #salt
12:37 sinonick joined #salt
12:45 wych joined #salt
12:51 amcorreia joined #salt
12:55 linjan joined #salt
12:58 jaybocc2 joined #salt
13:00 iamtew joined #salt
13:15 jimklo joined #salt
13:16 evle1 joined #salt
13:25 ruxu joined #salt
13:25 xstra joined #salt
13:43 pcdummy joined #salt
13:43 pcdummy joined #salt
13:51 subsignal joined #salt
13:51 viq joined #salt
13:54 quasiben joined #salt
13:55 quasiben joined #salt
13:56 toddnni joined #salt
13:56 Fiber^ joined #salt
13:59 kevinquinnyo joined #salt
14:00 lompik joined #salt
14:04 anthpa joined #salt
14:07 antpa joined #salt
14:07 kevinquinnyo joined #salt
14:08 Ashald joined #salt
14:09 onlyanegg joined #salt
14:11 anthpa joined #salt
14:16 jimklo joined #salt
14:23 jimklo joined #salt
14:33 ruxu joined #salt
14:48 catpig joined #salt
14:48 amcorreia joined #salt
14:53 patchedmonkey joined #salt
14:54 onlyanegg joined #salt
14:58 jaybocc2 joined #salt
15:00 abednarik joined #salt
15:03 onlyanegg joined #salt
15:07 pcdummy joined #salt
15:07 pcdummy joined #salt
15:09 onlyanegg joined #salt
15:15 pcdummy joined #salt
15:15 pcdummy joined #salt
15:17 onlyanegg joined #salt
15:17 Sacro joined #salt
15:24 bluenemo joined #salt
15:29 patchedmonkey joined #salt
15:32 Jimlad joined #salt
15:33 tspecht joined #salt
15:34 tspecht Hey guys! Quick question: How are you handling your pillar files with all the secrets in there? I'd like to include certain access keys in the pillar data and don't want to push those into my git alongside with the code. Hence I figured maybe it would be a nice trick to generate the pillar file using fabric or something similar on deploy-time. Any suggestions on how to handle this?
15:37 jimklo joined #salt
15:39 AndreasLutro use an external pillar
15:40 AndreasLutro you can store pillar data in a database, an external api, whatever
15:43 tspecht Oh okay, didn't know that. Any links on where to start?
15:50 babilen https://docs.saltstack.com/en/latest/ref/pillar/all/
15:51 malinoff joined #salt
15:51 patchedmonkey joined #salt
15:52 keimlink joined #salt
15:53 subsignal joined #salt
15:58 garphy joined #salt
16:07 cpowell joined #salt
16:12 rem5 joined #salt
16:14 ruxu joined #salt
16:19 ruxu joined #salt
16:20 slav0nic joined #salt
16:27 armguy joined #salt
16:30 subsignal joined #salt
16:31 paolo2 joined #salt
16:32 paolo2 left #salt
16:38 jimklo joined #salt
16:43 onlyanegg joined #salt
16:44 kevinquinnyo joined #salt
16:45 cpowell joined #salt
16:50 onlyanegg joined #salt
16:56 rem5 joined #salt
16:57 treaki_ joined #salt
16:59 jxm_ joined #salt
16:59 jaybocc2 joined #salt
17:01 onlyanegg joined #salt
17:13 rem5 joined #salt
17:16 saffe joined #salt
17:18 nyx_ joined #salt
17:20 ajw0100 joined #salt
17:22 onlyanegg joined #salt
17:22 oida joined #salt
17:23 scoates joined #salt
17:32 onlyanegg joined #salt
17:32 tkeith What's the best way to ensure a particular line doesn't exist in a file?
17:32 tkeith (preferably with wildcard matching)
17:35 ruxu joined #salt
17:39 babilen file.replace ?
17:41 jimklo joined #salt
17:47 cpowell joined #salt
17:48 ZiLi0n joined #salt
17:48 jxm_ joined #salt
17:50 onlyanegg joined #salt
17:50 ZiLi0n Hello everyone, I need to run a salt state few times, one for each element of a list that is stored in pillar. So I have added a {% for interface in pillar['interfaces'] %} in the sls, but I am getting an error Conflicting ID. I wasn't getting that error until I added the Jinja for loop to the sls file
17:55 traph joined #salt
17:55 hightekvagabond joined #salt
17:59 babilen ZiLi0n: Yes, your states need a unique ID. Try suffixing it with -{{ interface }} or so
17:59 ZiLi0n Find out the problem. As a loop is running, every states was getting the same name, and it has to unique no matter how. Solution was to add an index of the loop itself
18:00 ZiLi0n babilen. thanks! that was exactly the problem. You're explanation is better than mine, exactly a suffix is the way to go. Thanks!
18:00 jaybocc2 joined #salt
18:01 rem5 joined #salt
18:05 onlyanegg joined #salt
18:05 babilen ZiLi0n: Great :)
18:06 ZiLi0n sorry for my typo above, I meant to say: "your explanation is..." hehe thanks babilen!
18:07 babilen Yes, I am not an explanation! ;)
18:08 ZiLi0n haha yeah!
18:09 justanotheruser joined #salt
18:12 ZiLi0n is there a salt states to reboot the entire host? I am looking for a way to tell the minion to restart the host when something happens (I guess for this I can use watch, and watch all the other states so that a reboot is triggered when one states changes...)
18:12 Lionel_Debroux_ joined #salt
18:16 onlyanegg joined #salt
18:22 mapu joined #salt
18:28 onlyanegg joined #salt
18:30 cpowell joined #salt
18:31 ruxu joined #salt
18:43 overyander joined #salt
18:44 jimklo joined #salt
18:45 krymzon joined #salt
18:45 rem5 joined #salt
18:46 amcorreia joined #salt
18:50 onlyanegg joined #salt
18:52 justanotheruser joined #salt
18:54 Muchoz joined #salt
18:57 cberndt joined #salt
18:58 hasues joined #salt
18:58 hasues left #salt
18:58 keimlink joined #salt
19:01 jaybocc2 joined #salt
19:06 Muchoz_ joined #salt
19:11 rem5 joined #salt
19:12 GreatSnoopy joined #salt
19:20 cberndt joined #salt
19:32 ruxu joined #salt
19:34 garphy joined #salt
19:35 rem5 joined #salt
19:36 patchedmonkey joined #salt
19:38 kevinquinnyo joined #salt
19:45 jimklo joined #salt
19:51 fracklen joined #salt
20:08 s_kunk joined #salt
20:17 jaybocc2 joined #salt
20:19 giantlock joined #salt
20:21 stopbyte joined #salt
20:22 pdayton joined #salt
20:29 |Fiber^| joined #salt
20:33 ZiLi0n joined #salt
20:33 ZiLi0n Hello everyone, how can I reboot a minion from a salt states?
20:33 babilen That's a horrible state
20:34 GreatSnoopy better than a shutdown state,tho...
20:34 rem5 joined #salt
20:34 babilen What are you really trying to do? And note that there is https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.system.html#salt.modules.system.reboot
20:35 ZiLi0n so there is a salt states to upgrade the kernel if needed, so I'd like to reboot before continuing, before installing applications, etc
20:35 babilen ZiLi0n: A state is something that can be achieved, a constant reboot would be horrible .. you might be looking for orchestration rather than a (high)state
20:35 subsignal joined #salt
20:35 babilen ZiLi0n: Is this about initial provisioning?
20:36 onlyanegg joined #salt
20:36 babilen You typically want your highstates to be idempotent (in that they don't change if they have achieved once)
20:36 ZiLi0n yes, so an initial reboot
20:36 babilen Look into orchestration
20:37 ZiLi0n so if there are no changes, so that the highstates is idempotent, then no more reboots should happen. But only one for the very first time to make sure the kernel is upgraded
20:38 babilen I'd model that with orchestration ..
20:38 ZiLi0n cool, I see. Thanks, going to have a look
20:41 keimlink joined #salt
20:42 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event might come in handy
20:46 edrocks joined #salt
20:47 jimklo joined #salt
20:54 garphy joined #salt
20:59 ZiLi0n babilen thanks I am trying the wait for event. looks like it is what I need. I am getting error: Could not access /var/cache/salt/master Path does not exist. But that dir exits in the master though
21:01 jxm_ joined #salt
21:02 patchedmonkey joined #salt
21:03 hasues joined #salt
21:08 beardedeagle joined #salt
21:11 amcorreia joined #salt
21:13 pjammer joined #salt
21:14 edrocks joined #salt
21:16 hasues left #salt
21:17 thejrose1984 joined #salt
21:17 jaybocc2 joined #salt
21:21 toddnni_ joined #salt
21:22 Vaelater1 joined #salt
21:22 RandyT_ joined #salt
21:23 amcorreia_ joined #salt
21:28 paolo joined #salt
21:28 paolo joined #salt
21:28 denys joined #salt
21:30 mavhq joined #salt
21:30 dijit joined #salt
21:31 pppingme joined #salt
21:33 scoates joined #salt
21:33 ruxu joined #salt
21:38 fracklen joined #salt
21:40 subsignal joined #salt
21:42 patchedmonkey joined #salt
21:51 jimklo joined #salt
21:51 totzky joined #salt
21:53 oida joined #salt
21:57 Muchoz joined #salt
22:02 denys joined #salt
22:04 ZiLi0n Hello everyone. Is there a pillar.filter_by fuction similar to grains.filter_by?
22:07 joe_n joined #salt
22:16 denys joined #salt
22:18 cpowell joined #salt
22:21 youngnick joined #salt
22:22 youngnick Hey everyone, regarding licensing of contributions, is there any other guide than https://github.com/saltstack/salt/blob/develop/Contributing.rst ? Does salt have a Contributor License Agreement? Trying to get clearance from work to submit patches.
22:25 tweakism lol, your work is being silly.  but it's typical for companies to mis-understand open-source.
22:26 tweakism youngnick: if your company releases code under Apache 2.0 license, Salt can use it.
22:26 tweakism simple as that.
22:26 tweakism Salt is also being silly on that page, 'cause there are lots of other compatible licenses, but they seem to really want you to release under Apache 2.0
22:27 tweakism youngnick: if salt did have a CLA, and they accepted your contributions w/o your company having signed the CLA, it'd be salt's problem/issue, not your or your company's.
22:28 jimklo joined #salt
22:31 rotbeard joined #salt
22:34 tiadobatima joined #salt
22:34 krymzon joined #salt
22:34 ruxu joined #salt
22:43 zenlot1 joined #salt
22:45 youngnick Okay, as long as the Contributing page is everything I need to know about, I should be fine - it's more I wanted to make sure I hadn't missed anything.
22:45 youngnick Thanks for your help.
22:47 oida joined #salt
22:49 alinuxninja joined #salt
22:49 totzky joined #salt
22:58 linjan joined #salt
23:00 edrocks joined #salt
23:10 RandyT_ joined #salt
23:18 jaybocc2 joined #salt
23:19 ZiLi0n Hi. using salt.function: -name: system.reboot. it does not restart the host
23:19 ZiLi0n I mean, the minion, even when -tgt: '*'...
23:25 hasues joined #salt
23:25 hasues left #salt
23:33 joe_n joined #salt
23:34 totzky joined #salt
23:37 onlyanegg joined #salt
23:43 overyander joined #salt
23:44 tweakism I dunno, but you might be better off using a cmd to have at issue 'shutdown -r now' after a few seconds delay
23:46 hightekvagabond joined #salt
23:47 tweakism it will at least ensure that the shutdowns script will finish even if salt minion is stopped/killed by shutdown process
23:47 tweakism but again I dunno what system.reboot does, maybe it handles that stuff already
23:48 ZiLi0n tweakism it seems it does not do anything for me.
23:49 tweakism Would anyone like to talk to me about a bug / bugfix I'm going to do a PR for
23:49 tweakism I want someone else to confirm it's broken and I didn't break anything w/ the fix
23:49 tweakism but I guess I can put that in the PR
23:49 ZiLi0n thanks tweakism, now doing cmd.run -name: shutdown -r now at least reboot
23:50 tweakism you can do this to prevent shutdown script getting interrupted if salt minion etc. is killed by shutdown:
23:51 tweakism echo "shutdown -r now" | at
23:51 tweakism well,
23:51 tweakism echo "shutdown -r now" | at now
23:54 ZiLi0n cool, thank you. Now I need to make the wait_for to work so that the master wait for the minion to come back up to continue
23:55 Muchoz joined #salt
23:55 ZiLi0n I have salt.wait_for_event: - name: salt/minion/*/start but it does not seem to work :(
23:56 kermit joined #salt

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