Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-11-27

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

All times shown according to UTC.

Time Nick Message
00:00 glyf joined #salt
00:14 viq joined #salt
00:15 genediazjr joined #salt
00:17 TK_ joined #salt
00:17 TheThing joined #salt
00:33 TheThing_ joined #salt
00:33 aqua^mac joined #salt
00:36 UtahDave joined #salt
00:37 forrest joined #salt
00:38 StDiluted joined #salt
00:42 darrend joined #salt
00:50 pdayton joined #salt
00:52 thayne joined #salt
00:57 pdayton joined #salt
00:59 bfoxwell_ hmm seems like ubuntu ppa's are failing on the daily build today
01:02 aqua^mac joined #salt
01:03 shaggy_surfer joined #salt
01:06 alanpearce joined #salt
01:09 joehh bfoxwell_: have you a url for that? I don't think they've worked for a long time
01:10 joehh I'm in the process of getting debian/ubuntu daily builds going with saltstack, but am unaware of any others I would expect to be working...
01:10 bfoxwell_ joehh,  a url for?
01:12 Ancient joined #salt
01:14 joehh bfoxwell_: the failing ppa builds
01:17 TK_ joined #salt
01:19 aqua^mac joined #salt
01:22 bfoxwell_ joehh, chris-lea/node.js and webupd8team/java, though i need to check if my other ppa's got installed
01:23 bfoxwell_ specifically, chris-lea/node.js is for the package nodejs(includes npm) and webupd8team/java is for the package oracle-java8-installer
01:25 bfoxwell_ just tried it without the daily build and it failed as well...strange
01:35 elfixit joined #salt
01:39 Outlander joined #salt
01:43 tmh1999 joined #salt
01:45 otter768 joined #salt
01:46 Ryan_Lane joined #salt
01:48 jalbretsen joined #salt
01:48 stooj joined #salt
01:50 eichiro joined #salt
01:57 aqua^mac joined #salt
01:58 aqua^mac_ joined #salt
02:02 aqua^mac joined #salt
02:04 markm__ joined #salt
02:06 anotherZero joined #salt
02:07 alanpearce joined #salt
02:10 TK_ joined #salt
02:10 alexr joined #salt
02:13 orion_ joined #salt
02:18 mohae joined #salt
02:20 ajolo joined #salt
02:21 Gues480631 joined #salt
02:25 vectra joined #salt
02:31 aurynn can a minion refresh its own pillar?
02:32 aurynn answer: yes
02:45 ramishra joined #salt
02:48 StDiluted joined #salt
02:49 aurynn but will using module.run to update the pillari n the middle of a state work as expected or just be INSANE
02:49 aurynn probably the latter
02:52 pr_wilson joined #salt
03:02 pdayton joined #salt
03:03 pdayton joined #salt
03:03 yetAnotherZero joined #salt
03:09 torment joined #salt
03:12 Singularo joined #salt
03:13 TyrfingMjolnir joined #salt
03:14 ajolo joined #salt
03:19 TheThing joined #salt
03:19 Mso150 joined #salt
03:21 StDiluted joined #salt
03:23 genediazjr joined #salt
03:24 pdayton joined #salt
03:25 TyrfingMjolnir joined #salt
03:26 seshan joined #salt
03:32 juice joined #salt
03:36 __number5__ aurynn: you can't change pillar on minions
03:37 __number5__ hmm, "minions can't update pillar themselves" probably a better description
03:40 joehh bfoxwell_:
03:40 joehh so not salt ppas - good to know
03:40 joehh thanks
03:40 bfoxwell_ not sure...
03:41 bfoxwell_ because it was working a few days ago just fine, i haven't touched my configs
03:41 bfoxwell_ then today reprovision my vm and the ppa fails without cause
03:42 bfoxwell_ salt claims that it succeeded however
03:43 bfoxwell_ but then i try to install the package manually and package not found, so i proceed to manually add the ppa and do a manual install, everything works fine...
03:45 otter768 joined #salt
03:46 bfoxwell_ lemme try it once more joehh
03:46 juice joined #salt
03:46 aparsons joined #salt
03:47 TheThing_ joined #salt
03:48 bfoxwell_ oh i see what you mean joehh =P nvm
03:48 bfoxwell_ the ppa module, i guess would be the right terminology
03:50 glyf joined #salt
03:51 aparsons joined #salt
03:55 juice joined #salt
04:03 thehaven joined #salt
04:04 juice joined #salt
04:05 glyf joined #salt
04:06 mortis__ joined #salt
04:06 cwright joined #salt
04:06 aurynn_ joined #salt
04:06 t0rrant_ joined #salt
04:06 hillna__ joined #salt
04:06 godber2 joined #salt
04:07 asmaps_ joined #salt
04:07 ggillies_ joined #salt
04:07 honestly_ joined #salt
04:08 darvon_ joined #salt
04:08 alanpearce joined #salt
04:08 spader joined #salt
04:08 bfoxwell_ balls to it, solution....
04:09 bfoxwell_ java8_repo:
04:09 bfoxwell_ pkgrepo.managed:
04:09 bfoxwell_ - humanname: Webupd8team Java 6/7/8 PPA/Repo
04:09 bfoxwell_ - name: deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
04:09 bfoxwell_ - dist: trusty
04:09 bfoxwell_ - keyid: '0x7B2C3B0889BF5709A105D03AC2518248EEA14886'
04:09 bfoxwell_ - keyserver: hkp://keyserver.ubuntu.com:80
04:09 bfoxwell_ - file: /etc/apt/sources.list.d/webupd8team-java.list
04:09 bfoxwell_ - require:
04:09 bfoxwell_ - cmd: auto-accept-java-license
04:09 sgate1_ joined #salt
04:09 Damon joined #salt
04:09 rogst_ joined #salt
04:09 rbjorkli1 joined #salt
04:09 mirko_ joined #salt
04:10 egalano joined #salt
04:10 blackjid joined #salt
04:11 VSpike joined #salt
04:12 fxhp joined #salt
04:15 Ryan_Lane joined #salt
04:17 hasues joined #salt
04:28 ndrei joined #salt
04:29 hasues left #salt
04:30 otter768 joined #salt
04:31 mohae joined #salt
04:34 aqua^mac_ joined #salt
04:40 seshan lets say I do a cmd.run - name "command1 && command2 && command3" and I want to execute something only after these process are done and successful,
04:40 seshan how do i accomplish it ??
04:43 juice joined #salt
04:47 bfoxwell_ seshan, - unless: some_command_returns_true    or    - onlyif: some_command_is_true
04:47 bfoxwell_ http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
05:00 thayne joined #salt
05:01 TK_ joined #salt
05:02 bfoxwell_ joined #salt
05:06 Shiv joined #salt
05:08 thehaven_ joined #salt
05:16 ysiad joined #salt
05:16 orion_ joined #salt
05:18 Katafalkas joined #salt
05:20 yetAnotherZero joined #salt
05:22 TK_ joined #salt
05:23 tmh1999 joined #salt
05:23 Ryan_Lane joined #salt
05:24 aquinas joined #salt
05:28 TK_ joined #salt
05:35 Ryan_Lane joined #salt
05:37 bfoxwell_ joined #salt
05:38 Samos123 can we use globbing for the master variable file_roots like this? http://paste.openstack.org/show/139281/
05:40 tmh1999 joined #salt
05:42 bfoxwell_ joined #salt
05:45 genediazjr joined #salt
05:51 NightMonkey joined #salt
05:52 otter768 joined #salt
05:57 glyf joined #salt
05:58 genediazjr joined #salt
06:03 genediazjr joined #salt
06:05 seshan bfoxwell_: thanks
06:05 seshan just searching the job id solved my issue for now
06:06 genediazjr joined #salt
06:06 bfoxwell_ awesome
06:09 alanpearce joined #salt
06:09 scooby2 joined #salt
06:09 thawes joined #salt
06:10 ctrlrsf joined #salt
06:10 catpiggest joined #salt
06:14 genediazjr joined #salt
06:16 thawes joined #salt
06:17 aparsons joined #salt
06:30 mpanetta joined #salt
06:31 mpanetta joined #salt
06:34 seshan bfoxwell_: :)
06:35 thawes joined #salt
06:44 monkey661 joined #salt
06:45 thawes joined #salt
06:49 mpanetta_ joined #salt
06:50 thawes joined #salt
06:53 monkey66 joined #salt
06:54 TyrfingMjolnir joined #salt
06:55 thawes joined #salt
06:59 oyvjel joined #salt
07:00 thawes joined #salt
07:07 thawes joined #salt
07:11 glyf joined #salt
07:12 void_salt joined #salt
07:12 void_salt hello every
07:13 void_salt Is there anyone here?
07:13 glyf joined #salt
07:13 void_salt I met some problems in salt
07:14 glyf joined #salt
07:15 felskrone joined #salt
07:16 glyf joined #salt
07:17 glyf joined #salt
07:18 void_salt How can I install a pkg via a url such as ftp or http?
07:19 glyf joined #salt
07:20 TheKid89 joined #salt
07:20 thawes joined #salt
07:21 glyf joined #salt
07:22 glyf joined #salt
07:24 glyf joined #salt
07:24 douardda joined #salt
07:25 thawes joined #salt
07:26 glyf joined #salt
07:27 glyf joined #salt
07:28 goodwill left #salt
07:29 glyf joined #salt
07:31 glyf joined #salt
07:32 glyf joined #salt
07:33 lcavassa joined #salt
07:33 TyrfingMjolnir joined #salt
07:34 glyf joined #salt
07:35 glyf joined #salt
07:37 glyf joined #salt
07:39 glyf joined #salt
07:40 glyf joined #salt
07:42 glyf joined #salt
07:44 glyf joined #salt
07:45 glyf joined #salt
07:48 zlhgo joined #salt
07:52 glyf joined #salt
07:53 juice joined #salt
07:57 druonysuse joined #salt
07:59 monkey66 joined #salt
08:00 genediazjr joined #salt
08:01 chiui joined #salt
08:03 aqua^mac joined #salt
08:03 otter768 joined #salt
08:04 Gues480631_ joined #salt
08:06 __gotcha joined #salt
08:09 zlhgo how to use salt states by python api?
08:09 spuzirev joined #salt
08:11 zlhgo salt.client?
08:13 flyboy joined #salt
08:14 genediazjr joined #salt
08:16 slafs joined #salt
08:17 slafs left #salt
08:19 __gotcha1 joined #salt
08:25 grosjean yo all
08:26 grosjean since upgrade to 2014.7.0
08:26 grosjean i can see event in double in my log:
08:26 grosjean 2014-11-27 09:25:22,228 [salt.utils.event                           ][DEBUG   ] Sending event - data = {'tgt_type': 'glob', 'jid': '20141127092522226230', 'tgt': 'test-salt21', '_stamp': '2014-11-27T09:25:22.227950', 'user': 'sudo_menil', 'arg': ['apache2'], 'fun': 'service.reload', 'minions': ['test-salt21']}
08:26 grosjean 2014-11-27 09:25:22,229 [salt.utils.event                           ][DEBUG   ] Sending event - data = {'tgt_type': 'glob', 'jid': '20141127092522226230', 'tgt': 'test-salt21', '_stamp': '2014-11-27T09:25:22.229239', 'user': 'sudo_menil', 'arg': ['apache2'], 'fun': 'service.reload', 'minions': ['test-salt21']}
08:26 grosjean you can see that the timestamp is not she same
08:28 grosjean anyone seeing the ame issue ?
08:30 __gotcha joined #salt
08:38 juice joined #salt
08:43 intellix joined #salt
08:44 karimb joined #salt
08:45 gywang joined #salt
08:47 viq grosjean: make sure you don't have multiple minion processes on same host
08:47 grosjean yes, i've checked
08:47 viq ok
08:48 viq void_salt: read the pkg state documentation, it's all explained there.
08:48 Roee joined #salt
08:48 Roee Hi all !
08:49 Roee I asked this question before but still can't find the right way of how to perform this
08:49 Bateau_ joined #salt
08:50 Roee I wrote a state and now i want few arguments in that state to be set from a pillar (Like a template)
08:50 Roee the idea is that the state will be generic and the arguments will only changed inside the pillar
08:51 fredvd joined #salt
08:51 Roee Does someone knows how to perform this ?
08:51 hojgaard joined #salt
08:51 marnom_ joined #salt
08:51 _mel_ joined #salt
08:52 viq Roee: IIRC "checkout a bunch of repos", yes?
08:52 grosjean viq: running salt 'test-salt21' test.ping result with the following debug log:
08:52 grosjean 2014-11-27 09:51:43,984 [salt.utils.event                           ][DEBUG   ] Sending event - data = {'fun_args': [], 'jid': '20141127095143793624', 'return': True, 'retcode': 0, 'success': True, 'cmd': '_return', '_stamp': '2014-11-27T09:51:43.983693', 'fun': 'test.ping', 'id': 'test-salt21'}
08:52 grosjean 2014-11-27 09:51:43,984 [salt.utils.event                           ][DEBUG   ] Sending event - data = {'fun_args': [], 'jid': '20141127095143793624', 'return': True, 'retcode': 0, 'success': True, 'cmd': '_return', '_stamp': '2014-11-27T09:51:43.983884', 'fun': 'test.ping', 'id': 'test-salt21'}
08:52 Roee you can call this like that... yes :)
08:53 viq grosjean: I don't know enough to help you beyond the obvious "are you running more than one minion there"
08:53 grosjean ok viq, no problem :)
08:53 viq Roee: then for example look how users formula does that
08:53 __gotcha1 joined #salt
08:54 Roee I will try to take a look
08:54 Roee thanks...
08:56 n0170 joined #salt
08:57 void_salt Could salt can install a pkg from FTP server?
08:57 void_salt I just try to do it ,and failed
08:58 void_salt cp.get_url also failed when I use a ftp url
08:59 n0170 minion runs at rhel4, when use multiprocessing=True, always get "SaltClientError: Attempt to authenticate with the salt master failed" in debug log, and no info will return to master,any advice?
09:00 BigBear joined #salt
09:02 n0170 saltstack 2014.7.0
09:06 gywang Hi, I configured Multi Master, Once one master is down. It take a long time to run salt-call, How to change this time?
09:08 CeBe joined #salt
09:08 Ironhand left #salt
09:08 gywang I ran like this: http://www.heypasteit.com/clip/1NZO
09:09 gywang It take a long time to change master
09:14 juice joined #salt
09:15 N-Mi_ joined #salt
09:15 N-Mi_ joined #salt
09:17 viq void_salt: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed look for "sources"
09:27 eMBee joined #salt
09:28 __gotcha joined #salt
09:28 eMBee good evening
09:29 * eMBee has trouble moving the required states for a particular machine into a seperate file
09:30 mick3y bonjour
09:31 felskrone joined #salt
09:32 Roee viq, could please take a look in the following and tell me what is wrong http://textuploader.com/oygz! thanks !!!
09:32 balltongu joined #salt
09:32 Mso150 joined #salt
09:33 Roee Sorry try this : http://textuploader.com/oygz
09:35 mick3y Is there a way to run a command/state only on one host our of n? Example: i have 3. hosts in node group "three_hosts", and every hour I need to run a job but only on one of them. The '-b' (batch) won't do the trick - any other ideas ?
09:36 eMBee i want to split my top.sls into seperate files, one per host, but i can't figure out how to structure the hosts files to load the states that were loaded directly from top.sls before
09:38 babilen mick3y: Target one host specifically and you are done
09:39 alanpearce joined #salt
09:39 bytemask joined #salt
09:40 Hazelesque joined #salt
09:41 aqua^mac joined #salt
09:42 viq Roee: first thing, you have a typo in your pillar, you have rsp:sourc and you're referencing further on rsp:source
09:42 Cidan joined #salt
09:43 Roee Ok, thanks...
09:43 Roee and In general ? is it should work ?
09:44 viq Roee: also I prefer another syntax for getting pillars. You use pillar["params"]["source"] while I prefer salt('pillar.get')["params:source"]
09:44 viq Roee: sec, looking first at details, I'll take a step back in a sec
09:44 viq Ah, I gave wrong syntax
09:44 viq http://docs.saltstack.com/en/latest/topics/pillar/index.html#pillar-get-function is correct
09:45 eMBee hmm, looks like i got it: in top.sls i reverence the host.sls like any other state, and in host.sls i use include: - with a list of other states i want
09:45 Roee viq: so you think that changing the syntax will solve the problem ?
09:46 viq Roee: you haven't really said what the problem is
09:46 viq Roee: next, no need for cmd.run, just set makedirs in file.managed
09:47 __gotcha1 joined #salt
09:47 juice joined #salt
09:48 viq Roee: include_empty seems to be for file.recurse, not for file.managed
09:48 Roee viq: getting errors when running the state... I will fix the cmd.run
09:48 glyf joined #salt
09:48 viq Roee: _what_ errors?
09:48 Roee I will run again and show you :)
09:49 viq Roee: to extract you could use http://docs.saltstack.com/en/latest/ref/states/all/salt.states.archive.html instead of cmd.run. Don't need to, but can
09:49 Roee viq : you are great...
09:50 viq Roee: any reason why "Copy" state has bash ./copyProperties.sh instead of just ./copyProperties.sh  ?
09:50 balltongu joined #salt
09:51 Roee viq: can i remove the bash ? I will remove this... :)
09:51 viq Also since you have only one thing in there, no need for names, could be a single name
09:51 viq Roee: in next state you have simply - name: ./install.sh  so why does this one need to be different?
09:52 babilen ... and use some whitespace for us humans who want to read that
09:52 Roee viq: you are totally right...
09:53 viq Roee: also, if you're managing the stuff centrally anyway, maybe instead of extracting and running script from inside it would be an idea to use cmd.script? http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.script
09:53 BigBear joined #salt
09:54 Cidan joined #salt
09:55 viq (same for conf.properties you're running this on)
09:55 glyf joined #salt
09:56 Roee viq: the idea is the i'm sending (from the master to a minion) a tar file which includes the installation, then I need to extract this on the minion copy the properties from old installation dir that locate in the minion and run the installer
09:56 viq Roee: also I think it shouldn't be {% set source  = '{{ pillar["params"]["source"] }}' %} but {% set source  = pillar["params"]["source"] %}
09:57 viq Roee: and maybe it would be an idea to manage the properties file centrally, and have it in version control with other important stuff?
09:57 Roee viq: the copy properties script is already locate as part of the tar file
09:57 babilen (or "{% set source = pillar.get('params:source') %}" or "{% set source = salt['pillar.get']('params:source') %})
09:57 viq Because you do have your salt state in version control, right? ;)
09:58 xenoxaos joined #salt
09:58 __gotcha joined #salt
09:58 juice joined #salt
09:59 Roee viq: actually no... but maybe this will be the next steps... currently i'm almost finished to built the different states... then i want to merged them...
09:59 jhauser joined #salt
09:59 Roee how can i start work with version control... this will be great !
09:59 orion_ joined #salt
10:01 mick3y babil: targetting one host is not really a solution if the host is down :)
10:02 viq mick3y: I don't think that functionality is there yet, though I heard it is desired and planned.
10:03 mick3y viq: yeah I think i've come across that post too. what would be the best way to check if someone's working on it?
10:04 babilen mick3y: Try nick tab completion please
10:04 otter768 joined #salt
10:04 mick3y babilen: yeah - sorry. old habits from bitchx when typing part of a nick and endind it with : would autocomplete
10:04 babilen Also: That wasn't part of your initial specification and I guess that a few more details are needed.
10:04 viq mick3y: either use a tool that has that already, like celery, or introduce a central lock, in some database for example, and have the job script first try to obtain lock, and only then execute
10:10 mick3y viq: thanks for the hint on the celery - will cehck that out
10:10 viq maaaaaaaybe possibly something through orchestrate, but I don't know anything about that
10:11 n0170 joined #salt
10:11 mick3y orchestrate is new to me - haven't had the opportunity to look into this further
10:12 Hazelesque joined #salt
10:13 juice joined #salt
10:15 __gotcha1 joined #salt
10:17 viq likewise, but mentioned for completeness' sake
10:19 Roee viq: when running this i'm getting the follwoing comment  Source file salt://install/None/None.tar.gz not found
10:20 Roee viq: maybe something is wrong in my pillar file ?
10:20 babilen I don't think that this should be solved on a salt level. You can, naturally, use salt to schedule jobs, but I am not sure that implementing a "singleton" pattern in salt is the right way to go about this.
10:22 viq Roee: salt minion pillar.item whatever_you_named_yours
10:24 Roee viq: ahhh do you mean that even i configured my state with the pillar info i'm still need to run the command with the pillar info ?
10:24 viq Roee: no, check that you _have_ the pillar info available
10:24 juice joined #salt
10:25 Roee viq: inside my master... ? or in the minion server ?
10:25 giantlock joined #salt
10:25 Roee viq: maybe i missed something :(
10:25 viq Roee: minion has to have that info available to have the variables on which it's supposed to work
10:26 Roee and how the minion actually updated with the last pillar ?
10:26 babilen Roee: So, when you run "salt 'yourminionid' pillar.items" is the pillar you are referencing listed there?
10:27 viq salt minion saltutil.refresh_pillar, and what babilen says
10:27 Roee I will check this
10:29 viq Roee: in case you didn't know/realise/remember: pillars have their own top.sls, and you need to assign pillars to minions there for the minion to see them
10:36 alexr_ joined #salt
10:38 ckao joined #salt
10:38 Guest86878 joined #salt
10:39 seshan joined #salt
10:39 seshan Can somebody help me undersand pillars ??
10:40 seshan I am basiclly not able able to see any differences between states and pillars
10:40 babilen seshan: pillars are used for targeting bits of (potentially sensitive) data to minions
10:40 viq seshan: pillars are variables that you can use in other places
10:41 seshan are they only valiables ??
10:41 viq seshan: yes
10:41 seshan *variables
10:41 babilen states are bits of configuration that can be tested and acted upon if the test fails. So, for example, you could have a state that enforces the creation of a directory and you might want to save the actual path of that directory in a pillar
10:42 babilen pillars are Python dictionaries that can be targeted to minions
10:42 seshan so then in a normal sls file, If i use jinja to determine a value or to set a value like apache or httpd that is a pillar ??
10:42 seshan am I correct ?
10:42 viq seshan: no, but you can get that value from a pillar
10:43 __gotcha joined #salt
10:43 viq Not every variable is a pillar, but every pillar is just a variable
10:43 babilen seshan: Have you read and worked through http://docs.saltstack.com/en/latest/topics/tutorials/pillar.html already?
10:43 seshan viq: babilen can you give me a small example other than what is in the docs
10:43 TK_ left #salt
10:43 TK_ joined #salt
10:44 seshan babilen: yes I did, and it still did not make sense to me
10:44 viq seshan: https://github.com/saltstack-formulas/users-formula
10:44 seshan viq: checking the link
10:45 TK_ missing salt-api when I use " yum install salt-master"  install on centos-6.5
10:45 viq seshan: you have an example pillar, which is used to store some data. But inside the users dir you have map.jinja, which is used to set some other variables, depending on OS, and states that actually do things based on those bits of information
10:46 TK_ salt-api need to install alone ?
10:47 babilen seshan: https://www.refheap.com/94111
10:47 Gues480631 joined #salt
10:47 babilen TK_: I believe that it is packaged separately, yues
10:48 babilen (if it is available at all)
10:49 jeddi joined #salt
10:49 seshan babilen: got it :)
10:49 seshan viq:  babilen understood
10:50 viq cool
10:50 Hazelesque joined #salt
10:51 babilen seshan: You might want to read http://docs.saltstack.com/en/latest/topics/best_practices.html and http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html (the usage of :lookup: is wrong in the former though)
10:51 babilen That would maybe clear some things up
10:52 seshan viq: babilen just to make sure I have understood it correct ., state is an execution like installing pakages or creating a directory, and the data for the state can come from a grain or a pillar, where a grain contains a data about a minion's underlying system like harddisk space etc and a piller is any user set data like a path for creating a folder or what are the list of packages to be installed
10:52 seshan correct me if I am wrong
10:52 babilen But essentially: You try to write your states in a very generic way so that the *actual* states that are being run depend on the data that is handed to them via pillars. That way you can target the same state to all applicable minions and the decision of what really happens is based on the pillar that is being made available to the minions
10:53 seshan babilen: thanks for the best prctice
10:53 TK_ babilen: thanks, yes, it is packaged separately , I have install it
10:54 babilen seshan: A state is essentially a test and an action that will make the state come true if the test fails (e.g. test if directory exists, run "mkdir /path/to/dir" if it doesn't). Your understanding is more or less correct (I think) though.
10:55 seshan babilen: its just the 3rd day, will have more clarity when I work more :)
10:56 babilen Salt then tries to ensure that all tests/states are "True" (i.e. their respective tests succeed). This is how states and execution modules fit together. Execution modules are the tools that actually *do* things and can also be run/used interactively, while states contain a test if something has been achieved and would call the execution module if it hasn't
10:56 akafred joined #salt
10:57 babilen So, you have the "file.directory" state (cf. http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.directory ) and mkdir function in the file execution module (cf. http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.mkdir )
10:59 babilen These are the two big things on the "execution" side of salt. States describe something that has to be achieved when run (i.e. during a highstate run), modules are the tools that do the actual work. On the other hand you have datastores such as pillars (per minion data/dictionaries), salt mine (data about other minions), grains (data about the local minion (e.g. hostname, ram, ip addresses, ...)
10:59 juice joined #salt
11:00 gildegoma joined #salt
11:01 babilen You would refer to those datastores in your states to make your states more generic. You might, for example, want to ensure that mailname is set correctly and rather then writing multiple file that contains the actual name for every single minion you would simply target one to it that contains "grains['fqdn']" in it
11:02 Cidan joined #salt
11:02 seshan I am just trying to understand it even better
11:02 seshan babilen: :) :)
11:02 babilen Sure, just gave you the big picture with all the things you will encounter soon
11:03 seshan well that actually clarified a lot more things to me :)
11:03 babilen I think a good way for you to learn how things fit together is to use the users-formula to create a user on one of your minions and to write a state that creates a file in a location that is set via pillars and that contains the fqdn of the minion in it.
11:04 seshan I was exactly thinking the same :)
11:04 babilen +1
11:05 seshan babilen: if you were in Bangalore, India I would buy a coffee for sure :P
11:05 babilen Sorry, /me is in Berlin
11:07 seshan do you have a blog or something ??
11:07 seshan by the way do you work for saltstack ??
11:09 babilen No, I don't. But you'll find me here almost all the time if you have questions.
11:09 TK_ cool
11:10 seshan cool
11:12 alanpearce joined #salt
11:16 JlRd joined #salt
11:16 juice joined #salt
11:17 alanpearce joined #salt
11:19 Roee babilen: sorry for the delay. i ran the "pillar.items" and can't see my Pillar listed there...
11:20 babilen Okay, that is your issue then. Could you paste your pillar top.sls and the pillar itself to http://refheap.com ?
11:20 Roee sure
11:22 Roee just a second, the top.sls file must to be located inside the same folder as the pollars ?
11:22 Roee pillars
11:22 babilen You need a top.sls for pillars *and* a top.sls for states, yes.
11:24 ggoZ joined #salt
11:27 Roee :( i don't understand this... if there just a schema or something to read of how everything is combined and worked between master and minion that would be great..
11:28 Roee every time that i think that i begin to understand i see that i'm not...
11:28 Roee I thought the the relationship between master and minion are only in one way...
11:29 Roee means that salt master is manage the salt minions
11:29 Roee therfore every command or state that i build i need to execute from the master and point it to the minion
11:30 babilen yes, that is the case
11:30 babilen It's just that you target pillars (i.e. minion specific data) to minions just like you target states
11:30 mirko joined #salt
11:31 babilen You'd therefore end up with both /srv/pillar/top.sls and /srv/salt/top.sls for pillars and states respectively
11:31 BigBear joined #salt
11:31 Roee that means that in the master i've one pillar that combined information about all the minions ?
11:32 Roee and every execution each minion knows to run only the relevant information to him ?
11:33 __gotcha joined #salt
11:34 ange joined #salt
11:35 VSpike This is an odd one https://bpaste.net/show/6127bdb92d48 ... running a state from the master says the pillar failed to render (although calling pillar.data on the same minion from the master reports no problems) which calling the same state from the minion gives a completely different error
11:35 babilen Roee: If you could actually paste your minion and some output I could work with what you have rather than having to make something up from scratch
11:35 babilen Roee: s/minion/pillar setup/
11:38 babilen VSpike: Could you paste your states and pillars as well?
11:39 seshan babilen: just like Roee 's issue, lets say we are to copy a file from master to minion, and the path to where I am going to copy is a pillar, then do I really need to wirte the opertion in the top.sls in the pillar or the top.sls in salt folder
11:39 VSpike I tried a different state, and I get the same error on the master about the pillar, but it runs fine on the minion. So the pillar error is not related to whatever is wrong with that particular state
11:40 VSpike babilen: will do
11:40 VSpike And I get the same error from the master on different hosts, so it's not host specific
11:42 Roee babilen: could you please specify again which files you want me to show you ?
11:42 babilen seshan: I don't follow, the only bit of information that will come from the pillar would be the "- name: ..." argument of the file.managed state. If would, therefore, look something like "foo_state: \n - file.managed: \n - name: {{ salt['pillar.get']('foo:filepath') }}" and you would have a pillar with "foo: \n filepath: /path/to/some/file" for that minion.
11:42 wvds-nl joined #salt
11:42 VSpike babilen: https://bpaste.net/show/d343c3bb2fda <-- pillars
11:43 VSpike It's a machine called cdr-db1 which runs Ubuntu, so those are the ones it matches
11:43 VSpike I haven't really done anything with Linux so far, bar a few initial experiments. Been concentrating on the Windows boxes. Hence the empty pillar
11:44 babilen Sorry, too much mental overhead for me to get into that right now
11:45 Roee :)
11:46 seshan babilen: you seriously need a break man :)
11:46 grosjean o
11:46 grosjean any salt dev ?
11:46 babilen VSpike: And you haven't pasted the "linux" nor "linux.users" pillar at all.
11:46 grosjean some times cmd_iter return me an empty generator ...
11:47 babilen Roee: I want to see /srv/pillar/top.sls along with all referenced files in there. If you don't have a /srv/pillar/top.sls yet please paste the pillar file you are using right now along with the *state* that uses the data from that pillar and the output of "salt 'yourminion' pillar.items"
11:48 Cidan joined #salt
11:48 aqua^mac joined #salt
11:48 Roee great thanks...
11:48 babilen Roee: So, say you have /srv/pillar/foo.sls then you would paste that
11:53 xsteadfastx joined #salt
11:53 bhosmer joined #salt
11:53 Roee babilen: here it is : http://txt.do/oyux
11:53 VSpike babilen: linux.users doesn't exist, and linux (i.e. /srv/pillar/linux/init.sls) is empty ... although I put some dummy data in it in case it doesn't like empty files but no difference
11:54 babilen VSpike: So, where does it get the idea that it needs "linux.users" ?
11:55 babilen Roee: As you are using non-default paths, could you also paste your master's config? (i.e. /etc/salt/master)
11:55 VSpike babilen: There /was/ something in there which included an sls called linux.users, which didn't exist. When I got the error about the pillar, I did "touch /srv/pillar/linux/users.sls but the error still occured, so I deleted that file and removed the include from /srv/pillar/linux/init.sls leaving the empty file
11:55 VSpike babilen: I've no idea! I've grepped my whole tree and I can't see it. It's like that error has caused something to cache which now can't be uncached
11:55 babilen VSpike: Did you run "salt-run fileserver.update" since you made those changes?
11:55 VSpike No :/
11:55 babilen Try it
11:56 VSpike Ah, no change
11:56 babilen Okay, still the same error about linux.users ?
11:56 VSpike yep
11:56 Roee babilen: here it is : http://txt.do/oyug
11:56 babilen VSpike: Might want to restart the master and/or remove selected data from /var/cache/salt/ maybe
11:58 jonatas_oliveira joined #salt
11:58 VSpike babilen: yep, that did it
11:58 babilen Roee: Okay, you seem to be missing a top.sls file for your pillar. What is the name of the minion that should have access to that pillar (or a suitable targeting expression?)
11:59 Roee let's call it lms.sls
11:59 babilen VSpike: Good, curious that fileserver.update wasn't enough in that case
11:59 babilen Roee: Your minion really is called lms.sls ?
11:59 ganes joined #salt
11:59 ganes hi
11:59 babilen But fair enough ...
12:00 Roee the minion called "Q_MHE_LMS_RSP"
12:00 ganes any one can clear my doubt?
12:00 ssteinerX joined #salt
12:00 ganes pls help me
12:00 ganes i need Wordpress Deployment with SaltStack
12:01 VSpike babilen: thanks for the help :) Now I need to fix the state I was trying to run in the first place
12:01 VSpike Seems a lot like https://github.com/saltstack/salt/issues/16412
12:01 pviktori joined #salt
12:01 babilen Roee: So, create /srv/salt/base/pillars/top.sls with the following content: https://www.refheap.com/94112 (replace the name of the minion in there)
12:01 ecdhe joined #salt
12:01 Roee Does the top.sls will serve only one minion ? I mean do i  need to create a specific top sls per each minion ?
12:01 ganes anyone can send any link or doc
12:01 VSpike But the version of python-requests package I have on the box is Version: 2.0.0-1~precise+1
12:02 babilen Roee: No, the top.sls will define which pillars are being sent to which minions for all minions
12:02 BigBear joined #salt
12:02 Roee babilen: could you please paste the info here : http://textuploader.com/ - i don't have access to the above URL...
12:03 Roee ok thanks...
12:03 zz_Cidan joined #salt
12:03 Cidan joined #salt
12:03 babilen Roee: http://docs.saltstack.com/en/latest/topics/pillar/ + http://docs.saltstack.com/en/latest/ref/states/top.html should clarify this
12:03 spo0nman joined #salt
12:03 scristian joined #salt
12:03 VSpike Does salt on Ubuntu use the system python packages or does it have its own environment somewhere?
12:04 babilen Roee: But if you understood the top file for states you should have understood the top file for pillars as they work exactly the same. The only difference is that you target data in one case and states in another.
12:04 babilen VSpike: It uses the system Python
12:04 TK_ joined #salt
12:04 diegows joined #salt
12:04 Roee babilen: could you please paste the info here : http://textuploader.com/
12:05 spo0nman guys I'm publishing custom grains in /etc/salt/grains and i can see them when I do a salt-call on local, but I don't see them from the master. Any ideas what i may be doing wrong?
12:05 Roee seems that i don't really understand the top file for states...
12:05 otter768 joined #salt
12:06 babilen Roee: The top file simply decides which states/pillar are applied to which minion
12:06 VSpike I wonder if there's a discrepancy between the package version number and the internal version of requests
12:07 linjan joined #salt
12:07 Roee and what hapning if want to deploy a new version of my software ?
12:08 Roee do i need to run something on the master to deploy it on the minion ?
12:10 Roee in a top case, that means that every change that i will do in the master will automatically affect the minion ?
12:10 ninkotech joined #salt
12:10 Roee because the minion always have "open eyes" on the master ?
12:12 VSpike wait, that version of requests comes from the salt ppa
12:13 babilen Roee: If you want to install a new version you would, presumably, edit your "params" pillar and adjust some of the values in there. You would then run "salt '*' saltutil.refresh_pillars" to ensure that all minions use up-to-date pillar data and then run state.highstate or "state.sls RSP_Deploy" on selected minions.
12:14 VSpike Guess I need to speak to joehh
12:14 babilen Roee: Have you created a suitable top.sls file for pillars by now?
12:14 Roee yes...
12:15 Roee look here : http://txt.do/oyun
12:16 Roee the error i'm getting from running : salt Q_MHE_LMS_RSP pillar.items
12:16 xenoxaos joined #salt
12:16 VSpike Oh. Looks like I have an old one installed in /usr/local/lib/python2.7/dist-packages .. my bad
12:18 babilen Roee: Make that "component: 'dtp-install-7.0.28.53'" please
12:18 babilen Roee: Oh, no. The error is above: You want "source: MS28_53" rather than "source:MS28_53"
12:19 babilen VSpike: evil /usr/local (almost as bad as random python eggs)
12:20 VSpike :) yeah
12:20 VSpike This is what happens when you build servers by hand, try stuff out on them, repurpose them because building new ones it too hard, clone them and make them production machines :)
12:20 VSpike All the stuff salt is meant to solve (and will, eventually)
12:21 Roee babilen: i will fix this
12:21 bhosmer joined #salt
12:22 __gotcha joined #salt
12:22 babilen Yes, you will.
12:22 johtso_ joined #salt
12:24 denys joined #salt
12:26 juice joined #salt
12:27 keyser running the following returns root rather than oracle : cmd.run "whoami" user=oracle   what am I doing wrong/misunderstanding here?
12:29 bhosmer joined #salt
12:29 ingwaem joined #salt
12:33 babilen keyser: Are you looking for "runas" ?
12:33 BigBear joined #salt
12:33 babilen http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.run
12:34 juice joined #salt
12:39 keyser babilen: yes - I think I am - the docs I was looking at seemed to refer to user instead...
12:39 keyser thanks
12:43 genediazjr joined #salt
12:43 alanpearce joined #salt
12:45 JlRd joined #salt
12:45 juice joined #salt
12:47 dani2 joined #salt
12:47 TK_ joined #salt
12:49 bhosmer joined #salt
12:51 Roee babilen: i made few chnages and run the state and getting errors
12:52 Roee babilen: can you please take a look here : http://textuploader.com/oyue
12:54 intellix joined #salt
12:54 jaimed joined #salt
12:55 juice joined #salt
12:55 alanpearce joined #salt
13:01 linjan joined #salt
13:06 ninkotech joined #salt
13:06 BigBear joined #salt
13:08 babilen Roee: Your pillar still seems to be empty
13:09 Roee how it can be
13:09 __gotcha joined #salt
13:10 Roee sl
13:11 alanpearce joined #salt
13:11 Roee look here : http://textuploader.com/oyfd
13:15 glyf joined #salt
13:16 grosjean so anyone for my problem with cmd_iter ?
13:20 babilen Roee: What does "salt 'Op_MHE_LMS_LMSOneClick_TestSalt' saltutil.refresh_pillars" and "salt 'Op_MHE_LMS_LMSOneClick_TestSalt' test.ping" and "salt 'Op_MHE_LMS_LMSOneClick_TestSalt' pillar.item rsp" give you?
13:21 alanpearce joined #salt
13:21 Roee I will send you
13:21 n0170 joined #salt
13:22 babilen Roee: And your minion id is really "Op_MHE_LMS_LMSOneClick_TestSalt" ? (nor domain)
13:22 babilen s/nor/no
13:22 Roee yes this is my minion id
13:23 babilen Roee: You have a horrible amount of leading whitespace before "- params" btw, please use two spaces there
13:24 babilen (or four in that case)
13:27 Roee babilen: see output here : http://textuploader.com/oyfr
13:28 babilen Roee: So, that worked. Congratulations. Now run your state and paste it along with the output from the state run.
13:29 Roee babilen: so running my state give me this : http://textuploader.com/oyf9
13:31 babilen Could you paste your state SLS file?
13:31 Roee sure
13:31 babilen Preferably in one pastebin, I don't necessarily want to keep a thousand tabs open just for debugging your issue
13:32 Roee babilen : http://textuploader.com/oyf0
13:33 Roee I appriciate your help...
13:34 babilen Roee: Ah, please make that: {% set source = salt['pillar.get']('params:source') %} (and likewise for the other pillar references)
13:34 * babilen has been doing to much Python lately :)
13:35 Roee I will try this
13:35 babilen Ah, no that should work
13:35 babilen AAAH!
13:35 Roee :)
13:35 Roee what ?!?!
13:35 babilen Forget that, you have to use "{% set source = pillar.get('rsp:source') %}"
13:36 Roee ahhhhhhh !
13:36 Roee :)))
13:36 Roee Great...
13:36 babilen The "params" has no meaning and only holds the data, while the actual data is a dictionary {'rsp': {'source': ... }}
13:36 alanpearce_ joined #salt
13:36 Roee And I don't understand how the pillar.get knows to read specifically the rsp parameters :)
13:36 aqua^mac joined #salt
13:38 babilen A pillar is just a *huge* dictionary that is created by merging all other dictionaries that have been made available for the minion. The actual data in your pillar looks like {'rsp': {'source': ... }} so you have to access it with the "rsp" key first and then "source"
13:40 Roee so writing this : {% set source = pillar.get('rsp:source') %}
13:40 Roee is true ?
13:40 babilen yeah (and similarly for all other references)
13:40 Roee so still have a problem
13:42 babilen Show us
13:43 Roee same errors, the state is runing and giving this :  Comment: Source file salt://install/None/None.tar.gz not found
13:43 Roee seems that the pillars is not read
13:44 babilen btw, "names" is wrong for cmd.run
13:44 babilen Roee: Please paste the *entire* output
13:45 Roee http://textuploader.com/oyfk
13:45 babilen And I always use whitespace (e.g. {{ source }})
13:46 Roee {% set source = pillar.get( 'rsp:source' ) %}
13:47 babilen No, not like that. Just for the {{ ... }} (but that wouldn't cause the error/problem here)
13:47 babilen So, just to make sure: You can run "salt 'Op_MHE_LMS_LMSOneClick_TestSalt' pillar.item rsp" and you get the data you want?
13:47 TK_ joined #salt
13:48 hcl2 joined #salt
13:48 Roee the output look well
13:49 Roee http://textuploader.com/oyfj
13:51 Roee and this is my pillar again (params.sls) - http://textuploader.com/oyf4
13:52 babilen And this is your state? http://textuploader.com/oyfl
13:52 babilen btw, where is "names" from?
13:53 Roee yes this is my state
13:53 Roee the names is working well
13:54 Roee but i'll fix this to name
13:56 babilen *shrug*
13:57 babilen I'd replace "{{ source }}" with "{{ pillar.get('rsp:source') }}" in the first state, uncomment the rest of the states, make sure to always (!!!!!!!!!!) run "salt-run fileserver.update" before testing any changes (you did do that?) and ...
13:57 babilen I'd also use newlines between states
14:00 spo0nman is there a way I can use puppet facts like grains?
14:01 spo0nman salt -G 'a puppet fact'
14:01 spo0nman i already have lots of custom puppet facts and don't want to create it into grains
14:02 Roee babilen: but with your change i will lose the "set arguments"
14:02 __gotcha joined #salt
14:03 Roee Let's sat the before i tried to use the pillar, i entered the exact source instead of each pillar.get and it worked perfect
14:03 Roee so I assume the problem is just a syntax...
14:04 babilen Roee: It's called debugging, I am not necessarily suggesting that you use that forever
14:04 Roee the question is if setting a value with : {% set source = pillar.get( 'rsp:source' ) %} is the right way... because it seems that something is wrong
14:06 otter768 joined #salt
14:09 juice joined #salt
14:09 GnuLxUsr joined #salt
14:11 ggoZ joined #salt
14:12 GnuLxUsr joined #salt
14:12 ahmet2mir joined #salt
14:12 ahmet2mir Hi guys
14:12 ahmet2mir I've got a question concerning modules
14:13 ahmet2mir I try to put some modules under a directory
14:13 ahmet2mir but they are not loaded
14:13 tempspace Roee: try {% set source = salt['pillar.get']('rsp:source', 'defaultvalueifnotfound') %}
14:13 ahmet2mir {file_roots}/_modules/myfolder/
14:14 ahmet2mir in myfolder
14:14 Roee i will try this
14:14 ahmet2mir you have __init__.py and dummy.py
14:14 ahmet2mir if i add a test func in __init__, it's loaded
14:14 ahmet2mir but not in dummy
14:14 ahmet2mir salt-call myfolder.test --> OK
14:14 ahmet2mir salt-call myfolder.dummy.othertest --> KO
14:16 babilen Roee: You can also use "pillar.get('rsp:source', 'defaultvalueifnotfound')"
14:16 tempspace ahmet2mir: I'm not that familiar with modules, but every module built into Salt is just one file, https://github.com/saltstack/salt/tree/develop/salt/modules
14:17 Roee after each change i'm restarting the master
14:17 tempspace I know states work like that, but I'm not sure if modules do
14:17 tempspace Roee: No need :)
14:17 TK_ joined #salt
14:18 ahmet2mir joined #salt
14:20 Roee after each change i'm restarting the master
14:21 tempspace Roee: There's no need to do that
14:21 tempspace Roee: what's the problem you're having at the moment?
14:21 Roee ahh ok...
14:21 Roee I will upload my state again
14:21 Roee and the output
14:24 Roee here is all the needed info http://textuploader.com/oyfp
14:24 keyser joined #salt
14:24 Roee thanks !
14:24 ahmet2mir if can help https://gist.github.com/ahmet2mir/5027e80dfdc23239ff40 thanks :)
14:25 Roee the problem is that the state don't get the argument from the pillar file
14:25 t0rrant joined #salt
14:25 tempspace Roee: it's definitely not getting that pillar value
14:26 alanpearce joined #salt
14:26 tempspace Roee: is this the first time you're using pillars?
14:26 BigBear joined #salt
14:26 tempspace Roee: do you have pillar_roots uncommented/set in your master configuration?
14:30 nitti joined #salt
14:31 Ouzo_12 hmm after upgrading to salt-master 2017.7.0, it uses 100% all the time.. master is on a debian wheezy.. any fix for that? salt-master in debug mode dont show any errors
14:32 Roee tempdapce: sure
14:32 balltongu joined #salt
14:32 tempspace Roee: can you execute salt-call pillar.items on the host you're trying to execute on and paste the output
14:32 monkey661 joined #salt
14:32 Roee - /srv/salt/base/pillars
14:34 Roee tempspace: sure - here is the output http://textuploader.com/oyfz
14:35 gothix joined #salt
14:35 j-saturne joined #salt
14:40 tempspace Roee: Just for fun, can you use the syntax I posted earlier, salt['pillar.get']('rsp:source', 'defaultvalueifnotfound') and try again?
14:41 Roee yes i will replace the first line with this
14:43 Roee insert this : {% set source = salt['pillar.get']('rsp:source', 'defaultvalueifnotfound') %}
14:43 __gotcha joined #salt
14:43 tempspace ok
14:43 Roee looks much much better !
14:44 Roee so what is the difference between this : {% set component = pillar.get( 'rsp:component' ) %}  to {% set source = salt['pillar.get']('rsp:source', 'defaultvalueifnotfound') %}
14:45 Roee babilon: you got that ???
14:45 viq Roee: second one sets a default value if it doesn't get any from pillar
14:45 viq as, uhm, the text of what you have there implies
14:45 Roee not, but event wihtout the default value
14:45 tempspace viq: I think he's asking without the default value
14:45 viq ah
14:46 Roee now it really get the values from the pillar
14:46 tempspace Roee: I'm not 100% positive, but I believe the first one is using the Python get function for the item, and the later is using the pillar.get function of Salt, which is what you need to use the : syntax of multi level pillars
14:47 tempspace pillar.get('hi') works, pillar.get('hi:hi') won't I believe
14:48 Roee yes you are right
14:49 Roee so hoe can i get read of the defaultvalueifnotfound
14:49 tempspace just remove the parameter
14:49 alexr joined #salt
14:49 ahmet2mir Roee: I tried to "from .dummy import othertest"
14:49 ahmet2mir Got the bug #12474
14:49 tempspace salt['pillar.get']('rsp:source')
14:50 ahmet2mir Fix it, an then try myfolder.othertest (instead of myfolder.dummy.test) and it works
14:50 ahmet2mir so it's seems that it's possible :)
14:50 MK_FG joined #salt
14:52 Roee thank you all ! (tempspace, babilen, and viq ) you are great...
14:52 tempspace Roee: no problem, Happy Thanksgiving if you celebrate
14:52 babilen tomorrow?
14:53 * babilen couldn't care less about that, but it's always nice to know what other cultures are up to
14:53 tempspace it's today over here in the US
14:53 Roee thank you... actually no... (just waiting to black friday deals to buy a new laptop :) ) but Happy Thanksgiving to you...
14:53 babilen Ah, today .. well then happify a local Indian
14:54 ahmet2mir sorry not Roee but tempspace :)
14:55 monkey66 joined #salt
14:55 xenoxaos joined #salt
14:55 tempspace ahmet2mir: Sorry, like I said I'm no module expert, but to follow the standards in salt, I'd put it all in one file if I were to make one myself, maybe that will help, maybe it won't :)
14:56 tempspace that way if you're doing something others can use, it'd be much easier...but that's just how I think
14:57 tempspace and it would probably fix your issue, but it may not be 100% necessary either
14:57 canci joined #salt
14:58 babilen Roee: And sorry for that obvious problem :)
14:58 oyvjel joined #salt
15:00 Roee babilen many thanks !
15:02 viq joined #salt
15:03 alanpearce joined #salt
15:03 tempspace Roee: which laptop are you buying?
15:04 Roee thought about the lenovo yoga 2 pro i7 256 SSD
15:05 Roee going to cost 999.99$ in best buy
15:05 __gotcha joined #salt
15:08 tempspace Roee: that's a good one
15:08 Roee sure !!!
15:09 tempspace I had the original yoga...it was a nice laptop, but it was too big to not be awkward if you wanted to use it as a tablet
15:11 Yufei_ joined #salt
15:14 eagles0513875 joined #salt
15:14 eagles0513875 hey guys :)
15:14 eagles0513875 probably a stupid question but i dont quite understand what salt stack actually does
15:15 VSpike What's that library called that understands lots of config file formats, that Salt can use?
15:16 alanpearce joined #salt
15:16 Rory eagles0513875: http://docs.saltstack.com/en/latest/topics/tutorials/walkthrough.html
15:17 tempspace eagles0513875: It's a configuration management/system orchestration platform
15:17 eagles0513875 ty Rory :)
15:17 tempspace VSpike: augeus
15:17 TK_ joined #salt
15:17 VSpike tempspace: ahh yes. Thanks!
15:17 eagles0513875 can salt even work with windows machines
15:17 tempspace Just spelled correctly, but I think that's what you want
15:18 tempspace eagles0513875: yes it can
15:18 VSpike eagles0513875: up to a point :)
15:18 eagles0513875 where i work we do vehicle tracking and its a windows based system which we are looking to migrate away from tbh
15:18 eagles0513875 as the way it was designed and coded very poorly done
15:18 VSpike I used to do that
15:18 eagles0513875 and I am looking at pushing easy way deployments etc
15:18 VSpike So was ours :/
15:19 VSpike eagles0513875: .NET?
15:19 eagles0513875 can salt stack work with amazon to for example deploy new instances on ec2
15:19 eagles0513875 VSpike: yes
15:19 eagles0513875 im friends with the cto so im server as the Open source go to guy plus web developer
15:19 VSpike for deployment you may want to look octodeploy
15:19 viq eagles0513875: yes, look up salt-cloud
15:19 tempspace eagles0513875: Yes, it can, that's what salt-cloud is
15:20 VSpike configuring IIS in salt is hard work, but it can be done
15:20 karimb joined #salt
15:20 VSpike s/in salt// frankly, but still
15:20 eagles0513875 whats the difference then between ubuntu's juju and salt stack
15:21 Rory Salt's more comparible to Puppet than to Juju
15:21 eagles0513875 i remember in the early days of orchestration that ubuntu pushed puppet
15:22 eagles0513875 one thing i like about juju though and i shoudl try out saltstack
15:22 eagles0513875 is that I can deploy instantly and directly to an ec2 instance as well as other cloud providers
15:22 eagles0513875 anyway might need to try salt stack out
15:22 VSpike eagles0513875: you might want to look at chef for comparison too. It's more complicated than Salt but the Windows support is definitely more mature.
15:23 nitti joined #salt
15:23 eagles0513875 VSpike: windows we will i hope slowly phase out
15:23 eagles0513875 what I think salt stack woudl be good for is deployment of hadoop instances on amazon
15:23 eagles0513875 we have our db which is half a TB and growing
15:23 VSpike That's my secret evil plan too, which is why I pushed salt even though doing Windows stuff is hard work with it sometimes
15:23 eagles0513875 anyway im out for now
15:24 eagles0513875 be back later
15:24 monkey66 left #salt
15:24 tempspace I don't miss not having to work with Windows Servers all day long
15:25 tempspace errr...imagine that was better grammar
15:25 aqua^mac joined #salt
15:25 VSpike Heh
15:26 VSpike But ... they are so easy to use!
15:27 tempspace I used to be CTO at a Windows Hosting company...started hosting apps on NT 4..it's come a long way...but ugh
15:28 VSpike Looking at that stuff about WS-MAN and powershell remoting  yesterday nearly bought me out in hives. As someone who has a sneaking admiration for the suckless.org people, even SOAP is enough to make me sad ... but that monstrosity ... wow.
15:30 istram joined #salt
15:31 tempspace I briefly entertained using a Windows machine a couple weeks ago and while I was testing things out I discovered choco...so awesome
15:31 VSpike yeah, its an improvement! a long way from perfect, but I think they are currently re-writing it in C#, with MS support
15:31 VSpike It's going to become an official product of sorts, AIUI
15:32 istram in case I have the same option set in the main file and in include file, do they merge or does include overwrite the value (if the include it at the end)?
15:32 TheThing joined #salt
15:33 genediazjr joined #salt
15:33 tempspace istram: neither, it won't run if you have duplicate names
15:34 thayne joined #salt
15:34 tempspace istram: you can use extend if you need to change what it does
15:35 istram tempspace: thanks. I'm probably not going to go that way, it's just because windows admins decided to push changes into the main conffile instead of minion.d directory and whole thing is mess now
15:38 Gues480631_ joined #salt
15:39 xenoxaos joined #salt
15:41 TheThing_ joined #salt
15:44 fii joined #salt
15:46 fii Morning/Afternoon. We have integrated salt into foreman and everything works. Only problem is, we still have to manually run salt when a node boots up initially. Is there way to trigger a salt run based on an event please ?
15:47 fii So when a node boots up it will go ahead and grab its config from the master ?
15:47 viq fii: look up reactor
15:48 viq also I think startup_states in minion config
15:48 fii Thbaks viq
15:48 fii thanks
15:52 dani2 Hey folks, is there any limitation to download and extract files bigger than 1,5 GB using salt.states.archive.extracted ? I
15:52 dani2 The file is at S3,
15:53 alexbst joined #salt
16:02 xenoxaos joined #salt
16:02 lb1a joined #salt
16:03 Gues480631 joined #salt
16:07 otter768 joined #salt
16:07 j-saturne joined #salt
16:09 Rory dani2: Don't think so, why, are you seeing problems when trying?
16:10 dani2 Yes, it says that it was not possible to fetch the archive on s3
16:10 dani2 the others I have works fine
16:11 dani2 but the others files less than 300 MB
16:11 dani2 are*
16:11 dani2 Unable to manage file: Could not fetch from s3://bar/foo.tar
16:12 saravanans joined #salt
16:12 Rory other files in the same bucket work fine?
16:13 Rory I'm wondering if it might be an S3 thing rather than a salt thing
16:13 Rory Can you download the file using the standard AWS cli tools?
16:17 TK_ joined #salt
16:20 ahmet2mir joined #salt
16:26 wolfpackmars2 joined #salt
16:27 wolfpackmars2 how to ensure a managed user account has the password disabled using state files?  password=None ?
16:30 VSpike "salt-call augeas.tree /files/etc/newrelic/nrsysmond.cfg" returns "None" ... do I have to give Augeas some hints about the file format or something?
16:31 jonatas_oliveira joined #salt
16:32 blaffoy joined #salt
16:32 viq wolfpackmars2: set password to **
16:32 viq Salt sets the hash, and you'll never have a hash of **
16:32 masterkorp Does the service start support systemd ?
16:32 viq end enforce_password=True
16:33 viq masterkorp: it certainly should
16:33 masterkorp viq: how ?
16:34 wolfpackmars2 so in my state file I would add two lines: - password=** and -enforce_password=True
16:34 viq masterkorp: uh, what?
16:34 tomspur joined #salt
16:34 blaffoy Hi again! I have a (I hope) very simple question. I'm trying to configure my fileserver backend, and I would like to verify that it's working. To do this, I've tried to use `sudo salt-run fileserver.file_list` (as in this doc: http://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.fileserver.html). However, I get the output: "Function 'fileserver.file_list' is unavailable"
16:34 masterkorp i just place the unit on the unit directory and just write the normal service
16:34 viq wolfpackmars2: that's what I'd do
16:34 masterkorp ?
16:35 viq masterkorp: I guess, haven't really tried
16:37 blaffoy Is there some other package I need to install, or other configuration, to use the fileservers runners?
16:38 jonatas_oliveira joined #salt
16:39 Twiglet_ joined #salt
16:39 babilen Can you guys think of a nice way to recursively adjust permissions of a directory?
16:40 CSa_ babilen: chmod -R =)
16:40 VSpike Sheesh. I think it might be easier just to deploy the file instead of using augeas to change it
16:40 babilen CSa_: Yes, sure ... that would, however, run every time.
16:41 CSa_ babilen: ... at no cost - at least for moderate file system size
16:42 babilen I guess I'll stick to my cmd.run with find -exec then, just thought that there might be something that I can use ... hmm, maybe a file.recurse :-/
16:44 CSa_ babilen: I think find or chmod should always be cheaper than some salt module
16:44 glyf joined #salt
16:46 eliasp does anyone know from the top of his head how the cache data of minions are structured? do they contain some kind of metadata like the saltversion which created the cache object?
16:46 blaffoy Or any other way of inspecting what files are on the salt fileserver?
16:46 eliasp blaffoy: salt your-minion cp.list_master
16:47 goudale joined #salt
16:47 goudale Hi all
16:47 goudale All my minion stopped working on they own
16:47 eliasp goudale: 2014.1.x → 2014.7.0 upgrade?
16:47 goudale nop
16:47 eliasp goudale: or just for no reason?
16:47 blaffoy eliasp: beautiful. Thank you very much.
16:47 goudale just no reason
16:48 goudale nothing in master nor minions logs
16:48 goudale the service just stopped on their own
16:48 goudale any idea to investigate more ?
16:48 eliasp goudale: ah, so the service salt-minion isn't running anymore?
16:48 goudale it was running 2 hours ago
16:48 babilen file.directory, recurse + dir_mode seems to be what I am looking for
16:48 xenoxaos joined #salt
16:49 goudale if I `service salt-minion start` by hand, everything work as expected
16:49 ajolo joined #salt
16:49 eliasp goudale: … but then it fails after a certain amount of time or what happens?
16:50 goudale it seems to
16:50 goudale work as expected
16:50 TheThing joined #salt
16:51 goudale i mean, after restarting the minion service, everything looks fine for the moment
16:52 goudale on the minions, it seems that /var/log/salt/minion as restarted after (or before, don't know) being unreachable
16:53 goudale s/restarted/rotated
16:54 eliasp goudale: hmm, could you try reprodocing this by manually triggering the logrotation?
16:54 eliasp goudale: what logrotation do you use? regular 'logrotate'?
16:54 goudale you mean, rotate the log to see if salt-minion crash ?
16:55 goudale I guess I am using logrotate
16:55 eliasp goudale: check, if you have /etc/logrotate.d/salt-common … it should look like this: http://pastebin.kde.org/pazn1qlej
16:55 fii viq: you rock !
16:56 goudale indeed it is
16:56 eliasp goudale: if that's the case, enforce the logrotation for your salt logs manually by doing "logrotate --force /etc/logrotate.d/salt-common" and see, whether this stops/kills your minion
16:57 eliasp goudale: if that's the case, we have a reproducable approach and should be able to fix this in one way or another
16:59 goudale eliasp: doesn't seems to crash
16:59 eliasp goudale: ok
17:00 eliasp goudale: if you manage to find any pattern in this crash/stop behaviour, we'll be able to debug further… unless we either have a log message or a reproducable behaviour, it is hard to investigate further :(
17:00 siciliansun joined #salt
17:01 goudale eliasp: I agree
17:02 saravanans joined #salt
17:02 goudale eliasp: any other clue to investigate ?
17:02 eliasp goudale: no, not right now… sorry
17:02 siciliansun left #salt
17:04 VSpike oh, lordy
17:05 VSpike babilen: that error came back again :)
17:05 giantlock joined #salt
17:05 genediazjr joined #salt
17:08 sfs joined #salt
17:08 goudale eliasp: weirdest that
17:09 goudale eliasp: what I thought : some minions service are actually still running
17:09 babilen VSpike: kill it with fire!
17:10 goudale eliasp: on those, the last logs I have are  http://sebsauvage.net/paste/?2b3cad558b45d80a#cyuieo65k+vIuzGH9hIpl4g3U8eSRd5SAQQxCzl/oFY=
17:11 babilen sudo service?
17:11 eliasp goudale: hu? did you try something like "salt your-minion cmd.run "service sudo start""?
17:11 goudale nope
17:11 eliasp babilen: WTF?! there's actually a 'sudo' service on *buntu
17:11 goudale yep
17:12 gildegoma joined #salt
17:12 babilen wut?
17:12 goudale but it as no `status` command
17:12 babilen It simply runs "find /var/lib/sudo -exec touch -d @0 '{}' \;" on start
17:12 eliasp ah, that's what would be a Type=oneshot service in systemd world
17:13 VSpike babilen: strangely, the same fix doesn't work this time either
17:13 eliasp goudale: ok… nothing really related to your issues…
17:13 goudale if i `sudo service salt-minion restart`, the minions shows on the master
17:14 goudale and no log is added on the minion
17:14 eliasp goudale: just looks like there's something going through the list of available services and tries to get a status from them… but "oneshot" services don't have any status
17:14 Cidan joined #salt
17:14 aqua^mac joined #salt
17:14 babilen VSpike: I have to confess that I am not entirely sure which exact error you are referring to. I know that I should have been aware of all the problems I helped to debug in here in the last two weeks, but due to me working on my own problems some of them might escape me right now. If you could be so kind to enlighten me as to which problem returned it would be much easier for me to provide actual help
17:14 VSpike babilen: hah oh sorry :) my apologies
17:15 goudale eliasp: I also think it is not related, the timestamps do not match with my bug
17:15 CeBe1 joined #salt
17:15 VSpike babilen: you mean.. you're talking to other people too? I'm hurt ;)
17:16 VSpike babilen: https://bpaste.net/show/ce68fb0c8a0a
17:16 VSpike it runs fine with salt-call on the minion
17:16 zlhgo joined #salt
17:16 babilen I'm awfully sorry. If you would like private use of "babilen" we can surely talk about rates and relocation packages ;)
17:17 babilen Ah, that bloody git dared to show his head again
17:17 VSpike I was thinking earlier when you were getting bombarded with questions that someone should at least buy you a beer :)
17:18 babilen Are you 100% sure that you don't include that state anywhere? Could you grep your state repositor(y|ies) recursively for it?
17:20 VSpike babilen: from the error would you expect the offending thing to be in a pillar file or a state file?
17:22 VSpike maybe i need to clear the cache on all the boxes
17:23 babilen Pillar
17:23 babilen Did you run saltutil.refresh_pillar on all minions?
17:24 glyf joined #salt
17:25 goudale eliasp: I have one minion that crashed another times
17:25 active8 joined #salt
17:26 goudale eliasp: on the minion, I have this last log line : 2014-11-27 17:24:22,074 [salt.state       ][ERROR   ] The following packages failed to install/update: uwsgi.
17:26 eliasp goudale: could you try to reproduce this on this specific minion by restarting it, then running "salt affected-minion pkg.install uwsgi"?
17:27 eliasp goudale: if this crashes the whole minion, there's something really bad happening… this _shouldn't_ happen
17:29 babilen ooooh, salt supports bash completion for minion names and functions :)
17:29 babilen SWEET :D
17:29 glyf joined #salt
17:30 douardda joined #salt
17:30 eliasp hmm, is there also a zsh-completion file? need to check :)
17:30 VSpike Yeah :) It's OK as long as you expect it to take a while and don't just do what i did which is hit tab tab ctrl-c ctrl-c ctrl-c every time
17:30 eliasp yeehaw: https://github.com/saltstack/salt/blob/develop/scripts/completion/zsh_completion.zsh
17:30 babilen :)
17:30 babilen happiness all around
17:32 VSpike babilen: well, that sort of worked. I did saltutil.refresh_pillar on all minions, and the tried to exectute the state again. I got nothing back at all. Looking at the logs on the minion, it did execute it, but it lost contact with the master
17:32 blaffoy Hi again. I'm trying to configure an amazon s3 bucket as a fileserver backend. I've followed the configuration outlined here: http://docs.saltstack.com/en/latest/ref/file_server/all/salt.fileserver.s3fs.html. But the files in this bucket aren't appearing when I run cp.list_master on the minion. I've verified that the s3 access keys work by manually downloading a file from the bucket (with aws cli tools). I have no idea how to diagnose
17:32 blaffoy Any ideas?
17:32 VSpike Actually, lots of them have
17:32 VSpike babilen: restarting the minion makes it connect again
17:35 goudale so. I investigated a bit. I have that states that try to install and start uwsgi. Uwsgi install, but the service fails to start. Then the minion do not respond to the master
17:36 goudale ie, it does not show under `salt-run manage.status`
17:40 otter768 joined #salt
17:40 tafa2 joined #salt
17:43 blaffoy Should I even expect files on an s3 fileserver to appear under cp.list_files?
17:43 blaffoy Will they appear different to files in roots or hg?
17:47 orion_ joined #salt
17:49 ahmet2mir joined #salt
17:52 diegows joined #salt
17:52 CeBe1 joined #salt
18:00 balltongu joined #salt
18:06 ahmet2mir left #salt
18:09 eliasp goudale: ok, so you can reproduce this behaviour now?
18:09 eliasp goudale: does this also happen when trying to install uwsgi directly via "salt your-minion pkg.install uwsgi" or only when applying the whole state?
18:10 eliasp goudale: if it only happens for a state, is there a difference in behaviour between "salt your-minion state.highstate" and "salt your-minion state.sls your-uwsgi-state"?
18:13 linjan joined #salt
18:14 Gues480631 joined #salt
18:15 goudale eliasp: we resolved this bug, we were lacking some locale to install uwsgi
18:15 genediazjr joined #salt
18:15 eliasp goudale: ok, but this is still something which shouldn't crash the whole minion… or was the crash unrelated to this?
18:17 goudale eliasp: as far as i understand, the crash was related to the package not installing properly
18:17 TK_ joined #salt
18:17 eliasp goudale: ok, because then it would be interesting to have some more details, as something like this should never happen…
18:18 anderbubble joined #salt
18:18 eliasp goudale: which salt-version was the minion running? which OS/Version?
18:18 eliasp goudale: and regarding the locale: was the locale file or just an env variable missing? if so, which file/variable?
18:18 goudale eliasp: salt 2014.7.0 on ubuntu 14.04
18:20 goudale eliasp: I do not know for the locale (another developer did it)
18:20 eliasp goudale: ok, could you probably ask him? I'd like to reproduce this here locally to file an issue for this, as that's IMHO a critical bug
18:21 goudale eliasp: here are the two command he thinks saved him
18:21 goudale sudo aptitude reinstall '~i~n(-fr$|-fr-)!~o'
18:21 goudale sudo aptitude --without-recommends install '~n^language-pack(-|-gnome-|-kde-)fr$' language-support-fr
18:23 eliasp goudale: hmm, ok… so this looks to me like you're running your environment with locale ENV vars set to something like fr_FR.utf8, but you didn't have the corresponding locale files installed
18:23 nitti joined #salt
18:23 eliasp goudale: could you possibly ask for the output of "locale" on the affected box?
18:23 eliasp goudale: preferrably run this way: "salt minion cmd.run locale"
18:24 eliasp because then the environment would be the one of the crashing minion
18:24 goudale en_US.utf-8
18:24 eliasp hmm, then it's IMHO unlikely to be caused by french locales not being installed…
18:24 goudale I agree with you
18:25 eliasp must have been something else then, probably fixed by aptitude at the same time he ran his language-support installation
18:25 fragamus_ joined #salt
18:25 goudale indeed, because `apt-get install uwsgi` still fails with the same error
18:25 TyrfingMjolnir joined #salt
18:25 goudale but running the state which previously crashed the minion do not crash it anymore
18:26 goudale (by crashing i mean, stopped salt-minion)
18:26 seblu joined #salt
18:26 goudale well, I have absolutely no clue about what was going on this afternoon, and all of this do not answer why all my minions suddently stopped
18:27 eliasp goudale: yeah, at this point I'm also clueless as we're lacking a properly reproducable case…
18:28 t0rrant joined #salt
18:31 baoboa joined #salt
18:34 goudale thank for your help eliasp
18:34 eliasp goudale: yw
18:34 goudale bye
18:34 eliasp n8
18:40 t0rrant joined #salt
18:45 Mso150 joined #salt
18:45 ndrei joined #salt
19:02 jalbretsen joined #salt
19:03 aqua^mac joined #salt
19:04 anderbubble joined #salt
19:08 jaimed joined #salt
19:17 Gues480631_ joined #salt
19:17 TK_ joined #salt
19:27 Cidan joined #salt
19:28 jnials joined #salt
19:32 felskrone joined #salt
19:37 zz_Cidan joined #salt
19:38 jnials joined #salt
19:48 glyf joined #salt
19:52 denys_ joined #salt
19:53 jaimed joined #salt
19:55 balltongu joined #salt
19:56 spock joined #salt
19:57 bytemask joined #salt
19:58 jhauser joined #salt
20:00 CeBe1 joined #salt
20:03 xenoxaos joined #salt
20:17 TK_ joined #salt
20:22 AirOnSkin joined #salt
20:22 TheThing joined #salt
20:23 gildegoma joined #salt
20:24 AirOnSkin joined #salt
20:27 TheThing joined #salt
20:27 aurynn __number5__, looks like I can call refresh_pillar on a minion and it calls back to the master to do it
20:29 TheThing_ joined #salt
20:31 jnials joined #salt
20:34 douardda joined #salt
20:48 atbell joined #salt
20:50 giantlock joined #salt
20:52 bhosmer joined #salt
20:52 aqua^mac joined #salt
21:00 CeBe1 joined #salt
21:01 jnials joined #salt
21:10 tafa2 joined #salt
21:13 yorjo joined #salt
21:16 aurynn so... does the salt.utils.event python API support sending messages to the salt-master from a minion?
21:16 scristian joined #salt
21:16 aurynn obviously it must
21:16 aurynn somehow, because event.fire_master uses it
21:17 aparsons joined #salt
21:17 TK_ joined #salt
21:18 yorjo Hi, I would like to know how to upgrade a salt master? If I did a git install (2014.1), can I upgrade to 2014.7 (using git again) without losing my config?
21:30 LotR ls
21:30 LotR oops :)
21:31 jonatas_oliveira joined #salt
21:31 aquinas joined #salt
21:41 jnials joined #salt
21:44 Singularo joined #salt
21:45 Hazelesque joined #salt
21:45 igorwidl left #salt
21:56 Gues480631 joined #salt
21:58 eliasp anyone using pillar_ldap? is the name used in 'search_order' the one I assign in top.sls?
22:02 jnials joined #salt
22:04 tafa2 joined #salt
22:07 MugginsM joined #salt
22:17 TK_ joined #salt
22:21 jnials joined #salt
22:25 jeddi joined #salt
22:25 joehh VSpike: I couldn't follow the question from above - are you having trouble with requests
22:27 joehh ?
22:30 gothix joined #salt
22:32 balltongu joined #salt
22:37 xenoxaos joined #salt
22:41 aqua^mac joined #salt
22:42 DaveQB joined #salt
22:44 Hazelesque joined #salt
22:47 ggoZ joined #salt
22:49 fragamus_ joined #salt
22:53 bytemask joined #salt
22:55 xenoxaos joined #salt
22:55 zmwrskas joined #salt
22:57 balltongu joined #salt
23:06 __gotcha joined #salt
23:10 felskrone joined #salt
23:12 bfraser joined #salt
23:17 TK_ joined #salt
23:26 bfraser joined #salt
23:31 anderbubble joined #salt
23:36 izibi joined #salt
23:50 bfraser joined #salt

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