Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-03-10

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

All times shown according to UTC.

Time Nick Message
00:01 alexlist joined #salt
00:12 * gtmanfred needs to go to the store for some beer for the `Meet the Maintainers` Cocktail hour tomorrow
00:13 gtmanfred relidy: will you check if there is a feature request like mysql.script? it would be nice to be able to transfer over a .sql file and run it in the database
00:13 gtmanfred nevermind
00:13 gtmanfred relidy: https://github.com/saltstack/salt/issues/10272
00:13 saltstackbot [#10272][OPEN] Import MySQL files into created databases | We should add MySQL file import functionality to the MySQL states. I am not yet sure whether its nicer to add it to the `present` function as an optional file argument or introduce a new state module....
00:15 edrocks joined #salt
00:16 relidy gtmanfred: Ha! Even claims support is coming in the next release. Thanks for checking on that.
00:16 gtmanfred relidy: yeah, it will be in nitrogen
00:17 relidy I can never keep the version names straight.
00:17 gtmanfred the spring 2017 release
00:18 * relidy nods
00:24 dps joined #salt
00:25 sp0097 joined #salt
00:25 * cachedout eyes gtmanfred's earlier comment
00:25 * cachedout checks to make sure HR isn't in IRC
00:26 cachedout Yup, we're good. Carry on. ;]
00:27 gtmanfred heh
00:30 gtmanfred cachedout: if you are looking for something to merge... https://github.com/saltstack/salt/pull/39911 has passing tests :P
00:30 saltstackbot [#39911][OPEN] add subset to orchestrate | What does this PR do?...
00:30 cachedout gtmanfred: I am working on the PR queue right now as a matter of fact. I'll take a peek.
00:31 gtmanfred yar, i have been watching the furry of activity in #salt-devel
00:32 gtmanfred fury*
00:32 gtmanfred flurry...
00:32 gtmanfred one of those
00:36 eprice joined #salt
00:37 cachedout gtmanfred: Reviewed. I have a few questions so have a look.
00:39 netcho joined #salt
00:44 dankolbrs joined #salt
00:44 shoemonkey joined #salt
00:48 PhilA joined #salt
00:50 juntalis joined #salt
00:51 jas02 joined #salt
00:55 bbradley joined #salt
00:55 abednarik joined #salt
00:56 tercenya joined #salt
01:01 tercenya joined #salt
01:03 jimklo joined #salt
01:15 tercenya joined #salt
01:15 jimklo joined #salt
01:21 Poppabear joined #salt
01:21 Poppabear joined #salt
01:21 Poppabear anyone awake :P
01:22 jimklo joined #salt
01:23 Poppabear is there any reason why salt-key -y -a 'minion' might return a non zero exit code but still work as expected ??
01:25 Ch3LL Poppabear there needs to be some improvments on the exit codes in salt. This issue is tracking that: https://github.com/saltstack/salt/issues/18510
01:25 saltstackbot [#18510][OPEN] salt exit codes | is there a reason why test.\* returns False and exits with bash exit code 0 instead of 1 ?...
01:25 jimklo joined #salt
01:27 dps joined #salt
01:38 raspado joined #salt
01:46 Poppabear Ch3LL: thanks for the response .. so i'm wondering why for example i can run the command via bash, and echo $? and get '0' .. however if i am running it via PHP Symfony Process component why it is that the exit code is coming through as Null ... (not sure where the issue lies, with Salt or Symfony)
01:47 Poppabear all other salt commands (so far) doesn't seem to be an issue with reporting at-least a valid exit code, this command seems to be for some reason not reporting (to symfony) a valid exit code
01:58 J0hnSteel joined #salt
02:02 Nahual joined #salt
02:08 jas02 joined #salt
02:10 Ch3LL oh i think i misread your comment the first time you are getting a non zero exit code even though the command returns correctly..i read that backwards
02:11 Ch3LL i'm not familiar with symfony...is that calling salt's api?
02:15 edrocks joined #salt
02:18 raspado joined #salt
02:19 raspado joined #salt
02:20 Poppabear Ch3LL: no its literally just starting a sub process on the shell .. no different then executing "shell_exec('salt-key -y -a minion')" (if you are familiar with PHP)
02:22 Poppabear further testing reveals that it is something with Symfony (salt-key is in fact returning 0) some how Symfony's Process component is getting something different however.
02:22 patrek_ joined #salt
02:22 Poppabear exec("salt-key -y -a 'ubuntu'", $out, $retcode);
02:22 Poppabear $retcode = 0
02:23 Poppabear so php understands but Symfony doesn't
02:23 Poppabear lol
02:23 Poppabear who knows
02:29 rem5 joined #salt
02:32 Ch3LL okay sorry i couldnt' help much more. let me know if i can help with anything else though
02:40 sp0097 joined #salt
02:41 om2 joined #salt
02:46 om2 joined #salt
02:46 chadhs joined #salt
02:46 catpiggest joined #salt
02:46 shoemonkey joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.5, 2016.11.3 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers <+> Meet the Maintainers Friday, March 10th 3:00 PM MST https://goo.gl/pLv8Fz
02:50 Tanta joined #salt
03:11 evle joined #salt
03:16 sp0097 joined #salt
03:16 nickSalt joined #salt
03:23 ninjada joined #salt
03:27 dps joined #salt
03:34 swa_work joined #salt
03:37 cyteen joined #salt
03:48 cyteen joined #salt
03:51 chadhs joined #salt
03:53 Praematura joined #salt
03:56 xMopxShell joined #salt
03:56 sh123124213 joined #salt
03:58 jerrcs joined #salt
04:00 djgerm joined #salt
04:00 djgerm Is there a salt-state style guide out there?
04:00 eprice_ joined #salt
04:00 hemebond Style guide for states?
04:01 fracklen joined #salt
04:02 djgerm yeah… sorta like https://docs.saltstack.com/en/latest/topics/development/conventions/style.html
04:02 djgerm good and discouraged stylistic choices for writing states
04:06 eprice_ left #salt
04:07 shoemonkey joined #salt
04:12 leonkatz joined #salt
04:17 edrocks joined #salt
04:19 hemebond The only recommendations I can think of are, use the short-form for module functions (i.e., module.function rather than module: \n- function)
04:19 hemebond And my own "use filename as state ID for managed files)
04:19 djgerm those are good ones! a collection of things like that would be pretty interesting.
04:20 jas02 joined #salt
04:21 rdas joined #salt
04:22 hemebond I'm not sure there are too many guidelines possible for states.
04:22 hemebond They're pretty strict.
04:22 hemebond It'd be like trying to write a style guide for calling functions.
04:23 hemebond There are guidelines for formulas.
04:32 chadhs joined #salt
04:43 rim-k joined #salt
04:50 Praematura joined #salt
04:51 rem5 joined #salt
04:56 dhoutz joined #salt
05:02 PrashantRaje joined #salt
05:02 PrashantRaje Windows 7 minion is giving error "Unable to locate package firefox" for sudo salt '<name>' pkg.install firefox
05:02 hemebond PrashantRaje: You have setup your Windows repository and packages?
05:04 whyzgeek joined #salt
05:04 PrashantRaje Yes, I am able to ping and list_pkgs also
05:05 PrashantRaje even if  try to remove installed package it is giving same error "unable to locate pakage"
05:07 PrashantRaje salt -G 'os:windows' pkg.refresh_db is giving 0 failed 0 success 0 total
05:07 PrashantRaje You have setup your Windows repository and packages?---- anything more i need to do for windows, please help
05:08 hemebond No, I no longer have any Windows minions and I'm not familiar with the new way of setting up a Windows package repo.
05:08 PrashantRaje new way of setting up a Windows package repo---Any documentation at which you can point me
05:09 hemebond https://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html
05:09 PrashantRaje its not giving any details if salt -G 'os:windows' pkg.refresh_db is giving 0 failed 0 success 0 total
05:09 hemebond What instructions did you follow to set up the repository?>
05:11 PrashantRaje sudo salt-run winrepo.update_git_repos
05:11 PrashantRaje https://github.com/saltstack/salt-winrepo.git:     True
05:12 hemebond And is there stuff in win/repo-ng/salt-winrepo-ng/ ?
05:13 PrashantRaje win/repo    directory only no repo-ng/ directory created
05:14 hemebond winrepo.genrepo ?
05:14 hemebond salt-run winrepo.genrepo
05:15 gableroux joined #salt
05:17 PrashantRaje Failed to compile /srv/salt/win/repo/salt-winrepo.git/duplicati_x86.sls
05:19 msn joined #salt
05:22 marie1972 left #salt
05:24 PrashantRaje salt-run winrepo.genrepo is failed at multiple places
05:25 impi joined #salt
05:27 tedops joined #salt
05:27 tedops hey what happened to pkg.absent?
05:29 PrashantRaje 'pkg.absent' is not available
05:31 hemebond pkg.absent? Did that ever exist? That's a Puppet thing.
05:32 tedops ooh, dems fightin' words :)
05:32 tedops I could have sworn pkg.absent was a thing, maybe in a 2014 release? it's been a long time since I've needed it
05:32 hemebond Salt has pkg.removed
05:33 hemebond Looks like it was pkg.absent back in 2014.
05:34 tedops ok, phew...yeah looks like pkg.purged is the bulldozer we need
05:35 PrashantRaje salt winminion pkg.remove firefox salt winminion pkg.purge firefox  both giving "unable to locate pakage firefox" error
05:36 fracklen joined #salt
05:37 hemebond Odd, I see people mention pkg.absent but can't find it in the code at that point in time.
05:37 hemebond You know, I don't think pkg.absent _was_ ever a thing.
05:42 tedops ^ agreed...I'm not seeing any methods named absent in salt/states/pkg.py history on master
05:42 tedops hrrrm
05:43 tedops ok, well thanks regardless
05:45 mpanetta joined #salt
06:02 cyteen joined #salt
06:04 ninjada joined #salt
06:09 jas02 joined #salt
06:10 shoemonkey joined #salt
06:13 sh123124213 joined #salt
06:20 ninjada joined #salt
06:29 cowyn joined #salt
06:34 sh123124213 joined #salt
06:41 dariusjs joined #salt
06:42 cowyn joined #salt
06:44 rim-k joined #salt
06:44 cowyn joined #salt
06:45 teclator joined #salt
06:47 bocaneri joined #salt
06:50 lasseknudsen joined #salt
06:57 FredFoo joined #salt
06:58 alem0lars The URL https://bootstrap.saltstack.org gives: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
06:58 alem0lars Is salt team already aware of that ?
07:02 jas02 joined #salt
07:03 hemebond Is it supposed to be accessed over HTTPS?
07:03 tedops I think the answer to that today is always yes :D
07:03 hemebond https://github.com/saltstack/salt-bootstrap
07:03 hemebond That says .com
07:03 hemebond Where is .org listed?
07:04 tedops confirmed .com works
07:05 fracklen joined #salt
07:11 rem5 joined #salt
07:16 hasues joined #salt
07:17 hasues left #salt
07:18 cowyn joined #salt
07:19 edrocks joined #salt
07:24 ninjada joined #salt
07:29 cowyn joined #salt
07:34 ninjada joined #salt
07:34 jas02 joined #salt
07:51 golodhrim|work joined #salt
07:54 fracklen joined #salt
07:55 ronnix joined #salt
07:56 impi joined #salt
07:58 alem0lars I'm trying to use kitchen-salt
07:58 rim-k joined #salt
07:58 tedops left #salt
07:58 alem0lars https://github.com/simonmcc/kitchen-salt
07:59 alem0lars when I run 'kitchen test' it tries to contact that url'
07:59 alem0lars and gives the following error:
08:00 alem0lars https://paste.pound-python.org/show/h03mG3ZlmGGg9uJAlAd6/
08:00 alem0lars hemebond , tedops -^
08:02 hemebond Sorry, never used kitchen-salt
08:02 aldevar joined #salt
08:11 shoemonkey joined #salt
08:17 squig joined #salt
08:17 ravenx joined #salt
08:17 squig I am using an external node classifier to apply states to my nodes, but I still need to have a top file that essentially does nothing.
08:18 squig is there a null state I can apply?
08:18 hemebond null state?
08:18 hemebond You can have base: []
08:19 cyborg-one joined #salt
08:20 squig thanks hemebond
08:20 ravenx hey guys, is it possible, to have a template that need to be populated live in a git repo, along with the pillar data, in a git repo
08:21 ravenx and then have a state which populates it via something like file.managed?
08:21 darioleidi joined #salt
08:21 cyteen joined #salt
08:21 ravenx I am asking because:  my configuration template is in /srv/salt/super-app/  and the pillar data, containing things like:   `host:  localhost, port:  1234` is in /srv/pillar/super-app
08:21 hemebond populated live? what kind of template? a template for a state?
08:22 ravenx a template for my config file:   which contains things like:
08:22 ravenx host = {{ pillar['super-app']['host'] }}
08:22 hemebond Oh.
08:22 hemebond What's the problem?
08:22 ravenx under normal circumstances, when i do file.managed, salt will be like:   "grab the pillar data from /srv/pillar/super-app/init.sls, and used those K:V to populate this template"
08:23 ravenx the problem is that:   i want the developers to change the K:V in the repository of the code, so that when they git push their code changes, that's it.
08:23 ravenx they do not have to also keep a copy of /srv/pillar/super-app/init.sls, just so they can change the values of a configuration file.
08:24 hemebond I don't understand.
08:24 hemebond Are your states and pillars in the same repo?
08:24 ravenx which part did i lose you?
08:24 hemebond Is that what you're asking?
08:24 hemebond "they do not have to also keep a copy of /srv/pillar/super-app/init.sls, just so they can change the values of a configuration file."
08:24 ravenx yes, i would like /srv/pillar/super-app/init.sls (which contains the K:V) pairs to be in the git repo
08:25 ravenx ah okay let me explain that again:
08:25 ravenx right now the K:V pair of the data is stored in /srv/pillar/super-app/init.sls and that is for populating my template right?
08:25 hemebond Sure
08:25 ravenx file.managed states in my formulas handle that.
08:26 duncanmv joined #salt
08:26 ravenx now, if i was a developer, i am working on super-app, all my changes in terms of code, functionality will get pushed into the super-app repo.
08:26 ravenx however, if i want to change the K:V of my super-app config...
08:26 ravenx i need to go to the repo, where /srv/pillar/super-app/ is, and change it from there.
08:26 ravenx so now i have to git push a second time, to a different repo.
08:27 hemebond What is super-app? A formula?
08:27 ravenx correct.
08:27 ravenx super-app is a git project and /srv/salt/super-app/ is a formula which doe sthree things:
08:27 ravenx git clones, builds it, and popuilates the template of my configuration file.
08:28 hemebond Do you mean... you do a state.apply on commit?
08:28 ravenx i do not, nope. it is done manually.
08:28 ravenx hm...how can i say this better...
08:28 hemebond I need you to use Salt terms as much as possible.
08:29 hemebond "git clones, builds it" why is Git building your formula?
08:29 hemebond And how does one build a formula?
08:29 ravenx my salt formula has three states:    git.pull, npm.install and file.managed
08:29 ravenx let me paste it for ya:
08:31 hemebond Oh, your _formula_ does a `git pull`, installs something, and writes some config files?
08:31 ravenx yes!
08:32 ravenx yes!
08:32 ravenx it does that
08:32 hemebond Gotcha, okay.
08:32 hemebond Well, formulas should have a set of defaults (map.jinja usually) that can be overridden with pillars.
08:32 fracklen joined #salt
08:33 hemebond If the app has values that don't change depending on where they're deploying, or sensible defaults, those go into map.jinja.
08:33 hemebond Then you don't need any pillar data.
08:35 ravenx hang on i have an epic paste coming in ;)
08:36 candyman88 joined #salt
08:37 ravenx https://paste.debian.net/919083/
08:37 ravenx here we go
08:38 ravenx this is my setup.  and i manually do:   salt 'server' state.sls super-app and everything is fine.  everything works.
08:39 hemebond Right so you just need to provide some default values.
08:39 hemebond Then allow them to be overridden by pillars.
08:39 ravenx what I don't like is the fact that, my key:value pairs are stored in /srv/pillar/super-app/init.sls.  i wish it can be stored in the git repository, so that, during the git.latest state, it can grab them from /path/that/is/not/srv/pillar
08:39 ravenx ow can i do that?
08:39 hemebond https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#abstracting-static-defaults-into-a-lookup-table
08:40 ravenx so you say, in super-app.conf, provide defaults?
08:41 ravenx what about this:    can i move /srv/pillar/super-app/init.sls into the git repo, and have file.managed refer to that place for the K:V?
08:41 ravenx my original plan was to use symlinks :P
08:41 hemebond Yuck, don't do that.
08:41 hemebond Create a map.jinja or defaults.yaml
08:41 ravenx ln -s /srv/pillar/super-app/init.sls /project/repo/configfile   :P
08:41 ravenx ah i see
08:42 hemebond Import it at the top, using Jinja, as superapp.
08:42 ravenx a map.jinja is project specific?
08:42 hemebond Then reference that superapp variable in your conf template.
08:42 ravenx ah okay
08:42 hemebond map.jinja is for that particular formula.
08:42 ravenx i see
08:42 hemebond {{ superapp.urls_super }}
08:43 hemebond It will already either be the default value from the formula or a new value from the pillar data.
08:43 hemebond It gets merged in map.jinja.
08:43 cowyn joined #salt
08:44 hemebond If you don't want to allow overrides then just use defaults.yaml which will just be the K:V stuff.
08:44 hemebond But you should use map.jinja
08:44 ravenx this way, i can keep my existing file.managed,?
08:44 ravenx how will it know to use the data from map.jinja, or the ones from /srv/pillar?
08:44 hemebond Yes.
08:44 hemebond Because the .conf file itself will be updated to reference the jinja variable instead of querying pillar directly.
08:45 hemebond {{ superapp.myvar }} rather than {{ salt['pillar.get']('myvar') }}
08:45 ravenx aaah i see
08:45 ravenx however, this means that developers who wish to change the configuration file, will also need to do it in /srv/salt/super-app folder though?
08:45 ravenx for example:     urls_super:  is no longer /super.   it is now  /superduper
08:46 hemebond Yes, they would be updating the formula.
08:46 hemebond They are providing defaults.
08:46 ravenx i see
08:46 hemebond You _could_ just override it via pillar.
08:46 hemebond And not touch the formula.
08:46 ravenx and there is no one to accomplish this all from a common repo:   super-app, the one that git.latest pulls
08:46 hemebond But if the default should change then they need to update the formula.
08:46 ravenx gotcha..
08:47 ravenx symlinks are looking so tempting right now hahaha
08:47 hemebond You can't keep your code and data separate and then try to smush them together.
08:47 hemebond That would be a terrible solution.
08:47 ravenx they're just complaining how now they gotta git pull: yet another repo
08:47 ravenx to maintain and making sure it is the latest
08:48 hemebond Are you installing their application?
08:48 hemebond I mean, I just explained how to do it in one repo.
08:48 ravenx yeah i am
08:48 hemebond It doesn't even sound like you want/need pillar data.
08:48 ravenx i dont? :o
08:49 hemebond Why doesn't their application put out a config file?
08:49 ravenx wait, your method onyl involves the actual CODE repo?
08:49 hemebond No. Pillar is so you can configure the application when you deploy it, to customise it to your environment/server,
08:49 hemebond If you don't want to customise the software for your server or environment, then use the app defaults.
08:50 ravenx aaah
08:51 ravenx and the app defaults will live in......
08:51 ravenx this is the missing link
08:51 hemebond map.jinja
08:51 hemebond Or a defaults.yaml
08:51 ravenx and this map.jinja is in the git repo of my code
08:51 ravenx or the /srv/salt/super-app?
08:51 hemebond Use map.jinja
08:51 hemebond It goes in the formula.
08:51 ravenx aaah
08:52 ravenx so then all i need to do is worry about the formula of /srv/salt/super-app?
08:52 ravenx or, rather, "we"
08:52 ravenx map.jinja lives in the formula.   and the super-app.conf teplate lives in /srv/salt/super-app
08:52 ravenx gotcha
08:52 hemebond If the developers are providing defaults for their application and you don't need to override, they should be creating the configuration file.
08:53 ravenx too bad it doesn't work like that in my comapny :(
08:53 cdunklau i'm having a heck of a time finding out how to get gitfs things available to my minions.... do i need to specify something in file_roots or a topfile or something once i set up the gitfs_remotes?
08:53 hemebond Then they don't get to complain about having to update the repo.
08:53 hemebond cdunklau: gitfs isn't used by your minions.
08:53 hemebond It's used by your master.
08:54 ravenx hemebond: hahaha true
08:54 cdunklau hemebond: right right, i mean how do i get stuff on gitfs to be available to the master, like the state tree
08:54 ravenx hemebond: thank you so much for your time today.  i really appreciate it
08:54 cdunklau hemebond: or have i completely misinterpreted this
08:54 hemebond ravenx: Good luck ????
08:54 ravenx :)
08:55 hemebond cdunklau: gitfs automatically pulls down at certain intervals (each minute I think).
08:55 cdunklau hemebond: okay, i read that... where does it put stuff?
08:55 hemebond If you've configured your gitfs properly on your master then it will be transparent.
08:55 hemebond You put stuff in the git repo.
08:55 hemebond Have you already used Salt without gitfs?
08:57 Electron^- joined #salt
08:57 rim-k joined #salt
08:59 cdunklau hemebond: not really, i'm jumping in probably the wrong way. but on the master, i see states in /srv/salt/
08:59 cdunklau hemebond: one is called vim
08:59 hemebond before trying to use gitfs, try and use salt with just files on the disk.'
08:59 hemebond It's easy to move things later once you understand how it works.
08:59 cdunklau hemebond: on a minion, i run salt-call state.show_sls vim, and it dumps me the things for that state
09:00 cdunklau hemebond: so i _think_ i understand that at least mostly
09:02 cdunklau then i have a gitfs remote set up with root: child/grand  and mountpoint   myproject. So i expect that the things in the repo at {REPOROOT}/child/grand will be available via salt-call state.show_sls myproject.something
09:02 cdunklau hemebond: does that seem right?
09:03 hemebond I don't use gitfs, lemme read up quickly.
09:04 hemebond So you have fileserver_backend with git in the list?
09:04 cdunklau hemebond: pretty sure yes, checking
09:04 cdunklau hemebond: yep, i have roots and gitfs under fileserver_backend
09:05 hemebond And what is your gitfs_remotes? Can you paste that somewhere
09:05 hemebond ?
09:06 teclator joined #salt
09:06 cdunklau oh wait... i don't have anything referencing the mountpoint in the topfile
09:06 mede joined #salt
09:06 cdunklau that would probably do it
09:06 hemebond top files don't reference mount points.
09:06 hemebond All they do is specify states.
09:07 cdunklau ah so i don't need a topfiles entry to reference a state via salt-call?
09:07 hemebond No.
09:08 armyriad joined #salt
09:08 cdunklau hemebond: https://bpaste.net/show/b221b3d87bf1
09:08 cdunklau gitfs remotes
09:09 cdunklau hemebond: side question: this is included in the main master config. if there are gitfs_remotes defined elsewhere, does that config get merged or does one overwrite/shadow the other?
09:10 hemebond Uh, pass. You'd have to test. It's possible to query the current master config. Or just put the master into debug mode and check the logs.
09:10 cdunklau i couldn't really find that discussed anywhere in the docs
09:11 hemebond Okay, so you have a git repo that contains the directory /vmplatform/saltfs/ and you will be referencing the states in that repo via myteam.mystatetoapply
09:11 mikecmpbll joined #salt
09:11 hemebond Assuming, of course, that the salt master can fetch your repo.
09:11 cdunklau yes
09:12 hemebond Well it looks fine to me.
09:12 hemebond What happens when you try to apply the state?
09:14 cdunklau No matching sls found for 'myteam.python' in env 'base'
09:14 impi joined #salt
09:15 cdunklau i have /vmplatform/saltfs/python.sls in the repo
09:15 hemebond Have you changed the environments setting at all?
09:15 hemebond Are you running it from the master?
09:15 hemebond salt minion state.apply myteam.python
09:16 cdunklau hemebond: no, that's using salt-call state.show_sls myteam.python  on a minion
09:16 hemebond Try from the master.
09:16 cdunklau but i'll try it from the master
09:16 s_kunk joined #salt
09:17 mede hi guys, i have an issue with salt returners: i want to store all my returned jid data into mysql. I have the mysql tables setup, my salt master can connect to mysql... but this is the error i get after i run salt my-host test.ping : https://gist.github.com/anonymous/72711bed48846143f403634c5def0fbd
09:18 cdunklau hemebond: https://bpaste.net/show/a572c54e4883 well that's disheartening
09:18 cdunklau i don't believe i've touched the pillar config. but that gives me something to chase at least
09:19 hemebond That's easy. Create a top.sls with base: []
09:19 dariusjs joined #salt
09:19 cdunklau hemebond: where, in the repo's /vmplatform/saltfs ?
09:20 hemebond Check pillar_root
09:21 hemebond *pillar_roots
09:21 hemebond default is /srv/pillar
09:21 cdunklau hemebond: yep that's all i see for base:
09:21 cdunklau hemebond: so that's where i create the top.sls?
09:21 hemebond yip
09:21 edrocks joined #salt
09:21 cdunklau lol
09:22 cdunklau that's not a valid yaml file :D
09:22 hemebond What isn't?
09:22 hemebond /srv/pillar/top.sls
09:22 hemebond base: []
09:22 cdunklau hemebond: my /srv/pillar/top.sls
09:23 cdunklau hemebond: it was something like  base:\n  '*':\n
09:23 cdunklau that's it
09:23 hemebond Yeah, that's wrong :-D
09:24 cdunklau :(
09:24 cdunklau [root@salt salt]# cat /srv/pillar/top.sls
09:24 cdunklau base: []
09:24 cdunklau but i get the same error when i try to apply the state
09:24 hemebond That's odd. Shouldn't be the same error.
09:26 cdunklau it says minion returned with non-zero exit code...
09:26 * cdunklau checks the minion logs
09:26 hemebond Okay, put your minion into debug mode.
09:26 hemebond Edit the minion config and put log_level: debug
09:26 hemebond Then restart it.
09:27 hemebond Then apply the state again and check the minion log.
09:30 cdunklau hemebond: could not find file 'salt://myteam/python.sls' in saltenv 'base', and could not find file 'salt://myteam/init.sls' in saltenv 'base'
09:30 hemebond Oh, right.
09:30 cdunklau what's that init.sls thing. is it a special name or more likely something from another config?
09:30 hemebond Create an empty init.sls
09:30 cdunklau in the git repo, right?
09:30 hemebond Yes. In Python __init__.py is a special file that "activates" a directory.
09:30 hemebond In the repo, yes.
09:31 cdunklau aaaaah
09:31 hemebond So Salt does the same thing, which is why we reference Salt states with the same dot-notation.
09:31 cdunklau hemebond: gotcha
09:31 hemebond Hmm. I wonder if you do actually need it for Salt.
09:31 cdunklau hemebond: i'm a python guy, so no need for the long-winded explaination
09:31 hemebond Oh right :-D
09:31 cdunklau you can just say "it's like __init__.py"
09:32 cdunklau i'll give that a show
09:32 cdunklau shot*
09:32 hemebond I think it's like __init__.py.
09:32 cdunklau hemebond: you said 60 seconds between gitfs pulls?
09:32 hemebond Yeah
09:33 hemebond I don't have an init.sls in all my directories.
09:33 hemebond So it probably isn't required.
09:33 cdunklau hemebond: what about your subdirectories? :)
09:33 hemebond That's where I'm lookng.
09:33 hemebond I just have other sls files.
09:33 cdunklau but yeah, since it's looking first for python.sls, it really should find it
09:33 hemebond e.g., /roles/mystate.sls
09:33 hemebond But it works fine.
09:34 hemebond It almost seems more likely it isn't pulling the repo.
09:34 hemebond Have you checked the master log for errors?
09:34 cdunklau it makes sense that it would look for init.sls only as a fallback, if it has the same semantics as Python modules
09:35 cdunklau hemebond: the log doesn't contain the string mycompany
09:35 cdunklau hemebond: from the gitfs_remote
09:35 cdunklau hemebond: i have it on info right now though, i'll bump it to log debug and try again
09:36 hemebond So it was showing stash..com:7999?
09:36 cdunklau hemebond: no i mean it wasn't showing any log line with that string
09:36 mavhq joined #salt
09:36 cdunklau so i imagine there were no errors
09:37 cdunklau but maybe it's not even trying
09:37 hemebond Oh. Debug should hopefully show it pulling the repo.
09:37 ravenx hemebond: hey, if the map.jinja that i just wrote, goes into the init.sls file which is the formula, how am i able to import it
09:37 Klaus_Dieter joined #salt
09:37 Klaus_Dieter hello world
09:37 cdunklau gitfs_global_lock is enabled and update lockfile /var/cache/salt/master/gitfs/4b00443133c143d7d8b6fbfd68837bdc7520d456eafa3fe4c315ca5004a34555/.git/update.lk is present for gitfs remote 'https://github.com/saltstack-formulas/graphite-formula'.
09:37 ravenx using the "from ... import"
09:37 cdunklau well, now that message is a lot more obvious
09:38 ravenx hemebond: i always thought that map.jinja was it's own file, living in /srv/salt/super-app
09:38 cdunklau i thought that was junk and ignored it, because i saw it from the beginning
09:38 hemebond ravenx: If you're put it into init.sls instead of a separate file (map.jinja) then you don't need to import it.
09:38 ravenx aaah i see
09:38 ravenx thanks
09:38 cdunklau but now... it certainly makes sense that if a global lock file is stuck, no other git remotes will be working
09:39 cdunklau ugh
09:39 cdunklau hemebond: this gives me something to poke at
09:39 cdunklau hemebond: thanks for your help
09:39 hemebond cdunklau: Good luck ????
09:39 ravenx cdunklau: same.  salt i sbetter th an my marriage
09:39 ravenx at least it gives me something to poke at.
09:39 cdunklau ba dum tssssh
09:39 hemebond ravenx: You might need to pass the variable explicitly to your file.managed.
09:40 ravenx hemebond: oh that would be an interesting step...
09:40 ravenx i thought i'd pass it in the template file
09:41 hemebond file.managed has a context parameter where you can pass variables.
09:41 hemebond Then in the template file you just use {{ myvar.blash }}
09:41 ravenx aaaah
09:41 ravenx gotcha
09:41 ravenx let me try this ou tnow
09:41 ravenx if i don't want to use it grains
09:41 ravenx i dont have to right?  most of the examples have grains filter by in them
09:42 cdunklau okay, so i should probably just remove that lockfile
09:42 hemebond You don't.
09:42 hemebond You could just have a regular dict that gets merged with pillar data.
09:42 hemebond Let me get the function for you.
09:43 cdunklau right? it's been complaining about that for... at least several weeks
09:43 hemebond {%- set settings = salt['pillar.get']('myapp', defaults, merge=True) %}
09:43 hemebond defaults, in this context, is just a dict I've created immediately above that line.
09:44 hemebond {%- set defaults = {} %}
09:44 hemebond (with stuff in it obviously)
09:44 hemebond So I am merging the pillar data on top of my defaults dict.
09:45 netcho_ joined #salt
09:45 cdunklau 2017-03-10 03:44:03,047 [salt.transport.ipc][ERROR   ][26748] Exception occurred while handling stream: [Errno 0] Success
09:45 cdunklau well that's... helpful
09:45 hemebond lol
09:45 ravenx hemebond: do i need any headers in my map.jinja?  i seem to notice a { %set ...    however, in the event that i'm not using grains_os, what do i put ther?
09:45 ravenx do you have an exa,mple?
09:47 hemebond ravenx: https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#sane-defaults
09:47 hemebond That
09:47 hemebond is a better example for your requirements.
09:47 ravenx but that's a defaults.yaml o_O
09:47 ravenx not a map.jinja
09:47 hemebond Yeah, similar idea though.
09:48 ravenx ah, okay
09:48 ravenx so i use defaults.yaml then.
09:48 hemebond map.jinja is just a convention.
09:48 hemebond Yeah, that would make it clearer.
09:48 ravenx :D ty
09:49 cdunklau wtf i put the loglevel down to trace and i still only get 2017-03-10 03:49:03,842 [salt.transport.ipc][ERROR   ][1878] Exception occurred while handling stream: [Errno 0] Success
09:50 cdunklau how do i convice it to log a traceback
09:50 hemebond I suspect that's as much as you're going to get.
09:51 cdunklau but i want to *see* the freaking exception ugh
09:51 hemebond Exceptions are usually logged under error.
09:51 cdunklau it is, it's just not giving a stack trace
09:52 cdunklau okay, one lower loglevel and hope i don't get lost reading it
09:52 rim-k joined #salt
09:53 Neighbour If I want to construct a pillar.sls-file with jinja...can I already access the pillar of the minion the pillar is assigned to in the top.sls?
09:53 cdunklau aaaand garbage doesn't have anything more either
09:53 * cdunklau prays
09:53 hemebond Neighbour: No, you can't use pillars in pillars.
09:53 hemebond (some minor exceptions exist but best not to try)
09:53 om2 joined #salt
09:54 Neighbour hemebond: shame, then I'd have to implement my own "extend pillar"-orchestration states :)
09:54 Cadmus My coffee hasn't kicked in yet, what's the right way to say "Salt, show me all minions with the grain os_major_release: 3957838"
09:54 hemebond Neighbour: I just use a jinja file for shared data.
09:54 cdunklau oh hey it's in the systemd log
09:54 ravenx Cadmus: it's voice activated, just yell that line into your mic
09:55 cdunklau apparently it doens't log below warning to the file
09:55 Neighbour Cadmus: use the grain selection for something simple like test.ping
09:55 Cadmus ravenx: It doesn't have a cutesy name like Alexa or Cortana? I want my money back!
09:55 ravenx hahah
09:55 Cadmus Thanks folks :)
09:55 ravenx Cadmus: will a paper clip work?
09:55 Neighbour Cadmus: like `salt -G 'os_major_release:3957838' test.ping`
09:55 Neighbour (which is *very* similar to the example at root@main:~# host mgmtb.test.ogdsoftware.nl
09:55 Neighbour mgmtb.test.ogdsoftware.nl is an alias for ec2-34-248-117-128.eu-west-1.compute.amazonaws.com.
09:55 Neighbour ec2-34-248-117-128.eu-west-1.compute.amazonaws.com has address 34.248.117.128
09:55 Neighbour whoops
09:56 ravenx :>
09:56 Neighbour to the example at https://docs.saltstack.com/en/latest/topics/targeting/grains.html
09:56 Neighbour really..I need to keep track of which clipboard sits where :)
09:56 jhauser joined #salt
09:56 Neighbour or auto-clean it somehow
09:57 Cadmus ravenx: "You appear to be trying to construct a full orchestration system while dogged by recalitrant DBAs, would you like some help with that?"
09:57 ravenx Cadmus: hahahaha!
09:57 abednarik joined #salt
09:58 Cadmus Neighbour: I thought it might be the case you need a thing for salt to 'do', that worked, thanks
09:58 Neighbour the simplest thing to 'do' is ping :)
10:01 cdunklau yeah it's certainly not trying to grab the git repo :(
10:01 cdunklau is there a way i can view the complete configuration of the master? like, post-config read?
10:02 duncanmv joined #salt
10:03 hemebond Does the master not paste its runtime config to the debug output?
10:03 cdunklau hemebond: doesn't look like it
10:03 cdunklau but i'm running with debug right now, not trace. maybe it's there
10:03 hemebond When the master starts up.
10:04 Neighbour cdunklau: there are 3 things you can run with -l debug: salt-master, salt-minion, and your salt-command
10:04 Neighbour they all complement eachother, depending on where things go wrong you can see the things you're looking for in either of these three
10:04 cdunklau i'm just putting loglevel: trace   in the master conf
10:04 cdunklau it seems to be respecting that
10:05 Neighbour yes, but if a state executes on a certain minion, you won't find it in the master log
10:10 cdunklau Neighbour: i'm trying to figure out why my master's gitfs remotes aren't being grabbed, so the master log is where i'd expect that info to be
10:11 cdunklau ugh seriously there's no option for journalctl to show the logs since the last time the unit started?
10:11 cdunklau how dumb
10:12 shoemonkey joined #salt
10:15 cdunklau well, okay i can use --since and the time it started, that's reasonable
10:15 cdunklau so it doesn't look like it dumps the config to the log, but i do see Could not LazyLoad config.merge: 'config.merge' is not available.
10:16 cdunklau so that makes me think it's not merging the config
10:18 Neighbour nah, I see that error all the time
10:18 Neighbour you can try `salt minion test.get_opts`
10:20 Neighbour or `salt-run pillar.show_pillar` and then see what happens in the master log
10:20 MattP_ joined #salt
10:21 cdunklau yeeep that was the issue, it's not mergin the config
10:21 cdunklau i put my new gitfs remote into the file where the one working remote is, and it picks it up now
10:22 cdunklau so either the config merging thing isn't working, or i was right in the first place when i thought salt doesn't merge included configs
10:22 ravenx i can't seem to get my default.yml to populate my config
10:22 ravenx so right now, i have a default.yaml in the /srv/salt/super-app/   and a template in /srv/salt/test.conf
10:22 ravenx in the header of test.conf template i have:
10:23 ravenx {% import_yaml '/srv/salt/dev/super_app/defaults.yaml' as super %}
10:23 ravenx and have been trying to use the K:V like so:     }} super.db_host }}
10:23 ravenx I end up getting:  Unable to manage file: Jinja error: /srv/salt/dev/super_app/defaults.yaml
10:24 ravenx and:  TemplateNotFound: /srv/salt/dev/super_app/defaults.yaml
10:24 hemebond ravenx: You import relative to the salt:// root
10:24 MattP_ Hello everybody, I'm trying to use the state.orchestrate module and can't figure how to match multiple 'roles' (which is a grain in my case)  with the 'tgt' parameter. If I use   "tgt: 'roles:elastic-search-2x.data-node'", it works, but it does not with "tgt: 'roles:elastic-search-2x.data-node OR roles:rabbitmq'"
10:24 hemebond Not the underlying file system.
10:25 ravenx hemebond: alrighty, let me try that again
10:25 hemebond MattP_: I think you might have to use the combination targeting syntax
10:25 hemebond You can't just put an AND in there.
10:25 hemebond 8OR
10:25 hemebond *OR
10:26 ravenx hemebond:  much better.  that worked like a charm, thank you!
10:26 hemebond ????
10:28 MattP_ @hemebond thanks! what should I put for 'tgt_type' ?  compound ?
10:28 hemebond I guess so.
10:28 hemebond I don't have any samples to refer to unfortunately.
10:29 MattP_ trying it now...
10:30 MattP_ no dice
10:31 cdunklau and it looks like default_include at the top of /etc/salt/master will make the included files apply _after_ the rest of the config in /etc/salt/master
10:31 cdunklau which is.. odd
10:35 hemebond MattP_: The OR should be lowercase. Tried that?
10:36 MattP_ @hemebond: I just tried this:     - tgt: 'G@roles:elastic-search-2x.data-node or G@roles:rabbitmq'
10:36 hemebond That looks correct.
10:39 MattP_ ok! it works if you set tgt_type: compound
10:39 cdunklau oh well, i'll just stick my gitfs config in one file
10:39 hemebond I thought you had that already.
10:39 cdunklau kinda sucks, but thems the breaks
10:40 cdunklau hemebond: me or MattP_ ?
10:40 MattP_ thanks a lots :) yes, but I removed/added it in the meantime
10:40 hemebond MattP_:
10:40 hemebond Ah.
10:41 hemebond cdunklau: Yeah merging lists is probably a bit funky. Not sure if it's handled. I usually put settings in the same file just for ease of management.
10:41 Neighbour lists aren't merged by default
10:42 Neighbour there's an option 'pillar_merge_lists' for that
10:50 cdunklau this isn't in the pillar, it's in the master config for gitfs
10:50 cdunklau well, maybe that's a pillar, i haven't used pillars at all
10:50 cdunklau so i don't know
10:51 netcho_ joined #salt
10:56 hemebond It's not pillar.
10:56 hemebond Apparently some of the configs (cloud maybe) can even use Jinja
10:56 sfxandy joined #salt
10:56 hemebond But I recommend keeping the master config as simple and clear as possible :-)
10:57 cdunklau hemebond: yeah i was hoping to set up gitfs remotes in multiple files since we have a few unrelated setups
10:57 cdunklau but to keep them all straight, it's probably better to have them in the same file anyway
10:58 sfxandy hi everyone.  need a sanity check on targetting my mine.get function.  am I allowed to use 'not' when specifying the mine.get target?  incidentally I'm checking for a Pillar variable not equal to a particular value
10:58 filippos cdunklau: I first read "gifts" .. disappointed now
10:58 sfxandy so it looks something like.... mine.get 'not profiles:foo'
10:58 cdunklau filippos: what's that like MPEG2-TS without sound or what :D
10:58 hemebond sfxandy: Yes, you can use compound matching.
10:59 sfxandy which doesnt seem to work.  if I remove the not, then it correctly targets minions with a Pillar value of profiles = foo
10:59 sfxandy so why does using 'not' fail hemebond?
10:59 hemebond sfxandy: Did you tell it to use compound matching? The default is glob.
10:59 sfxandy ah
10:59 sfxandy will report back!
11:01 sfxandy ok hemebond, using compound doesnt quite produce the required result.  let me shove it in a pastebin so you can see....
11:03 sfxandy hemebond, http://pastebin.com/hEwtqwan
11:04 hemebond If you're testing for a pillar value you need I@profiles:jump_server
11:04 hemebond https://docs.saltstack.com/en/latest/topics/targeting/compound.html
11:04 sfxandy but its the mine.get targetting that isnt working.
11:05 sfxandy hmmmm ok
11:05 sfxandy got it
11:05 sfxandy didnt realise you could use that notation in the mine.get targetting parameter
11:05 sfxandy thanks hemebond
11:05 hemebond ????
11:13 cdunklau it works!
11:14 cdunklau woooooooooh
11:14 cdunklau thanks folks
11:14 hemebond
11:14 cdunklau hey mosh didn't break on that emoji
11:14 hemebond ????
11:14 cdunklau hemebond: can you send an extended plane one?
11:14 cdunklau oh that was probably one :D
11:14 cdunklau hemebond: what was it?
11:14 hemebond I've only got two configured so far.
11:14 cdunklau the second
11:15 cdunklau i i don't see it
11:15 hemebond ????  thumbs up
11:16 cdunklau yep, makes sense. the smilie is U+263A, so basic multilinqual plane
11:17 cdunklau the thumbs up is U+1F44D, so extended or supplementary or whatever they call it
11:17 cdunklau and mosh does not like that :D
11:18 cdunklau hooray unicode
11:18 hemebond tsk, missing out on my thumbs up.
11:18 mavhq joined #salt
11:18 hemebond These fancy proxies are nothin' but trouble :-)
11:18 cdunklau hemebond: the price i have to pay for the lovelyness of mosh
11:18 cdunklau hemebond: screw that, it roams and deals with crappy wifi
11:18 cdunklau worth it :D
11:19 hemebond By not moving I avoid those kinds of hassles :-D
11:27 lasseknudsen2 joined #salt
11:27 cdunklau okay next issue. what's a reasonable way to deal with PKI and VM appliances?
11:27 MattP_ hey again, is it possible to make a compound search where the right value is evaluated, as in: salt -C 'I@master:G@name' --> returns minions where 'master' pillar matches the 'name' grain ?
11:28 cdunklau i want to make a master VM image that my techs import into virtualbox on their workstations
11:28 hemebond MattP_: That looks like a job for Jinja or something.
11:28 hemebond I don't think targeting can do substitution.
11:28 cdunklau can i just use the same key? or do different minions need to have different keys, even if the IDs are different?
11:29 hemebond cdunklau: Minion keys have to be unique for the master to accept them.
11:29 cdunklau by "master VM image" i mean a VM appliance image with a minion on it
11:29 cdunklau hemebond: damn
11:29 MattP_ hemebond: interesting! I'm looking in this...
11:30 cdunklau hemebond: so i'd need to either generate a key and give it to each tech for them to install it, or have them ping me when they set it up so i can accept the key
11:30 hemebond cdunklau: Correct.
11:31 hemebond (or auto-accept if it's just a Salt Master for testing)
11:31 cdunklau hemebond: or maybe have a signing key in the VM image that makes a key on first boot?
11:31 cdunklau but that has security implications :(
11:31 cdunklau can i somehow "mount" a group of minions to a particular section of the filesystem tree?
11:33 hemebond Not really, no.
11:33 cdunklau and thus prevent them from accessing the entire tree?
11:33 cdunklau :(
11:33 hemebond Easier to just have another master.
11:34 cdunklau hmm, fair enough
11:35 cdunklau that should be doable
11:35 dariusjs joined #salt
11:35 ninjada joined #salt
11:45 cdunklau hemebond: i'm feeling the "salt all the things" feeling
11:45 cdunklau hemebond: do you have stuff that you *don't* use salt for, or is it basically everything
11:45 hemebond Umm.
11:46 hemebond I don't use Salt to configure my master :-)
11:46 hemebond So far I've managed to use it for everything else; even monitoring.
11:46 cdunklau why not? :D
11:46 hemebond I just don't need to automate that.
11:51 sh123124213 joined #salt
11:51 sh123124213 joined #salt
11:51 cdunklau hemebond: do you use it for workstations? or just servers
11:51 hemebond Just servers.
11:52 lasseknudsen joined #salt
11:52 hemebond I'm not yet using it in production unfortunately, but am using it for test environments and hoping to replace the existing Puppet system soon.
11:53 babilen Oh .. that sweet first highstate
11:55 cdunklau for generating minion IDs, prefix-{UUID} should be fine, right?
11:55 cdunklau i'm not going to have much in the way of reasonable identifying information for these VMs
12:05 datam joined #salt
12:05 jas02 joined #salt
12:07 mansquab joined #salt
12:09 netcho_ joined #salt
12:13 shoemonkey joined #salt
12:19 evle1 joined #salt
12:23 edrocks joined #salt
12:31 lasseknudsen joined #salt
12:36 cdunklau does the minion_id file get regenerated, or can i use that to set my explicit ID?
12:37 dariusjs joined #salt
12:39 xet7 joined #salt
12:46 dps joined #salt
12:57 darioleidi joined #salt
12:57 numkem joined #salt
12:57 hemebond cdunklau: You can set the minion id
12:58 hemebond In that file.
13:01 cdunklau hemebond: so it doesn't get overwritten?
13:02 hemebond Nope.
13:02 scoates joined #salt
13:02 hemebond Unless you also set the ID in the config; then it might get updated.
13:09 snc joined #salt
13:13 xet7 joined #salt
13:14 gableroux joined #salt
13:30 abednarik joined #salt
13:32 xet7 joined #salt
13:32 shoemonkey joined #salt
13:33 ssplatt joined #salt
13:36 sh123124213 joined #salt
13:39 GMAzrael Is it possible to manage a file in multiple directories with a wildcard?
13:39 sh123124213 joined #salt
13:40 hemebond nope
13:50 edrocks joined #salt
13:50 ujjain joined #salt
13:50 ujjain joined #salt
13:53 ssplatt anyone successfully using the network_settings beacon?  i’ve been trying to test it in virtualbox but i’m not able to get anything to trigger
13:53 sh123124213 joined #salt
13:55 ssplatt https://gist.github.com/ssplatt/6c6c7348e3db45321490b01c9db7d78a  is the config i have in my minion vm
13:57 ronnix joined #salt
14:03 mede hi guys - anyone can give me a hand with returners? I have setup mysql as a returner. It works fine when i configure master_job_cache: mysql BUT i want to have mysql returners only for some states... so i can run  salt XXX test.ping --return mysql Unfortunately this doesn't work. I get the result on the console, but nothing in the DB
14:10 Brew joined #salt
14:13 ninjada joined #salt
14:14 sh123124213 joined #salt
14:15 rem5 joined #salt
14:16 fracklen joined #salt
14:19 arif-ali joined #salt
14:22 johnkeates joined #salt
14:22 rem5_ joined #salt
14:23 mansquab joined #salt
14:23 johnkeates how does Salt lookup users? I have a LDAP user that is reported with id/gentent etc. but salt still thinks it's not there
14:24 babilen Ah, the good old LDAP problem
14:24 johnkeates so, it exists.
14:24 * johnkeates puts up a sad face
14:24 brousch__ joined #salt
14:25 babilen https://github.com/saltstack/salt/issues/12803
14:25 saltstackbot [#12803][OPEN] file.managed doesn't work with ldap users | scenario:...
14:25 * johnkeates cries softly
14:25 johnkeates i'll dig in
14:25 ssplatt does the beacon.network_settings have some dependency that i am missing?  adding IPs, changing mtu aren’t firing events :/
14:25 babilen I haven't looked into that in a while .. but that was "the bug" back in the day
14:28 mansquab joined #salt
14:29 jas02 joined #salt
14:30 johnkeates i have bacon.network where i get my black market bacon from.. it's very good
14:30 babilen ssplatt: Looking at the code: pyroute2
14:30 ssplatt babilen: are teh docs in github so i can update them?
14:30 nfahldieck joined #salt
14:30 babilen ssplatt: Which docs exactly?
14:30 dendazen joined #salt
14:30 ssplatt https://docs.saltstack.com/en/latest/ref/beacons/all/salt.beacons.network_settings.html
14:31 babilen You probably just want the module docstring
14:31 ssplatt i want to add teh full list of things it can watch for and now the pkg dependency
14:31 babilen Yeah
14:32 babilen https://github.com/saltstack/salt/blob/develop/salt/beacons/network_settings.py#L2
14:33 mansquab joined #salt
14:33 nfahldieck Hi, whats the preferred way of ensuring a file exists for a "file.replace". I want content of that file replaced if it's existent and want to create it if it's not found.
14:33 babilen nfahldieck: file.managed would do that
14:35 babilen If you don't want to model the content of the entire file you can use suitable global state arguments (unless,onlyif, ..)
14:36 sh123124213 joined #salt
14:36 nfahldieck babilen: i can't use file.managed because I only want to make sure to replace a certain part of that file among different minions. the files start identicaly and differ later in that file
14:37 jas02 joined #salt
14:37 babilen I understand where you are coming from, but would still recommend to model the entire file (and use different pillar data for differences between minions)
14:37 babilen In my experience that works out a lot better in the long run
14:37 babilen But see above for how to do what you want to do
14:38 mansquab joined #salt
14:40 fracklen joined #salt
14:42 nfahldieck how would I use unless, onlyif to manage a certain part of that file?
14:43 mansquab joined #salt
14:44 babilen nfahldieck: You wouldn't - You'd use those to control which of your states would run
14:44 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.blockreplace could be used if file.replace doesn't do what you want
14:45 babilen But then .. file.append might be what you are after either. Can't tell you without more specific information
14:46 viq joined #salt
14:47 jas02 joined #salt
14:48 mansquab joined #salt
14:49 racooper joined #salt
14:53 mansquab joined #salt
14:53 dendazen how can i implement this in salt?
14:53 dendazen sed -i 's/0002/0077/g'  /etc/oddjobd.conf.d/oddjobd-mkhomedir.conf
14:55 golodhrim|work joined #salt
14:56 nfahldieck babilen: I believe I sorted my thoughts. What I want is: the first part of a file should be managed and the second part should be optionaly configurable. I could use file.managed for the first part and file.append for the optional part. Then I need to put these states in some (optional) dependence.
14:57 tercenya joined #salt
14:58 mansquab joined #salt
14:58 nfahldieck how would i best create a dependency between those states? It's possible that there is nothing appended.
14:59 babilen nfahldieck: My recommendation would be to render the entire file from pillar data and simply leave the end bit empty if you haven't defined data for it
15:00 scoates joined #salt
15:01 austin__ joined #salt
15:03 mansquab joined #salt
15:03 nfahldieck babilen: like a {%include 'optional.jinja' %} at the end of the managed jinja-template file?
15:05 babilen nfahldieck: I was rather thinking of {{ salt['pillar.get']('my:optional:content', '') }}
15:05 babilen (or |json if you have longer bits)
15:06 ssplatt joined #salt
15:06 vegasq joined #salt
15:06 nfahldieck I see! That seems like a solution to my problem. Thanks! :)
15:08 mansquab joined #salt
15:10 tercenya joined #salt
15:10 Reverend i just heard there's a no swearing rule in this channel. is this fact or fiction? O_O
15:11 Reverend if so.. my bad
15:12 johnkeates file.line ensure requires markers, but i want to just make sure a specific line is in a file without owning the rest of the file
15:12 beardedeagle joined #salt
15:13 johnkeates Reverend: fuck no, there is no goddamn rule about that here, but that doesn't mean 'swearing' all day long is going to make people like you :p
15:13 sh123124213 joined #salt
15:13 mansquab joined #salt
15:13 Reverend TomJepp you fucking dirty whore liar.
15:13 Reverend xD haha
15:13 johnkeates none of those words are swear words i think
15:13 Cottser joined #salt
15:13 Reverend at least one of them was
15:13 johnkeates fucking is an activity, dirty is a state, whore is a job and liar is something you could be if you wanted to
15:14 johnkeates i think it's mostly christian americans that get offended a lot and there is ofcourse the intent of the one talking
15:14 Reverend fuck is actually one of the only words that fits into every category of word in the english language.
15:17 babilen Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
15:18 mansquab joined #salt
15:19 Reverend are you okay there babilen ? :D
15:19 babilen https://upload.wikimedia.org/wikipedia/commons/2/2c/Buffalo_sentence_1_parse_tree.svg
15:20 cowyn joined #salt
15:20 dariusjs joined #salt
15:20 cdunklau there's a parse tree for that!? :D
15:20 babilen It's one of the sentences that come up in introductory Linguistics lectures
15:21 babilen Ah .. there is an entire article: https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo
15:21 saltstackbot [WIKIPEDIA] Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo | ""Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo" is a grammatically correct sentence in American English, often presented as an example of how homonyms and homophones can be used to create complicated linguistic constructs. It has been discussed in literature in various forms since 1967..."
15:21 sikander joined #salt
15:21 cdunklau Wenn Fliegen hinter Fliegen fliegen, fliegen Fliegen Fliegen nach
15:21 babilen genau
15:21 cdunklau babilen: did i get the capitalization right? :D
15:22 babilen ja
15:22 cdunklau sehr gut
15:22 babilen johnkeates: Would file.append do that?
15:22 Reverend babilen: lol!
15:22 Reverend i like it.
15:23 mansquab joined #salt
15:24 guerby joined #salt
15:24 cyborg-one joined #salt
15:25 babilen Reverend: Before I get slaughtered for being o-t: The worst examples are those that deal with embedding, such as: "The rat the cat the dog bit chased escaped" or so called "garden path sentences" such as "The old man the boat" or "The horse raced past the barn fell."
15:27 GMAzrael Is a startup state apply the only way for a minion to repull highstate? or do you cron/schedule task it do run?
15:28 Reverend this is making my brainhurt
15:28 mansquab joined #salt
15:28 Reverend I wouldn't want to write a sentence like that, let alone analyse it.
15:28 babilen GMAzrael: Repull? You mean "Run a highstate on a specific schedule?"
15:29 GMAzrael Ensure configuration wasn't modified...ie yes
15:29 babilen GMAzrael: https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs -- just schedule a highstate in the minion's pillar data
15:32 evle2 joined #salt
15:33 mansquab joined #salt
15:34 PhilA_ joined #salt
15:38 Hybrid joined #salt
15:38 mansquab joined #salt
15:41 evle3 joined #salt
15:43 mansquab joined #salt
15:48 mansquab joined #salt
15:51 PhilA joined #salt
15:52 hasues joined #salt
15:53 mansquab joined #salt
15:54 tiwula joined #salt
15:55 PatrolDoom joined #salt
15:58 scoates joined #salt
15:58 mansquab joined #salt
15:58 raspado joined #salt
15:58 fracklen joined #salt
16:01 dyasny joined #salt
16:02 shoemonkey joined #salt
16:03 netcho_ joined #salt
16:03 mansquab joined #salt
16:04 Praematura joined #salt
16:05 j5 joined #salt
16:08 mansquab joined #salt
16:11 dyasny joined #salt
16:13 mansquab joined #salt
16:13 leonkatz joined #salt
16:16 sp0097 joined #salt
16:16 tercenya joined #salt
16:18 mansquab joined #salt
16:19 MrAndersson joined #salt
16:19 fracklen joined #salt
16:23 mansquab joined #salt
16:28 seanz joined #salt
16:28 mansquab joined #salt
16:29 sh123124213 joined #salt
16:29 Brew joined #salt
16:33 mansquab joined #salt
16:33 sarcasticadmin joined #salt
16:33 johnkeates joined #salt
16:34 djgerm joined #salt
16:34 Tanta joined #salt
16:38 mansquab joined #salt
16:43 mansquab joined #salt
16:48 mansquab joined #salt
16:50 inire joined #salt
16:53 mansquab joined #salt
16:58 mansquab joined #salt
16:58 sh123124213 joined #salt
16:58 tercenya joined #salt
16:59 kunersdorf joined #salt
16:59 smcquay joined #salt
17:00 raspado joined #salt
17:02 kunersdorf salt-cloud is returning "No machines were found to be destroyed" for a map it just used to build the vms
17:02 kunersdorf any idea why?
17:03 mansquab joined #salt
17:03 aldevar left #salt
17:03 dps_ joined #salt
17:06 Ch3LL kunersdort: can you see it when you run `salt-cloud --query`?
17:07 kunersdorf yes
17:08 mansquab joined #salt
17:08 Praematura joined #salt
17:09 tercenya joined #salt
17:10 Ch3LL which provider?
17:10 Ch3LL and salt version?
17:13 mansquab joined #salt
17:18 mansquab joined #salt
17:23 mansquab joined #salt
17:27 Inveracity joined #salt
17:27 tercenya joined #salt
17:27 jimklo joined #salt
17:30 tapoxi joined #salt
17:32 tomatoschewps joined #salt
17:33 kunersdorf @Ch3ll vmware and salt-2016.11.3-1
17:33 kunersdorf salt-cloud-2016.11.3-1
17:36 tomatoschewps Hi thère
17:37 tomatoschewps I don't now if those who help me 3-4 days ago are here
17:37 tomatoschewps but just to let you know
17:37 tomatoschewps My problem was to use UTF-8 characters in my SLS files (change some reg entries on windows minion)
17:38 tomatoschewps even if I have configured yaml_utf8: true in master's conf nothing worked
17:38 tomatoschewps I tried to add it to the minion's config
17:38 tomatoschewps and tada !!!
17:38 tomatoschewps it's ok
17:39 tomatoschewps I don't know if it's windows specific (haven't tried on linux)
17:40 tomatoschewps Maybe it can be specified on documentation for futur newbies like me
17:40 tomatoschewps now I'm going to see if I can change minion's config file with some state :D
17:42 sp0097 joined #salt
17:42 seanz joined #salt
17:42 jauz Hey, I installed a Windows Salt-Minion and it gave an error that the "PATH not updated, original length 1603 > 1024". -- Is there a way I can manually add/edit/fix the PATH entry on that machine so it won't mess with the Salt-Minion?
17:43 jauz I'm not sure what path to enter, though I can get to the environment variables to set it if I knew what it needs...
17:46 Edgan joined #salt
17:47 hasues I'm trying to understand what is incorrect in the format of this salt state: https://bpaste.net/show/0979dbcf6956
17:48 hasues https://paste.pound-python.org/show/XtMkmG59R9Lr9xxMdmtC/ is the results, but I'm not sure why it thinks that there is a previous block that needs to end.
17:48 impi joined #salt
17:48 smcquay joined #salt
17:48 scoates joined #salt
17:49 hasues sigh, nevermind, my spacing was off for - enable.
17:50 kunersdorf @hasues I use this http://yaml-online-parser.appspot.com/
17:50 kunersdorf if you want a yaml checker
17:50 hasues hey, thanks!
17:52 PatrolDoom joined #salt
17:53 scoates joined #salt
17:53 abednarik joined #salt
17:55 KyleG joined #salt
17:55 KyleG joined #salt
17:55 debian112 joined #salt
17:58 PatrolDoom joined #salt
18:02 debian112 joined #salt
18:02 shoemonkey joined #salt
18:17 jas02 joined #salt
18:20 mansquab joined #salt
18:25 mansquab joined #salt
18:28 brokensyntax joined #salt
18:30 mansquab joined #salt
18:33 jas02 joined #salt
18:34 amcorreia joined #salt
18:35 mansquab joined #salt
18:36 tercenya joined #salt
18:38 netcho_ joined #salt
18:40 rem5 joined #salt
18:40 jas02 joined #salt
18:40 mansquab joined #salt
18:41 s_kunk joined #salt
18:41 s_kunk joined #salt
18:45 mansquab joined #salt
18:50 mansquab joined #salt
18:51 cdunklau hrmmm.... is there guide on how states make the modules get called?
18:52 cdunklau i'm having real trouble wrapping my head around this. if there's something from a Python perspective that talks about how an sls file gets parsed and calls the state.* stuff, i think that would help me a lo
18:52 cdunklau t
18:52 abednarik joined #salt
18:55 mansquab joined #salt
18:56 cdunklau ah, the highstate datastructure definitions doc looks reasonable
18:58 scoates joined #salt
19:00 mansquab joined #salt
19:02 k_sze[work] joined #salt
19:03 englishm_llnw joined #salt
19:05 fracklen joined #salt
19:05 mansquab joined #salt
19:06 catpig joined #salt
19:09 cyborg-one joined #salt
19:10 mansquab joined #salt
19:11 toastedpenguin joined #salt
19:13 Praematura joined #salt
19:15 mansquab joined #salt
19:19 nixjdm joined #salt
19:19 WildPikachu joined #salt
19:19 WildPikachu Is it possible to use a source file without it being parsed as a template as a managed file?
19:19 robinsmidsrod joined #salt
19:20 mansquab joined #salt
19:20 Electron^- joined #salt
19:21 dps joined #salt
19:22 dps_ joined #salt
19:24 rim-k joined #salt
19:25 mansquab joined #salt
19:26 dariusjs joined #salt
19:26 aldevar joined #salt
19:28 Edgan WildPikachu: If you don't say something like template: jinja, it won't be parsed as a template
19:28 WildPikachu ah!
19:29 Edgan ok
19:29 Edgan wrong window
19:30 WildPikachu thanks Edgan
19:30 mansquab joined #salt
19:34 toastedpenguin joined #salt
19:35 mansquab joined #salt
19:40 mansquab joined #salt
19:40 leonkatz joined #salt
19:45 mansquab joined #salt
19:50 mansquab joined #salt
19:54 KingJ joined #salt
19:54 bakins joined #salt
19:55 mansquab joined #salt
20:00 mansquab joined #salt
20:01 cdunklau how do i write a state that runs multiple functions from a single state module
20:01 cdunklau i want to use file.managed for one file, and file.directory for something else
20:02 scoates joined #salt
20:03 shoemonkey joined #salt
20:05 mansquab joined #salt
20:06 jas02 joined #salt
20:07 nickabbey joined #salt
20:07 whytewolf cdunklau: by writting 2 different states in the same file
20:07 mavhq joined #salt
20:07 akoumjian joined #salt
20:08 ChubYann joined #salt
20:08 cdunklau rats
20:08 cdunklau okay
20:09 whytewolf cdunklau: rats? it isn't exactly a difficult thing.
20:09 whytewolf I do all of my states as single items personally.
20:09 whytewolf https://github.com/whytewolf/salt-phase0-states/blob/master/mysql/install.sls
20:10 mansquab joined #salt
20:13 whytewolf or like this remove script setup https://github.com/whytewolf/salt-phase0-states/blob/master/mysql/remove.sls
20:15 mansquab joined #salt
20:20 mansquab joined #salt
20:21 leonkatz joined #salt
20:23 tercenya joined #salt
20:25 chadhs joined #salt
20:25 mansquab joined #salt
20:28 tercenya joined #salt
20:29 jimklo joined #salt
20:30 PatrolDoom joined #salt
20:30 mansquab joined #salt
20:31 felskrone joined #salt
20:32 jauz Where might one acquire Saltstack merchandise; like stickers or mugs/shirts/etc...?
20:33 cachedout jauz: Drop me a line and I'll get some sent to you.
20:33 cachedout mp@saltstack.com
20:35 beardedeagle waiting on SaltConf17 dates like (-.-)Zzz...
20:35 mansquab joined #salt
20:35 gtmanfred >.>
20:38 edrocks joined #salt
20:39 nickabbey joined #salt
20:40 mansquab joined #salt
20:43 aphor joined #salt
20:44 desku joined #salt
20:44 deskuu joined #salt
20:45 mansquab joined #salt
20:46 jauz cachedout: Thanks! Sent. Appreciate the opportunity.
20:47 beardedeagle gtmanfred: hopefully it doesn't fall during godaddy's techfest. kinda have to go...since I work here.
20:48 rim-k joined #salt
20:49 gtmanfred heh, when is that?
20:50 mansquab joined #salt
20:50 beardedeagle May 17 - 18. Probably the 16th too since we started doing a company hackathon the day before the sessions start.
20:51 PatrolDoom joined #salt
20:51 gtmanfred the dates we have been told we are looking at won't conflict with that
20:51 beardedeagle Noice! That is good to hear.
20:51 whytewolf gtmanfred: are we going to get more then two weeks notice? :P
20:52 gtmanfred oh yeah
20:52 gtmanfred it is going to be later in the year
20:53 beardedeagle I am a little upset I will be missing PyCon though
20:53 jas02 joined #salt
20:53 jauz Hmm, would I be right in assuming there's no way to have a state upgrade a Windows minion? (So Windows minions are stuck at whatever version until some other remote/local method upgrades them?)
20:54 whytewolf i thought there was a function for windows that upgraded salt minions
20:55 gtmanfred jauz: the formula supports windows https://github.com/saltstack-formulas/salt-formula/blob/master/salt/map.jinja#L137
20:55 jauz I'll check again, I thought it uninstalled it and didn't cleanly reinstall it yet back to a running service state.
20:55 mansquab joined #salt
20:55 gtmanfred https://github.com/saltstack-formulas/salt-formula/blob/ad440d904cb272827b6fa2be233e5b8f97faed9e/FORMULA#L2
20:57 whytewolf oh, this is what i was thinking of. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.update
20:58 cdunklau whytewolf: it's just taken a frusteratingly long time for me to wrap my head around this
20:58 cdunklau whytewolf: with that push you gave me, i managed to write a super reasonable state. so thanks :)
20:59 cdunklau of course i did run into a bug along the way :D
20:59 eseyman joined #salt
21:00 jauz Thanks for the link! I'll work on it. :)
21:00 cdunklau prereq against an id in the same file gave me a recursionerror
21:00 mansquab joined #salt
21:03 nbuchanan joined #salt
21:05 mansquab joined #salt
21:06 leonkatz joined #salt
21:07 leonkatz joined #salt
21:10 chadhs joined #salt
21:10 mansquab joined #salt
21:11 kunersdorf joined #salt
21:12 kunersdorf should salt execute all .sls files in a state directory?
21:13 onlyanegg joined #salt
21:14 djgerm if they're in init.sls in that directory as includes
21:14 kunersdorf I'm using https://github.com/beastea/solrcloud-formula/blob/master/solrcloud/solr.sls
21:15 kunersdorf I renamed solr.sls to init.sls
21:15 kunersdorf I also have the zookeeper.sls which isn't executing
21:15 mansquab joined #salt
21:15 kunersdorf should I rename init.sls or add include to it?
21:18 rim-k joined #salt
21:18 gtmanfred leave solr.sls as is
21:18 gtmanfred and add an init.sls that does
21:18 gtmanfred include:
21:18 gtmanfred - .solr
21:18 ronnix joined #salt
21:18 gtmanfred - .zookeeper
21:19 gtmanfred and then run the state.apply solrcloud and it will apply everything in the directory
21:19 kunersdorf rgr that, ty
21:20 mansquab joined #salt
21:25 netcho_ joined #salt
21:25 mansquab joined #salt
21:30 mansquab joined #salt
21:31 rim-k joined #salt
21:35 heyimawesome joined #salt
21:35 mansquab joined #salt
21:36 rim-k joined #salt
21:40 mansquab joined #salt
21:41 averell joined #salt
21:44 harkx joined #salt
21:45 mansquab joined #salt
21:45 Tanta joined #salt
21:50 mansquab joined #salt
21:52 kunersdorf is this proper syntax:
21:52 kunersdorf salt 'vm-0*' pillar.get solrcloud:zoo_cluster:servers:zk3:id
21:55 chadhs joined #salt
21:55 mansquab joined #salt
22:00 cachedout Hi all! It's time for our Meet the Maintainers event.
22:00 mansquab joined #salt
22:01 cachedout If you would like to come by and say hello, please feel free! https://app.gotomeeting.com/index.html?host=true&amp;meetingId=809652525
22:01 jas02 joined #salt
22:04 shoemonkey joined #salt
22:04 Guest57730 joined #salt
22:05 mansquab joined #salt
22:07 gtmanfred w00t w00t
22:10 jas02 joined #salt
22:10 mansquab joined #salt
22:11 rim-k joined #salt
22:22 cyteen joined #salt
22:28 jauz Do I need to register my application with Slack to get an api-key for the Slack returner or is there an easier way I'm not seeing?
22:28 gtmanfred I think you have to make a bot
22:29 gtmanfred yeah, the xoxb stuff should be an apikey on a bot
22:29 gtmanfred jauz: https://api.slack.com/bot-users
22:30 jauz Cool! Thank you.
22:31 gtmanfred no problem!
22:32 chadhs joined #salt
22:47 rim-k_ joined #salt
22:49 debian1121 joined #salt
22:57 djgerm joined #salt
22:58 cachedout Our community meeting is going strong. We've got about another hour to go so it is not too late to join!
23:00 debian112 joined #salt
23:08 debian112 joined #salt
23:12 raspado joined #salt
23:18 chadhs joined #salt
23:23 Electron^- joined #salt
23:27 edrocks joined #salt
23:34 dendazen joined #salt
23:37 mavhq joined #salt
23:43 vegasq joined #salt
23:43 chadhs joined #salt
23:43 ninjada joined #salt
23:44 leonkatz joined #salt
23:48 jrgochan hello. Is there a way to have salt manage which runlevels a service starts in?
23:53 whytewolf humm. service.running does not apear to support runlevels. let me check the code see if it passes kwargs to the service.enable exacution module
23:53 gtmanfred for sysvinit, i believe that is configured in the service unit file
23:53 ninjada joined #salt
23:53 jauz If I want to return the Master_Job_Cache then I only need the returner configs to be in my master config file, yes? I shouldn't need to configure the returner in the minions, correct?
23:53 gtmanfred and then put in the correct rc.d files with chkconfig --add
23:58 whytewolf gtmanfred: init.d files holds the init files. add them with 'chkconfig --add' then using 'chkconfig --level=<x> on' and the messy part of which file gets symlinked where gets handled.
23:58 ninjada_ joined #salt
23:59 gtmanfred right

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