Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-07

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

All times shown according to UTC.

Time Nick Message
00:08 west575 joined #salt
00:10 guerby joined #salt
00:13 nZac joined #salt
00:16 nZac joined #salt
00:17 bantone https://i.imgur.com/fawRchq.jpg
00:19 nZac joined #salt
00:20 amcorreia joined #salt
00:23 rem5 joined #salt
00:24 yidhra_ joined #salt
00:26 om joined #salt
00:31 brianfeister joined #salt
00:32 RandyT joined #salt
00:33 edrocks_ joined #salt
00:44 mavhq joined #salt
00:47 nikogonzo if I have a pillar that has something like "bind_interface: 'eth1'", how can I tell my jinja template to grains.get using that $bind_interface ?
00:49 jerredbell joined #salt
00:50 flowstate joined #salt
00:50 edrocks_ joined #salt
00:54 akhter joined #salt
00:59 quasiben joined #salt
01:02 nikogonzo nvm, i worked it out
01:02 hemebond bantone: LOL
01:03 iceyao joined #salt
01:03 paydro_ joined #salt
01:03 hasues joined #salt
01:03 mavhq joined #salt
01:04 bantone :)
01:04 hasues left #salt
01:09 iceyao_ joined #salt
01:11 kevinquinnyo joined #salt
01:13 iceyao joined #salt
01:15 edrocks joined #salt
01:15 quasiben joined #salt
01:18 iceyao joined #salt
01:20 Bico_Fino joined #salt
01:22 catpigger joined #salt
01:27 overyander joined #salt
01:37 quasiben joined #salt
01:38 stooj joined #salt
01:46 mohae joined #salt
01:47 paydro joined #salt
01:49 flowstate joined #salt
01:49 paydro joined #salt
01:51 snc joined #salt
01:55 akhter joined #salt
01:55 lungaro joined #salt
01:55 Eureka703 joined #salt
02:03 N-Mi joined #salt
02:16 Eureka703 joined #salt
02:19 writtenoff joined #salt
02:30 antpa joined #salt
02:34 mosen joined #salt
02:38 brianfeister joined #salt
02:39 mavhq joined #salt
02:48 evle joined #salt
02:49 paydro joined #salt
02:49 flowstate joined #salt
02:52 quasiben joined #salt
02:54 antpa joined #salt
02:58 source47_ joined #salt
03:03 tharkun_ joined #salt
03:04 stooj joined #salt
03:05 debian112 left #salt
03:05 paydro_ joined #salt
03:07 leev joined #salt
03:07 N-Mi joined #salt
03:08 av_ joined #salt
03:09 iceyao joined #salt
03:10 favadi joined #salt
03:11 edrocks__ joined #salt
03:14 N-Mi joined #salt
03:14 N-Mi joined #salt
03:17 spuder joined #salt
03:20 spuder_ joined #salt
03:23 iceyao joined #salt
03:24 paydro joined #salt
03:24 phx joined #salt
03:28 nikogonzo joined #salt
03:32 iceyao joined #salt
03:34 antpa joined #salt
03:37 teryx510 joined #salt
03:38 phx joined #salt
03:38 teryx5101 joined #salt
03:42 ramteid joined #salt
03:45 Phil-Work joined #salt
03:50 flowstate joined #salt
03:52 gmoro joined #salt
03:52 kshlm joined #salt
03:52 antpa joined #salt
03:56 ageorgop joined #salt
03:58 om joined #salt
04:05 antpa joined #salt
04:06 racooper joined #salt
04:09 mavhq joined #salt
04:09 onlyanegg joined #salt
04:21 mavhq joined #salt
04:29 antpa joined #salt
04:33 brianfeister joined #salt
04:38 om joined #salt
04:39 antpa joined #salt
04:40 R0N joined #salt
04:40 auzty joined #salt
04:40 sjmh joined #salt
04:49 flowstate joined #salt
04:50 akhter joined #salt
04:51 rem5 joined #salt
04:56 nZac joined #salt
04:58 rpo joined #salt
05:04 paydro joined #salt
05:08 pwalsh joined #salt
05:09 kawa2014 joined #salt
05:13 R0N Hi guys.. I have a small problem and I have no idea how to solve this...
05:13 R0N I have 2 minions (vid-nlspl-ipab3,vid-nlspl-rcg1) if I do a test.ping to each of them I get a normal response..
05:14 R0N I have added them both to the same nodegroup (VID-CUSTOMER: 'L@vid-nlspl-ipab3,vid-nlspl-rcg1') and if I test.ping the node group one of them does not respond.. never and always the same
05:15 R0N it just says that the minion is not responding even if I set the timeout to 300 seconds..
05:15 R0N if I test.ping "*" it works just fine
05:18 qu9 joined #salt
05:25 paydro_ joined #salt
05:32 atmosx joined #salt
05:38 iceyao joined #salt
05:39 iceyao joined #salt
05:40 iceyao_ joined #salt
05:48 flowstate joined #salt
05:52 hemebond R0N: Odd. I just tested it myself and got responses from both.
05:52 hemebond Are they both on the same version?
05:52 favadi joined #salt
05:52 hemebond Have you restarted/reloaded your salt master?
05:53 R0N hemebond: yes with other nodegroups I have no problem.. just this one..
05:53 R0N I restarted (even rebooted) the master and the minion
05:54 R0N I swapped the order in the nodegroup, the same minion timed out again..
05:54 hemebond I suppose you'll need to run the master and minions with debug logging to make sure they're both actually getting the command.
05:54 hemebond Oh, the same minion each time?
05:55 hemebond Can you paste the commands and output you're using? (to paste.debian.org or something)
05:56 antpa joined #salt
05:56 R0N it's simple I try salt vid-nlspl-ipab3 test.ping
05:56 R0N that works
05:56 R0N if I do salt -N VID-CUSTOMER test.ping it fails for that one minion (vid-nlspl-ipab3)
05:58 hemebond So no typos anywhere? What if you put that minion into a group of its own?
05:59 R0N on the master debug I see : [DEBUG   ] Sending event - data = {'id': 'vid-nlspl-ipab3', '_stamp': '2016-04-07T05:57:57.337379', 'result': True, 'pub'
05:59 R0N that works
06:00 hemebond What does the failing minion say in its logs?
06:01 sauvin joined #salt
06:01 R0N [ERROR   ] Invalid compound target: ( L@vid-nlspl-ipab3,vid-nlspl-rcg1 )
06:01 R0N hmm
06:02 R0N [WARNING ] /usr/lib/python2.7/dist-packages/salt/minion.py:594: DeprecationWarning: Master pub message signing is disabled but we received a signature for this message
06:03 R0N and if I do salt vid-nlspl-ipab3 test.ping it just response with True
06:03 R0N no errors in the log
06:04 beardedeagle joined #salt
06:05 ivanjaros joined #salt
06:05 R0N the difference between the 2 minions is that vid-nlspl-ipab3 is Ubuntu 14.04 and the other is CentOS 6
06:06 R0N the master is also CentOS
06:06 R0N but I have also more other minions with Ubuntu that do not show this behavier
06:06 colttt joined #salt
06:06 cberndt joined #salt
06:08 hemebond What if you do
06:08 hemebond salt 'L@vid-nlspl-ipab3' test.ping
06:08 R0N craeted a test group VID-TEST: 'L@vid-nlspl-ipab3'
06:09 R0N same error as with the other group..
06:09 R0N ok I try salt 'L@vid-nlspl-ipab3' test.ping\
06:10 R0N ok then I get an error on the master: No minions matched the target. No command was sent, no jid was assigned.
06:10 R0N on the minion I get:[ERROR   ] Invalid compound target: ( L@vid-nlspl-ipab3 )
06:10 hemebond How are you setting the minion ID? Config file or is it just using the hostname?
06:11 R0N oh hold on that could be from the previous test..
06:11 hemebond Hmm.
06:11 R0N I try again
06:11 R0N the error on the master is the same but the minion says nothing
06:12 slav0nic joined #salt
06:13 R0N I also did remove the minion key and add it again
06:14 R0N I just use the hostname
06:14 R0N it is resolving and otherwise a direct test.ping should not work..
06:15 illern joined #salt
06:15 paydro joined #salt
06:16 impi joined #salt
06:17 JohnnyRun joined #salt
06:21 Rumbles joined #salt
06:21 jhauser joined #salt
06:21 brianfeister joined #salt
06:23 colttt joined #salt
06:26 Furao joined #salt
06:28 felskrone joined #salt
06:28 punkoivan joined #salt
06:30 ravenx joined #salt
06:30 alvinstarr joined #salt
06:30 ravenx has anyone got this error before:  [WARNING ] Key 'file_ignore_glob' with value None has an invalid type of NoneType, a list is required for this value
06:30 ravenx it is from running 'salt -L 'server,server2' state.highstate
06:31 beardedeagle have you tried issuing salt -C 'L@vid-nlspl-ipab3' test.ping ? don't know if the -C flag will help but worth a try
06:31 beardedeagle @R0N: ^
06:31 beardedeagle ravenx: I believe that is a setting in the master config
06:32 ravenx beardedeagle: my master is very sprase
06:32 ravenx sparse*
06:32 ravenx not a lot has been added to it
06:32 ravenx just the master hostname and the file_roots, really.
06:34 ravenx nvm, this fixed it:
06:34 ravenx https://github.com/saltstack/salt/issues/32173
06:34 saltstackbot [#32173]title: v2015.8.8 regression "[WARNING ] Key file_ignore_regex with ...a <type 'list'> is required..." | ### Description of Issue/Question...
06:37 punkoivan left #salt
06:40 Ron11 joined #salt
06:41 Ron11 HI, I download the packages to /salt/srv/debs
06:42 Ron11 How can I tell salt to use it
06:42 eseyman joined #salt
06:42 Ron11 http://paste.debian.net/425627/
06:44 brianfeister joined #salt
06:46 ivanjaros joined #salt
06:48 flowstate joined #salt
06:49 pwalsh joined #salt
06:55 source47 joined #salt
06:56 KermitTheFragger joined #salt
06:58 Ron11 Guys, Can you help me please? http://paste.debian.net/425630/
06:58 Ron11 I write the steps I did
06:58 Ron11 Why it does not work?
06:58 hemebond Have you actually setup an APT repo?
06:58 hemebond Oh, you're just using the file.
06:59 hemebond Wait, you can use salt:// with to install debs?
07:00 Ron11 thank you hembond
07:00 Ron11 I don't understand the question
07:00 Ron11 I copy the download package
07:00 hemebond Ron11: Well, you can't just point to salt:// and have APT install a deb. You have to setup an APT repo.
07:00 Ron11 to /srv/salt/debs
07:00 hemebond APT won't just fetch files from anywhere.
07:01 Ron11 Oh
07:01 Ron11 How can I setup APT
07:01 Ron11 repo
07:01 Ron11 What is the steps I should do?
07:01 hemebond That's one for Google I'm afraid. It's a Debian/Ubuntu thing.
07:01 Ron11 I download the packages
07:01 hemebond Other the other hand if you just want to transfer a .deb file to the minion and install it, you can just use salt://, but you can't use pkg.installed.
07:01 Ron11 apt-get download <packagename<
07:02 hemebond Aha
07:02 Ron11 The problem that I have that I can't install a minion on the remote because it use only ssh
07:03 Ron11 and not connected to the internet
07:03 hemebond You can use the sources
07:03 Ron11 How can I do it?
07:03 hemebond pkg.installed has a sources argument.
07:03 Ron11 Yes
07:03 hemebond https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed
07:03 Ron11 I add the fromrepo
07:03 hemebond Use sources to specify the salt:// path to your
07:04 hemebond Not fromrepo, you have no repo.
07:04 hemebond You just have a file on your master.
07:04 Ron11 Can you please write me in my example what I need to write
07:04 hemebond - sources: lets you specify the actual deb file and can use the salt:// protocol.
07:05 Ron11 I can figure it out
07:05 Rumbles joined #salt
07:05 Ron11 instead fromrepo
07:05 Ron11 to use sources?
07:05 hemebond There is an example right there is the documentation I linked to.
07:06 Ron11 Thank you
07:07 Ron11 it means
07:07 Ron11 In my example
07:07 Ron11 I need to add
07:07 Ron11 these lines
07:07 Ron11 ?
07:07 paydro joined #salt
07:08 Ron11 - plugin: salt://debs/plugin.deb
07:08 Ron11 ?
07:08 Ron11 before it to write sources?
07:08 hemebond There is no "plugin" argument for pkg.installed. It's "sources".
07:08 garphy joined #salt
07:08 Ron11 yes
07:08 Ron11 under sources:
07:09 Ron11 - plugin: salt://debs/plugin.deb
07:09 impi joined #salt
07:09 source47 joined #salt
07:09 hemebond Oh I see. Yes, the name of the package.
07:10 averell joined #salt
07:12 ravenx has anyone ever gotten this after a highstate:
07:12 ravenx ERROR: Minions returned with non-zero exit code
07:12 ravenx all my states are green and evrything works the way it should
07:12 ravenx it just keeps ending my calls like that.
07:12 ravenx o_O
07:13 R0N hemebond: I found what the problem was in my case.. so stupid.. on my ubuntu repository the version of salt-minion was an old one.. I updated that and updated the minion on my server and now it is working..
07:17 Ron11 I have an error
07:17 Ron11 http://paste.debian.net/425644/
07:17 Ron11 I write each steps that you can see the files, directory and what I changed
07:19 Ron11 What can I do?
07:23 Ron11 hemebond?
07:23 hemebond R0N: Good ti hear :-)
07:23 hemebond Ron11: The package name will be "nagios-plugins" not "nagios.plugins"
07:23 hemebond I think
07:24 Ron11 I changed try and same error
07:25 hemebond Unless you're using a template (which you seem to be) and then you should have " - {{ nagios.plugins }}: salt://..."
07:26 Ron11 What I need to do?
07:26 Ron11 ls
07:27 hemebond Possibly http://paste.debian.net/425657/
07:27 Ron11 I using the nagios-formula that I download from the git
07:27 hemebond Will that formula not be trying to download from the internet?
07:28 Ron11 I think it does
07:28 Ron11 I want to change to take from my repository
07:28 Ron11 in sources
07:29 hemebond Well I don't know how you will do that but what I just linked to is how you'd need to install the deb otherwise.
07:30 dariusjs joined #salt
07:30 Ron11 ok
07:30 Ron11 Maybe you have another solution
07:30 Ron11 my goal is to install nagios agent on computer which does not have internet
07:30 Ron11 I thought salt-ssh which have all the ability of salt can do it
07:30 hemebond Well you don't need the formula to install the deb files.
07:31 hemebond What I just linked to is an example of how to do it.
07:31 Ron11 yes I know
07:31 hemebond Untested of course since I've never used that method.
07:31 pwalsh joined #salt
07:31 AndreasLutro is there some shortcut way to prevent __opts__ not being defined in every salt module when using them outside of salt?
07:31 hemebond salt-ssh is a different way of managing a minion.
07:32 hemebond It allows you to manage it without installing an agent.
07:32 hemebond If you just want to install the deb and this is not a fully managed machine then just use the pkg execution module.
07:33 Ron11 Can I do it somehow with salt?
07:33 Ron11 or salt-ssh?
07:33 hemebond With both.
07:33 hemebond Have you actually tried what I linked to?
07:34 Ron11 Do you mean http://paste.debian.net/425657/ ?
07:34 hemebond Yes
07:34 Ron11 yes
07:34 Ron11 I changed the file
07:34 Ron11 I cat it and show you
07:35 Ron11 http://paste.debian.net/425669/
07:35 Ron11 I get the same error
07:35 antpa joined #salt
07:36 hemebond What is "nagios.plugins" ?
07:37 hemebond Oh it just resolves to "nagios-plugins"
07:37 Ron11 I changed it as you told me
07:37 spuder joined #salt
07:37 Ron11 you can see in the previous link
07:37 Ron11 http://paste.debian.net/425669/
07:37 hemebond yip
07:38 Ron11 :wq
07:38 Ron11 How can I know which package salt nagios.plugin takes from the internet?
07:39 Ron11 I want to make sure
07:39 hemebond It's called "nagios-plugins"
07:39 Ron11 There must be a defention in the formula some where
07:40 hemebond Yes, it's in map.jinja
07:40 Ron11 that define the link to
07:40 hemebond No, there's no link. It will check the Ubuntu repositories.
07:40 hemebond It will look in the Ubuntu repositories for "nagios-plugins" and download and install that package.
07:41 Ron11 but How can the formula knows what is the right packages name
07:41 Ron11 ?
07:42 Ron11 so
07:42 Ron11 If I changed the plugins.sls
07:42 hemebond I'm writing an sls to test.
07:42 Ron11 wait
07:42 Ron11 maybe I need to changed something else?
07:43 hemebond Not sure. I've never used this method or the nagios formula.
07:43 hemebond It's getting something it doesn't like.
07:43 hemebond But I can't tell what.
07:44 Ron11 If you have another idea
07:44 Ron11 How can I install nagios agent
07:44 Ron11 with salt, or salt-ssh
07:44 Ron11 I will be thankful
07:44 hemebond Is it a one-off install?
07:45 Ron11 yes, I need to install only once
07:46 Ron11 This computer hasn't any internet connection
07:46 Ron11 To install nagios-agent on it, its problem
07:46 hemebond Is there a reason to not scp the .deb to the server and install it manually with dpkg -i ?
07:46 Ron11 because of this, I thought salt is the best solution
07:46 hemebond Well it could be an easier solution.
07:47 hemebond But I can't see your setup and I've not used this before.
07:47 Ron11 ammm
07:47 Edur joined #salt
07:47 Ron11 Can I do it also in Redhat 6?
07:47 hemebond What do you mean?
07:47 Ron11 download only and install
07:47 Ron11 not from the internet?
07:48 hemebond With an RPM? I believe so. The example in the documentation uses RPMs.
07:48 flowstate joined #salt
07:49 josuebrunel joined #salt
07:49 Ron11 The porblem
07:49 Ron11 That I need to managed all the packges
07:49 Ron11 In salt, salt will take care of it
07:50 hemebond Okay well I have a test sls now and getting the same error so I'll let you know how I get on.
07:50 Ron11 :)
07:50 Ron11 Thank you very much
07:50 hemebond np
07:55 iggy salt really assumes that servers can do normal things (like install packages)
07:55 JohnnyRun joined #salt
07:57 Rumbles joined #salt
08:00 hemebond The my pkg_params list contains False and that's it. That's why there's an error thrown, it's not getting the list of packages.
08:00 hemebond (which I could see in the error but nice to confirm)
08:02 keimlink joined #salt
08:02 ronnix joined #salt
08:06 felskrone1 joined #salt
08:06 felskrone joined #salt
08:07 hemebond pkg.install fails too with the same error.
08:08 hemebond Even using the example in the docstring.
08:08 lero joined #salt
08:09 kawa2014 joined #salt
08:11 Ron11 What we can do?
08:11 hemebond I'm debugging it now
08:12 Ron11 great
08:12 Ron11 How can I do it my self, I want to know
08:12 ravenx has anyone ever gotten this after a highstate:
08:12 ravenx ERROR: Minions returned with non-zero exit code
08:12 ravenx it just keeps ending my calls like that.
08:12 hemebond Oh wait... I might be missing something here.
08:12 ravenx even though everything is good
08:12 ronnix joined #salt
08:12 hemebond Oh, it works.
08:13 hemebond Ron11: Do you have environments configured?
08:13 hemebond Do you have a salt master?
08:13 Ron11 yes
08:14 Ron11 yes
08:14 Ron11 of course
08:14 hemebond So in which environment did you put the deb file?
08:14 Ron11 in the master
08:14 hemebond In which environment?
08:14 hemebond Which directory?
08:14 hemebond I need to see your file_roots value.
08:15 Ron11 do you mean
08:15 Ron11 cat /etc/salt/master?
08:15 hemebond The file_roots from that file, yes.
08:15 hemebond You're getting this error because it can't find the file.
08:16 hemebond Oh wait. I had specified the saltenv earlier...
08:16 hemebond So it worked manually when using pkg.install but not from a state file.
08:17 impi joined #salt
08:17 Ron11 How do you run it manually without
08:17 s_kunk joined #salt
08:17 hemebond salt 'myminion' pkg.install sources='[{"topbeat": "salt://debs/topbeat_1.2.0_amd64.deb"}]' saltenv=myenv
08:18 hemebond That'
08:18 hemebond That is how I just installed topbeat from the master.
08:18 Ron11 I will try
08:18 Ron11 in my /etc/salt/master
08:18 Ron11 under file root
08:18 Ron11 I have two
08:18 hemebond It's not using or applying a state, but using the execution module directly.
08:19 Ron11 saltenv=myenv ?
08:19 hemebond Because I put the file into myenv instead of the base environment I had to specify that.
08:19 hemebond Without it I got the same error you did because it couldn't find the file.
08:19 Ron11 oh
08:19 hemebond That's why I'm interested to see what your file_roots is.
08:20 Ron11 file_roots:
08:20 Ron11 base:
08:20 Ron11 - /srv/formulas/nagios-formula
08:20 Ron11 - /srv/salt/
08:20 source47 joined #salt
08:21 hemebond And where is the deb? What is the full path?
08:21 hemebond /srv/salt/debs/blah.deb?
08:21 Ron11 yes
08:23 Ron11 I just send you the output
08:24 Ron11 http://paste.debian.net/425698/
08:28 hemebond Did you try that pkg.install line?
08:28 Ron11 Yes I try now
08:28 Ron11 I will copy and paste the output
08:29 Ron11 http://paste.debian.net/425700/
08:29 hemebond You missed the debs in your salt:// path
08:30 babilen Ron11: You *do NOT* use "fromrepo: salt://debs", but "- sources: - nagios-plugins: salt://debs/nagios-plugins-$VERSION.deb"
08:30 Ron11 http://paste.debian.net/425701/
08:31 hemebond salt-ssh does use the master, right?
08:31 hemebond I've never used it, so...
08:31 Ron11 yes
08:31 babilen (well, rpm if I remember correctly)
08:31 JohnnyRun joined #salt
08:31 hemebond babilen: Yeap, it even errors with sources
08:31 babilen How?
08:31 hemebond Unless you use pkg.install instead of a state file.
08:32 hemebond It can't find the file.
08:32 babilen I am happily using pkg.installed with sources:
08:32 dyasny joined #salt
08:32 hemebond Which version?
08:32 hemebond Can you show us your state?
08:32 babilen It is probably some RPM insanity that requires the architecture in the package name ;)
08:33 hemebond Okay I suck, I had "deb" instead of "debs".
08:33 dmaiocchi joined #salt
08:33 hemebond The directory is called "debs".
08:33 babilen I have "install_foo: pkg.installed: - name: foo - sources: - foo: salt://debs/foo_$VERSION.deb"
08:33 hemebond So it all works for me.
08:33 babilen You could also call it local_pkgs or local_repo or whatnot.
08:33 hemebond But I don't use salt-ssh.
08:34 hemebond How does salt-ssh work?
08:34 spuder_ joined #salt
08:34 babilen Much like a master
08:34 hemebond Okay.
08:35 hemebond Ron11: Can you paste your console with your salt-ssh command and all the output?
08:35 Ron11 yes of course
08:35 hemebond Also can you ls -lh the /srv/salt/debs/ directory?
08:35 babilen Ron11: Could you paste the content of /srv/salt/debs, your state and its output please?
08:35 babilen heh
08:35 icanblink joined #salt
08:35 Ron11 http://paste.debian.net/425702/
08:36 Ron11 I tried salt-ssh -i testme1 state.apply nagios.plugins
08:36 Ron11 and also
08:36 babilen Ron11: Okay, include your state and the output of salt-ssh (and command) when you run it.
08:36 MadHatter42 joined #salt
08:37 babilen icanblink: Time travel to 2016 and use recent version of the bootstrap script?
08:37 paydro joined #salt
08:38 Ron11 I am waiting for the output
08:38 babilen icanblink: To do what?
08:39 akhter joined #salt
08:40 babilen icanblink: I don't quite follow. You seem to be running into $SOME_PROBLEM and my impression is that you think that https://irclog.perlgeek.de/salt/2014-05-12#i_8714548 is somewhat related. Why not start at the beginning?
08:40 Ron11 and for babilen I change as hemebond said to me
08:40 Ron11 http://paste.debian.net/425713/
08:40 mavhq joined #salt
08:40 cyborg-one joined #salt
08:41 Ron11 here is the output : http://paste.debian.net/425714/
08:41 babilen Ron11: What happens if you log into that box and run "apt-get update" ?
08:42 hemebond babilen: It has no internet access.
08:42 babilen icanblink: Which problem is that?
08:42 Ron11 Yes, I have internet access only in the master
08:42 Ron11 in the remote I don't have
08:42 hemebond babilen: This should work, correct? http://paste.debian.net/425701/
08:42 babilen hemebond: "Resource temporarily unavailable" - "E: Unable to lock directory /var/lib/apt/lists/" has little to do with it.
08:42 hemebond I can do it with my master and minion.
08:43 babilen Ron11: Well, upload the .deb to the minion and install it with "dpkg -i nagios-plugins_1.5-3ubuntu1_all.deb" and paste the output of that
08:43 Ron11 babilen, The problem is
08:44 Ron11 I want to use salt to install it
08:44 babilen icanblink: So, why don't you stop overriding those options in your Vagrantfile?
08:44 Ron11 because it will install the packges simplicty
08:44 babilen Ron11: Would you still be willing to test it?
08:44 babilen I mean, just for gathering information
08:44 Ron11 I need to upload manullay
08:45 Ron11 the packges then to run
08:45 Ron11 ok
08:45 Ron11 I will test it
08:45 Ron11 but, in the case of ubuntu is simple
08:45 Ron11 in the case of centos is complicated
08:45 Ron11 many steps
08:45 Ron11 and many rpm
08:45 Ron11 in ubuntu I have only two debs
08:46 babilen One thing at a time
08:46 Ron11 ok
08:46 Ron11 I will check it
08:47 Ron11 can I upload to the minion
08:47 Ron11 via salt-ssh?
08:47 saltstackbot [#5973]title: Salt provisioner fails to upload minion config | Ran into a problem in 1.7.3 doing a vagrant up using a trusty64 box with a salt provisioner specifying a custom minion_config. This is the error:...
08:48 flowstate joined #salt
08:48 babilen icanblink: I am well aware of that issue, but it has been solved
08:48 babilen (and I assumed that you had that in your config because of it. We all suffered way too long because of it -- just read my comments in that bug report)
08:49 babilen It is indeed
08:49 babilen Which is why I suggested that you stop overriding the bootstrap options earlier.
08:50 iceyao joined #salt
08:50 babilen np
08:50 JohnnyRun joined #salt
08:50 mavhq joined #salt
08:51 ronnix joined #salt
08:51 iceyao joined #salt
08:53 iceyao joined #salt
08:54 Ron11 output
08:54 Ron11 from the remote
08:54 Ron11 http://paste.debian.net/425715/
08:56 Ron11 babilen
08:58 Ron11 homebond
08:58 Ron11 hemebond
08:59 spuder joined #salt
08:59 iceyao_ joined #salt
08:59 Ron11 Maybe you can try it,
08:59 Ron11 git clone https://github.com/saltstack-formulas/nagios-formula
08:59 Ron11 and run
08:59 dariusjs_ joined #salt
09:00 Ron11 salt-ssh -i testme1 state.apply nagios.plugins
09:02 Ron11 I try also what hemebond told me
09:02 Ron11 Here it is
09:03 Ron11 http://paste.debian.net/425718/
09:06 illern joined #salt
09:06 Hydrosine joined #salt
09:08 josuebrunel joined #salt
09:08 spuder joined #salt
09:08 babilen icanblink: You can
09:08 babilen (if you want that)
09:09 babilen Ron11: "Unable to import msgpack or msgpack_pure python modules"
09:09 Ron11 What is it?
09:09 babilen ... should be in the salt thin client, but try installing it on the minion
09:10 babilen python-msgpack that is
09:10 Ron11 I remind you that I don't have
09:10 Ron11 any internet in the remote
09:11 Ron11 I have only a ssh to the remote, because of this I am using salt-ssh
09:11 spuder_ joined #salt
09:11 babilen Ron11: You can still log in and install packages you upload. You might have to do a "dpkg --purge nagios-plugins" if the packaging system is still unhappy after your earlier "dpkg -i" -- And you obviusly have to install *all* depenendencies *before* you install that.
09:12 babilen (both manually or in your state)
09:12 Hydrosine joined #salt
09:13 Ron11 I think on a simple solution
09:14 Ron11 Maybe I can refer apt-get
09:14 Ron11 to download from my repository instead of the internet?
09:14 illern joined #salt
09:15 zerthimon joined #salt
09:17 spuder joined #salt
09:18 fredvd joined #salt
09:26 iceyao joined #salt
09:28 paydro joined #salt
09:28 whitenoise joined #salt
09:34 babilen Which repository?
09:38 mavhq joined #salt
09:40 xmj Ron11: pkgrepo.managed is your friend
09:40 xmj you can do something like:
09:41 xmj - name: deb http://box.on.the.intranet/path/to/repo/
09:41 xmj - file: /etc/apt/sources.list.d/repo.name
09:41 xmj hm, maybe repo.name.list
09:41 xmj if you have such a repository in box.on.the.intranet, that is
09:42 hemebond There is no repo.
09:47 Rumbles_ joined #salt
09:48 josuebrunel joined #salt
09:49 xmj I thought Ron11 had said that he has a repo.
09:49 Rumbles joined #salt
09:49 xmj If he does, those are not-wrong steps. :)
09:50 Ron11 I can download all the packages
09:50 Ron11 from the internet with apt-get download
09:50 Ron11 Then what I need to do?
09:50 xmj hemebond: I'll see myself out.
09:50 elsmo joined #salt
09:51 N-Mi joined #salt
09:54 Ron11 why?
09:54 Ron11 xmj
09:55 iceyao_ joined #salt
09:56 hemebond xmj: It's not a repo, Ron11 is just putting the deb files into the salt state directory.
09:56 iceyao joined #salt
09:57 xmj oh.. didn't we have that the other day already
09:57 xmj ah.. backlog helps
09:58 Ron11 We already did it
09:58 Ron11 hemebond
09:58 hemebond Did what?
09:59 Ron11 I downloaded the
09:59 Ron11 packages of nagios-plugin
09:59 mavhq joined #salt
09:59 Ron11 deb packages
09:59 Ron11 xmj you missed all the discussion from the morning
10:00 hemebond Ron11: Downloaded them to where? The minion?
10:00 Ron11 yes, maybe I can change the location
10:01 Ron11 from the salt-master
10:01 xmj you've been going at it for three and a half hours, hehe
10:01 Ron11 that the minion will download
10:01 Ron11 You can LOL but I am working hard of it
10:01 Ron11 If you can help please help, otherwise
10:02 hemebond Maybe I'll try and setup salt-ssh to test.
10:02 Ron11 if you can I will be great
10:02 dmaiocchi joined #salt
10:02 Ron11 you can use git clone https://github.com/saltstack-formulas/nagios-formula
10:02 Ron11 as I did
10:03 yidhra_ joined #salt
10:04 hemebond Looks like I already have it setup for a VM.
10:04 iceyao joined #salt
10:05 Ron11 great
10:06 babilen Ron11: You have to install all dependencies beforehand. You can't install nagios-plugins without having installed all of them, so you have to define suitable requisites between those states.
10:06 hemebond Okay I just used salt-ssh to install topbeat via a .deb on my master.
10:06 babilen In the end you'll end up with a package collection in salt://debs/ and you have to install them in the right order.
10:07 hemebond But I do already have the minion (though stopped) installed on the VM.
10:07 iceyao joined #salt
10:09 hemebond babilen: The error Ron11 is getting seems to suggest it can't find the .deb file.
10:10 hemebond Maybe it would be good to test with a very minimal setup.
10:11 hemebond Remove the nagios formula from the file_roots.
10:11 Ron11 o.k
10:11 Ron11 then I need to restart salt-master?
10:11 hemebond Create a new state file in /srv/salt/ that just has the basic pkg.installed with a single sources entry.
10:11 hemebond Yes you do.
10:12 babilen Ron11: You shouldn't have a salt-master, this is about salt-ssh
10:12 hemebond That's why I just symlink from my state directory to the formulas.
10:12 babilen (well, you don't need it)
10:12 hemebond Wait, what?
10:13 hemebond Does salt-ssh use the master stuff at all?
10:13 realitysandwich joined #salt
10:13 babilen salt-ssh uses some configuration files and some of the salt-master code, but is independent. You don't run a salt-master on your box if all you want is to use salt-ssh.
10:13 hemebond But it will read /etc/salt/master and setup the file_roots ?
10:13 Ron11 but if I am using the manually command?
10:13 realitysandwich any one around that might be able to help me out with a salt-api problem? Have some issue with SSL and the version number
10:14 babilen In fact I'd recommend to configure salt-ssh in a Saltfile + cwd/config and not in /etc/salt/master, but that shouldn't really influence the problem at hand (you can still rely on it being run as root and being configured in /etc)
10:14 babilen hemebond: It will, yeah
10:14 yidhra__ joined #salt
10:15 babilen Sorry .. maybe I shouldn't have mentioned it (as it just adds confusion), but you won't have to restart the salt-master to get changes into salt-ssh.
10:15 ronnix joined #salt
10:15 illern joined #salt
10:15 hemebond Gotcha. Good to know.
10:16 Ron11 Then what I should do?
10:17 hemebond What is in your testing.sls file?
10:17 hemebond Oh, have you created a testing.sls file?
10:17 Ron11 as in pluging.sls that I send you
10:17 Ron11 I will send again
10:18 Ron11 wait
10:18 Ron11 Do you mean I need to create
10:18 Ron11 another state file?
10:18 hemebond Yes, create a new file.
10:18 Ron11 Then what?
10:18 hemebond /srv/salt/test.sls
10:18 Ron11 What to write in it
10:18 hemebond Something like http://paste.debian.net/425762/
10:18 hemebond But replace bits with your own deb file stuff.
10:19 Ron11 yes of course
10:19 Ron11 Thank you
10:19 Ron11 I will try it
10:20 babilen I would also *strongly* suggest to install a .deb that doesn't have any dependencies that need to be satisfied.
10:21 hemebond That too.
10:21 Ron11 No matching sls found for 'test.sls' in env 'base'
10:21 Ron11 salt-ssh -i testme1 state.apply test.sls
10:21 mavhq joined #salt
10:21 cberndt joined #salt
10:21 hemebond Did you create /srv/salt/test.sls ?
10:21 hemebond ah
10:21 Ron11 yes
10:22 Ron11 No matching sls found for 'test.sls' in env 'base'
10:22 hemebond not test.sls, just test in the command
10:22 hemebond salt-ssh testme1 state.apply test
10:22 Ron11 yes sorry
10:22 hemebond ( I don't know what -i does)
10:22 babilen (And please paste the contents of that file)
10:22 babilen hemebond: It automatically accepts the host key
10:22 Ron11 ok
10:23 babilen (or rather: ignores them)
10:23 paydro_ joined #salt
10:24 hemebond Ah
10:25 babilen Ron11: Just out of curiosity: Where are you from?
10:25 iceyao joined #salt
10:26 Ron11 I run the command
10:26 hemebond Ron11: Do you also have the nagios-plugins-basic and nagios-plugins-standard deb files?
10:27 remyd1 joined #salt
10:27 hemebond Also did you ever transfer the deb and try to install it manually as previously suggested?
10:28 Ron11 yes
10:28 Ron11 it does not work
10:28 Ron11 I send here the output
10:28 akhter joined #salt
10:28 Ron11 nagios-plugins-basic I don't have
10:28 babilen You want to try with a .deb that you can install without problems by running "dpkg -i the.deb"
10:28 hemebond Installing the package manually fails too?
10:29 hemebond Depends: nagios-plugins-basic, nagios-plugins-standard
10:29 babilen hemebond: It does because of dependencies (which is why nagios-plugins is not a good one to start with)
10:29 hemebond You will have to have those too.
10:29 hemebond babilen: Sure. There's no problem with that state or the command as I've tested both.
10:29 babilen Or make sure that the dependencies (and *their* dependencies) are installed first.
10:29 hemebond So the issue is with this deb.
10:29 Ron11 in this document
10:29 Ron11 http://tecadmin.net/install-nrpe-on-ubuntu/#
10:29 Ron11 I run it on client with internet connection and it works
10:30 babilen sure, that is because it can download the dependencies
10:30 babilen So ... time for lunch
10:30 Ron11 same error in test
10:30 hemebond For my servers (VMs) that can't directly access the internet I setup an apt-cache server.
10:31 hemebond Ron11: Yes, you MUST have the dependencies.
10:31 Ron11 http://paste.debian.net/425774/
10:31 babilen *BEFOREHAND*
10:31 hemebond So you need to download those two dependencies I listed and add them to the state file.
10:31 hemebond (or install them manually but we might as well do it all through salt)
10:31 Ron11 maybe I can change somehow
10:31 Ron11 the location of the apt-get of the remote
10:32 Ron11 to goto to a nfs location in my netwokr
10:32 Ron11 network
10:32 hemebond Ron11: The easier method is to have an apt-cache server that your no-internet servers request packages through.
10:32 Ron11 as I wrote
10:32 hemebond Ron11: An APT repo is more than just the debs, you have to have a web server configured and sign the packages.
10:33 Ron11 http://askubuntu.com/questions/170348/how-to-make-my-own-local-repository
10:33 Ron11 I try this
10:33 Ron11 but somehow it does not work
10:33 Ron11 I do all the stepf
10:33 Ron11 steps
10:33 Ron11 did
10:34 hemebond Did you have all the deb files?
10:34 hemebond Depends: nagios-plugins-basic, nagios-plugins-standard
10:34 hemebond You have to also have those two packages.
10:34 hemebond Because nagios-plugins will not install without them.
10:37 Salty joined #salt
10:37 Salty how do i make salt format a disk with ext4?
10:41 cyborg-one joined #salt
10:45 Salty How can i make salt format a disk?
10:46 hemebond Salty: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.parted.html#salt.modules.parted.mkfs ?
10:58 Salty Thanks but that didn't help.
10:59 Salty Its a little more complicated actually:
10:59 Salty Im using AWS autoscaling group and each machine is created with a new disk. i need salt to auto format it (using sls) and mount it.
11:01 AndreasLutro sounds like a job for cloud-init
11:04 antpa joined #salt
11:09 amcorreia joined #salt
11:18 iceyao joined #salt
11:19 iceyao joined #salt
11:23 Salty Im using AWS autoscaling group and each machine is created with a new disk. i need salt to auto format it (using sls) and mount it - someone has an idea?
11:27 antpa joined #salt
11:27 evle1 joined #salt
11:30 source47 joined #salt
11:31 ronnix joined #salt
11:32 source47 joined #salt
11:37 paydro joined #salt
11:40 dmaiocchi joined #salt
11:44 josuebrunel joined #salt
11:45 remyd1 Hi. I have a strange behaviour with a script which hangs undefinetly. Launch locally, it works fine, but if I use cmd.script it does not.
11:45 remyd1 my state http://paste.debian.net/425818/
11:46 remyd1 and my script http://paste.debian.net/425819/
11:46 remyd1 I am stuck on "strings /dev/urandom"
11:46 josuebrunel joined #salt
11:46 Muchoz joined #salt
11:50 remyd1 There was an error with argument in my cmd.script but I still get the previous issue
11:52 icanblink left #salt
11:53 remyd1 Salty: I just came through a similar issue. I created state for the 'mount' part but I had to create a shell script to format the disks, because I do not know what I will have as disks on my host. Moreover I needed to create a zpool/zfs partition.
11:54 remyd1 my shell script : http://paste.debian.net/425834/
11:54 remyd1 Salty: all other needed stuffs are salt states
11:57 remyd1 Salty: in fact, I did not find any function/module to detect all the disks, when these are not already formatted
11:58 quasiben joined #salt
11:59 remyd1 Salty: you would have to create a module which return the output in json of "fdisk -l" or something like that
12:00 skr joined #salt
12:03 favadi joined #salt
12:04 sfxandy joined #salt
12:06 sfxandy_ joined #salt
12:07 sfxandy_ question:  I know you can use state.show_sls to preview how a Jinja-templated SLS file would effectively render.  but is there a similar method of previewing how a Jinja-templated managed file would be rendered?
12:08 remyd1 salt-call pillar.items --ou=json
12:09 babilen sfxandy_: cp.get_template
12:09 * sfxandy_ looks up cp.get_template
12:10 remyd1 babilen: any idea on my problem about "strings /dev/urandom" ?
12:10 babilen What?
12:10 babilen Why would you do that?
12:11 remyd1 I need to set a password when I create a user
12:11 remyd1 it is a random one
12:11 babilen remyd1: https://docs.saltstack.com/en/develop/ref/sdb/all/salt.sdb.vault.html
12:11 remyd1 I know I can set a hash in user.present, but I need to generate one
12:11 catpig joined #salt
12:11 babilen (or call pwgen)
12:13 sfxandy_ hmmm babilen, all that gave me was the static components of the file.  nothing within Jinja was rendered
12:13 remyd1 pwgen seems to be what I need
12:20 babilen sfxandy_: Could you call both get_file_str and get_template and show me that? Works fine here (on 2015.5.* though)
12:20 stn_ joined #salt
12:21 Rumbles joined #salt
12:23 losh joined #salt
12:23 sfxandy_ hmmm, its on my works laptop which is helpfully behind a North Korean firewall!!
12:27 sfxandy_ babilen, ok its on this gist.....
12:28 sfxandy_ https://gist.github.com/anonymous/92855045225c75d10a8af65439aa0932
12:28 babilen Looks as if it rendered
12:29 babilen And now you want pillar data in there .. don't you?
12:29 sfxandy_ yes, which is what i thought get_template would do...
12:30 ravenx can anyone help me with a stratnge salt error
12:30 babilen Well .. as you can see: That's not the case. :(
12:30 ravenx has anyone ever gotten this after a highstate:
12:30 ravenx ERROR: Minions returned with non-zero exit code
12:30 sfxandy_ lol indeed babilen!!
12:30 babilen sfxandy_: Glad to be of service ;)
12:30 sfxandy_ ravenx, yeah get that from time to time when states have failed to execute
12:31 ravenx sfxandy_: all my states have executely fine though
12:31 sfxandy_ so babilen on your set up, does the get_template call actually render Pillar data in the file?
12:31 ravenx sfxandy_: it's called green with 0 failures.
12:31 source47 joined #salt
12:31 sfxandy_ check the job output, see what that reports
12:32 ravenx how do you check the job output
12:32 ravenx is it just the text that comes wiht a highstate?
12:33 sfxandy_ salt-run jobs.lookup_jid <job_id>
12:33 sfxandy_ theres a bit more to it
12:33 ravenx where do i find the job id?
12:34 flowstate joined #salt
12:34 sfxandy_ try the highstate again and run a salt-run jobs.active whilst its chrining away .... that gives the job id
12:34 sfxandy_ churning*
12:34 mavhq joined #salt
12:35 babilen sfxandy_: No, it doesn't
12:35 sfxandy_ babilen, so what use is get_template?
12:35 babilen Always asking the hard questions
12:35 sfxandy_ the only way to learn!!
12:35 illern joined #salt
12:36 sfxandy_ the documentation states "... renders a file as a template before setting it down".  which could be interpreted many different ways
12:39 paydro joined #salt
12:41 ravenx any easy way to fix this:  [WARNING ] Although 'dmidecode' was found in path, the current user cannot execute it. Grains output might not be accurate
12:45 rem5 joined #salt
12:46 source47 joined #salt
12:46 teatime 22http://i.imgur.com/6K0iMQm.png
12:52 akhter joined #salt
12:55 ronnix joined #salt
12:57 flowstate joined #salt
12:57 arnaud joined #salt
12:57 flowstate joined #salt
12:58 arnaud hi there! I'm new to salt and have to learn fast. Any other good resources when i'm done with the official one?
12:58 teatime personal experimentation
12:59 XenophonF arnaud: https://github.com/saltstack-formulas, which has a lot of good examples of what to do, and what not to do ;)
12:59 arnaud great, thx XenophonF
12:59 XenophonF arnaud: i've also published my personal state repo at https://github.com/irtnog/salt-states
13:00 XenophonF arnaud: together with a sample pillar repo at https://github.com/irtnog/salt-pillar-example
13:01 XenophonF arnaud: and if you want to get a feel for using/extending salt to different platforms/services, check out my formulas for Active Directory, OpenStack, and Shibboleth (all works in progress)
13:01 XenophonF although at this point i think that writing your own OpenStack formula is a rite of passage---everyone seems to have one of their own
13:01 i90rr joined #salt
13:02 arnaud yup I will start with something simple then dig into this advandced example
13:03 XenophonF lots of other people publish their configuration stuff
13:03 XenophonF I found Ryan Lane's blog posts instructive
13:03 XenophonF same goes for AndreasLutro's
13:04 XenophonF Wikimedia Engineering published their Trebuchet implementation, which uses Salt (masterless iirc) - https://wikitech.wikimedia.org/wiki/Trebuchet
13:04 whatevsz joined #salt
13:05 gh34 joined #salt
13:05 XenophonF tbh i started out with very simple configuration states on just a single O/S platform
13:06 XenophonF simple like pushing login banners to all of my FreeBSD servers
13:06 source47_ joined #salt
13:07 source47_ hi guys, i am having problems getting my salt minion to register a beacon, i am getting the following: https://gist.github.com/developerinlondon/e139ecf6aa9d83af29f2266129377a25 any ideas?
13:08 racooper joined #salt
13:09 mavhq joined #salt
13:09 TooLmaN joined #salt
13:12 quix joined #salt
13:14 mavhq joined #salt
13:14 XenophonF source47_: you forgot to put a colon on the end of line 3
13:15 XenophonF source47_: it should read `/vagrant/saltstack/salt:`
13:15 source47_ ah thanks XenophonF
13:16 Guest38126 @source47_ I have here a test repo with a beacon if you find it useful: https://github.com/sharkerz/saltstack-example  (basically a vagrant saltmaster with a salt minion that provision nginx and a beacon that gives nginx statistics)
13:16 Guest38126 I might create a blogpost about it someday, don't know if it's really useful, was my first approach to saltstack
13:17 jacksontj joined #salt
13:17 sauvin joined #salt
13:17 edrocks joined #salt
13:20 Angry_At_Late_De joined #salt
13:21 Angry_At_Late_De will salt 2016.3 be released today
13:21 favadi joined #salt
13:21 subsignal joined #salt
13:22 Angry_At_Late_De anyone there or is just channel pointless
13:22 Angry_At_Late_De HELLO USELESS CHANNEL
13:23 favadi joined #salt
13:24 Angry_At_Late_De Still no god dam reply
13:24 * XenophonF giggles from his hiding place
13:25 ravenx ...
13:25 AndreasLutro Angry_At_Late_De: I'm not psychic!
13:25 AndreasLutro also who is De?
13:25 Angry_At_Late_De When is the bloody release date then
13:25 XenophonF I believe the Official release date is "Real Soon Now"
13:25 AndreasLutro probably "when it's ready™"
13:26 Angry_At_Late_De what the hell does that mean
13:26 AndreasLutro dunno
13:26 AndreasLutro we're as clueless as you! :)
13:26 nZac joined #salt
13:26 Angry_At_Late_De is there no one from saltstack that use this channel
13:27 XenophonF this isn't an official communications channel, is it?
13:27 XenophonF they're on here usually
13:27 XenophonF but it's still very early in the morning on the western half of the united states
13:27 Angry_At_Late_De where the hell do they list it on their god dam website then if they dont use it
13:28 AndreasLutro because we're here giving eachother help of course
13:28 AndreasLutro send an email if you want some sort of official response
13:28 Angry_At_Late_De oh well this channel is a waste of time then
13:29 source47 joined #salt
13:29 XenophonF always nice to see someone so passionate about the software they use
13:29 ravenx LOL
13:29 ravenx should have been "Rage closed"
13:29 ravenx instead of "Page closed"
13:30 DammitJim joined #salt
13:30 kevinquinnyo joined #salt
13:32 AndreasLutro I suspect the rage was forked and nohup'd
13:35 flowstate wow, kinda sad I missed that
13:36 flowstate so, crunchy problem today: how to deploy a new build to all EC2 instances within an ASG using as many salt commands and as little bash as possible
13:37 flowstate I'm thinking atm that the approach should be to turn off terminate and launch on the asg, then go one by one, running highstate on each minion
13:38 flowstate after a successful highstate run (or, barring that, a rollback), re-register with the ELB
13:38 AndreasLutro if you've got the highstate = deploy build thing down, you could easily do that with an orchestrator and a for loop
13:38 AndreasLutro well, maybe not easily..
13:38 flowstate hahaha
13:38 antpa joined #salt
13:39 tuxx joined #salt
13:39 flowstate simply may be a better word
13:39 tuxx hey guys.. when i run salt+vagrant i get the following error msg during provisioning: "Running a benchmark to measure system clock frequency." followed by " Finished RDTSC test. To prevent the startup delay from this benchmark, set the environment variable RDTSC_FREQUENCY to 3296" ...
13:39 tuxx does anyone know what this RDTSC_FREQUENCY test is about?
13:40 paydro_ joined #salt
13:41 jettero joined #salt
13:42 honestly tuxx: The TSC is a special CPU time counter
13:42 honestly RDTSC is the instruction to read it out
13:42 tuxx honestly: okay.. does salt run a test or is it related to vagrant?
13:42 honestly something you're running is calibrating the TSC during boot
13:42 tuxx honestly: i see
13:42 honestly I doubt it's salt
13:42 tuxx okay
13:42 honestly may not even be vagrant
13:43 honestly may be the VM you're running in vagrant
13:43 tuxx yea... i'll try to readup on this
13:43 tuxx thanks for the pointers
13:44 rem5 joined #salt
13:50 mapu joined #salt
13:52 XenophonF aw shoot salt doesn't support configuring dhcp option sets yet :(
13:53 edrocks joined #salt
13:53 tuxx left #salt
13:54 iceyao joined #salt
13:56 honestly XenophonF: huh?
13:56 honestly XenophonF: isc-dhcp-server config files aren't that complicated, I generate them with salt
13:56 XenophonF I create VPCs in AWS using Salt's boto_vpc state module.
13:57 honestly oh you're using weird cloud APIs
13:57 honestly ¯\_(ツ)_/¯
13:57 XenophonF yeah
13:57 XenophonF i wonder how hard it would be to hack in support
13:57 XenophonF assuming the boto library is on the ball
13:58 cpowell joined #salt
14:01 jerredbell joined #salt
14:03 rem5 joined #salt
14:03 punkoivan joined #salt
14:04 jhauser_ joined #salt
14:09 mavhq joined #salt
14:11 mavhq joined #salt
14:12 Brew joined #salt
14:12 andrew_v joined #salt
14:16 hasues joined #salt
14:16 hasues left #salt
14:17 tharkun joined #salt
14:19 mpanetta joined #salt
14:20 punkoivan joined #salt
14:21 impi joined #salt
14:21 rem5 joined #salt
14:23 Cadmus joined #salt
14:23 mavhq joined #salt
14:25 tpaul joined #salt
14:26 kmkramer71 joined #salt
14:40 quasiben1 joined #salt
14:42 flowstate anyone know how to have the output of module calls feed data to subsequent module calls?
14:42 kmkramer71 does anyone have an example of using a simple yaml list importing in to a state file? I want to have a list of services and just iterate the list to disable or enable them. I'm having trouble with the syntax.
14:43 punkoivan joined #salt
14:46 punkoivan joined #salt
14:46 Rumbles joined #salt
14:47 rem5 joined #salt
14:49 mackripeum hi, do you know if there is something like state.sls_id  for the state.orchestrate runner ?
14:50 spuder_ joined #salt
14:58 patarr joined #salt
14:59 traph joined #salt
15:01 hackel joined #salt
15:02 kawa2014 joined #salt
15:03 whatevsz joined #salt
15:03 ajw0100 joined #salt
15:04 quasiben joined #salt
15:06 jfroot joined #salt
15:07 punkoivan joined #salt
15:08 kmkramer71 here is my state file and result, http://pasted.co/1e3cf01a
15:09 scoates joined #salt
15:09 punkoivan joined #salt
15:12 AndreasLutro kmkramer71: read up on jinja syntax - you don't use {{ }} inside {% %}
15:12 spuder joined #salt
15:14 rem5 joined #salt
15:15 paydro joined #salt
15:19 kawa2014 joined #salt
15:20 mavhq joined #salt
15:20 Rumbles joined #salt
15:25 aawerner joined #salt
15:26 beardedeagle joined #salt
15:27 JDog joined #salt
15:28 nZac joined #salt
15:28 JDog Just a quick question: I'm trying to provision, but I can't find any of the salt files. The jinja search path is logged as Jinja search path: ['/var/cache/salt/minion/files/base']
15:28 JDog But my salt config files are not there.
15:29 murrdoc joined #salt
15:30 rovar joined #salt
15:30 rovar is there a way to print the execution time test.* commands took?
15:30 mavhq joined #salt
15:30 JDog My file roots and pillar roots point to the correct place.
15:30 rovar It would be nice to run salt '*' test.echo "foooo"
15:31 rovar and get response times from each minion
15:31 debian112 joined #salt
15:32 kmkramer71 AndreasLutro, I updated the code although I see that same syntax in almost all examples inside the {% %}. Now I get this in my result
15:32 kmkramer71 AndreasLutro, ID NetworkManager in SLS provision.services is not a dictionary
15:34 simon_c joined #salt
15:36 kmkramer71 AndreasLutro, actually no I don't. Not inside the brackets
15:36 onlyanegg joined #salt
15:39 simon_c hi all, I'm just starting out with salt, so sorry if these questions are very basic. I'm following the tutorial, and trying to get my head around the "pillar.items vs pillar.get" command. pillar.items is returning everything I've setup in pillar. pillar.get when I pas it a key with a string value returns the string, but if I pass it a key with a hash value, it doesn't return anything.   http://pastebin.ca/3458202
15:44 onlyanegg joined #salt
15:45 Rumbles joined #salt
15:48 Eugene simon_c - I believe that it does return, but `pillar.get` doesn't know how to deal with hashes.
15:48 Eugene Try pillar. get user.redbeard
15:50 patrek joined #salt
15:54 dfinn joined #salt
15:57 onlyanegg joined #salt
15:57 nswinton joined #salt
15:58 simon_c Eugene:  pillar.get user.redbeard doesnt' work either.
15:58 simon_c Eugene: but it could be it's just not supposed to do that..
15:58 Eugene I'm too sober to go test it myself, but "huh"
16:00 ivanjaros joined #salt
16:02 quasiben joined #salt
16:02 jerredbell joined #salt
16:03 nswinton joined #salt
16:03 mavhq joined #salt
16:05 onlyanegg joined #salt
16:05 debian112 joined #salt
16:06 sk_0 joined #salt
16:07 JohnnyRun joined #salt
16:12 gladiatr joined #salt
16:13 pppingme joined #salt
16:13 flowstat_ joined #salt
16:13 writtenoff joined #salt
16:18 paydro joined #salt
16:19 paydro joined #salt
16:19 murrdoc its 11 am Eugene
16:20 Eugene That's why it's disappointing to be sober at 9AM
16:20 murrdoc no doubt
16:22 teatime Careful with that axe, Eugene.
16:22 jfroot joined #salt
16:23 Cadmus Gone 5pm here! Sadly I have a deploy this evening
16:24 teryx510 joined #salt
16:25 debian112 joined #salt
16:26 Eugene All the more reason to be not-sober
16:26 Eugene Drinks for everybody!
16:27 grumm_servire joined #salt
16:29 akhter joined #salt
16:30 Cadmus left #salt
16:31 source47 joined #salt
16:32 ageorgop joined #salt
16:34 Fiber^ joined #salt
16:36 mavhq joined #salt
16:44 onlyanegg joined #salt
16:45 favadi joined #salt
16:50 ronnix joined #salt
16:51 rm_jorge joined #salt
16:51 flowstate joined #salt
16:51 tharkun joined #salt
16:55 M-MadsRC joined #salt
16:56 pfallenop joined #salt
16:57 darvon joined #salt
16:57 jfroot joined #salt
16:59 paydro joined #salt
16:59 cliffstah hey guys, is there an example somewhere of how a custom module can accept and render a jinja template?
17:02 dblan joined #salt
17:02 Rumbles joined #salt
17:02 dblan left #salt
17:04 flowstate joined #salt
17:05 onlyanegg joined #salt
17:05 sagerdearia joined #salt
17:05 Lionel_Debroux joined #salt
17:07 nZac joined #salt
17:09 _JZ_ joined #salt
17:09 mavhq joined #salt
17:12 impi joined #salt
17:13 aw110f joined #salt
17:14 mavhq joined #salt
17:18 breaking_ joined #salt
17:25 mavhq joined #salt
17:25 ajw0100 joined #salt
17:26 punkoivan joined #salt
17:26 punkoivan left #salt
17:27 grumm_servire joined #salt
17:28 johnkeates joined #salt
17:29 brianvdawson joined #salt
17:32 gladiatr @cliffstah https://gist.github.com/gladiatr72/8552f9048f37485de05cce8e4914d89c
17:33 ronnix joined #salt
17:34 elsmo joined #salt
17:35 gladiatr @cliffstah, you wouldn’t need to generate __opts__ but you would still need to make sure they’re a part of the context dict that you pass to jinja
17:36 gladiatr @clifstah, another thing to keep in mind is you might need to execute salt.cp.cache_file() against the source file if it lives on the salt fileserver.  That makes sure the file is present and up-to-date
17:41 johnkeates left #salt
17:43 cliffstah awesome, thank you gladiatr
17:45 cliffstah what I actually want is just the contents of the file, so that I can render it in memory and give it to libvirt - but I think I can work with this
17:45 blakemiller joined #salt
17:46 nZac joined #salt
17:47 gladiatr @cliffstah :)
17:47 s_kunk joined #salt
17:48 cliffstah hey you're not too far from where I lived in the usa (my wife is american)
17:48 cliffstah :-)
17:48 notnotpeter joined #salt
17:49 gladiatr @cliffstah heh.  Yeah.  About 30 miles SW of Kansas City.  If you choose to live in the middle of nowhere, choose Lawrence! :D
17:49 cliffstah pretty sure I've been to your town, or at least through it on the way to the university
17:49 cliffstah I beg to differ
17:49 cliffstah my wife is from Newton :P
17:50 gladiatr @cliffstah, /snort  /chuckle
17:50 cliffstah haha.
17:50 cliffstah there's a drop zone not far from you if i recall, my sister in law is a crazy plane jumping nutcase
17:50 cliffstah I can't remember its name offhand
17:52 Brew must have had to pay by the letter.  he's missing a few in antonio
17:52 murrdoc joined #salt
17:52 gladiatr @cliffstah, not surprising.  I have the questionable distinction of living (nearly) my entire lifespan in this state… I understand why there are those that can’t help but throw themselves from perfectly working aircraft
17:52 jfindlay 2016.3.0rc2 installation instructions: https://docs.saltstack.com/en/2016.3/topics/releases/releasecandidate.html
17:52 Brew lol mis-fire
17:53 cliffstah I've been up in the plane and watched them, pretty awesome.  I would have jumped to be honest, but I wasn't allowed.
17:53 Karunamon joined #salt
17:54 cliffstah I love a safety procedure that begins "If at any time you find yourself outside the vehicle..."
17:54 gladiatr lulz.  “We’re sorry, sir,  Our professional in-flight psycotherapists have determined that you are inelligible—you show signs of having something to live for"
17:54 gladiatr indeed
17:55 dmaiocchi joined #salt
17:55 mavhq joined #salt
17:56 Eugene Adrenaline is a hell of a drug
17:56 Eugene But.... free-fall? Ugh.
17:58 _Cyclone_ joined #salt
18:02 DammitJim I'm back with a question from a couple of weeks ago
18:03 DammitJim is there a way to define a variable that gets called by a pillar, which then in turn can be called by a state in a jinja template?
18:06 antpa joined #salt
18:06 aw110f Hi question about multimaster vs multimaster with failover.  it sounds like the multimaster setup can do what the multimaster failover can do.  is this correct?
18:07 AndreasLutro aw110f: what are you hopign to achieve with multimaster?
18:07 aw110f multimaster setup can load-balance and minion automatically connect to any available master
18:08 aw110f failover + load balance for minion responsiveness performance
18:08 AndreasLutro if you use failover it'll somewhat load-balance, but it also means you'll have to either setup a master of masters, or try every master to see which one the minion is connected to
18:09 AndreasLutro if you use multiple hot masters, you won't really spread the load that much, and you'll have problems like reactors being invoked once for each master
18:09 AndreasLutro but you can reach any minion from any master
18:09 flowstate joined #salt
18:10 antpa joined #salt
18:10 source47 joined #salt
18:11 aw110f so multimaster failover with pki + syndic, can provide failover + load balance (somewhat) + one master of master overlord to control all minions ?
18:12 elsmo joined #salt
18:12 AndreasLutro in theory. I haven't tried it. but at the point of using multiple masters I'd rather not use multi-master and just assign different minions different masters
18:13 AndreasLutro I say in theory, nevermind that, obviously people are already doing this
18:15 baweaver joined #salt
18:15 aw110f I currently have your similar setup where i have multiple masters each dedicated to a group of minions, but that doesn’t really scale and I sometime end up login in to the wrong master when i want to issue salt command to manage the minions =)
18:17 amcorreia joined #salt
18:20 aw110f AndreasLutro: thanks for your input, at the moment I’m struggling to get multimaster failover with pki on 2015.8.8 working, I’ll report back here if i can get any progress
18:21 subsignal joined #salt
18:21 AndreasLutro aw110f: what do you mean by "with pki"
18:22 mavhq joined #salt
18:22 AndreasLutro all you should need to do is generate, use and distribute the master signing key, and make sure that minion keys are present on all masters
18:22 AndreasLutro note that master signing key != master key
18:22 berserk joined #salt
18:24 cliffstah gladiatr I got it working, thanks muchly
18:25 beardedeagle joined #salt
18:27 ageorgop joined #salt
18:28 jken joined #salt
18:29 jken Hello, I am trying to write a sls to installed kde-desktop on fedora 23, however kde-desktop is a metapackage and when installing it using dnf you need to use `dnf install @kde-desktop`. Does anyone know how I can get this installed with salt?
18:32 gtmanfred there is support for dnf in salt
18:32 gtmanfred so you should be able to do it, but i am not positive how
18:32 jken Yeah, I could not find anything online, so I figured i would ask here.
18:33 Opti99 joined #salt
18:33 gtmanfred yeah, have not had a chance to try and dnf stuff yet
18:33 gtmanfred still using centos 7 :)
18:38 aw110f AndreasLustro: This is what i mean https://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html
18:40 M-MadsRC joined #salt
18:41 mavhq joined #salt
18:43 mavhq joined #salt
18:44 akhter joined #salt
18:44 Opti99 Are most people using Salt for system confuration mangement only, or are people deploying custom applications with it too?
18:46 dmaiocchi joined #salt
18:46 jfindlay all of the above and more
18:46 om joined #salt
18:46 gtmanfred I would think that more and more people are starting to use it for the orchestration aspect instead of only for config management
18:49 Opti99 I am using it to deploy applications too, but I think I am getting to that point where I need to look at a different renderer or create custom modules. For example, I deploy application A, it runs through 30 steps to install it. Now I want to install Application B, but with minor tweeks. I am finding myself copying alot of sls files around.
18:50 AndreasLutro ideally you want to define apps in pillars and use generic sls files to deploy all of them
18:52 source47 joined #salt
18:52 gtmanfred ^^
18:53 Opti99 I ran into an issue where I was constantly tweeking pillars and loops. After Application A was installed and looping nicely, Application B was 90% the same, but fracturing off that 10% difference became difficult. So then I am changing working scripts to adjust for a change in a new deployment.
18:53 Opti99 So then Applicaiton C comes along, and it fractures it more, just a bit though.
18:53 AndreasLutro what types of apps are these?
18:54 Opti99 Web applications
18:54 viq joined #salt
18:55 AndreasLutro I use salt to deploy various types of web apps and it works fine. you may be using your pillars wrong
18:55 Opti99 Its possible, thats why I am here asking questions
18:55 Opti99 At one point I had everything in the Pillars, beyond private data.
18:56 quasiben joined #salt
18:56 Opti99 It would work fine if every app was the same.
18:57 Opti99 I think my mistake has been maing too large of sls files and I need to break them up into small peices
18:57 Opti99 maing == making
18:57 jken Does anyone know if its possible to install meta packages with salt?!
18:57 M-liberdiko joined #salt
18:58 AndreasLutro Opti99: https://bpaste.net/show/35d408086820 here's a pillar for deploying a python/uwsgi/postgres app
18:58 AndreasLutro it's consumed by the web, uwsgi, postgres, configfile, git and fail2ban states to make a fully functional app
18:59 jken or maybe package groups?
18:59 Opti99 AndreasLutro: my pillars were close to that, just not as clean Ill admit, but it make sense. I think what I am doing wrong isn't on the pillar side
18:59 scoates joined #salt
19:00 sfxandy joined #salt
19:01 gtmanfred jken: with yum you can do group_install, and it works for pkg.installed iirc
19:01 gtmanfred i have no idea if dnf works
19:01 Opti99 As a simple example. Application A, needs 1 Nginx configuration location. Application B, Needs three configured. I struggled to find a way to "loop" that cleanly between the two different applications
19:02 AndreasLutro if app B needs 3 nginx sites configured, that's just 3 entries under "web_sites" in my pillar struct
19:04 Opti99 So I could tier it so, i had www.site.com and then another heading for /, /other, /morestuff for different locations under that same www.site.com name.
19:05 AndreasLutro right, that gets a bit trickier I guess
19:06 AndreasLutro I'd probably specify type: multi for an app like that
19:06 AndreasLutro and then add some logic in my nginx/web state to handle that appropriately
19:07 AndreasLutro maybe use a separate nginx config template or something
19:07 Opti99 What renderer are you using?
19:07 AndreasLutro jinja+yaml but it doesn't matter which you use
19:08 Opti99 It seems like I read that we shouldn't over do the logic in state files, but maybe I didn't read it correctly.
19:08 AndreasLutro do whatever you need to get shit to work
19:08 Opti99 if this, if that, starts to get heavy
19:08 AndreasLutro https://bpaste.net/show/cc2e0537e209 is the state sls I have that sets up nginx configs
19:08 Opti99 It works, I just have alot of duplicate code.
19:09 AndreasLutro proabbly the most logic intensive sls I have lying around
19:09 gtmanfred Opti99: for the most part, you don't need to make it super complicated, a lot os stuff can be moved over to pillars and map.jinja files
19:10 gtmanfred but, doing for loops and stuff in the states is simple enough
19:10 Opti99 Thanks. I have struggled to find real state examples on the web. Most are very simple examples.
19:10 AndreasLutro I'd like to put my personal states on github - but then I'd have to split my setup into different repos
19:11 gtmanfred this is my stuff for deploying openstack inside of the rackspace cloud
19:11 gtmanfred https://github.com/gtmanfred/openstack-salt-states
19:11 gtmanfred but it is pretty simple states, without a lot of jinja
19:12 josue joined #salt
19:13 grumm_servire joined #salt
19:13 riftman joined #salt
19:13 Opti99 Thanks. Saving that link.
19:14 gtmanfred it uses a lot of map.jinja though for the defaults
19:14 AirOnSkin joined #salt
19:14 mavhq joined #salt
19:14 Opti99 I haven't used any map.jinja files myself.
19:15 cberndt joined #salt
19:15 AndreasLutro I wish you could replace map.jinja with map.py
19:16 AndreasLutro but alas... jinja can only import jinja
19:16 gtmanfred yeah, sadly
19:16 Opti99 I haven't wrapped my head around when to use them. Many of the examples I see are about OS differences, ie CentOS vs Ubuntu, but we only use the same OS for everything so it isn't a good example.
19:17 renaissancedev joined #salt
19:17 AndreasLutro it's just a nice way to separate all the heavy logic from your sls template - you won't always need that
19:17 renaissancedev Is it possible to take advantage of the Salt test runner in the context of a different repository?
19:18 jfindlay for whatever it's worth (probably not that much) I like to store common jinja lookups in a separate file, not quite the full overhead or machinery of a map.jinja: https://github.com/saltstack/salt-pkg-tests/blob/master/params.jinja
19:18 AndreasLutro for example, in the web state file I showed you, we have a similar one at work but it has even more logic, so we moved that into its own jinja file
19:18 ajw0100 joined #salt
19:18 renaissancedev For context, I am writing a custom execution module that I would like to eventially contribute to Salt, so I'm trying to write the tests using the Salt testing framework.
19:18 AndreasLutro I'm stealing that jfindlay
19:18 renaissancedev But, I'm unable to execute those tests with the salttesting.runtests module because it is unable to discover the tests.
19:19 rem5_ joined #salt
19:19 AirOnSkin joined #salt
19:19 jfindlay AndreasLutro: what gets me is how many ways there to import or include jinja and yaml files.  I just try to keep it as simple as possible and factor any real logic into custom modules/states
19:19 AndreasLutro renaissancedev: fwiw I just run them manually with python -m unittest tests.unit.modules.my_module_test
19:20 renaissancedev AndreasLutro: And are you using the TestCase class from the salttesting package?
19:20 AndreasLutro yeah I just copy/paste stuff from other tests in the same dir
19:21 renaissancedev Awesome, that worked. Thanks AndreasLutro!
19:21 AndreasLutro not including the actual test code...
19:21 renaissancedev Do you leverage any of the integration test machinery for any of your tests?
19:21 jfindlay AndreasLutro, renaissancedev: I haven't attempted this yet, so I don't know what things are involved or need to be changed, but there is an issue: https://github.com/saltstack/salt/issues/31597
19:21 saltstackbot [#31597]title: test custom modules with test suite | ### Description of Issue/Question...
19:22 renaissancedev jfindlay: Thanks for the pointer, looking now :)
19:22 jfindlay renaissancedev: unfortunately there's not much there yet :-)
19:22 Opti99 I think part of where I struggle is my way of thinking wants to call things as a fuction, if you will. For example I want to do these four steps, in ordered, when called. So I want application installer A to call that fuction and then I want Application B to also call that function. Instead I need to wrap that function so it loops on its own from reading what it needs out of pillars. I start to loose control on the order which things a
19:22 AndreasLutro renaissancedev: yes, but I don't run them
19:22 AndreasLutro just let jenkins do it
19:22 Opti99 are depenent on it being there
19:23 renaissancedev AndreasLutro: Good point. Right now I'm trying to get away with doing this on my local machine, but I'll be figuring out how I want to handle getting a running salt environment put together for test purposes before long.
19:23 renaissancedev Thanks for the help.
19:24 AndreasLutro renaissancedev: https://github.com/saltstack/salt/pull/32001 was the first stab I had at it I think
19:24 saltstackbot [#32001]title: Add integration test for alternatives state | The alternatives state module has been through some contradictory changes recently. An integration test should help validate that it actually works.
19:24 AndreasLutro feel free to copy/paste I guess
19:25 AndreasLutro since it is a very simple one
19:25 blakemiller joined #salt
19:26 mavhq joined #salt
19:28 flowstate joined #salt
19:31 baweaver joined #salt
19:32 AirOnSkin joined #salt
19:35 brianfeister joined #salt
19:38 AirOnSkin joined #salt
19:38 akhter joined #salt
19:39 aganders3 joined #salt
19:43 elsmo joined #salt
19:43 flowstate joined #salt
19:47 brianfeister joined #salt
19:48 flowstate joined #salt
19:50 mapu joined #salt
19:52 baweaver joined #salt
19:57 impi joined #salt
19:57 source47 joined #salt
20:00 XenophonF is there a way to join a domain using salt?
20:01 XenophonF i mean something native, not running a shell command or something
20:02 nswinton joined #salt
20:03 DammitJim is a state file rendered before it is executed?
20:03 DammitJim like if I have a for loop for pillar data in the state file
20:03 XenophonF DammitJim: yes
20:03 DammitJim not sure if I can do a for loop inside the adduser for group.present
20:03 XenophonF jinja or whatever templating mechanism runs first
20:03 DammitJim oh cool
20:05 XenophonF DammitJim: for example -
20:05 XenophonF DammitJim: https://github.com/irtnog/salt-states/blob/development/kerberos5/init.sls#L18
20:05 DammitJim oh, but the for loop wouldn't go in for - name
20:05 DammitJim right?
20:05 DammitJim it has to be run for the state
20:06 AndreasLutro you can do a loop anywhere you want
20:06 AndreasLutro as long as the end result is valid yaml
20:07 XenophonF which results in the following compiled state data (which you can see using state.show_sls) - https://gist.github.com/xenophonf/8f5e6c70c87ce0f3d72cb5da6ccb2569
20:08 XenophonF jinja and mako and whatever other preprocessors Salt supports don't care about YAML
20:08 XenophonF from the Jinja renderer's perspective, it's just working with a bunch of text
20:09 TyrfingMjolnir joined #salt
20:09 ajw0100 joined #salt
20:09 DammitJim yeah, I've done the for loop for a state
20:09 DammitJim haven't done it inside a state
20:09 mavhq joined #salt
20:09 XenophonF so if you have a for loop like {% for i in [1, 2, 3] %}{{ i }}{% endfor %}
20:09 XenophonF you can put that for loop _anywhere_
20:10 XenophonF and it will end up putting `123` in that spot in the template
20:10 TyrfingMjolnir joined #salt
20:10 XenophonF by the time the YAML parser gets to it, it doesn't even know that Jinja was there
20:15 writtenoff joined #salt
20:16 AirOnSkin joined #salt
20:21 nswinton left #salt
20:26 rm_jorge_ joined #salt
20:26 kmkramer71 AndreasLutro, I had to do my list like this {% for disable in ['NetworkManager', 'chrony'] %} to get it working. not ideal but fine. now I can't set 2 service status.... Too many functions declared in state 'service'
20:26 AndreasLutro yeah you have to make separate states for each service.running
20:28 AirOnSkin joined #salt
20:29 mavhq joined #salt
20:32 dmaiocchi joined #salt
20:42 ajw0100 joined #salt
20:43 flowstate joined #salt
20:44 roock joined #salt
20:45 XenophonF it's possible to use the names parameter with service.running
20:45 flowstate joined #salt
20:46 jfindlay XenophonF: names should be available to all states
20:46 XenophonF precisely
20:46 * jfindlay suspects this is the beginning of a Xenophon dialogue :-)
20:46 XenophonF LOL
20:47 gtmanfred disable:
20:47 gtmanfred service.dead:
20:47 gtmanfred - names:
20:47 gtmanfred - NetworkManager
20:47 gtmanfred - chrony
20:47 gtmanfred done
20:47 gtmanfred kmkramer71: ^^
20:48 gtmanfred each element in names gets split out into its own state object, so that you can use multiple ones inside the same stateid
20:48 XenophonF i get a lot of mileage out of `names: {{ list_of_something|yaml }}`
20:49 whatevsz joined #salt
20:49 XenophonF which has the added advantage of rendering as []
20:49 XenophonF which no-ops correctly
20:49 jfindlay XenophonF: sorry, I originally saw your comment as a question
20:49 * jfindlay is doing too many things
20:49 XenophonF it's all good
20:49 kmkramer71 joined #salt
20:49 gtmanfred i like using the ability to overwrite the low chunk data in states
20:49 gtmanfred http://ix.io/v1x
20:50 gtmanfred http://ix.io/v1y
20:50 XenophonF oh that's cool!
20:50 XenophonF i had no idea you could do that
20:50 gtmanfred yar
20:50 gtmanfred https://gist.github.com/gtmanfred/5ca94def7e6dfbf30eb4e7502e6cec73
20:50 gtmanfred yeah i wrote it about a year ago
20:51 AndreasLutro interesting
20:51 jfindlay using the deep magic
20:51 gtmanfred yup
20:52 gtmanfred andy they should be executed in order because names is a list or ordered dict
20:52 kmkramer71 I got it working but I like the way you did that with a list inside the state.
20:52 XenophonF right!
20:52 gtmanfred makes it so that you can do complicated stuff all in one state id
20:53 whatevsz joined #salt
20:53 gtmanfred kmkramer71: names is a special key in the state definition, and it will expand to one state per thing in names with everything the same from the top level
20:53 gtmanfred unless you overwrite it in the names: dictionary
20:53 gtmanfred like in here https://gist.github.com/gtmanfred/5ca94def7e6dfbf30eb4e7502e6cec73
20:53 XenophonF i find it really fascinating how states get compiled
20:54 gtmanfred XenophonF: that should go from 0 to lxc containers on a base centos7 install
20:54 TheoSLC joined #salt
20:54 gtmanfred (specifically using the cloud.present driver cause someone was asking about it)
20:54 TheoSLC Greetings..
20:54 XenophonF that's pretty neat gtmanfred - thanks for sharing it!
20:54 gtmanfred no problem :)
20:55 TheoSLC Question: I'm using the salt-api.  I am trying to duplicate with the API the behavior I get with the cli with the flag --stage-output=changes.  This this possible?
20:55 gtmanfred XenophonF: implemented here https://github.com/saltstack/salt/pull/13489
20:55 saltstackbot [#13489]title: [RFC] Allow names to override chunk variables. | This feels gross and I haven't thought of a better way of doing this...
20:56 source47 joined #salt
20:59 gtmanfred XenophonF: afaik, i am the only one really using it cause i didn't do the best job documenting it :P
20:59 XenophonF wow that whole comment thread is full of win
20:59 gtmanfred yeah
21:00 XenophonF i didn't know about the YAML <<: *something bits
21:00 gtmanfred oh yeah, hooks and anchors
21:00 gtmanfred XenophonF:  look up anchors on this page https://learnxinyminutes.com/docs/yaml/
21:01 mavhq joined #salt
21:02 debian112 joined #salt
21:04 source47 joined #salt
21:06 hemebond Keep in mind that anchors were broken.
21:06 hemebond Should be fixed soon.
21:07 hemebond (broken in Pillars at least)
21:07 gtmanfred ahh yeah maybe
21:07 gtmanfred they are working in salt cloud provider stuff for me
21:07 hemebond Oh really? That's very odd. Why would salt cloud use a different compile path.
21:07 gtmanfred it shouldn't afaik
21:07 gtmanfred ¯\(°_o)/¯
21:09 AirOnSkin joined #salt
21:11 hemebond https://github.com/saltstack/salt/issues/14550
21:11 saltstackbot [#14550]title: Using YAML anchors/references in Pillars causes conflicting IDs | How to reproduce:...
21:11 kmkramer71 gtmanfred, tried to immitate your service.running piece and apply to my list but no bueno.
21:12 gtmanfred ¯\(°_o)/¯
21:12 gtmanfred it is working in the lxc thing I just posted
21:12 hemebond mikepea: Are you cachedout?
21:12 gtmanfred he is not
21:13 gtmanfred cachedout is cachedout
21:13 hemebond Ah
21:13 hemebond Oh.
21:13 gtmanfred and isn't on right now
21:13 hemebond I've never seen him in here so I thought he might use a different nick in there.
21:13 hemebond *here
21:14 gtmanfred i am 90% sure that all of us use the same name on github and irc, I can't think of anyone who doesn't
21:15 whatevsz joined #salt
21:15 XenophonF same name on github, irc, hackernews, slashdot,...
21:16 whatevsz joined #salt
21:17 XenophonF i really, really like yaml
21:18 hemebond I would like it more if it didn't use spaces for indentation. But otherwise it's a fairly clean format.
21:18 XenophonF at work we're using shibboleth, which is all j2ee and xml
21:18 XenophonF and i really, really hate editing those xml config files
21:19 XenophonF salt's yaml-based configs are so much easier to throw at non-experts
21:20 rburkholder joined #salt
21:20 ZiLi0n joined #salt
21:20 keimlink joined #salt
21:21 AirOnSkin joined #salt
21:21 ZiLi0n Hello everyone. Not related to Salt, but I am trying to figure out how two check if one element of a list A is in another list B with Jinja. I tried several ways, but no luck :( I couldt find anything in the template design Jinja website either :(
21:24 whatevsz joined #salt
21:26 jfindlay ZiLi0n: do you know the index of the element in A?
21:26 nZac joined #salt
21:26 XenophonF you can do things like `{% if 'something' in list_var %}`
21:26 jfindlay `{% if A[2] in B %}`
21:27 XenophonF if you want to do something like python's any(k in list_var for k in other_list), then i dunno
21:27 ZiLi0n jfindplay no, basically I want to loop through A and make sure none of elements of A are in list B
21:27 XenophonF you'd probably have to break it out into a loop
21:27 whatevsz joined #salt
21:27 XenophonF set a flag
21:27 jfindlay ZiLi0n: can you use the set datatype?
21:27 blakemiller hmm could you possibly do some set operations on list membership?
21:28 blakemiller what @jfindlay said
21:28 jfindlay `{% if set(A).intersect(B) %}` or something
21:28 baweaver joined #salt
21:28 ZiLi0n XenophonF I am not looking for the for if one line python like, whatever way that works is ok for now :)
21:28 XenophonF heh
21:29 jfindlay ZiLi0n: `{% if not set(A).issubset(set(B)) %}`
21:29 ZiLi0n jfindlay wow, let me give it a try
21:31 kmkramer71 gtmanfred, it appears it does not like the use of 2 -names: keys although you have similar in your example
21:31 kmkramer71 http://pastebin.ca/3459278
21:31 ZiLi0n jfindlay does set as a function exists in jinja? I am getting error, I can't find it in jinja doc
21:32 gtmanfred kmkramer71: you cannot do multiple service objects
21:32 gtmanfred you will need multiple state ids for that
21:33 gtmanfred if they were doing the same thing, you could put them in the same state id
21:33 debian112 joined #salt
21:33 ZiLi0n jfindlay I think issubset is <=
21:33 ZiLi0n let me make sure
21:34 gtmanfred kmkramer71: http://ix.io/vE3
21:34 gtmanfred kmkramer71: the other way to write that is
21:34 gtmanfred kmkramer71: http://ix.io/vE4
21:34 gtmanfred kmkramer71: because of this ^^
21:34 gtmanfred you can only have one service object at a time, otherwise you overwrite the service key in the state id dictionary
21:35 whatevsz joined #salt
21:36 XenophonF ZiLi0n: you will need to use a for loop, e.g., `{% set flag = False %}{% for i in list1 %}{% if i in list2 %}{% set flag = True %}{% endif %}{% endfor %}`
21:36 XenophonF I don't know of a more concise way without the set operator
21:39 mavhq joined #salt
21:39 ZiLi0n XenophonF how will the third jinja statement will see 'i' variable? I haven't been able to share variables between jinja statemens
21:39 ZiLi0n jfindlay not sure if I am doing it right, but <= it is not working for me, not sure how to create a set from a list
21:42 XenophonF ZiLi0n: variable `i` is in-scope between {% for... %} and {% endfor %}
21:43 XenophonF ZiLi0n: Jinja is lexically scoped, I think.
21:43 jfindlay ZiLi0n: well, set is a keyword in jinja, so I'm wrong there :)
21:44 XenophonF ZiLi0n: http://jinja.pocoo.org/docs/dev/templates/#block-nesting-and-scope
21:44 jfindlay a double loop should work though
21:48 browse joined #salt
21:50 simon_c I'm comming to salt form puppet, and just seeing if I'm understanding things right. grains are like facts, and pillars are like hiera. ?
21:52 jfindlay I've never heard of hiera, but the grains analogy seem right
21:52 hemebond simon_c: Yes
21:53 simon_c thanks.
21:54 source47 joined #salt
21:56 source47 joined #salt
21:59 LiveviL joined #salt
22:04 source47 joined #salt
22:06 flowstate joined #salt
22:07 browse hello, is there a way to run post installation tasks when a package is updated outside of salt ? my case is when i run a salt 'xx' cmd.run 'yum update -y' if the elasticsearch package is updated i need to run a script to uninstall/reinstall specific plugins. i do not want to use pkg.latest as i want to be able to run a highstate without updating the packages. i thought about salt.beacons.inotify|modify on /u/b/elasticsearch and reactor but that looks a
22:07 browse little bit "hackish". any simple solution ?
22:08 LiveviL Yes
22:08 hemebond browse: Why not just use pkg.installed then?
22:08 hemebond Specify a specific version for the package and it won't be upgraded on every highstate.
22:10 kevinquinnyo1 joined #salt
22:11 browse hemebond: ha yes that's simple enough for me. so there's no mechanism to watch for a change in the package version so the sls doesn't need to be modified ?
22:11 hemebond Well if you're not managing the package using Salt then Salt isn't going to know if the package has changed.
22:13 browse ok that's a fair one ;)
22:16 dreese joined #salt
22:18 avozza joined #salt
22:18 jab416171 wouldn't it know with reactor?
22:19 jab416171 browse, you could host your own elasticsearch rpm that runs a script postinstall
22:19 jab416171 I know that's a little much, but it is an option
22:19 keltim joined #salt
22:20 ZiLi0n XenophonF thank you very much, you were correct. the variable is in scope indeed. Got it working know. Thanks you all for your great help!
22:21 browse jab416171: yes but i just moved away from repackaging rpms ;) and i also need to install different plugins on different type of nodes so that'd require multiple rpms
22:21 jab416171 oh
22:21 jab416171 that's annoying
22:21 browse yep
22:23 debian112 joined #salt
22:24 armguy joined #salt
22:24 onlyanegg joined #salt
22:25 jab416171 sounds like the plugins are poorly written
22:26 hemebond I've found the Elastic packages to be quite good :-)
22:26 hemebond Was using topbeat to test salt-ssh last night.
22:27 hemebond browse: Why do you not want Salt to manage the packages?
22:28 workthrick joined #salt
22:30 browse hemebond: i do, it's just that i need to do a yum update sometimes and if i forget a highstate to update elasticsearch before the 'yum update -y' the elasticsearch packages are updated and i then need to manually "cleanup"
22:31 hemebond Ooooh, I see.
22:31 browse hemebond: so i was looking for a way , if the package is updated outside of salt to have salt apply the state when it "detects" that the package was changed outside
22:31 hemebond What kind of cleanup?
22:32 hemebond In that case maybe there is a way to know...
22:32 hemebond Actually...
22:32 browse uninstall some plugins, install the versions tided to the new es version
22:32 browse (it's just a shell script
22:32 hemebond You know about pkg.upgrade, right?
22:32 browse yes
22:32 hemebond Are there particular files you can watch?
22:33 browse the main binary ?
22:34 nZac joined #salt
22:34 hemebond Actually.... I think Linux can watch a file. You could then make the OS itself call Salt.
22:34 hemebond Or at least emit an event.
22:34 hemebond Through the Reactor (as jab416171 mentioned)
22:34 hemebond Which could trigger an update.
22:36 browse yes i was thinking of inotify -> reactor for this too, that would work
22:37 baweaver joined #salt
22:41 browse packagekit would be another way as it can send signals when packages are installed , but doesn't look like there's a salt module for it
22:41 zenlot joined #salt
22:44 teryx5101 joined #salt
22:44 browse anyway thanks for the ideas!
22:46 jhauser joined #salt
22:47 flowstate joined #salt
22:54 aw110f joined #salt
22:55 onlyanegg joined #salt
23:02 rburkholder when using salt.state.lxc.present, I used the config parameter, supplied the name of my configuration file.  the file included lxc.network.script.[up,down] statements.  salt.modules.lxc seems to take ipv4, mac, etc, but ignores/removes my script statements when building the final lxc config file.  Is there a way to get my script statements in there, plus prevent the lxc.network.link statement?  Or do I need to modify salt/modules/lxc.py to do so?
23:03 quix joined #salt
23:07 nZac joined #salt
23:12 debian112 joined #salt
23:14 akhter joined #salt
23:16 mavhq joined #salt
23:26 rburkholder the issue being that I am using openvswitch, so I am not using the native linux bridge, which salt.modules.lxc seems to have hardcoded, based upon piecies of the source code I have looked at
23:27 rmnuvg joined #salt
23:29 mowntan joined #salt
23:37 rburkholder ah, hm, actually, it seems like I can add those to lxc.network_profile and they are picked up.
23:38 debian112 joined #salt
23:43 CampusD joined #salt
23:44 quasiben joined #salt
23:44 CampusD anybody knows of a bootstrap script to deploy minons to windows nodes
23:44 CampusD ?
23:46 CampusD there was a mention of one at https://docs.saltstack.com/en/latest/topics/installation/windows.html#single-command-bootstrap-script
23:46 CampusD it said it was outdated, but the link doesn't seem to work
23:46 onlyanegg joined #salt
23:47 flowstate joined #salt
23:48 rubenb_ joined #salt
23:49 brianfeister joined #salt
23:49 mosen joined #salt
23:50 TheoSLC joined #salt
23:53 nZac joined #salt
23:55 brianfeister joined #salt
23:57 chamunks This is so bizarre http://i.imgur.com/DedMwnn.png
23:57 XenophonF CampusD: are you looking for a powersheel script or something?
23:58 XenophonF chamunks: are your minions down?
23:58 chamunks XenophonF  http://i.imgur.com/tPq3xyz.png doesnt look like it.

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