Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-05-27

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

All times shown according to UTC.

Time Nick Message
00:00 brucelee_ joined #salt
00:05 brucelee_ joined #salt
00:10 AdamSewell joined #salt
00:24 oz_akan_ joined #salt
00:26 diegows joined #salt
00:52 whitepaws joined #salt
00:59 googolhash joined #salt
00:59 ajolo joined #salt
01:05 malinoff joined #salt
01:10 brucelee_ joined #salt
01:13 bhosmer joined #salt
01:15 brucelee_ joined #salt
01:19 ajw0100 joined #salt
01:20 brucelee_ joined #salt
01:25 brucelee1 joined #salt
01:25 xzarth_ joined #salt
01:30 brucelee_ joined #salt
01:35 brucelee_ joined #salt
01:40 brucelee_ joined #salt
01:45 brucelee_ joined #salt
01:46 druonysus joined #salt
01:50 brucelee_ joined #salt
01:58 pentabular joined #salt
02:01 ckao joined #salt
02:11 zions joined #salt
02:17 schimmy joined #salt
02:18 agronholm is it possible to set default values for pillars and then override them in a later sls?
02:18 agronholm like if I set '*': - defaults
02:18 agronholm and then override them with a more specific set
02:28 ajw0100 joined #salt
02:30 brucelee_ joined #salt
02:43 cruatta joined #salt
02:49 malinoff agronholm, afaik salt can't do that
02:49 agronholm meh
02:50 agronholm most of my deployments go with default values
02:50 agronholm but some instances have slight differences
02:51 agronholm I wonder if this is such an uncommon case
02:51 malinoff yes, that could be very useful, but - I'm not sure - it is not supported
02:51 malinoff there were talks about that
02:51 malinoff in 2012/2013
02:51 agronholm on the google group?
02:51 malinoff everywhere :)
02:52 malinoff in google group, in github issues
02:52 agronholm can you point out some for me?
02:52 malinoff https://groups.google.com/forum/#!searchin/salt-users/override$20pillar
02:52 agronholm thanks
02:52 malinoff https://groups.google.com/forum/#!searchin/salt-users/override$20default$20pillar/salt-users/IolKIp8byec/UUplZztIjXYJ
02:53 malinoff https://github.com/saltstack/salt/issues/3991
02:54 malinoff that issue may be the most important
02:54 agronholm yeah, looks like I'm not the only one bothered by this
02:55 lahwran joined #salt
02:57 malinoff the problem i faced is that salt isn't very suitable for complex environments, it's more about simple/medium complexity remote execution (and it's the best RE tool, I think)
02:57 mgw joined #salt
02:58 malinoff well, to be fair, I don't know a tool which is suitable for complex environments :)
02:59 agronholm I believe salt is flexible enough to allow for workarounds here
03:00 malinoff of course, there are workarounds
03:00 agronholm I don't have so many nodes yet, so I'll just remove the necessary defaults and put them in individual nodes pillars
03:01 malinoff you can try to use jinja includes for that
03:01 agronholm probably
03:01 cwright joined #salt
03:01 bhosmer joined #salt
03:01 malinoff use {% set key=default %} somewhere and override it with {% set key=new_value %}
03:01 malinoff something like that
03:10 mgw joined #salt
03:16 tristianc joined #salt
03:17 dcmorton joined #salt
03:24 ipalreadytaken joined #salt
03:28 krow joined #salt
03:31 oz_akan_ joined #salt
03:36 lionel joined #salt
03:50 ajw0100 joined #salt
04:00 bhosmer joined #salt
04:02 catpiggest joined #salt
04:03 Furao joined #salt
04:09 meteorox joined #salt
04:10 meteorox left #salt
04:21 qybl joined #salt
04:21 krow joined #salt
04:24 lionel joined #salt
04:27 smaboshe joined #salt
04:44 zain_ joined #salt
04:50 bhosmer joined #salt
04:52 mgw joined #salt
04:57 xt joined #salt
05:14 schimmy joined #salt
05:32 CeBe joined #salt
05:36 oz_akan_ joined #salt
05:37 picker joined #salt
05:38 pdayton joined #salt
05:39 rdorgueil joined #salt
05:40 thayne joined #salt
05:44 Ryan_Lane joined #salt
05:52 Luke_ joined #salt
05:55 anuvrat joined #salt
05:56 brucelee_ joined #salt
05:57 sroegner____ joined #salt
06:06 cruatta joined #salt
06:11 roolo joined #salt
06:19 lionel joined #salt
06:38 bhosmer joined #salt
06:38 oz_akan_ joined #salt
06:39 ajw0100 joined #salt
06:39 huleboer joined #salt
06:39 schimmy joined #salt
06:43 saravanans joined #salt
06:54 saravana_ joined #salt
06:55 combusean joined #salt
07:00 felskrone joined #salt
07:06 Comradephate joined #salt
07:07 ml_1 joined #salt
07:21 brucelee_ joined #salt
07:24 marnom joined #salt
07:28 xintron I'm adding a ppa repository with pkgrepo and then using pkg.installed to install the package. The problem is if the pkgrepo fails the pkg.installed will still be run and install the default package (which is an old one)
07:28 Kenzor joined #salt
07:29 xintron Can I use require_in under pkgrepo to make the pkg.installed fail if the first one doesn't work?
07:31 ggoZ joined #salt
07:38 anuvrat joined #salt
07:39 rdorgueil joined #salt
07:39 rdorgueil joined #salt
07:41 oz_akan_ joined #salt
07:46 sroegner____ joined #salt
07:48 ndrei joined #salt
07:49 zions joined #salt
08:02 Teknix joined #salt
08:06 darkelda joined #salt
08:08 sor joined #salt
08:10 davidone joined #salt
08:10 ecdhe joined #salt
08:11 SoR joined #salt
08:25 krow joined #salt
08:26 bhosmer joined #salt
08:33 giantlock joined #salt
08:38 zions joined #salt
08:40 orbit_darren joined #salt
08:42 millz0r joined #salt
08:53 ggoZ joined #salt
08:55 micko joined #salt
08:58 linjan joined #salt
08:58 oz_akan_ joined #salt
09:00 masterkorp hello fellow salt addicts
09:00 masterkorp how are your kidneys today ?
09:05 xintron Hrmm.. how can I combine cmd.wait to run if a requirement is changed or if a file doesn't exist on disk?
09:08 masterkorp xintron: use the watch modifier
09:09 xintron masterkorp, yes but how? I do that for my git setup (cloning the repo, changing tag etc) but sometimes the build fails the first time when the repo is cloned and then I want to re-run it but nothing happens (since git is up to date)
09:09 xintron In that case I want a second check to see if the compiled file exists and is installed
09:10 masterkorp xintron: http://docs.saltstack.com/en/latest/ref/states/requisites.html
09:10 masterkorp give it a skim on that page, I think you will find what you are looking for
09:12 krow joined #salt
09:17 CeBe joined #salt
09:25 jalaziz joined #salt
09:25 TyrfingMjolnir joined #salt
09:30 jcsp joined #salt
09:30 felskrone left #salt
09:34 sroegner____ joined #salt
09:35 felskrone joined #salt
09:39 krow1 joined #salt
09:41 CeBe left #salt
09:41 bhosmer joined #salt
09:44 jcsp joined #salt
09:54 mortis anyone here going to salt-training in london tomorrow?
09:54 millz0r there is one?
09:54 mortis yeah :)
09:55 millz0r link?
09:56 anuvrat joined #salt
09:58 zooz joined #salt
09:58 N-Mi joined #salt
09:59 che-arne joined #salt
10:02 lomithrani_ joined #salt
10:12 workingcats joined #salt
10:14 bhosmer_ joined #salt
10:15 TyrfingMjolnir joined #salt
10:18 MrTango joined #salt
10:28 vvoody joined #salt
10:34 TyrfingMjolnir joined #salt
10:39 bhosmer joined #salt
10:39 sroegner_____ joined #salt
10:56 agend joined #salt
11:02 workingcats joined #salt
11:06 combusean joined #salt
11:11 elfixit joined #salt
11:16 mortis millz0r: http://www.saltstack.com/saltstack-events/sse-training-london
11:17 diegows joined #salt
11:18 shwaiil joined #salt
11:19 millz0r thanks
11:23 bezaban hmm. has anyone played with a salt ca setup? I would like to distribute some internal self-ca validated certificates to certain internal machines.  I was hoping salt.modules.tls could do it, but looks like that's not what I'm after
11:23 gildegoma joined #salt
11:23 bezaban ideally I'd like the CA cert and key to reside on the master, then create CSRs for minions based on grains and then distributing the resulting keys to the minions
11:25 TyrfingMjolnir joined #salt
11:27 oz_akan_ joined #salt
11:27 shwaiil Q: Realised I had to add a new package for my php5 install, but when running: salt-call state.highstate, nothing happens. No errors, etc. I wonder why would that be ? Thank you
11:27 analogbyte joined #salt
11:27 shwaiil * what I mean is that, I can't even see the reference in the logs
11:33 viq bezaban: I am looking for a similiar thing, this is the closest I found so far http://garthwaite.org/virtually-secure-with-openvpn-pillars-and-salt.html
11:33 TyrfingMjolnir joined #salt
11:36 TyrfingMjolnir joined #salt
11:37 vbabiy joined #salt
11:37 combusean joined #salt
11:40 bezaban viq: thanks. that is interesting
11:42 krow joined #salt
11:44 TyrfingMjolnir joined #salt
11:44 bhosmer joined #salt
11:45 bhosmer_ joined #salt
11:46 viq shwaiil: and how should salt know that you realised something?
11:46 shwaiil viq: I thought you could just think and salt does everything for you ?
11:47 shwaiil viq: kidding. Yeah, so I basically added to the php5 packages list, etc
11:47 shwaiil didn't worked, so what I did was created a state just for that package, requiring php5 and is now installed
11:47 shwaiil Thanks for looking anyway viq :)
11:57 TyrfingMjolnir joined #salt
12:00 jas-_ joined #salt
12:01 zach joined #salt
12:02 AdamSewell joined #salt
12:04 jrdx joined #salt
12:06 roy__ joined #salt
12:06 roy__ Hi, i get error msg:
12:06 roy__ Error: Package: python-babel-0.9.5-1.el5.rf.noarch (rpmforge)            Requires: python(abi) = 2.4            Installed: python-2.6.6-52.el6.i686 (@updates)                python(abi) = 2.6            Available: python-2.6.6-51.el6.i686 (base)                python(abi) = 2.6  You could try using --skip-broken to work around the problem  You could try running: rpm -Va --nofiles --nodigest
12:06 roy__ and i do not know what to do
12:06 roy__ please help me
12:07 Guest27430 ??
12:07 timc3 joined #salt
12:07 Guest27430 i have problem in installation
12:07 Guest27430 i have centos 6.5 final version
12:07 Guest27430 and i get error:
12:07 Guest27430 Error: Package: python-babel-0.9.5-1.el5.rf.noarch (rpmforge)            Requires: python(abi) = 2.4            Installed: python-2.6.6-52.el6.i686 (@updates)                python(abi) = 2.6            Available: python-2.6.6-51.el6.i686 (base)                python(abi) = 2.6  You could try using --skip-broken to work around the problem  You could try running: rpm -Va --nofiles --nodigest
12:08 Guest27430 why does it happen ?
12:10 babilen Guest27430: You get that error when you do what?
12:11 Guest27430 when i typing:
12:11 timc3 I am trying to configure ESXi 5.5, is there a way for Salt to SSH and just change a file? without having to run minion? Salt Roster seems to want python etc..
12:11 Guest27430 yum install salt-master
12:12 Guest27430 why is hapening ?
12:13 viq timc3: that's salt-ssh not salt roster, and yes, it does require python on the remote end; so does ansible
12:13 viq Guest27430: you have some messed up dependencies/repos
12:13 babilen Guest27430: Looks as if the packages on CentOS are broken and seem to require python 2.4 (what the hell?!) -- Which repository is that package coming from?
12:14 viq Guest27430: also you somehow managed to install from rpmforge a package for el5 on your el6 system
12:14 viq babilen: also look at suffix: el5
12:14 timc3 viq: Sorry for the confusion. I guess there is no way then.
12:14 Guest27430 sorry for misunderstanding, but what should i need to do ??
12:15 babilen Guest27430: Where "that package" refers to "python-babel-0.9.5-1.el5.rf.noarch" .. guess it would be good to know where you get salt-master from too
12:15 viq timc3: not really via salt. But if you have keys set up somewhere, salt could call a script on one of the minions that would do that
12:15 Guest27430 i have python version:
12:15 arapaho joined #salt
12:15 Guest27430 2.6.6
12:15 timc3 viq: Good point. Thanks
12:15 viq timc3: also maybe kinda possibly if you like a challenge, have a look at the salt proxy stuff
12:16 AdamSewell joined #salt
12:16 viq Guest27430: how and why did you install python-babel-0.9.5-1.el5.rf.noarch  ?
12:16 viq Guest27430: alternatively, what repositories do you have enabled?
12:16 derelm joined #salt
12:17 timc3 viq: Thanks for the pointer, I hadn’t seen that yet.
12:18 Guest27430 this is whole the msg i get::
12:18 Guest27430 Resolving Dependencies --> Running transaction check ---> Package salt-master.noarch 0:2014.1.4-1.el6 will be installed --> Processing Dependency: salt = 2014.1.4-1.el6 for package: salt-master-2014.1.4-1.el6.noarch --> Running transaction check ---> Package salt.noarch 0:2014.1.4-1.el6 will be installed --> Processing Dependency: yum-utils for package: salt-2014.1.4-1.el6.noarch --> Processing Dependency: sshpass for package: sa
12:18 viq Guest27430: more text (and this counts as more text) please paste eg to http://paste.openstack.org/ or http://paste.debian.net/
12:19 Guest27430 Resolving Dependencies --> Running transaction check ---> Package salt-master.noarch 0:2014.1.4-1.el6 will be installed --> Processing Dependency: salt = 2014.1.4-1.el6 for package: salt-master-2014.1.4-1.el6.noarch --> Running transaction check ---> Package salt.noarch 0:2014.1.4-1.el6 will be installed --> Processing Dependency: yum-utils for package: salt-2014.1.4-1.el6.noarch --> Processing Dependency: sshpass for package: sa
12:19 Guest27430 it is cutting it
12:19 viq Guest27430: _not_ here
12:19 babilen Guest27430: I am not much of a CentOS person, but can you find out which repositories these packages are coming from?
12:19 Guest27430 why it ask for python 2.4 if i already have installed python 2.6.6
12:19 Guest27430 ???
12:20 viq < viq> Guest27430: how and why did you install python-babel-0.9.5-1.el5.rf.noarch  ?
12:20 viq < viq> Guest27430: alternatively, what repositories do you have enabled?
12:20 Guest27430 how to check it ?
12:21 viq let me verify the command
12:21 viq yum list installed python-\*
12:21 viq try that, paste to some pastebin the output
12:21 cheus joined #salt
12:21 Guest27430 one moment
12:22 viq and another command: yum repolist
12:22 Guest27430 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile  * base: centos.aol.com  * epel: epel.mirror.constant.com  * extras: centos.supsec.org  * remi: remi.check-update.co.uk  * rpmforge: mirror.us.leaseweb.net  * updates: mirrors.greenmountainaccess.net Installed Packages python.i686               2.6.6-52.el6    @updates python-iniparse.noarch    0.3.1-2.1.el6   @anaconda-CentOS-201311271240.i386/ python-libs.
12:22 viq Guest27430: pastebin please, for 5th time
12:24 Guest27430 ohh now i understood u
12:24 Guest27430 http://paste.debian.net/102029
12:24 viq Guest27430: and yum repolist ?
12:25 ceedon joined #salt
12:25 Guest27430 this result when i am typing the order the make the problem
12:25 Guest27430 http://paste.debian.net/102030
12:26 viq Guest27430: yum repolist
12:26 tempspace Good morning! I just got back from vacation and my salt-master won't start, last line in debug when I try to start is [DEBUG   ] Configuration file path: /etc/salt/master - This a known issue at all?
12:26 Guest27430 http://paste.debian.net/102031/
12:27 TyrfingMjolnir joined #salt
12:27 viq Guest27430: do you need the rpmforge repo?
12:28 viq Guest27430: because this is what's causing you problems
12:29 tempspace nm, figured it out, there are a ton of jobs for it to run and it got really backed up while I was out
12:30 Guest27430 i just want that it work
12:30 Guest27430 i do not need it
12:30 Guest27430 how should i need to do ?
12:30 Guest27430 *what
12:30 viq Guest27430: it will be in /etc/yum.repos.d/ somewhere, edit or remove the file
12:31 Guest27430 for what is this for ?
12:32 viq That's the list of repositories your system knows about
12:32 TyrfingMjolnir joined #salt
12:32 Guest27430 http://paste.debian.net/102032
12:32 Guest27430 what should i need to remove ?
12:32 ramteid joined #salt
12:33 Guest27430 i edit the file rpmforge.repo
12:33 Guest27430 and modify to enable to 0
12:33 Guest27430 is that ok ?
12:33 Guest27430 or ther other adiition steps ?
12:34 Guest27430 *there
12:34 Guest27430 you are fucking awsome!!!
12:35 Guest27430 now i have another problem
12:35 Guest27430 i get:
12:35 Guest27430 Failed:   salt.noarch 0:2014.1.4-1.el6
12:35 rojem joined #salt
12:35 Guest27430 but everything else succeeded installed
12:36 Guest27430 ??
12:37 Guest27430 viq ??
12:37 viq What failed? Can you paste more output?
12:37 Guest27430 yes one second
12:38 nullscan joined #salt
12:38 nullscan hey everybody
12:38 combusean joined #salt
12:39 Guest27430 http://paste.debian.net/102034/
12:39 nullscan im trying out salt and have a very basic setup i want to execute via salt-ssh and i cont get it to work with a minimal pillar i have
12:39 nullscan i get this
12:39 nullscan Specified SLS 'sysctl' in environment 'base' is not available on the salt master
12:39 Guest27430 i ran the order:yum install salt-master
12:40 viq nullscan: well, do you have /srv/salt/sysctl.sls ?
12:40 nullscan my layout is this:
12:40 viq nullscan: pastebin
12:40 nullscan top.sls inside the root dir for pillars
12:40 nullscan sure
12:41 Guest27430 VIQ --- did u see the error
12:41 Guest27430 ?
12:41 viq Guest27430: try reinstalling salt again
12:41 Guest27430 what is the order for doing it
12:41 Guest27430 ?
12:42 viq yum reinstall salt
12:42 viq ;)
12:43 nullscan http://pastebin.com/vZeLDRyR
12:43 AdamSewell joined #salt
12:44 Guest27430 when i reinstall i get this msg:
12:44 Guest27430 http://paste.debian.net/102035/
12:45 viq nullscan: what's the top dir? Or: where is this tree based off of?
12:45 Guest27430 what to do ?
12:45 nullscan its the file_roots dir
12:45 viq nullscan: pillars are a separate entity
12:45 nullscan and i have pillar_roots point to the pillars dir you see in that tree
12:46 viq nullscan: and you have sysctl anywhere in top dir
12:46 nullscan which is a subdir of file_roots... do pillars need to be on entirely different path ?
12:46 viq nullscan: yes
12:46 Guest27430 ??
12:47 viq By default states (file_roots) are /srv/salt and pillars /srv/pillar
12:47 nullscan ah i see. no i just try to get the sysctl pillar data from a template file
12:47 viq Guest27430: then 'yum install salt'
12:47 TyrfingMjolnir joined #salt
12:47 nullscan do i need to have a state file named just like the pillar data i want to access?
12:48 Guest27430 i get the same error:
12:48 viq nullscan: no, but top.sls in file_roots refers to states, so you're trying to call a state file named sysctl which you don't have
12:48 Guest27430 http://paste.debian.net/102036/
12:49 viq Guest27430: 'yum clean all' and confirm everything and then try again
12:50 Guest27430 still
12:50 Guest27430 same error
12:50 viq nullscan: also, how are you trying to reference the pillars?
12:50 viq Guest27430: 'file /usr/lib/python2.6/site-packages/salt-2014.1.4-py2.6.egg-info'
12:51 Guest27430 i get:
12:51 Guest27430 ds
12:51 Guest27430 '/usr/lib/python2.6/site-packages/salt-2014.1.4-py2.6.egg-info: directory'
12:51 nullscan like this {% for key, value in pillar['sysctl'].iteritems() %}
12:52 nullscan in a template file referenced by an init.sls inside a dir referenced by top.sls state file
12:52 viq nullscan: nope, won't work, because you don't have top level pillar named sysctl. You have a pillar net.ipv4.conf.all.rp_filter with value 1, and a pillar net.ipv4.icmp_echo_ignore_broadcasts with value 1 and so on
12:52 Guest27430 what to do now?
12:53 viq nullscan: it would need to look like this http://paste.debian.net/102039/
12:53 viq Guest27430: remove salt packages, remove that dir if it still exists, install them again
12:54 muebel joined #salt
12:55 nullscan and this has to go inside sysctl.sls inside the pillar rootfs ?
12:55 Guest27430 congrgulation!!
12:55 Guest27430 installed
12:55 Guest27430 :)
12:56 Guest27430 now what should i need to do ?
12:56 viq nullscan: correct
12:56 nullscan and the sysctl.sls has to be referenced by the top.sls inside pillar rootfs just like i have it in my pastebin ?
12:56 viq nullscan: yes
12:57 nullscan ok let me move the pillars rootfs out of states rootfs and i'll get back to you
12:57 nullscan thanks :)
12:57 jaimed joined #salt
12:58 Guest27430 yum install salt-master vs yum install salt are the same ?
12:58 oz_akan_ joined #salt
12:58 viq I'm not sure what gets installed if you just do 'salt'
12:58 nullscan perfect!! thanks a lot viq :)
12:59 viq nullscan: :)
12:59 nullscan i tried the pillar file like you said but the problem was that it was inside the state rootdir
13:00 nullscan maybe the decs should state that explicitly :)
13:00 nullscan *docs
13:00 oz_akan_ joined #salt
13:00 nullscan unless they do and i missed it :S
13:00 slav0nic joined #salt
13:00 viq I've been in this too long to know off the top of my head ;)
13:01 bezaban can I call a runner in a state file?
13:01 nullscan thanks a bunch :)
13:01 nullscan bb
13:01 bezaban thinking of maybe writing a runner that will accept and create signed cert from CSRs generated on minions, but have to grasp the logic
13:02 viq bezaban: ooooh, that would be sweet
13:02 emning joined #salt
13:02 bezaban I only seem to see examples where they are called with salt-run
13:04 bezaban so not sure that's what I'm after
13:06 racooper joined #salt
13:07 emning anyone use Salt in combination with Puppet, and are you happy with it? we're considering replacing MCollective with Salt
13:08 kedo39 joined #salt
13:09 mfournier emning: I'm in the same process. I'm currently trying to add the features from "mco puppet" I miss to modules/puppet.py
13:09 MTecknology Can salt help me locate a server?
13:10 viq MTecknology: define "locate"
13:10 resmike joined #salt
13:10 * MTecknology lost two of his servers. They're up and working great, but I can't physically locate them. :(
13:10 viq MTecknology: make them beep? ;)
13:10 viq Also on some servers from CLI you can turn on the ID LED, I think
13:12 MTecknology salt just told me they're virtual boxes and I found them! :D
13:12 viq MTecknology: also maybe routing/traceroute, maybe arp tables to see what's next to them?
13:12 viq :D
13:13 emning mfournier: nice. would you recommend giving it a shot, based on what you know so far?
13:13 mpanetta joined #salt
13:13 Guest27430 i have some question
13:13 Guest27430 the command
13:13 Guest27430 salt-master
13:13 Guest27430 and...
13:14 Guest27430 service salt-master start
13:14 Guest27430 are the same ?
13:14 viq Guest27430: not quite
13:14 Guest27430 cause when i run the command salt-master
13:14 Guest27430 iget:
13:14 Guest27430 http://paste.debian.net/102045/
13:15 viq Guest27430: you already have salt-master running
13:15 Guest27430 i already run the command service salt-master start
13:15 Guest27430 ok.. i continue
13:15 Guest27430 thx
13:16 cpowell joined #salt
13:16 viq Guest27430: one _or_ the other. As you see, you can't have it running twice
13:16 Guest27430 i continue in your tutorial
13:16 mfournier emning: so +1 for all the features salt has out of the box, which mco requires custom plugins for. But I'm only mildly happy with the options to manage puppet salt offers (hence the improvements I'm trying do).
13:16 Guest27430 yes i understand it, i follow on your tutorial and run command next command
13:17 mfournier emning: on the other hand, both salt and mco have only a tiny memory footprint (when idle), so it's not much of an issue to have both in parallel to evaluate the differences.
13:17 Tekni joined #salt
13:18 emning mfournier: good to know, I was wondering about that as well. thanks!
13:18 mfournier emning: the other thing I miss with salt is the "how many nodes per lsbdistrelease" type of queries. But this is something I was told would be part of the next salt release.
13:20 ghaering joined #salt
13:20 emning mfournier: right, so you'd have to cludge that by executing facter or doing puppet.facts and some grepping magic, maybe?
13:20 bezaban viq: sorry to say I may have abandoned that idea, I'll be using one of our existing CAs rather than making a new :/
13:21 bezaban I still like the idea thoguh
13:21 viq bezaban: will you be tying that CA to salt, or will it be out of band?
13:21 viq bezaban: also, policy decision, or "easier" ?
13:22 bezaban policy and I doubt I'll be tying it to salt. Boss didn't want a new ca
13:22 * viq nods
13:22 TyrfingMjolnir joined #salt
13:23 Guest27430 i defined saltstack on my server1. please direct me to some link that learn me to use this thch
13:23 N-Mi joined #salt
13:23 bezaban but it's very available in a safe close to me.  it's an old CA structure, but still alive for some purposes.  The other CAs are a hassle to get certificates out of in a reasonable amount of time :P
13:23 mfournier emning: http://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.survey.html#module-salt.runners.survey <- this is what I was referring to which will be in the next release and offer this sort of aggregation/count feature I like with mco.
13:24 bezaban s/structure/infrastructure/
13:24 mfournier emning: currently, as you say, you have to pipe salt's output to other tools to do this calculation.
13:30 quickdry21 joined #salt
13:33 bmcorser i still have issues with locale/encoding when installing postgres with salt
13:33 bmcorser even after reading https://github.com/saltstack/salt/issues/4543
13:33 bmcorser (i commened with my issue at the bottom)
13:36 happytux joined #salt
13:36 toastedpenguin joined #salt
13:39 fragamus joined #salt
13:39 combusean joined #salt
13:39 dude051 joined #salt
13:41 jY bmcorser: was that a completely fresh postgres install?
13:42 jY or are you thinking it'll convert the encoding?
13:42 bmcorser yeah
13:42 bmcorser nope
13:42 jY okie.. there goes my thought then
13:42 bmcorser i burnt down my vboxes
13:42 bmcorser then started from scratch
13:44 resmike joined #salt
13:47 ipmb joined #salt
13:51 AdamSewell joined #salt
13:52 sroegner______ joined #salt
13:52 brandon__ for managing a conf file, what is the best way to specify a specific repo (like remi).  Here is the start of my redis init.sls: http://pastebin.com/7p0W6t94
14:02 svs joined #salt
14:02 vejdmn joined #salt
14:07 ajprog_laptop joined #salt
14:11 ceedon joined #salt
14:12 kermit joined #salt
14:13 mateoconfeugo joined #salt
14:14 brandon__ is it possible to comma separate the the "fromrepo:"?  EX: fromrepo: ius,ius-devel ?
14:18 Guest27430 i followed http://docs.saltstack.com/en/latest/topics/tutorials/quickstart.html
14:18 wendall911 joined #salt
14:18 Guest27430 and i tried to install apache as you instruct but i get
14:18 Guest27430 http://paste.debian.net/102055/
14:20 Guest27430 ??
14:20 timoguin what distro are you on?
14:21 Guest27430 ?
14:21 Guest27430 what do u mean distro ?
14:21 timoguin salt uses the distros package manager, so you need to same name as you'd use normally
14:21 timoguin what linux distribution
14:21 Guest27430 how to check ?
14:21 mgw joined #salt
14:21 Guest27430 centos ?
14:21 timoguin you don't know?
14:21 Guest27430 centos 6.5
14:22 timoguin then the name of the package that installs apache is httpd
14:23 timoguin change "apache" to "httpd" and it should work
14:24 Guest27430 ok and if tomorrow i want to remove the apache or install git how do i need to do it ?
14:25 Guest27430 so i should run ... yum erase httpd httpd-tools apr apr-util ?
14:25 mgw joined #salt
14:25 jalbretsen joined #salt
14:25 timoguin or you can change pkg.installed to pkg.removed and run it
14:25 timoguin salt will use yum to remove it
14:26 jmccree I think there's an issue with unicode in the salt pkg/ppa feature.
14:26 timoguin and to install git you just need to pass the name of the git package to pkg.installed like with your apache state
14:26 brandon__ for pkg.installed and if you have a list of packages in pkgs, can you have multiple "fromrepo"? or comma separate "fromrepo"?
14:27 pdayton joined #salt
14:27 mik3 left #salt
14:31 Guest27430 where can i find the correct names of the packages that i can install
14:31 Guest27430 ??
14:32 timoguin https://www.centos.org/docs/5/html/yum/sn-searching-packages.html
14:32 timoguin whatever yum uses
14:32 tyler-baker joined #salt
14:33 ajprog_laptop joined #salt
14:39 alunduil joined #salt
14:39 layer3switch joined #salt
14:39 djanos joined #salt
14:40 combusean joined #salt
14:41 Sacro How does one use -runas: with state.cmd?
14:43 jaimed joined #salt
14:43 timoguin Sacro: via CLI or an SLS?
14:43 danielbachhuber joined #salt
14:46 Sacro timoguin: sls
14:46 Sacro I've got -runas: user
14:46 Sacro and - requires: -user: user
14:46 Sacro but whoami -runas: user returns root
14:47 thayne joined #salt
14:47 Sacro ah, it's -user
14:47 jslatts joined #salt
14:48 anuvrat joined #salt
14:50 djanos joined #salt
14:50 mbroadhead joined #salt
14:53 thedodd joined #salt
14:56 pdayton joined #salt
14:56 ajprog_laptop joined #salt
15:00 pentabular joined #salt
15:08 Heartsbane joined #salt
15:08 davidone joined #salt
15:12 ceedon joined #salt
15:14 al joined #salt
15:14 shwaiil What's the best way to a2enmod rewrite  for apache2 ? Should I use cmd.run ?
15:14 shwaiil Thanks for looking!
15:16 manfred shwaiil: use a module.run
15:16 manfred shwaiil: https://github.com/saltstack/salt/blob/develop/salt/modules/deb_apache.py#L156
15:16 smcquay joined #salt
15:16 manfred there is an a2enmod module
15:16 shwaiil manfred: thanks for looking! I never used module.run before, I'll have a look : D
15:16 viq shwaiil: also the a2enmod only does a symlink AFAIK
15:16 manfred ^^
15:16 manfred that is true, only does symlink to the mod-enabled directory
15:17 shwaiil manfred: ehh, where's the docs for module.run ? http://docs.saltstack.com/en/latest/ref/states/all/ not here right ?
15:17 schimmy joined #salt
15:17 che-arne joined #salt
15:17 manfred http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
15:17 shwaiil viq: yeah, so I was thinking maybe using the cmd.run, that's why, but there's a better way mentioned by manfred
15:17 shwaiil Thanks for link manfred :)
15:18 viq shwaiil: or you could use file.symlink
15:18 sandbender1512 joined #salt
15:18 shwaiil eh ok, I guess the file.symlink is easier
15:18 manfred or just use a2enmod, and unless statement, so that you don't have to maintain where all the files are
15:19 vejdmn joined #salt
15:19 shwaiil manfred: hum, let me write something fast and share just to see if I understand how the module.run works
15:19 Furao joined #salt
15:20 to_json joined #salt
15:20 shwaiil manfred: a2enmod rewrite: / module.run: / - name: rewrite / - unless: ls -l /etc/apache2/mods-enabled/rewrite.load ?
15:20 shwaiil this is ubuntu 14.04 btw
15:20 babilen joined #salt
15:20 manfred no
15:21 shwaiil manfred: a2enmod rewrite: / module.run: / - name: a2enmod.rewrite / - unless: ls -l /etc/apache2/mods-enabled/rewrite.load ?
15:21 manfred no
15:21 manfred hold on
15:22 manfred http://paste.gtmanfred.com/4jhUlP/
15:23 manfred doesn't appear that unless is available in module yet
15:23 manfred http://paste.gtmanfred.com/G00dU/
15:23 shwaiil the second one is easier to understand it seems
15:24 frasergraham joined #salt
15:24 manfred shwaiil: better yet http://paste.gtmanfred.com/QqqlGm/
15:24 nullscan joined #salt
15:24 shwaiil not sure if I could come up with the first one. the reason you know that, is because you checked the source and know how salt works properly, I reckon ?
15:24 manfred shwaiil: module.run you actually reference the module that you are going to use... which is deb_apache.a2enmod
15:24 viq manfred: isn't creates available only since Helium?
15:24 manfred no idea, it is in the documentation
15:24 manfred yeah it says since helium
15:25 manfred meh
15:25 manfred just use the unless: unless you use git develop... then you can use creates:
15:25 shwaiil manfred: thank you : )
15:25 nullscan hello again, i am having difficulties, getting pillar data on the minion via a template file
15:25 nullscan http://pastebin.com/4y7H2GH6
15:25 dfinn joined #salt
15:26 dfinn could anyone one tell me when or if helium is out?  there's a feature I'm waiting for that says it should be included in helium but I can't seem to find anything that says what versions names are tired to what version numbers.
15:26 viq nullscan: I prefer the salt['pillar.get']('pillar:name', 'default_value') syntax
15:26 manfred dfinn: june 18th is the slated date for rc1
15:26 manfred of helium
15:27 manfred dfinn: hydrogen is 2014.1, helium will be whichever the next version is
15:27 smaboshe left #salt
15:27 viq Oh, there's a date for helium? Cool, didn't know.
15:27 manfred dfinn: if it isn't refered to by any version number, it isn't tagged yet
15:27 dfinn cool, thanks
15:27 dfinn referred where?
15:27 manfred in the documentation
15:27 manfred if it just says helium, it isn't tagged yet, if it says like Hydrogen(2014.1) then it has been tagged
15:28 manfred cause helium could be pushed back all the way to being... 2015.1
15:28 manfred (hopefully not though)
15:28 babilen joined #salt
15:28 dfinn hmm…that's a bit confusing as a user
15:29 manfred the only important part, if it doesn't have a number next to it, it isn't tagged yet
15:29 manfred dfinn: http://www.saltstack.com/salt-blog/2013/10/27/salt-version-numbers
15:31 shwaiil manfred: for the a2enmod state you showed to me, if I wanted apache2 to restart if there's changes, I'd use - watch_in: - service: apache, is this correct ?
15:31 manfred yes
15:31 nullscan viq, how does that syntax work if i want to itterate through a set ot key,value pairs defined in the pillar?
15:31 manfred also need a service statae
15:32 viq nullscan: same
15:33 nullscan for key, value in salt.['pillar.get']('sysctl:key', 'value'].iteritems()
15:33 nullscan ?
15:33 Networkn3rd joined #salt
15:34 viq nullscan: some example, though using the syntax you're using https://github.com/jesusaurus/hpcs-salt-state/blob/master/apt/sample.pillar plus https://raw.githubusercontent.com/jesusaurus/hpcs-salt-state/master/apt/repo/distro
15:34 ceedon joined #salt
15:35 malinoff joined #salt
15:37 lomithrani_ Guys is it proper to have a group of minions set by a rule lets say my loadbalancers   , but I want only one of them to have a different configuration , should I exclude this one from the loadbalancer group and give it its own group or shall I just add it to its own group and override the few rules that differ ?
15:37 vejdmn joined #salt
15:38 pdayton joined #salt
15:40 combusean joined #salt
15:41 jgarr is there something I need to do for manage.bootstrap_psexec to work? I get error "no such file or directory"
15:42 nullscan viq: i am getting this error Unable to manage file: Jinja variable 'dict object' has no attribute 'sysctl'; line 1
15:43 viq nullscan: paste what you have? Though I'm a jinja n00b
15:43 schimmy joined #salt
15:43 nullscan http://pastebin.com/4y7H2GH6
15:43 nullscan same thing nothing changed :P
15:44 krow joined #salt
15:44 tligda joined #salt
15:44 viq something must have changed as you're getting a different result now ;)
15:45 nullscan i just removed the if end endif statements :)
15:47 viq how about removing .iteritems() ?
15:47 nullscan same thing
15:48 lomithrani_ can I use if statements on pcre rather than grain ?
15:50 viq lomithrani_: not sure what you mean
15:50 viq nullscan: sorry, don't really know enough about jinja to help you there
15:50 nullscan viq: how do you manage templates and pillar data?
15:51 ajolo_ joined #salt
15:51 viq nullscan: not sure what you're asking
15:52 nullscan how do you dereference nested pillar data?
15:53 lomithrani_ Viq I have many loadblancers that I set through salt and I want just one of them to have a different conf file so in my init I'd like to put an if statement saying if the name of the minion is this : then use this source else use this source
15:53 viq nullscan: I haven't really done much complicated stuff. I guess most complicated thing in our tree is users, and I haven't really touched that in months
15:54 nullscan ah ok, i see. thanks anyway :)
15:54 viq lomithrani_: you can give multiple sources, and salt will use the first one that exists - and in path you can include stuff like grains etc
15:55 N-Mi joined #salt
15:55 lomithrani_ mmm not sure if that solve my issue or I don't understand your explanation
15:55 viq lomithrani_: something like this http://paste.openstack.org/show/81718/
15:56 jforest joined #salt
15:56 viq say you have minion with id minion175.example.com, if there will be files/file-minion175.example.com it will use that, otherwise it will use files/file-default
15:56 lomithrani_ mmm yes
15:57 lomithrani_ great :)
15:57 lomithrani_ exactly the kind of stuff I wanted thanks  !
15:59 ipalreadytaken joined #salt
16:00 Ryan_Lane joined #salt
16:04 flavio joined #salt
16:05 KyleG joined #salt
16:05 KyleG joined #salt
16:05 flavio hi, what is the recommended way to manage a salt server using salt itself?
16:05 jaimed joined #salt
16:07 mateoconfeugo joined #salt
16:07 timoguin flavio: check out the salt-formula: github.com/saltstack-formulas/salt-formula
16:07 hunter joined #salt
16:07 ZombieFeynman joined #salt
16:08 N-Mi joined #salt
16:08 flavio timoguin: thanks!
16:08 timoguin you can provision the master with a masterless setup, or you run a master and minion on the master
16:10 obec joined #salt
16:11 flavio I'm more interested in kicking (and maintaining) the master (packages, configuration files,...)
16:11 flavio timoguin: what do I have to install on the 'soon-to-be master' machine in order to run the formulas?
16:11 flavio the salt-master package or the salt-minion one?
16:12 viq flavio: minion
16:12 viq Though for me preferably both
16:12 viq But master is only the communication bus, it's minions that do things
16:13 flavio do I have to follow the salt masterless setup and then apply these formulas?
16:13 viq There is a guide for masterless?
16:14 viq Personally I would just run the bootstrap script, let it install master and minion (connected to the local master) and go from there
16:14 flavio the point is I need to install and configure other services on the master (like dhcpd, tftp, apache,...)
16:15 timoguin yea there's a masterless guide
16:15 flavio and I would like to do that using salt itself
16:15 timoguin flavio: my master is a minion of itself
16:15 timoguin so i manage packages and services on it just like any other machine
16:15 timoguin using the same state tree
16:15 viq All my masters have a local minion
16:15 viq so yeah, what timoguin said
16:15 timoguin i have a match in my top.sls for masters that applies the states specific to the master
16:15 flavio timoguin: I thought about doing that, in my top.sls file I added a 'my-salt-server' section
16:15 flavio but the master wasn't able to see itself
16:16 flavio I installed the salt-minion package, pointed it to itself by changing the master variable inside of the conf file
16:16 viq Step one: install salt itself (master+minion). Step two: configure salt to manage services (including formula for salt, and other stuff like apache etc). Step three: manage all this stuff via salt ;)
16:16 timoguin you might need to accept its key
16:16 flavio the key is not shown...
16:17 timoguin did you install salt-master too?
16:17 flavio yes, let me restart the VM
16:17 * flavio is new to salt
16:18 timoguin the minion should attempt to auth with the master just like any other minion
16:18 timoguin if you can't see the key waiting to be accepted, try running the master and minion in the foreground to look for errors
16:18 jgarr is there a way to run salt-minion in the foreground in windows? It's not connecting to the master so I'm trying to troubleshoot. I couldn't find salt in c:\program files\
16:18 timoguin jgarr: it's in C:\salt
16:19 jgarr timoguin: ahh thanks
16:19 flavio [DEBUG   ] Attempting to authenticate with the Salt Master at 127.0.0.1
16:20 flavio oh...
16:20 flavio salt-key -L returns just a key
16:20 flavio but the name of the machine is different
16:20 obec joined #salt
16:21 flavio but I just realized I changed the hostname on this machine after I installed the salt-minion package
16:21 travisfischer joined #salt
16:21 flavio hence the name is still the old one...
16:21 thedodd joined #salt
16:21 flavio yes, I got it :)
16:21 bhosmer_ joined #salt
16:22 viq flavio: /etc/salt/minion_id
16:22 bhosmer joined #salt
16:23 schimmy joined #salt
16:23 flavio do I have to regenerate the keys?
16:24 viq no
16:24 viq though you'll need to delete the key and accept it again
16:24 viq salt-key -d old_minion_id
16:24 bhosmer joined #salt
16:24 bhosmer__ joined #salt
16:26 flavio thanks viq
16:26 flavio it looks like it's working :D
16:26 felskrone joined #salt
16:27 thayne joined #salt
16:29 jgarr timoguin: the key is accepted and the minion service is running, but manage.status always shows my windows host as down. netstat shows an established connection to the master though. ideas?
16:29 Gareth manfred: ping
16:30 manfred Gareth: yo
16:30 taion809 joined #salt
16:30 Gareth manfred: You're gtmanfred right on github right?
16:31 manfred yessir
16:31 obec joined #salt
16:31 schimmy1 joined #salt
16:32 AdamSewell joined #salt
16:32 Gareth manfred: okay cool.  was just looking at your additions for unless, onlyif and check_cmd.  specifically check_cmd, made a comment on that one, more of a question.
16:33 manfred kk
16:34 rojem joined #salt
16:34 flavio gotta leave. thanks for your help!
16:35 timoguin jgarr: try restarting the minion?
16:35 timoguin other than that i'm not sure
16:36 jgarr timoguin: that's what I tried, also tried running in foreground. Will try with higher logging
16:36 manfred Gareth: you can override the command with whatever you want. if your module has a mod_run_check_cmd, that will be the one that is used instead.  And you can pass whatever you want to it.
16:36 viq I have an even funnier issue. OpenVZ containers, Debian 6 (squeeze) in them. salt-minion works fine on some, but generates _no_ packets towards the master if the openvz host is running Debian 5 (lenny) (and it's still Debian 6 in the container)
16:37 manfred Gareth: otherwise, the default is to just run a command to verify that a state worked
16:37 viq At least that's what I was able to narrow it down to, could be something different
16:37 manfred Gareth: like you could use a file.replace... but have the regex wrong and it thinks it succeeded, even though it acutally failed, you would use a check_cmd: \n - grep 'thing' /path/to/flie to check if it was successfull
16:37 mpanetta Are jinja maps broken in 2014.1.3?  I have a map that used to work in 0.17.5 but now it seems to be broken.
16:38 tligda joined #salt
16:39 mpanetta here is the map: https://gist.github.com/bentwire/b1a233491748180def52
16:39 manfred Gareth: does that answer your question?
16:39 Gareth manfred: maybe.  need to check something.  one sec. :)
16:39 mpanetta For some reason it is getting the logfile path wrong, it is using the one listed under RedHat and not the one under Debian
16:39 manfred kk
16:40 mpanetta same for dbpath and logfile.
16:40 tligda joined #salt
16:41 combusean joined #salt
16:42 zain_ joined #salt
16:42 darkelda joined #salt
16:43 taterbase joined #salt
16:45 n8n joined #salt
16:45 martoss joined #salt
16:46 hunter joined #salt
16:46 yidhra_ joined #salt
16:48 martoss left #salt
16:48 mpanetta Er, apparently salt is finding a file that I have no idea about...
16:49 mpanetta Oops, I was bit by an overlay :P
16:50 martoss joined #salt
16:50 mgw joined #salt
16:53 NoOne-Special joined #salt
16:55 lomithrani_ in In case of file managed  with source if I get the error  "parent directory not present" is it missing on the master or on the minion ?
16:56 lomithrani_ nvm
16:57 lomithrani_ I4m tired , time to go back home :)
16:57 lomithrani_ well no actually it's a real question :(
16:57 Gareth manfred: okay.  think I'm good.  Just need to update my changes to use the same that you used.
16:57 manfred kk :)
16:58 jmccree viq, are your salt-master and minion diff versions?
16:59 viq jmccree: no
16:59 viq Or maybe like 2013.1.4 and 2014.1.3
17:00 jmccree viq, that's probably it. There was a bug recently where new minions would not communicate with old masters.
17:01 viq jmccree: how would the minion know the master is in a different version if it doesn't send any packets to the master?
17:01 combusean joined #salt
17:01 jmccree viq, maybe that's not the issue then.
17:03 serverhorror joined #salt
17:03 viq I'd like to know what is, but I'm not really expecting anyone to try to set up openvz on debian 5 to try and reproduce
17:04 druonysuse joined #salt
17:04 druonysuse joined #salt
17:07 ml_1 joined #salt
17:07 jgarr anyone familiar with salt on windows? Trying to run ntp.get_servers and getting "ValueError: need more than 1 value to unpack" if I try win_ntp.get_servers salt says it's not available
17:08 ser_rhaegar joined #salt
17:08 wendall911 joined #salt
17:08 serverhorror hi, I’m trying a sample with salt. the task at hand is: 2 Fedora Boxes with salt installed from yum (2014.14 actually). now I’d like: install drbd, create a file system, mount it, get to a sane state (order is important here for drbd primary/secondary), put pacemaker on the host, install mysql and a pacemaker resource agent that will take care that mysql only runs on the primary drbd host. I found stuff
17:08 serverhorror about the overstate system that seems it could take care about the inter-host dependencies
17:09 ZombieFe_ joined #salt
17:10 stanchan joined #salt
17:10 serverhorror would overstate be the right firection or am i completely wrong here
17:10 manfred serverhorror: an overstate sounds right
17:10 manfred that is what I do when setting up my glusterfs cluster
17:11 viq if order between hosts is important, then yes, overstate or as I think it's now called orchestrate is the right way
17:11 manfred orchestrate would be the other option
17:11 viq Aren't they the same thing but renamed?
17:11 manfred they are not
17:11 manfred orchestration is the renamed salt-run state.sls
17:11 manfred serverhorror: http://ix.io/cFA
17:12 manfred https://github.com/gtmanfred/salt-states
17:12 manfred that is my overstate for creating a gluster cluster, and the states are included in that git repo
17:13 UtahDave joined #salt
17:14 jmccree manfred, that's pretty awesome. I just salted one of our gluster clusters yesterday.
17:15 manfred jmccree: i wrote the initial gluster states, someone with a lot more knowledge about gluster than me (only been using it about 2 months... and not for anything important), just expanded them to do a lot more
17:16 manfred mine also use the volume_create in the nova module to create block volumes with cinder inside openstack so that gluster can be stored on those
17:16 jmccree We've got an existing gluster on aws, so we just need to do the configs after we attach the multiple 1TB ebs volumes.
17:16 manfred was pretty happy, also just made it so you could store your cloud provider and profiles in pillar data for the cloud module, so now i don't have to copy that stuff to all of my minions each time they start up
17:16 manfred nice
17:17 manfred i need to go through and add the ability to specify a block storage device to be attached on bootup for the nova driver, like aws does by default
17:18 thayne joined #salt
17:20 Valdo joined #salt
17:20 bVector whats it mean when a minion replies with all dashes?
17:21 bVector cent01.minionwhatever.net:
17:21 bVector ----------
17:23 AdamSewell joined #salt
17:24 viq bVector: "output below"
17:25 ZombieFeynman joined #salt
17:25 anuvrat joined #salt
17:29 bVector hrm, below where, thats all it said and then nothing :P
17:30 viq so there was no output ;)
17:30 to_json joined #salt
17:30 bVector thanks for your help, quite odd when you dont know whats going on
17:31 jnials joined #salt
17:32 to_json1 joined #salt
17:32 obec joined #salt
17:32 fragamus joined #salt
17:35 resmike joined #salt
17:38 tligda joined #salt
17:38 to_json joined #salt
17:38 serverhorror manfred: thanks that looks nice I’ll look into it :)
17:39 AdamSewell joined #salt
17:39 resmike joined #salt
17:39 to_json2 joined #salt
17:40 Ryan_Lane joined #salt
17:40 TyrfingMjolnir joined #salt
17:41 ZombieFe_ joined #salt
17:44 ceedon joined #salt
17:44 sandbender1512 joined #salt
17:45 sandbender1512 anyone familiar with custom modules not syncing/working with salt-ssh ?
17:50 elfixit joined #salt
17:53 kmshultz joined #salt
17:53 jnials joined #salt
17:56 CeBe joined #salt
17:56 ramteid joined #salt
17:58 hunter joined #salt
17:59 Gareth manfred: so in theory, the changes you made should make onlyif and unless available without additional code right?
17:59 manfred yes
18:00 manfred it does actually
18:00 ceedon joined #salt
18:00 manfred Gareth: this was the state that I was using to test http://ix.io/cFF
18:01 manfred Gareth: http://ix.io/cFG
18:01 smcquay joined #salt
18:02 manfred Gareth: http://ix.io/cFH and that is without the check_cmd
18:02 manfred Gareth: i have no idea how the stuff is in self.functions... but it is... i remember looking it up before though ...
18:02 manfred ¯\(°_o)/¯
18:03 tligda joined #salt
18:05 ceedon joined #salt
18:06 tligda joined #salt
18:06 cruatta joined #salt
18:08 micko joined #salt
18:12 will_ joined #salt
18:13 FarrisG joined #salt
18:14 quantumriff joined #salt
18:15 jcsp joined #salt
18:15 manfred jj.j/quit
18:15 manfred ...
18:15 cpowell joined #salt
18:16 Gareth manfred: hm. weird.  not working for me.
18:19 bhosmer joined #salt
18:19 bhosmer_ joined #salt
18:19 Gareth manfred: nm.  apparently I hadn't restarted the minion.
18:20 bhosmer joined #salt
18:20 bhosmer_ joined #salt
18:20 austin987 joined #salt
18:20 wt joined #salt
18:21 davet1 joined #salt
18:21 GradysGhost joined #salt
18:24 sandbender1512 anyone have issues related to msgpack and salt-ssh?
18:27 babilen sandbender1512: Do you?
18:27 sandbender1512 indeed :)
18:28 sandbender1512 however I believe I've worked around it - salt-ssh doesn't seem able to pack stuff in /usr/lib64/python (vs. /usr/lib/python) on my system... my msgpack lived in /usr/lib64...
18:28 ninjabox2 joined #salt
18:28 babilen Well, the answer is "Yes" then ;) -- But you are surely rather looking for help to solve your problem.
18:28 sandbender1512 I uninstalled msgpack and installed msgpack-pure instead, which lives in /usr/lib/python.. and now I'm almost at the finish line, heh ;)
18:28 sandbender1512 basepi: around?
18:29 thayne joined #salt
18:32 CeBe joined #salt
18:32 ZombieFeynman joined #salt
18:34 AdamSewell joined #salt
18:34 picker joined #salt
18:36 picker hey Guys, cmd.run:  - name: | cmd1 cmd2 . Only one commands gets run, anything wrong I am doing?
18:36 bhosmer joined #salt
18:37 bVector I would imagine the pipe
18:37 bVector gets interpreted locally
18:37 picker Running on windows minion with 2014.1.3 minions
18:38 picker bVector: Yes they are pipe and each commands on new line
18:38 ser_rhaegar joined #salt
18:41 paletto joined #salt
18:46 manfred Gareth: got it all to work?
18:47 cruatta joined #salt
18:48 Gareth manfred: unless and onlyif, yeah.  testing that check_cmd can overridden now.
18:48 manfred cool
18:49 ghartz_ joined #salt
18:52 felskrone joined #salt
18:52 XenophonF joined #salt
18:53 XenophonF hey UtahDave: I've got a partially working MSI installer, but I've run into problems with my salt build.
18:53 UtahDave XenophonF: cool. what problem are you running into?
18:53 XenophonF UtahDave: do you know exactly what versions of everything you used to create the 2014.1.4 release were?
18:54 joehillen joined #salt
18:54 XenophonF UtahDave: I'm getting all sorts of weird Python errors.  Like, libraries not found and such.
18:54 XenophonF UtahDave: I am building Salt from the v2014.1.4 tag.
18:55 UtahDave are you doing the esky build?
18:55 XenophonF UtahDave: I don't really need to compile salt from scratch in order to create the installer, so I'm just going to continue my work from your binaries.
18:55 XenophonF Yes, I'm using the esky build.
18:55 UtahDave ah, good idea
18:56 UtahDave so the msi builds, but when trying to use it, it fails?
18:56 basepi sandbender1512: am now
18:56 XenophonF yeah, the MSI installer works, files get copied, etc.
18:56 XenophonF but if I try to run salt, it doesn't work
18:56 manfred Gareth: https://github.com/saltstack/salt/pull/13051
18:56 XenophonF let me re-install and get you the errors
18:56 UtahDave XenophonF: can you pastebin the errors?
18:56 UtahDave cool
18:56 XenophonF although like i said, I think it's because my build env is different than what you used for 2014.1.4
18:57 XenophonF UtahDave: I'll pastebin you the diffs between my Salt esky build and what your NSIS installer uses.
18:58 jalaziz joined #salt
18:59 sandbender1512 basepi: working with 2014.1.0... salt-ssh giving me 'Unable to import msgpack..' errors, although the corresponding stderr seems to be related to a KeyError for 'running' in salt/state.py ... any ideas?
18:59 sandbender1512 (I know that's pretty random/vague, sorry, been trying to trace through salt-ssh stuff for a WHILE now and my brain is warped :/)
18:59 basepi sandbender1512: pretty sure that's fixed.  let me see if i can find the ticket
19:00 XenophonF UtahDave: here are diffs between my v2014.1.4 build and what your NSIS installer copies to the computer; ignore the config file differences, naturally - http://paste.debian.net/102090/
19:01 sandbender1512 basepi: awesome thx
19:01 XenophonF ideally, our builds would be identical, but like I said, I think I'm using different versions of the various Salt dependencies than your release engineering team
19:02 UtahDave well, if you're using what I've already built, then that shouldn't matter.  Right?
19:02 XenophonF Yes
19:02 Gareth manfred: /w 37
19:02 Gareth er
19:02 ggoZ joined #salt
19:02 sandbender1512 I can just pull the most recent version/develop version if that makes it easier on you and test w/ that? (although I'd love to see the issue/pull logs/etc if it's in there somewhere... prove to #self that I'm not crazy/stupid ;)
19:02 basepi sandbender1512: hrm, not finding it, but i'm pretty sure it's fixed.  i would try testing on a newer version.
19:03 manfred heh
19:03 sandbender1512 kk will do, thx
19:03 XenophonF UtahDave: so I'm going to carry on using the 2014.1.4 binaries
19:04 UtahDave XenophonF: where's your latest msi file?
19:04 XenophonF and once I have an installer for 2014.1.4, I can worry about syncing up with your develop branch
19:04 UtahDave the wix
19:04 XenophonF UtahDave: https://github.com/xenophonf/salt/blob/msi-installer/pkg/windows/installer/Salt-Minion-Setup.wxs
19:06 UtahDave XenophonF: how do you define where the sourcedir comes from?
19:07 XenophonF for now, that's the manual part - unzip the bdist_esky ZIP file, merge with contents of pkg\windows\buildenv, copy to a folder named "SourceDir"
19:08 AdamSewell joined #salt
19:08 XenophonF then you run the WiX "heat" tool over that directory, and compile and link the output of heat + the wxs file
19:08 XenophonF and it spits out an MSI
19:10 stanchan joined #salt
19:13 UtahDave hm, ok
19:16 XenophonF UtahDave: did you get my email last week? i've got a complete walkthrough with the exact process i followed
19:16 UtahDave let me check
19:17 CeBe joined #salt
19:17 UtahDave Yep, I did.  reading now
19:17 XenophonF but I'll be sure to convert those notes into something more readable
19:19 kermit joined #salt
19:21 ser_rhaegar joined #salt
19:23 defk joined #salt
19:27 XenophonF UtahDave: I need to run, but I'll be back on in about a half-hour.
19:27 UtahDave sounds good.  one real quick question
19:27 UtahDave does installing wix install candle and heat?
19:27 happytux joined #salt
19:29 ZombieFeynman joined #salt
19:29 thayne joined #salt
19:33 ml_1 joined #salt
19:33 quantumriff I have a pillar setup: client: ['client1'].  in a state file, I have a text jinja template, with "clientname: {{ pillar['client'] }}, but when I look at my text file, its putting '['client1']' in the text file (including the square brackets and single quotes)
19:34 UtahDave looks like it does.
19:34 jalaziz joined #salt
19:34 quantumriff is there a simple way to pass its value?  I guess it could be more than one client, but I don't actually  need it for this state
19:34 UtahDave quantumriff: do you have    - template: jinja  in your state file?
19:34 quantumriff yes
19:35 quantumriff UtahDave:
19:35 quantumriff - template: jinja
19:35 quantumriff - context:
19:35 quantumriff clientname: {{ pillar['client'] }}
19:35 stanchan joined #salt
19:37 quantumriff I guess I normally use a "{% for client in pillar['client'] %}"
19:37 quantumriff I can try that
19:38 UtahDave Hmm.  that should work.
19:39 UtahDave quantumriff: what do you have in your templated file?
19:39 quantumriff RequireMembershipOf "ADDomain\\linux_client_{{ clientname }}"
19:40 UtahDave what version of Salt are you on?
19:40 quantumriff utahdave: it becomes: RequireMembershipOf "ADDomain\\linux_client_['client1']"
19:41 quantumriff utahdave: 2014.1.3 for both master and minion
19:41 mgw joined #salt
19:43 UtahDave quantumriff: can you pastebin a sanitized version of your state file?
19:51 quantumriff utahdave:I actually got it working, by putting a "for client in pillar['client']" above the state, and then just passing {{ client }}  Which is probably a bit more robust anyways, in case there ends up being more than one
19:51 ajolo_ joined #salt
19:51 UtahDave OK. I'm still not sure why it wasn't working originally.
19:54 stanchan joined #salt
19:56 dfinn joined #salt
19:56 hunter joined #salt
19:57 hunter_ joined #salt
19:57 quantumriff so second fun question.. I have one setting I change on my dbservers that requires a reboot..  vm.nr_hugepages:
19:57 quantumriff sysctl:
19:57 quantumriff - present
19:57 quantumriff - value: {{ pillar['hugepages'] }
19:58 quantumriff if I create a cmd.wait to watch the vm.nr_hugepages, and then restart the server it if changes, won't that blow up things, because the minion might not answer back before restarting?
19:58 jaycedars joined #salt
19:58 UtahDave quantumriff: Yeah, you'll want to set some flag, either in a grain or a temp file, that you then look for when the server comes back up.
19:59 XenophonF UtahDave: am back, and yes, installing WiX gives you heat, candle, light, etc.
19:59 UtahDave gotcha.
20:00 UtahDave XenophonF: Hm. I think part of the problem you were running into was skipping the sdist and bdist steps
20:01 XenophonF hm
20:02 UtahDave python setup.py sdist    and then     python setup.py bdist   and then python setup.py bdist_esky
20:02 Rojematic joined #salt
20:02 nrgaway joined #salt
20:02 tligda joined #salt
20:02 XenophonF UtahDave: that isn't mentioned in the salt docs (sec 2.2.10)
20:03 XenophonF http://docs.saltstack.com/en/latest/topics/installation/windows.html
20:03 smcquay joined #salt
20:03 UtahDave gah.  can you try building with that?
20:05 eliasp XenophonF: you're packaging salt-minion using WiX as MSI? you're my hero and insane… tried working with WiX once and got mad and gave up after a week or so… MSI (although it's the first attempt to bring basic package management to Win) is completely insane looking at it from a Linux distribution packager's perspective… :)
20:05 UtahDave also, in step 5 you xcopy   buildenv\*.*     Won't that exclude any directories?
20:10 bhosmer joined #salt
20:11 XenophonF eliasp: lionize me only after I deliver something that works :) right now all my MSI package does is copy files to the hard drive
20:11 UtahDave XenophonF: I'm getting a HEAT0321 error.  "The harvest type was not found in the list of loaded Heat extensions."
20:11 eliasp XenophonF: hehe, ok… good luck with that poc… :)
20:12 XenophonF UtahDave: the "/cherky" command copies everything
20:12 AdamSewell joined #salt
20:12 XenophonF UtahDave: can you pastebin a transcript, including your heat command?
20:13 UtahDave http://pastebin.com/yY758XEk
20:14 taion809_ joined #salt
20:14 martoss joined #salt
20:17 martoss1 joined #salt
20:18 XenophonF1 joined #salt
20:20 jalaziz joined #salt
20:21 XenophonF joined #salt
20:21 XenophonF sorry am back
20:21 XenophonF UtahDave: you have to tell heat which kind of harvest it must perform, so "heat dir SourceDir..."
20:22 UtahDave doh. it was right there in your instructions.  I'm not sure why I missed that.
20:23 XenophonF well i missed it the first few times i ran the heat command :)
20:23 stanchan joined #salt
20:23 XenophonF so here's where I'm stuck with the MSI installer
20:24 XenophonF the python files don't actually appear to be relocatable
20:24 XenophonF with salt installed under C:\Program Files (x86)\Salt, I get the following error:
20:24 XenophonF NameError: global name 'salt' is not defined
20:25 UtahDave They are, actually.
20:25 UtahDave How are you starting up salt?
20:25 XenophonF http://paste.debian.net/102110/
20:25 XenophonF that's using the binaries from the NSIS installer
20:27 UtahDave Hm. Let me try.  Just got my msi built.
20:27 XenophonF if I move C:\Program Files (x86)\Salt to C:\Salt, it works
20:28 UtahDave it's probably just a configuration problem.
20:29 XenophonF may be
20:29 eliasp XenophonF: once it works, it might also make sense to use C:\Program Files(x86)\SaltStack\Salt to have a namespace for possible future other SaltStack products/components…
20:29 XenophonF i changed root_dir in the conf file
20:30 XenophonF eliasp: that's a great idea
20:30 XenophonF my preference is for a flatter directory structure though
20:30 UtahDave eliasp and XenophonF: also, I think the var and config directories should go somewhere else, too
20:30 XenophonF UtahDave: ideally, the var and config directories would go under ProgramData
20:30 UtahDave yeah
20:30 eliasp +1
20:32 XenophonF even better would be if Salt logged to the Windows Event Log
20:32 martoss joined #salt
20:33 XenophonF dunno what's possible from Python on Windows
20:33 combusean joined #salt
20:33 UtahDave Yeah, I think it can.
20:33 eliasp similar to journald logging on Linux… planned to work on that once I get around to it…
20:33 eliasp still have to catch up with some other projects first, then I'll get back to some Salt PRs
20:34 mgw1 joined #salt
20:34 possibilities joined #salt
20:35 martoss1 joined #salt
20:36 UtahDave XenophonF: what did you change your root_dir to?
20:36 XenophonF C:\Program Files (x86)\Salt
20:37 XenophonF does it need to be quoted?
20:38 sandbender1512 basepi: if you're still here... fyi there's an email waiting for you ;) (as usual: don't hate me plz)
20:38 martoss joined #salt
20:38 martoss left #salt
20:38 UtahDave XenophonF: I just tried with and without single quotes.  I'm getting the same error you had.
20:39 serverhorror hmmm is there something in salt that compares to puppet facts. What I’m looking for is this: if a mysql formula is applied (and only then) by eg “salt ‘target-host’ state.sls mysql.server” I’d like a grain or pillar (or something I haven’t read about yet) to become available like “is_mysql_server: True” or “role: [mysql-server]”
20:39 XenophonF UtahDave: I wrapped it in single quotes and got it to work.
20:40 XenophonF i should have tried that before
20:40 cruatta joined #salt
20:40 UtahDave serverhorror: Yeah, grains are analogous to puppet facts
20:41 UtahDave XenophonF: really?  that failed for me.  Let me try again.
20:41 UtahDave XenophonF: just root_dir, right?
20:41 XenophonF yup
20:41 XenophonF UtahDave: root_dir: 'c:\Program Files (x86)\salt'
20:41 UtahDave root_dir: 'C:\Program Files (x86)\Salt'
20:41 UtahDave :)  our brains are almost in sync
20:41 XenophonF heh
20:42 UtahDave XenophonF: what's the command you're running in the cli to start it up?
20:42 XenophonF ok now I'm getting a different error: msgpack.exceptions.UnpackValueError: Data is not enough.
20:42 serverhorror UtahDave: except that grains are available to _all_ servers (bad for storing passwords) and pillars aren’t available until explicitely assigned. The ultimate goal would be to install $service if it has all of the expected properties.
20:43 XenophonF UtahDave: I'm starting it from the C:\Program Files (x86)\Salt directory using the command: salt-minion -c "C:\Program Files (x86)\Salt\conf" -l debug
20:43 XenophonF UtahDave: http://paste.debian.net/102113/
20:45 jrdx joined #salt
20:45 serverhorror UtahDave: So the way to go would be: 1) identify candidates with grains 2) distribute/store secure data with a pillar 3) access the secure data on a 3rd client that matches another grain (like is_mysql_server, is_wordpress_db, client_id: very-important-client -> I have access to a pillar that will tell me some mysql credentials) — am I making sense?
20:45 UtahDave XenophonF: Hm. I'm running that exact same thing.  I wonder if I don't have the VS redistributable
20:45 XenophonF i have Visual Studio installed, but not the redistributable
20:46 aw110f joined #salt
20:46 Gareth manfred: so I'm not sure the ability to override those functions is working.
20:47 XenophonF UtahDave: I'm installing the redistributable now, just in case.
20:47 XenophonF UtahDave: didn't fix it :(
20:48 UtahDave XenophonF: try this: https://github.com/saltstack/salt/issues/11777#issuecomment-39607725
20:49 sandbender1512 plastikos: please ping me via email if you see this, I'm sandbender on github (you can get my email there)... thx!
20:49 UtahDave serverhorror: If you are very concerned about the security of your passwords, then you have to use the minion's ID.
20:49 sandbender1512 i'm out - good night/afternoon, salt people
20:49 UtahDave XenophonF: I'm guessing it can't write to whre it thinks the proc directory should be.  It may not even exist
20:50 AdamSewell joined #salt
20:50 XenophonF UtahDave: I deleted C:\Program Files (x86)\Salt\var\cache\salt\minion\proc, but I'm getting the same error.
20:51 XenophonF I don't see a proc directory elsewhere
20:51 basepi sandbender1512: later!  sorry again I wasn't more help!
20:52 UtahDave Yeah, Salt is supposed to be able to write to it.
20:52 mgw joined #salt
20:53 sandbender1512 no worries dude, thx again :)
20:55 BugeyeD joined #salt
20:57 XenophonF UtahDave: I'm going to roll back my dev server
20:57 XenophonF start fresh
20:57 UtahDave OK, XenophonF.  I just tested the esky build I originally did.  Before compiling it to the MSI
20:57 UtahDave I confirmed that it works fine
20:57 XenophonF OK good
20:58 XenophonF so you did python setup.py install, sbuild, bdist, bdist_esky?
20:58 UtahDave with a long path, and I changed the root_dir
20:58 XenophonF is that right?
20:58 UtahDave yeah.
20:58 XenophonF OK
20:58 UtahDave delete the build and dist directories first, too
20:58 XenophonF OK
20:58 mgw1 joined #salt
21:01 stanchan joined #salt
21:01 rojem joined #salt
21:02 masm joined #salt
21:03 savvy-lizard joined #salt
21:04 XenophonF OK all, I need to head out.  I'll work on the MSI installer a little bit more tomorrow.
21:04 serverhorror UtahDave: not much of an option my team alone has ~1500 servers. We have about 10K in total to manage and that would make for quite a large state file. I’ll keep trying I guess I just need to get a better understanding of the concept. The main concerns are: reusability, storing distributing config _data_ (credentials, information about host dependencies and “test groups”/canary groups) and getting rid of
21:04 serverhorror ruby because the vast majority of people is more accustomed with python here
21:05 serverhorror err top state file
21:05 stanchan joined #salt
21:06 ser_rhaegar joined #salt
21:06 nahamu joined #salt
21:08 UtahDave serverhorror: Do you keep your passwords in a central db of some type?
21:08 XenophonF left #salt
21:09 serverhorror puppet code as of now. we are mostly using exported resources (not saying this is a good solution)
21:09 serverhorror there’s a project for storing it with gpg in multiple backend (api, etcd) to get a hold of that…
21:09 UtahDave there's a gpg renderer now
21:10 serverhorror no idea yet wether that could be used as a backend in salt later (something along the lines of gitfs
21:10 UtahDave serverhorror: can you talk me through how you'd like this to work?
21:12 serverhorror UtahDave: the credential storage? sure: all users/hosts have write access and a gpg keypair. The store has only public keys and encrypts a secret to a list of recipients. storage will be in etcd. All clients have read access but given the nature of gpg they can only read their decrypt for what a human has assigned them
21:13 serverhorror so given something like {user: alice, secret: supersecure, tags: [foo, bar, baz] ….} it would result in only the secret be encrypted on the store
21:13 mgw joined #salt
21:13 UtahDave serverhorror: OK, so we already have support for an etcd external pillar, so you can grab the data from there.
21:14 UtahDave and then we now have a gpg rendere, which will let you decrypt the files at the rendere stage.
21:14 * serverhorror begins to think salt may be the thing where we’ll go :)
21:14 UtahDave s/rendere/renderer
21:14 UtahDave here's the etcd external pillar.
21:14 UtahDave http://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.etcd_pillar.html#module-salt.pillar.etcd_pillar
21:16 serverhorror that looks to good to be true :)
21:16 UtahDave And then the gpg renderer is here in the develop branch:  https://github.com/saltstack/salt/blob/develop/salt/renderers/gpg.py
21:16 AdamSewell joined #salt
21:17 eliasp serverhorror: some things (e.g. the GPG renderer) are still in 'develop' (not shipped with the latest release), so you might want to grab individual modules or states and ship them locally until they're available with the next release: http://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
21:17 UtahDave I don't think it's in a full feature release yet, but you could add that to your   /srv/salt/_renderers/   directory on your master and push that out to your minions to use right now
21:20 serverhorror now you just created a bunch of work for me :)
21:20 serverhorror .oO(good thing)
21:21 n8n joined #salt
21:22 ajolo_ joined #salt
21:23 toastedpenguin joined #salt
21:24 manfred Gareth: yuo are right, i realized it while at lunch, I will fix it in a minute
21:26 stanchan joined #salt
21:27 AdamSewell joined #salt
21:27 rojem joined #salt
21:27 * Gareth cracks the whip at manfred
21:27 AdamSewell joined #salt
21:30 possibilities joined #salt
21:33 jesusaurus joined #salt
21:37 jrdx joined #salt
21:37 manfred Gareth: i have it working on the cmd state
21:37 rogst joined #salt
21:39 manfred hrm,... maybe not ...
21:39 kermit joined #salt
21:39 kermit joined #salt
21:42 manfred Gareth: https://github.com/saltstack/salt/pull/13057
21:45 Gareth manfred: cool. let me test that in a second.
21:45 manfred kk
21:58 bhosmer joined #salt
21:58 bVector is there a way to rename minions without rekeying?
21:59 alainv Hey, how would I define a package that I just want to install from files from salt:// ? It's a collection of 3 simple scripts that I want to be able to refer to as a package for `requires:` purposes
21:59 bhosmer joined #salt
22:00 bhosmer_ joined #salt
22:02 chuffpdx joined #salt
22:05 zain_ joined #salt
22:06 Gareth manfred: no luck yet.  unless I'm missing something.
22:07 rgbkrk joined #salt
22:08 redondos joined #salt
22:08 redondos joined #salt
22:09 roolo joined #salt
22:10 [vaelen] joined #salt
22:11 jaimed joined #salt
22:13 ZombieFe_ joined #salt
22:14 druonysuse joined #salt
22:14 druonysuse joined #salt
22:17 bhosmer_ joined #salt
22:17 bhosmer__ joined #salt
22:19 DaveQB joined #salt
22:27 ajolo__ joined #salt
22:30 mateoconfeugo joined #salt
22:32 cruatta joined #salt
22:34 serverhorror alainv: did you have a look at fpm (google: effing package manager jordan sissel) — that will create an actual package for you with a one liner :)
22:36 alainv hm i've heard of fpm but never tried it, thanks for the tip
22:36 toddnni joined #salt
22:40 ser_rhaegar joined #salt
22:41 UtahDave alainv: are you wanting to execute the 3 scripts as well?
22:42 alainv Not immediately, just want them installed in path and an upstart job as well
22:42 tligda joined #salt
22:43 alainv fpm looks like it'll be exactly what i want, though it's unclear right now whether it'll install dependencies from remote for local packages?
22:43 pydanny joined #salt
22:43 UtahDave for the scripts, you could use file.managed to push the scripts down, and then you could do a require on that.
22:44 alainv ah, wasn't sure you could require on those, thanks. that's what I was poking at, but fpm seems a good tool to know
22:45 serverhorror alainv: dangerous channel. you’ll be asking a few (not so?) innocent questions and the next thing you know is you’ll be browsing source code wanting MORE! ;)
22:46 serverhorror at least that just happened to me
22:46 eliasp serverhorror: well, and then at some point you'll end up filing issues + PRs just because it's addictive ;)
22:48 alainv serverhorror: haha, that's the idea :P I could also end up poking whoever's managing the PPA to accept my newer packages...
22:48 manfred Gareth: it is working for me in the cmd state
22:48 manfred Gareth: for check_cmds, you should
22:48 manfred Gareth: for check_cmds, you should just need to include a function in the state file called mod_run_check_cmd()
22:49 Valdo joined #salt
22:50 bhosmer_ joined #salt
22:52 serverhorror eliasp: well I haven’t given up on believing in BCFG2 just for the sake of it being python. I guess I found a replacement….no I just need to get a my drbd sample from before to a sane state and write a small sample renderer. The hard part will be convincing more people to actually try a new tool so that I’m not the only one in the office. So far I have high hopes :)
22:53 serverhorror anyway 0100h… some sleep would be nice the kids have this troubling development of getting up early :(
22:53 serverhorror thank you for the pointers
22:53 eliasp serverhorror: same here… have to catch the last bus
22:53 eliasp good n8 everyone
22:55 Gareth manfred: yeah.  trying that.  does the function need the check_cmd argument included in it's definition?
22:55 mateoconfeugo joined #salt
22:58 jgarr UtahDave: who's the salt on windows expert in irc? :)
22:58 bhosmer joined #salt
22:58 jgarr I really don't need an expert, I'm just trying to figure out the best way to managed a mixed OS top file and also figure out why ntp.getservers fails
22:58 rawtaz joined #salt
22:59 UtahDave jgarr: I've written a large portion of the windows support
23:00 whiteinge ^^ expert
23:00 jgarr when running the modules should I use win_ntp.get_servers? most of the docs just say ntp.get_servers
23:00 jgarr but they returns "not available"
23:01 UtahDave jgarr: let me take a peek at the code
23:01 jgarr actually, ntp.get_servers says "ValueError: need more than 1 value to unpack"
23:01 jgarr maybe because ntp isn't configured on the server?
23:01 UtahDave OK, so win_ntp.py is a virtual module.
23:02 UtahDave so you'll use ntp.get_servers
23:02 UtahDave jgarr: can you pastebin the error you're getting? along with the command you called
23:03 jgarr sure, 1 sec
23:05 jgarr http://pastebin.com/ze4me6Z3
23:05 londo__ joined #salt
23:07 UtahDave jgarr: is ntp not set up yet?
23:07 jgarr I was just going through to verify that
23:08 UtahDave jgarr: do you have access to one of those machines that failed?
23:08 jgarr I probably should have checked first...but that does answer my question that even though the docs says win_ntp the modules are still called with just ntp
23:08 UtahDave If so, can you run this in a terminal?     w32tm /query /configuration
23:10 jgarr query configuration just shows local as the time provider
23:10 UtahDave can you pastebin it?  I want to make it so it doesn't stacktrace
23:11 jgarr UtahDave: hmm, that might be more tricky, copy/paste doesn't work in rdp for me (never figured it out)
23:12 UtahDave That can be a pain in the neck
23:12 jgarr UtahDave: I was able to use ntp.set_servers and it worked for one of the servers
23:12 bhosmer joined #salt
23:12 jgarr and now get_servers also returns the servers
23:12 UtahDave how about open up a browser in rdp?
23:13 jgarr although /query /configuration looks the same after it was set
23:13 jgarr let me get back to it
23:13 UtahDave also, what version of Windows are you on?
23:13 jgarr 2008 r2
23:13 googolhash joined #salt
23:13 UtahDave ok
23:15 jgarr pastebin.com/RFMXSXet <-before using ntp.set_servers
23:16 jgarr http://pastebin.com/P83bjyw2 <-after
23:16 jgarr i didn't compare them side by side so see the difference
23:17 rawtaz joined #salt
23:17 * UtahDave reading
23:17 loque joined #salt
23:19 jgarr UtahDave: while you're reading, two other questions...1. What's the best way to maintain top.sls for windows and linux? I've just been setting all my matches to compound and then G@kernel:Windows or G@kernel:Linux to filter by OS (which is a pain)
23:20 jgarr 2. salt-run manage.bootstrap_psexec doesn't work at all for me (no such file error) and I haven't had luck with using psexec from a windows machine to deploy the exe (it starts but never installs) I wasn't sure if you have experience bootstrapping a Windows environment without going remote with every server
23:22 UtahDave looks like I need to have it check for local
23:23 UtahDave jgarr: would you mind opening up an issue on github for that?  Include that paste, too
23:23 jgarr sure
23:23 UtahDave as far as your other questions...
23:24 UtahDave You're pretty much doing to right thing already.  You use the top file to match what state files get applied whre
23:24 UtahDave The other thing you could do is move some of that checking into the sls files themselves.  So it does one thing on Windows vs something else on Linux
23:25 UtahDave I haven't used the boostrap_psexec either.  Let me look at that.
23:25 cruatta joined #salt
23:25 jgarr in the sls would probably be preferred, but there are so few Windows modules it seems like most of the checking would just get in the way of 90% of the config
23:26 manfred Gareth: it does not, it just needs check_cmd: included in the state definition
23:26 manfred Gareth: if it has that, then it tries to use _run_check_cmd, unless mod_run_check_cmd is available in that salt/states/*.py state file
23:26 jgarr I almost wish you could nest top.sls rules more so I could have base, prod, etc for just Windows and one for Linux (or include files)
23:27 alunduil joined #salt
23:27 manfred Gareth: but you also have to implement the usage of the mod_run_check_cmd function in your state, because it doesn't run it at all, it just refrains from using _run_check_cmd in the state definition
23:27 UtahDave jgarr: you can have multiple top files.
23:27 ajprog_laptop joined #salt
23:27 smcquay joined #salt
23:27 UtahDave salt -C 'G@os:Windows' state.highstate topfile=win_top.sls
23:28 UtahDave (that syntax might be off. verify verify verify)
23:28 googolhash joined #salt
23:28 krow joined #salt
23:28 manfred salt -G 'os:Windows'
23:29 UtahDave jgarr: Is psexec a linux binary?
23:29 manfred works too
23:29 UtahDave manfred: much better, actually
23:30 manfred i sure wish I had brought my phone charger with me...
23:32 jgarr UtahDave: I'm trying to think how highstate would be scheduled between two different top files and how separation would be kept between the OSs
23:32 jgarr that could be a solution, but it just moves the management of keeping separation further up the chain
23:32 UtahDave each top file would match on the appropriate OS
23:32 UtahDave That's true.
23:33 jgarr I'm also trying to think how the states directory would look too
23:33 jgarr I was mostly just trying to see if there was a best practice for mixed environments
23:34 jgarr re ntp, ticket was just opened https://github.com/saltstack/salt/issues/13062
23:34 Gareth manfred: hmm. okay.  that might conflict things for the intended use in file.managed.  the original implentation would run the check against a copy of the intended file, eg. to verify that a daemon would work with a configuration file, if it succeeds then the changes are made to the real file.
23:35 UtahDave awesome, thanks, jgarr
23:35 manfred Gareth: oh... then that is the opposite... this one just checks if the change worked, and if it did, then it marks the state as succeeded or failed
23:38 Outlander joined #salt
23:38 manfred Gareth: if you are trying to see if something would work... are you using a module to check, or just a command? because you could use onlyif to check if it would succeed
23:40 jrdx joined #salt
23:41 TaiSHi Hi, anyone using nginx formulas?
23:43 jgarr UtahDave: thanks for the help. I'm headed home
23:43 pdayton joined #salt
23:43 UtahDave jgarr: I am soon, too.  Have a good evening
23:44 sgviking joined #salt
23:46 Gareth manfred: the use case is config files and verifying that they're valid before putting them in place, so the file needs to written somewhere first to a tmp location, verified with a command, and then if it's valid then write the file into the real location.
23:46 manfred ahhh ok, i missed the point of that one then.
23:47 manfred you can still do that inside of the states, it just serves a different purpose
23:47 manfred do whatever you want inside the file state, just use a mod_run_check_cmd to make sure that it doesn't also run the overall state version
23:48 manfred once you  have that function, you can do whatever you want
23:49 manfred you just do it inside the state, the overall check_cmd won't be run against that state
23:49 stanchan joined #salt
23:50 Gareth manfred: makese sense.  Let me give that a try.
23:55 garthk joined #salt
23:59 hunter_ joined #salt

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