Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-08-02

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

All times shown according to UTC.

Time Nick Message
00:10 MTecknology xMopxShell: depends where the data is coming from, where it's going, and what it's for.
00:12 whytewolf grains vs salt mine? that .... comparison doesn't make much sense
00:13 justanotheruser joined #salt
00:15 whytewolf grains are just info about a minion. that the minion controlls. mine data is the data you used to pull info from the master about other servers.
00:16 zerocoolback joined #salt
00:20 justanotheruser joined #salt
00:20 MTecknology and pillar is for secrets (check out gpg renderer) and driving data for states
00:22 darioleidi joined #salt
00:22 xMopxShell whytewolf: I don't see how that's different
00:23 xMopxShell At the end of the day both are data about minions, exported to help make decisions elsewhere
00:23 whytewolf not else where
00:23 whytewolf grains is "here" mine is "there"
00:24 xMopxShell But mined data can be from "here" too
00:25 whytewolf only if you are being insane and want to slow down your salt
00:25 xMopxShell Sure but what's the real distinction?
00:26 whytewolf the fact grains exist on the minion. mine data is pulled from the master
00:26 MTecknology mine is empty by default
00:26 xMopxShell whytewolf: but what's the source of the data pulled from the master? Still the minions.
00:27 MTecknology It's only meant to let hosts move bits of information between hosts
00:27 whytewolf actually each minion sends it to the master at the mine update interval by running the mine_function
00:27 whytewolf aka mine is not static. ever
00:27 xMopxShell Yeah, and that's very similar to how grain data is sourced
00:27 whytewolf no,
00:27 whytewolf grain data is update on the local minion
00:28 whytewolf and that is cached to the master. so that it can be sourced in pillar targetting.
00:28 whytewolf but when you are running a state. it just looks up on the local cache.
00:28 whytewolf when you use mine.get you are querying the master at that time
00:29 whytewolf even if your "target" is loval
00:29 whytewolf local
00:30 ninjada_ joined #salt
00:32 whytewolf there is also the fact that anything in mine is accessable from all minions.
00:33 xMopxShell So really it matters more about what you'll do with the data rather than staticness?
00:33 whytewolf yes, i mean you can stick static data in /etc/salt/grains to be static grains.
00:34 xMopxShell I've been adding grains modules
00:34 xMopxShell Simple stuff, like yes/no if a certain config is present for example
00:35 whytewolf also. since mine data is grabbed mine_function it needs to be some sort of module that mine_function can run to get the data on the minion.
00:35 whytewolf a lot of the time that function is grains.get
00:35 whytewolf so it is grains data
00:36 whytewolf also since any function that mine is going to be useing has to be a salt exacution module that module is already avalible in jinja to the minion
00:37 xMopxShell Gotcha. Thanks for the explanations whytewolf!
00:38 astronouth7303 Huh, I haven't added grains to my mine yet.
00:38 whytewolf astronouth7303: a lot of grains i use are for openstack instance info
00:39 astronouth7303 Yeah, it makes sense
00:40 zerocoolback joined #salt
00:47 https_GK1wmSU joined #salt
00:47 tacoboy joined #salt
00:47 darioleidi joined #salt
00:48 https_GK1wmSU left #salt
00:54 ninjada joined #salt
00:55 systemexit joined #salt
01:00 druonysus joined #salt
01:00 druonysus joined #salt
01:12 zerocoolback joined #salt
01:22 https_GK1wmSU joined #salt
01:24 https_GK1wmSU left #salt
01:33 filippos joined #salt
01:38 druonysus joined #salt
01:42 DammitJim joined #salt
01:50 druonysus joined #salt
01:50 druonysus joined #salt
01:51 ilbot3 joined #salt
01:51 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.6, 2017.7.0 <+> 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:54 ninjada joined #salt
01:56 tellendil joined #salt
01:59 tellendil joined #salt
02:11 rmelero joined #salt
02:27 om2 joined #salt
02:40 Ni3mm4nd joined #salt
02:44 cgiroua joined #salt
03:02 Armageddon joined #salt
03:19 evle joined #salt
03:19 fatal_exception joined #salt
03:19 nich0s joined #salt
03:20 donmichelangelo joined #salt
03:54 jeddi joined #salt
04:07 justan0theruser joined #salt
04:16 mosen joined #salt
04:21 rmelero joined #salt
04:23 justanotheruser joined #salt
04:29 sh123124213 joined #salt
04:38 J0hnSteel joined #salt
04:42 Ni3mm4nd joined #salt
04:45 cgiroua joined #salt
04:54 J0hnSteel joined #salt
04:54 svij1 joined #salt
05:00 debian1121 joined #salt
05:08 NightMonkey joined #salt
05:11 preludedrew joined #salt
05:13 Bock joined #salt
05:16 golodhrim|work joined #salt
05:18 impi joined #salt
05:35 bildz joined #salt
05:40 Bock joined #salt
05:46 zerocoolback joined #salt
05:49 oida_ joined #salt
05:51 wangofett joined #salt
05:59 EthPyth joined #salt
06:00 cgiroua joined #salt
06:09 do3meli joined #salt
06:09 do3meli left #salt
06:12 cyborg-one joined #salt
06:14 Ni3mm4nd joined #salt
06:15 hoonetorg joined #salt
06:18 Mattch joined #salt
06:20 Guest73 joined #salt
06:55 ninjada_ joined #salt
06:59 Guest73 joined #salt
07:02 cgiroua joined #salt
07:04 zulutango joined #salt
07:05 usernkey joined #salt
07:07 Ricardo1000 joined #salt
07:12 JohnnyRun joined #salt
07:12 impi joined #salt
07:14 https_GK1wmSU joined #salt
07:16 swills joined #salt
07:16 https_GK1wmSU left #salt
07:17 sh123124213 joined #salt
07:18 Hybrid joined #salt
07:20 justanotheruser joined #salt
07:21 zerocool_ joined #salt
07:22 bantone joined #salt
07:24 Guest73 joined #salt
07:25 ninjada joined #salt
07:34 kedare joined #salt
07:40 mpanetta joined #salt
07:43 Rumbles joined #salt
07:52 mikecmpbll joined #salt
07:52 inetpro joined #salt
07:58 justanotheruser joined #salt
08:00 pbandark joined #salt
08:00 viq hemebond: you could argue that that makes puppet *more* open than salt, as they *do* talk about the commercial version, what features are inside, how it looks, and what the pricing is. Saltstack does none of those.
08:01 coredumb viq: honestly there's not much to talk about
08:01 coredumb the commercial version is only a web interface on top of salt
08:01 coredumb and a modified salt-api
08:02 coredumb viq: https://saltstack.com/saltstack-enterprise/ seems pretty sufficient to me
08:02 ventris left #salt
08:03 * coredumb doesn't try to argue though
08:03 * viq goes to have a look
08:09 viq coredumb: not even a hint of what the pricing may be, no docs about all the features mentioned that I can see
08:10 coredumb yeah they're pretty non transparent on the pricing you have to ask them about it
08:11 viq I have a strong dislike for practices like that
08:11 coredumb actually the pricing includes the support
08:12 coredumb viq: same here
08:12 coredumb but I think they follow the IT trend on this one
08:13 coredumb pretty much every IT vendor does that
08:13 viq ansible and puppet give at least "starting at", and chef gives specifics for all the stages and variants, IIRC
08:13 coredumb "Contact sales"
08:14 https_GK1wmSU joined #salt
08:16 https_GK1wmSU left #salt
08:19 N-Mi joined #salt
08:19 N-Mi joined #salt
08:20 viq Oh, it seems actually chef flattened their pricing. Where it was "starting at 137 USD per node" for basic management, and higher levels (like compliance etc) costing more, now that 137 USD gets you everything.
08:31 baz2112 joined #salt
08:39 Guest73 joined #salt
08:42 hemebond viq: Saltstack is open. The stuff that Saltstack Inc does is a completely separate thing.
08:43 hemebond But the Saltstack core it uses is exactly the same was what the rest of us use.
08:44 viq I believe exactly the same is true of puppet ;)
08:46 hemebond All the ticks and crosses on https://puppet.com/product/puppet-enterprise-and-open-source-puppet suggest otherwise.
08:46 babilen It's still an "open core" model, where a company is primarily behind the development and does not empower the community in the same way as other open source projects
08:46 hemebond Also, I've made the mistake of wandering into the "enterprise" docs before and wondered why things don't work.
08:48 jhauser joined #salt
08:52 N-Mi joined #salt
08:52 N-Mi joined #salt
08:55 Guest73 joined #salt
09:02 Guest73 joined #salt
09:13 debian112 joined #salt
09:21 Guest73 joined #salt
09:47 mikecmpb_ joined #salt
10:00 Guest73 joined #salt
10:07 darioleidi joined #salt
10:09 EthPyth joined #salt
10:14 kiorky joined #salt
10:36 high_fiver joined #salt
10:40 EthPyth joined #salt
10:43 Guest73 joined #salt
10:46 kiorky joined #salt
10:46 twooster I want to test master connectivity from my minions. `salt-call test.ping` almost works, but if the master has gone down or is not DNS lookup-able, it'll just sit there retrying for minutes on end.
10:46 twooster I'd prefer something that fails after one or two attempts. Any ideas on how to go about this?
10:50 twooster (The larger problem is unreliable salt reconnects on spotty GSM networks, but I'm willing to solve it with shell-scripting and reboots as a stopgap)
10:57 twooster Hmm. Maybe will just use `timeout`. Disregard question. Thanks :)
11:12 absolutejam evening
11:12 absolutejam afternoon
11:12 absolutejam getting ahead of myself
11:13 peter_d0e joined #salt
11:22 peter_d0e2 joined #salt
11:26 ProT-0-TypE joined #salt
11:27 peter_d0e joined #salt
11:28 Guest73 joined #salt
11:29 tacoboy joined #salt
11:34 pbandark joined #salt
11:38 Guest73 joined #salt
11:39 EthPyth joined #salt
11:46 gleaute joined #salt
12:03 Guest73 joined #salt
12:10 sjorge joined #salt
12:14 dunz0r Have something changed in how you use state.apply in 2017.7.0? I can't seem to get it to apply any states, it just spits out a long explanation about how the syntax works
12:15 dunz0r This is the output I'm getting: http://paste.debian.net/979338/
12:25 Guest73 joined #salt
12:25 ssplatt joined #salt
12:29 numkem joined #salt
12:31 XenophonF man that's weird
12:32 alex-zel joined #salt
12:33 alex-zel hello
12:33 dunz0r Very... I'm beginning to suspect it has something to with zeromq, or something...
12:34 dunz0r I upgraded my master to 2017.7.0 as well, but now I don't seem to be able to get any output at all from anything
12:34 alex-zel I'm having some issues with orchestration, I've noticed that the master is getting "_master" appended to it's ID, I've added "saltmaster_master" to the pillar top file but the master still doesn't get it's pillar
12:34 babilen dunz0r: Was the version not matching before?
12:34 dunz0r babilen: The minion that was giving me problems had a newer version
12:35 dunz0r Although, now nothing works, after the upgrade, I'm very confused
12:35 Guest73 joined #salt
12:35 alex-zel also tried "saltmaster*" and that doesn't work aswell
12:35 babilen dunz0r: Newer minion is not supported (in particular with this version)
12:36 babilen You always have to upgrade the master before your minions
12:36 dunz0r babilen: Figured as much... but now that both are on 2017.7.0... nothing's working :O
12:36 babilen My guess would be that your minion has gone AWOL
12:36 babilen Could you restart them?
12:36 dunz0r Tried that already :/
12:37 dunz0r I suspect I need to turn on debugging on a minion to figure out what's going on
12:37 babilen Run it manually with highest log level
12:45 sh123124213 joined #salt
12:46 dunz0r joined #salt
12:47 dunz0r The request just timed out... wtf.
12:48 dunz0r It doesn't seem to apply to all minions though, just ones with 2017.7.0
12:49 dunz0r Never mind, also seems to apply to 2016.11.3 as well... this is very confusing...
12:49 Guest73 joined #salt
12:50 Miouge joined #salt
12:56 jeddi joined #salt
13:05 XenophonF dunz0r: I've been having tons of problems with timeouts since upgrading to 2016.11
13:12 Kelsar joined #salt
13:15 dunz0r It only seems to work when I'm using salt --async and then using salt-run jobs.lookup_jid
13:16 Sarphram joined #salt
13:18 dunz0r Yep. Just confirmed it... it only works with async... this is really strange. Anyone else encountered this problem?
13:18 ssplatt what are you hitting? highstate return timeout?
13:19 dunz0r ssplatt: "Salt request timed out. The master is not responding. You may need to run your command with `--async` in order to bypass the congested event bus. [...]"
13:20 dunz0r So it seems that the master isn't replying to the salt-client...
13:20 ssplatt how many minions? what’s your topology?
13:21 dunz0r About 120 minions, single master
13:21 dunz0r Running all the salt-commands on the master itself
13:22 ssplatt all in one data center i take it?
13:22 dunz0r ssplatt: No, spread out over different locations, but the timeout doesn't seem to be minion-master, but salt-cli to master
13:22 cgiroua joined #salt
13:24 ssplatt salt-cli?
13:24 ssplatt you mean salt-call?
13:24 dunz0r ssplatt: The /usr/bin/salt command
13:24 ssplatt oh so like “salt-master:~ # salt \* state.highstate”  doesn’t work?
13:25 XenophonF I have 1 master and 120 minions, master in AWS eu-west-1, minions in AWS us-east-1, us-west-1, eu-west-1, Mali, Uganda, and India
13:25 dunz0r ssplatt: It works, but it doesn't return unless I use the async option
13:25 XenophonF and I'm getting SaltReqTimeoutError exceptions any time I try to run state.apply on those minions from the master
13:26 ssplatt thats a pretty well known zeromq issue. things time out because they take longer to run than the original “salt” process listens for
13:26 ssplatt i hit it all the time
13:26 XenophonF how do I increase the timeouts?
13:26 racooper joined #salt
13:26 XenophonF wasn't a problem prior to 2016.11
13:26 dunz0r Yeah, I'm seeing the same thing.
13:26 dunz0r Minions on older than 2016.11 doesn't seem to have this problem
13:27 ssplatt i believe the best practices are to set an external returner, or to possibly consider using the TCP or RAET transport
13:27 ssplatt i usually find if i run in smaller batches i get better results too
13:27 ssplatt https://docs.saltstack.com/en/latest/topics/targeting/batch.html
13:28 XenophonF I'm running state.apply on a single minion and get that error.
13:28 dunz0r This happens with just one minion as well, and with a simple test.ping :/
13:28 ssplatt because RTT from us-east to Mali is more than a couple seconds?
13:28 XenophonF RTT from the master (Ireland) to the furthest minion (India) is ~250 ms
13:28 XenophonF usually less
13:28 dunz0r ssplatt: Doesn't matter if I do it on the salt-master(which is also a minion), same result.
13:29 XenophonF RTT from the master to Mali is ~200 ms
13:29 dunz0r Rtt is below one ms for me... since it never leaves the master even.
13:29 ssplatt ok maybe you’re hitting somethign different. i’m also not seeing that issue on my 2017.7.0 master/minions
13:29 dunz0r ssplatt: What distro etc? And what version of python-zmq?
13:30 ssplatt debian 8
13:30 dunz0r Hmpf.
13:30 ssplatt uh, not sure, whatever salt installs.
13:30 dunz0r Same as me then :/
13:31 dunz0r ssplatt: sudo dpkg-query -s python-zmq will tell you which version you're running
13:31 babilen RAET is pretty abandoned, isn't it? TCP would be the alternative at the moment, I guess
13:31 dunz0r Might be so simple that I'm using a verion of zmq that's too old
13:32 babilen We haven't seen those issues with 2016.11 on Debian (wheezy, jessie, stretch)
13:34 babilen That's with ping_on_rotate: True in most setups though
13:34 ssplatt usually if i see one return timeout, i can ping it by itself fine.
13:35 ssplatt but i do see timeouts on large highstate runs frequently
13:35 dunz0r Nah, I can't even ping my minions... it started just after I upgraded the master to 2017.7.0
13:39 ssplatt oh ok, here i found a minion that is still on 2016.11.2, master on 2017.7.0
13:39 ssplatt test.ping was returning “minion failed to return”
13:40 dunz0r I don't even get that, which is even weirder.
13:40 ssplatt salt-call state.highstate works.
13:42 ssplatt hmm
13:43 dunz0r Yep, salt-call works, but output to the /usr/bin/salt-binary isn't working... seriously confusing thigs
13:43 dunz0r *this
13:43 ssplatt yeah double checked other minions. they’re 2016.11.2 and return fine.
13:44 dunz0r I think that my minions are returning fine, but the output to the salt-command isn't returning
13:44 dunz0r I don't even get a job-id o_O
13:46 dunz0r Not even if I ^C the command...
13:47 DammitJim joined #salt
13:48 XenophonF hm I might enable zmq_monitor on my minions
13:48 dunz0r XenophonF: We seem to be having different problems by the way...
13:49 XenophonF yeah looks like
13:49 dunz0r My /usr/bin/salt won't connect to my master, for some reason
13:49 dunz0r But it works when I use --async
13:50 astronouth7303 dunz0r: `salt` runs on the master, it can't do remote
13:50 ssplatt have you turned it off and back on again?
13:50 dunz0r astronouth7303: I know. I meant the salt-master-process when I said master off course :)
13:50 dunz0r *of course
13:50 dunz0r ssplatt: Several times
13:50 astronouth7303 what's the error?
13:51 dunz0r astronouth7303: After 300 seconds I get "Salt request timed out. The master is not responding. You may need to run your command with `--async` in order to bypass the congested event bus. [...]"
13:51 dunz0r Not even a jobid, but it works when I use --async.
13:52 dunz0r The event bus shouldn't be THAT congested... there's only like 120 minions and no auto-states runnig etc
13:52 astronouth7303 does the job get done with `--async`?
13:52 dunz0r Yep
13:52 dunz0r If I don't use --async it doesn't even give me a jobid
13:52 dunz0r If I do salt -l debug somehost test.ping it just stops until the message about --async comes up :/
13:53 astronouth7303 i'm not sure, but i'm just going to throw some ideas out. Actually check congestion levels (messages per second)? file descriptor limits? Try snooping on the bus and see what's going on?
13:57 dunz0r Not even seeing anything in the logs when I use the /usr/bin/salt command without --async :O
14:07 dunz0r It doesn't seem to be a memory problem... just gave my master 8GB of RAM instead of two, still the same symptoms
14:13 openfly does anyone have a strategy for dealing with salt minions that come on and off the network?  like laptops?
14:13 XenophonF On all my minions I'm enabling zmq_monitor and auth_safemode, and I'm setting ping_interval, random_startup_delay, and return_retry_timer_max all to 300.  Preliminary testing looks good but that probably jinxed it. :-/
14:16 XenophonF On my master I'm setting gather_job_timeout and timeout to 300, and I'm enabling presence_events and ping_on_rotate.
14:16 XenophonF openfly: I've been thinking about that for some time.
14:17 XenophonF I'm probably heading in the direction of setting startup_states to highstate
14:26 _KaszpiR_ joined #salt
14:28 hemebond left #salt
14:33 Jake_Squid joined #salt
14:34 Jake_Squid left #salt
14:45 sarcasticadmin joined #salt
14:51 drawsmcgraw joined #salt
14:54 XenophonF This is crazy.
14:55 XenophonF The first time I run state.apply on a remote minion after restarting the salt-master service, it works.
14:55 XenophonF Subsequent runs of state.apply on the same remote minion fail.
14:56 XenophonF state.apply takes about 90s to run - is that unusual?
14:58 twooster openfly: You could use events + reactor to do various things.
15:01 Inveracity joined #salt
15:09 _KaszpiR_ joined #salt
15:18 fritz09 joined #salt
15:21 onlyanegg joined #salt
15:22 numkem joined #salt
15:24 nixjdm joined #salt
15:28 tiwula joined #salt
15:31 cro joined #salt
15:32 _JZ_ joined #salt
15:32 dunz0r This is getting stranger and stranger... when I run /usr/bin/salt as root, I get returns, but not as a normal user O_°
15:33 rmelero joined #salt
15:44 woodtablet joined #salt
15:48 astronouth7303 That's normal
15:48 astronouth7303 Mine doesn't work at all as a normal user
15:49 cro joined #salt
15:51 openfly twooster doesn't help with ping timeouts
15:52 openfly wild card or group queries would be massively delayed
15:53 twooster openfly: Is the problem that the wildcard commands take too long to execute b/c they target offline nodes?
15:53 astronouth7303 XenophonF: state.apply takes a while for me, too. depends entirely on how much state it has to check
15:54 twooster openfly: Seems like you could use --timeout or --async or whatever and tweak to suit if that's the problem.
15:54 openfly maybe
15:55 openfly i think one can reset the timeout
15:55 openfly that might work
15:55 openfly default timeout
15:55 openfly it'd be nice if salt was able to detect offline nodes and not target them
15:55 openfly heartbeat on zmq or something
15:58 darioleidi joined #salt
16:04 whytewolf openfly: a lot would have to happen for that to take place including the master actually doing the targetting. which currently it doesn't.
16:06 astronouth7303 you could build a client that attempts to do it based on the result of manage.status, etc
16:08 xet7 joined #salt
16:08 whytewolf that would be a rather slow client
16:09 numkem joined #salt
16:10 whytewolf manage.status requests a ping from the minions to determine the status of them.
16:10 filippos joined #salt
16:20 lkolstad joined #salt
16:22 Miouge left #salt
16:23 openfly whytewolf a lot of things that should have happened a long time ago
16:23 openfly tbh
16:23 openfly salt's architecture is in need of ... well... an architecture.
16:23 openfly and i've seen zmq run the back end for openstack which registered nodes just fine.
16:24 openfly so it's not a huge imposition
16:25 openfly the biggest issue is that salt lacks a proper scheduler.
16:25 whytewolf openstack doesn't do any kind of wildcard based targetting.
16:25 openfly it does in the scheduler
16:25 openfly or it did
16:25 openfly haven't looked in a bit
16:25 openfly this was in backend queries between apis
16:25 openfly sort of hey anyone can you create a volume sort of request
16:25 openfly and a node electing itself to that task
16:26 openfly and registering with the scheduler
16:26 whytewolf no, it does all or nothing and the first system to respond gets it. which is pretty much the way salt does it
16:26 openfly except that's not the case
16:26 openfly in a wildcard targetting salt iterates it's minions based on the target query
16:27 openfly it doesn't do a shout out to all minions ( why should it? )
16:27 openfly but it also waits for each minion to respond linearly
16:27 openfly which becomes something of a blocking issue on queries
16:28 whytewolf it does. it only puts the query on the bus. and the minions determine if they are being targetted.
16:28 whytewolf the master has other code that has nothing to do with zmq that trys and determines what minions should be responding.
16:29 openfly having not looked at the code it does not appear from usage to operate that way... or if it does there's problems with how it's operating.
16:29 whytewolf currently the only way a master knows if a minion is up or down is to actually send out a ping.
16:30 openfly sure.  i mean that's how a message queue works
16:30 openfly it's not a huge imposition to do that.
16:30 openfly or it shouldn't be.
16:31 whytewolf well since it has to wait for a timeout it can be
16:31 openfly only to the scheduler.
16:31 openfly nothing else should really care.
16:32 whytewolf there is no scheduler
16:32 openfly yeah... that was a big mistake on salts part
16:32 openfly that and jinja
16:32 whytewolf jinja works fine for a lot of cases.
16:32 openfly sure
16:32 whytewolf and it isn't the only render engine
16:33 openfly but it has significant limitations in CFM tasks
16:33 openfly and has proven unreliable in version compatibility
16:34 openfly also trying to syntax check it is basically an exercise in futility
16:34 whytewolf I have not had problems with syntax checking it.
16:35 openfly what are you using?
16:35 openfly i can't find anything
16:35 openfly tried to write my own syntastic plugin and gave up
16:36 whytewolf I pretty much either use cp.get_template or my own debug.render that just basicly uses cp.get_template and returns the output to the master. but will report any errors. and is pretty much how you lint jinja
16:37 astronouth7303 i've been meaning to do something based on the sls module
16:37 openfly ew.
16:37 DammitJim is there a way to clone vms with salt-cloud?
16:37 DammitJim I am not understanding the docs
16:37 astronouth7303 (cp.get_template requires what's in your text editor to be on the fileserver)
16:37 whytewolf but there is jinja jinja plugins for jinja and the salt pluging for vim can use that
16:38 whytewolf sorry jinja plugins for vim
16:38 astronouth7303 DammitJim: depends on your provider, but yes (that's how i deploy on vmware)
16:38 astronouth7303 "jinja jinja plugins for jinja" :P
16:38 DammitJim yeah, vmware
16:38 openfly jinja by itself is not a state file
16:38 DammitJim astronouth7303, I see something like a clonespec
16:38 DammitJim but nothing else
16:38 openfly that whole yaml meets jinja thing is a unique scenario
16:39 DammitJim do I need to specify a profile with clonefrom?
16:39 whytewolf openfly: thats why i use my debug.render cause it will output the yaml so i can toss it into a yaml lint
16:39 DammitJim I thought there was a module for this
16:39 openfly yeah that's super ugly
16:39 hackel Why am I unable to join the Matrix HQ channel?  It just sits and spints indefinitely.
16:40 whytewolf it works. i do have plans to actually build a lint into my debug script but just havn't had the time
16:40 whytewolf also, again. you don't have to use jinja. if you hate debugging it so much don't
16:41 astronouth7303 DammitJim: yes, specify a profile with the clone source and host target
16:41 DammitJim so, you can't define that as parameters?
16:41 openfly if i could just make arbitrary engineering decisions i'd have given up on salt years ago
16:41 openfly sadly i am not the dictator of my own fate.
16:42 whytewolf you could always find a job that doesn't use salt
16:42 openfly i could... but that would seem a bit over the top
16:42 hoonetorg joined #salt
16:48 astronouth7303 DammitJim: you specify the profile as a parameter
16:49 whytewolf DammitJim: currently no. although there is work that should be coming in a future version that allows creating profiles through state files.
16:49 whytewolf in thoery
16:49 WildPikachu is it possible to use a multi-line  marker_start in file.blockreplace?
16:50 evle joined #salt
16:54 wendall911 joined #salt
16:56 svij1 joined #salt
16:57 noraatepernos joined #salt
16:57 DammitJim ok, so I am going to create a profiler
16:57 DammitJim then what command do you run?
16:58 astronouth7303 salt-cloud with -p
16:59 astronouth7303 (or, if you're me, call the cloud runner through salt-api)
17:00 DammitJim that's cool
17:01 DammitJim does one define the name of the new VM in the profile
17:01 DammitJim ?
17:02 astronouth7303 no, on the command line. see --help
17:02 XenophonF ok so if I run this command:
17:02 astronouth7303 (if this seems like a terrible design, https://gitter.im/saltstack/salt-cloud wants to redo it)
17:02 XenophonF `systemctl restart salt-master && salt minion state.apply test=True && salt minion state.apply test=True`
17:03 DammitJim was that for me, astronouth7303 ? the gitter?
17:03 XenophonF the first state.apply call works, and the second fails with SaltReqTimeOutError: Message timed out
17:03 astronouth7303 DammitJim: yeah
17:09 openfly left #salt
17:12 DammitJim thanks, will read up on that
17:17 cyborg-one joined #salt
17:24 mikea joined #salt
17:25 lordcirth_work kinda offtopic but the new version of Ceph looks great: http://docs.ceph.com/docs/master/release-notes/
17:25 mikea is it possible to target minions that have a grain set, ignoring the value?
17:26 lordcirth_work mikea, I wonder if os:* would work?
17:26 whytewolf mikea: you mean like 'P@os:.*'
17:26 lordcirth_work That would probably match emptystring too, though
17:26 mikea the grain is a list
17:26 mikea let me give that a try
17:26 whytewolf en empty string is still a grain that is set with a value :P
17:27 mikea hey look at that
17:27 mikea it works
17:27 lordcirth_work whytewolf, so a non-existent grain is None rather than ""?
17:27 whytewolf lordcirth_work: exactly
17:27 mikea this is not a default grain, if it exists I want to apply a state to the boxes with it
17:27 mikea so this will work perfectly
17:28 lordcirth_work whytewolf, why does grain.get return nothing instead of None, then?
17:28 XenophonF a while ago someone mentioned ways to debug salt
17:28 lordcirth_work on the command line, I mean
17:28 XenophonF does anyone remember what those were?
17:28 XenophonF i really think i have an issue with my salt-master
17:29 whytewolf lordcirth_work: because None loosks tacky on the command line. and might be confused for being the value None.
17:29 lordcirth_work I see
17:30 ChubYann joined #salt
17:30 lordcirth_work So instead it's confused with "".  Oh well, displaying typed data in text never works well
17:31 whytewolf very true
17:31 mikea so if the syntax for salt to target a pillar is
17:32 mikea salt -I yum:holds:*
17:32 mikea would that be the same thing in top.sls?
17:32 mikea wouldn't that muck with the yaml parsing?
17:32 astronouth7303 note that `grains['doesnotexist']` will produce a different result from `grains.get('doesnotexist')`
17:33 whytewolf mikea: 'yum:holds:*': match: pillar
17:33 whytewolf the '' makes all the difference
17:33 mikea that it does, I just tested it
17:33 mikea thanks
17:34 ssplatt {% if thing is defined %}
17:34 whytewolf astronouth7303: i think you meant salt['grains.get'] grains.get is different then both of those
17:36 whytewolf grains['item'] is a direct call, grains.get('item') is a lookup on the dict grains. and salt'[grains.get'] actually calls the grains.get salt module, through the salt dict.
17:36 astronouth7303 isn't the grains object (in jinja) a dict? It'll have a `.get()`. Granted, the execution function `grains.get` is different. (That's how you can use the colon syntax.)
17:36 astronouth7303 (this isn't confusing at all!)
17:36 whytewolf oh it is very confusing :P
17:37 astronouth7303 and just for completeness, salt.grains.get() is almost the same as salt['grains.get'](), except for salt-ssh
17:37 whytewolf yeap, a short cut that doesn't work in salt-ssh
17:38 mikea salt-ssh is blasphemy and should be abolished. How dare we tarnish ourselves by consorting with the likes of Ansible.
17:38 mikea brb :-)
17:38 whytewolf lol
17:47 impi joined #salt
17:51 _KaszpiR_ joined #salt
17:55 J0hnSteel joined #salt
17:56 Hybrid joined #salt
17:56 astronouth7303 https://paste2.org/aMafbbCz my minion with `environment: dev` is reporting 'No Top file or external nodes data matches found.' but cp.list_master shows all the files
17:57 whytewolf and state.show_top on that host?
17:57 astronouth7303 empty
17:57 astronouth7303 even though top.sls has stuff in it in both `dev` and `master`?
17:58 whytewolf humm cp.list_master saltenv='dev' was what you used right?
17:59 astronouth7303 oh, right, there's no environment fall-through in the top-file itself
17:59 astronouth7303 -_-
17:59 astronouth7303 no, i just used `salt testy cp.list_master`
18:00 whytewolf yeah which defaults to saltenv='base' :P
18:00 astronouth7303 but the `testy` minion has its environment set in config file
18:00 astronouth7303 wtf
18:00 astronouth7303 *headdesk*
18:00 whytewolf anyway, i have a meeting. bbl
18:00 astronouth7303 so the minion won't use its own environment when i interogate it?
18:04 J0hnSteel joined #salt
18:06 whytewolf humm, it should. i would have to dig into the function to see if it does. but the default for saltenv is base
18:07 astronouth7303 yeah, the `cp` module explicitly specifies 'base' as the default instead of using the minion's configured environment as default
18:22 astronouth7303 protip: If you're using multiple saltenvs, use yaml anchors in your topfile to reduce copy/paste
18:23 cgiroua joined #salt
18:31 unixdude joined #salt
18:37 sh123124213 joined #salt
18:56 overyander joined #salt
19:00 astronouth7303 ... why is a minion pulling from two environments????
19:00 astronouth7303 just one, though
19:06 onlyanegg joined #salt
19:06 astronouth7303 oh, i see. If you don't specify any environment, it'll use every environment
19:07 whytewolf yes
19:09 astronouth7303 i foolishly assumed it defaulted to the 'base' environment
19:12 whytewolf nope.  top file will determine what enviroment it gets. base is just the default enviroment for tools.
19:15 Guest73 joined #salt
19:23 sh123124213 joined #salt
19:23 _aeris_ joined #salt
19:24 _aeris_ joined #salt
19:27 astronouth7303 oh, that explains the behavior of cp
19:28 astronouth7303 the default mode of salt is to determine the environment based on... whatever? instead of assigning one to the minion
19:29 whytewolf yes
19:30 astronouth7303 i think i prefer the latter
19:39 J0hnSteel joined #salt
19:40 cgiroua joined #salt
19:42 Miouge joined #salt
19:43 Miouge left #salt
19:43 onlyanegg joined #salt
19:56 cyborg-one joined #salt
19:58 astronouth7303 aaaaaaaand i'm getting something similar trying to salt.state: highstate from orch
19:58 astronouth7303 :headdesk:
20:05 J0hnSteel joined #salt
20:06 cedwards joined #salt
20:10 noraatepernos joined #salt
20:11 kiorky joined #salt
20:20 hoonetorg joined #salt
20:23 DammitJim where do I get a default minion config file
20:26 https_GK1wmSU joined #salt
20:27 https_GK1wmSU left #salt
20:29 astronouth7303 DammitJim: the package will install one. salt-cloud can be figured to write one out.
20:29 DammitJim astronouth7303, I"m asking because of a different issue I'm having LOL
20:29 DammitJim my minions keep printing that the default hash_type is md5
20:29 DammitJim and I wonder if that has something to do with the minion config that I'm using from a VM template
20:30 astronouth7303 https://github.com/saltstack/salt/blob/v2017.7.0/conf/minion is the config file packaged with 2017.7.0
20:37 promorphus joined #salt
20:37 WildPikachu in jinja, is {% %} and {{  }} multi-line compatible? can I put {% on one line and %} on the next?
20:38 WildPikachu sorry, in my sls files
20:41 voipmonk joined #salt
20:42 coredumb {% set var = xxxx %}
20:42 DoomPatrol WildPikachu: https://docs.saltstack.com/en/latest/topics/best_practices.html#modularity-within-states
20:42 coredumb {% if var %}
20:42 coredumb etc
20:42 DoomPatrol wait nvm
20:42 * DoomPatrol goes back to digital rock
20:42 vexati0n I'm trying to build an Angular app with Scss/sass using Salt, and the whole thing works beautifully except the "grunt" command blows up when salt executes it--- but the *same* command works fine when I call it from a local interactive session.
20:43 whytewolf i know {% can work on multiple lines. but each block is it's own statment so not sure what the use of that would be. {{ makes less sence as it is just a shortcut for print this thing here.
20:43 WildPikachu thanks :)
20:43 coredumb vexati0n: have you compared env ?
20:44 vexati0n yes and I've replicated the vars that (according to all the hits on google) would cause this issue
20:44 coredumb I guess grunt must be happy with some kind of env from the interactive session that's not in the salt python env
20:44 vexati0n specifically it's Sass complaining about locale
20:44 coredumb ok
20:45 vexati0n i have used the env= on the cmd.run call, but it does not seem to give any craps
20:45 coredumb ok
20:46 whytewolf vex. maybe you need to tell it to use the same shell. by default cmd.run will use sh
20:47 vexati0n yes, i'm specifying /bin/bash as shell also
20:47 vexati0n i assume i'm missing an envvar somewhere but i don't know how to track it down
20:48 astronouth7303 oh jeese locale problems
20:49 astronouth7303 ... why does grunt need a locale?
20:49 astronouth7303 or sass
20:50 btorch So, I just finished setting up a new salt master box as a redundant master server using https://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html . the salt master is up on both master1 and master2, the minion service has had config updated and been restarted, I can talk to minion from master2 now after accepting the key. But now I can' send anything from master1 box anymore
20:53 vexati0n wooop got it to work, finally. i'm going to have to talk to the devs about their lack of dependency management, tho
20:55 aldevar joined #salt
20:55 aldevar left #salt
20:56 mikecmpbll joined #salt
20:59 btorch nvm operator error here :)
21:07 voipmonk left #salt
21:07 aldevar joined #salt
21:13 Guest73 joined #salt
21:20 aldevar left #salt
21:28 fatal_exception joined #salt
21:42 Hybrid joined #salt
21:43 onlyanegg joined #salt
21:47 hemebond joined #salt
21:49 onlyanegg joined #salt
21:51 teratoma joined #salt
22:00 my10c joined #salt
22:01 my10c hello : is it possible for a mine to return 3 values from 3 different grains ? : i need these 3  value to setup my monitor
22:01 my10c soemthing like this :
22:01 my10c mine_functions:
22:01 my10c host_info:
22:01 my10c - mine_function: grains.get
22:01 my10c - tags:ec2_tags
22:01 my10c - mine_function: grains.get
22:01 my10c - tags:apps
22:01 my10c - mine_function: grains.get
22:02 my10c - fqdn_ip4
22:02 whytewolf please don't paste to channel
22:03 my10c ack
22:03 whytewolf and no. 1 function call per mine_function.
22:03 Guest73 joined #salt
22:04 whytewolf let me check something though
22:04 my10c yeah reading the code that is what i see : i guees write a new grain taht returns a list
22:04 whytewolf nope.
22:04 my10c @whytewolf thanks
22:04 whytewolf grains.item
22:05 whytewolf https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.item
22:05 whytewolf 1 function that can return more then 1 grain
22:06 my10c ill write a new grains : was hoping did't have to : want  to dynamically adding host to monitor (not deciced which yet : nagios, icinga3 or naemon)
22:07 whytewolf ...
22:07 whytewolf reread the last thing i just posted
22:07 whytewolf grains.item can return the three different grains
22:09 my10c the thing is it need to return something like mygrain.info and mygrain.info2
22:09 my10c that got me stuck
22:09 https_GK1wmSU joined #salt
22:11 https_GK1wmSU left #salt
22:11 whytewolf 1huh
22:11 my10c it returns fqdn_ip4 ok the 2 other empty
22:12 my10c these are in the form of mygrain:xxx
22:12 my10c wait works!
22:12 whytewolf one second let me check something cause grains.item should work
22:12 whytewolf ok
22:12 my10c ARG! so sorry i forgot to restart the minion :
22:13 whytewolf ... use pillar to push your mine)functions and you don't have to restart the minion :P
22:13 my10c more coffee : thanks!!
22:13 my10c yup : but the info are generated by grains we wrote  :-) : using aws back-end stuff
22:14 whytewolf ??? that ... doesn't mean squat to how you configure the mine_functions.
22:15 whytewolf I'm saying if you push the mine_function settings through pillar you don't have to restart the minion to update the settings
22:16 my10c i have it in minion config : and yes : i should create a mine.sls under pillar
22:16 whytewolf i know you have it in miion config :P thats why you have to restart :P
22:16 rpb joined #salt
22:17 my10c just wanted to get it working first : end resut : pillar -> top.sls -> include mine.sls -> mine mine.functions
22:17 my10c :-)
22:17 my10c so yes that was the plan
22:17 whytewolf i always start with the pillar. makes it quicker to test. but hey. to each their own
22:17 sh123124213 joined #salt
22:18 cyborg-one joined #salt
22:18 my10c i have a single test server : salt/minion before moving the tested result to prod :)
22:18 my10c triple check just in case i hit a bug
22:19 whytewolf kewlies. I have about 10 master/minions that i jumble around different things with. i guess one of the things i avoid though is putting anything i can avoid into a config.
22:20 noraatepernos joined #salt
22:20 my10c mee to all in salt and jije template
22:20 my10c jinja
22:21 my10c only way to make things maintainable
22:22 my10c thanks about to pucsh tp prod :)
22:32 my10c left #salt
22:35 ssplatt joined #salt
23:13 Reverend joined #salt
23:21 preludedrew joined #salt
23:22 ninjada joined #salt
23:23 http_GK1wmSU joined #salt
23:24 http_GK1wmSU left #salt
23:32 cyborg-one joined #salt
23:36 zerocoolback joined #salt
23:37 noraatepernos joined #salt
23:42 jinjaman joined #salt
23:44 _aeris_ joined #salt
23:49 jinjaman joined #salt
23:53 jinjaman hi
23:54 raspado joined #salt
23:57 http_GK1wmSU joined #salt
23:58 http_GK1wmSU left #salt
23:59 woodtablet left #salt

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