Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-09-07

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

All times shown according to UTC.

Time Nick Message
00:00 spuder joined #salt
00:08 woodtablet left #salt
00:11 ninjada joined #salt
00:11 raspado hi all, how can I delete a grain locally on the minion using CLI?
00:13 UtahDave salt-call grains.delval mygrain destructive=True
00:13 UtahDave https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.delval
00:13 UtahDave raspado: ^^
00:13 UtahDave left #salt
00:14 mattp_ is there a project roadmap for saltstack?
00:14 mattp_ what features can we expect that are being worked on
00:14 XenophonF bah
00:14 XenophonF i've got a git.latest state that refuses to update my clone
00:14 XenophonF "Repository would be updated to fafc97e, but this is not a fast-forward merge. Set 'force_reset' to True to force this update."
00:15 XenophonF but if i go into that directory and do "git pull --ff-only", it works just fine
00:16 pipps joined #salt
00:18 GP_MikeD joined #salt
00:21 mdevicariis joined #salt
00:25 GP_MikeD Does anyone know if there is a way to get information on how long it takes to run each state?
00:25 GP_MikeD I know we can get the total time with the 'time' command in Linux, but I want similar stats for each state when running all states.
00:28 mattp_ GP_MikeD: sounds like you want a returner
00:28 GP_MikeD What's a returner? Is that part of salt or a general term?
00:29 majuscule joined #salt
00:30 GP_MikeD Hmm, I found the salt doc on returners. Thanks for pointing me to this
00:31 spuder joined #salt
00:31 brotatochip joined #salt
00:35 mosen joined #salt
00:38 GP_MikeD left #salt
00:42 spuder_ joined #salt
00:44 justanotheruser joined #salt
00:49 raspado in a python module, is it possible to search for a grain and if not present, then do something?
00:52 binocvlar raspado - it definitely would be possible, yes
00:52 binocvlar You could do that even with the jinja rendered I believe
00:52 binocvlar s/rendered/renderer/
00:53 raspado binocvlar: i guess something like "if 'zfsfs' in __grains__" ?
00:54 raspado binocvlar: what im trying to do is if the grain zfsfs does not exist, then it will go into another function and create it
00:54 raspado just not sure how to properly write it in python if the grain is not present
00:59 binocvlar raspado: I don't have a test environment to look at right at this minute, but remember that it is just python underneath
00:59 raspado kk thx binocvlar
00:59 binocvlar so the logic should be very pythonesque
01:01 John_Kang joined #salt
01:03 edrocks joined #salt
01:05 binocvlar raspado: this should work
01:05 binocvlar if __grains__['zfs']:
01:05 binocvlar do stuff
01:05 binocvlar :)
01:08 raspado joined #salt
01:13 DEger joined #salt
01:13 Ashald joined #salt
01:16 brotatochip joined #salt
01:22 catpiggest joined #salt
01:22 ageorgop joined #salt
01:46 Vaati joined #salt
01:46 Vaati left #salt
01:48 perfectsine joined #salt
01:48 Nahual joined #salt
01:52 perfectsine_ joined #salt
01:55 spuder joined #salt
02:00 fgimian joined #salt
02:05 edrocks joined #salt
02:09 bastiandg joined #salt
02:26 ninjada joined #salt
02:47 smcquay joined #salt
02:49 sp0097 joined #salt
02:52 raspado joined #salt
02:54 raspado binocvlar: thx, sorry for late response
02:57 DEger joined #salt
03:06 armonge joined #salt
03:07 pipps joined #salt
03:09 systo joined #salt
03:12 akunin_ joined #salt
03:12 ZachLanich joined #salt
03:20 rideh joined #salt
03:21 raspado in top.sls files, are states run from top -> down?
03:23 XenophonF raspado: basically, yes
03:23 raspado ok thx
03:23 XenophonF lists are ordered
03:24 XenophonF now if you have multiple matches in top.sls, e.g., https://github.com/irtnog/salt-states/tree/master/top.sls, i'm not sure you're guaranteed a particular ordering of matches
03:25 XenophonF so given my example, let's say i'm deploying a mail relay on CentOS in production, so there's a generic match for the O/S family and a role-specific match for mail relays
03:26 XenophonF i don't think salt guarantees that the O/S family SLS list will run before the mail relay SLS list
03:27 XenophonF so key/value pairs within dictionaries are _not_ ordered in a deterministic way
03:28 raspado hmmm ok then ill change my script so its not dependent on ordered states
03:28 raspado dont want chicken before egg scenario
03:28 XenophonF that's probably for the best
03:28 XenophonF alternatively, you can use "sls: blah" in your requisites
03:29 raspado ahh ok
03:29 raspado setting a grain to True vs true, does it have any benefits to using True?
03:29 _JZ_ joined #salt
03:30 XenophonF another alternative is to have special glue SLSes that add requisites tying things together
03:30 XenophonF e.g., https://github.com/irtnog/salt-states/blob/development/clamav/amavisd.sls (the clamav.amavisd SLS run on my mail relays)
03:31 XenophonF e.g., https://github.com/irtnog/tomcat-formula/blob/master/tomcat/shibboleth-idp.sls (which extends states in tomcat/init.sls with requisites that reference states in shibboleth/idp/init.sls)
03:32 XenophonF aren't True and true both the boolean True in YAML? let me check the spec
03:35 raspado hmmm i may want to wrap it in qoutes
03:35 raspado I have it set as "__salt__['grains.setval']('zfsfs', True)" but i maybe "True" is best
03:35 XenophonF i'd stick with a boolean rather than a string
03:36 raspado kk
03:36 XenophonF also `key: True` and `key: true` both set `key` to the true boolean value
03:36 XenophonF http://yaml.org/type/bool.html
03:36 XenophonF here's why
03:37 jcockhren joined #salt
03:37 raspado nice ok ill keep it as is
03:37 XenophonF if you set `key: 'false'` (i.e., the string), then the following evaluates to true: {% if grains['key'] %}
03:37 XenophonF which violates POLA
03:37 XenophonF or at least I'd be quite astonished by such a result
03:39 bltmiller joined #salt
03:41 XenophonF raspado: are you writing a custom grain for zfs?
03:42 raspado yep :)
03:42 raspado setting a grain so the minion can determine if it needs to create the zfs file system
03:43 raspado so if zfsfs == True then it means the zfs fs is already present, if False then create it
03:43 XenophonF cool
03:52 nsidhu joined #salt
04:07 edrocks joined #salt
04:10 k_ joined #salt
04:14 amy_ joined #salt
04:23 jhauser joined #salt
04:32 sjmh joined #salt
04:33 DEger joined #salt
04:34 rdas joined #salt
04:37 onlyanegg joined #salt
04:38 systo joined #salt
04:42 rdas joined #salt
04:46 cprior joined #salt
05:01 rvaldes joined #salt
05:02 whatevsz joined #salt
05:02 lompik joined #salt
05:04 spuder joined #salt
05:06 hasues joined #salt
05:08 hasues left #salt
05:23 systo joined #salt
05:30 colegatron_origi joined #salt
05:34 impi joined #salt
05:38 ronrib joined #salt
05:40 bocaneri joined #salt
05:48 JPT joined #salt
06:00 brotatochip joined #salt
06:00 debian112 joined #salt
06:05 AzoMan joined #salt
06:10 edrocks joined #salt
06:12 ttrumm joined #salt
06:19 ninjada joined #salt
06:27 ninjada joined #salt
06:30 ttrumm_ joined #salt
06:40 cyborg-one joined #salt
06:41 Rumbles joined #salt
06:51 fracklen joined #salt
06:54 toanju joined #salt
06:57 fracklen joined #salt
07:04 akunin joined #salt
07:05 kshlm joined #salt
07:09 akunin joined #salt
07:10 colegatron_origi joined #salt
07:13 dariusjs joined #salt
07:13 ninjada_ joined #salt
07:17 ronnix joined #salt
07:21 CeBe joined #salt
07:22 ninjada joined #salt
07:29 mikecmpbll joined #salt
07:34 akunin joined #salt
07:36 etangle joined #salt
07:37 etangle Using salt-cloud to provision servers on rackspace, it successfully bootstraps minion, how can I run any additional script
07:40 systo joined #salt
07:50 impi joined #salt
07:52 fredvd joined #salt
07:57 sfxandy joined #salt
07:58 ramSeraph joined #salt
07:58 ramSeraph Hi, anyone know how I can add a event_returner to a reactor, is it even done at the reactor level?
07:58 ramSeraph end goal is to send an email for an event
08:00 mikecmpbll joined #salt
08:00 ramSeraph looks like smtp returner does not have a event return, So I might end up writing a returner which would forward the event to a different system, which can then take care of sending the email
08:02 ramSeraph Also, I only want to do this for a particular event, not all of them
08:02 mikecmpbll joined #salt
08:04 akunin joined #salt
08:05 ninjada joined #salt
08:08 SubOracle joined #salt
08:10 jcockhren joined #salt
08:11 Rumbles joined #salt
08:13 edrocks joined #salt
08:21 mike25de left #salt
08:30 N-Mi joined #salt
08:30 N-Mi joined #salt
08:31 keimlink joined #salt
08:35 Rumbles joined #salt
08:36 lero joined #salt
08:42 akunin joined #salt
08:42 jhauser joined #salt
08:42 saintpablo joined #salt
08:43 Taters joined #salt
08:44 ttrumm joined #salt
08:48 Karthik4247 joined #salt
08:48 Karthik4247 I have written a custom grain in _grains
08:48 Karthik4247 and want to load it
08:48 Karthik4247 how can i load my custom grain
08:49 Karthik4247 it is master less configuration
08:50 Karthik4247 i tried using sync_grains
08:50 Karthik4247 but still not working
08:51 PerilousApricot joined #salt
08:52 Romlok joined #salt
08:53 Romlok Ahoy
08:54 Romlok so I have the value "Norsk Bokmål" in my pillar, but when passed to a templated file, it comes out as "Norsk Bokm\xc3\xa5l"
08:55 Romlok any ideas?
08:56 kshlm joined #salt
08:57 PerilousApricot joined #salt
08:58 netcho joined #salt
09:00 khorben Romlok: what happens if you put it between escaped quotes? I think it's eg "\"your UTF-8 string\""
09:00 Romlok ah! Seems it's a dictionary representation thing
09:01 Romlok the unicode string is in a dict, and it's the dict that's being sent to the template via a state
09:01 Romlok so it's being written to the state file as the ascii repr() for, or such
09:01 Romlok *form
09:06 netcho joined #salt
09:07 Romlok hm, but I get a unicodedecodeerror when I try to explicitly put that value into the state file
09:13 jhauser joined #salt
09:26 barmaley joined #salt
09:34 keimlink joined #salt
09:34 tellendil joined #salt
09:35 tellendil Hi, I've got a problem trying to spin a container using cloud.profile. I always end up with https://paste.fedoraproject.org/423281/24084114/ . Does anybody has an idea ? a clue ? thanks !
09:36 Derailed joined #salt
09:47 ivanjaros joined #salt
09:58 Taters joined #salt
09:59 phx mhm, i'm trying custom tops files, so far i've have one as the example in https://docs.saltstack.com/en/latest/topics/master_tops/, but a salt `hostname` state.show_top tells me in  the logs "salt-minion: [ERROR   ] No contents found in top file"
10:00 phx the minion returns with the "dev: test" value, however i still see that message in the logs
10:08 kshlm joined #salt
10:11 akunin joined #salt
10:16 edrocks joined #salt
10:19 rdas joined #salt
10:22 ttrumm joined #salt
10:26 qman__ joined #salt
10:30 akunin joined #salt
10:31 Taters_ joined #salt
10:34 ttrumm joined #salt
10:39 dariusjs joined #salt
10:39 akunin joined #salt
10:44 ninjada joined #salt
10:54 ttrumm_ joined #salt
10:55 PerilousApricot joined #salt
10:57 ninjada joined #salt
11:05 ninjada joined #salt
11:26 keimlink joined #salt
11:33 ttrumm joined #salt
11:34 akunin joined #salt
11:37 teryx510 joined #salt
11:40 ttrumm joined #salt
11:43 cprior joined #salt
11:46 amcorreia joined #salt
11:50 dariusjs joined #salt
12:02 k_ joined #salt
12:04 keimlink_ joined #salt
12:07 Electron^- joined #salt
12:08 rsys joined #salt
12:10 keimlink joined #salt
12:10 ferbla joined #salt
12:16 dariusjs joined #salt
12:17 k_ joined #salt
12:19 edrocks joined #salt
12:19 k_ joined #salt
12:23 hoonetorg joined #salt
12:23 nicksloan joined #salt
12:23 keimlink joined #salt
12:23 Taters joined #salt
12:24 ninjada_ joined #salt
12:27 edrocks joined #salt
12:32 mage_ if I'd like to create /foo/bar on machine A when some state is executed on machine B is a event + reactor the way to do it?
12:32 keimlink joined #salt
12:34 DammitJim joined #salt
12:35 gh34 joined #salt
12:37 babilen mage_: Sure, just fire an event from the other state and react to it
12:37 mage_ thanks!
12:43 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.event.html
12:45 mage_ perfect
12:46 numkem joined #salt
12:49 systo joined #salt
12:56 netcho joined #salt
12:56 netcho left #salt
13:01 georgemarshall joined #salt
13:01 phx anyone here knows how external tops work?
13:01 pppingme joined #salt
13:02 ninjada joined #salt
13:03 hoonetorg hi
13:03 hoonetorg what is the problem with osmajorrelease in debian in 2016.3.3
13:03 hoonetorg it seems to be gone
13:03 hoonetorg will it be back
13:03 hoonetorg is it obsolete
13:04 hoonetorg error message says it must be integer
13:04 hoonetorg and grains do not display it anymore
13:06 bluenemo joined #salt
13:08 kbaikov joined #salt
13:11 manji hoonetorg, there is a bug report for that already I think
13:14 ekristen joined #salt
13:24 ninjada joined #salt
13:27 systo joined #salt
13:30 dendazen joined #salt
13:30 dendazen what is wrong with this statement?
13:30 dendazen {% if( 'kapomega' in grains['fqdn'] or 'backtest' in grains['fqdn'] or 'condor' grains['fqdn'])%}
13:30 dendazen get an error
13:30 dendazen Rendering SLS 'base:packages.sudo.init' failed: Jinja syntax error: expected token 'rparen', got 'grains';
13:31 kojiro joined #salt
13:31 dendazen never mind
13:33 sjmh joined #salt
13:34 keimlink joined #salt
13:35 manji dendazen, you forgot the last "in"
13:36 dendazen yeah, i saw that, thanks.
13:36 manji hehe
13:36 ttrumm joined #salt
13:37 racooper joined #salt
13:43 edrocks joined #salt
13:43 sjorge joined #salt
13:46 flowstate joined #salt
13:49 k_ joined #salt
13:50 systo joined #salt
13:54 alwaysatthenoc joined #salt
13:54 impi joined #salt
13:56 mpanetta joined #salt
13:57 mpanetta joined #salt
14:01 mpanetta joined #salt
14:01 drawsmcgraw joined #salt
14:01 froztbyte is someone going to be doing something about the spam on salt-users?
14:01 pppingme joined #salt
14:02 babilen That would be Google's job, wouldn't it?
14:05 froztbyte maybe?
14:05 perfectsine joined #salt
14:05 froztbyte do they provide a useful button for it?
14:06 mage_ so somethign like that should work ? https://gist.github.com/silenius/242c2bd790916f4c06fb99e2b86435ef (not sure about the kwarg..)
14:07 k_ joined #salt
14:08 babilen mage_: path is not a kwarg, but the first "normal" argument
14:09 mage_ ah.. right
14:10 jenastar1 joined #salt
14:17 abyth joined #salt
14:18 raspado joined #salt
14:18 dylan joined #salt
14:19 Sub_Oracle joined #salt
14:19 TomJepp_ joined #salt
14:20 hasues joined #salt
14:20 hasues left #salt
14:20 abyth Hi everyone, i have a question regarding salt-ssh and explicit usage of "sudo su". Unfortunately i have to install salt-minion using salt-ssh in an environment where i can only obtain superuser privileges using "sudo su". Has anybody an idea despite using raw shell commands?
14:20 armonge joined #salt
14:26 _JZ_ joined #salt
14:28 flowstate joined #salt
14:34 akunin joined #salt
14:34 keimlink joined #salt
14:35 sp0097 joined #salt
14:37 shanesveller does anyone favor a particular tool for "vendoring" public formulas you want to make use of beyond something simple like git-subtree? (coming from the Chef world, thinking of an analogue to Berkshelf). I've also seen things like https://github.com/saltstack-formulas/salt-formula/blob/master/salt/formulas.sls but I'd feel much safer keeping my salt data in
14:37 shanesveller one-self contained repo.
14:37 raspado abyth: add user to wheel?
14:38 k_ joined #salt
14:40 abyth raspado: Thanks for the answer. The user being only able to use sudo for su is something specifically designed and thus shall not be altered.
14:40 codehotter joined #salt
14:40 abyth raspado: It has not been my decision though...
14:41 sp0097 joined #salt
14:41 mohae joined #salt
14:42 fleaz joined #salt
14:42 RealMurphy joined #salt
14:42 jcockhren joined #salt
14:42 muep joined #salt
14:42 raeven joined #salt
14:42 pcn joined #salt
14:42 tooth joined #salt
14:42 LeProvokateur joined #salt
14:42 cmek_ joined #salt
14:42 pprkut joined #salt
14:42 akw joined #salt
14:42 goal_ joined #salt
14:42 dandelo joined #salt
14:42 Edur joined #salt
14:42 inire joined #salt
14:42 keimlink joined #salt
14:42 k_ joined #salt
14:44 roock joined #salt
14:44 bastiandg joined #salt
14:48 Brew joined #salt
14:50 spuder joined #salt
14:55 jxm_ joined #salt
14:55 subsignal joined #salt
14:56 ivanjaros joined #salt
14:56 west575_ joined #salt
14:56 hoonetorg joined #salt
14:56 jenastar1 left #salt
14:58 impi joined #salt
14:59 BattleChicken joined #salt
14:59 edrocks joined #salt
15:03 perfectsine_ joined #salt
15:04 tapoxi joined #salt
15:05 jhauser joined #salt
15:06 numkem joined #salt
15:10 numkem joined #salt
15:14 west575 joined #salt
15:17 Sypher|IT joined #salt
15:17 Sypher|IT Hello
15:18 Sypher|IT I'm considering salt as a management solution for a plethora of raspberries, i'm having a question though
15:18 Sypher|IT I see it can check and mantain that packages be installed on linux distros, however, does it also act as a software distribution?
15:19 Sypher|IT Meaning, can i keep it 'loaded' with the packages that it needs to distribute or the single minions need to have internet access to get the packages?
15:19 ALLmightySPIFF joined #salt
15:22 jimklo joined #salt
15:23 tapoxi Sypher|IT you can use the master as a fileserver and feed the minions packages to install locally, yes
15:23 tapoxi Sypher|IT you could also set up an apt/yum repo and configure your minions to use that
15:23 Sypher|IT yeah
15:23 Sypher|IT was thinking that in the end, that would be the better solution
15:24 ZachLanich joined #salt
15:24 Sypher|IT thanks
15:24 raspado hi all, i have a state file called backup in my top.sls, if i remove the state file which contains a cron like schedule, will it also remove the schedule from the minions?
15:24 tapoxi personally I just use the salt fileserver for config files
15:24 tapoxi packages I have my own yum repo
15:24 fleaz raspado: nope
15:24 perfectsine joined #salt
15:25 fleaz raspado: when you delete states, the stuff these states did, remain on the minions
15:25 fleaz Sypher|IT: but think about the RAM usage of the salt-minions. Had some trouble with Salt on some low memory VMs
15:25 raspado fleaz: whats a good approach in removing the scheduled job on the minions?
15:25 Sypher|IT fleaz, its a 1gb ram thin client
15:25 Sypher|IT basically, i'm looking for something from baremetal/fresh os level to configured thin client.
15:26 fleaz raspado: most salt modules have a $foo.absent function which removes stuff
15:26 raspado i was able to clean the scheduled task by blowing away /var/cache/salt/ but that apparently causes problems :)
15:26 Sypher|IT nothing too complex, just managing conf files and installing reuqired packages; the thin client itself right now is working good
15:26 fleaz Sypher|IT: should be enough ;)
15:26 cprior Sypher|IT: For my single-digit cluster of RPi boards I set up (with salt) a central nginx reverse proxy for ArchLinux and Raspbian sources
15:26 Sypher|IT just gotta start learning a deployment manager
15:26 Sypher|IT cprior, thats more or less what i'm gonna have to do i guess
15:27 Sypher|IT except single digits for me is, when the project is live, 500-600 rasps
15:27 raspado fleaz: would this work? "salt '*' schedule.delete job1 "
15:27 Sypher|IT but theoretically, i'm just gonna make a single image, burn it in SD cards with the minion installed already and deploy them in the wild
15:28 Sypher|IT i hope i can find a way to handle randomization though >_>
15:28 fleaz raspado: can't find a schedule.delete in the documentaiton, but there is a schedule.absent which, abviously checks if the job is absent
15:29 raspado kk thx!
15:29 fleaz np
15:29 cprior Sypher|IT: I frequently reinstall the minions, https://github.com/helotism/helotism/blob/master/application/physical/scripts/bootstrap-arch.sh and in the same directory sdcardsetup.sh give me e.g. 7 SD cards with salt minions.
15:29 tapoxi Sypher|IT randomization for minion id?
15:29 cprior That is a winter project though, have not done much in that code since about March
15:30 Sypher|IT tapoxi, yeah pretty much
15:30 Sypher|IT anyway, gonna install salt and see where i am. need to learn from 0; seems like it can do what i need so right now it's about the learning ...
15:30 Sypher|IT will set up a local repository for teh stuff that i need installed, prepare an image then deploy
15:30 cprior Sypher|IT: to go with the hostname as minion-id is quite manageable
15:30 Sypher|IT cprior, hostname will be the same i guess
15:31 Sypher|IT probably the only differentiating thing between one raspberry to the other is gonna be the mac address
15:31 tapoxi Sypher|IT hostname as minion id, or go full crazy and generate a UUID in the minion.conf
15:32 cprior If you want to test my (so far unused) instal script then http://helotism.de/application/physical/installation should hopefully give you a small "cluster" with a salt-master in 45min
15:32 sp0097 joined #salt
15:32 Sypher|IT well, i have 2 choices in front of me, i can either do a system then image it (clone the SD card) then deploy that (and in this case i need some randomization in the way of handling the minions) OR i do an sdcard for a base system and let salt install the rest and upgrade it to usable state, which should also handle the randomization part of it
15:32 Sypher|IT cprior, i'll take a look now thanks
15:33 cprior I wanted to have a "data analysis cluster", but I got soooo hooked in system administration (with salt) that I have not progressed much towards my "big data appliance" lol
15:34 flowstate joined #salt
15:40 xentrouble joined #salt
15:40 xentrouble Hi. Does anyone know if salt-minion can be installed to XenServer 7.0?
15:41 xentrouble There seems to be a XenAPI module, which implies it would do, but perhaps it's a previous version.
15:42 fleaz xentrouble: http://blog.coultard.com/2016/02/salt-install-xenserver-minion.html
15:42 hoonetorg joined #salt
15:44 xentrouble Hmm, yes I've look at that, I assume he was running an older version of Xen.
15:44 xentrouble XenServer 7.0 wasn't released until after that article was written, sadly.
15:47 fleaz xentrouble: were there so many changes im XS 7 that it shouldn't work anymore?
15:48 raspado when trying to disable a job via schedule, it says the job is disabled but if I do a list, the job still shows enabled http://pastebin.com/4TjvuhBg am I doing this right?
15:50 xentrouble I think so - my issue is I'm missing systemd-python.
15:50 raspado i tried to do a schedule.reload but that didnt update the job
15:56 k_ joined #salt
15:58 sjorge joined #salt
16:01 misconfig joined #salt
16:05 sjmh joined #salt
16:06 fredrick joined #salt
16:09 Tanta joined #salt
16:11 k_ joined #salt
16:19 akunin joined #salt
16:20 ronnix joined #salt
16:28 woodtablet joined #salt
16:29 heaje joined #salt
16:29 pppingme joined #salt
16:31 murrdoc joined #salt
16:34 edrocks joined #salt
16:38 Salander27 joined #salt
16:42 flowstate joined #salt
16:43 raspado is this a proper way to put in a state file? "{% if grains['backup'] is defined and grains['backup'] == True %}"
16:48 hexa- if 'backup'  in grains
16:48 hexa- Both should work I believe
16:49 raspado hexa-: the reason why i added "is defined" is because if the backup grain is not present, it seems to choke when loading the state file
16:50 hexa- Yeah that's fine
16:50 PerilousApricot joined #salt
16:50 raspado I get the error "- Rendering SLS 'playground:backup' failed: Jinja variable 'dict object' has no attribute 'backup'"
16:50 raspado ok cool
16:50 raspado thx hexa-
16:51 brotatochip joined #salt
16:53 ageorgop joined #salt
16:55 Miouge joined #salt
16:57 amcorreia joined #salt
16:59 armyriad joined #salt
17:00 sjmh joined #salt
17:03 pipps joined #salt
17:05 onlyanegg joined #salt
17:05 Taters joined #salt
17:11 impi joined #salt
17:19 pipps joined #salt
17:20 brotatochip joined #salt
17:35 XenophonF i don't understand -
17:35 XenophonF git.latest can't fast forward a clone
17:35 XenophonF but if i run git pull --ff-only, it works just fine
17:36 XenophonF https://gist.github.com/xenophonf/f1a03be092daae614905bf3f5631c000
17:36 XenophonF does anyone have any ideas what might be wrong?
17:39 ageorgop joined #salt
17:40 Miouge joined #salt
17:40 shanesveller I've seen similar behavior when trying to update formulas I've stored using git-vendor
17:40 shanesveller so I hope someone can shed some light that's not just "oh, people are force-pushing those repos"
17:40 Tanta I manually remove the clone first
17:40 Tanta then you can always do a git.latest
17:40 Tanta that's the only surefire way I've found
17:41 XenophonF i'm using salt.formulas from salt-formula, and other formulas seem to update just fine
17:41 XenophonF it's just two repos that i own and commit to
17:41 XenophonF the only thing i've started doing lately is signing commits
17:41 XenophonF but then git pull --ff-only works just fine so i'm not sure what's going on
17:42 flowstate joined #salt
17:44 Miouge joined #salt
17:45 numkem joined #salt
17:45 bash1235123 joined #salt
17:46 bash1235123 can I get a debug output from salt-api ?
17:46 impi joined #salt
17:47 tiwula joined #salt
17:52 amcorreia joined #salt
17:53 tuxx joined #salt
17:57 Miouge joined #salt
18:06 edrocks joined #salt
18:09 bash1235123 through events
18:11 bakins joined #salt
18:13 catpig joined #salt
18:21 cprior joined #salt
18:24 jimklo joined #salt
18:26 freelock[m] XenophonF: i've noticed this happening on Ubuntu 12.04 -- git.latest states aren't getting the latest commit
18:26 freelock[m] however on our 14.04, 16.04 minions the same states are working fine
18:31 cprior The proxyminion rest_sample demo does some "mapping" of function names: https://docs.saltstack.com/en/latest/topics/proxyminion/index.html#proxymodules has a code that works against salt-contrib bottle REST server API. That code does def ping(): which is called for `salt 'rest-minion-is' test.ping` and def service_list(): which answers on `salt 'rest-minion-id' service.list`
18:31 cprior What is the logic behind this "mapping"? I cannot figure it out from reading def salt_proxy_minion():
18:32 cprior I am trying to "overwrite" the call of `salt 'proxy-minion-id' file.file_exists /foo/py
18:35 cprior In my own proxy module (which is called for test.ping, as custom log entries show) I cannot figure out what to 'def'-ine. I tried file_exists, file_file_exists and other variante. The function is just another line return True. But I have no luck...
18:41 cyborg-one joined #salt
18:44 toanju joined #salt
18:45 flowstate joined #salt
18:50 fracklen joined #salt
18:52 Sypher|IT joined #salt
19:02 pfallenop joined #salt
19:02 ronnix joined #salt
19:02 ahammond in the context of an orchestration is there something similar to mod.watch? For example, I want to execute a state, and then if (and only if) that state has produced changes, I want to execute another state.
19:04 ivanjaros joined #salt
19:05 ahammond also, if I'm running an orch which runs a state with queue: True, and there is already another state running, does the orch wait on the queued state to run or does it queue the run and then proceed. I'm really hoping it waits... :)
19:06 XenophonF freelock[m]: i'm having this problem on centos 7 :/
19:06 XenophonF er, no, freebsd
19:07 freelock[m] yeah, my guess is this state is broken for older versions of git
19:07 XenophonF could be
19:07 ALLmightySPIFF joined #salt
19:09 XenophonF i'm in the middle of a poudriere run, looks like there was a problem building one of git's prerequisites
19:09 XenophonF so as soon as that finishes, i'll correct the error and rebuild everything
19:11 akunin joined #salt
19:16 pyropoptrt joined #salt
19:19 armonge joined #salt
19:23 raspado anyone avail to help me figure out a burning problem i have? im using salt to run a sudo command via  python module, I continue to errors for "Pseudo-terminal will not be allocated..." and "sorry, you must have a tty to run sudo" even though I pass ssh -T -t, heres an example http://pastebin.com/ME2ccedQ
19:23 XenophonF you need a second "-t"
19:24 raspado oooo? let me try
19:24 flowstate joined #salt
19:24 XenophonF and you need to get rid of the "-T"
19:24 XenophonF because -T is the opposite of -t
19:24 XenophonF ssh -t -t will force pty allocation
19:24 jimklo joined #salt
19:24 XenophonF even if ssh doesn't have a local tty
19:25 raspado you rock XenophonF, that worked!
19:26 XenophonF awesome i'm 1/26 today!!!
19:26 pipps joined #salt
19:26 * XenophonF begins weeping piteously.
19:27 murrdoc heh
19:30 sjmh joined #salt
19:31 raspado XenophonF: think if I have about 10 machines running "ssh -tt ..." at the same time, if it would cause any problems?
19:32 XenophonF i doubt it
19:32 XenophonF unless you're in some crazy corner case like an embedded machine with severe constraints on RAM, etc.
19:33 raspado kk
19:35 fxdgear joined #salt
19:37 fxdgear hey salt-cloud question. So I'm working with salt-cloud inside a VMWare system. The network is mostly closed off to the outsideworld. So i've created a VM template that comes with salt-minion pre-installed. I'm having issues getting the minion on the VM to regiser with the master.
19:37 toanju joined #salt
19:38 fxdgear the VM is created. But the `minion` file is not being set with the attributes that come from the cloud profile conf file.
19:38 fxdgear (ie the salt-master hostname, and the hostname for the minion isn't being set propelry either...)
19:45 toastedpenguin joined #salt
19:47 toastedpenguin joined #salt
19:47 toastedpenguin can salt be used to mount a SMB share on a windows server?
19:49 pipps joined #salt
19:53 DammitJim joined #salt
19:53 DammitJim is it normal that if I'm trying to apply a state to a dozen minions that the salt master will come back and say: Minion did not return [No response]
19:53 DammitJim ?
19:53 swa_work joined #salt
19:54 iggy depends
19:54 iggy if the minion process was restarted during the highstate, it's not abnormal
19:54 DammitJim nothing was restarted
19:54 iggy how do you know if it didn't return?
19:55 DammitJim The minion failed to return the job information for job
19:55 DammitJim that's what the minion is saying
19:55 fxdgear @DammitJim that happens sometimes when salt-cloud failed to properly provision the minion. usually I'll just delete that minion and recreate.
19:55 DammitJim no salt-cloud
19:55 fxdgear do you have access to the minion?
19:55 iggy what's the uptime on the minion process?
19:55 fxdgear can you run `salt-call`?
19:55 DammitJim yeah, I'm looking at the log on the minion
19:56 DammitJim oh wow... the first line on the log just says: The minion function caused an exception
19:56 DammitJim crap
19:56 DammitJim iggy, mind helping me how to figure that out?
19:56 DammitJim maybe the salt-minion process did restart!
19:56 DammitJim ps aux | grep salt-minion says
19:57 DammitJim Aug19 10:45
19:57 DammitJim for /usr/bin/python /usr/bin/salt-minion
19:57 DammitJim interesting because there seem to be 2 processes one with Ss the other with Sl
19:58 iggy that's not abnormal... one is usually the "watcher" process
19:58 DammitJim ok... 4 minions returned
19:58 sp0097 joined #salt
19:59 DammitJim if I only call 4 of them
20:04 brotatochip joined #salt
20:04 pipps joined #salt
20:06 edrocks joined #salt
20:09 DammitJim man, I have 2 minions with the same name when I do salt-key -L
20:10 murrdoc its game over man
20:10 XenophonF game over!
20:10 * XenophonF prepares to nuke the site from orbit.
20:12 murrdoc pretty much the only wa to be sure
20:13 onlyanegg joined #salt
20:17 pipps joined #salt
20:19 DammitJim so, one minion is accepted
20:19 DammitJim the other is denied
20:19 DammitJim how do I get rid of the denied one? that guy is long gone
20:21 west575_ joined #salt
20:23 iggy rm the file in /etc/salt/pki/
20:28 ALLmightySPIFF joined #salt
20:31 k_ joined #salt
20:33 jhauser joined #salt
20:35 mavhq joined #salt
20:38 JPaul joined #salt
20:41 armonge joined #salt
20:43 CeBe joined #salt
20:43 djgerm joined #salt
20:44 djgerm This is probably a really silly and stupid question, but: can one use salt-cloud to provision new machines but NOT install salt-minion?
20:47 KyleG joined #salt
20:47 KyleG joined #salt
20:51 KyleG Is anyone familiar with matching nodegroups matching w/ pillars? I'm building a dynamic microservices proxy using salt, and I need to have my lb server grab the IPs for each env correctly. Currently I'm having a problem even w/ pillar_Opts true with it matching. https://gist.github.com/kylegato/f3e5f63ec712fb41f084025a3b707c81
20:51 KyleG {% if server in salt['pillar.get']('master:nodegroups:prod_appservers', []) %}
20:51 KyleG This part isn't matching
20:51 KyleG salt['pillar.get']('master:nodegroups:prod_appservers', []) seems to return the actual raw output of the compound matcher configured for that nodegroup on the master instead of allowing me to match on hostname
21:02 cyborg-one joined #salt
21:07 KyleG never mind, I figured it out. :)
21:13 raspado XenophonF: ready for 2/26?
21:14 raspado how is the salt schedule setting the same time over n over again? the timestamp i am setting is a python module with variables for the dates, heres an example http://pastebin.com/45nppDug
21:15 raspado how i am setting the date is "st = datetime.datetime.fromtimestamp(ts).strftime('%Y_%m_%d_%H_%M_%S')"
21:15 raspado if i run salt-call backup.run_backup , the date is set properly but if i let the schedule run its course, it continues to use the same date
21:25 XenophonF weird
21:25 XenophonF i have no clue though
21:25 XenophonF )-;
21:28 debian112 joined #salt
21:29 om joined #salt
21:29 akunin joined #salt
21:30 whitenoise joined #salt
21:32 raspado its somehow caching the date
21:32 raspado wtffff
21:33 raspado could this be it? "schedule: This job was scheduled with jid_include, adding to cache (jid_include defaults to True)"
21:34 akunin joined #salt
21:36 jimklo joined #salt
21:38 pipps joined #salt
21:39 GothAck joined #salt
21:40 sp0097 joined #salt
21:49 flowstate joined #salt
21:50 khaije1 joined #salt
21:52 khaije1 Speaking of formulas ... it hinders their re-use that they use static URIs internally, and so are rooted to a specific place in the file_root tree.
21:53 iggy djgerm: yes `salt-cloud --no-deploy ...`
21:53 khaije1 This got me thinking ... I know that there are best practices for formulas, but I'd really like to see a versioned formula specification or increasing stringency.
21:55 ageorgop joined #salt
21:55 khaije1 I think it'd make it possible to deliver higher quality formulas without dismissing the existing ones.
21:55 khaije1 Thoughts?
21:55 ajw0100 joined #salt
22:06 nidr0x joined #salt
22:08 pipps99 joined #salt
22:09 PerilousApricot joined #salt
22:10 justanotheruser joined #salt
22:16 djgerm thanks iggy!
22:24 iggy khaije1: the problem is the variables to make it possible to use "relative"(ish) paths were broken an insconsistent for so long
22:25 iggy if you feel like going back and fixing all the formulas, we would love to get PRs
22:26 iggy but that also doesn't really fit into the widely accepted practice of using formulas via gitfs remotes
22:27 bluenemo joined #salt
22:42 flowstate joined #salt
22:54 pipps joined #salt
22:54 subsignal joined #salt
22:57 ageorgop joined #salt
22:59 nicksloan joined #salt
23:01 ninjada joined #salt
23:01 ninjada joined #salt
23:05 edrocks joined #salt
23:10 PerilousApricot joined #salt
23:19 om joined #salt
23:21 iggy djgerm: actually there are apparently multiple ways https://docs.saltstack.com/en/latest/topics/cloud/deploy.html#skipping-the-deploy-script
23:34 dendazen joined #salt
23:43 flowstate joined #salt
23:44 BattleChicken left #salt
23:45 pipps joined #salt

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