Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-30

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

All times shown according to UTC.

Time Nick Message
00:00 lionel joined #salt
00:01 alexlist joined #salt
00:01 dxiri joined #salt
00:01 deuscapturus Greetings.  I would like to get https://github.com/saltstack/salt/pull/41067 merged into a release.  What is the process for this.  We are anxious to get this fix.
00:04 dstensnes doesn't this:
00:04 dstensnes "cachedout merged commit 60f9e0c into saltstack:develop on May 4"
00:04 dstensnes mean it has been merged already?
00:05 dstensnes deuscapturus: and that it should be in the next release?
00:05 dstensnes or am i reading it wrong?
00:05 jeddi joined #salt
00:05 twooster joined #salt
00:06 deuscapturus it's not in the release branches for the next 2 releases.
00:10 mvensky joined #salt
00:18 Trauma joined #salt
00:19 f3rno joined #salt
00:27 astronouth7303 That seems a bit slow, given the release rate.
00:28 astronouth7303 (not that I know anything about the release process, just that I think 2 releases is on the order of a year)
00:29 dxiri joined #salt
00:39 cyteen joined #salt
00:52 nixjdm joined #salt
00:55 mvensky joined #salt
00:58 woodtablet left #salt
00:59 dxiri joined #salt
01:07 whytewolf astronouth7303: magor releases are twice a year. patch fixes are released about every month or more
01:07 astronouth7303 Kk
01:08 whytewolf however since this was built against develop and not a current version it will be in the next major release. maybe
01:09 whytewolf if he wanted it current should have built against either 2016.3 or 2016.11
01:12 aneeshusa joined #salt
01:14 masber joined #salt
01:25 dxiri joined #salt
01:30 jeddi joined #salt
01:32 sp0097 joined #salt
01:34 dxiri joined #salt
01:42 dxiri_ joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.6 <+> 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 <+> The call for speakers for SaltConf17 is now open: http://tinyurl.com/SaltConf17
01:52 jimklo_ joined #salt
01:56 dxiri joined #salt
01:57 k_sze[work] joined #salt
02:09 justan0theruser joined #salt
02:11 justan0theruser joined #salt
02:17 dxiri joined #salt
02:22 cgiroua joined #salt
02:35 zerocoolback joined #salt
02:37 dxiri joined #salt
02:45 dxiri joined #salt
03:08 Guest73 joined #salt
03:16 Udkkna joined #salt
03:17 donmichelangelo joined #salt
03:24 gnomethrower joined #salt
03:44 Guest73 joined #salt
03:44 Micromus joined #salt
03:54 jb_ joined #salt
04:01 aleph- joined #salt
04:03 aleph- So, trying to set up salstack, and I'm getting a authentication error between my master and minion servers. I'll accept my minion's key in my master server, but it'll simply fire back that the salt master's public key didn't authenticate. I've tried removing the public key and restarting the minion already.
04:13 chrysanthemum joined #salt
04:15 tobstone joined #salt
04:18 hemebond aleph-: Are they running the same version of Salt?
04:24 aleph- hemebond: Master is 11.5, minion is 11.2
04:26 gnomethrower joined #salt
04:27 Praematura joined #salt
04:28 whytewolf update minion to 11.5 and see if it continues
04:28 whytewolf or update both to 11.6
04:28 whytewolf but it is possable you are hitting a bug dealing with the crypto libs used by salt
04:29 aleph- Might be. One sec.
04:31 ssplatt joined #salt
04:41 aleph- whytewolf: Aye, updating fixed it. Thanks.
04:54 f3rno joined #salt
04:59 f3rno joined #salt
05:08 jeddi joined #salt
05:08 armyriad joined #salt
05:09 Praematura_ joined #salt
05:09 preludedrew joined #salt
05:19 mikea joined #salt
05:32 justanotheruser joined #salt
05:34 felskrone joined #salt
05:40 zerocoolback joined #salt
05:40 zerocoolback joined #salt
06:00 jhauser joined #salt
06:05 impi joined #salt
06:21 daemonkeeper joined #salt
06:23 marcinkuzminski joined #salt
06:37 lobo__ joined #salt
07:03 fracklen joined #salt
07:05 LeProvokateur joined #salt
07:11 aldevar joined #salt
07:14 saintpablo joined #salt
07:17 saintpablos joined #salt
07:25 evle1 joined #salt
07:31 ronnix joined #salt
07:43 Rumbles joined #salt
07:50 ronnix joined #salt
07:51 max42 I am using mysql as ext_pillar with as_list: True. However if the result contains only one result, the result is no list: https://pbot.rmdir.de/TUBqQ_P7dHbWvPmZ_gEvlw Am I missing something?
08:02 JohnnyRun joined #salt
08:03 Ricardo1000 joined #salt
08:05 darioleidi joined #salt
08:08 mikecmpbll joined #salt
08:11 pbandark joined #salt
08:18 LeProvokateur joined #salt
08:21 jeddi joined #salt
08:23 impi joined #salt
08:24 saintpablo joined #salt
08:33 justan0theruser joined #salt
08:37 JohnnyRun joined #salt
08:45 arount joined #salt
08:47 justanotheruser joined #salt
08:48 CrummyGummy joined #salt
08:52 arount Hi there, I'm wondering how multiple environments with inheritance order execution is computed ? I would like my envs like base match '*', sys match 'sys.*', dev match 'dev.*' (so everybody belongs to base and some belongs to another env too) but salt is not always executing 'base' env at first, some time it start to execute 'dev' or 'sys' before 'base' ..
08:53 arount Is there a way to force env order? And how is this currently computed ?
09:07 hemebond arount: Are you using actual environments or just subdirectories?
09:08 arount hemebond: hm, not sure, I have several file_roots (the envs, like <source>/<envname>/) and each one expose a top.sls like '<env>: "<env-prefix>.*"'
09:08 arount according to doc this is environments
09:08 arount but the doc usually conflict with real life ..
09:09 hemebond Cool. And "base" is adjacent to the other environment directories?
09:09 arount i will make you a gist
09:09 hemebond There is no "inheritance" in environments.
09:10 hemebond The states from the environments get applied.
09:10 hemebond However you can configure fallbacks so that if a state or file is not under one directory, Salt will search the next in the list.
09:11 arount Finally after reading again doc I figured I'm struggling with merge strategy
09:11 arount it does not seems to render same order each time ..
09:12 hemebond From each environment? No. The order states are applied depends on their order within the SLS file and the dependencies between the states.
09:12 hemebond I think merge strategy might be a bit different to what you're encountering.
09:12 arount https://gist.github.com/arount/30d6007a514dcc82aa7e6e8a15b2e839
09:13 arount ho
09:13 hemebond So that looks fine.
09:14 hemebond You'll end up with the states base:thing and dev:thing3 applied to any dev.* minions
09:14 arount sorry, my english is not that good, can you confirm: Salt do not expect I choose what env states will be executed first, but will try to find itself which is the best order for **states** (and not states within envs) ?
09:14 hemebond base:thing and sys:thing2 applied to any sys.* minions.
09:15 hemebond Correct. All states are collected into one biiiiig list and then the order and dependencies are figured out.
09:15 coredumb That's exactly what I don't like about envs
09:16 arount ok, but admetting sys/top.sls call 'foo.sls', which require something done in 'base/bar.sls', some times salt failed saying something gone wrong, because base/bar.sls wasn't run before sys/foo.sls
09:16 losh joined #salt
09:16 arount i can not do anything about that ?
09:16 hemebond arount: Then you need to specify that the states in foo.sls depends on the other state.
09:16 arount ho
09:16 arount dang
09:17 arount i've about 200 states to force depends to other states so
09:17 mesrouilles joined #salt
09:18 Praematura joined #salt
09:19 arount well, before I loose my day digging in salt's code, did you think if I succeed to make a PR allowing user to configure salt to follow order described in files (without trying to resolve conflict alone, but trust the guy who configure the master) it could be appreciate ?
09:20 sjorge joined #salt
09:22 arount and so what's merge strategy, can't figure out that :/
09:56 Naresh joined #salt
10:00 v12aml joined #salt
10:20 lorengordon anyone running salt on rhel7 (or centos7, or other derivatives)?
10:21 lorengordon seeing some odd behavior with `pkg.list_repo_pkgs`, wondering if it's just me :D
10:23 zulutango joined #salt
10:23 lorengordon i need to test more, but it appears to be selecting a single repo to query, which of course really lowers the odds of finding the pkgs i'm searching for
10:42 saintpablo joined #salt
10:45 ssplatt joined #salt
11:05 hojgaard joined #salt
11:19 gmoro joined #salt
11:32 evle joined #salt
11:36 Ricardo1000 joined #salt
11:43 Kelsar joined #salt
11:51 Ricardo1000 joined #salt
11:51 coredumb lorengordon: seems that it works fine here
11:51 coredumb centos 7.3
11:52 lorengordon yeah, i figured it out
11:52 lorengordon change "enabled=1" to "enabled = 1", see if salt still lists pks from that repo...
11:52 lorengordon s/pks/pkgs/
11:54 coredumb lorengordon: salt manages my repos so enabled flag is set correctly :)
11:54 lorengordon well, "enabled = 1" is valid
11:54 hellonewsalt joined #salt
11:54 noobiedubie joined #salt
11:55 coredumb :D
11:56 lorengordon i know, i know. we did it to ourselves. :(
11:57 coredumb but you're right seems like the pkg module is doing some parsing itself that it shouldn't
11:57 lorengordon pkg.list_repo_pkgs is calling pkg.list_repos
11:58 lorengordon if you run that yourself and look very closely at the output, if you have "enabled = 1" in a repo you'll notice the extra space "1" != " 1"
11:59 coredumb yeah parsing done right
11:59 pbandark I want to check, in dictionary  "value" is assigned or not using jinja template. How I can achive it? I tried with `{% if salt['pillar.get'](minion_id) != '' %}`  but its not working.
12:01 hellonewsalt Hi all, i've got a (probably beginner's) problem. On my master i get warnings / errors that the salt.minion cannot find my hostname (Master hostname:    not found). I have defined the salt master as an ip address on all my minions and they all can connect to the master, and the master to them. Does anybody know what i'm doing wrong?
12:02 coredumb lorengordon: /usr/lib/python2.7/site-packages/salt/modules/yumpkg.py line 2516
12:02 lorengordon coredumb: yep, thanks, looking at the source in github :)
12:02 coredumb this indeed doesn't remove any space that could be on the right side of the "="
12:02 coredumb here's the error
12:03 lorengordon https://github.com/saltstack/salt/blob/2016.11/salt/modules/yumpkg.py#L2539-L2540
12:04 coredumb a simple .strip() would fix this
12:04 coredumb repos[repo][comps[0].strip()] = '='.join(comps[1:].strip())
12:07 lorengordon i was placing the strip() outside the join()
12:08 coredumb would be nice if you send a PR for that :)
12:08 lorengordon yeah, inside the join(), it's still a list
12:08 fracklen joined #salt
12:08 arount I'm really not in yum, but is the `filename` parameter expected by `salt.modules.yumpkg` (https://github.com/saltstack/salt/blob/2016.11/salt/modules/yumpkg.py#L2509) is a simple ini file ? (like this one: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Configuring_Yum_and_Yum_Repositories.html#idp29756608)
12:08 lorengordon oh yeah, pr will be inbound
12:09 arount because if it's the case using ConfigParser will be wayyyyyyy more efficiant than re-creating the exacte same behaviour with more bugs ..
12:09 coredumb arount: clearly but will require more change
12:09 coredumb :D
12:10 arount coredumb: ok, challenge accepted :)
12:10 arount (not to be harsh, but salt really needs these kind of fix, this is typically what which make salt really puzzling)
12:11 coredumb oh you're not harsh, just pointing at the truth
12:11 coredumb ^^
12:11 arount great :) don't want to be just negativ :)
12:11 arount you are from the core team nah ? i remember you on a PR (i think..)
12:13 bigjazzsound joined #salt
12:14 coredumb arount: not at all
12:14 coredumb just an ocasional contributor
12:14 coredumb still it feels very good that you remember me from somewhere :D
12:16 arount coredumb: well after check it's not .. well, let's say the week was too hard for my little brain
12:17 coredumb what is not?
12:18 arount it's not from a pr i remember you .. at least not one of my prs, maybe i stalked one of yours :)
12:19 coredumb ahah
12:21 hellonewsalt I solved the issue, syndic was running which i was only using one master (pretty obvious now that it's fixed..)
12:21 hellonewsalt Syndic isn't needed when you only have one master, right?
12:24 coredumb hellonewsalt: no not needed
12:24 arount hellonewsalt: nop
12:25 hellonewsalt codedump, arount: thanks!
12:27 thinkt4nk joined #salt
12:29 arount well now i make a function that done exactly same thing as `salt.modules.yumpkg._parse_repo_file` I know have to understand why it return a dict within a tuple with first element an empty string .. haaa, salt.
12:30 arount coredumb: btw, what was the issue with that (so i can at least explain if i'm solving something in pr or just cleaning stuff)
12:31 coredumb arount: as lorengordon pointed out if you use "enable = 1" instead of "enable=1" the repo is not detected as enabled and thus not considered in pkg.list_repo_pkgs
12:31 arount ho god
12:32 arount well, thx
12:32 coredumb possibly somewhere else as well
12:32 arount _possibly_ :)
12:32 coredumb hence the simple .strip() fix ;)
12:32 coredumb but yeah indeed ConfigParser would be 1000x cleaner
12:32 arount yes, but the real issue here is instead of just using a lib that fit RFC salt make is own hacky stuff, we don't know if stripping will not create a new bug
12:33 lorengordon arount: i created an issue, https://github.com/saltstack/salt/issues/42041
12:33 arount but we can be sure using rfc complient stuff will fix for real
12:33 arount thx lorengordon
12:33 lorengordon submitting the naive patch in a min...
12:34 arount lorengordon: hey hey it's great, no worries, I just start be feel bad each time i open a salt file, so i want to clean that kind of stuff i ran to
12:34 lorengordon oh yeah, please go for it :)
12:34 lorengordon i figure using ConfigParser will need to go in develop though, and i need the naive patch for 2016.11
12:35 coredumb yep yep
12:35 ronnix joined #salt
12:40 thinkt4nk joined #salt
12:43 thinkt4nk joined #salt
12:47 Valfor Hey all, I know with the standard cmd.run from the command line, you can pass stdin - how does one do this from the job scheduler? i.e. if I do salt '*' schedule.add job function='cmd.run'
12:48 Valfor I can see job_args becomes the normal cmd.run 'script.sh'; but just not sure what stdin would be labelled in that schedule.add command :) cheers
12:59 ssplatt joined #salt
13:01 arount lorengordon: did you have a ready to test scenario to check my pr ?
13:01 arount lorengordon: if yes, before pr is submitted, here is the fix: https://github.com/arount/salt/tree/fix/yumpkg/config-parser
13:01 thinkt4nk joined #salt
13:02 lorengordon i can build salt from a branch pretty easily, yes
13:02 arount here* https://github.com/arount/salt/commit/69b247d50c12dd8c1cc9a327999dd886303e0f72
13:02 arount lorengordon: well, I shouldn't ask you that and do it myself, but if you can validate that fix your issue, I would be glade
13:05 lorengordon no worries, i do it pretty regularly, and i have time today
13:06 arount thx, yesterday i was laughting at https://meta.stackoverflow.com/questions/351203/why-do-so-many-good-programmers-waste-their-time-on-stack-overflow, i feel same with salt right now ^^
13:13 fracklen joined #salt
13:15 lorengordon arount: traceback, NameError: global name 'configparser' is not defined
13:15 arount lorengordon: strange, i check that, ty
13:16 arount ho, yes
13:16 lorengordon https://gist.github.com/lorengordon/f5bb5d15ff8e23c8809b74a9b17e0c29
13:17 lorengordon so you can easily setup your own test env :)
13:17 Brew joined #salt
13:17 arount lorengordon: \o/
13:18 ecdhe joined #salt
13:23 deuscapturus joined #salt
13:23 monjwf_ joined #salt
13:24 ccha2 is it possible to have a progress running states? the output is only when salt is done
13:24 cgiroua joined #salt
13:27 OliverUK1 joined #salt
13:28 JohnnyRun joined #salt
13:31 cyborg-one joined #salt
13:31 lorengordon oi, there are _two_ parsers in yumpkg? _get_yum_config and _parse_repo_file?
13:31 OliverUK1 I've just installed Salt and I'm sure I've configured it correctly but I'm getting 'No Top file or master_tops data matches found.' against the only minion I have when I try and do 'state.apply'.  Any tips?
13:31 arount lorengordon: ho no, there is still one ?
13:31 arount to be honest, in +2K lines file, i just read what i need to read
13:32 arount and grumble on every other lines by defautl
13:32 lorengordon was checking why configparser wasn't available, it's gated in a try/except block
13:33 lorengordon _get_yum_config uses the python yum library *or* configparser, depending on what's available
13:33 arount well, let met check
13:33 coredumb arount: yeah some of those modules are way too big ...
13:33 Praematura joined #salt
13:34 lorengordon oh, it may only be extracting the yum.conf config, not all the repo configs
13:36 lorengordon arount: if i un-gate the configparser import, your patch works
13:37 hellonewsalt OliverUK1: where does your top.sls reside? in what folder? Do you have the default location setting in the master config file? or a custom one?
13:38 arount lorengordon: https://github.com/saltstack/salt/pull/42045 like here ?
13:38 OliverUK1 hellonewsalt: It is /srv/salt/top.sls
13:38 OliverUK1 hellonewsalt: I have left the default of /srv/salt for the base
13:39 lorengordon arount: yep, though the tests will probably throw a lint error on the location of the import...make it line 32, i think
13:39 OliverUK1 Thing is I am comparing the configuration to another Salt installation that does work and I cannot see any difference
13:39 hellonewsalt OliverUK1: Have you uncommented the file_roots section under file server settings in the master config?
13:39 arount lorengordon: (sry i spam all your contribution with my pr, but I like to easily track what going on)
13:40 lorengordon haha, not a problem
13:40 arount great :)
13:41 OliverUK1 hellonewsalt: Yes
13:42 hellonewsalt Then i'm out of ideas :(
13:42 OliverUK1 hellonewsalt: Haha, me too :-)
13:43 hellonewsalt How do you target your minion? have you tried using the command with salt '*  ?
13:45 OliverUK1 hellonewsalt: I've got it, I missed a ':' in the top.sls file
13:45 OliverUK1 hellonewsalt: That's frustrating haha
13:46 sarcasticadmin joined #salt
13:46 hellonewsalt OliverUK1: Well it's great that you've fixed it haha
13:48 OliverUK1 hellonewsalt: Yeah, thanks for your help though
13:48 ssplatt anyoen around to approve https://github.com/saltstack/kitchen-salt/pull/116 please?
13:51 racooper joined #salt
13:53 mntnman joined #salt
13:56 juke can i run a task at a specific time ?
13:58 arount lorengordon: thx for comment :)
13:59 deuscapturus joined #salt
14:04 flowstategames joined #salt
14:04 ccha2 is there a way to diplay the progress of running states ?
14:07 _KaszpiR_ joined #salt
14:09 hemebond ccha2: Use `salt-call state.apply` on the minion
14:09 hemebond `salt-call state.apply -l debug`
14:10 arount ccha2: or you can tail -f logs on the minions (i am right, on the minion ?)
14:11 arount but there is no built-in-sexy way to do this
14:12 ccha2 yeah not sexy display, is debugging display
14:12 ccha2 not like with ansible
14:13 hemebond Ansible gives you running feedback?
14:14 skeezix-hf joined #salt
14:18 nkuttler joined #salt
14:18 beebeeep joined #salt
14:23 OliverUK1 Is there a way of configuring Salt to automatically delete all unauthorised keys?  I'm needing to use Salt over the internet and I only want keys I manually pre-seed on a minion to be there
14:27 manji I think you can have a cronjob for that
14:31 OliverUK1 Any recommendations for having Salt work over the internet, especially in regard to security?
14:32 whytewolf vpn
14:36 Slimmons joined #salt
14:37 lordcirth_work Yeah, VPN is the best for security.
14:38 OliverUK1 Cool, any recommendations on this/setting this up?
14:38 Slimmons joined #salt
14:39 Praematura joined #salt
14:42 ssplatt https://github.com/saltstack/kitchen-salt/pull/118 got another pr
14:50 promorphus joined #salt
14:51 godson joined #salt
14:51 chrysanthemum joined #salt
15:02 XenophonF OliverUK1: My Salt master is Internet-accessible.
15:03 XenophonF We don't use VPN.
15:03 OliverUK1 XenophonF: Cool, Thanks
15:03 XenophonF Perhaps we put too much faith in 0mq.
15:03 XenophonF I'd much rather set up IPSec tunnels everywhere, but the boss said "no".
15:06 heaje joined #salt
15:07 OliverUK1 XenophonF: I think I am going to setup OpenVPN on each of the minions to the master server, there are some other comms that could go over the tunnel too that we have
15:08 XenophonF ugh openvpn
15:08 hashwagon joined #salt
15:10 OliverUK1 XenophonF: Ha, no?
15:10 OliverUK1 I've used it for some things in the past and it has been fine
15:13 sp0097 joined #salt
15:15 onlyanegg joined #salt
15:20 XenophonF make sure you use udp transport
15:21 godson can anyone provide insight into when using TCP over Zeromq makes sense for transport?
15:22 hemebond godson: I use TCP by default now. Seems faster and more reliable.
15:22 * hemebond is off to bed
15:23 XenophonF I thought TCP was the default?
15:24 jdshewey joined #salt
15:24 godson is it the default now?
15:24 godson it wasnt some time ago
15:24 promorphus joined #salt
15:24 whytewolf no, 0mq is still default
15:25 hemebond At least in 2016.3.6 0mq is the default.
15:25 XenophonF I've been running Salt for about 3-4 years now, and I've only ever made firewall exceptions for ports 4505/tcp and 4506/tcp.
15:25 XenophonF OH
15:25 whytewolf tcp doesn't change that
15:25 XenophonF TCP instead of 0mq.
15:25 XenophonF sorry am clueless will shut up now
15:26 godson lol
15:26 jdshewey Anyone know what populates the "domain" grain in the 2016.11.5?
15:26 whytewolf honestly tcp still uses 0mq. it just replaces the transport method of 0mq with tornado instead of the one built into 0mq
15:27 godson im just trying to understand why one would use TCP over 0mq
15:27 jdshewey It comes back blank for me and I suspect is making the fqdn grain no longer a fully qualified domain name.
15:27 jdshewey On RHEL 6
15:27 hemebond jdshewey: I think that's populated on Windows minions.
15:27 flowstategames joined #salt
15:28 jdshewey @hemebond: There are a couple. There is also the DNS domain, which also comes back blank. These values are populated on my RHEL7 boxes running the same salt minion release.
15:28 whytewolf jdshewey: https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L1726
15:28 whytewolf it starts there
15:29 Guest73 joined #salt
15:29 arount wtf https://github.com/saltstack/salt/blob/develop/tests/unit/utils/test_network.py#L106-L113
15:29 arount seriously, salt ..
15:29 jdshewey Love the code comment: "This is going to need some work" - you don't say...
15:29 arount lol yeah "if it does not works, this means it did worked"
15:30 arount yeah - great comment, great test
15:33 whytewolf jdshewey: looks like domain is filled in from splitting the fqdn.
15:35 jdshewey Yeah... So I'm probably bumping into this: https://github.com/saltstack/salt/issues/36619
15:36 jdshewey @whytewolf - whatever causes that behavior would cause the domain to be blank too.
15:36 whytewolf yes
15:37 xet7 joined #salt
15:39 Guest73 joined #salt
15:39 Praematura joined #salt
15:48 PatrolDoom joined #salt
15:49 JohnnyRun joined #salt
15:50 jauz The announcement for Salt 2016.11.6 says May 18th same as 11.5 on the Saltstack docs/latest page. FYI
15:51 jdshewey @whytewolf - It looks like this uses python's socket.getfqdn() which can apparently be manipulated with a hosts file entry: https://stackoverflow.com/questions/41706893/socket-getfqdn-returns-unexpected-result
15:51 aldevar left #salt
16:01 jimklo joined #salt
16:01 flowstategames joined #salt
16:04 hemebond left #salt
16:06 bluenemo joined #salt
16:12 toastedpenguin joined #salt
16:13 toastedpenguin anyone used salt to update data in an mssql DB/table?
16:13 PerilousApricot joined #salt
16:14 sjorge joined #salt
16:16 skatz joined #salt
16:19 skatz joined #salt
16:19 Renich joined #salt
16:19 jdshewey @toastedpenguin: No, but it's python based, so if there isn't something pre-canned, it's easy enough to make a module.
16:20 jauz All I know is this: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mssql.html
16:21 jauz But it seems you should also be able to run a .sql file against a database with the proper connection string credentials.
16:21 skatz I'm having trouble logging from inside a returner on a Windows minion. I can open a file and write to it so I know the returner is getting executed but log.info, log.warning etc don't write anything to the minion logs. Any ideas how to debug this or what the issue might be?
16:22 sp0097 joined #salt
16:22 eightyeight joined #salt
16:23 jdshewey Sounds like a permissions issue. Have you tried granting "Everyone" full read/write permissions on the log file and the folders above it? That should eliminate file permissions as the problem. If that works, you can lock it down more (if needed)
16:23 skatz I'll try that thanks
16:24 whytewolf skatz: not sure what could be causing that. log.warning and log.info should log as long as you properly initialized the logger. [into the same logfile that salt is already logging as.]
16:24 skatz FWIW other info messages are getting logged so it seems like the user running salt does have permissions but maybe something odd is happening when the returner is executed
16:24 whytewolf shouldn't be a permission issue unless log was not properly initialized
16:25 skatz I'm initializing it with essentially "import logging; log = logging.getLogger(__name__); def returner(ret): log.info('this should get logged but doesnt')"
16:26 skatz which works fine on linux but perhaps not on windows
16:27 whytewolf humm, that is correct.
16:28 Renich_ joined #salt
16:29 aneeshusa joined #salt
16:31 whytewolf is any info lines being logged?
16:32 skatz @whytewolf yeah salt itself is logging things at the info level (Starting a new job with PID 12345, Returning information for job: 20171234458952389) etc
16:32 whytewolf try running in debug mode and see if your lines show up
16:33 skatz so change log_level to debug in the minion conf file and restart salt-minion?
16:33 whytewolf well log_level is for the console. you might want log_level_logfile
16:33 whytewolf or just run the minion directly with -l debug
16:34 skatz ok i'll give that a shot
16:35 whytewolf it is odd. this defintly shouldn't be a permissions issue. as returners are just functions that are called by the other python not even splitting out of the program.
16:35 skatz yeah that was my understanding
16:39 aldevar joined #salt
16:40 skatz hmmm so when I stop the service and then run it manually (with "c:\salt\salt-minion.bat -l debug" in cmd) it crashes saying "The RPC server is unavailable"
16:41 skatz (in an administrator cmd window to be clear)
16:42 whytewolf that is ... odd.
16:42 whytewolf unforchantly I'm not going to be much help with that. .. I don't do a lot with windows.
16:42 skatz ha same here :) until now that is
16:42 skatz let me see if i can get debug logging working with it running as a service
16:45 onlyanegg Is it possible to give custom grains to a subset of minions?
16:47 whytewolf onlyanegg: you mean a _grains custom grain? no it is all or nothing. you could put code in the grain that doesn't load it if it isn't the right minion though
16:47 onlyanegg I have minions on EC2 and a test environment on Vagrant. I'm using the ec2_info grains module, but obviously the Vagrant environment doesn't need it.
16:47 onlyanegg hmm, ok
16:48 onlyanegg I think another solution would be to have different salt environments - not sure if I want to maintain that yet...
16:49 whytewolf i would rather scratch my eyes out then use that method.
16:49 major I hate fiberglass in the eyes
16:49 onlyanegg haha, really? why?
16:49 Renich joined #salt
16:49 major here's salt in your eye?
16:50 whytewolf salt enviroments are scetchy at best. and when it comes to the dynamic modules and enviroments it gets worse.
16:50 onlyanegg it seems better than forking the grain specifically for my environment
16:50 jauz I keep seeing people mention staying away from using Salt Environments but haven't seen a breakdown on why or what best practice would be in it's place, really. =/
16:50 onlyanegg hmm, k
16:50 skatz whytewolf: still doesn't show up after switching to debug log_level_logfile
16:51 skatz changing to to log.warning doesn't work either...
16:51 whytewolf jauz: personally i use a seperate master per enviroment.
16:51 PepperIndustries joined #salt
16:51 onlyanegg jauz: I tried out Salt Environments for a bit, but switched to targeting based on sections of the hostname
16:52 whytewolf jauz: my main beef with salt enviroments is that there is no real seperation of them. and most of the time trying to use them leads to confustion and trying to determine what is merging where. which leads to headaches
16:52 major which leads to buying more whiskey
16:53 jauz What if I just use environments to dictate which branch of GitFS/ext_pillar to reference and still use minion_id/grain targeting for keeping deployments segregated?
16:53 jauz Hmm, I see
16:53 whytewolf jauz: they still merge. mostly at the top file level.
16:54 whytewolf which leads to interesting issues trying to find what is actually being called.
16:54 major sounds like debugging multiple enheritance bugs in C++
16:54 jauz Yeah, I haven't messed with my highstates much yet, using mostly for remote execution and GitFS CM. Works well so far but we're just getting started and things will get more complicated with an intention to run highstates obviously.
16:55 whytewolf it is rather like that. only with less reference to what the end result is
16:56 major end result is always the same
16:56 major waking up with an emty bottle of scotch
16:56 jauz So you run a dev/staging/prod/etc... Master for each?
16:57 whytewolf oh i was going to say a crying admin in the corning clutching an empty bottle of scotch in one hand and a bottle of anti-pyscotics in another
16:57 major this is back to justifying syndic's with each master using a stack of default git repos and then allowing each master to load their own "custom" git repo/branch
16:58 major because those don't merge down right? you can have multiple top.sls files that way
16:58 whytewolf I have a seperate repo for top files. but yes.
16:59 sp0097 left #salt
16:59 sp0097 joined #salt
17:00 major right, but like the MoM in a syndic, or any master could all leverage the production configs, and various syndic masters could configure their ext_pillar and file_roots to place their repos into an order that sort of hijacks a setting from production
17:01 _KaszpiR_ joined #salt
17:11 skatz whytewolf: any more ideas about the windows logging issue? i might try to duplicate it on another windows vm and if it fails there too i can open an issue on github.
17:12 whytewolf skatz: unforchantly not. i have no idea what would stop that from working.
17:13 skatz ok. thanks for walking through it with me, i'm at least relatively sure now I'm not doing something obvious/dumb :)
17:18 censorshipwreck joined #salt
17:18 astronouth7303 i looked at salt environments, decided to nope out and now i store my deployment environment in a grain
17:23 Bock joined #salt
17:23 major it seems like you should be able to make rules that deploy grains based on conditions
17:23 whytewolf you can, if you are just using the module to set grains. not if you are deploying grain modules
17:26 whytewolf if a _grains module is in base. every minion will eventually sync it. if it is in a enviroment then a minion has to also be in that enviroment to remeber it [other wise when it auto syncs it will remove it]
17:28 nixjdm joined #salt
17:33 major hurm
17:34 aneeshusa joined #salt
17:38 scooby2 joined #salt
17:44 Edgan joined #salt
17:56 ChubYann joined #salt
18:06 fritz09 joined #salt
18:08 preludedrew joined #salt
18:10 f3rno joined #salt
18:17 jauz I'm finding multiple answers online; curious if anyone else here upgrades Salt Minions on Windows, what is your preferred method? Working so far with a PS script that kinda does it for me, looking for a more stateful solution. The salt-formula for the salt-minion doesn't look like it works unless I'm missing something.
18:17 whytewolf my perfered method of upgrading windows is to put a linux disk in the machine and instal linux
18:18 whytewolf :P
18:18 jauz If only. :P
18:19 jauz I'm glad I can use Salt at all on Windows; so much better than before.
18:24 astronouth7303 hm. I want my CI system to be able to poke at salt, saying "Update the commit hash for this component in this environment", and salt will set the grain and highstate the environment. Orchestrate? Custom execution module? Just a shell script?
18:24 astronouth7303 s/grain/pillar/
18:25 jdipierro joined #salt
18:26 whytewolf astronouth7303: salt api + webhook + reactor. seems the best method i would think
18:28 astronouth7303 gitlab has an actual concept of environments and deploying, but wants to call a script
18:28 astronouth7303 (i do something similar for build artifact publication, though)
18:31 astronouth7303 i suppose i could just have gitlab make a bunch of `salt` calls...
18:32 astronouth7303 eh, we have terrible isolation anyway
18:43 nixjdm joined #salt
18:44 chrysanthemum_ joined #salt
18:50 mikecmpbll joined #salt
18:51 astronouth7303 ... npm.installed is erroring out
18:51 astronouth7303 https://www.irccloud.com/pastebin/eCnIDV2A/bower%3A%20npm.installed
18:52 astronouth7303 i'm guessing there's some kind of output buffer limit setting I have to change?
18:56 noraatepernos joined #salt
18:59 noraatepernos https://github.com/saltstack/salt/issues/34692 anyone have any advice on this?  I have install failure on simple pkg.installed states where the packages can easily be installed by apt-get directly on the minion.
18:59 noobiedubie joined #salt
19:12 jdipierr_ joined #salt
19:12 pbandark1 joined #salt
19:18 OliverUK joined #salt
19:18 _JZ_ joined #salt
19:19 lee__ joined #salt
19:19 OliverUK joined #salt
19:19 tobstone joined #salt
19:20 flowstat_ joined #salt
19:20 OliverUK joined #salt
19:20 pbandark1 joined #salt
19:21 PatrolDoom joined #salt
19:21 OliverUK joined #salt
19:21 ople_ joined #salt
19:22 bbhoss joined #salt
19:22 bbhoss joined #salt
19:22 doriftoshoes__ joined #salt
19:22 Felgar joined #salt
19:22 rideh joined #salt
19:23 inetpro joined #salt
19:27 gtmanfred joined #salt
19:27 jerrcs joined #salt
19:27 hoolio joined #salt
19:27 jthunt joined #salt
19:27 inire joined #salt
19:27 izrail joined #salt
19:27 nledez joined #salt
19:28 oida_ joined #salt
19:29 ujjain joined #salt
19:29 ujjain joined #salt
19:29 mikecmpb_ joined #salt
19:38 aldevar joined #salt
19:41 nixjdm joined #salt
19:44 cyborg-one joined #salt
19:50 astronouth7303 and in an attempt to fix it, i decided to just knock over the instance and try to bring up a new one. except that salt-cloud is now being weird and minions aren't talking to the master
19:53 cyteen joined #salt
19:54 juanito joined #salt
20:02 aneeshusa joined #salt
20:04 racooper joined #salt
20:06 ronnix joined #salt
20:13 jauz #therewasanattempt
20:14 astronouth7303 figured out that weirdness: startup_states is bad
20:15 astronouth7303 now i just have to work through "oh, i highstated my minion and it's applying about 30 states, because it's fresh"
20:15 tom[] joined #salt
20:16 astronouth7303 oddly, that doesn't happen in the default timeout
20:24 f3rno joined #salt
20:38 overyander joined #salt
20:42 ronnix joined #salt
20:43 nixjdm joined #salt
20:53 fracklen joined #salt
20:54 cliluw joined #salt
20:55 cliluw joined #salt
21:05 thekabal joined #salt
21:07 thekabal Hello, I'm writing an init.sls to disable chronyd (so that I can run ntp instead), and I haven't been successful with what I thought the correct code would be: https://gist.github.com/thekabal/2a5acba375bad7a670a469ccfc9deefe
21:09 whytewolf https://gist.github.com/whytewolf/ce84dcac9b04f8828979dba8dc550155
21:10 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html#salt.states.service.dead
21:11 thekabal Beautiful! Thank you kindly!
21:11 whytewolf no problem
21:15 lubyou joined #salt
21:18 jimklo joined #salt
21:26 NightMonkey joined #salt
21:27 jimklo joined #salt
21:42 nixjdm joined #salt
21:46 flowstategames joined #salt
21:47 speedlight joined #salt
21:55 sjorge joined #salt
22:02 rojem joined #salt
22:02 pbandark Hi.. I need help in jinja formatting. can anyone help me on https://paste.fedoraproject.org/paste/nHEXTq-xxORxYa8U30UcMg ?
22:04 aneeshusa joined #salt
22:04 f3rno joined #salt
22:07 coredumb pbandark: may I ask what you're trying to do with the final line to print?
22:08 coredumb oh sorry you wanna print the list instead of the line
22:08 pbandark yes coredumb
22:10 coredumb but print where? is that a state file or ?
22:10 pbandark its jinja template which is I am copying to minion using state file
22:11 coredumb ok
22:13 pbandark coredumb: https://paste.fedoraproject.org/paste/2WTrdakPRK6pQwL0TGINmA
22:14 pbandark I think there should be some jinja trick
22:16 whytewolf try not using -
22:16 pbandark whytewolf: at what end ?
22:17 * whytewolf shrugs. at the end of the for or the begining of the endfor
22:17 whytewolf just a guess
22:17 whytewolf those would be stripping line ends
22:17 coredumb oh I didn't even see them >_<
22:18 pbandark i tried that. let me show you the result
22:18 coredumb whytewolf: can it be replaced by a + at the end?
22:18 coredumb like: {% for item in seq +%}
22:20 pbandark https://paste.fedoraproject.org/paste/zUbMjhIczLpx6haTOUPbYg
22:20 pbandark whytewolf: ^
22:21 whytewolf + disables lstrip_blocks which
22:21 whytewolf i don't think is wanted
22:21 coredumb whytewolf: ok
22:21 whytewolf [i also don't think it is enabled to be disabled
22:21 whytewolf ]
22:22 whytewolf pbandark: i don't see a difference between the second and third
22:22 whytewolf err i mean first and second
22:23 pbandark there is diff of line space
22:24 whytewolf i meant in what you changed.
22:24 pbandark oops..
22:24 pbandark let me correct
22:25 _flawless_cowboy joined #salt
22:25 pbandark https://paste.fedoraproject.org/paste/XKof8KCmp46r~Z1EOMkb-Q
22:25 pbandark whytewolf:  ^
22:26 whytewolf ahh ok, what happens if you move the line with the for to the same line as the Installed Software:
22:27 whytewolf in the second one as that looks the closest to what you want
22:27 pbandark let me try
22:27 whytewolf most likley you will get a nasty bit of spacing
22:29 coredumb installed pkg: {{ salt.pillar.get(xxx)|join('\n') }}
22:30 coredumb ?
22:30 whytewolf that would not give the indenting he wants
22:30 coredumb mmmmh exact
22:31 pbandark no :( https://paste.fedoraproject.org/paste/ZhyiiDOdjmsl5ESLZCM2Bw
22:31 whytewolf I was thinking maybe |indent(16) but that might not work either.
22:32 ecdhe joined #salt
22:32 whytewolf um, no i meant move the for part up with the Installedsoftware not the {{aplication}} with for
22:32 coredumb would make the first line far out right I guess
22:33 pbandark ahh
22:35 whytewolf I mean what i am thinking is something like {{ {'Installed Software': salt.pillar.get('minion_id')}|yaml(false) }} but that wouldn't allow the ansi color they are trying to put in
22:38 pbandark https://paste.fedoraproject.org/paste/wig0J7esivPN4D4aCK4rZw  :(
22:38 pbandark whytewolf: still not the expected result
22:38 whytewolf pbandark: can you live without the color?
22:39 pbandark no. that is also requirement :(
22:45 whytewolf :(
22:47 pbandark whytewolf: i guess we can skip the color for "application" variable but not for "installed software"
22:48 whytewolf well what i was thinking that wouldn't work anyway
22:48 pbandark ok.. I am afraid if there is any solution for this.
22:51 whytewolf https://gist.github.com/whytewolf/af5a13fde12d111bf95d906805a15012
22:52 whytewolf might have to adjust where the endfor on the line is
22:52 pbandark checking
22:54 coredumb ^[[1;31mInstalled Software:{{ '^[[0m'~list|join('\n^[[0m')|indent(27) }}
22:55 coredumb this works for me in online interpreter
22:55 coredumb not sure if salt would render it the same
22:55 whytewolf online interpreter != salt interpreter
22:55 whytewolf i actually use salt to test
22:56 coredumb worth a try I guess :)
22:56 pbandark you rock whytewolf
22:57 coredumb ^^
22:58 whytewolf btw coredumb your solution kind of works. although the indenting might need a space or 2
22:59 pbandark but its weird. Can you tell us how to understand this syntax of when to use {- and when just {. also how this {%endfor%} was causing the issue... I am unable to find any document with proper explanation
22:59 coredumb yeah I guess it would need some tinkering to get it right
23:00 whytewolf pbandark: {%- means the line ending befor the code gets removed. and -%} means the line ending afterwords
23:00 whytewolf everything else is using linesends inbetween
23:00 whytewolf and spaceing
23:00 coredumb gnite folks
23:01 pbandark good night coredumb and thanks for your help too :)
23:01 whytewolf http://jinja.pocoo.org/docs/2.9/templates/#whitespace-control
23:01 whytewolf that kind of goes over it
23:01 pbandark checking
23:02 pbandark ok. I will expriment more with this to get better idea..
23:03 whytewolf form the behavour of salt trim_blocks and lstrip_bloses are both disabled.
23:03 pbandark thanks a ton for your help whytewolf
23:03 KevinAn2757 joined #salt
23:03 whytewolf no problem
23:06 aneeshusa joined #salt
23:27 Bock joined #salt
23:57 aneeshusa joined #salt

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