Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-10-17

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

All times shown according to UTC.

Time Nick Message
00:13 whytewolf laertus: if you are just playing around and don't have many minions and just working a couple of things. yeah thats fine. I get away with test masters with only 512Megs of ram sometimes
00:13 laertus nice
00:13 whytewolf but i wouldn't run prod on something that small
00:13 laertus yeah, i'm just going to use them to learn salt
00:23 cyteen joined #salt
00:28 colegatron joined #salt
00:48 edrocks joined #salt
00:53 zerocool_ joined #salt
00:56 rburkholder joined #salt
00:57 zerocoo__ joined #salt
00:58 zerocoo__ joined #salt
00:58 XenophonF hm, my salt master is a t2.medium instance (4 GiB RAM)
00:59 XenophonF that should be plenty for a hundred or so minions, right?
00:59 XenophonF (this is in re: my SaltReqTimeoutError saga)
00:59 XenophonF screw it i'm going to launch a replacement master in aws as a t2.xlarge
01:00 XenophonF go big or go home amirite?
01:02 phileus0 joined #salt
01:11 iggy that wouldn't handle 100 of our minions
01:11 iggy but we have a lot of states
01:11 iggy so it's all very dependent on what you're doing
01:13 phileus0 whytewolf: I read the documentation.  I'm still having some trouble getting the cmd_batch and cmd_async to work with salt-api.
01:14 XenophonF iggy: what do you mean by "a lot of states"?  i have a 150-250 per minion.
01:17 iggy 760 on the last highstate I ran
01:18 nickadam joined #salt
01:18 phileus0 whytewolf: I'm using the requests module, and I have been unable to get this to work: https://gist.github.com/anonymous/57c96147080bc72d6ee4c9221063bbe9
01:18 jkleckner joined #salt
01:18 iggy I think 350ish is closer to normal for us though
01:19 jkleckner joined #salt
01:22 XenophonF What does your master setup look like?  Just one?  A multi-master cluster?  How big are they?
01:26 jkleckner #grub2
01:29 phileus0 Anyone else have any ideas?  I'm using the salt-api and the Python requests module.  I'd like to use either the salt -b option or salt --asyn equivalent using the API. But I'm unable to get it to work.
01:58 ilbot3 joined #salt
01:58 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.8, 2017.7.2 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
02:01 blu__ joined #salt
02:03 edrocks joined #salt
02:04 iggy did you look at pepper?
02:06 phileus0 joined #salt
02:20 aneeshusa joined #salt
02:22 phileus0 joined #salt
02:30 evle2 joined #salt
02:38 philpep joined #salt
02:40 daks joined #salt
02:42 nledez joined #salt
02:43 aldevar joined #salt
02:44 tiwula joined #salt
02:45 monokrome joined #salt
02:49 masber joined #salt
03:00 bluenemo joined #salt
03:00 citaret_ joined #salt
03:10 vchauhan joined #salt
03:14 jkleckner joined #salt
03:26 wonko21 joined #salt
03:46 jkleckner joined #salt
03:47 skullone joined #salt
03:57 deskpot joined #salt
04:02 aldevar left #salt
04:05 CeBe joined #salt
04:06 Hazelesque joined #salt
04:33 schasi joined #salt
04:44 zerocool_ joined #salt
04:51 phileus0 joined #salt
05:18 NightMonkey joined #salt
05:26 Valfor joined #salt
05:26 Valfor joined #salt
05:41 hemebond joined #salt
05:43 Valfor joined #salt
05:43 Valfor joined #salt
05:48 felskrone joined #salt
05:55 colegatron joined #salt
06:21 masber joined #salt
06:23 _KaszpiR_ joined #salt
06:27 NightMonkey joined #salt
06:35 pualj joined #salt
06:35 Antiarc joined #salt
06:52 zulutango joined #salt
07:05 jasonhu joined #salt
07:06 usernkey joined #salt
07:09 aldevar joined #salt
07:10 jasonhu joined #salt
07:10 _KaszpiR_ joined #salt
07:16 Tucky joined #salt
07:19 jasonhu_ joined #salt
07:21 Hybrid joined #salt
07:24 jasonhu_ left #salt
07:25 jasonhu joined #salt
07:26 jasonhu left #salt
07:26 dayid joined #salt
07:26 jasonhu joined #salt
07:28 jasonhu ?
07:29 jasonhu anyone is focus on salt+reclass now?
07:31 robman joined #salt
07:35 gnomethrower joined #salt
07:39 pbandark joined #salt
07:44 do3meli joined #salt
07:51 obitech joined #salt
07:53 do3meli left #salt
08:12 hammer065 joined #salt
08:36 Mattch joined #salt
08:37 schasi joined #salt
08:56 EvaSDK XenophonF: re not using include, but how do I manage precedence then ? how would you write a formula that builds on top of another to deploy an application ? using order ?
08:59 losh joined #salt
09:02 Naresh joined #salt
09:03 ThierryR joined #salt
09:04 ThierryR joined #salt
09:06 schasi joined #salt
09:09 ThierryR joined #salt
09:09 _KaszpiR_ joined #salt
09:14 EvaSDK coming to think of it, I cannot set saltenv/pillarenv in minion configuration as well as it is a security risk for me
09:15 EvaSDK and pillarenv_from_saltenv is too new for me to use right now
09:15 EvaSDK oh well, back to previous status quo then
09:17 ibro joined #salt
09:18 _KaszpiR_ joined #salt
09:21 hemebond EvaSDK: Wouldn't you just make your formula stand-alone?
09:21 EvaSDK I could for this particular case
09:21 hemebond I use extends to link formulas together for dependencies.
09:22 EvaSDK well, that's actually what I do but with include
09:22 EvaSDK I don't think extend would solve the problem
09:22 hemebond What's the problem?
09:23 EvaSDK imagine postgres formula being needed by your app in two envs
09:23 EvaSDK dev/prod
09:23 hemebond mmhmm
09:23 EvaSDK you name the database the same, user the same, just password is different
09:24 hemebond And the problem?
09:25 EvaSDK you get missing state IDs if you expect the state to be applied by a role in base env for example or collisions if the role is available in both base and dev env
09:25 hemebond Well applying formulas is best done via top.sls
09:26 EvaSDK sure
09:26 hemebond Or a separate "class" or "role" state.
09:26 hemebond I personally prefer top.sls
09:27 EvaSDK the bottomline of my problem is that I expect base to be the baseline of my minions
09:27 EvaSDK and extra envs to build on top of it
09:27 EvaSDK which obviously isn't adequate with the design of saltenvs
09:28 hemebond Hmm. I don't really understand the problem.
09:28 hemebond I have multiple saltenvs and pillarenvs,.
09:29 hemebond With a mixture of fallback and mixins.
09:30 EvaSDK I'll try to create a gist for illustration
09:32 zer0def hmmm… quick question about jinja - if i define a variable and refer to it from within the same conditional block, it's rendered properly, but if i refer to the same in-conditional defined variable from outside said conditional, it's undefined
09:32 zer0def is that expected behavior?
09:32 hemebond I believe so.
09:33 zer0def would there be a way to keep in-conditional defined variables outside of it?
09:33 hemebond If the conditional is never true then the variable is never set.
09:33 _KaszpiR_ joined #salt
09:33 zer0def it usually is true, though
09:33 hemebond I was thinking of loops.
09:33 zer0def perhaps i should provide an example, one moment
09:33 hemebond Yes, you should be able to use the variable after the conditional sets the variable.
09:37 brokensyntax joined #salt
09:40 zer0def hemebond: https://ghostbin.com/paste/sdqs5
09:41 zer0def the conditional always is true for some case in the `master_split` dict
09:41 hemebond Okay. Lemme test something.
09:42 zer0def also, the cast to int always succeeds, but that's beside the point
09:42 hemebond Do you get an error?
09:42 EvaSDK hemebond: https://gist.github.com/EvaSDK/e9cb0f7d1e8d9656bd65eefbfb59aa0a should illustrate the problem
09:44 zer0def hemebond: no, i don't get any errors, i just get the results in comments
09:44 hemebond I see.
09:44 zer0def that said, i obviously do get errors when the variable is not defined
09:45 hemebond I wonder if the loop is created a separate scope.
09:45 zer0def well, when i refer to the variable, which is not defined
09:45 zer0def i was thinking the same thing
09:45 hemebond Yeah, looks like the loop is its own scope.
09:45 zer0def any reference to that behavior?
09:47 hemebond See the paragraph just above http://jinja.pocoo.org/docs/2.9/templates/#if
09:47 zer0def i see, thank you
09:48 hemebond Possible workaround https://stackoverflow.com/a/4880398
09:48 hemebond EvaSDK: How are your environments configured, if at all?
09:49 EvaSDK just top.sls
09:49 hemebond But you have a "base" and "dev" environment as flat environments?
09:49 EvaSDK no, they come from their own top.sls in adequately named git branches
09:50 EvaSDK base is in master only, dev is in dev only, etc
09:51 EvaSDK the current workaround for this situation is to specify saltenv and pillarenv on invocation and copy all states that I want common to all envs
09:51 hemebond It's just the states you're having trouble with, yeah?
09:51 EvaSDK yes
09:52 EvaSDK pillar do merge the way I want
09:52 EvaSDK if/when it is required
09:53 hemebond is there a difference between state-top2.sls and states-top1.sls?
09:54 hemebond Oh I see the comment now.
09:54 hemebond Can you add your environment configuration from your master?
09:56 jasonhu anyone know well salt+reclass?
09:57 EvaSDK hemebond: do you mean ext_pillar thingy ?
09:57 hemebond The file_roots
10:00 EvaSDK ho, this example is just made up
10:01 EvaSDK just a moment
10:03 EvaSDK hemebond: updated
10:03 EvaSDK bbl, lunch time
10:06 hemebond I'm looking at the top.sls files and I can't see a difference in the actual values. What am I missing?
10:07 hemebond Oh I see.
10:07 hemebond You're trying to apply the postgresql formula from the base environment even though your environments are completely isolated.
10:09 hemebond EvaSDK: This is roughly what my file_roots looks like https://ghostbin.com/paste/vjmv6
10:16 hemebond And I guess the conflicting IDs could be coming from the "include" conflicting with the top.sls or something. It's difficult to tell.
10:20 EvaSDK This is it actually
10:20 evilet joined #salt
10:23 hemebond Is top2 for prod and top1 for dev?
10:23 hemebond Try removing the include and adding the roles:postgres entry to dev in top.sls
10:48 jhauser joined #salt
10:55 _KaszpiR_ joined #salt
11:07 _KaszpiR_ joined #salt
11:19 schasi joined #salt
11:28 stankmack joined #salt
11:33 dendazen joined #salt
11:35 Trauma joined #salt
11:35 EvaSDK re
11:35 EvaSDK hemebond: if I remove the include, I cannot ensure the order in which states are run anymore, right ?
11:39 schasi joined #salt
11:43 CrummyGummy Hi, has anything changed in the 2017.7.2+ds-1 release that would stop minions from receiving pillars?
11:43 CrummyGummy They have OS level stuff, just not the pillars I've defined.
11:43 hemebond EvaSDK: Use require to created dependencies.
11:44 EvaSDK without including ? but salt will complain about not knowing the state ID, no ?
11:44 hemebond Add it to the top.sls
11:44 EvaSDK hum, I'm skeptical it will work but I will try as soon as I fixed my branches
11:45 hemebond So you add an entry to top.sls and then add the require to your state
11:45 hemebond Have you read the page on dependencies?
11:45 EvaSDK I read, multiple times, but not in the last year indeed
11:47 Yoda-BZH joined #salt
11:47 Yoda-BZH joined #salt
11:58 DanyC joined #salt
11:59 CrummyGummy Wow, I'm really stumped here. Any ideas how I can debug why my pillar isn't being picked up and distrubuted?
12:00 CrummyGummy pillar_root is set and the files are there
12:00 CrummyGummy no errors or anything
12:00 hemebond CrummyGummy: pillar.items then check the master log
12:02 CrummyGummy salt 'test123' pillar.items
12:02 CrummyGummy like that?
12:02 hemebond yip
12:04 usernkey1 joined #salt
12:05 CrummyGummy [salt.crypt       ][DEBUG   ][7979] Failed to authenticate message
12:05 CrummyGummy ahhh
12:05 CrummyGummy maybe... I don't see anything else
12:05 hemebond It would be pretty obvious if there was an error.
12:05 colegatron joined #salt
12:06 hemebond You'd see a message at the top of the output and error details in the log.
12:06 CrummyGummy nothing
12:06 hemebond If there's not error then it'll be an issue with your targeting or maybe you need saltutil.refresh_pillar
12:07 CrummyGummy my targeting has a section that is targeting '*'
12:07 CrummyGummy so that should be the bare minimum
12:07 CrummyGummy I've called refresh pillar before
12:07 CrummyGummy lemme try again
12:08 CrummyGummy I've actually broken my pillar to try get an error. Nothing
12:09 hemebond You checked the master log, yeah?
12:10 CrummyGummy yep, it's on trace now.
12:11 hemebond Then paste your pillar top.sls somewhere.
12:11 KyleG joined #salt
12:11 KyleG joined #salt
12:12 hemebond And any other details that might be relevant.
12:12 Nahual joined #salt
12:13 CrummyGummy 1 sec
12:14 dev_tea joined #salt
12:15 CrummyGummy hemebond: https://paste.ee/p/24RkG
12:15 hemebond And where's the problem?
12:15 hemebond Which pillar is not applying?
12:15 CrummyGummy nothing
12:16 hemebond What?
12:16 CrummyGummy test.items shows
12:16 CrummyGummy test123:
12:16 CrummyGummy ----------
12:16 CrummyGummy no errors, nothing
12:16 hemebond You mean pillar.items?
12:16 CrummyGummy yes
12:16 hemebond Does test.ping work?
12:17 CrummyGummy yes, comes back with True
12:17 hemebond And where are your pillar files?
12:18 CrummyGummy /srv/salt/pillar/
12:18 hemebond What is the full path of this top.sls?
12:18 CrummyGummy /srv/salt/pillar/top.sls
12:18 hemebond Okay, then paste the pillar_roots from your salt master config.
12:19 CrummyGummy pillar_roots:
12:19 CrummyGummy base:
12:19 CrummyGummy - /srv/salt/pillar
12:20 hemebond Have you tried restarting the master?
12:20 CrummyGummy yes
12:22 hemebond salt-run pillar.show_pillar 'test123'
12:22 hemebond salt-run pillar.show_top minion=test123
12:24 CrummyGummy does that directory have to exist on the minion?
12:24 hemebond No
12:24 hemebond Pillars are compiled on the master.
12:26 CrummyGummy that didn't show my pillars either.
12:26 CrummyGummy it says napalm is missing. Any relation?
12:26 hemebond Your pillar_roots is not commented out or anything?
12:26 CrummyGummy [TRACE   ] Error loading runners.bgp: The napalm-base module could not be imported
12:26 CrummyGummy [TRACE   ] Error loading runners.drac: The drac runner module cannot be loaded: paramiko package is not installed.
12:26 CrummyGummy [TRACE   ] Error loading runners.nacl: libnacl import error, perhaps missing python libnacl package
12:26 CrummyGummy [TRACE   ] Error loading runners.net: The napalm-base module could not be imported
12:27 CrummyGummy hemebond: no, not commented. I can post the config if it would help.
12:27 hemebond Have a look at the API example on https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.pillar.html#module-salt.runners.pillar
12:28 hemebond Get the opts and then print it out to check the config.
12:28 EvaSDK hemebond: looks like I need to re-read doc on dependencies as your suggestion appears to work
12:28 hemebond EvaSDK: 👍
12:29 CrummyGummy hemebond: I'll look, it seems just like what you told me to do above though. No errors or data or anything
12:30 CrummyGummy hemebond: My master config. https://paste.ee/p/9rzQQ
12:31 hemebond CrummyGummy: Is that what opts prints out as?
12:31 hemebond I want to see what the master sees.
12:32 CrummyGummy no, that was a cleaned up file
12:32 CrummyGummy *config file
12:35 DammitJim joined #salt
12:39 CrummyGummy hemebond: how do I get opts? I can't find it.
12:40 hemebond In the link there is an API example.
12:40 hemebond Do that via a Python console on the master.
12:40 CrummyGummy ah
12:41 CrummyGummy nothing...
12:41 CrummyGummy >>> pillar = runner.cmd('pillar.show_pillar', [])
12:41 CrummyGummy >>> print(pillar)
12:41 CrummyGummy {}
12:41 hemebond You just need the first three lines.
12:41 hemebond Then print(opts)
12:42 CrummyGummy yes, just trying to keep it shors
12:42 CrummyGummy *short
12:42 hemebond print(opts) must return something.
12:42 hemebond Does it show the correct pillar_roots?
12:43 CrummyGummy looking...
12:45 CrummyGummy https://paste.ee/p/RpFre
12:46 CrummyGummy 'pillar_roots': {'base': ['/srv/salt/pillar']}
12:46 CrummyGummy yes
12:48 hemebond In your top.sls put the space in -data
12:48 hemebond "-data" becomes "- data"
12:49 CrummyGummy I added that error to try generate a parse error. It's been fixed in practice for a while now.
12:49 hemebond oh
12:50 hemebond Can you paste the output of 'ls -lha /srv/salt/pillar'
12:51 numkem joined #salt
12:51 CrummyGummy https://paste.ee/p/uRjH1
12:52 hemebond Well if restarting the master doesn't help I'm afraid I'm out of ideas.
12:53 hemebond Unless you try copying/moving them over to /srv/pillar/ to test
12:54 CrummyGummy I'll check. I don't understand why there are no 'file not found' or parse exceptions or anything though. Just a hint.
12:54 hemebond Pillars are pretty much optional.
12:57 EvaSDK hemebond: so I re-read the docs and I'm actually more confused than before. Some exemples show include + requisite but nowhere it is written that you must include a state to be able to require some of its state ids
12:57 hemebond EvaSDK: It has to be included somewhere. We've just moved it out of the state and into top.sls
12:58 hemebond I think what was happening is the state IDs from the base include, was conflicting with the dev include.
12:59 EvaSDK yes
12:59 hemebond Because you have the formula in both environments, but you were applying the base version to both prod and dev.
12:59 EvaSDK I discovered that you can now specify which env to include from
12:59 EvaSDK yep
12:59 hemebond That's what top.sls does.
13:00 schasi joined #salt
13:00 hemebond (yes you can do it with includes too but top.sls is cleaner)
13:00 EvaSDK it's less prone to conflicts
13:00 hemebond yip
13:01 EvaSDK I would say that docs need a hint about this but maybe it's somewhere before when talking about writing top file
13:01 EvaSDK and targetting
13:02 hemebond It's difficult to document because it's more of a personal preference.
13:02 EvaSDK anyway, I'll add this to our enterprise saltstack gotcha wiki page :)
13:02 usernkey joined #salt
13:03 EvaSDK maybe hinting that all state ids are collected from top would be a start
13:03 hemebond Yeap, that's all in the top.sls documentation.
13:03 hemebond Including how environments work.
13:04 hemebond e.g., all top files are merged together.
13:05 EvaSDK btw, I probably forgot to say that I actually did not add role to the env, it is using the one from base happily it seems
13:06 hemebond yip, that's fine.
13:07 EvaSDK it is, just didn't expect it to work this way
13:09 CrummyGummy hemebond: It works!!!
13:09 hemebond ?
13:09 CrummyGummy no idea...
13:11 hemebond Restart?
13:11 CrummyGummy I purged, edited a new config file.
13:11 hemebond Strange
13:11 CrummyGummy Maybe because the file root changed a bit. Maybe it didn't like the overlap
13:11 hemebond Oh did you move them to /srv/pillar?
13:11 CrummyGummy yes, before, it made no difference though. I changed file_roots to
13:11 CrummyGummy file_roots:
13:11 CrummyGummy base:
13:11 CrummyGummy - /srv/salt
13:12 CrummyGummy removed all the other ones with forumulas. Can you plz look at the master config I posted and see if there was anything wrong there?
13:12 hemebond Okay so they're in the default paths now.
13:12 CrummyGummy otherwise, I changed a few auth settings.
13:13 CrummyGummy yes
13:14 hemebond The settings you pasted look fine.
13:15 hemebond I have /srv/salt/pillars and /srv/salt/states
13:15 hemebond So it should work fine.
13:15 CrummyGummy strange, ok, I'm putting stuff back slowly to see what breaks.
13:18 edrocks joined #salt
13:20 CrummyGummy hemebond: state_top: state_top.sls
13:20 CrummyGummy ^ That seems to break it.
13:20 hemebond Oh, I did wonder what that was for. I've never changed it myself.
13:20 hemebond Is there a reason you changed it?
13:20 CrummyGummy all I wanted was to not have to deal with two files called top.sls
13:21 hemebond Oh I see.
13:21 hemebond Well, you're better off keeping states and pillars completely separate.
13:21 CrummyGummy it's just confusing in my IDE
13:21 hemebond It's 2am so time for me to go to bed. Good night.
13:22 CrummyGummy hemebond: Thanks for the help
13:22 hemebond You
13:22 hemebond You're welcome.
13:27 hemebond left #salt
13:38 KyleG joined #salt
13:38 KyleG joined #salt
13:38 mchlumsky joined #salt
14:01 usernkey1 joined #salt
14:01 dendazen joined #salt
14:08 AdamSewell joined #salt
14:10 AdamSewe_ joined #salt
14:11 ivo_ joined #salt
14:13 AdamSewell joined #salt
14:14 AdamSewell Is there a way to target 64 bit or 32 bit architectures in state files?
14:16 AdamSewell nvm, i found my answer
14:26 Aikar AdamSewell: you still have 32bit systems o.o?
14:27 AdamSewell @Aikar, unfortunately :( they are workstations though.
14:29 Aikar AdamSewell: salt on a workstation O.o? and why so old lol. seems like that would be easier to upgrade, just replace it
14:29 cyborg-one joined #salt
14:30 EvaSDK could be non x86 :D
14:36 humanfriend_ joined #salt
14:41 humanfriend_ Hi everyone!  Saw there was an IRC for salt and wanted to come check it out.  I'm picking up the tool and working on some automations.  How y'all doin
14:42 tom[] simply tremendous, humanfriend_. simply tremendous
14:42 tom[] how about you?
14:43 humanfriend_ Very well thanks!
14:44 humanfriend_ Realling enjoying salt.  last project was a puppet ENC and I have to say I'm liking salt a bit more from a developer standpoint.
14:46 Brew joined #salt
14:47 tom[] splendid!
14:48 tom[] now if i could just figure out how to lxc-copy a thin LV backed container to another host
14:54 humanfriend_ Would ```lxc-copy | scp root@10.16.172.130:/tmp``` not work? haha
14:55 cgiroua joined #salt
15:04 tom[] by george, i think he's got it!
15:06 humanfriend_ :D
15:06 lordcirth_work Is there a schedule for when the next major release might come out?  Just curious
15:10 _val_ joined #salt
15:10 beardedeagle joined #salt
15:11 _val_ Hey everyone. Quite new to salt. I'm running 1 master with 2 minions. I've setup a vagrant test environment.. worked perfectly until I did a  salt-key --delete-all
15:11 _val_ How can I make the minions send the key to the master?
15:11 humanfriend_ @_val_ try running `salt-minion` on the minions
15:11 humanfriend_ Its worked for me in the past
15:12 humanfriend_ They re request their certs when you do this, I believe.
15:12 _val_ [root@minion1 vagrant]# salt-minion
15:12 _val_ The Salt Minion is shutdown.
15:12 babilen _val_: You might also want to take a look at "ls -lah /etc/salt/pki/master/*"
15:12 babilen (on the master)
15:13 humanfriend_ @_val_ try `salt-minion start`
15:13 babilen But restarting the minion service should™ suffice
15:13 humanfriend_ or `service salt-minion restart` on ubuntu at least
15:13 babilen "systemctl restart salt-minion.service"
15:14 babilen (for SystemD)
15:14 _val_ doesn't help
15:14 _val_ babilen: It lists only the master{pem,pub}
15:14 _val_ [root@minion1 vagrant]# systemctl restart salt-minion.service
15:14 _val_ [root@minion1 vagrant]#
15:15 humanfriend_ Can u do `salt-key --list-all`. To see if there are any cert requests?
15:15 humanfriend_ hmm
15:15 _val_ humanfriend_: nothing there
15:15 humanfriend_ On the minions, what is in '/var/log/salt/minion/?
15:16 humanfriend_ if yr not using a DNS sometimes the IPs slip away from u and u gotta check that they're right again
15:16 humanfriend_ I havent used the vagrant version yet tho.  I'm using VMware boxes
15:16 _val_ 2017-10-17 15:15:36,694 [salt.minion      ][ERROR   ][13014] Error while bringing up minion for multi-master. Is master at 192.168.50.10 responding?
15:16 humanfriend_ Ya
15:16 humanfriend_ So check the IP yr running the master on
15:16 humanfriend_ ifconfig
15:17 humanfriend_ Eth0 inet addr
15:17 whytewolf also check your master setting in you minion config
15:17 _val_ humanfriend_: initially it was perfectly set up :>  and I did --delete-all.. which I shouldn't but since this is a test environment I don't much care though
15:17 humanfriend_ _val_ righto.  Yeah I can't say why that messed up the IPs
15:17 _val_ I did a reboot on minions
15:17 _val_ let's see if that does anything
15:19 _val_ Nope: https://groups.google.com/forum/#!topic/salt-users/86RZ5e3fgXE
15:19 _val_ guess hitting same thing
15:20 _val_ 2017-10-17 15:19:50,704 [salt.minion      ][ERROR   ][1172] Error while bringing up minion for multi-master. Is master at 192.168.50.10 responding?
15:20 _val_ 2017-10-17 15:19:58,191 [salt.utils.parsers][WARNING ][1172] Minion received a SIGTERM. Exiting.
15:20 colegatron joined #salt
15:20 humanfriend_ _val_ is your master's IP correct?
15:21 humanfriend_ Did u check `ifconfig`?
15:21 sarcasticadmin joined #salt
15:21 humanfriend_ That prob has happened to me.  Dynamic IPs I guess
15:21 _val_ humanfriend_: on master `ip addr l` 192.168.121.193/24
15:21 humanfriend_ Looks like thats your problem
15:22 humanfriend_ "Is master at 192.168.50.10 responding?"
15:22 _val_ damn
15:22 _val_ no
15:22 humanfriend_ :D
15:22 _val_ But I didn't change the IP. :)
15:22 _val_ OK so I need to tell minions that master's IP has changed.
15:22 humanfriend_ Change "master" in /etc/salt/minion
15:22 humanfriend_ Ya
15:22 humanfriend_ I am not a network guru or anything but I'm tempted to chalk it up to "dynamic IPs" and call it a dauy
15:22 lordcirth_work This is what DNS is for, by the way
15:22 humanfriend_ I've had to do this a few times.
15:23 lordcirth_work Best to give your master a static IP
15:23 humanfriend_ Lol lordcirth_work yup
15:23 _val_ Ok so what directive is that?
15:23 _val_ ah never mind
15:23 _val_ it's on the minion
15:23 phileus0 joined #salt
15:24 _val_ 2017-10-17 15:24:13,627 [salt.crypt       ][ERROR   ][2624] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate
15:24 fatal_exception joined #salt
15:25 lordcirth_work _val_, that's a good sign, you just need to accept the key on the master now
15:25 _val_ [root@saltmaster vagrant]# salt-key --accept-all
15:25 _val_ The following keys are going to be accepted:
15:25 _val_ Unaccepted Keys:
15:25 _val_ minion1
15:25 _val_ aah up and running now
15:25 nixjdm joined #salt
15:25 _val_ Thanks!. Just do the same trick for minion2
15:26 _val_ Thanks guys! Didn't know IP address changed. Didn't even know where salt had it's log files.
15:26 _val_ I'll stay away from anything that has 'delete' in it ^
15:27 lordcirth_work _val_, deleting keys isn't a huge problem, you just restart the minions and accept them all again
15:27 lordcirth_work Assuming you have a good method of mass-restarting without salt... lol
15:27 _val_ btw. How is it possible I could change /etc/salt/minion as a normal user?
15:27 _val_ @_@
15:27 lordcirth_work I recommend setting up pdsh if you have many minions
15:28 lordcirth_work _val_, you could, or you want to be able to?
15:28 _val_ lordcirth_work: no I was able to modify /etc/salt/minion without root privileges
15:28 _val_ weird no?
15:28 _val_ ah never mind
15:28 _val_ [root@minion2 ~]# ls -lZ /etc/salt/minion
15:28 _val_ -rw-rw-r--. vagrant vagrant unconfined_u:object_r:user_tmp_t:s0 /etc/salt/minion
15:29 tom[] can i use the file state module to ensure file attributes (like chattr +i) ?
15:29 lordcirth_work _val_, then you must have changed the permissions at some point, they are 644 by default
15:29 _val_ probably I've access to it. Didn't know I had access to /etc/ as vagrant user.
15:29 lordcirth_work Ah, vagrant, I see
15:29 _val_ lordcirth_work: cool. Going to mess with it and brake stuff
15:29 _val_ Thanks chaps!
15:29 tom[] file.managed: -attrs: i didn't do anything (File exists with proper permissions. No changes made.)
15:30 phileus0 joined #salt
15:40 _JZ_ joined #salt
15:41 humanfriend_ joined #salt
15:50 ouemt joined #salt
16:11 aldevar left #salt
16:25 Sarphram joined #salt
16:26 typecampo joined #salt
16:29 mpanetta joined #salt
16:30 edrocks joined #salt
16:32 pbandark I have configured reactor to install one state only on the servers with names "test1*"({% if id.startswith('test1') %}).    From logs and events, I can see the state is correctly chosen to deploy on "test1-12345" minion. but, somehow its not getting executed.  can anyone help me to findout the cause?
16:32 pbandark https://paste.fedoraproject.org/paste/Y8x5ItIF--cJSTW0QwXR5Q
16:37 humanfriend_ joined #salt
16:41 nixjdm joined #salt
16:42 phileus0 joined #salt
16:44 swills joined #salt
16:45 swills_ joined #salt
16:47 stanchan joined #salt
16:48 Lionel_Debroux joined #salt
16:51 DanyC joined #salt
16:52 DanyC_ joined #salt
16:54 pbandark anyone  ^^^
17:08 Oida joined #salt
17:11 onlyanegg joined #salt
17:12 impi joined #salt
17:15 astronouth7303 Ok, so Prometheus uses a "service" to get a list of agents to pull from. Anyone used salt in some capacity to produce that list?
17:20 cyborg-one joined #salt
17:28 aldevar joined #salt
17:39 phileus0 whytewolf: You sent this before to me: https://docs.saltstack.com/en/latest/ref/clients/index.html#salt.client.LocalClient.cmd_async.
17:39 phileus0 whytewolf: I was able to get local_async to work, but I can't figure out how to get cmd_batch to work
17:39 phileus0 whytewolf: Any suggestions?
17:39 phileus0 anyone..bueller?
17:40 phileus0 Here's my gist code: https://gist.github.com/anonymous/57c96147080bc72d6ee4c9221063bbe9
17:41 nixjdm joined #salt
17:44 humanfriend_ Hey I got a quick question about pillars
17:44 humanfriend_ So I want to store a list of values in the pillar. The list can be empty or arbitrarily large.
17:45 humanfriend_ Currently it looks like this:
17:45 humanfriend_ tags:
17:45 humanfriend_ saltmaster,salt
17:45 humanfriend_ If I change it to:
17:45 humanfriend_ Tags:
17:45 humanfriend_ - saltmaster
17:45 humanfriend_ - salt
17:46 jmedinar joined #salt
17:46 toastedpenguin joined #salt
17:46 humanfriend_ Would I be able to use that pillar field to target like "salt -C 'I@tags:salt  and I@tags:saltmaster' test.ping"
17:47 skre joined #salt
17:47 humanfriend_ With the current format of the list, I could technically do "salt -I 'tags:*salt*' but using globs like this seems weird to me...
17:49 jmedinar How can I retrieve the value of a pillar in a module?
17:49 toastedpenguin joined #salt
17:49 humanfriend_ @jmedinar not sure but in an external_pillar module you can access the grains values using the __grains__['grain name'] format
17:49 jmedinar I tried the following:     if pillar.get('cloudant:monitor'):
17:52 jmedinar if __pillar__['cloudant:monitor']: is not working either...
17:53 jmedinar I get the following error:     'cloudant' __virtual__ returned False: Exception raised when processing __virtual__ function for cloudant. Module will not be loaded 'cloudant:monitor'
17:55 iggy jmedinar: it would be __pillar__['..']()
17:56 Oida joined #salt
17:57 iggy pbandark: what if you fire the event manually?
17:57 skre joined #salt
18:01 _KaszpiR_ joined #salt
18:04 Nahual Is there a way to get line information off of a fail pillar module load? All I am getting back is an error with very little information as to where that error is located within the module itself. -l all is not helpful in determining the location.
18:14 major joined #salt
18:14 Nahual Easy one, looks like the exception is still printed to the log and not to the console...
18:15 jmedinar This seems to be the correct answer...     if __pillar__['cloudant']['monitor']:
18:16 jmedinar still need to check is doing what is suppose to...
18:16 jmedinar at least is not sending an error now on the __virtual__
18:18 tiwula joined #salt
18:24 DammitJim joined #salt
18:28 aldevar joined #salt
18:32 ChubYann joined #salt
18:37 humanfriend_ joined #salt
18:41 nixjdm joined #salt
18:44 inad922 joined #salt
18:49 likered joined #salt
18:50 likered hi all
18:51 tr1bun joined #salt
18:51 likered i'm running into an issue where I try to run a salt-script on one of my instances, and I am getting a "AttributeError: 'bool' object has no attribute 'get'" error
18:52 brianthelion joined #salt
18:53 edrocks joined #salt
18:56 max_ joined #salt
18:57 iggy jmedinar: oh, right, you could also do `__salt__['pillar.get']('foo:bar')`
18:59 DammitJim joined #salt
18:59 tr1bun joined #salt
19:00 tr1bun left #salt
19:01 tr1bun joined #salt
19:03 tr1bun joined #salt
19:03 jmedinar ah nice thanks! @iggy
19:04 likered i just recently updated all my python packages on the server and now i ran into this issue with salt
19:04 aldevar joined #salt
19:04 iggy likered: restart minions after the updates
19:04 iggy ?
19:05 DammitJim joined #salt
19:05 likered ah, i have not. let me do that now
19:05 likered no dice
19:06 iggy my next stop would be the salt issue tracker on github
19:06 tr1bun left #salt
19:06 tr1bun joined #salt
19:07 likered gotcha
19:07 theblazehen joined #salt
19:08 evilet joined #salt
19:08 Twiglet joined #salt
19:08 BlackSponge joined #salt
19:10 marwel joined #salt
19:13 tr1bun left #salt
19:14 tr1bun joined #salt
19:23 laertus joined #salt
19:30 pbandark hi iggy.. sorry for late reply. i havent tested by manually sending the event.
19:32 pbandark iggy: the strange thing is "configure_name_resolution" is getting executed without any issue. i even tried by removing "if" condition. but issue persist only for "configure_natting"
19:32 Hybrid joined #salt
19:41 nixjdm joined #salt
19:41 swa_work joined #salt
19:43 tr1bun left #salt
19:43 tr1bun joined #salt
19:44 tr1bun hi
19:51 Hybrid joined #salt
20:03 tr1bun I am looking for a documentation for distributing Windows client software (firefox, chrome, etc.). I work with the repo-ng and it worked great. Now I wanted work with "states" and a bit more complex configurations ... an now I get stucked by connect the xx.sls files from the repo-ng with some new states...
20:04 csmule_ joined #salt
20:10 schasi joined #salt
20:11 ahrs joined #salt
20:14 mpanetta joined #salt
20:27 DammitJim joined #salt
20:31 Splix76 joined #salt
20:32 Splix76 Thanks again whytewolf , I re-confirmed today the broken out states using the salt.match.compoint if jinja checks work and the state.apply now works in one fell swoop for a 'base' vm.
20:32 Splix76 due to jinja pre-compiling this never would have worked in my top.sls
20:33 dayid joined #salt
20:41 nixjdm joined #salt
20:44 jmedinar joined #salt
21:01 astronouth7303 execution modules can be in `_modules`, and runner modules can be in `_runners`, right?
21:01 astronouth7303 what do i need to do to get runner modules (re)loaded?
21:07 jmedinar joined #salt
21:08 schasi joined #salt
21:11 Splix76 astronouth7303, you can sync them to minions via 'saltutil.sync_all' if that is what you mean by re-laoded.
21:12 Splix76 salt 'host' saltutil.sync_all
21:12 jmedinar joined #salt
21:12 astronouth7303 Splix76, runner modules run on the master
21:18 Trauma joined #salt
21:20 Splix76 the only item I see in the docs that might do it is to clear the salt.runners.cache.
21:20 Splix76 'salt-run cache.clear_all' on the master is the syntax for it, however I cannot verify that it'll reload the runners as you're after.
21:22 humanfriend_ joined #salt
21:22 whytewolf astronouth7303: salt-run saltutil.sync_runners
21:25 * astronouth7303 checks source
21:25 astronouth7303 yes, sync_all runs sync_runners
21:26 whytewolf yes
21:27 astronouth7303 i was just working on copying my poor-man's service discovery module from an execution module to a runner module
21:28 astronouth7303 (basically, it takes a minion query and returns the minion's IP from the mine. works well enough for bootstrapping a devops environment.)
21:35 pbandark joined #salt
21:38 tiwula joined #salt
21:39 tiwula joined #salt
21:41 tiwula joined #salt
21:52 cgiroua joined #salt
21:52 cyteen joined #salt
22:08 astronouth7303 wait, _tokens is a thing that exists?
22:08 astronouth7303 seriously, why isn't there an index of these special directories?
22:10 whytewolf there is. but i don't think it covers server ones.
22:10 whytewolf https://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
22:13 astronouth7303 yeah, it doesn't, and it doesn't link to further information about what they do
22:15 astronouth7303 (because it's really, really easy to loose track of features and aspects of salt)
22:16 astronouth7303 oh, and 2017.7 added a ton of special directories
22:18 astronouth7303 in general: salt docs are pretty good for getting started, but many of the module docs leave questions unanswered and you quickly fall off the docs and end up looking things up
22:18 astronouth7303 in the source
22:19 astronouth7303 that reminds me, i need to attempt to upgrade to 2017.7 again
22:23 skeezix-hf joined #salt
22:26 ecdhe joined #salt
22:29 pbandark I have configured reactor to install one state only on the servers with names "test1*"({% if id.startswith('test1') %}). . but, somehow its not getting executed.  can anyone help me to findout the cause? https://paste.fedoraproject.org/paste/AfiTJAsdXSPysiADvGEkBg
22:29 humanfriend_ joined #salt
22:32 pbandark iggy:  i have updated the state file but sill i am getting the same behaviour
22:35 iggy pbandark: can you run the state via state.sls ? (i.e. outside the reactor)
22:35 iggy pbandark: also, your indentation on the restart_network stanza looks off
22:36 pbandark iggy: let me check
22:41 pbandark iggy: corrected the restart_network and ran via state.sls. but same bheaviour. https://paste.fedoraproject.org/paste/Xjj3NxPOa9-GuFf34gPyEA
22:41 pbandark only two states are getting executed. no if* block
22:43 pbandark did i make any mistake in storing/passing pillar data ? https://paste.fedoraproject.org/paste/AfiTJAsdXSPysiADvGEkBg
22:49 pbandark iggy: small correction. with state.sls i am able to deploy without any issue. so it seems to be something wrong in the way i am saving/passing pillar data("new_minion")
23:15 hemebond joined #salt
23:15 dendazen joined #salt
23:23 humanfriend_ joined #salt
23:28 hammer065 joined #salt
23:52 cyteen joined #salt
23:54 bigjazzsound joined #salt

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