Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-07-22

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

All times shown according to UTC.

Time Nick Message
00:00 edrocks joined #salt
00:01 isntall joined #salt
00:01 isntall joined #salt
00:09 ajw0100 joined #salt
00:12 onlyanegg joined #salt
00:14 west575 joined #salt
00:15 scsinutz joined #salt
00:20 ninjada joined #salt
00:20 ssplatt joined #salt
00:20 MTecknology hm...   -G 'not virtualization:xen'  -- Can I do that?
00:21 * MTecknology can't remember how to negate things
00:22 brotatochip joined #salt
00:22 MTecknology ah,  -C '* and not ...'
00:28 subsignal joined #salt
00:30 fxhp joined #salt
00:32 cyborg-one joined #salt
00:33 flowstate joined #salt
00:35 west575 joined #salt
00:43 thejrose1984 joined #salt
00:46 fgimian joined #salt
00:48 _JZ_ joined #salt
01:06 Disorganized_ joined #salt
01:08 Disorganized_ joined #salt
01:13 viq joined #salt
01:13 catpiggest joined #salt
01:14 mailto1587 joined #salt
01:17 Nahual joined #salt
01:22 Disorganized_ joined #salt
01:24 Sammichmaker joined #salt
01:24 ssplatt joined #salt
01:26 MTecknology heh... this is interesting. I have a state that creates a sudoers file. I have another state that restarts a service. service.running requires file.managed. Woo.. simple.
01:27 MTecknology However, when both run in the same salt run, where I can see the file created before the service restarts, the service will start up and not be able to run its sudo commands. If we manually restart the service, it picks up just fine.
01:29 a_ghost_irl joined #salt
01:29 listener joined #salt
01:32 flowstate joined #salt
01:40 tuxx joined #salt
01:46 ssplatt joined #salt
01:50 yetAnotherZero joined #salt
01:55 mosen joined #salt
01:57 Lionel_Debroux_ joined #salt
01:59 onlyanegg joined #salt
02:02 ageorgop joined #salt
02:02 iggy pcn: the data is cached, publish would be the non-caching version
02:04 edrocks joined #salt
02:12 amcorreia joined #salt
02:22 ninjada joined #salt
02:29 onlyanegg joined #salt
02:31 netcho joined #salt
02:34 cableninja joined #salt
02:37 MConceicao joined #salt
02:39 bastiand1 joined #salt
02:42 cableninja_ joined #salt
02:43 cableninja__ joined #salt
02:46 cableninja joined #salt
02:48 ageorgop joined #salt
02:49 flowstate joined #salt
02:54 evle joined #salt
02:58 jfelchner joined #salt
03:07 flowstate joined #salt
03:10 DEger joined #salt
03:13 rideh joined #salt
03:16 MarcioConceicao joined #salt
03:24 DEger joined #salt
03:27 raspy_ joined #salt
03:31 cableninja_ joined #salt
03:32 ageorgop joined #salt
03:32 racooper joined #salt
03:32 flowstate joined #salt
03:32 debian112 joined #salt
03:46 k_sze[work] joined #salt
03:47 onlyanegg joined #salt
03:54 scsinutz joined #salt
03:59 scsinutz joined #salt
04:00 mohae_ joined #salt
04:06 edrocks joined #salt
04:17 raspy_ [salt.state][CRITICAL][13027] Rendering SLS 'dev:firstrun' failed: Jinja variable 'dict object' has no attribute 'firstrun'
04:17 raspy_ anyone happen to know why im getting this error?
04:18 raspy_ its happening on the minion
04:19 cableninja__ joined #salt
04:19 hemebond raspy_: Because your state or pillar doesn't have a "firstrun" attribute.
04:20 fxhp joined #salt
04:21 hemebond Can't help more than that without seeing the configs.
04:21 raspy_ hemebond: any particular file I can show you?
04:21 subsignal joined #salt
04:21 hemebond The state that isn't applying and the pillar that is supposed to have the firstrun property.
04:22 cableninja joined #salt
04:23 raspy_ {% if  grains['firstrun'] == True %}
04:23 raspy_ this is in my firstrun init.sls file
04:23 raspy_ are grains specific to pillars?
04:23 hemebond Oh it's a grain?
04:24 hemebond That means there is no firstrun grain.
04:24 raspy_ ooooo
04:24 raspy_ i think i see what im doing, im not even setting firstrun: True
04:24 raspy_ in the map file
04:24 raspy_ let me try
04:25 raspy_ hemebond: how salt is set up here is probably not following best practice -_-
04:25 hemebond The best practice is what works for you :-)
04:26 raspy_ ooooo n1
04:26 raspy_ ;)
04:31 ageorgop joined #salt
04:32 flowstate joined #salt
04:32 netcho joined #salt
04:46 DEger joined #salt
04:54 rdas joined #salt
05:03 raspy_ yeah hemebond it was because i wasnt even setting the grain that my sls file is looking for -_-
05:03 hemebond :-)
05:07 Eureka70_ joined #salt
05:07 ageorgop joined #salt
05:13 raspy_ hemebond: yt bud
05:13 hemebond :thumbsuo:
05:13 hemebond *up
05:13 raspy_ Rendering SLS 'dev:firstrun' failed: Jinja variable 'dict object' has no attribute 'clusterType'
05:13 raspy_ where is clusterType coming from?
05:13 hemebond Your state?
05:13 raspy_ its not even in the firstrun.sls
05:14 raspy_ hemebond: is there a way to run some salt command to see where these variables are being called from
05:15 raspy_ salt '*' state.check_request ?
05:15 hemebond You should be able to just search your files, no?
05:15 raspy_ yeah i did
05:15 raspy_ but its commented out
05:15 hemebond Also, debug mode should show the states being applied.
05:15 hemebond Did you sync_all?
05:15 hemebond salt 'minion' saltutil.sync_all
05:17 DEger joined #salt
05:17 raspy_ running
05:18 raspy_ files/dev/firstrun/init.sls:#{% if grains['clusterType'] == 'SingleNode' %}
05:18 raspy_ files/dev/top.sls:    'clusterType:singleNode':
05:18 hemebond Uh, you haven't commented that out.
05:18 raspy_ those are the only two lines with clusterType
05:18 hemebond # doesn't apply to Jinja.
05:18 raspy_ oh wtf
05:18 hemebond Only to YAML.
05:18 raspy_ lol
05:19 hemebond Jinja comments are {# #}
05:19 raspy_ that explains alot of what ive been seeing
05:19 raspy_ fml
05:19 raspy_ thx hemebond
05:19 hemebond :thumbsup: :smile_sparkle:
05:19 hemebond 👍
05:20 raspy_ wow
05:20 djgerm joined #salt
05:20 raspy_ ok im too tired moving on good night dude!
05:20 lompik joined #salt
05:20 raspy_ or good morning wherever u are
05:20 hemebond g'night
05:21 brent_ joined #salt
05:32 flowstate joined #salt
05:33 TyrfingMjolnir joined #salt
05:38 ninjada joined #salt
05:40 jhauser joined #salt
05:42 SpX joined #salt
05:51 impi joined #salt
05:51 scsinutz joined #salt
05:51 POJO joined #salt
06:01 djgerm left #salt
06:03 mohae joined #salt
06:05 felskrone joined #salt
06:09 edrocks joined #salt
06:10 cliluw joined #salt
06:11 onlyanegg joined #salt
06:12 brent_ joined #salt
06:16 slav0nic joined #salt
06:17 jtang joined #salt
06:18 ajw0100 joined #salt
06:18 kawa2014 joined #salt
06:20 teryx510 joined #salt
06:23 subsignal joined #salt
06:25 cableninja joined #salt
06:33 netcho joined #salt
06:35 justanotheruser joined #salt
06:37 flowstate joined #salt
06:43 manji joined #salt
06:49 aw110f joined #salt
06:51 sjorge joined #salt
06:55 fracklen joined #salt
06:55 subsignal joined #salt
06:56 subsigna_ joined #salt
06:57 fracklen joined #salt
07:00 ivanjaros joined #salt
07:04 AirOnSkin joined #salt
07:05 Trauma joined #salt
07:11 ninjada_ joined #salt
07:17 whaity_ joined #salt
07:20 LostSoul Hi
07:20 LostSoul I have strange issue with salt
07:20 hemebond Hi
07:21 LostSoul I added cmd.run to import apt-key by wget key from site
07:21 hemebond LostSoul: Why are you using cmd.run instead of the apt module?
07:22 LostSoul Problem is it hangs (i thought there was a problem with proxy, but I configured it and tested manually and it should work now)
07:22 LostSoul apt module didn't work well in my case
07:22 LostSoul At least in 2015, now I have 2016
07:22 LostSoul It was not able to get apt-key
07:22 LostSoul Anyway is it normal that salt hangs like for 3-5 min?
07:22 LostSoul Should he termineted job in that time or whatever?
07:23 LostSoul As when I ctrl + c it on master, I have zombie salt-minion on my node
07:23 hemebond I'm not sure if there is a time limit on Salt tasks.
07:23 LostSoul Damn, it's not wise
07:23 hemebond Someone was in here earlier talking about long-running tasks.
07:23 hemebond Why is that?
07:23 LostSoul As it hanged for more that 5 min and I guess it's not how CI suppose to work :O
07:24 hemebond Well, you can run commands with --async to not wait for the return.
07:24 manji joined #salt
07:25 LostSoul How to do so? Use it in state?
07:25 hemebond No, on your salt call, e.g., "salt 'min' state.apply --async"
07:25 hemebond Something like that.
07:25 tercenya joined #salt
07:26 av_ joined #salt
07:27 dariusjs joined #salt
07:33 AndreasLutro if a cmd.run hangs that's your own problem to solve, though I think there is a timeout arg to cmd.run'
07:38 LostSoul AndreasLutro: Thanks, I will look at it
07:38 LostSoul I will try with module then hemebond
07:39 LostSoul Tell me how to use grain in module?
07:39 LostSoul Like I want to set repository to be dynamic, basen on grains
07:39 IdoKaplan joined #salt
07:39 DEger joined #salt
07:39 LostSoul somethins like http://blabla.com/grains['oscodename']?
07:40 LostSoul Something *
07:40 om joined #salt
07:42 josuebrunel joined #salt
07:43 IdoKaplan HI, I'm using "file.accumulated" and if for example I write    - text:       - "    test1"       - "    test1"  . After highstate, the output will be only one line of "test1", despite, "test1" should be showed twice. Do you have an idea?
07:43 hemebond You can use grains in Pillars.
07:44 krymzon joined #salt
07:46 LostSoul hemebond: Grains in pillars :O
07:46 tercenya joined #salt
07:46 LostSoul I wanted to my module to be more universal
07:46 LostSoul Should I verify each case?
07:46 hemebond Uh. By module you mean state/formula?
07:46 LostSoul I mean not do one that is based on grain, but rather check grain and build on it?
07:46 LostSoul yes
07:47 LostSoul Like in   pkgrepo.managed:
07:47 hemebond Normally formulas reference pillars.
07:47 LostSoul So I can reference grain?
07:47 hemebond From Pillars? Yes.
07:47 LostSoul As I want to build url for each oscodename
07:47 hemebond Uh, you should look at existing formulas.
07:47 hemebond They have a map.jinja that will do that.
07:48 hemebond Oh, sorry, formulas DO reference some grains :-D
07:48 hemebond Not custom grains but default grains.
07:48 hemebond I didn't realise you were just wanting oscodename. There are a log of formulas that do that. Check them out.
07:49 DEger joined #salt
07:49 hemebond IdoKaplan: How do you know you can supply a list for the "text" parameter?
07:50 hemebond Nevermind, read it :-D
07:50 hemebond Can you post your state?
07:52 LostSoul I want to use default grain :)
07:52 LostSoul Yes, I will just hide some names
07:52 IdoKaplan nexus-capabilities-accumulated-{{ nexusrpm }}:   file.accumulated:     - filename: /usr/local/sonatype-work/nexus/conf/capabilities.xml     - text:       - "    <capability>"       - "    <capability>"     - require_in:       - file: /usr/local/sonatype-work/nexus/conf/capabilities.xml  /usr/local/sonatype-work/nexus/conf/capabilities.xml:   file.managed:     - source: 'salt://nexus/files/capabilities.xml'     - makedirs : True     -
07:52 hemebond IdoKaplan: Use a paste website.
07:52 LostSoul IdoKaplan: Use pastebin or whatever
07:52 hemebond !pastebin
07:52 hemebond !paste
07:53 IdoKaplan ok, sorry
07:53 LostSoul hemebond: Give me 10 min
07:53 hemebond Oh come on, I'm sure that worked for someone.
07:54 IdoKaplan http://pastebin.com/KspbHDdr
07:54 hemebond Can you add your template?
07:55 hemebond or at least the templated part of the file?
07:55 lero joined #salt
07:56 IdoKaplan http://pastebin.com/rkkB868v
07:57 hemebond And you end up with a single <capability> in the file?
07:57 IdoKaplan yes,
07:59 hemebond Does it work if you hard-code nexusrpm and move it out of the other loop?
08:00 DEger joined #salt
08:02 iggy hemebond: it doesn't work, but if you think it would be a valuable addition, I can add it
08:02 hemebond Me?
08:03 iggy re: !pastebin
08:03 hemebond Ooh, right. I thought there was already stuff like that.
08:03 hemebond I've seen people pull up docs links with a command.
08:03 hemebond But I can never remember how they did it :-)
08:04 sjorge joined #salt
08:05 Hybrid1 joined #salt
08:05 iggy !salt states.pkgrepo
08:05 saltstackbot https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html
08:05 hemebond Aha!
08:05 iggy that and github are the only modules I have enabled
08:05 hemebond Thanks :-)
08:07 LostSoul hemebond: http://paste.debian.net/hidden/598af294/
08:07 LostSoul Something like this
08:07 ws2k3 joined #salt
08:07 LostSoul I don't know how to access system grains
08:08 irctc357 joined #salt
08:08 hemebond LostSoul: Some info on best practices for formulas https://docs.saltstack.com/en/latest/topics/best_practices.html
08:08 garphy joined #salt
08:09 hemebond postgres formula which seems to have quite a complicated setup https://github.com/saltstack-formulas/postgres-formula/tree/master/postgres
08:09 hemebond Trying to find a simpler formula.
08:10 watersoul_ joined #salt
08:10 hemebond Seems some have been updated with more deviated and complicated setups.
08:10 iggy requirement unfortunately
08:10 ronnix joined #salt
08:10 hemebond Apache formula has a regular map.jinja https://github.com/saltstack-formulas/apache-formula/blob/master/apache/map.jinja
08:11 hemebond requirement?
08:11 nebuchad` joined #salt
08:11 edrocks joined #salt
08:12 qman joined #salt
08:12 iggy the more distros/versions/etc you support the messier a single file map.jinja gets
08:12 pcdummy joined #salt
08:12 netzvieh joined #salt
08:12 hemebond Ah, yeah. I notice MySQL uses YAML now. Does seem nicer.
08:12 tru_tru joined #salt
08:12 hamstah joined #salt
08:12 mortis joined #salt
08:12 iggy we had some that were hundreds of lines long... made significantly shorter by moving to the yaml+jinja merging
08:12 Yoda-BZH joined #salt
08:13 baffle joined #salt
08:13 tedski joined #salt
08:13 Yoda-BZH joined #salt
08:13 Zachary_DuBois joined #salt
08:13 smkelly joined #salt
08:13 justanotheruser joined #salt
08:13 lazybear joined #salt
08:13 nicksloan joined #salt
08:13 notCalle joined #salt
08:13 nicksloan joined #salt
08:13 saltstackbot joined #salt
08:14 Ashald joined #salt
08:14 angvp joined #salt
08:14 LostSoul joined #salt
08:14 jacksontj joined #salt
08:14 wm-bot4 joined #salt
08:16 LostSoul hemebond: Any advice on that? :)
08:16 hemebond On what? Your formula?
08:17 Heartsbane joined #salt
08:17 hemebond Is this a formula or just a state for your setup?
08:17 alias joined #salt
08:19 LostSoul State
08:19 hemebond That'd be fine for just a one-off state.
08:19 IdoKaplan hemebond: I ave hard-coded nexusrpm and deleted the loop, and it still end with a single <capability> in the file.
08:20 Electron^- joined #salt
08:20 sfxandy joined #salt
08:20 hemebond IdoKaplan: Which version of Salt?
08:20 LostSoul hemebond: I didn't get it?
08:20 LostSoul I don't know how to access grains
08:20 LostSoul like oscodename
08:20 LostSoul Is it possible to use oscodename in state?
08:21 DEger joined #salt
08:21 necronian joined #salt
08:21 hemebond {{ salt['grains.get']('oscodename') }}
08:21 hemebond I think.
08:21 IdoKaplan salt-master-2016.3.0-1.el6.noarch
08:22 IdoKaplan salt-minion-2016.3.1-1.el6.noarch
08:22 hemebond IdoKaplan: Lemme write up something similar and test; I've not used this module function before.
08:22 hemebond Wait... your minion is a newer version?
08:22 s_kunk joined #salt
08:22 hemebond Is there a reason for that?
08:22 IdoKaplan I don't think so,
08:23 IdoKaplan I there an issue with this version?
08:23 IdoKaplan I=is
08:23 armyriad joined #salt
08:24 hemebond Not sure. The difference in versions isn't ideal.
08:24 netcho joined #salt
08:24 hemebond But hopefully not causing the issue.
08:24 s_kunk joined #salt
08:24 IdoKaplan Do you suggest to upgrade salt-master ?
08:25 LostSoul hemebond: I was thinking about this way - thanks man :)
08:25 hemebond LostSoul: 👍
08:25 losh joined #salt
08:27 manjiki joined #salt
08:27 hemebond IdoKaplan: I've also got a single line.
08:28 IdoKaplan hemebond: So it looks like it's a bug?
08:28 hemebond Testing something else now. Just as my internet decided to play about.
08:32 armyriad joined #salt
08:32 sagerdearia joined #salt
08:36 IdoKaplan hemebond: If i'm using http://pastebin.com/j4B32aNm it's working, but i need spaces in order to be able to read the xml file.
08:36 ribx joined #salt
08:36 suhao joined #salt
08:37 hemebond Are you trying to build an XML document?
08:39 IdoKaplan yes
08:39 hemebond Do you _have_ to use accumulator?
08:45 IdoKaplan hemebond: yes, because there is a block that I want to duplicate in the file
08:46 IdoKaplan hemebond: duplicate with different pillar
08:47 armyriad joined #salt
08:48 GreatSnoopy joined #salt
08:49 Electron^- joined #salt
08:50 DEger joined #salt
08:51 hemebond IdoKaplan: I got both lines showing up.
08:52 IdoKaplan 10x!! how??
08:52 yuhlw_ joined #salt
08:52 hemebond By making them different :-)
08:52 IdoKaplan :(
08:53 IdoKaplan not good :(
08:53 LostSoul hemebond: Error: HTTP 599: Timeout reading - I'm getting this when I try to get key
08:53 LostSoul But it's accessible and I can get it via wget
08:54 hemebond LostSoul: Doesn't require environment variables or anything? No HTTP proxy?
08:54 IdoKaplan hembound: Do you know is it's possible to use this syntax but to add spaces in  the first like? http://pastebin.com/j4B32aNm
08:55 hemebond IdoKaplan: Will test it out now.
08:55 IdoKaplan hembond: *like=line
08:55 LostSoul hemebond: I've exported proxy in bashrc
08:55 LostSoul Also in minion conf
08:55 LostSoul apt-get is able to get it's packets
08:56 hemebond LostSoul: Salt doesn't read any of that.
08:56 LostSoul Hmm, what can I do :O
08:56 hemebond The exported proxy stuff... I remember the issue for that. Not sure when it was included.
08:56 hemebond (assuming it was)
08:56 hemebond There is a way to configure Apt itself to always use a proxy.
08:57 hemebond IdoKaplan: Are you _sure_ you can't use something better to build this XML?
08:58 hemebond LostSoul: I think that's what I did for my local VM test environment.
08:58 LostSoul I mean apt-get is able to download packets
08:58 hemebond It is?
08:58 LostSoul But this key_url is not
08:58 hemebond Even without your environment variables?
09:00 LostSoul Yes
09:00 IdoKaplan hembound: no, I have no idea on a better way if I don't know to duplicate code
09:01 hemebond IdoKaplan: Can you provide more info on the bigger picture?
09:01 LostSoul I'm able to use wget
09:01 armyriad joined #salt
09:02 LostSoul But salt can't get it, I don't know why
09:02 hemebond LostSoul: Does Salt use wget?
09:02 hemebond So there's no proxy?
09:03 hemebond If there's a proxy then you have environment variables or configs to send your traffic through that and Salt will _not_ load those configs.
09:03 IdoKaplan I'm using Nexus as a repository, and I would like to configure repository for each env (qa, dev, stage, etc'). Nexus configuration is xml file, so I want to edit this file in order to add all the env. repos
09:03 hemebond Or environment variables.
09:03 hemebond IdoKaplan: Are you building the entire config/xml file?
09:04 LostSoul hemebond: Salts uses ssh right?
09:04 hemebond LostSoul: No.
09:04 hemebond salt-ssh does, but that's something else.
09:04 IdoKaplan hembound: No. there is a default xml file with no repos and i'm editing this file to add the repos.
09:05 LostSoul hemebond: Ou man
09:05 LostSoul I don't know how to use it ;/
09:06 hemebond LostSoul: I think I worked around this issue because Salt didn't support it. I'm booting my VMs now.
09:07 LostSoul Thanks hemebond
09:08 LostSoul I can always add it to repo, but I would prefer to get it from web
09:09 DEger joined #salt
09:10 impi joined #salt
09:10 hemebond LostSoul: It appears I worked around the problem by hosting the key on my management server, local to the environment, and serving it out over HTTP.
09:12 armyriad joined #salt
09:14 hemebond IdoKaplan: Personally I started by just writing the entire XML, but later moved onto using XSL to update XML config files.
09:16 LostSoul hemebond: So locally is the only way?
09:16 LostSoul Damn
09:16 hemebond That's the only method I found to be easy and reliable.
09:17 hemebond The manager downloads it from the official place, then hosts it for other servers.
09:17 IdoKaplan hembond: do you have an idea how to add spaces to the first line if using: "- text: |"
09:17 Electron^- joined #salt
09:17 hemebond Oh, I just installed an ELK stack on this VM.
09:17 hemebond I was wondering what it was doing when I highstated it.
09:17 hemebond IdoKaplan: I tried but it looked as though they were trimmed.
09:19 IdoKaplan Do you know if it's possible and how to edit the module?
09:19 hemebond It's based on the indentation of the first line./
09:19 hemebond This part is YAML, not the module.
09:19 IdoKaplan Is it possible to add maybe regex or something?
09:19 hemebond Add regex to what?
09:20 DEger joined #salt
09:20 hemebond IdoKaplan: Maybe you can look at augeas.
09:20 hemebond There is a state module for it.
09:21 tercenya joined #salt
09:21 hemebond And it can modify XML files.
09:21 armyriad joined #salt
09:22 hemebond !salt states.augeas
09:22 saltstackbot https://docs.saltstack.com/en/latest/ref/states/all/salt.states.augeas.html
09:22 subsignal joined #salt
09:24 IdoKaplan ok, thanks. do you think that we need to open a bug?
09:25 hemebond I would have to read the module. It might be working as intended.
09:25 hemebond You can if you want to.
09:25 hemebond Provide a minimal example.
09:25 hemebond BTW...
09:25 hemebond Your lines were the same. How was that going to work in the file?
09:26 hemebond Aha
09:27 hemebond - foo - bar - foo works fine
09:27 hemebond But still, using something like augeas is far better.
09:28 IdoKaplan it's not needs to be unique
09:28 hemebond When accumulator works if adjacent lines are unique.
09:29 DEger joined #salt
09:29 fixit26 joined #salt
09:29 IdoKaplan Is it by design? if so, i'm not sure why
09:30 hemebond No idea, sorry. You'd have to check the code and issues to find that out.
09:30 IdoKaplan ok, thank you very much
09:31 hemebond Good luck 👍
09:34 bluenemo joined #salt
09:36 badon joined #salt
09:37 artemz joined #salt
09:40 impi joined #salt
09:42 Cadmus There's no way to ignore source_hash in file.managed is there? I'm trying to do something with Jenkins so the file doesn't really exist until the last moment
09:43 hemebond Cadmus: I think there have been a few issues about that.
09:45 Cadmus hemebond: I know we should hash everything (and I've seen the open issues). I'll talk to our CI guy about generating a manifest as part of the build, then I can use an http path as source_hash
09:45 hemebond Cadmus: You could just use a cmd.run to download it.
09:46 hemebond I think that's how I got around it previously.
09:48 Cadmus cmarzullo: In other news I did get the right syntax for pushing in the pillar data in th Jenkins plugin.
09:49 DEger joined #salt
09:54 LostSoul hemebond: My salt while highstate again hanged, I've restarted minion/master and ... after second time I've run it it said that repo was already added
09:54 LostSoul Damn
09:54 LostSoul I'm lost tbh :)
09:55 hemebond repo.managed actually tries to confirm the repo by contacting it.
09:55 hemebond So that can hang/timeout/error-out if you need a proxy.
09:59 viq joined #salt
09:59 DEger joined #salt
10:02 rem5 joined #salt
10:08 LostSoul hemebond: But I was adding it with key from git
10:08 LostSoul Hmm, interesting
10:09 LostSoul I mean like salt://...
10:09 LostSoul hemebond: Is it me or just salt is buggy :P?
10:09 DEger joined #salt
10:09 hemebond LostSoul: I don't mean it checks/gets the key, I mean it actually queries the repo.
10:09 LostSoul As I recently updated my master to 2016 and I might be wrong but it seems to work strange
10:09 hemebond You give it a URL and it goes "Does this repo actually exist? Lemme check..."
10:11 LostSoul I was wrong
10:11 LostSoul I mean I keep my salt in repo
10:11 tercenya joined #salt
10:11 LostSoul So for salt it's like local
10:11 LostSoul Anyway thank you man for help
10:11 LostSoul Still I think it's bug that I can import it locally via salt:// but I can't via url
10:11 hemebond 👍
10:12 arif-ali joined #salt
10:12 Qlawy How to use salt.modules.openvswitch.bridge_create in state?
10:12 Qlawy just openvswitch.bridge_create with: - args: bridgename?
10:13 hemebond Qlawy: That's an execution module.
10:13 hemebond You could call it from a state using module.run
10:13 LostSoul hemebond: Heh, strange thing is I don't know how to debug it :)
10:14 Qlawy hemebond: oh... again this module ;) thanks
10:14 hemebond !salt states.openvswitch_bridge
10:14 saltstackbot https://docs.saltstack.com/en/latest/ref/states/all/salt.states.openvswitch_bridge.html
10:15 Qlawy hemebond: why I miseed that?
10:15 edrocks joined #salt
10:19 DEger joined #salt
10:23 tercenya joined #salt
10:29 DEger joined #salt
10:33 netcho joined #salt
10:34 tercenya joined #salt
10:35 hemebond Question to everyone; this 👍  show as a square?
10:36 Cadmus hemebond: Shows as a thumbs up to me, I'm on freenode's webchat thing
10:36 hemebond Cadmus: Thank you :-)
10:37 roock joined #salt
10:40 AndreasLutro square here because I can't be arsed setting up unicode fallback fonts for my terminal emulator
10:41 DEger joined #salt
10:41 tristianc_ joined #salt
10:43 armyriad joined #salt
10:47 huyby joined #salt
10:49 DEger joined #salt
10:52 * hemebond shakes fist at lazy AndreasLutro
10:54 Qlawy hemebond: square for me, irssi over putty
11:00 amcorreia joined #salt
11:01 DEger joined #salt
11:06 colegatron_origi joined #salt
11:08 Miouge joined #salt
11:09 DEger joined #salt
11:09 Garo_ joined #salt
11:12 ssplatt joined #salt
11:12 subsignal joined #salt
11:14 armyriad joined #salt
11:20 DEger joined #salt
11:23 tercenya joined #salt
11:32 DEger joined #salt
11:32 Miouge joined #salt
11:38 tercenya joined #salt
11:49 numkem joined #salt
11:50 LostSoul hemebond: You still around?
11:50 tercenya joined #salt
11:51 iceyao joined #salt
11:51 DEger joined #salt
11:53 hemebond yup
11:54 LostSoul How to access salt['grains.get']('bond0') - first element of the array?
11:54 LostSoul salt['grains.get']('bond0[0]') - like this?
11:55 hemebond salt['grains.get']('bond0')[0]
11:58 LostSoul Ah, thanks!
11:59 DEger joined #salt
11:59 hemebond 👍
12:09 DEger joined #salt
12:15 garphy joined #salt
12:18 edrocks joined #salt
12:19 DEger joined #salt
12:21 ssplatt joined #salt
12:26 LostSoul I'm lost hemebond
12:26 hemebond ?
12:27 LostSoul Again, I've got error, salt said bacula packages were not in repo, second salting and it hanged like forever. I've checked manually and they were there. I've kill minion/master and I tried debug now ... it went ok ..
12:27 LostSoul Does salt really doesn't have some bugs that I'm not aware of :P?
12:27 cmarzullo Cadmus: that's great!
12:27 LostSoul As salt 2015 was working very good, but this 2016 seems to hang like crazy
12:28 hemebond LostSoul: I'm not sure. It didn't sound like your environment was simple.
12:28 hemebond But I'm not 100% sure what you're doing with it.
12:28 emaninpa joined #salt
12:28 TooLmaN joined #salt
12:29 DEger joined #salt
12:30 LostSoul hemebond: I think it's very simple, I don't have much here.. hmm
12:31 LostSoul Hard thing is that once it hangs I can't debug what is the real problem
12:31 hemebond Where is it hanging?
12:31 AndreasLutro just use salt-call -l debug on the minion
12:31 hemebond ^
12:31 AndreasLutro it'll give you more info about what's goign on
12:33 LostSoul hemebond: When I'm doing (on master) state.highstate
12:34 LostSoul Thing is it hangs for like 10 min and I have to ctrl + c
12:34 LostSoul And then kill all masters and minion processes
12:34 hemebond I see.
12:34 LostSoul As it have "zombie" process on both (not always but usually)
12:34 hemebond Try what AndreasLutro suggested on the minion.
12:34 LostSoul and it stops me from second try
12:34 hemebond Hmm.
12:34 LostSoul Usually after killing it works like a charm
12:34 LostSoul Strange ;/
12:35 hemebond So you think there's a communication issue, not a problem with your state execution?
12:36 LostSoul Yeah, either this or something in salt (don't know if it's master or minion)
12:37 LostSoul As it was all good (like repo was already added, packages were installed) and it hanged on templating (other time it was apt-get install)
12:37 LostSoul I mean I don't know what it was
12:37 LostSoul I know what I've added on each step
12:38 LostSoul Also I'm not salt master but I've made some states in my career so :O
12:38 LostSoul Also hemebond: SaltRenderError: Jinja variable str object has no element 0    - are you sure I'm getting 0 element from grain in proper way?
12:39 hemebond That should be the proper way. I don't know what your grain contains.
12:39 DEger joined #salt
12:39 hemebond Looks like you're getting a string.
12:39 Cadmus cmarzullo: How to split the options got me, turns out you put this in the Args
12:40 Cadmus java-app, 'pillar={"java-app": {"autodeploy-url": "http://some.server/file.jar"}}'
12:40 Cadmus Comma separated, and the pillar data goes there, not under kwargs
12:40 west575 joined #salt
12:42 elias__ joined #salt
12:46 LostSoul Ou man
12:46 LostSoul I guess I know what might have been wrong! :)
12:47 LostSoul I'm using "old" IP that in DNS was changed to new fqdn but revDNS was not!
12:47 LostSoul :)
12:47 hemebond :-) Good find.
12:48 hanwei_ joined #salt
12:48 flowstate joined #salt
12:48 tapoxi joined #salt
12:48 subsignal joined #salt
12:51 LostSoul Fun thing is I've never seen this old fqdn even when trying multiple times getting grains.items
12:51 LostSoul I've found it once template once changed it :O
12:51 gh34 joined #salt
13:00 DEger joined #salt
13:01 hanwei_ joined #salt
13:01 DammitJim joined #salt
13:03 subsignal joined #salt
13:03 subsigna_ joined #salt
13:08 Miouge Any tips on doing unit testing for SLS & jinja states?
13:09 DammitJim Miouge, what do you mean by unit testing?
13:09 DammitJim salt <server_name> state.sls <state_name> test=true
13:09 DammitJim to test the state
13:10 DEger joined #salt
13:12 EvaSDK DammitJim: maybe command like salt-call state.high state_json_dict ?
13:12 Miouge To take an example of a file.managed that is templated with jinja from pillar data. I would love to be able to have a unit test in line of “this input should assert these things”. Similar to what we do for normal code
13:13 Miouge So far I use a lot of test=True, but wouldn’t it be nice to catch regressions earlier?
13:13 EvaSDK that's what I used in https://github.com/saltstack/salt/issues/34737
13:13 saltstackbot [#34737][OPEN] `ini.options_present` touches supposedly untouched sections | Description of Issue/Question...
13:14 hemebond Miouge: Vagrant and VMs.
13:14 viq Miouge: I'm doing that as we speek with test-kitchen, kitchen-salt, lxc and testinfra
13:16 west575_ joined #salt
13:18 ssplatt viq: shameless plug https://github.com/ssplatt/saltstack-infratest-module
13:18 viq ssplatt: I'm aware of it ;)
13:18 ssplatt :thup:
13:19 DEger joined #salt
13:19 west575 joined #salt
13:19 viq Though I didn't get around to playing with that yet, so far testing the stuff I'm about to push to infrastructure in disposable VMs
13:20 viq "install stuff from pip on all your machines" turns me off a bit, I'd have to package it first before I'd use it accross my infrastructure
13:20 tapoxi ssplatt this looks awesome
13:20 edrocks joined #salt
13:20 ssplatt if you’re installing testinfra, then you’re already doing that
13:20 ssplatt i was going to say if you’re using test kitchen then you should just use serverspec
13:21 ssplatt tapoxi: thanks
13:21 viq ssplatt: but I'm not. Or, test-kitchen is installing it in a VM that will live a couple minutes
13:21 ssplatt ah
13:21 tapoxi anyone know of a good pam/ldap formula for centos
13:21 tapoxi the one in salt-formulas is written for debian
13:22 viq I want to see if testinfra's salt transport requires testinfra to be installed on other machines, but right now I'm in "early days", so just developing states and tests with test-kitchen
13:22 Miouge viq: that is kind of cool
13:22 ssplatt Miouge: https://asciinema.org/a/43311   a demo using test-kitchen to run tests on formulas
13:23 viq aye
13:23 viq And when paired with LXC, you can get a machine created, tests applied, and machine destroyed in under a minute.
13:23 ssplatt Miouge: https://asciinema.org/a/44348  another, spinning up a vm in the cloud to test
13:23 Kelsar joined #salt
13:23 Kelsar joined #salt
13:23 viq Erm, and states applied before running tests
13:24 west575_ joined #salt
13:25 hemebond left #salt
13:26 ssplatt viq: i believe testinfra runs local on the minions in either case (using testinfra externally and hooking into salt for the transport/host db, or using the infratest-module)
13:26 ssplatt same with serverspec, runs all commands locally
13:27 viq ssplatt: but serverspec can do this over ssh, without requiring even ruby on machines tested
13:27 viq I have no idea about testinfra yet
13:27 ssplatt oh, didn’t know that
13:27 Miouge So the custom/serverspec/_spec.rb are the tests being run?
13:27 viq Actually testinfra also has ssh transport, so I think it can do the same
13:28 ssplatt Miouge: yes.    ‘custom’ refers to the suite name
13:28 slav0nic joined #salt
13:31 hanwei_ joined #salt
13:31 LostSoul Any idea how to check if grain is not empty?
13:32 LostSoul Like I have grains bond0 and eth0, I want to check if there is bond if not I want to use eth0
13:32 hanwei_ joined #salt
13:32 viq LostSoul: jinja filters?
13:32 ssplatt {% set mygrain = grains[‘thing’] %}{% if mygrain %}
13:32 hanwei_ joined #salt
13:33 impi joined #salt
13:33 viq erm, tests
13:33 Miouge {% if ‘bond0' in grains %} ?
13:33 hanwei_ joined #salt
13:33 LostSoul {% if (bond0 is defined) and (bond0 is not none) %} - I did it this way
13:33 LostSoul But it returns ... empty string so it passes
13:33 LostSoul I tried with if bond0 but it didn't work out
13:33 LostSoul Seems that this grain is always there but it not displayed
13:34 LostSoul If it's empty
13:34 hanwei_ joined #salt
13:34 viq LostSoul: and where did you assign value to variable bond0 ?
13:34 LostSoul I have template where I want to assign value
13:34 LostSoul I want to use bond0 if it's set actually bond0[0] or eth0[0]
13:34 viq LostSoul: try something like {% if grains['bond0'] is defined %}
13:34 LostSoul As bond0/eth0 are arrays
13:36 hanwei_ joined #salt
13:36 corichar joined #salt
13:39 cmarzullo Miouge: (shameless plug) if you are looking for some patterns to develop testable formulas: https://github.com/cmarzullo/saltscaffold
13:40 cmarzullo That'll build out some scaffolding for formulas and create test-kitchen stuff.
13:41 LostSoul viq: Didn't work out
13:42 tercenya joined #salt
13:42 mapu joined #salt
13:42 viq ssplatt: creator says that testinfra with salt transport does not need testinfra installed on end nodes
13:42 ssplatt oh cool.
13:42 babilen LostSoul: I know I should have mentioned this ages ago, but: Are you really after the address on a specific interface, or rather after the address in a specific network (defined by CIDR) ?
13:43 ssplatt viq: it would be interesting to see the speed difference at scale, if any
13:43 LostSoul So you are telling me to try using other grain, right? ;)
13:43 LostSoul Hello babilen, I have asked you for a help for a while :)
13:44 viq ssplatt: between what and what?
13:44 babilen LostSoul: No, not another grain, but: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#salt.modules.network.ip_addrs
13:44 ssplatt between running it as a salt module, local on the machines, or as testinfra using the salt transport ‘remotely’
13:44 angvp joined #salt
13:45 babilen LostSoul: You can pass the CIDR or, if you must, interface names
13:46 AndreasLutro I'm kinda working on a unit testing tool for salt states https://bpaste.net/show/22608dcf719c
13:46 viq ssplatt: ah. I probably will have a look, though if not next week then in second half of august ;)
13:46 AndreasLutro mocking all the salt['module.func'] calls is the tedious part
13:49 LostSoul Nice babilen
13:49 LostSoul I tried with ipv4
13:51 Brew joined #salt
13:51 perfectsine joined #salt
13:54 ronnix joined #salt
13:55 necrose99-wrk joined #salt
13:55 necrose99-wrk is thier a salt repo for apps ?
13:56 DEger joined #salt
13:57 protoz joined #salt
13:58 babilen apps?
13:58 babilen I know .. these days everything is an app, but what are you referring to?
13:59 ablemann joined #salt
14:01 viq ssplatt: https://github.com/saltstack/salt/blob/develop/salt/modules/testinframod.py
14:01 necrose99-wrk repo of shared published scripts
14:02 ssplatt viq: oh nice
14:02 edrocks joined #salt
14:02 necrose99-wrk puppet forge  salt forge ????
14:03 yidhra__ joined #salt
14:03 ssplatt viq: looks a lot better than my module :X
14:04 necrose99-wrk i mean puppet has a number of vetted apps on puppet forge , it would be nice is saltstack had a number of vetted apps or plugins admins could just add
14:04 ssplatt necrose99-wrk: there are formulas on github
14:04 babilen necrose99-wrk: "apps" like https://github.com/saltstack-formulas
14:04 * babilen hates "apps"
14:05 babilen We used to have "library", "program", "executable", "script", ... :(
14:05 fredvd joined #salt
14:07 viq We should just call everything 'blob'
14:07 ssplatt eveyrhtings a module
14:08 viq "module is just a blob" :P
14:10 sagerdearia joined #salt
14:11 viq ssplatt: speaking of tests, https://github.com/aelsabbahy/goss/
14:12 ssplatt interesting
14:13 ssplatt have you seen https://github.com/hubblestack
14:13 viq yeah, haven't had a chance to play with it yet though
14:14 Razi_ joined #salt
14:16 mapu joined #salt
14:17 ssplatt hmm.  why is ‘mine_functions: network.ip_addrs: [eth0]’ from the mine doc page not working for me…https://docs.saltstack.com/en/2015.8/topics/mine/index.html#example
14:17 viq ssplatt: also, #testinfra ;)
14:17 ssplatt getting nthing when i mine.get \* network.ip_addrs
14:18 ssplatt viq: nice.
14:18 viq ssplatt: did you configure stuff to be pushed to mine?
14:19 ssplatt yeah.  same as in the web.sls in that example
14:19 DEger joined #salt
14:19 ssplatt if i do network.interfaces: []  i get everything.
14:19 alvinstarr joined #salt
14:19 Miouge cmarzullo: Thanks ;)
14:21 flowstate joined #salt
14:22 IdoKaplan joined #salt
14:22 Razi_ How can i determine the number of drives used at a particular mount point. For example if I have /mnt/my_raid and it is built from N number of disks, how can i determine what N is?
14:23 Tyrm joined #salt
14:23 ssplatt Razi_: you’d proably have to poll lvm or md or your storage controller for that
14:23 ssplatt however you built your raid
14:23 tercenya joined #salt
14:24 armyriad joined #salt
14:25 cmarzullo Miouge: let me know if you get stuck.
14:26 hwcomcn joined #salt
14:26 kaptk2 joined #salt
14:27 hwcomcn joined #salt
14:27 hwcomcn joined #salt
14:28 ssplatt i think i forgot a saltutil.refresh_pillar.
14:32 DEger joined #salt
14:36 knine joined #salt
14:38 Razi_ Are there any salt modules for polling lvm?
14:44 west575 joined #salt
14:44 JohnnyRun joined #salt
14:45 ewd84 joined #salt
14:45 ssplatt https://docs.saltstack.com/en/2015.8/ref/modules/all/salt.modules.linux_lvm.html#module-salt.modules.linux_lvm
14:46 ewd84 Hello, quick question (hopefully): Any way to dump namespace inside a Jinja template (I suspect a pillar lookup is failing)?
14:47 teryx510 joined #salt
14:48 tercenya joined #salt
14:48 teryx5101 joined #salt
14:50 tapoxi joined #salt
14:54 brent_ joined #salt
14:56 subsignal joined #salt
14:58 manji joined #salt
15:01 DEger joined #salt
15:01 gerhardqux joined #salt
15:02 tapoxi anyone see runaway cpu usage on the salt-minion occasionally?
15:03 tapoxi I just had to restart a box because I tried salt "salt-master.internal" slack.post_message
15:10 POJO joined #salt
15:10 ssplatt beacons
15:10 ssplatt maybe
15:11 ssplatt beacon > react on high cpu
15:14 bowhunter joined #salt
15:15 KingJ joined #salt
15:20 tapoxi does salt use beacons internally? I don't have any written
15:20 spuder joined #salt
15:22 ssplatt you’d have to write one. https://docs.saltstack.com/en/latest/topics/beacons/
15:22 catpig joined #salt
15:22 ssplatt i mean, you’d have to tell salt what to look for, an wha tyou want it to do when it sees it
15:22 cableninja joined #salt
15:28 josue joined #salt
15:28 jab416171 joined #salt
15:29 Miouge joined #salt
15:31 pfallenop joined #salt
15:31 iamtew_ joined #salt
15:31 nkuttler_ joined #salt
15:31 Shirkdog_ joined #salt
15:31 ekristen_ joined #salt
15:31 lubyou_ joined #salt
15:31 eichiro_ joined #salt
15:31 edrocks joined #salt
15:32 aberdine_ joined #salt
15:33 maettu1 joined #salt
15:34 ekkelett joined #salt
15:36 khorben_ joined #salt
15:36 vod1k joined #salt
15:37 XenophonF joined #salt
15:37 _JZ_ joined #salt
15:39 davisj_ joined #salt
15:42 gmoro joined #salt
15:43 DEger joined #salt
15:44 perfectsine joined #salt
15:46 froztbyte joined #salt
15:47 wwalker joined #salt
15:47 unusedPhD joined #salt
15:47 hlub joined #salt
15:47 cswang joined #salt
15:47 nihe joined #salt
15:47 cmek joined #salt
15:47 stupidnic joined #salt
15:47 dunz0r joined #salt
15:47 baffle joined #salt
15:47 wryfi joined #salt
15:47 seblu joined #salt
15:47 rbjorklin joined #salt
15:47 freelock joined #salt
15:47 blue joined #salt
15:47 foundatron joined #salt
15:47 mage joined #salt
15:47 dimeshake joined #salt
15:47 debian112 joined #salt
15:47 kevinquinnyo joined #salt
15:47 Valfor joined #salt
15:47 Valfor joined #salt
15:47 Arendtsen joined #salt
15:47 Tyrm joined #salt
15:47 MK_FG joined #salt
15:47 tercenya joined #salt
15:47 JoeJulian joined #salt
15:47 ThomasJ joined #salt
15:47 keekz joined #salt
15:47 monokrome joined #salt
15:48 adelcast joined #salt
15:48 wm-bot4 joined #salt
15:48 alxchk joined #salt
15:48 _W_ joined #salt
15:48 lompik joined #salt
15:50 t0m0 joined #salt
15:51 av_ joined #salt
15:51 Miouge joined #salt
15:54 raspy_ joined #salt
15:55 Miouge joined #salt
15:55 hasues joined #salt
15:56 hasues left #salt
15:56 raspy_ hi all, how can I get salt to call a command once it has finished going through an entire .sls file?
15:56 raspy_ i basically need to do a reboot but only until the very end
16:00 tapoxi raspy_ requisites. put your reboot in a new sls and require: sls:othersls
16:01 writtenoff joined #salt
16:01 tapoxi or put it in the same sls and build a requisite chain of ids
16:02 raspy_ tapoxi: oh ok htx
16:02 raspy_ tapoxi: do you know if its possible to do it at the very end of the entire bootstrap process?
16:03 raspy_ like after salt bootstraps it then after it is done going through all the custom installations
16:03 raspy_ currently we use a grain with firstrun: True
16:03 Miouge joined #salt
16:04 raspy_ then an .sls will run if the grain is True and reboots it then sets the grain on the minion to False after so it doesnt keep rebooting
16:05 tapoxi raspy_ if you're using the bootstrap module you can have a requisite on that running, or a - watch: if you only want to restart after bootstrap has made a change
16:05 tapoxi not sure since I don't use bootstrap
16:06 raspy_ ok thx
16:06 tapoxi raspy_ https://docs.saltstack.com/en/latest/ref/states/ordering.html
16:07 raspy_ awesome thx
16:10 \\\\\\\\\\\ joined #salt
16:13 Cadmus Hello, this is a bit of a longshot, I'm using the saltstack plugin for jenkins which talks to Salt over cherrypi. As a result I'm specifying some items as pillar items on the command line and I'm getting spurious extra line breaks
16:16 ageorgop joined #salt
16:16 Cadmus Cherrypy*
16:17 Cadmus The problem is I don't know if it's a luging problem, a cherrypi problem, or just me formatting the pillar badly
16:17 Cadmus plugin*
16:25 iggy tapoxi: we made monit start tracking salt-minion and it restarts it when it sees spinning cores for X amount of time
16:27 rem5 joined #salt
16:29 Miouge joined #salt
16:34 onlyanegg joined #salt
16:37 \\\\\\\\\\\ Hello, I'm attempting to setup some new infrastructure with SaltStack and Docker, but I have issues with my container's minion_id not matching the hostname. I rolled my own container image using debootstrap, then use a Dockerfile to initalize the salt-minion. I then run the salt-minion command in the container, setting up the salt master hostname, and the machine's hostname. Inside the container, python
16:37 \\\\\\\\\\\ socket.getfqdn() prints 'qa, /etc/hostname has 'qa', and /etc/hosts is also correct, but /etc/salt/minion_id is ba774f7baff5. Any idea where that weird hash is coming from? If I use the official ubuntu image from DockerHub the minion id is correct, so I think I'm just missing the first place salt looks for the hostname.
16:44 ajw0100 joined #salt
16:44 Cadmus left #salt
16:47 zer0def joined #salt
16:48 edrocks joined #salt
16:50 fracklen joined #salt
16:51 PerilousApricot joined #salt
16:52 aswini joined #salt
16:52 PerilousApricot Hello all - if I'm using the file_tree ext_pillar, do I need to add any .sls files to the file_tree? Even after saltutil.refresh_pillar, calling pillar.items doesn't show anything
16:52 scsinutz joined #salt
16:52 DEger joined #salt
16:53 Bryson joined #salt
16:53 aswini hello
16:54 scsinutz hi
16:54 Bryson joined #salt
16:55 sjorge joined #salt
16:56 scsinutz joined #salt
16:58 Miouge joined #salt
16:59 rem5 joined #salt
17:02 MTecknology Does anyone happen to know where the ubuntu service execution module is at?
17:02 MTecknology service.py is disabled for debian and ubuntu; debian_service.py seems to be disabled for everything that isn't debian, including disabled for ubuntu
17:03 Edgan joined #salt
17:04 flowstate joined #salt
17:06 brotatochip joined #salt
17:08 iggy \\\\\\\\\\\: make sure there's not a /etc/salt/minion_id in the image you are using
17:09 iggy MTecknology: ubuntu uses upstart or systemd
17:11 * MTecknology hugs iggy
17:11 MTecknology thanks!
17:13 MTecknology wow, I didn't hate upstart before, but I do now
17:14 iggy well, luckily it's going away
17:14 iggy to be replaced by the superstar init system that is systemd
17:15 * MTecknology *coughs*
17:15 Sketch it already has been on debian and ubuntu
17:16 impi joined #salt
17:16 MTecknology Sketch: only as the default, though
17:17 MTecknology I'm fine with it being the default, I'm just not fine with vendor lock-in. Debian has been doing a grat job of preventing that.
17:18 \\\\\\\\\\\ iggy: There's nothing. The image I generate from debootstrap is just the base system.
17:18 iggy then my guess is salt comes up before the hostname is set to qa
17:18 iggy when the hostname is actually that random string
17:19 DEger joined #salt
17:19 iggy the question is... why are you trying to run salt in docker? Seems antithetical to Docker's purpose
17:24 \\\\\\\\\\\ Salt gives you much more control over provisioning, and much better reproducibility I think.
17:24 amcorreia joined #salt
17:26 aw110f_ joined #salt
17:28 DEger_ joined #salt
17:29 ewd84 Hello, quick newbie question: Do you need to do anything after updating pillar for the change to be propagated?
17:30 iggy \\\\\\\\\\\: most people don't do it that way, so you're kind of in uncharted territory here
17:30 iggy ewd84: saltutil.refresh_pillar ?
17:31 TomJepp joined #salt
17:32 \\\\\\\\\\\ iggy: So you would suggest dropping salt and just using docker?
17:34 iggy that's kind of the point of docker
17:34 \\\\\\\\\\\ Then what's the point of dockerng?
17:34 iggy you don't need users, managed files, evolving configs, etc in docker, you just whack the docker instance and start a new one
17:35 iggy don't ask me... never looked at it
17:35 brotatochip joined #salt
17:35 \\\\\\\\\\\ Ah, that's for a microservices style application. I'm just using containers as lightweight vms.
17:36 iggy Docker goes out of it's way to not really allow multiple processes to run... and people go even further out of their way to try to shoe horn stuff like that in
17:36 iggy then I suggest that docker is the wrong tool
17:36 ronnix joined #salt
17:36 iggy use lxd or something else that's actually meant to do full system containers (vs application containers)
17:38 fracklen joined #salt
17:38 \\\\\\\\\\\ It's all the same in the end (LXC). The docker ecosystem just makes it easier to get up and running.
17:39 ewd84 thx, iggy!
17:41 \\\\\\\\\\\ LXD looks interesting though, I may take a look. Before Docker, I was planning to just use systemd-nspawn.
17:42 Sketch \\\\\\\\\\\: a friend of mine worked on rkt, said their stuff is all systemd based
17:42 Sketch (which is basically a docker competitor)
17:42 s_kunk joined #salt
17:43 MTecknology heheh... competitor
17:43 DEger joined #salt
17:44 MTecknology "Ya, man! We're one of your competitors!"  "Oh? I thought you guys did root kits."
17:44 |_[O_O]_| xD
17:45 \\\\\\\\\\\ Lol.
17:46 brotatochip joined #salt
17:47 DEger_ joined #salt
17:48 mohae_ joined #salt
17:50 DEger joined #salt
17:50 MTecknology coreos does some interesting things, though
17:51 tercenya joined #salt
17:53 DEger_ joined #salt
17:53 snarfy^ joined #salt
17:54 snarfy^ 404 https://docs.saltstack.com/en/latest/best_practices.html
17:56 DEger joined #salt
17:56 MTecknology https://docs.saltstack.com/en/latest/topics/best_practices.html
17:56 scsinutz joined #salt
17:56 MTecknology snarfy^
17:57 MTecknology already has the arrow ;)
17:57 bltmiller joined #salt
17:57 DEger joined #salt
17:58 eseyman joined #salt
17:59 snarfy^ MTecknology, ahh! thanks! the link here https://docs.saltstack.com/en/latest/  is bad :)
18:00 snarfy^ i shouldna noticed the others with topic/ tho
18:00 ivanjaros joined #salt
18:02 MTecknology nah, thanks for raising the issue. If nobody pops in that can fix it, I'll make a bug for it.
18:03 tercenya joined #salt
18:06 perfectsine joined #salt
18:10 pfy42 joined #salt
18:11 snarfy^ i'm also a little confused by the best practices section on the map.jinja - when you use grains_filter_by, don't you have to specify which grain you are filtering by?
18:12 raspy_ when multiple states are applied to the init.sls, does the order of the states get applied from top -> bottom?
18:12 snarfy^ i don't see it in any of the examples, where I would expect to see grain="osfinger" or "os_family"
18:13 snarfy^ raspy_, you usually want to have some require/watch logic to ensure that some happen before the others
18:13 snarfy^ you can also, I think, specify order
18:13 iggy snarfy^: there's a default value of grain="os' (iirc)
18:13 raspy_ ok thx snarfy^
18:14 iggy !salt modules.grains.filter_by
18:14 saltstackbot https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.filter_by
18:14 iggy default is os_family
18:15 ageorgop joined #salt
18:15 tercenya joined #salt
18:16 GreatSnoopy joined #salt
18:17 pfy42_ joined #salt
18:17 snarfy^ oh, yup, ok
18:17 snarfy^ thanks iggy.
18:20 Aleks3Y joined #salt
18:24 scoates joined #salt
18:24 raspy_ is it possible to require a cmd to be ran first? I see all these examples of require: its either for pkg or file
18:24 raspy_ but i have a state that runs a comd
18:25 DEger joined #salt
18:25 raspy_ can i - cmd: my_state_file ?
18:26 brotatochip joined #salt
18:28 JPT joined #salt
18:31 raspy_ snarfy^: is this way ok? http://pastebin.com/bh8N28Qz
18:31 raspy_ particularly, the reboot state
18:32 raspy_ im trying to set a require so that once ifcfg-eth0, hostname and cloud.cfg completes, then reboot
18:34 huyby joined #salt
18:42 cilkay joined #salt
18:43 tapoxi joined #salt
18:45 PerilousApricot joined #salt
18:45 tapoxi hey everyone, is there a way to find out what user ran the current job?
18:46 tapoxi writing a runner and I want it to write who ran it out to slack
18:51 protoz joined #salt
18:52 snarfy^ probably involves setting up https://docs.saltstack.com/en/latest/ref/configuration/nonroot.html
18:53 om joined #salt
18:53 snarfy^ raspy_, looks ok to me, though I'm not sure /etc/hostname needs to be mode 600
18:54 snarfy^ but dont take my word for it :) I sometimes get bogged down trying to manage interfaces withs alt
18:56 west575 joined #salt
18:56 impi joined #salt
19:01 onlyaneg1 joined #salt
19:01 anotherZero joined #salt
19:07 aswini joined #salt
19:07 GreatSnoopy joined #salt
19:08 onlyanegg joined #salt
19:08 combinare I have a likely stupid question, as I'm VERY new to Salt. I'm trying to sort out the REST API. I can successfully login and get an access token, and use that token to submit an execution command, but when I try to use the token with the /jobs API call I'm getting 401 unauthorized.
19:09 combinare Also: the same token works fine with /stats
19:16 bltmiller joined #salt
19:18 morissette joined #salt
19:22 yetAnotherZero joined #salt
19:25 huyby joined #salt
19:27 pcdummy ohh salt-api ...
19:30 rylnd joined #salt
19:35 PerilousApricot joined #salt
19:36 GreatSnoopy joined #salt
19:39 edrocks joined #salt
19:45 flowstate joined #salt
19:48 snarfy^ i don't get the whatever.lookup part of data maps
19:49 snarfy^ like here https://github.com/saltstack-formulas/template-formula/blob/master/template/map.jinja
19:49 snarfy^ why does it " merge=salt['pillar.get']('template:lookup'))"
19:51 dyasny joined #salt
19:51 tvinson combinare: the salt-api user will need the @jobs permission in external_auth
19:52 tvinson combinare: i seem to recall an endpoint that didn't support the token too, but i think that was /run
19:53 snarfy^ prolly a good decision :)
19:53 combinare tvinson: thanks! I knew /run didn't support the token, but missed the part about @jobs.
19:55 protoz joined #salt
19:55 tapoxi is it possible to grant access to a specific salt runner via the publisher_acl? seems like just modules
19:59 Salander27 joined #salt
20:00 Miouge joined #salt
20:02 scsinutz joined #salt
20:05 rem5 joined #salt
20:06 rem5 joined #salt
20:08 pfy42 joined #salt
20:09 brotatochip joined #salt
20:12 knine are the RPMs created in the salt yum repo built the same as back when they were submitted to EPEL?  Meaning they are pretty much the same thing, just on a different repo?
20:13 mirko havig the feeling of this being trivial but i can't see the tree for the woods - could anybody take another look on that issue https://github.com/saltstack/salt/issues/34729 please?
20:13 saltstackbot [#34729][OPEN] salt-ssh doesn't return from error | I'm experiencing the weird behaviour, that salt-ssh doesn't return from an error....
20:13 pcdummy snarfy^: the lookup allows to filer the lookup by a specific key
20:13 pcdummy snarfy^: the key is in this case "os_family", so it will only get "Debian" for example from the lookup map
20:13 pcdummy snarfy^: merge after means it will merge the pillar data with the looked up data.
20:17 spuder joined #salt
20:17 ajw0100 joined #salt
20:19 rem5 joined #salt
20:22 rem5 joined #salt
20:26 huyby joined #salt
20:28 ajw0100_ joined #salt
20:28 edrocks joined #salt
20:30 teryx5101 joined #salt
20:31 flowstate joined #salt
20:31 mapu_ joined #salt
20:31 teryx5101 joined #salt
20:32 Miouge joined #salt
20:32 Nahual joined #salt
20:34 Miouge joined #salt
20:37 yetAnotherZero joined #salt
20:43 rem5 joined #salt
20:48 rawzone joined #salt
20:48 watersoul joined #salt
20:52 PerilousApricot joined #salt
20:53 watersoul joined #salt
20:54 rem5 joined #salt
20:55 protoz joined #salt
20:58 watersoul joined #salt
20:59 rawzone joined #salt
20:59 jgarr I'm getting an error with salt-api. I know it's ssl related but I can't seem to figure out what. [ERROR   ] [22/Jul/2016:13:48:05] ENGINE Error in HTTPServer.tick
21:00 jgarr gives me that on any request. I regenerated tls certs with salt-call --local tls.create_self_signed_cert and made premissions 600 root:root but still is crashing
21:01 PerilousApricot Hello all - Is there a way to install a package from an RPM only if it's not been installed already? The RPM installs a yum repository who can then handle updating itself...
21:04 west575 joined #salt
21:04 [dee] joined #salt
21:05 throwawayj joined #salt
21:05 throwawayj dumb question is there a way to update a salt-minoin from the salt-master? seems like a chicken and egg issue.
21:06 throwawayj @Chell
21:07 jgarr throwawayj: if you have ssh access you can do it with salt-ssh https://docs.saltstack.com/en/latest/topics/ssh/
21:07 throwawayj jgarr: what about salt-minions on windows
21:08 jgarr not sure about that one. I don't have any windows systems. Maybe through winrm/powershell
21:08 jgarr or you could just make a group policy to install the agent
21:08 throwawayj jgarr: thanks, group policy........not a fan
21:09 ajw0100 joined #salt
21:10 lero joined #salt
21:14 iggy throwawayj: I don't know how, but yes
21:15 TomJepp joined #salt
21:19 tercenya joined #salt
21:19 vilitux joined #salt
21:25 scsinutz joined #salt
21:30 tercenya joined #salt
21:49 tercenya joined #salt
21:53 bltmiller joined #salt
21:56 protoz joined #salt
22:01 flowstate joined #salt
22:02 edrocks joined #salt
22:03 onlyanegg joined #salt
22:06 scsinutz joined #salt
22:08 Mate joined #salt
22:08 Mate joined #salt
22:10 scsinutz1 joined #salt
22:15 protoz joined #salt
22:16 scsinutz joined #salt
22:17 tercenya joined #salt
22:19 ribx joined #salt
22:19 scsinutz left #salt
22:22 brotatochip joined #salt
22:24 debian112 joined #salt
22:30 flowstate joined #salt
22:35 JPT joined #salt
22:40 bltmiller joined #salt
22:40 a_ghost_irl joined #salt
22:45 spuder joined #salt
22:46 scsinutz1 joined #salt
22:46 rem5 joined #salt
23:01 flowstate joined #salt
23:13 brotatochip joined #salt
23:24 onlyanegg joined #salt
23:29 rem5 joined #salt
23:29 flowstate joined #salt
23:37 aswini joined #salt
23:44 aswini anybody facing memory growth or cpu spiking issues with minions?
23:45 g3cko joined #salt
23:46 aswini or faced and solved?
23:49 iggy only when I was doing bad things
23:55 ageorgop joined #salt

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