Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-08-18

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

All times shown according to UTC.

Time Nick Message
00:03 aqua^c joined #salt
00:04 Norbell joined #salt
00:04 dthom91 joined #salt
00:09 supersheep joined #salt
00:12 ajmath joined #salt
00:14 scoates joined #salt
00:18 Bryson joined #salt
00:18 ajmath joined #salt
00:25 baweaver joined #salt
00:28 fersur3 joined #salt
00:29 fersur3 I want to use RAET.   Should I use the v2015.5.3 or v2015.8.0rc3 to try RAET or is RAET support the same in both?
00:30 iggy why?
00:31 fersur3 iggy, that information is classified
00:31 iggy ok then
00:35 ajmath joined #salt
00:45 claytron_ joined #salt
00:45 bougie joined #salt
00:59 breakingmatter joined #salt
01:02 DammitJim joined #salt
01:02 jeadr joined #salt
01:03 DammitJim how do I make "decisions" in a state file?
01:04 DammitJim like what config files need to be generated from a template according to the type of server?
01:06 ITChap joined #salt
01:07 ITChap joined #salt
01:07 drawsmcgraw DammitJim: Are you looking for Jinja conditionals?
01:08 DammitJim I guess so... you see... I already have a fairly complicated state file to generate a file from a template to be set up on a particular server
01:08 DammitJim I have a similar configuration for a different server, but with different values to be used by that template
01:08 drawsmcgraw ok
01:08 drawsmcgraw Several routes
01:08 DammitJim trying to make this decision as dynamic as possible w/o making it a mess
01:08 whytewolf DammitJim: typically my own way is to create multple sls files with in a package. and use targeting in top or orch to choose which server what config goes where
01:08 drawsmcgraw For most use cases, my favorite is to put all the logic in the file itself
01:09 drawsmcgraw and whytewolf's idea is good as well.
01:09 DammitJim drawsmcgraw, even if it turns out to be a long ass file?
01:09 zacdev joined #salt
01:09 drawsmcgraw DammitJim: Well, I did say *most* cases :)
01:09 DammitJim :D
01:10 DammitJim I guess I need to make a decision if I want to do your option vs whytewolf 's
01:10 ITChap joined #salt
01:10 DammitJim whytewolf, how would I go about doing this targeting thing?
01:11 drawsmcgraw DammitJim: Here's some basic if/then stuff in the state file: http://dpaste.com/1ADHJFN
01:11 DammitJim like I have defined some pillars already
01:11 drawsmcgraw It gets a bit ugly if you need any more than just the if/then logic.
01:12 whytewolf DammitJim: basicly the same way most formulas work. like take the vim formula. https://github.com/saltstack-formulas/vim-formula
01:12 DammitJim thank you drawsmcgraw ! That is very helpful to what I originally thought
01:14 drawsmcgraw DammitJim: Sure thing. Note that I can't really recommend that for anything more than the most basic setups. If you start having more complex use cases, I'd consider going toward what whytewolf mentioned / linked to
01:15 drawsmcgraw That is, just having several .sls files and using the topfile to fire the correct .sls file at the appropriate minion.
01:15 jalbretsen joined #salt
01:18 DammitJim in that example whytewolf where does it say what state file to use?
01:19 whytewolf DammitJim: in the README, Available states. each of those listed there are items that can be targeted. and for each minion you can change which ones you use
01:21 whytewolf so you would target vim, and say vim.salt on the server you edit sls files on, but leave that off the rest of your servers
01:25 whytewolf in your case you would have say 3 files. app/init.sls app/master.sls and app/secondary.sls in the top file you could have app and app.master or app.secondary you could also put an include at the top of master and secondary to the init and just have one or the other.
01:26 whytewolf this way logic comes down to however you want to build out your top file.
01:27 Furao joined #salt
01:32 shaggy_surfer joined #salt
01:33 aparsons joined #salt
01:36 DammitJim hhmmmm.... still trying to understand this
01:36 DammitJim I need to review the top file tutorial
01:36 DammitJim is that like a pillar?
01:36 Shirkdog joined #salt
01:37 whytewolf DammitJim: anyway you want to target. [which is another reason i go this route] setup a pillar based roles. call minions directly. go off of grains
01:38 DammitJim so, the vim formula is the best example?
01:38 whytewolf it is an example
01:39 whytewolf of spliting up states like that
01:40 dhscholb left #salt
01:45 whytewolf here is a set i use for setting up nova controller and compute nodes differently.[sory this is orchenstrate] https://gist.github.com/whytewolf/ba8c8e1ae9c33d7f042d openstack.nova.controller is a seperate sls file from openstack.nova.compute
01:45 whytewolf openstack just has that many programs that i have it three layers
01:49 whytewolf another reason for this route. if i change the way i target. say move those grains to pillar. I don't have to look very far to know everywhere i made those changes. i can just edit them in the orch [or top file]
01:55 claytron joined #salt
02:12 winkidzz joined #salt
02:19 beauby_ joined #salt
02:24 nyx_ joined #salt
02:25 DammitJim man, I've been reading this whole time and I'm more confused than when I started
02:29 DammitJim am I targeting with pillar?
02:30 favadi joined #salt
02:33 enarciso joined #salt
02:34 DammitJim whytewolf, when you say top file, you are talking about the pillar, right?
02:35 druonysus joined #salt
02:35 druonysus joined #salt
02:37 TronPaul_ joined #salt
02:38 writtenoff joined #salt
02:39 pm90_ joined #salt
02:40 jeadr joined #salt
02:40 writtenoff joined #salt
02:48 viq joined #salt
02:48 viq joined #salt
03:01 jeadr joined #salt
03:09 ITChap joined #salt
03:22 evle joined #salt
03:33 ipmb joined #salt
03:36 mosen joined #salt
03:41 sakaYK joined #salt
03:46 jeadr joined #salt
03:49 breakingmatter joined #salt
04:03 crd joined #salt
04:06 TyrfingMjolnir joined #salt
04:11 seena joined #salt
04:12 seena Guys I am trying to set environment variable
04:12 seena [root@haproxy salt]# cat set_env.sls  environ_s3:  environ.setenv:    - name: access_key    - value: test123    - update_minion: True
04:12 seena this is the content of the state file
04:13 seena salt-call state.sls  set_env  --> I can successfully execute
04:13 seena But  $env not showing this variable
04:17 womble seena: Girls needn't take any notice?
04:20 seena womble: sorry ?
04:23 iggy it only applies to the duration of the current state run iiuc
04:32 womble seena: "Guys I am trying to set environment variable"
04:33 Ztyx joined #salt
04:35 Ztyx joined #salt
04:45 zer0def joined #salt
04:51 jeadr joined #salt
04:54 aparsons joined #salt
04:55 seena joined #salt
04:58 quasiben joined #salt
05:01 clintberry joined #salt
05:01 rdas joined #salt
05:09 catpiggest joined #salt
05:17 Nazca__ joined #salt
05:25 otter768 joined #salt
05:31 calvinh joined #salt
05:31 jeadr joined #salt
05:31 shinshenjs joined #salt
05:38 womble Why would a test=True highstate run produce a bunch of states to be changed, but when I do the same run without test=True, nothing is changed and those same states are reported as being in the correct state?  Not complicated stuff, just file.managed stuff.
05:41 dthom91 joined #salt
05:43 dopesong joined #salt
05:47 mosen heh yeah i have seen the same womble
05:47 mosen but mostly in stuff that cant be determined unless the state is actually run
05:48 TyrfingMjolnir joined #salt
05:52 pfallenop joined #salt
05:52 womble mosen: Not that there should be such a thing (a state whose state cannot be determined), but this is file contents, not exactly rocket science.
05:53 mosen womble: yeah true
05:53 mosen it depends on the implementation of the state and how it deals with test=True
05:55 mosen file.managed shouldnt be ambiguous
05:55 mosen I always get that problem with yumrepo
05:58 womble Huh, this is weird, too: some of the file.managed states with "The file <filename> is in the correct state" are green, and some are yellow.  Just to add to the confusion.
05:58 SheetiS joined #salt
06:02 Fiber^ joined #salt
06:02 bitc01d joined #salt
06:06 colttt joined #salt
06:08 mosen I think yellow should mean that something would have happened, but you were in test mode
06:09 mosen but then a majority of states are green even when test=True. I'm not clear on that
06:12 ramteid joined #salt
06:20 Furao_ joined #salt
06:22 malinoff joined #salt
06:22 lb1a joined #salt
06:26 AndreasLutro joined #salt
06:28 pfallenop joined #salt
06:28 pfallenop joined #salt
06:36 rodio_ua joined #salt
06:36 rodio_ua left #salt
06:49 KermitTheFragger joined #salt
06:50 katyucha joined #salt
06:58 Ztyx joined #salt
07:15 linjan joined #salt
07:17 kawa2014 joined #salt
07:24 Ztyx joined #salt
07:26 otter768 joined #salt
07:26 mattiasr joined #salt
07:27 eseyman joined #salt
07:27 jbrnds joined #salt
07:28 breakingmatter joined #salt
07:31 bastiandg joined #salt
07:35 mens joined #salt
07:41 impi joined #salt
07:42 ITChap joined #salt
07:45 mens joined #salt
07:46 jbrnds Q: how can i direct salt to install a 'dev' or 'db' from a single vagrantfile? Do I need to have multiple provisioner blocks in there?
07:46 jbrnds ... or can I pass a certain 'profile' to salt so it will install the right server based on a match in top.sls
07:48 AndreasLutro jbrnds: not really a salt question, but do multiple config.vm.define "name-of-vm", set the hostname/private ip inside the closure and match on that
07:49 jbrnds AndreasLutro indeed it is a vagrant/salt q. (asked it in #vagrant as well). That is a good idea. set hostname of vm and match within salt. great tip
07:52 mens joined #salt
07:54 ksj joined #salt
07:57 ITChap joined #salt
07:58 mens joined #salt
07:58 bitc01d joined #salt
08:08 jeadr joined #salt
08:09 s_kunk joined #salt
08:14 GreatSnoopy joined #salt
08:16 Xevian joined #salt
08:18 linjan joined #salt
08:19 jeadr joined #salt
08:19 gcfhvjbkn joined #salt
08:21 rodio_ua joined #salt
08:21 rodio_ua left #salt
08:34 garphy`aw joined #salt
08:36 jbrnds joined #salt
08:38 jbrnds joined #salt
08:41 thefish joined #salt
08:41 jeadr joined #salt
08:44 supersheep joined #salt
08:47 jbrnds joined #salt
08:51 jbrnds in salt you have different environments "base", "dev", "prod" (http://docs.saltstack.com/en/latest/ref/configuration/minion.html#file-roots) how can I use them to initiate a certain minion. Is is based on the servername?
08:52 AndreasLutro jbrnds: environments are optional, and I would avoid them until you're more experienced with salt and know for sure that you'll need them
08:53 supersheep joined #salt
08:55 supershe_ joined #salt
08:56 lb1a joined #salt
09:11 cptmashek left #salt
09:17 breakingmatter joined #salt
09:27 otter768 joined #salt
09:34 msciciel joined #salt
09:45 Tiriel joined #salt
09:45 Tiriel Hello
09:46 jeadr joined #salt
09:46 Tiriel Is there any way of parameterizing salt mine functions
09:47 Tiriel Something like mine_functions:   network.ip_addrs: [{{ adapter }}]
09:48 Tiriel So I could do salt['mine.get']('*', network.ip_addrs('eth0'))
09:51 jakubm joined #salt
09:51 jakubm morning.
09:52 jakubm basepi: the topic is slightly out of date. bump up salt version please :)
09:58 mens joined #salt
10:07 dRiN joined #salt
10:16 ITChap Hi everyone
10:17 ujjain joined #salt
10:17 ujjain joined #salt
10:18 ITChap is {% if mydic.mykey %} enough to test if a key exist in my template ?
10:18 AndreasLutro ITChap: it'll error if mydict doesn't have mykey. use {% if 'mykey' in mydict %} instead
10:19 ITChap AndreasLutro: Thank you :)
10:21 ITChap in the case where I iterate using "for", do i need to test the key before ?
10:21 ITChap or all the for block will not be interpreted in case the key doesn't exist in the dict ?
10:21 Tiriel Another one, how does one pass positional parameters to mine functions? I'm getting no luck
10:22 ITChap Tiriel: positional parameters Oo
10:22 ITChap what do you mean
10:23 DanyC joined #salt
10:26 Tiriel well, take the documentation example with network.ip_addrs, that function takes named parameters, so there's no problem defining the mine function, mine_function: network.ip_addrs     cidr: 192.168.0.0/16
10:27 Tiriel But what happens when the parameter is not named, e.g. on network.interface_ip
10:27 Murgi joined #salt
10:27 lothiraldan joined #salt
10:34 cppking joined #salt
10:34 Tiriel Oh, nevermind, I wasn't getting results because I forgot to refresh the pillar :@
10:34 rofl____ whats the latest on 2015.8 ?
10:34 rofl____ any announcements?
10:35 cppking hello guys , I got a weird problem , https://bpaste.net/show/56de44025279
10:38 AndreasLutro cppking: the gluster command needs to be available on the target system
10:38 cppking AndreasLutro:  they're the same host
10:41 AndreasLutro cppking: doesn't change my answer
10:43 cppking AndreasLutro:  but why  salt "*" selinux.getenforce   prompt "module selinux is no available ' as same
10:43 giantlock joined #salt
10:44 AndreasLutro cppking: https://github.com/saltstack/salt/blob/2015.5/salt/modules/selinux.py#L25-L61
10:46 the_lalelu cppking: selinux module is maybe not available because there are some packages/commands missing? Like semanage and setsebool ..
10:46 the_lalelu cppking: same for glusterfs
10:47 cppking the_lalelu:   they are all there
10:48 cppking semanage and setsebool
10:48 the_lalelu cppking: what distribution?
10:49 cppking centos6.5
10:49 the_lalelu cppking: so pkg policycoreutils-python and pkg policycoreutils is installed?
10:50 cppking yes, I've checked
10:51 the_lalelu cppking: ok, the paths /sys/fs/selinux and /selinux exists?
10:51 cppking no
10:52 the_lalelu ah ok, then this is your problem
10:52 the_lalelu the __virtual__ function checks this and if the paths not exists the module will not load
10:52 cppking why selinux would check the paths
10:53 jakubm joined #salt
10:53 jbrnds can i use the file.symlink state with multiple names? how do I point them to consecutive targets?
10:53 the_lalelu cppking: not selinux, the saltstack selinux module checks this
10:54 cppking the_lalelu:  thx a lot ,  good night
10:54 jbrnds cppking, good night !? we're only halfway (in EU)
10:54 the_lalelu cppking: no problem
10:54 cppking here is  GMT +8:00 China
10:55 cppking it's about 19:00,  it's time to get off work
10:57 impi joined #salt
11:00 evle joined #salt
11:00 bluenemo joined #salt
11:06 breakingmatter joined #salt
11:10 jhauser joined #salt
11:12 jhauser_ joined #salt
11:12 ashmckenzie joined #salt
11:12 kawa2014 joined #salt
11:13 sunkist joined #salt
11:17 yomilk joined #salt
11:19 nyx_ joined #salt
11:22 jbrnds can i use the file.symlink state with multiple names? how do I point them to consecutive targets?
11:23 jakubm joined #salt
11:28 otter768 joined #salt
11:29 TyrfingMjolnir joined #salt
11:29 Grokzen joined #salt
11:32 CeBe joined #salt
11:35 glyf joined #salt
11:37 zer0def joined #salt
11:45 agend joined #salt
11:45 unusedPhD joined #salt
11:46 glyf hi all, I have a question about writing custom execution modules. Is there a way to get salt to reload modules while I'm developing, so I don't have to keep calling saltutil.sync_modules?
11:51 DammitJim joined #salt
11:53 TronPaul_ joined #salt
11:54 XenophonF joined #salt
11:57 ingslovak joined #salt
11:59 fxhp joined #salt
11:59 jbrnds Q: i have a problem with mapping jinja and using that to create symlinks (file.symlink). see http://dpaste.com/3YNTVNT
11:59 DanyC Anyone knows if i can install a yum pkg via salt but w/o pulling down dependencies rpms ?
12:00 jbrnds ... it gives mapping not allowed 'here'. however it seems that the template is rendered correctly
12:01 AndreasLutro jbrnds: you're missing a colon at the end of line 10
12:02 jbrnds noooo! could have sorted that out myself... thanks! AndreasLutro
12:02 rideh joined #salt
12:03 yomilk joined #salt
12:09 nicksloan joined #salt
12:09 nyx_ joined #salt
12:09 nicksloan for ec2 in salt-clooud, does the security group, private key, etc need to be configured on the provider, or can it be configured on the profile?
12:13 XenophonF nicksloan: let me see if i can't post an example config for you
12:14 nicksloan XenophonF: well, I have a working configuration myself
12:14 icflournoy joined #salt
12:15 nicksloan but my original configuration had the securitygroupid property on the provider... I decided that it would be better suited on a profile, since different types of instances ought to be a part of different security groups.
12:15 DammitJim can someone explain the difference between the top file for pillar vs state?
12:15 XenophonF nicksloan: in my ec2 provider config, i have specified minion:master, ssh_interface, id, key, private_key, keyname, and location
12:15 XenophonF nicksloan: everything else goes into the profile
12:15 DammitJim I am looking to target certain machines to use certain state files (that are in the same directory)
12:16 gazarsgo joined #salt
12:16 XenophonF DammitJim: the states/top.sls file assigns states to minions based on matching rules
12:16 XenophonF DammitJim: and the pillar/top.sls assigns pillars to minions based on matching rules
12:16 pm90_ joined #salt
12:17 nicksloan XenophonF: yeah, that's what I thought. That makes profiles useless to me... there is absolutely no value in separating them from providers
12:17 AndreasLutro eh?
12:17 XenophonF nicksloan: i'm using multiple aws locations
12:17 DammitJim XenophonF, ok, so I need to do this on the states top file
12:17 nicksloan in reading the docs, I thought providers were meant to be the driver configuration, and profiles were meant to be the instance configuration
12:17 XenophonF nicksloan: so it's nice to have separate profiles
12:17 XenophonF but ymmv
12:17 XenophonF DammitJim: correct
12:18 jakubm joined #salt
12:18 AndreasLutro nicksloan: that's correct, for example you provide the linode api key in the provider/driver, and which instance type to use in the profile
12:18 DammitJim man, that's confusing
12:18 DammitJim so, that would mean that in salt one has to go to the 2 different top files to figure out what the heck is going to happen to one machine?
12:19 jeadr joined #salt
12:19 DammitJim I guess I don't like the fact that decisions are being made in so many different places
12:19 DammitJim but maybe that's just a perception?
12:19 mikepea joined #salt
12:19 XenophonF DammitJim: possibly - they are two different sets of data
12:19 nicksloan AndreasLutro: but if my instances have different security groups, and I'm required to specify a security group in the provider, it seems like I have to make a second, redundant provider anyway
12:19 DammitJim oh, but with pillars, one doesn't say what state to run, correct?
12:20 DammitJim there is no way to do that
12:20 XenophonF DammitJim: pillar data is separate from state data
12:20 lrojas joined #salt
12:20 DammitJim but can't one influence the other?
12:20 AndreasLutro nicksloan: I'm not familiar with the ec2 provider but yes, that seems to be the case
12:20 XenophonF DammitJim: maybe a concrete example will help you
12:20 nicksloan if I have 10 instance types, I ought to be able to get away with 10 profiles, and 1 provider. Instead, I have to write 10 instances and 10 providers
12:20 nicksloan seems like a very bad api.
12:21 AndreasLutro nicksloan: maybe what you want to do is a somewhat unusual use-case? you could of course submit a feature request for security groups etc in profile
12:21 nicksloan s/instances/profiles/
12:21 XenophonF DammitJim: goto https://github.com/irtnog/salt-states and https://github.com/irtnog/salt-pillar-example
12:21 XenophonF nicksloan: i have 10 instance types for EC2 in EU-West-1, and only 1 profile
12:22 nicksloan XenophonF: but they all use the same security group, I take it?
12:22 DammitJim thank you XenophonF ... I'll take a look at it
12:22 AndreasLutro DammitJim: the idea is that pillars provide arguments/data to states - consider this example https://bpaste.net/show/f6139bd67bec
12:22 XenophonF nicksloan: here's how i have structured my ec2 configs
12:23 yomilk joined #salt
12:24 XenophonF nicksloan: i have generic provider settings for each AWS root account, e.g., 'irtnog', and i have a provider configured for each region i'm in that inherits those root provider settings and sets the location (region), e.g., 'irtnog-ireland', 'irtnog-virginia'
12:25 glyf joined #salt
12:25 XenophonF nicksloan: that goes into one provider config file, e.g., cloud.providers.d/irtnog.conf
12:26 DammitJim XenophonF, that makes sense... in my case, the data that I am using for the templates is already in my state file therefore, I cannot provide the arguments/data from pillars
12:27 zacdev joined #salt
12:27 XenophonF nicksloan: next, i have base instance configs for each VPC/subnet, e.g., irtnog-ireland-development-centos7, irtnog-ireland-development-windows2012r2, irtnog-ireland-development-freebsd10, etc.
12:28 neilfse__ joined #salt
12:28 DammitJim silly question... what if I don't have a top.sls for my states?
12:28 XenophonF nicksloan: and then i have however many additional profiles i need that extend the corresponding base profiles
12:28 DammitJim I just realized that... I only have a top.sls for my pillars
12:29 XenophonF nicksloan: which is all in one profile config file, e.g., cloud.profiles.d/irtnog.conf
12:29 DammitJim this is so silly of me. I have been running my states "manually" if I am to use this top.sls, I'll have to run top, right?
12:29 XenophonF nicksloan: and then of course there's cloud.map.d/irtnog.conf, which lists out my instances and their corresponding profiles
12:30 XenophonF nicksloan: so there's a lot of common configs across regions
12:30 AndreasLutro DammitJim: salt 'name-of-minon' state.highstate
12:30 DammitJim I mean, highstate
12:30 AndreasLutro or state.apply
12:30 XenophonF nicksloan: so my salt-cloud configs are jinja templates
12:30 hillna joined #salt
12:31 XenophonF nicksloan: so yeah, security groups and networks and VPCs have different IDs across regions, but the instance configs are all the same, so i just iterate over the set of VPC/subnet/security groups for each region and fill in the blanks
12:31 XenophonF couple of for loops
12:32 Murgi joined #salt
12:32 XenophonF oh, AMI IDs, too
12:32 giantlock joined #salt
12:32 czchen joined #salt
12:33 XenophonF so cloud profile irtnog-virginia-development-centos7-wordpress == irtnog-ireland-development-centos7-wordpress in that both instances are configured to run the same version of linux with the same ports open to the internet with the same amount of disk space in the same instance type
12:34 XenophonF and if i tweak the base config (in Git), the next time I run a highstate on the master, it re-runs the template and re-generates the config
12:34 XenophonF nicksloan: does that all make sense?
12:34 Number6 left #salt
12:35 lkannan joined #salt
12:35 XenophonF i can't show you my actual configs because that's all for work
12:35 XenophonF and i don't have examples yet in my personal github org
12:35 DammitJim XenophonF, in your example, is websites.web01 the name of the server?
12:35 nicksloan XenophonF: Yeah, I think I get it, and I understand about not showing configs
12:35 basepi joined #salt
12:36 lothiraldan joined #salt
12:36 nicksloan XenophonF: also, thank you for highlighting me through all of that. My client made you and DammitJim the same color, so it would have been a PITA to track the conversations otherwise.
12:36 XenophonF DammitJim: no my server names follow a pattern like 'uxeprdbsdmx01', uxe==UN LOCODE for Mason OH, prd==service level agreement, bsd==operating system, mx=function
12:37 frankS2 joined #salt
12:37 XenophonF DammitJim: in my configs i key off the minion ID to assign it a role and an environment
12:37 AndreasLutro DammitJim: you mean my example? :p
12:37 DammitJim oh AndreasLutro yes, your example LOL
12:37 XenophonF oh whoops got wires crossed, sorry AndreasLutro, DammitJim
12:38 DammitJim XenophonF, no, I'm the one with the wires crossed... I need to get more coffee (this one is cold)
12:38 DammitJim https://bpaste.net/show/f6139bd67bec <- talking about this example... websites.web01 is a server name, right?
12:38 AndreasLutro DammitJim: websites.web01 is just a reference to /srv/pillars/websites/web01.sls - the minion name would be "web01" etc
12:38 AndreasLutro of course this is grossly simplified
12:38 DammitJim wait, so I can assign states in pillar?
12:38 XenophonF nicksloan: i'm using https://github.com/saltstack-formulas/salt-formula to manage my salt master configs
12:38 AndreasLutro no
12:39 XenophonF nicksloan: and that includes the salt-cloud configs
12:39 DammitJim I'm confused AndreasLutro
12:39 AndreasLutro well you can, if you iterate through pillar data in the state top.sls
12:39 XenophonF nicksloan: i'll see if i can clean up our configs at work and post an example
12:39 AndreasLutro DammitJim: elaborate on your confusion!
12:39 XenophonF DammitJim: you cannot assign states from the pillar/top.sls
12:39 rdas joined #salt
12:40 DammitJim from what you have in your example AndreasLutro, pillar's top.sls says if you are web01, assign state websites.web01
12:40 XenophonF DammitJim: however, you can use pillar data in states/top.sls to make state assignments
12:40 AndreasLutro DammitJim: no, the pillar websites.web01
12:40 DammitJim oh, sorry... I need to calm down
12:40 nicksloan XenophonF: no need to go to the trouble... I think I tracked what you were saying.
12:40 AndreasLutro pillar top.sls = pillars, state top.sls = states
12:40 DammitJim I'm a mess... I need to go for a walk
12:40 DammitJim :D
12:40 XenophonF :)
12:41 DammitJim AndreasLutro and XenophonF my deepest apologies and a greatful thanks
12:41 XenophonF no need to apologize!
12:41 AndreasLutro no need to apologize
12:41 AndreasLutro :)
12:41 XenophonF jinx! ;)
12:41 DammitJim I'm just glad you guys are here... last night around 11pm EST this channel was dead
12:41 DammitJim never seen it so dead... usually very active
12:41 XenophonF DammitJim: you gotta ask questions if you're going to learn anything
12:42 dyasny joined #salt
12:42 XenophonF DammitJim: how long have you been using Salt?
12:43 DammitJim I've been reading for like 6 months
12:43 DammitJim actually messing with it about 3 months
12:43 XenophonF hah that's great!
12:43 DammitJim but very very slowly
12:43 DammitJim funny thing is that one can read all docs but until you actually are challenged with a real life problem, none of that makes full sense
12:43 DammitJim it makes some sense, but not full sense if that makes any sense :D
12:43 XenophonF it took me a while to wrap my head around states, and then a while longer to understand pillars, and lots of experimentation and questions and mistakes along the way
12:43 XenophonF you'll get it
12:44 AndreasLutro DammitJim: the docs are pretty poorly structured... imo it's best to just set up some VMs and experiment
12:44 collinanderson joined #salt
12:45 DammitJim yeah that's what I've been doing... lots of snapshots ;)
12:46 DammitJim what's the ML used for defining states?
12:47 XenophonF DammitJim: ML?
12:47 AndreasLutro markup language? yaml+jinja
12:47 DammitJim yaml!
12:47 DammitJim thanks
12:47 XenophonF oh
12:47 DammitJim I"m looking for a vim plugin for it
12:47 DammitJim gotta have the right tools for the right job ;)
12:47 AndreasLutro https://github.com/saltstack/salt-vim
12:47 XenophonF then why are you using vim?!
12:47 DammitJim OUCH!
12:47 * XenophonF grins ducks and runs
12:48 XenophonF inveterate emacs user here
12:48 XenophonF i'll say this, proper editor support goes a long way
12:48 scthi joined #salt
12:48 DammitJim emacs is also a very good tool
12:48 XenophonF i'm completely comfortable in either emacs or vi, but training my staff, who normally use notepad at best, has been a real challenge
12:49 DammitJim oh yeah
12:49 XenophonF like, i'm seriously stymied by their lack of familiarity with what i consider basic tooling
12:49 DammitJim I can understand how frustrating it is at the beginning, though
12:49 XenophonF unix or windows
12:49 XenophonF like, before i can teach them salt, i need to teach them the command prompt
12:50 XenophonF and a proper text editor like notepad++ or something (emacs... we'll leave that for later, eh?)
12:50 jbrnds Q. I cannot seem to match on a hostname (grain) within top.sls. see http://dpaste.com/34P8612.
12:51 XenophonF jbrnds: is the minion id not the same as the hostname?
12:51 XenophonF jbrnds: a grain match on the hostname would look like 'hostname:*-web': - match:  grain
12:51 jbrnds uhm the minion id is not set.
12:52 Sketch the last time i tried notepad++, it would totally screw up formatting in python, so i'm not sure i'd use it for salt...
12:52 XenophonF jbrnds: try running salt '*' grains.get hostname
12:52 jbrnds XenophonF, the minion id is "id:        debian-jessie.vagrantup.com" (retrieved from grains.items)
12:53 XenophonF jbrnds: so the default match uses the minion ID
12:53 AndreasLutro you may need to restart the minion for the id to update... but do make sure the minion id isn't set in /etc/salt/minion
12:53 XenophonF so those globs '*-test' and '*-dev' won't work if your minion IDs follow a different pattern
12:54 kukacz joined #salt
12:54 jbrnds XenophonF, the hostname is not available, however host is set. Will try adding - match:grain
12:54 XenophonF that's not enough
12:54 XenophonF jbrnds: you have to pick the grain (variable) whose contents you want to match against
12:55 XenophonF e.g., 'host:*-dev' and then "    - match: grain" on the next line
12:55 DammitJim AndreasLutro, in your example, web* refers to the minion name to assign the state webserver, right?
12:55 XenophonF hang on let me find the right bit in TFM for you
12:55 AndreasLutro DammitJim: correct - the webserver state could for example install nginx and set up vhosts for all websites defined in the pillar data
12:55 breakingmatter joined #salt
12:55 XenophonF jbrnds: http://docs.saltstack.com/en/latest/ref/states/top.html#other-ways-of-targeting-minions
12:56 favadi joined #salt
12:56 XenophonF jbrnds: i make heavy use of compound pillar matches as well as a few compound pillar+grain matches, see https://github.com/irtnog/salt-states/tree/master/top.sls
12:57 XenophonF jbrnds: here's an example of a compound match using both a pillar key and a grain - https://github.com/irtnog/salt-states/blob/master/top.sls#L84
12:57 jbrnds XenophonF, thanks. Will check it out. Still have the problems. Running in masterless mode. Could that have anything to do with grains not correctly initialising?
12:58 XenophonF jbrnds: i'm not familiar with masterless mode. sorry, i wish i could help.
12:58 fgimian joined #salt
12:59 XenophonF i think there's a bunch of folks from the west coast that use it that way, but they aren't online until later
13:03 VR-Jack2 joined #salt
13:03 cpowell joined #salt
13:05 jbrnds XenophonF, got it! with - match: grain (not match:grain, nor match: grains -- mind the spacing and 's')
13:05 jbrnds will update the dpaste
13:06 XenophonF jbrnds: great!
13:06 XenophonF yeah, the spacing in yaml is significant
13:09 teryx510 joined #salt
13:11 jdesilet joined #salt
13:11 VR-Jack joined #salt
13:12 _JZ_ joined #salt
13:14 jakubm joined #salt
13:15 racooper joined #salt
13:17 glyf joined #salt
13:20 edrocks joined #salt
13:22 glyf joined #salt
13:22 mapu joined #salt
13:22 kukacz joined #salt
13:29 subsignal joined #salt
13:29 otter768 joined #salt
13:32 DanyC XenophonF: i've been reading what you wrote, thumb up for the easy to follow explanation. And btw ti like your repo, easy things with big impact.... i wish there was a way to get all nice use cases into documentation or wiki so everyone can go to Salt website and look at.
13:33 arthoo joined #salt
13:34 XenophonF DanyC: glad to hear those repos are useful. i'd love to see other people's configs, too. from the discussions and pastes thrown around here, it seems like there are some very different approaches to configuration management
13:35 bhosmer joined #salt
13:35 XenophonF on the one hand, all those approaches showcase salt's flexibility and expressiveness---which are very good things!
13:35 XenophonF but on the other hand, it can be a bewilderingly steep learning curve
13:37 neilfse__ joined #salt
13:37 XenophonF more end-to-end example configs would be really helpful to the whole saltstack user community, especially from deployments that fit into larger IT operations frameworks like ITIL or MOF (which is the angle i'm coming from)
13:37 onovy joined #salt
13:39 XenophonF hell, all of the different config management systems out there would benefit from having a couple of fully realized, end-to-end example configs
13:39 hillna joined #salt
13:40 mohae joined #salt
13:42 czchen joined #salt
13:44 hasues joined #salt
13:44 mpanetta joined #salt
13:44 hasues left #salt
13:45 lkannan joined #salt
13:46 basepi joined #salt
13:46 lrojas XenophonF: agreed
13:47 jeadr joined #salt
13:47 frankS2 joined #salt
13:49 murrdoc joined #salt
13:50 bluenemo joined #salt
13:51 XenophonF ok, python-github-webhooks is deployed, salt-api is deployed.  now, to figure out how to wire github into my salt master...
13:51 XenophonF might have to take a look at reactor next
13:54 Akhter joined #salt
13:54 yomilk joined #salt
13:55 supersheep joined #salt
13:57 collinanderson joined #salt
13:57 dthom91 joined #salt
13:57 nicksloan salt-bootstrap seems to be sucking for me on debian jessie
13:57 DanyC XenophonF: 100% fully agree with you on that. At the end no matter which path we go everyone will hit the same problem to solve and so imo having E2E examples (from low difficulty -> high difficulty)  will help a lot everyone to realise what Salt can do vs others. In ohter words understand the benefit of masterles vs agent and if ansible (which i love it btw) solve the problem a person has. For example the reacotor/ beacon this are thin
13:58 pravka joined #salt
13:58 nicksloan I see one open issue for it, but the discussion is kind of confusing, and it sounds like the issue is supposed to be resolved.
13:58 _pravka_ joined #salt
13:59 XenophonF nicksloan: can you post a transcript or log or something?
13:59 nicksloan I'm getting the debug output now
13:59 DanyC XenophonF: however i believe with a bit of effort will push Salt all the way through the finish line on first position if  you include Salt API etc ... hopefully the cleaver Salt core developers will show some love in this area
13:59 nicksloan seems to be systemd related
14:00 monkey66 left #salt
14:00 zipkid joined #salt
14:02 ramishra joined #salt
14:06 Tritlo joined #salt
14:08 andrew_v joined #salt
14:08 favadi joined #salt
14:09 stephanbuys joined #salt
14:10 jchadwick joined #salt
14:11 pm90__ joined #salt
14:11 jakubm joined #salt
14:14 gchao joined #salt
14:17 kutenai joined #salt
14:18 glyf joined #salt
14:19 bhosmer joined #salt
14:20 kukacz joined #salt
14:21 nicksloan Here is the log from salt-cloud with the -D flag on salt-bootstrap
14:21 nicksloan https://gist.github.com/nicksloan/19fa48947825372b5d10
14:21 mythus joined #salt
14:23 shawnbutts joined #salt
14:24 glyf joined #salt
14:24 lumtnman joined #salt
14:28 * ze- looks at topic. Looks at 2015.5.4 being out...
14:28 jeadr joined #salt
14:29 SteamWells joined #salt
14:32 zsoftich2 joined #salt
14:33 dthom91 joined #salt
14:34 ze- anyone has ideas how long before .deb for 2015.5.4 would be available ?
14:34 VooDooNOFX joined #salt
14:37 VR-Jack2 joined #salt
14:38 murrdoc i d say 2 weeks
14:39 VR-Jack2 usually. Hmm. Sadly my salt-ssh fix for sudo/tty didn't make it.
14:39 VR-Jack2 I'll blame basepi
14:39 teryx510 joined #salt
14:39 Kelsar joined #salt
14:41 * AndreasLutro runs off the latest git head
14:42 VR-Jack2 I'm currently running off a packaged 2015.5 git head
14:43 supersheep joined #salt
14:43 penguin_dan joined #salt
14:44 perfectsine joined #salt
14:45 murrdoc http://docs.saltstack.com/en/stage/topics/releases/2015.5.4.html is out
14:45 murrdoc did u mean in package repos ?
14:45 tjs joined #salt
14:46 Kelsar joined #salt
14:46 jalbretsen joined #salt
14:48 dlloyd joined #salt
14:50 scoates_ joined #salt
14:50 claytron joined #salt
14:50 tjs hello folks.  i'm trying to set up salt-ssh as a quick way to allow us to simply do some auditing for now ... but we have centos 5/6/7, windows, solaris 10 x86, solaris 10 sparc... and it looks like salt-ssh doesn't seem to handle the different platforms well.
14:51 tjs i read in at least one github issue that windows isn't supported by salt-ssh ... but what about the others?
14:51 tjs is it expected to work cross-platform?
14:52 jeadr joined #salt
14:52 clintberry joined #salt
14:52 AndreasLutro tjs: yes
14:52 mitsuhiko_ joined #salt
14:52 pmcg_ joined #salt
14:53 Shirkdog_ joined #salt
14:53 tjs part of my problem, i suspect, is that each of these platforms just has the basic python distribution ... so i'm relying on the thin tarball for all of the depedencies.
14:53 nkuttler_ joined #salt
14:54 Kelsar_ joined #salt
14:54 ws2k3_ joined #salt
14:54 mkillebr1w joined #salt
14:54 mitsuhiko_ joined #salt
14:55 dyasny joined #salt
14:56 codehotter How does it work with salt merging branches forward to develop?
14:56 codehotter When does it happen? Is there any rhythm to it?
14:56 AndreasLutro codehotter: not really!
14:56 druonysus joined #salt
14:57 tedski- joined #salt
14:58 Ahrotahn1ee joined #salt
14:58 codehotter For example, a bug was fixed in 2015.5, but it's still in 2015.8 and develop
14:59 codehotter So would it first be forward merged to develop, then backported to 2015.8? What's the flow?
14:59 AndreasLutro nah
14:59 AndreasLutro it'd be merged into 2015.8
14:59 AndreasLutro then 2015.8 merged into develop
15:00 AndreasLutro usually at the same time
15:00 rogst joined #salt
15:00 Kelsar joined #salt
15:00 AirOnSkin joined #salt
15:00 codehotter Hmm, so 2015.5 is merged into 2015.8?
15:01 und1sk0 joined #salt
15:01 evle joined #salt
15:01 daemonkeeper joined #salt
15:01 AndreasLutro yes
15:02 pviktori joined #salt
15:02 Ssquidly joined #salt
15:02 kaictl joined #salt
15:02 codehotter Hmm, I need a feature that's in develop, but a bugfix that's in 2015.5 =(
15:03 codehotter I'll just work with patches for now
15:03 AndreasLutro well, there was a merge forward only 8 hours ago
15:03 ze- joined #salt
15:04 codehotter from 2015.8 to develop, but not from 2015.5 to 2015.8, if I understand correctly
15:04 bretep joined #salt
15:04 zsoftich joined #salt
15:05 AndreasLutro ah yes, guess an exception was made then
15:05 joshin joined #salt
15:05 joshin joined #salt
15:05 icflournoy joined #salt
15:06 finnzi joined #salt
15:07 tkharju joined #salt
15:11 kaptk2 joined #salt
15:11 bluenemo joined #salt
15:12 oeuftete_ joined #salt
15:12 zz_Brew joined #salt
15:12 mlanner joined #salt
15:12 peters-tx joined #salt
15:12 Jimmy_Rustler joined #salt
15:13 hasues joined #salt
15:13 iggy poke based pi for that
15:13 sdm24 joined #salt
15:14 iggy 2015.5.4 hasn't been announced, so it's not officially out (and likely won't be for a week or more)
15:14 PredatorVI joined #salt
15:14 Jimlad joined #salt
15:17 tjs does anyone know if there's a way to modify the remote python environment for salt-ssh? like to set PYTHONPATH to find platform-specific modules for msgpack, markupsafe, and tornado?
15:18 dezertol joined #salt
15:21 repl1cant so is rest_tornado a complete replacment for rest_cherrypy or is it just used to listening to the event bus?
15:22 iggy repl1cant: it should be suitable as a drop-in replacement
15:22 iggy it also has some features cherrypy doesn't
15:23 repl1cant ah, k. so all the api calls should be the exact same?
15:23 bwebb joined #salt
15:23 iggy Yes™
15:24 iggy if you find differences, file a bug and ping somebody
15:24 bwebb maybe a noob question here but I can't find a clear answer in the docs.  Is there a way to pass minion config settings to the bootstrap.sh script?
15:24 repl1cant cool, thnx :-)
15:24 bwebb like a URL to a YAML file, or individual config settings?
15:25 jeadr joined #salt
15:28 iggy not that I can see, but it should respect anything that exists before it installs
15:28 xgunnerx joined #salt
15:28 iggy you could also shove them into a package and use -p to install that package
15:28 calvinh joined #salt
15:29 dthom91 joined #salt
15:30 otter768 joined #salt
15:30 [1]PredatorVI joined #salt
15:30 xgunnerx hiya! i have a yaml file that i'd like to ingest so I can loop over it and populate a file. i can do this easily enough with pillars, but how do I accomplish this with a non-pillar file?
15:31 calvinh joined #salt
15:31 dthom91 joined #salt
15:31 xgunnerx im not using a pillar because i want to check it into source
15:32 conan_the_destro joined #salt
15:33 ekristen joined #salt
15:33 zer0def joined #salt
15:34 favadi joined #salt
15:34 Ch3LL_ joined #salt
15:36 xgunnerx nvm i found it: {% import_yaml "myfile.yml" as myfile %} :)
15:37 saltstackbot [reddit-saltstack] salt-cloud openstack error "argument of type 'bool' is not iterable" https://www.reddit.com/r/saltstack/comments/3hgh22/saltcloud_openstack_error_argument_of_type_bool/ - 2015-08-18 - 16:34:05
15:39 perfectsine joined #salt
15:41 orion joined #salt
15:41 orion Hi. In the documentation, I'm told: "On the minion, run salt-key -f minion-id to print the fingerprint of the minion's public key."
15:41 orion However, even though I installed the salt-minion package, the only salt-* commands that exist are salt-call and salt-minion.
15:41 jeadr joined #salt
15:42 orion Am I interpreting the docs incorrectly?
15:43 arthoo is it possible to use salt-cloud to deploy on bare metal?  given the 'cloud' part of the name, I'd presume not :)
15:43 iggy arthoo: using the saltify provider it's possible to use the salt-cloud functionality to install/configure the minion
15:44 VR-Jack2 orion: I think you're supposed to run the salt-key on the master.
15:45 iggy orion: yeah, file an issue on that doc
15:47 neilfse__ joined #salt
15:48 orion iggy: Where is the appropriate place to file doc bugs?
15:49 XenophonF tjs: on a related note, i seem to recall salt-ssh being unable to cope with systems that didn't include sudo by default, e.g., freebsd. dunno if that's changed since 2014.1, which was the last time i tried to use it.
15:49 iggy the docs are generated from the source... so the main salt repo
15:50 hillna joined #salt
15:50 venu0336 joined #salt
15:51 orion https://github.com/saltstack/salt/issues/26432
15:51 saltstackbot [#26432]title: Documentation incorrectly references salt-key on the minion | On the [walkthrough](http://docs.saltstack.com/en/latest/topics/tutorials/walkthrough.html) page, the following information is incorrect:...
15:52 czchen joined #salt
15:55 lkannan joined #salt
15:56 basepi joined #salt
15:56 Topic for #salt is now Welcome to #salt | 2015.5.3 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
15:57 glyf joined #salt
15:57 basepi VR-Jack2: hah, blame me that your fix didn't work properly? Sounds about right, I always get the blame. ;)
15:57 VR-Jack2 basepi: my fix worked. just required your approval. :P
15:57 hasues left #salt
15:57 frankS2 joined #salt
15:57 sdm24 It's your fault for not testing enough, not the coder's fault for bad code
15:58 sdm24 thats like rule #4
15:58 VR-Jack2 You are the salt-ssh guru. haha
15:58 giantlock joined #salt
15:59 VR-Jack2 Not a biggie, really. We had few comments on the issues, so I'm guessing salt-ssh with sudo and requiretty isn't overly common usage.
16:01 basepi Yep, most people don't use requiretty anymore since it's been shown to have no real security advantage.
16:01 basepi I merged your pull request right?
16:01 VR-Jack2 yesterday, yes
16:01 VR-Jack2 $HOME fix
16:01 basepi Ok, cool.
16:02 VR-Jack2 just make yourself a note if you remove the shell in the vt call
16:03 basepi Right.
16:03 VR-Jack2 That's a major change, but I know that a lot of salt was trying to remove shell calls when doing exec, so I worried about the salt-ssh vt call
16:03 * basepi nods
16:04 VR-Jack2 Why does work continue to get in the way of my salt fun. :(
16:05 Furao joined #salt
16:05 Jimmy_Rustler joined #salt
16:06 collinanderson joined #salt
16:07 Grokzen joined #salt
16:07 lothiraldan joined #salt
16:07 sdm24 Cash Rules Everything Around Me
16:08 VR-Jack2 sdm24: with service contracts, I don't worry about cash, just priority of the job
16:08 XenophonF dolla dolla bills yall
16:08 XenophonF alright, i have github webhooks calling scripts on my salt master
16:09 XenophonF now, how to tell the master to do stuff with it
16:09 katyucha joined #salt
16:09 sdm24 So like when github is updated, the master will update the fileserver or something?
16:10 zipkid joined #salt
16:10 XenophonF sdm24: that's the POC I'm working on
16:10 XenophonF i want to run a fileserver.update whenever something gets pushed to my salt-states repo
16:10 ajw0100 joined #salt
16:10 BigBear joined #salt
16:11 sdm24 I don't know a lot (anything) about webhooks, but if you can call scripts on the master, couldn't one script just be "salt-run fileserver.update"?
16:11 shaggy_surfer joined #salt
16:11 iggy that's the idea, yeah
16:11 XenophonF but long term i want to be able to monitor repos for production releases, kick off deployments to a test/qa environment, invoke jenkins to run UATs, etc.
16:11 XenophonF sdm24: insecure
16:11 iggy you can call runners directly from netapi
16:11 XenophonF salt-run would have to be run as root
16:11 iggy netapi is running as root already
16:11 sdm24 Ah good point
16:12 XenophonF not on my computer it aint
16:12 ramishra joined #salt
16:12 DammitJim joined #salt
16:12 iggy then it won't be able to do shit
16:12 XenophonF i'm using wsgi, so it's running as www
16:12 XenophonF the netapi is just an interface to the salt master using the same ipc as the salt command
16:12 XenophonF only rest instead of command line
16:13 XenophonF so if you can invoke 'salt -a ...' as non-root, then the netapi will also work as non-root
16:13 XenophonF (which i can confirm because that's how saltpad does its thing in my setup)
16:13 iggy then you've already solved your problem, why are you asking us?
16:13 XenophonF because i don't want to store a username and password that user www can access
16:14 XenophonF don't see a way around it though
16:14 dthom91 joined #salt
16:15 iggy github has set IPs that webhooks come from, we just run salt-api as root and only let those IPs in
16:15 Tritlo joined #salt
16:16 XenophonF do the webhooks call a salt-api URL directly?
16:16 XenophonF or did you write some kind of adapter?
16:16 shaggy_surfer joined #salt
16:16 XenophonF (because that's where i am)
16:16 iggy webhooks hit salt-api directly
16:17 XenophonF orly?
16:18 XenophonF omfg how did i miss that in the docs
16:18 jchadwick joined #salt
16:18 jchadwick joined #salt
16:18 jchadwick joined #salt
16:21 aparsons joined #salt
16:24 XenophonF iggy: thank you
16:24 SteamWells joined #salt
16:24 dlloyd is there any way to defer a service restart until the highstate is completed? having an issue where i am pushing a new minion config, which restarts the minion, which breaks the connection with the master
16:25 rm_jorge joined #salt
16:25 kutenai joined #salt
16:25 dlloyd only started presenting an issue in 2015.5.3+ds-1precise2 from the salt-stack ppa
16:25 iggy dlloyd: you can try listen(_in) which is like watch, but moves all the actions to the very end of the run
16:26 iggy dlloyd: otherwise, you'll have to use something like the at trick in the docs
16:26 sdm24 dlloyd: do you have any requires or other requisites in your state? Otherwise - order: last could work
16:26 KyleG joined #salt
16:26 KyleG joined #salt
16:26 iggy eww, use listen, not order
16:26 sdm24 :(
16:26 freakawesome joined #salt
16:26 eseyman joined #salt
16:27 dlloyd as i wrote that out, i realized that regardless of when in the highstate it happens, its still going to kill the connection to the master, which will cause the "Minion did not return. [No response]" issue i am seeing
16:27 * iggy gives sdm24 noogies
16:27 dlloyd so i may have to do the at hack
16:27 sdm24 will giving the service.restart a sleep command return the highstate output?
16:28 dlloyd won't it still wait for the command to finish?
16:28 dlloyd thus still be in the act of highstating?
16:28 sdm24 I dunno, that's what im asking
16:28 dlloyd oh
16:29 sdm24 like one way, if you do cmd.run 'service salt-minion restart', so then you get the return of "cmd run successfully" and then the minion restarts later
16:29 dlloyd let me twiddle some bits
16:30 dlloyd well, the restart is being triggered by a service state watch command
16:30 iggy a lot of times, just using listen will work
16:30 shawnbutts joined #salt
16:30 dlloyd let me try that
16:30 iggy there's just enough time for the minion to return before it restarts
16:32 dlloyd ok, quick test worked, lets see if this works in the full highstate (only really seeing this during inital node provisioning)
16:33 ilbot3 joined #salt
16:33 Topic for #salt is now Welcome to #salt | 2015.5.3 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
16:33 linjan joined #salt
16:34 fyb3r joined #salt
16:34 breakingmatter joined #salt
16:34 writtenoff joined #salt
16:35 iggy WITH FIRE!
16:35 dlloyd basically
16:35 whytewolf take off and nuke it from orbit, it is the only way to be sure
16:36 XenophonF game over, man, GAME OVER
16:36 programmerq joined #salt
16:38 evilrob any reason you can think of why this https://gist.github.com/rhaig/1974495268f4466f5557 wouldn't install python-mysqldb before it tried to execute the mysql_database.present?
16:39 venu0336_ joined #salt
16:39 ageorgop joined #salt
16:39 iggy evilrob: the require would be `- pkg: install mysql packages`
16:40 iggy also... cmd.run sed? file.replace
16:41 iggy don't let murrdoc see that
16:41 evilrob it was late, and the ini_manager bits weren't working
16:42 kukacz joined #salt
16:42 jeddi joined #salt
16:44 evilrob sigh... that require didn't work either.
16:44 iggy try moving the require under one of the actual states (instead of under the sls_id)?
16:45 shaggy_surfer joined #salt
16:46 XenophonF iggy, did you configure github to send json or urlencoded form data to salt-api?
16:46 VR-Jack2 fyi, you can't do mysql_database from the main sls of the pkg install. the module won't be loaded yet
16:46 iggy uhh... I think I'd have to go look that up somewhere
16:46 VR-Jack2 that's why the formula puts them both under includes
16:47 VR-Jack2 common salt issue with modules that depend on packages
16:47 iggy pkg.installed should do reload_modules so it should work
16:47 wnkz joined #salt
16:47 VR-Jack2 iggy: but the sls is processed before execution is done
16:47 VR-Jack2 and throws an error
16:48 VR-Jack2 key error, usually
16:48 VR-Jack2 I presume there is a sls verify that runs prior to execution and that is what causes the problem.
16:48 iggy it shouldn't try to lookup the key until it tries to run that section of the sls
16:48 VR-Jack2 if you do 2 includes, first for package, second for the modules, it will work.
16:49 iggy that's not been my experience
16:49 VR-Jack2 based on the problem, I'd say it doesn't do that
16:49 iggy if that's something you're hitting, you should file a bug
16:49 iggy that would be completely asinine
16:49 VR-Jack2 we ran into several issues with that on formulas. I fixed one that way the other day. mysql formula also does the include trick
16:49 sdm24 My coworker wrote a mariadb state that has the pkg.installed and mysql_database.present and it hangs the first time you run it,instead of returing errors. Is that why? Since he wrote the state, I didn't test it at all
16:50 whytewolf sdm24: does it hang on ubuntu?
16:50 iggy as I said, if you're having issues with that, you should file a bug
16:50 sdm24 whytewolf: yeah, thats the only OS we test it on
16:50 whytewolf sdm24 ubuntu mysql server install is "interactive"
16:50 iggy that should either be fixed in the code or the 200000000 places that exact sequence is in the docs
16:51 whytewolf you need debconf settings to get around it hanging
16:51 VR-Jack2 sdm24: could be. most module virtuals check for underlying commands before loading. It can cause issues in module dependencies as well if the pkg isn't there for the virtual to activate
16:51 sdm24 the state uses debconf, but it still hangs. I think because he has debconf first, and unless: pkg: maraidb
16:52 sdm24 so basically the second time the state runs it configures the db
16:52 sdm24 Like I said, I didn't test this state so I don't know
16:52 iggy unless takes cmdline snippets, not "modules: ID"
16:53 dlloyd iggy: looks like the listen fixed it, thanks!
16:53 iggy dlloyd: ^5 keep the "at" trick in mind if that isn't enough at some point in the future
16:53 iggy (maybe even document it)
16:54 andrew_v_ joined #salt
16:54 dlloyd well, that state runs in the middle of ~300 others, and survived through to completion this time, but definitely will do
16:56 sdm24 here is the mariadb state https://gist.github.com/sdm24/429f446efd23d41a5c5d I think that one issue is that the unless check isn't triggering since it doesn't take mod: ID format
17:01 dthom91 joined #salt
17:04 [1]PredatorVI joined #salt
17:05 ahuss joined #salt
17:06 perfectsine joined #salt
17:06 malinoff joined #salt
17:06 orion On this page: http://docs.saltstack.com/en/latest/topics/tutorials/states_pt4.html#practical-example it says, "Below is a top.sls that can be used to deploy the website, /srv/salt/prod/top.sls"
17:06 orion Doesn't the top file need to be in base, not prod?
17:06 apofis joined #salt
17:06 subsignal joined #salt
17:07 sdm24 orion: in that example, /srv/salt/prod is the base
17:07 sdm24 in the section above, with the file_roots:
17:08 orion Ah, ok
17:08 evilrob would it work better if I put all my package installs in a separate sls file and did a require for that file?
17:10 VR-Jack2 I generally do a pkg sls, a config sls, perhaps a few others then just include them all in the init sls
17:11 bhosmer joined #salt
17:11 forrest joined #salt
17:11 zz_Brew Hello Salt!  got a quick question.  Is it possible to store regex in pillar data?  Ive tried single quotes, dbl quotes with no luck.  I get a render error on the master.
17:12 zz_Brew here is what i currently have: client_mapping: '^/v2/(\d+)/server_action.*'
17:12 zz_Brew and the error: 2015-08-18 17:10:27,624 [salt.pillar                              ][CRITICAL][9868] Pillar render error: Rendering SLS '<SLS> failed. Please see master log for details.
17:15 bluenemo joined #salt
17:16 whytewolf zz_Brew: https://gist.github.com/whytewolf/20f7e7afecfd1ea24147
17:17 supersheep joined #salt
17:17 shaggy_surfer joined #salt
17:17 enarciso joined #salt
17:17 zz_Brew whytewolf:  perfect.  thanks!
17:20 s8weber joined #salt
17:21 theologian joined #salt
17:21 s8weber im stuck :)  looking for a module that can return true or false on somthing like:   file.file_exists('salt://_sdl/sssd/vars.jinja')
17:22 jeadr joined #salt
17:22 s8weber needs to beable to run from the minion.
17:23 sdm24 s8weber: cmd.retcode? http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.retcode
17:23 bhosmer joined #salt
17:24 Guest54185 joined #salt
17:24 s8weber @sdm24 thanks... but thats not what im looking.
17:25 whytewolf huh, if it existed it would be in modules.cp but there is not a exists there, although you can get a list of files from the master with master_list and check if your file is in that
17:25 DammitJim joined #salt
17:26 sdm24 oh are you trying to find if a file exists on the master, from the minion
17:26 s8weber needs to run from minion so i cant use salt-run filesystem.lixt_files ... however I'll lok over the cp module
17:26 Fiber^ joined #salt
17:26 s8weber im trying to do some fancy jinja imports...
17:27 whytewolf !salt modules.cp.list_master
17:27 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.list_master
17:27 s8weber want the template to only try and load file if the file is in the saltfilesystem on the local minion
17:28 s8weber thanks! {% if 'path' in salt['cp.list_master'] %} should work.
17:29 markm joined #salt
17:29 glyf joined #salt
17:31 otter768 joined #salt
17:31 hal58th joined #salt
17:33 teryx510 joined #salt
17:35 dopesong joined #salt
17:38 impi joined #salt
17:40 cape joined #salt
17:41 mcote joined #salt
17:41 cape I'm building an execution module - what is the preferred way of requiring that some master configuration is set?
17:41 cape checking if __salt__['config.get']('my:conf') is None?
17:42 tomspur joined #salt
17:42 cape It seems it would be nice if the module is unavailable when this config does not exist, but then I'd need to know in the __virtual__ function, as far as I understand? And at that point I do not yet have access to __salt__?
17:44 s8weber is there a salt module like cp.list_master but lists only the files that were included for highstate,,, ?
17:45 baweaver joined #salt
17:47 iggy orion: and strictly speaking, you can have a top.sls file in each env... it's just a terrible idea
17:48 pcn Is there a way to declare grains on the commandline/kwargs for state.sls?
17:50 dopesong_ joined #salt
17:50 bhosmer joined #salt
17:50 aboe joined #salt
17:50 iggy environment and pillars are the only consistenly available options
17:53 iggy s8weber: cp.list_minion, but it's not exactly "only what is used in a highstate"
17:53 iggy minions are free to cache everything that the master serves out
17:54 dthom91 joined #salt
17:54 s8weber o my thanks! i feel a little stupid for not trying cp.list_minion :)
17:55 isomarcte joined #salt
17:58 isomarcte I am having some trouble getting a mod_repo funciton to run in a state file. Would anyone be able to take a look at it and tell me what is wrong? https://gist.github.com/anonymous/46bd5e6a1d87c5522f10#file-gistfile1-txt
17:58 isomarcte I am sure I made a very silly mistake.
17:58 isomarcte I am new to saltstack
17:59 isomarcte When I attempt to run it with "salt-call state.sls" I get the following error.
17:59 isomarcte No function declared in state 'pkg' in SLS u'backport'
18:00 X67r joined #salt
18:02 whytewolf isomarcte: there is a difference between execution modules and state modules. mod_repo is not a state module function. you want to look into pkgrepo
18:02 whytewolf !salt states.pkgrepo
18:02 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html
18:03 isomarcte whytewolf: Thanks! I will take a look!
18:04 isomarcte Oh that makes complete sense. Thanks whytewolf!
18:05 kevinquinnyo joined #salt
18:06 pmcg joined #salt
18:07 aboe basepi, is justin on irc?
18:08 basepi We have two Justins -- Justin Findlay and Justin Anderson. Do you know which one you're referring to?
18:08 aboe basepi, justin findlay,
18:08 perfectsine joined #salt
18:08 basepi (Neither hang out in IRC on a regular basis, but I can ping them and have them jump on)
18:08 basepi Want me to ping him for you?
18:09 mcote hey guys, im trying to manage a file in one of my states. I want to file.manage the file with a source, but in my file i have replaced a line with the string "CHANGEME", which i want to put a grains value instead. How would i go about doing that?
18:10 aboe basepi, no I will mail him
18:10 evilrob file.replace
18:10 aboe basepi, thanks
18:10 * basepi nods
18:10 kevinquinnyo Hello all.  My pillar data as it stands is somewhat dynamic.  Would it be weird for me to add / modify it via an api call to salt's http api?  Or is there a preferred mechanism for handling a situation like this?
18:10 mcote yes file.replace indeed, but wouldnt that cause my file.manage to apply a change every highstates?
18:10 evilrob mcote: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.replace
18:11 evilrob I was just schooled on that because I pasted a state here with a sed cmd.run in it.
18:12 kevinquinnyo mcote: don't you just want to use a variable in place of CHANGEME in your actual source template?
18:12 baweaver joined #salt
18:12 forrest mcote: Is the managed file a jinja template?
18:13 forrest mcote: If so, just add DAT_VAR: {{ salt['grains.get']('grain') }}
18:13 forrest evilrob: He's looking to do something a bit different than what you are doing I believe
18:13 bfrog joined #salt
18:13 evilrob yes.  I just realized that when you brought it up.  The hammer in my hand at the moment is file.replace :)
18:14 evilrob jinja template is a better idea
18:14 forrest kevinquinnyo: Did you already look at http://docs.saltstack.com/en/latest/topics/development/external_pillars.html
18:14 kevinquinnyo forrest: i was just looking at that now
18:14 forrest Cool
18:14 kevinquinnyo still trying to figure out how it works
18:15 kevinquinnyo and how i could best use it
18:17 dthom91 joined #salt
18:18 wendall911 joined #salt
18:20 jeadr joined #salt
18:20 khaije1 joined #salt
18:21 zacdev joined #salt
18:22 sbogg joined #salt
18:22 dthom91 joined #salt
18:23 breakingmatter joined #salt
18:25 kevinquinnyo oh yeah ext_pillar is def what i need
18:25 kevinquinnyo thanks forrest
18:25 forrest kevinquinnyo: NP
18:25 gcfhvjbkn joined #salt
18:30 gcfhvjbkn left #salt
18:30 glyf joined #salt
18:31 jeadr joined #salt
18:34 dthom911 joined #salt
18:38 dthom91 joined #salt
18:39 venu0336 joined #salt
18:41 iggy aboe: bregalad I think
18:41 mrwboilers I need to have all my minions in a certain computer room assigned to groups.
18:41 mrwboilers What's a good way to do this? Grains? Pillar? The groups won't change often.
18:41 mrwboilers Is there a way to maintain this in one file?
18:42 fyb3r you can maintain it via pillars i believe. have each machine hold the same pillar file
18:42 mrwboilers For example a flat file with a hostname and a group number on each line?
18:42 iggy nodegroups, grains, pillar, all sorts of ways
18:43 mrwboilers had not heard of nodegroups. I'll google that now
18:44 mrwboilers yep, nodegroups looks like it just might be exactly what I'm looking for.
18:46 giantlock joined #salt
18:46 wendall911 joined #salt
18:47 tjs i finally figured out the issue i was having with salt-ssh connecting to my sparc boxes ... the ssh_py_shim.py script depends on /bin/bash to find scp and my box doesn't have /bin/bash
18:49 fyb3r can a master have a beacon that will send events down to the minions
18:49 rideh^ joined #salt
18:50 dthom91 joined #salt
18:50 iggy minions don't really have reactors yet
18:51 iggy you can however call a reactor on the master and have it target the minion
18:53 orion What is the Salt equivalent of Puppet Forge?
18:53 iggy none really
18:53 iggy salstack-formulas maybe
18:53 fyb3r ill write one then.  currently having to run my own reactor system on the master >_>
18:53 iggy they are working on spm
18:54 forrest I'm working on the proper harassment to get the reactor finished on minions
18:54 forrest soon^tm
18:54 iggy lol
18:54 iggy I think I heard something about that at the conf
18:55 mrwboilers Is there an issue with globbing in nodegroups?
18:55 mrwboilers I just tried adding one and it works when I list the fqdn of each node in the group. But when I try to glob, it doesn't
18:55 fyb3r its not all encompassing like the reactors are meant to be >_> its just simply listening to only the events I care about lol
18:58 ageorgop joined #salt
18:59 dthom91 joined #salt
19:02 glyf joined #salt
19:04 perfectsine joined #salt
19:04 iggy mrwboilers: check github, think there might have been a bug about that
19:06 mrwboilers I figured it out, I think
19:06 mrwboilers If you are listing all fqdns, then it is just a comma separated list
19:07 mrwboilers If you are globbing, you need 'or' between each item, not a comma.
19:07 rideh joined #salt
19:10 renoirb joined #salt
19:11 baweaver joined #salt
19:18 Jimmy_Rustler joined #salt
19:20 khaije1 if I want to make sure a particular line is in a file, and add it if it isn't ... whats the most sensible way to do that with salt?
19:21 khaije1 I'm thinking mostly of linux config files in /etc as the use case
19:22 iggy khaije1: file.append
19:22 ageorgop joined #salt
19:22 khaije1 iggy: I'll check it out thanks
19:24 mschiff Is there any good tool for a syntax check of sls files before comitting them to git?
19:24 dthom91 joined #salt
19:25 GreatSnoopy joined #salt
19:25 dijit You might consider using something like `salt 'myminion' state.show_highstate` or `state.show_lowstate`, as those functions will compile the state run and you can inspect it to make sure everything came out correctly.
19:26 forrest mschiff: Nothing that specifically checks the syntax: https://github.com/saltstack/salt/issues/802
19:26 saltstackbot [#802]title: Syntax checking | When a salt state contains YAML syntax errors, it is quite hard to find these errors at the moment. It would be great to have a basic syntax check (validation agains a schema) and/or references check (e.g. do the references given in require-statements really exist).
19:27 forrest someone just added this though: https://github.com/librato/salt-state-test
19:27 iggy there's another one too
19:27 arnoldB joined #salt
19:28 iggy oh, looks dead
19:28 iggy https://github.com/johanek/salt-lint
19:28 stevednd joined #salt
19:29 hax404 joined #salt
19:29 danielcb joined #salt
19:29 ageorgop joined #salt
19:31 otter768 joined #salt
19:32 PredatorVI I have a simple orchestration script to run state.highstate on minion1, then on minions 2-N.  The first directive is `install_primary:  salt.state:  - tgt: 'minion1*'  - highstate:  True` with a similar entry matching all other nodes.  When I run 'salt-run salt.orchestrate myapporchestrate saltenv=acc' I get 'No Top file or external nodes data matches found'.  What am I missing/doing wrong?
19:35 Ztyx joined #salt
19:35 murrdoc joined #salt
19:36 iggy state.orchestrate
19:36 PredatorVI that was a typo...I am using state.orchestrate :P
19:37 PredatorVI Must I specify a top file?
19:37 iggy does one exist?
19:38 PredatorVI It does for my normal states.
19:38 iggy I can't see it being necessary, but I do have one, so I've never actually tried without
19:38 iggy yeah, orchestrate shouldn't need a top file targeting anything
19:38 renoirb joined #salt
19:39 iggy (but it wouldn't suprise me if it did look for one)
19:39 whytewolf orchestrate doesn't, but highstate does.
19:40 PredatorVI I guess I was under the assumption that orchestrate just automated the calling of `salt 'minion' state.highstate and that it would use file_roots/gitfs_remotes to determine which environments and states to apply to the specified minions.
19:41 whytewolf actually it would be salt-call state.highstate saltenv=acc
19:41 whytewolf [it targets only the minion]
19:42 PredatorVI ah
19:42 iggy can you paste the orchestrate file and the salt-run -l debug output?
19:43 PredatorVI sure...just a sec
19:43 iggy the minions in question are only in the acc env?
19:44 troyready joined #salt
19:44 PredatorVI yes
19:44 PredatorVI well
19:45 iggy I think you should set saltenv in the orchestrate file then
19:45 iggy try that before you bother pasting stuff
19:45 murrdoc that should go on the orchestrate page
19:45 murrdoc as a default best practice
19:46 murrdoc using env in orchestrate
19:46 iggy I think all the docs should be altered to remove env usage completely
19:47 * whytewolf agrees with iggy
19:47 PredatorVI Adding '- saltenv: acc' to orchestrate didn't alter behavior
19:48 iggy PredatorVI: can you try just - env: ?
19:48 iggy (the docs say saltenv, but the function signature says env)
19:48 baweaver joined #salt
19:49 PredatorVI sure...same result.
19:49 iggy also, try just setting a single state (Vs the highstate) to see if it's an actual top problem
19:50 whytewolf I can atest that orch works with out a top file. I havn't built out my top file but have a compleate openstack install working through orch
19:51 whytewolf [i just don't highstate]
19:54 dthom91 joined #salt
19:54 * PredatorVI wonders where to start with the questions...
19:54 Jimmy_Rustler joined #salt
19:54 murrdoc if u think about it top.sls and highstate is basically an orchestrate
19:55 murrdoc its just hardcoded
19:55 evilrob do require's cross files?  I've got a state that runs "glance-manage db_sync" for me during an openstack install, and it throws an error the first time through, but works flawlessly the second run.
19:56 evilrob there is a require on it from an earlier file (I'm keeping mysql config separate from software config) but either I need to require something else, or it's not honoring my require
19:57 kukacz_ joined #salt
19:57 PredatorVI My setup:  My SLS files exist in /srv/salt/base/<appName>/*.  My SLS top file is located in /srv/salt/base/top.sls.   My minions are assigned roles and state in the 'base' environment.  My pillar files are:  /srv/pillar/base/top.sls, /srv/pillar/acc/<appName>/*.  In the pillar top, the minions are assigned to an actual environment.
19:57 VR-Jack2 evilrob: require only crosses files with an include, not cross sls from say top.sls
19:58 evilrob yeah, this is an include.  I think I need it to require the config file mod instead of the DB creation.
19:58 VR-Jack2 is the error a key error?
19:58 PredatorVI If I run state.highstate it works.  I am unable to run state.sls saltenv=acc, because it can't/won't look for files in any other location than the 'acc' folder.
19:58 PredatorVI even though my file_roots have both the 'acc' and 'base' state folders listed.
19:59 PredatorVI I'm seeing similar behavior with state.orchestrate.
19:59 PredatorVI If I specify the environment, it can't find the SLS state files that are located in 'base'.
19:59 evilrob VR-Jack2: no, "invalid target type"  if it were a key error, I'd know it was probably a package missing.
20:03 sdm24 PredatorVI: in file_roots on the master config, did you add the base directory to acc?
20:03 PredatorVI scm24:  yes.  All: Here is the output and orchestrate file doing the 'highstate':  https://gist.github.com/PredatorVI/d8df4877a3b463f73c32
20:04 PredatorVI scm24:  It finds things find during the highstate run, but just running state.sls from master it does not find the items in 'base'.
20:04 Ztyx joined #salt
20:05 PredatorVI I'm now seeing the same error running orchestrate when I target a specific sls in the 'acc' environment.  It can't find them because the files reside in 'base'.
20:09 |Fiber^| joined #salt
20:09 whytewolf PredatorVI: this is going to sound crazy, what does you states top file look like?
20:09 BigBear joined #salt
20:10 dthom91 joined #salt
20:11 PredatorVI whytewolf:  https://gist.github.com/PredatorVI/b54e2ebeba848e8a4ed9
20:12 whytewolf so, no enviroments in that top file. [which means that your env: won't be able to know what to do with that server]
20:12 mapu joined #salt
20:12 breakingmatter joined #salt
20:13 whytewolf the error is correct. there is no match found in the top file
20:13 PredatorVI well, from a states perspective, all minion states are assigned as part of the 'base' environment where `file_roots:  acc:  - /srv/salt/acc  - /srv/salt/base`
20:14 whytewolf yes, but you said you want from accs perspective
20:14 whytewolf not bases:
20:14 PredatorVI well, yes but my file roots has both ../acc and ../base included
20:14 PredatorVI for 'acc' env
20:14 PredatorVI highstate finds things just fine
20:15 whytewolf your root file does, but your top file doesn't say anything about the acc enviroment
20:15 whytewolf when you don't use saltenv
20:16 PredatorVI so i"m clearly doing something wrong.  I do want all my states (for the most part) to be shared.  The pillar is where the environment specific magic happens.  How do I do that without duplicating all states?
20:17 jhauser joined #salt
20:17 PredatorVI can I specify a list of environments such as saltenv=["acc", "base"]'?
20:17 forrest PredatorVI: http://docs.saltstack.com/en/latest/ref/states/top.html#other-ways-of-targeting-minions
20:17 forrest You're looking for that right?
20:18 whytewolf For environments other than base, the top file in a given environment will be checked for a section matching the environment's name. If one is found, then it is used. Otherwise, the remaining (non-base) environments will be checked in alphabetical order
20:19 PredatorVI forrest:  those examples don't map to what I'm trying to do.
20:19 forrest PredatorVI: Okay sorry
20:20 perfectsine joined #salt
20:20 whytewolf PredatorVI: you said it works when you don't use saltenv: acc right?
20:20 whytewolf do the pillars work too?
20:20 PredatorVI forrest:  no worries :P  whytewolf:  if saltenv is not specified and highstate is called, it works.
20:20 PredatorVI so do pillars
20:21 PredatorVI it finds the states in 'base' and pillars in'acc'
20:21 whytewolf sounds like a simple fix. don';t use saltenv
20:21 PredatorVI state.highstate works.  state.sls does not
20:22 rideh joined #salt
20:22 whytewolf state.sls isn't working even without saltenv?
20:22 PredatorVI if saltenv is not specified with state.sls, then it can't find the pillar.  If I specify saltenv, it can't find the state
20:23 andrew_v joined #salt
20:23 PredatorVI It seems to me that state.sls doesn't evaluate the top file
20:23 whytewolf that sounds like a bug
20:24 whytewolf state.sls doesn't evaluate the state top. but i thought it still did the pillar one
20:24 froztbyte hmmmm, is there native support in the aptpkg stuff for pinning packages?
20:26 whytewolf ahhh, pillarenv
20:26 hal58th frozybyte look for "hold" http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html
20:27 PredatorVI whytewolf:  D'oh!  missed that one
20:27 ageorgop joined #salt
20:28 hal58th froztbyte *
20:28 whytewolf it's okay, for some strange reason i checked the code before checking the doc
20:28 DammitJim how do I write a state where it requires another state?
20:29 XenophonF anywhere i can specify `salt://something/else.sls`, can i prefix it with the environment like `development: salt://something/else.sls`?
20:29 XenophonF like, in reactor.conf?
20:29 PredatorVI whytewolf:  so doing `salt myminion state.sls mystate pillarenv=acc saltenv=base' should work right?
20:29 whytewolf PredatorVI: shouldn't need the saltenv [base is default] but in theory yes
20:30 kevinquinnyo DammitJim: you use the sls requisite
20:30 PredatorVI whytewolf:  Should I be able to point state.sls to a folder that has a corresponding init.sls?
20:31 DammitJim kevinquinnyo, yeah, I'm reading about that
20:31 jeadr joined #salt
20:31 froztbyte hal58th: that's not quite the same thing
20:31 DammitJim however, I don't know when one says: require: -sls: foo
20:31 whytewolf PredatorVI: yes,
20:31 DammitJim is foo the state name (foo.sls) or is it the package?
20:32 froztbyte one of the key advantages of pinning is that you can just influence the solver's decisions for specific subpackages; for instance, "python* from jessie" is a thing you can do
20:32 froztbyte however, seems that the answer is that there isn't anything for it atm
20:32 * froztbyte will try to write some sometime
20:32 PredatorVI whytewolf: specifying the folder (package?) doesn't work, but I can specify an sls within that folder
20:32 kevinquinnyo DammitJim: yeah it's the state name without the .sls
20:33 kevinquinnyo i believe
20:33 DammitJim this drives me nuts
20:33 DammitJim sometimes I run a state and the master just returns
20:33 PredatorVI whytewolf:  So 'salt myminion state.sls myapp pillarenv=acc' does not work, but 'salt myminion state.sls myapp.myapp-web' does
20:33 DammitJim no printout
20:33 DammitJim no nothing
20:34 enarciso joined #salt
20:34 iggy PredatorVI: specifying the "package" only works if there's an init.sls file in that dir
20:34 whytewolf PredatorVI: that is strange. I use init.sls based folders all the time.
20:35 PredatorVI There definitely is an init.sls in the folder
20:35 whytewolf like i have a mysql/init.sls and call only have to call it with mysql
20:35 iggy so then why are you running myapp.myapp-web?
20:35 PredatorVI iggy: to test it.
20:36 dthom91 joined #salt
20:37 whytewolf toss some debug on that, and do it from the minion side. cause that is funky
20:37 PredatorVI D'oh...nevermind.  I was looking at the pillar folder that has an init.sls.  My bad...sorry for the confusion
20:37 PredatorVI too many things with similar names
20:37 whytewolf lol. ok
20:37 whytewolf confused me
20:37 * PredatorVI takes a deep breath
20:38 DammitJim weird... I put the sls name
20:38 DammitJim but it couldn't find it
20:39 kefh joined #salt
20:39 PredatorVI back to the orchestrate highstate issue, can I specify pillarenv in the orchestrate SLS?
20:40 whytewolf PredatorVI: it would be a - arg:
20:41 linjan joined #salt
20:41 whytewolf oh wait salt.state, it would just be a part of the state
20:41 murrdoc PredatorVI:  yes
20:41 murrdoc si si puede
20:42 kefh left #salt
20:44 PredatorVI whytewolf:  it no likey '- pillarenv: acc'
20:44 whytewolf ok try - arg: - "pillarenv=acc"
20:45 iggy the more I hear about environments, the more I think the feature should just burn in hell
20:45 whytewolf iggy, ever since i read about them the I have thought that.
20:45 * PredatorVI grabs the matches and lighter fluid
20:46 iggy they sounded good at first, but they seem to cause a crap ton more trouble than they are worth
20:46 iggy (and they were basically useless when I started on this salt deployment, so we just have separate masters)
20:47 whytewolf honestly, you can do pretty much everything they do with clever targeting anyway
20:47 PredatorVI I think I'm close to doing that.
20:48 whytewolf seperate masters. much cleaner
20:50 whytewolf it might have been better had it been implimented a little cleaner.
20:51 PredatorVI so salt.state doesn't like the '- arg:' parameter
20:51 whytewolf okay, wasn't sure about that.
20:52 iggy args?
20:52 whytewolf nope it is arg: [not sure why it is singular even when there are more than one]
20:52 whytewolf you could be sneaky. salt.function: - name stat.sls
20:53 whytewolf ... wow the typos in that
20:53 PredatorVI and FWIW, it complains about 'env' as well stating it is deprecated in favor of 'saltenv'.
20:53 andrew_v_ joined #salt
20:53 iggy which is true
20:53 iggy I just said test it earlier because the docs are a little off
20:53 PredatorVI k
20:55 Ztyx joined #salt
20:57 PredatorVI whytewolf:  'salt.function: - name: state.highstate' did the trick.  Didn't have to specify any environment settings at all.
20:57 PredatorVI not sure why 'salt.state: - highstate: True' doesn't work the same.
20:58 subsignal joined #salt
21:01 iggy You could try opening an issue, they should work the same (with the added benefit that salt.state can run a state first)
21:01 PredatorVI ok
21:03 ahuss joined #salt
21:04 jeadr joined #salt
21:07 pravka joined #salt
21:18 pppingme joined #salt
21:18 pppingme joined #salt
21:21 baweaver joined #salt
21:26 jeadr joined #salt
21:30 perfectsine joined #salt
21:30 zmalone joined #salt
21:32 otter768 joined #salt
21:33 shaggy_surfer joined #salt
21:38 ageorgop joined #salt
21:39 markm joined #salt
21:42 supersheep joined #salt
21:56 jhauser_ joined #salt
21:56 baweaver joined #salt
22:01 oeuftete joined #salt
22:01 breakingmatter joined #salt
22:02 Brew joined #salt
22:03 Brew joined #salt
22:05 Akhter joined #salt
22:07 meggiebot joined #salt
22:08 Brew joined #salt
22:11 Brew1 joined #salt
22:12 capricorn_1 joined #salt
22:12 Brew joined #salt
22:13 fyb3r left #salt
22:18 viq joined #salt
22:23 eliasp joined #salt
22:31 fgimian joined #salt
22:32 jeadr joined #salt
22:34 PredatorVI Another state.orchestrate question (or two).  Where do I find the value values for 'tgt_type'?
22:36 iggy same as "match" in top file
22:36 whytewolf http://docs.saltstack.com/en/latest/topics/targeting/index.html#targeting
22:38 whytewolf !salt modules.match
22:38 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.match.html
22:38 PredatorVI That one helps...thanks
22:38 bfoxwell joined #salt
22:39 defmikekoh joined #salt
22:41 jmreicha_ joined #salt
22:44 repl1cant any rest_tornado experts here?
22:48 adelcast joined #salt
22:50 iggy there's at least one, but he doesn't talk much
22:51 repl1cant :-)
22:52 repl1cant did a quick test as a dropin replacement for cherrypy and it didn't like and of the wheel client requests
22:52 repl1cant went ahead and posted on the mailing list
22:53 glyf joined #salt
22:53 repl1cant er s/and/any/
22:53 iggy you have @wheel in the auth section?
22:54 repl1cant yup. works fine under cherrypy
22:54 repl1cant under tornado it gives me a 400
22:54 iggy https://github.com/saltstack/salt/issues/26014
22:54 saltstackbot [#26014]title: Add Wheel client to Saltnado | https://github.com/saltstack/salt/blob/develop/salt/netapi/rest_tornado/saltnado.py#L210...
22:56 repl1cant well there ya go
22:56 repl1cant thnx!
22:56 adelcast joined #salt
22:57 whytewolf huh, i missed the anouncment that 2015.8 is going into a final freeze in the next couple of days
22:57 drawsmcgraw left #salt
22:58 PredatorVI Is this correct syntax for orchestrate tgt + tgt_type:  `- tgt: 'myminion-acc01* and myminion-acc0[2,3]*'  - tgt_type: list` ??
22:58 whytewolf iirc list does not take any kind of regex
22:59 sunkist joined #salt
22:59 iggy repl1cant: it's been publicly stated that saltnado should have feature parity with cherrypy, so it's probably just a matter of (free) time
23:00 PredatorVI compound then?
23:00 iggy PredatorVI: compound
23:01 iggy myminion-acc01*,myminion-acc0[2,3]* = list (I think)
23:01 whytewolf PredatorVI: you can use that match module i posted earlyer to test how each minion reacts to the target you think you want
23:02 iggy or salt -C 'myminion-acc01* and myminion-acc0[2,3]*' test.ping
23:02 iggy seems easier than typing a bunch of test names
23:02 whytewolf again salt, so many ways to do anything.
23:05 PredatorVI thx...was missing the 'E@' prefix
23:05 pppingme joined #salt
23:06 pm90_ joined #salt
23:08 PredatorVI I presume that it is a bug if the command 'salt-run state.orchestrate ...' has exit status of '0' even if something fails?
23:09 iggy not really
23:09 PredatorVI por que?
23:09 iggy salt is bad about surfacing errors from remote systems
23:10 PredatorVI k
23:13 baweaver joined #salt
23:17 mosen joined #salt
23:19 zacdev joined #salt
23:19 KyleG I'm getting the weirdest error, we're testing our OS and Package upgrades, and I'm hitting this error on my deploy process: https://gist.github.com/kylegato/456303634077cc487624
23:19 KyleG What confuses me is, the - isn't even part of the curl, it's part of the tar
23:20 KyleG Running salt-minion 2015.5.3 (Lithium)
23:22 iggy KyleG: cmd.shell
23:22 iggy or python_shell=True
23:22 KyleG uh, salt API
23:22 KyleG let me check the code 1 sec
23:24 KyleG We wrote a custom salt module in python
23:24 KyleG so I guess I would assume python_shell=True ?
23:24 KyleG The actual code looks like this: https://gist.github.com/kylegato/77272e8b8ce38b4ccf06
23:24 KyleG where EXTRACT_CMD includes the curl command
23:25 KyleG What are my troubleshooting options
23:26 mimiandi joined #salt
23:26 mimiandi hi if i want to use orchestrate from the state .
23:26 mimiandi combine it with unless
23:27 iggy KyleG: does _run_command equate to a salt cmd function?
23:27 mimiandi would the command be ran from the master ?
23:27 iggy mimiandi: depends where you put the unless... if it's in a state that the orch call targets at a minion, then it'd run on the minion
23:28 mimiandi i want to be able to run a command against a target before certain state is ran using orchestrat
23:28 iggy I'm not sure orch supports unless directly
23:28 mimiandi afaik all the requisties are suipported in the orch
23:28 mimiandi based on the doc
23:28 murrdoc prereq
23:28 KyleG iggy: https://gist.github.com/kylegato/961107006210995239b7
23:29 mimiandi http://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html#orchestrate-runner
23:29 mimiandi murrdoc: was that directed at me?
23:29 murrdoc mimiandi:  yup
23:30 mimiandi hmmm he left
23:32 iggy KyleG: so add python_shell=True there
23:32 mimiandi what is the argument for prereq?
23:32 mimiandi i see an exmaple of file and mount
23:32 mimiandi is that the state module name?
23:33 mimiandi yep.. seems like it :)
23:33 otter768 joined #salt
23:34 baweaver_ joined #salt
23:38 pravka joined #salt
23:39 KyleG iggy: Testing, thanks for your time
23:40 KyleG It seems that was it
23:40 KyleG We just upgraded from a 2014 release to the latest so
23:40 KyleG needless to say it seems defaults have been changed lol
23:41 iggy yes, I complained loudly about that change, they insisted it was "for security" and wouldn't do a deprecation period
23:43 KyleG iggy: Any other major similar changes I should be aware of ? lol
23:44 jeadr joined #salt
23:44 iggy you looked through the release notes?
23:44 iggy (that issue was mentioned there, although it may not have been obvious that's what you were hitting)
23:49 jeadr joined #salt
23:51 breakingmatter joined #salt
23:53 jagguli joined #salt
23:53 jagguli Hi  ...
23:54 jagguli why does salt componsets connect to the master rather than the other way around ?
23:57 iggy I've never seen an answer to that question
23:57 iggy one reason might be that it means you don't have to setup the minions on the master... you just have to accept the keys

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