Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-05-29

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

All times shown according to UTC.

Time Nick Message
00:03 dh__ joined #salt
00:48 estahn joined #salt
00:57 haaj joined #salt
01:09 s_kunk joined #salt
01:10 catpigger joined #salt
01:14 hasues joined #salt
01:20 Muchoz joined #salt
01:30 anotherZero did you set - enable: True ?
01:39 quix joined #salt
01:40 snc joined #salt
01:49 jenastar joined #salt
01:54 rgrinberg joined #salt
01:58 haaj joined #salt
02:04 permalac joined #salt
02:09 hasues left #salt
02:14 teatime joined #salt
02:31 dstokes joined #salt
02:42 racooper joined #salt
02:46 wolfpackmars2 joined #salt
02:48 wangofett joined #salt
02:59 haaj joined #salt
03:25 dstokes joined #salt
03:32 stooj joined #salt
03:33 quix joined #salt
04:00 fgimian joined #salt
04:01 haaj joined #salt
04:28 DEger joined #salt
04:29 josuebrunel joined #salt
04:35 fracklen joined #salt
04:38 quix joined #salt
05:01 haaj joined #salt
05:58 quix joined #salt
06:02 haaj joined #salt
06:25 manji joined #salt
06:41 martoss joined #salt
06:42 mowntan joined #salt
06:51 jxm_ joined #salt
06:55 AndrewPashkin joined #salt
07:00 _AndrewPashkin_ joined #salt
07:03 haaj joined #salt
07:09 squishypebble1 joined #salt
07:11 mowntan joined #salt
07:27 Sylvain31 joined #salt
07:36 evle2 joined #salt
07:39 martoss joined #salt
08:04 haaj joined #salt
08:09 estahn joined #salt
08:28 base10 joined #salt
08:30 rgrinberg joined #salt
08:37 base10 Hi folks, I'm going to try my hand at issue #15749, but I've never worked on Salt before.  Is there a set of best practices / developer guidelines / onboarding / etc documented somewhere, or does this project just try to resolve that via pull request conversation?
08:38 base10 (and, if anyone cares, I plan to add group_ commands and states similar to yumpkg's approach to handle this)
08:40 Sylvain31 base10: hi, would it helps? https://docs.saltstack.com/en/latest/ref/modules/
08:45 babilen base10: https://docs.saltstack.com/en/latest/topics/development/contributing.html
08:46 babilen https://docs.saltstack.com/en/latest/topics/development/
08:46 base10 Outstanding, that's just what I was looking for.  Thanks guys!
08:47 babilen base10: Do you have some development system setup already?
08:48 Sylvain31 base10: this one also helped me: http://intothesaltmine.readthedocs.io/en/latest/chapters/development/writing-modules.html
08:48 babilen no, readthedocs is outdated!!
08:48 babilen Ah, that's intothesaltmine
08:48 babilen nvm
08:49 ivanjaros joined #salt
08:49 Sylvain31 babilen: it helped me to get it work, I don't know how, but it helped…
08:51 babilen Sylvain31: No, I thought for a moment that you were linking to a different (outdated) document
08:52 base10 babilen: No, in fact I'm usually a node/c#/java developer, this will be my first shot writing python.. but I've read plenty and I'm hopeful that I can handle it.  I also plan to use a virtual machine or two for testing purposes, and the page you linked has some good details about setting up a virtualenv for development
08:52 squishypebble joined #salt
08:56 base10 I'm happy to see that there's a unit testing framework, although unless I'm missing something, there's no tests in place yet for pacman. Is the test suite generally maintained (and/or worked on TDD style), or is it more of an afterthought?
08:57 whytewolf it was a forthought but because things happen so quick turned into an afterthought. not everyone who has contribbitted code has put forth a testing effort.
08:59 whytewolf although tests are checked during the PR process.
08:59 base10 Makes sense.  Well, I'll try to do my part and write tests for whatever I manage to produce. :)
09:01 whytewolf the world thanks you. more tests are greatly needed.
09:04 deniszh joined #salt
09:04 haaj joined #salt
09:05 CeBe joined #salt
09:10 babilen base10: Some people prefer to develop within a virtualbox, but te virtualenv approach is perfectly fine also .. just note that changes in there would actually affect your system
09:11 babilen vagant box that is :)
09:11 babilen *vagrant
09:11 * babilen gives up
09:12 base10 babilen: I was just thinking the same thing.  My primary environment is (sadly, perhaps) win10, which seems not very useful for this particular work.
09:14 inad922 joined #salt
09:15 babilen base10: https://www.refheap.com/119736 is what I use .. the scripts clone the currently checkout branch from ~/src/github.com/saltstack/salt into /srv/salt/data/salt which is mounted into the vagrant box. You can then run the "pip install -e ..." in the box. Whenever you make changes in ~/src/github.com/saltstack/salt you commit them, run "update-salt" and reinstall.
09:15 babilen Ah .. no idea how you would use that on Windows
09:16 fredvd joined #salt
09:19 dmaiocchi joined #salt
09:19 cyborg-one joined #salt
09:21 base10 I'm going to switch to my Arch laptop for this project, I think.  I'm fifteen minutes in and I'm already hating Windows for it. ;)
09:21 babilen hahaha
09:22 * babilen hasn't touched Windows in 16 years. I honestly have no idea what it is like to use it these days ..
09:25 base10 Well, it's certainly different than it was in the win2k days, UI-wise.  It works, for the most part, especially if you're not terribly sensitive to the particular aesthetics of your desktop (which, as it happens, I am not)
09:26 base10 I've really gotten to enjoy the taskbar-less gnome3 model, though, with its easy workspace switching
09:26 base10 especially since I don't have the laptop connected to a second monitor
09:26 base10 I'm pretty sure I couldn't operate on Win at all without at least two
09:31 Sylvain31 base10: just re-read microsoft privacy https://privacy.microsoft.com/en-us/privacystatement# looks for Cortana which is the name of the keylogger for example… ;)
09:34 martoss joined #salt
09:35 base10 Sylvain31: yeah, there are certainly some downsides.  I'm not fan of Cortana, or the new start menu.. or who-the-heck-knows-what-else is going on that's even worse
09:36 base10 Part of my effort here with Salt is to get Linux to a place where my IT staff at work can manage it as easily as they do Windows, so I can feel good about switching the dev team away from Windows.
09:37 CeBe joined #salt
09:40 garphy joined #salt
09:51 martoss joined #salt
09:58 martoss joined #salt
10:07 garphy joined #salt
10:31 estahn joined #salt
10:31 mowntan joined #salt
10:45 brotatochip joined #salt
10:52 Muchoz joined #salt
10:53 fracklen joined #salt
10:54 hrumph is it allaowable in salt modules to have param types that are other than string, int, bool or list?
11:09 JPT joined #salt
11:11 babilen hrumph: Dictionaries are fine .. but what are you after?
11:11 deniszh joined #salt
11:12 hrumph babilen, yo
11:12 hrumph babilen, ok for the windows reg module i'm still working on doing stuff with it
11:13 hrumph afaict in its present state if you set the vtype to REG_MULTI_SZ it really expects a list for vdata
11:13 hrumph that's the only way i can get it to go
11:13 hrumph but the documentation says str implying str in all cases
11:14 hrumph so i want to change the type in the documentation to say "object" and then say when it should be a string and when it should be a list
11:14 hrumph i've also made a parse function to check everything
11:14 hrumph i'm just hoping that i'm not breaking any rules
11:14 zer0def are we talking about an execution module or…?
11:15 hrumph zer0def, yes the reg.py execution module
11:15 zer0def because i'm pretty sure that comma-delimited values are parsed as a list
11:15 hrumph zer0def, i tried it on the command line and couldn't get it to work
11:15 zer0def and `<key1>=<value1>,<key2>=<value2>` are parsed as a dict
11:16 zer0def ok then, if it didn't work for you, then i'm not going to claim otherwise
11:16 zer0def although it might be the case that you needed to escape them in shell or things of that nature, can't really tell atm
11:16 hrumph zer0def, ok i'll have another go...
11:17 zer0def try poking at other modules that implement list and/or dict parsing, i know `state.sls` takes a list as it's arg
11:17 hrumph zer0def, ok how do we specifiy a list in the command line in bash?
11:18 hrumph ok you said i'l going to try again maybe i was making a mistake
11:18 zer0def well, ordinarily, when i apply multiple states in state.sls, i do `salt '*' state.sls state1,state2,…`
11:18 hrumph zer0def, ok and that's parses as list?
11:19 west575 joined #salt
11:19 zer0def as far as i'm aware
11:19 hrumph ok fair enough
11:19 zer0def let me take a quick peek
11:19 hrumph anyway that's not the problem
11:19 hrumph i'm just making sure that i 'm allowed to have polymorphic types in an execution module
11:22 zer0def there's a `if isinstance(mods, six.string_types): mods = mods.split(',')`, where `mods` is the main argument, so i guess you'll have to do it yourself
11:23 zer0def but i can easily imagine typing out a single-level dict as well… wouldn't be too pretty, but it would work
11:23 josuebrunel joined #salt
11:23 hrumph ah
11:23 hrumph so it's not really parsed that way unless you do it yourself
11:23 zer0def apparently not, my bad
11:24 hrumph but lists are in exectuation modules and the examples usually show sls formulas as the input
11:24 zer0def and heck, if you're crazy enough, you could just allow it to gobble a json and throw when it fails parsing it
11:24 hrumph there's just no direct route with the command line (AFAICT)
11:25 zer0def technically there is, it's just not pleasant to use manually
11:26 zer0def as mentioned above, if you're desperate enough, you could just pass in a json or inlined yaml to it, but don't expect people to then use it manually
11:41 necronian Can I access the data I defined in the roster file as a grain somehow? I put a machine ip as the host data and now I want to use that to set an entry in the hosts file.
11:45 babilen hrumph: A list can be passed as: salt '*' foo.bar list_arg="[1, 2, 3]"
11:46 hrumph ok thought i tried that i'll try again...
11:46 zer0def babilen: by extension, you probably could pass in a dict similarly, right?
11:46 babilen hrumph: See, for example, the pkg.install documentation: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.install (that also exemplifies passing of a dictionary)
11:47 babilen zer0def: Absolutely (or a tuple)
11:47 zer0def alrighty, sorta slipped my mind to just pass shell-escaped python primitives
11:47 babilen necronian: Not sure, but you could use network.ip_addrs with a suitable cidr to get the address
11:48 hrumph oh its working
11:48 hrumph my bad
11:48 hrumph just wasn't quoting right
11:48 hrumph anyway the docs need a fix
11:48 babilen I put a string in your string so you can string while you salt
11:48 hrumph because it says str but its not always str
11:48 hrumph its worse than that i'm fixing everything
11:49 hrumph the REG_BINARY is just completely wrong afaict
11:49 hrumph whoever wrote the module just calls str
11:50 hrumph no idea what the point of that is
11:50 hrumph i'm changing it so it will take a base 64 string
11:51 hrumph i assume the devels will be ok with this this because the current setup is messed up
11:51 fracklen joined #salt
12:01 jubalh_ joined #salt
12:07 Fiber^ joined #salt
12:08 TyrfingMjolnir joined #salt
12:19 necronian babilen: Yea that does make sense, I didn't realized I could do that. Thanks.
12:23 fracklen joined #salt
12:26 keimlink joined #salt
12:27 babilen necronian: There might be a way to get hold of the roster data, but I am simply not sure how :)
12:28 babilen Using the network.ip_addrs execution module function might still be the better solution though
12:42 guardianJ joined #salt
12:43 guardianJ left #salt
13:10 oida joined #salt
13:15 Micromus joined #salt
13:17 martoss joined #salt
13:21 devster31 I'm still seeing MySQL Error 1054: Unknown column 'Password' in 'where clause'which should have been fixed in 2016.3.0 by https://github.com/saltstack/salt/pull/32440 , could it be a xenial issue?
13:21 saltstackbot [#32440]title: Automatically detect correct MySQL password column for 5.7 and fix setting passwords | ### What does this PR do?...
13:22 wangofet1 joined #salt
13:28 estahn joined #salt
13:32 jxm_ joined #salt
13:32 justanotheruser joined #salt
13:51 babilen devster31: That commit is in 2016.3.0
13:51 babilen Well, I checked 4372dc3816a757b6db0d89099edb4d2e8ad00bef
14:01 Fiber^ joined #salt
14:05 slav0nic joined #salt
14:05 devster31 I know, but I have Salt 2016.3.0 and salt-minion 2016.3.0 and still see this issue
14:06 babilen So, report that in whatever bug report discussed the issue the PR was meant to fix
14:06 babilen Or do you know how to fix it?
14:06 evle joined #salt
14:07 babilen And did you check that the code in question actually made it into the salt files you are running ?
14:08 martoss joined #salt
14:15 devster31 the code is there, I'll comment in the PR
14:26 mohae joined #salt
14:35 HeresJohny joined #salt
14:40 martoss joined #salt
14:51 andrew_v joined #salt
15:06 Xenophon1 joined #salt
15:09 amcorreia joined #salt
15:14 jamesog joined #salt
15:51 XenophonF joined #salt
15:52 mapu joined #salt
16:00 fracklen joined #salt
16:04 Muchoz joined #salt
16:07 shawnbutts has there been any consideration of providing an omnibus option for salt installs?  i just spent 4 hours tracking down what was causing https://github.com/saltstack/salt/issues/33470 for me.  this is not the 1st time i've run into this.  salt not using the systems python would have prevented this kind of thing.
16:07 saltstackbot [#33470]title: An un-handled exception was caught by salt's global exception handler: ImportError: No module named ssl_match_hostname` | ### Description of Issue/Question...
16:08 noraatepernos joined #salt
16:10 west575 joined #salt
16:16 jamesog shawnbutts: We "deal" with that by re-packaging salt so it runs from a virtualenv, then changes to system python don't affect it
16:17 TyrfingMjolnir joined #salt
16:17 shawnbutts so you're not install from the repo.saltstack.com?
16:20 jamesog No, we re-package it from source
16:21 shawnbutts what distro do you use?  how do you deal with no python deps like zeromq?
16:21 subsignal joined #salt
16:21 jamesog Debian. And we deal with that by installing those into the virtualenv
16:21 babilen shawnbutts: You might want to consider installing whatever application the pip.installed: configparser is for in a virtualenv
16:22 DEger joined #salt
16:22 babilen I mean making massive changes to the system Python is bound to break $things
16:22 jamesog My rule of thumb is never touch the system (python|perl|whatever). Always install your custom stuff elsewhere
16:23 babilen ^
16:23 sagerdearia joined #salt
16:23 shawnbutts virtualenv doesn't work well we you have more than a few python apps to install that needs the same deps.
16:23 babilen So install them k times?
16:23 jamesog Meh, disk space is cheap. Install the library into each virtualenv
16:24 shawnbutts virtualenv'ing salt is an option i guess.  but, it seems like a lot of work for me a user to do work around this issue.  if vritualenv is the way to go, why not just do that with the repo packages?
16:24 babilen No, virtualenv'ing whatever *you* are installing those non-system Python libraries for
16:25 babilen I mean .. you are bound to break other Python applications on the box by doing that apart from salt
16:26 shawnbutts sweet! i didn't realize virtualenv'ing everything was so simple and solved all the problems.
16:27 babilen I wouldn't say it solves all the problems, but it solves your problem of how to install a Python library that is incompatible with the system one for your specific application
16:28 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.virtualenv_mod.html -- just define your requirements and you are done
16:28 shawnbutts it's not incompatible with the system one.  it is incompatible with salt.
16:29 babilen Are you sure that it doesn't break any other of the thousands of Python applications that are in the archive?
16:29 shawnbutts so the answer is to virtualenv 37 other apps so i can use the offical packages from repo.saltstack.com or keep my apps the way they are and build my own salt in a virtualenv?
16:29 subsignal joined #salt
16:30 babilen Yes, it is a good idea to install custom applications in their own virtualenv
16:30 babilen I mean .. what would you do if some of them have different requirements?
16:30 shawnbutts would salt qualify as a "custom application"?
16:31 babilen You have a pip requirement file for each that you serve in salt:// and the setup is a breeze
16:31 babilen You can install salt in a virtualenv also, but *even then* it would, IMHO, be a good idea to install your applications in their own virtualenv.
16:31 isntall_ joined #salt
16:32 babilen And you can always set "system_site_packages: True" if you want that, but I don't quite understand why you are so reluctant to give each of your applications the environment it requires
16:33 babilen You could even develop against the specific versions in whatever distribution you use, install the respective packages and then set "system_site_packages: True". That way you wouldn't require a single pip.installed that might break things.
16:35 shawnbutts i am reluctant because it has never been an issue up to this point and only salt is affected. zero of the system or my custom apps are affected by this issue.
16:36 shawnbutts i would rather not rework deployment for 37 other applications to work around an issue that only affects salt.
16:36 babilen Well, do whatever you think is best
16:37 babilen I think you have two options: 1. Develop against a specific system (e.g. "Debian Jessie") and the versions of packages therein or 2. Deploy into virtualenvs, install dependencies via pip requirements
16:38 babilen Obviously the boundaries are getting a bit blurry with backports and third party repositories, but those are the two main approaches
16:38 martoss joined #salt
16:38 shawnbutts which brings be back to my original question which i will reword.  why does is it the best option for the salt packages on repo.saltstack.com to be installed using the system level python?
16:39 babilen I don't think that using third-party repositories is a good idea at all
16:40 babilen (which is why I am working very hard to get up-to-date packages into Debian and backports)
16:40 devster31 are there modules or formulas for ulimit and sysctl?
16:40 babilen devster31: There are
16:40 babilen sysctl-formula and states
16:41 devster31 ok, i mistyped on the saltstack-formulas organization, what about ulimit?
16:45 shawnbutts @bailen, wouldn't those non-3rd party packages still use the system level python?
16:52 rgrinberg joined #salt
16:57 martoss joined #salt
17:02 babilen shawnbutts: Sure, applications installed from the distribution archive use the system Python
17:03 Muchoz joined #salt
17:08 west575 joined #salt
17:16 base10 joined #salt
17:18 Lionel_Debroux joined #salt
17:24 josuebrunel joined #salt
17:27 martoss joined #salt
17:33 fracklen joined #salt
17:34 deniszh1 joined #salt
17:35 devster31 can I require another formula in a state file?
17:39 babilen devster31: You can require states from other formula(s) if they are already in your file_tree
17:44 josuebrunel joined #salt
17:54 XenophonF screen -r
17:54 XenophonF ah whoops sorry
17:55 base10 joined #salt
17:56 * babilen reattaches XenophonF
17:57 jenastar joined #salt
18:08 kidneb joined #salt
18:25 punkoivan joined #salt
18:26 punkoivan joined #salt
18:29 west575 joined #salt
18:33 devster31 thanks
18:34 babilen You'd have to include the respective SLS though
18:36 spuder joined #salt
18:46 DEger joined #salt
18:46 aagbds joined #salt
19:09 hrumph how can I specifiy minions to run unit tests on?
19:12 punkoivan joined #salt
19:13 brotatochip joined #salt
19:14 manji joined #salt
19:29 babilen hrumph: https://docs.saltstack.com/en/latest/topics/targeting/
19:29 DEger joined #salt
19:29 hrumph babilen, it doesn't say anything tehre about running the unit tests
19:29 TyrfingMjolnir joined #salt
19:30 hrumph babilen, i don't really know how these unit tests work but they're for a windows minion
19:34 babilen Well, that explains how you target specific minion to do $anything
19:35 hrumph is there a module to run unit tests?
19:35 babilen If you are referring to the Saltstack unittests (which you probably are) then, I guess, you will have to run them on the Windows box.
19:35 fracklen joined #salt
19:35 s_kunk joined #salt
19:36 hrumph ok
19:36 hrumph that's what i was thinking
19:39 CeBe joined #salt
19:44 Sammichmaker joined #salt
19:54 Knuta what's the preferred method for checking if a grain exists in jinja? I've used {% grains.has_key('oscodename') %} and so forth in the past, but that doesn't seem to work in 2016.3.0
19:56 Knuta grains that only exist in certain architectures get kind of useless without being able to check if they exist, because otherwise you'll just get "failed: Jinja variable 'salt.utils.context.NamespacedDictWrapper object' has no attribute 'os_family'"
20:00 babilen Jinja has ... is defined
20:00 martoss joined #salt
20:00 babilen .has_key(..) should™ work, however
20:07 deniszh joined #salt
20:08 yidhra joined #salt
20:10 jhauser joined #salt
20:28 Knuta babilen: thanks, I'll try that out :-)
20:30 babilen It would also be great if you could file a bug :)
20:35 robnagler joined #salt
20:36 robnagler I'd like to share values between states. Is it safe to store values in globals of a state module?
20:43 mrueg joined #salt
20:52 mohae_ joined #salt
20:55 Knuta babilen: dutifully created https://github.com/saltstack/salt/issues/33614
20:55 saltstackbot [#33614]title: grains.has_key()  always returns false in 2016.3.0 | ### Description of Issue/Question...
20:55 deniszh1 joined #salt
20:58 TOoSmOotH joined #salt
21:02 DEger joined #salt
21:04 keimlink joined #salt
21:10 sagerdearia joined #salt
21:21 robnagler /msg NickServ VERIFY REGISTER robnagler mkvemzivoghv
21:32 tpaul joined #salt
21:43 punkoivan joined #salt
21:45 Derailed hey everybody! I'm wondering if there's a standard or best practice for doing salt key management *using* salt commands sent via salt to the saltmaster. There doesn't appear to be states or mondules for it, I'm wondering if that's intentional -- is it considered a terrible idea?
21:51 hamsham joined #salt
21:54 Derailed oh wait. maybe what I was looking for is the stuff in the 'wheel' module
21:56 spuder joined #salt
21:59 dh__ joined #salt
22:02 notnotpeter joined #salt
22:04 wangofett joined #salt
22:09 onlyanegg joined #salt
22:12 Cidan joined #salt
22:22 isntall joined #salt
22:22 isntall joined #salt
22:32 wangofet1 joined #salt
22:32 spuder joined #salt
22:39 myraft joined #salt
22:39 hamsham joined #salt
22:39 jhauser joined #salt
22:47 GnuLxUsr joined #salt
22:47 StolenToast joined #salt
22:48 `chris joined #salt
22:48 borgstrom joined #salt
22:48 pid1 joined #salt
22:52 nethershaw joined #salt
23:11 onlyanegg joined #salt
23:46 mosen joined #salt

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