Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-03-14

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

All times shown according to UTC.

Time Nick Message
00:18 zerocoolback joined #salt
00:53 Guest73 joined #salt
00:54 justanotheruser joined #salt
00:54 justanotheruser joined #salt
00:55 zerocoolback joined #salt
01:00 justanotheruser joined #salt
01:17 Guest73 joined #salt
01:20 Whissi joined #salt
01:23 zerocoolback joined #salt
01:24 XenophonF :)
01:40 Guest73 joined #salt
01:43 Guest73 joined #salt
01:45 justanotheruser joined #salt
01:54 shiranaihito joined #salt
01:56 justanotheruser joined #salt
02:03 justanotheruser joined #salt
02:21 thelocehiliosan joined #salt
02:37 Guest73 joined #salt
02:56 ilbot3 joined #salt
02:56 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.9, 2017.7.4 <+> RC for 2018.3.0 is out, please test it! <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
03:12 zerocoolback joined #salt
03:20 ponyofdeath joined #salt
04:02 dezertol joined #salt
04:13 ECDHE_RSA_AES256 joined #salt
04:17 shakalaka joined #salt
04:19 bltmiller joined #salt
04:35 Guest73 joined #salt
05:06 bltmiller joined #salt
05:17 sauvin_ joined #salt
05:50 Guest73 joined #salt
05:57 Guest73 joined #salt
06:06 aviau joined #salt
06:10 Guest73 joined #salt
06:16 Hybrid joined #salt
06:20 Guest73 joined #salt
06:34 zulutango joined #salt
06:34 Hybrid joined #salt
06:39 Guest73 joined #salt
06:39 matti joined #salt
06:39 matti joined #salt
06:44 andrew joined #salt
06:45 Pomidora joined #salt
06:47 cliluw joined #salt
07:01 om2 joined #salt
07:03 Guest73 joined #salt
07:22 Guest73 joined #salt
07:28 armyriad joined #salt
07:32 masber joined #salt
07:34 yuhl joined #salt
07:38 yuhl_ joined #salt
07:45 Guest73 joined #salt
08:07 babilen joined #salt
08:09 Tucky joined #salt
08:12 VKC joined #salt
08:12 Guest73 joined #salt
08:32 exarkun joined #salt
08:34 Pjusur joined #salt
08:36 aldevar joined #salt
08:37 darioleidi joined #salt
08:38 zerocoolback joined #salt
08:43 hoonetorg joined #salt
08:54 threwahway joined #salt
08:58 cewood joined #salt
09:03 mikecmpbll joined #salt
09:04 Ricardo1000 joined #salt
09:04 zerocoolback joined #salt
09:08 pf_moore joined #salt
09:16 Pjusur joined #salt
09:19 Naresh joined #salt
09:27 Guest73 joined #salt
09:31 Mattch joined #salt
09:49 pbandark joined #salt
10:00 inad922 joined #salt
10:00 CrummyGummy babilen: Hi, I opened an issue with the mysql-formula team. Maybe they can help. I've tried socket user and had the same result
10:00 CrummyGummy https://github.com/saltstack-formulas/mysql-formula/issues/178
10:01 babilen CrummyGummy: Thanks - I might have a second later to look into that. Curious as removing the debconf state and *not* setting a password worked for me.
10:01 CrummyGummy No matter what I do, if I run the individual states it works but if I run them in a single file then they fail
10:01 babilen (haven't checked what you've tried)
10:11 ingslovak joined #salt
10:15 CrummyGummy babilen: Thanks, that's what I did. Removed the root permissions and left the start on boot in the debconf
10:19 dlloyd joined #salt
10:24 zerocool_ joined #salt
10:25 zerocoolback joined #salt
10:26 threwahway_ joined #salt
10:28 threwahway joined #salt
10:29 threwahway_ joined #salt
10:31 pbandark joined #salt
10:33 threwahway joined #salt
10:36 threwahway_ joined #salt
10:39 babilen CrummyGummy: It might be due to the fact that you include those states individually, which means that the requirements in mysql/init.sls aren't added
10:40 babilen Try a simple "- mysql" and "- mysql.user" and take it from there
10:46 Nazca joined #salt
10:50 zerocoolback joined #salt
11:04 zerocoolback joined #salt
11:42 zerocoolback joined #salt
11:44 dynek joined #salt
11:44 dynek hey!
11:45 dynek does anyone use a web interface / gui to at least be able to see how previous runs ended up?
11:45 dynek I am not an enterprise user
11:46 babilen I'm sure there are people
11:47 dynek I should have phrased this differently :-) I am actually Googling for that but doesn't seem to find anything current, maintained and ... recommended maybe
11:52 dynek for instance saltpad looks cool but last commit was in sept. 2016...
11:52 vhasi maybe it's already perfect?
11:53 dynek might be but I do not believe in project that don't get recurrent commits
11:54 vhasi if it's an open source project, people who use the product generally make the commits, so if you start using it maybe you'll start making commits?
11:55 dynek who said I wouldn't commit? thing is if nothing has been done since 2016 while saltstack (api) kept going on, I assume it doesn't even work anymore
11:55 dynek anyway, are you recommending anything? are you a saltpad user?
11:56 vhasi no, i like the darkness of the terminal, afraid of the light etc
12:02 evle joined #salt
12:07 mikecmpb_ joined #salt
12:07 mannefu joined #salt
12:12 inad922 joined #salt
12:13 thelocehiliosan joined #salt
12:22 aldevar joined #salt
12:30 Nahual joined #salt
12:47 mikecmpbll joined #salt
12:56 _bw joined #salt
12:59 gh34 joined #salt
13:02 XenophonF dynek: maybe molten?
13:03 XenophonF i keep running out of round tuits, so i haven't deployed it yet myself
13:03 XenophonF https://github.com/martinhoefling/molten
13:03 XenophonF https://github.com/saltstack-formulas/molten-formula
13:14 babilen dynek: I'm not aware of any actively maintained/used web ui for Saltstack apart from Salt Enterprise. Given that Ansible Towers has been open sourced saltstack is a distinct disadvantage and I am frankly unsure how they justify their position
13:15 tobiasBora joined #salt
13:15 babilen It's also impossible to get Enterprise without also paying (£££$$$€€€) for their "Enterprise support" which many users that are interested in a web ui do not really need
13:20 flexd joined #salt
13:23 Hybrid joined #salt
13:23 jrj_ joined #salt
13:26 onmeac joined #salt
13:27 xet7 joined #salt
13:28 thelocehiliosan joined #salt
13:32 edrocks joined #salt
13:36 xet7 joined #salt
13:39 xet7 joined #salt
13:39 mr_kyd joined #salt
13:53 xet7 joined #salt
13:57 xet7 joined #salt
14:10 xet7 joined #salt
14:19 thenut left #salt
14:26 cgiroua joined #salt
14:32 bocaneri joined #salt
14:36 rickflare joined #salt
14:44 ECDHE_RSA_AES256 babilen: my org is happy that I can provision new build vms reliably given 4kb of text files and access to the debian repos.  For short-lived infrastructure, having a web panel wouldn't really add value in our use case.
14:50 bocaneri joined #salt
14:54 babilen ecdhe: Absolutely, but it (might?) come in handy in other situations
14:54 babilen Just saying that saltstack has nothing to compete with Ansible Towers at the moment
14:57 tuxawy joined #salt
15:02 theloceh1liosan joined #salt
15:07 nixjdm joined #salt
15:07 Miuku The fact that it's not made by redhat should be a bonus already.
15:10 pcn What makes a web interface a primary sales point for a config management and automation system?
15:11 pcn I mean, just the fact that I can ping hundreds of hosts without waiting for ssh is something ansible couldn't do last time I looked.
15:11 dynek XenophonF: thank you
15:11 dynek baikal: thank you
15:19 inad922 joined #salt
15:26 nixjdm joined #salt
15:27 DammitJim joined #salt
15:35 dendazen joined #salt
15:37 dezertol joined #salt
15:42 nixjdm joined #salt
15:43 XenophonF pcn: I want a pretty job status page
15:43 XenophonF I also want a way to invoke state.apply without giving people shell access on the master.
15:44 aldevar joined #salt
15:54 Miuku Sometimes it's easier to visualize things from a pretty web page.
16:00 tiwula joined #salt
16:16 motherfsck joined #salt
16:20 mikecmpbll joined #salt
16:28 XenophonF True
16:28 GuyOthersome joined #salt
16:29 XenophonF Many of my colleagues are also unfamiliar with the Unix command line.
16:29 masber joined #salt
16:29 XenophonF So giving them a different UI would help me drive CI/CD/CM adoption within my organization
16:30 aldevar joined #salt
16:40 XenophonF can anyone clue me into how Salt picks which boto library it uses?
16:40 XenophonF I want to use the boto3 libraries to talk to EC2, not boto, largely b/c the latter doesn't expose some data that I need.
16:42 GuyOthersome left #salt
16:44 nixjdm joined #salt
16:51 masber joined #salt
16:51 XenophonF right now I'm calling __utils__['boto.assign_funcs'](...)
16:52 XenophonF maybe I need to change that to boto3.assign_funcs?
16:52 XenophonF it isn't clear from TFS
16:54 XenophonF oh I get it
16:54 XenophonF my version of salt.modules.boto3_route53 is wrong or something
16:54 XenophonF (still on 2017.7.2)
16:55 XenophonF the init code in salt.modules.boto3_elasticache does call boto3.assign_funcs
17:05 NV joined #salt
17:33 nixjdm_ joined #salt
17:39 wongster80 joined #salt
17:41 LostSoul joined #salt
17:42 babilen Hmm .. how do I get saltstack to run a bash one-liner with a for loop (not state, but cmd.run/cmd.shell/...)
17:42 MTecknology I think it's usually best to manage a script file and run it that way.
17:43 babilen *nod*
17:44 MTecknology ah.. cmd.script would be a shortcut to that
17:46 whytewolf ... salt '*' cmd.run 'for i in `ls /etc/`; do echo $i; done'
17:46 whytewolf that works for me
17:47 nixjdm_ joined #salt
17:48 MTecknology I remember having issues with parameter expansion and the like using cmd.run.
17:48 whytewolf just needs to be escaped and quoted to the point it gets to the shell with out your local shell expanding it
17:48 brokensyntax joined #salt
17:49 whytewolf hence the use of ' instead of "
17:50 evle joined #salt
17:54 cgiroua joined #salt
17:55 cgiroua joined #salt
17:59 cgiroua joined #salt
18:05 nixjdm_ joined #salt
18:09 cgiroua_ joined #salt
18:13 mikecmpbll joined #salt
18:16 Guest73 joined #salt
18:29 edrocks joined #salt
18:48 babilen +1
18:51 nbari joined #salt
18:54 nbari hi all, what could be the best way to install a project repo, and a driver only if the standar output is (exit 0), lspci | grep -i nvidia
18:54 MTecknology -onlyif
18:55 whytewolf nbari: https://docs.saltstack.com/en/latest/ref/states/requisites.html#onlyif
18:55 nbari currently indeed using -onlyif and in the other blocks I could just use - require : cmd.run ?
18:56 whytewolf onlyif will put a state into run with no changes. so you would want onchanges not require
18:57 coldbrewedbrew joined #salt
18:57 coldbrewedbrew joined #salt
18:57 coldbrewedbrew_ joined #salt
18:58 AvengerMoJo joined #salt
19:02 threwahway joined #salt
19:02 nbari ok, and and how to prevent the state failed  in a cleaner way, currently in some commands, for example cmd.run: /bin/false I need do something like /bin/false; exit 0
19:03 babilen nbari: /bin/false *does* fail, fsvo 'fail'
19:05 babilen It succeeds at failing :)
19:06 nbari ok so then the way of taking advange of the status code if > 0 could be using -check_cmd: ?
19:06 cgiroua joined #salt
19:06 nbari I am trying ot convert an ansible recipie in where i can `register` the output of the command and based on the returncode take an action
19:07 nbari just trying to wrap the concept in salt
19:07 babilen It might not be the best idea to try to implement this in exactly the same way. What are you trying to do?
19:08 babilen And you can easily run a state in an SLS from an execution module .. it might not be the most idiomatic thing to do, but you can certainly do that
19:08 nbari to install a package (nvidia driver) if lspci | grep -i nvidia
19:09 nbari going further later (maybe adding something to the grain items) avoid doing the lspci | grep -i nvidia
19:09 babilen The most salty way would be to target this state by a (custom?) grain. You can, obviously, also include the aforementions "- onlyif: ...." requisite for your pkg.installed state
19:10 babilen You should have a "gpus" grain, what does it give you?
19:10 nbari just trying this on boot time didn't knew about the gpu grain
19:11 nbari so I am adding this in cloudinit, installing saltstack, and start the minion
19:12 babilen What does "salt 'foominion' grains.get gpus" give you for that box?
19:13 nbari currently I have no access to the salt, but I think that based on the grains output manybe I don't even need lscpi
19:13 nbari I would just need to search for nvidia within the grains, any about how to do it so I could test later
19:14 babilen Something like G@gpus:*:vendor:nvidia (assuming that's the output) should work as matcher
19:14 nbari and that can be in the top.sls right
19:14 babilen Absolutely, the above example is a compound matcher
19:15 babilen So you would target the SLS that installs/configures the driver by that and - match: compound
19:16 babilen That way you'd never attempt to install it on minions that don't have at least one nvidia gpu
19:16 nbari many thanks, a problem I also had is how to make a block for this: yum -y install http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
19:16 babilen That configures a repo?
19:16 nbari right
19:17 nbari currently I am runing it with: cmd.run: yum -y ....; exit 0
19:17 nbari maingly because the second time always fails
19:17 babilen Well, you could just install that package with pkg.installed and that URL as - source, but https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html might be a better approach
19:18 nbari is what I tried, works the first time, but later it keeps failing
19:18 nbari stdout: Not output or something like that
19:18 nbari or No action required don't exactly remember, but is a msg indication pkg already installed
19:19 babilen yeah
19:19 babilen yum is essentially telling you "done that already"
19:19 nbari right but returns > 0
19:19 babilen So, you'd have to add logic around the salt state to prevent it from running if it has already been achieved
19:19 babilen pkgrepo.managed might be better
19:20 nbari ok, many thanks
19:21 babilen cmd.run really is a last resort, there are normally more specific states available that incorporate the entire "should/should not run"-logic already
19:21 babilen That way you don't have to repeat the "logic", but can concentrate on the "what"
19:22 nbari ok
19:22 nbari last question, after I install the nvidia drivers I need to reboot, how to ensure I only reboot once
19:22 nbari and not keep rebooting every time
19:27 babilen You would use requisites, in particular onchanges, to trigger a state only when your "install driver" change had changes. You can use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event for the reboot
19:28 babilen onchanges/onchanges_in (depending on which state you want to add it to)
19:28 nbari perfect will give a try
19:28 dave_den joined #salt
19:28 dave_den left #salt
19:30 disa joined #salt
19:31 babilen nbari: id and target would come out of grains, here (same minion)
19:31 nbari ok
19:33 disa left #salt
19:33 disa133252525 joined #salt
19:38 Marcus1234 joined #salt
19:49 RF_ joined #salt
19:52 RF_ I have a custom state called dns.A_present which basically calls another state __states__['boto3_route53.rr_present'] with some predefined variables. When I first ran the state, I am getting the KeyError error: https://pastebin.com/UaUxAvM8
19:53 RF_ When I ran it again, the error doesn't show up. Was it because when I ran it for the first time, __states__['boto3_route53.rr_present'] wasn't available yet?
19:53 Trauma joined #salt
19:55 samodid joined #salt
19:58 babilen RF_: Why are you calling this in such a weird manner?
19:58 babilen And yes, it looks as if that state has not yet been monkey patches into __states__ at that time
19:58 babilen *patched
19:59 RF_ babilen: I need to get a variable dynamically at the state execution time that gets fed to state boto3_route53.rr_present. It currently is the only way to archive what I wanted.
20:01 RF_ (the other way to solve my issue is Slots which will be included in 2018.3 release)
20:01 babilen aye
20:01 RF_ what's the best way to make sure my state gets executed only when __states__['boto3_route53.rr_present'] is available?
20:01 babilen May I see your state? Not sure if I can help, but seeing it might inspire some ideas
20:02 RF_ ok
20:02 babilen I'm also off soon and others might be interested
20:03 RF_ babilen: Here is my custom state: https://pastebin.com/HSimszK6
20:03 babilen https://pastebin.com/raw/HSimszK6 (less eye cancery)
20:03 threwahway joined #salt
20:05 babilen RF_: You probably want to call the underlying execution module :-/
20:05 babilen Ah, that's a complicated state
20:07 RF_ babilen: Is it? I thought it's simple. Yeah, the reason behind doing it is a bit complicated.
20:08 babilen Can you run __salt__['state.apply'] ?
20:08 babilen No, your state is straightforward .. the underlying state rr_present isn't
20:09 RF_ oh yeah :) It's the reason why I chose to call the state instead of the execution module.
20:09 RF_ Or I would have ended up re-writing the whole thing
20:09 RF_ I got the idea from https://docs.saltstack.com/en/latest/ref/states/writing.html
20:10 RF_ It says "The variable __states__ is packed into the modules after they are loaded into the Salt minion.
20:10 RF_ in section "CROSS CALLING STATE MODULES"
20:13 RF_ The thing is it works when I run 'salt-call --local' for a second time and any time after that. It just bombed when it was executed for the first time.
20:14 babilen Try __salt__['state.apply'] ... obviously the monkey patching is happening too late
20:16 RF_ babilen: Where do I use __salt__['state.apply']?
20:19 RF_ babilen: state.apply calls state.highstate which is what I run (salt-call --local state.highstate --state-verbose=false)
20:21 sh123124213 joined #salt
20:30 whytewolf honestly it sounds like boto3_route53 isn't loaded the first time it runs but is the second. is one of your states installing the requirments for boto3?
20:32 RF_ whytewolf: yes. THe state that installs boto3 already finished before my custom state got executed.
20:35 zerocoolback joined #salt
20:35 whytewolf humm. i know this is normally handeled with reload_modules for when a module is needed. not sure if that affects the __state__ dict though
20:40 whytewolf RF_: try adding - reload_modules true to the state that puts the dependencies for boto3 in place. see if that helps
20:40 GrisKo joined #salt
20:41 whytewolf gah forgot a :
20:45 xet7 joined #salt
20:52 yuhl joined #salt
21:04 threwahway joined #salt
21:09 thelocehiliosan joined #salt
21:09 ymasson joined #salt
21:16 yuhl_ joined #salt
21:18 thelocehiliosan joined #salt
21:22 RF_ whytewolf: ok, let me try that. Will let you know how it goes
21:22 RF_ had to step away for a bit
21:23 whytewolf to be frank, I'm not 100% sure it will help. but hey worth a shot
21:25 xet7 joined #salt
21:37 gmoro joined #salt
21:41 sayyid9000 joined #salt
21:45 babilen RF_: That would only help if you do indeed install modules during the run that doesn't work. Typically take a look at the __virtual__ function of the respective module
21:46 babilen You find the exactl logic that determines if an execution module or state module is loaded in there
21:47 babilen Probably would have helped to post a complete example of the failing state run
21:50 thelocehiliosan joined #salt
22:05 threwahway joined #salt
22:05 xet7 joined #salt
22:13 RF_ whytewolf: I can confirm '- reload_modules: True' in the state that installs boto3 via pip helped!
22:13 whytewolf yay
22:14 RF_ whytewolf: Thanks for the help! I didn't even realize there was this option, but then I only started using salt a few weeks ago and have a lot to learn.
22:14 whytewolf don't feel bad. that is not a common option to need.
22:14 whytewolf it is there for when it is needed.
22:16 RF_ babilen: Thanks for your help as well!
22:17 RF_ whytewolf: I learn something new here everyday :)
22:35 aldevar left #salt
22:50 XenophonF success!
22:50 XenophonF https://github.com/irtnog/salt-states/blob/development/_modules/irtnog_ec2.py
22:51 XenophonF now all I have to do to keep my AWS profiles current is re-run the salt.cloud SLS
22:51 hemebond irtnog
22:52 XenophonF I love E.B. White
23:00 pcdummy XenophonF: we have the same love mate
23:00 masber joined #salt
23:06 threwahway joined #salt
23:19 thelocehiliosan joined #salt
23:20 ixs joined #salt
23:21 ixs is here anyone who has done some work on the php.ng formula? the ng map looks to be full of duplicate definitions and I am wondering what I am missing.
23:27 threwahway joined #salt
23:29 threwahway_ joined #salt
23:40 sayyid9000 joined #salt
23:55 hemebond ixs: Got a link?

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