Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-07-22

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

All times shown according to UTC.

Time Nick Message
00:03 pipps_ joined #salt
00:07 Micromus joined #salt
00:09 phpdave11_ joined #salt
00:11 chitown update from earlier question: i added some more defaults in the pillar AND added "sync_after_install: all" to the cloud profile
00:12 maschinetheist joined #salt
00:12 maschinetheist hi is COPR saltstack repository down?
00:12 maschinetheist can't seem to access it
00:15 wryfi question about pyobjects map data example here: http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.pyobjects.html#map-data
00:15 wryfi why is __grain__ = 'os' defined only for the Ubuntu class?
00:15 kevinquinnyo joined #salt
00:18 kevinquinnyo How do you guys typically handle testing state file changes when using gitfs?  Do you just have a "development-master" server and some "test-minions" and git clone your file_roots directory on the "development-master" server?
00:18 kevinquinnyo and when satisfied, push changes to the repo?
00:19 kevinquinnyo i know there are a lot of ways i could handle this, just curious how people do it
00:22 mrfileio joined #salt
00:23 mrfileio i'm looking for some jinja/gpg help
00:24 mrfileio CRUD-PASSWORD: |   -----BEGIN PGP MESSAGE-----   Version: GnuPG v1     hQEMA7T9p27DtJ2VAQgAgoG5AbjPzQ/unnIKghplvlJcEfLM2mJ2kSz3HDQUhXsx   ...   -----END PGP MESSAGE-----
00:24 mrfileio init.sls
00:24 mrfileio create-pw-file:   file.managed:     - name: /opt/salt-workarea/crud     - source: salt://crud/crud     - template: jinja
00:25 mrfileio crud file
00:25 mrfileio Hello pw="{{ pillar['CRUD-PASSWORD'] }}" World
00:26 bougie joined #salt
00:26 mrfileio output on minion
00:26 mrfileio Hello pw="XXX " World
00:26 mrfileio where the second " is on a newline
00:26 hal58th joined #salt
00:27 clintberry joined #salt
00:28 napsterX joined #salt
00:36 juanito joined #salt
00:39 druonysus joined #salt
00:47 b18 joined #salt
00:49 mrfileio Ugh - declined to use echo -n vs echo for all my gpg pw encrypts
00:53 murrdoc joined #salt
01:02 mioli joined #salt
01:02 baweaver joined #salt
01:02 scoates joined #salt
01:05 loggyer joined #salt
01:05 N-Mi joined #salt
01:10 juanito joined #salt
01:12 breakingmatter joined #salt
01:14 b18 joined #salt
01:17 Bryson user.present fails on every highstate run except the first one with a message that my shell could not be changed. (FreeBSD) `These values could not be changed: {'shell': 'tcsh'}`
01:18 Bryson http://dpaste.com/363TWXD
01:20 edrocks joined #salt
01:22 Micromus joined #salt
01:24 amcorreia_ joined #salt
01:29 napsterX joined #salt
01:30 ageorgop joined #salt
01:33 juanito_ joined #salt
01:35 DaveQB joined #salt
01:41 cberndt joined #salt
01:46 shantanoo joined #salt
01:48 cowpunk22 joined #salt
01:55 ageorgop joined #salt
02:04 silenth joined #salt
02:06 bbbryson joined #salt
02:08 silenth anyone had success installing  v2015.8.0rc1 on ubuntu precise?
02:12 breakingmatter joined #salt
02:13 napsterX joined #salt
02:15 Furao joined #salt
02:20 ageorgop joined #salt
02:22 bhosmer joined #salt
02:25 linkedinyou joined #salt
02:26 TyrfingMjolnir joined #salt
02:29 evle joined #salt
02:41 iggy silenth: there's a bug open about 2015.8rc installation
02:43 snarfy joined #salt
02:45 favadi joined #salt
02:46 iggy kevinquinnyo: mixture of throw away instance with master/minion on same host for devel, then a separate testing master+minions for testing, then QA, then prod
02:46 iggy some of the formulas use vagrant
02:52 snarfy joined #salt
02:54 kevinquinnyo iggy: thanks -- i didnt think to put master and minion on the same test instance
02:55 kevinquinnyo i'm not even using prod, dev, etc branches yet, it's all master for now
02:57 ageorgop joined #salt
02:58 kevinquinnyo git master* branch for clarity
03:07 loz-- joined #salt
03:07 shantanoo joined #salt
03:09 linkedinyou|2 joined #salt
03:22 p0rkbelly joined #salt
03:31 linkedinyou joined #salt
03:37 shantanoo joined #salt
03:37 shantanoo joined #salt
03:56 iggy we don't use branches, we actually have completely different masters for each "environment"
04:02 breakingmatter joined #salt
04:06 ageorgop joined #salt
04:15 h3x3d1 joined #salt
04:16 h3x3d1 Hi, guys. I'm trying to get saltify cloud provider to work, but getting the following error: AttributeError: 'str' object has no attribute 'setdefault'
04:25 shantano1 joined #salt
04:27 jaybocc2 joined #salt
04:28 hartym joined #salt
04:29 cowpunk22 joined #salt
04:38 stoogenmeyer joined #salt
04:46 joeto joined #salt
04:48 jaybocc2 joined #salt
04:50 ramteid joined #salt
04:52 armyriad joined #salt
05:00 Fiber^ joined #salt
05:20 jaybocc2 joined #salt
05:35 napsterX joined #salt
05:37 ITChap joined #salt
05:37 ronrib joined #salt
05:44 catpigger joined #salt
05:47 linjan joined #salt
05:51 breakingmatter joined #salt
05:54 Bryson joined #salt
05:55 clintberry joined #salt
05:57 jaybocc2 joined #salt
06:06 AndreasLutro joined #salt
06:13 jaybocc2 joined #salt
06:14 CeBe joined #salt
06:15 sirex joined #salt
06:16 aparsons joined #salt
06:25 trikke joined #salt
06:32 xMopxShell joined #salt
06:34 slav0nic joined #salt
06:34 amatas joined #salt
06:53 stephanbuys joined #salt
06:57 rdas joined #salt
06:59 kawa2014 joined #salt
07:03 KermitTheFragger joined #salt
07:04 nebuchadnezzar joined #salt
07:07 sunkist joined #salt
07:08 kk_self joined #salt
07:09 Ztyx joined #salt
07:15 amatas joined #salt
07:15 sunkist1 joined #salt
07:19 jaybocc2 joined #salt
07:19 eseyman joined #salt
07:24 seena joined #salt
07:24 seena http://pastebin.com/tgzCJjfr
07:24 seena I am getting jijja syntax error
07:24 seena Any one please recommend
07:29 AndreasLutro seena: you don't need {{ var }} inside {% %} blocks
07:30 nethershaw joined #salt
07:31 unholycrab joined #salt
07:31 hblah joined #salt
07:31 seena AndreasLutro:Thank you . New to salt
07:32 seena AndreasLutro: Worked :)
07:32 seena AndreasLutro: Any recommendation for jijja+salt syntax reading
07:32 AndreasLutro seena: the jinja docs
07:32 trikke joined #salt
07:34 jaybocc2 joined #salt
07:34 seena AndreasLutro: Ok thanks
07:34 Aidin left #salt
07:38 stoogenmeyer joined #salt
07:40 breakingmatter joined #salt
07:41 fredvd joined #salt
07:42 thalleralexander joined #salt
07:42 babilen seena: And http://jinja.pocoo.org/docs/dev/templates/
07:43 seena babilen: Than you
07:43 seena *Thank
07:55 jaybocc2 joined #salt
08:08 Ph-x Hello. I wonder what data the Reactor system has access to. I noticed it has a "data" object which contains event data. Does it have access to grains? To pillar?
08:09 monkey66 joined #salt
08:09 s_kunk joined #salt
08:09 losh joined #salt
08:10 s_kunk_ joined #salt
08:10 jaybocc2 joined #salt
08:11 s_kunk__ joined #salt
08:13 s_kunk joined #salt
08:15 jmreicha joined #salt
08:18 joeto joined #salt
08:21 Xevian joined #salt
08:22 Ph-x It looks like I should run something else from reactor that in turn can do more fancy stuff. Since I want to run code on the master, a runner seems appropriate.
08:22 gcfhvjbkn joined #salt
08:27 markm joined #salt
08:29 seena Is there any reference for handling comma separated pillar , Basically I need to  iterate  through each item
08:30 seena role: abc,xyz
08:30 seena example ^^
08:30 Ztyx left #salt
08:31 h3x3d1 guys, how can i get saltify cloud provider to work?
08:32 h3x3d1 it won't work with examples from repo, or docs
08:32 AndreasLutro seena: why can't the pillar just be an array?
08:32 AndreasLutro role: [ abc, xyz ]
08:32 AndreasLutro I mean list, not array
08:33 babilen exactly
08:34 kbaikov joined #salt
08:38 ITChap joined #salt
08:42 babilen Ph-x: You only have access to what is in data
08:42 Ph-x Alright, thanks for confirming it
08:44 babilen You can call mine functions though
08:45 babilen You essentially don't have access to data that is minion specific
08:46 Ph-x My exact use case is that I want to accept a minion key, but on a condition. I currently solve it with local.cmd.run with salt master hostname as tgt
08:47 Ph-x wheel.key.accept sounds it would be correct to use, but I don't know how to jam in a condition there
08:47 napsterX joined #salt
08:47 Ph-x My current solution: https://gist.github.com/stanislavb/541f98a28f381b92d103
08:48 chiui joined #salt
08:49 chiui joined #salt
08:49 Ph-x What I would love to eliminate is the salt master hostname as tgt and just always run it on the master
08:58 sgargan joined #salt
08:58 joeto joined #salt
08:59 Ph-x A reactor sls has "tgt" and "arg", but does it have "onlyif"?
09:02 jaybocc2 joined #salt
09:07 seena AndreasLutro: That will do my purpose
09:08 N-Mi joined #salt
09:08 N-Mi joined #salt
09:11 unholycrab joined #salt
09:12 gcfhvjbkn joined #salt
09:16 impi joined #salt
09:18 jaybocc2 joined #salt
09:22 linjan joined #salt
09:28 aqua^c joined #salt
09:29 breakingmatter joined #salt
09:32 ingslovak joined #salt
09:37 stephanbuys joined #salt
09:38 jaybocc2 joined #salt
09:46 aqua^c joined #salt
09:47 seena_ joined #salt
09:49 stephanbuys joined #salt
09:51 is_null joined #salt
09:52 is_null hi all, why is my pillar None when used in a template while it has a value when executing pillar.get manually ? http://dpaste.com/3ANYDR8
09:52 is_null see it is rendered as None here: http://dpaste.com/3ANYDR8#line-45 while salt-call pillar.get gets a value here http://dpaste.com/3ANYDR8#line-60 and the same pillar.get call is done in the template here http://dpaste.com/3ANYDR8#line-75
09:53 is_null salt version 2015.5.0-1663-g2bae862
09:53 is_null that sounds a bit too big to be a bug honnestly so what am i doing wrong ?
09:54 jaybocc2 joined #salt
09:57 AndreasLutro is_null: you need salt.pillar.get() if you want to use the : for nested elements denotation
09:58 is_null ohhhh thanks
09:59 is_null fun fact to know ;)
10:01 denys joined #salt
10:04 aqua^c joined #salt
10:05 AndreasLutro is_null: to elaborate - the `pillar` variable is just a regular python dict, which has a get() method. `salt.pillar.get` is the salt module function "pillar.get" which has additional functionality
10:10 is_null nice, thanks
10:14 aqua^c joined #salt
10:16 subsignal joined #salt
10:20 stephanbuys joined #salt
10:23 aqua^c joined #salt
10:24 geekatcmu joined #salt
10:25 bhosmer joined #salt
10:26 voileux joined #salt
10:32 aqua^c joined #salt
10:33 dabb joined #salt
10:47 pcdummy joined #salt
10:50 aqua^c joined #salt
10:55 jhauser joined #salt
10:57 oeuftete joined #salt
11:02 seena Hey guys I am implementing user management , How can I remove user when the corresponding  pillar  data is getting removed
11:02 AndreasLutro seena: you can't, add an "enable: false" or similar flag to users that are to be removed
11:03 evle joined #salt
11:03 drawsmcgraw joined #salt
11:03 seena AndreasLutro: is it , thats bad
11:07 Linkin-UP joined #salt
11:08 aqua^c joined #salt
11:10 Brew joined #salt
11:10 AndreasLutro not really
11:15 Linkin-UP left #salt
11:18 breakingmatter joined #salt
11:19 aqua^c joined #salt
11:19 lothiraldan joined #salt
11:28 Furao joined #salt
11:28 xintron Can I configure global smtp settings somehow that will be available on the minion?
11:29 xintron Is that via pillars or can it be put in the salt-master-config?
11:29 xintron (without creating it as a profile)
11:36 Ph-x Hi. Can I do a salt-run that executes arbitrary code on the master without doing a state with master as target? Something like salt-run cmd.run "echo foo"
11:36 linjan joined #salt
11:36 Ph-x Or do I have to write my own runner in python for that? :)
11:37 amcorreia_ joined #salt
11:38 aqua^c joined #salt
11:38 seena Ph-x: salt-call cmd.run "ls -al"
11:38 seena is that you are looking for ?
11:38 b18 joined #salt
11:38 Ph-x I hoped for a runner so that I can trigger it from reactor, actually
11:39 seena Ph-x: that execute only in master
11:39 Ph-x Yeah, that is my use case
11:39 seena salt "*" cmd.run "ls -al"  in all minions
11:43 xintron Is there some way I can debug-print the master config (as given when using the python salt.config module)?
11:43 fish_ joined #salt
11:43 fish_ hi
11:44 fish_ how can I call network.interfaces() from a module?
11:44 jaybocc2 joined #salt
11:45 fish_ ah, __salt__?
11:47 fish_ ok yeah that works
11:56 aqua^c joined #salt
11:59 chiui joined #salt
12:00 fish_ that's weird.. my module seem to work now but it's only loaded after I run salt salt saltutil.sync_all, not on minion startup
12:00 jaybocc2 joined #salt
12:05 aqua^c joined #salt
12:06 pcdummy joined #salt
12:12 tipiak joined #salt
12:14 aqua^c joined #salt
12:22 markm joined #salt
12:23 oeuftete Can the reactor system call a module (with kwargs) on a minion?  Not having much luck doing so, ending up calling my module via a state and using this recipe: http://docs.saltstack.com/en/latest/topics/reactor/index.html#passing-event-data-to-minions-or-orchestrate-as-pillar
12:24 CeBe left #salt
12:25 stoogenmeyer joined #salt
12:32 aqua^c joined #salt
12:33 elfixit joined #salt
12:38 gcfhvjbkn joined #salt
12:38 _JZ_ joined #salt
12:41 aqua^c joined #salt
12:41 zer0def joined #salt
12:43 XenophonF joined #salt
12:44 ferbla joined #salt
12:47 subsignal joined #salt
12:50 aqua^c joined #salt
12:55 fxhp joined #salt
12:59 aqua^c joined #salt
12:59 jdesilet joined #salt
13:01 esharpmajor joined #salt
13:01 aphor joined #salt
13:08 aphor left #salt
13:08 subsignal joined #salt
13:08 breakingmatter joined #salt
13:08 aphor joined #salt
13:08 aqua^c joined #salt
13:08 Tecnico1931 joined #salt
13:13 dude051 joined #salt
13:14 jalbretsen joined #salt
13:15 andrew_v joined #salt
13:15 xintron Is there an easy way to check (in a shellscript) if the minion has run state.highstate and if it was successful?
13:16 tmilam i'm trying to target minions in a test environment. they all have 'tst' in their hostname. is this the right way to do it in top.sls? https://pastee.org/xaahp
13:16 funzo joined #salt
13:17 tmilam file roots: https://pastee.org/8xj3z
13:17 aqua^c joined #salt
13:18 Mate did anyone try the bootstrap script on precise or trusty today?
13:19 babilen did you?
13:19 Mate yes, but can't succeed
13:20 Mate with my usual salt-cloud commands on my existing templates
13:20 breakingmatter joined #salt
13:20 linjan joined #salt
13:21 babilen What happens if you try and what have you done to fix it?
13:22 Mate i'm trying to find out, what is this commit for https://github.com/saltstack/salt-bootstrap/commit/f8732ce6f2f2191b2fa65ff5e3bb84949182332e
13:22 Mate which totally changed the way requests is installed
13:23 wnkz joined #salt
13:23 babilen You are aware that it is hard to say anything if we don't even know the error message you see, aren't you?
13:23 Mate i think, the question was clear: i can't even explain this works for anyone
13:24 Mate python-requests : Depends: python-urllib3 (>= 1.7.1) but it is not installable
13:24 babilen That seems to fix https://github.com/saltstack/salt-bootstrap/issues/630
13:25 babilen python-urllib3 is in trusty, but not in precise. You shouldn't see that error on both.
13:27 drawsmcgraw Anyone having issues lately using salt-cloud to deploy to Digital Ocean? We try to launch ~6 droplets at a time and invariably at least half of them will fail to bootstrap the minion.
13:27 silenth drawsmcgraw: having issues with salt-cloud & ec2
13:27 drawsmcgraw And even launching single droplets at time, we'll see the same thing - bootstrapping fails.
13:27 babilen What's the error you are seeing? Which distribution are your minions?
13:27 drawsmcgraw silenth: salt-cloud and Digital Ocean, specifically
13:28 drawsmcgraw It's been a while since we tried it against EC2 or any other provider, so can't say much about that
13:29 silenth drawsmcgraw: no not Digital Ocean - I mainly use ec2, sorry
13:29 drawsmcgraw silenth: Fair enough. B-U-T are you seeing similar problems?
13:30 drawsmcgraw I mean, it's failing on *odd* stuff, like uploading the bootstrap script
13:30 drawsmcgraw The odd thing is, it issues a 'date' command on the new minion to confirm that there's connectivity.
13:30 drawsmcgraw I wouldn't attempt to upload the script (minion keys, config, etc...) if that date command had failed.
13:30 Mate babilen: the bootstrap script from stable^1 is actually working
13:30 drawsmcgraw So... what're you seeing? :)
13:31 drawsmcgraw babilen: assuming that was pointed at me(?). We're running the latest and it's randomly failing at parts where it tries to upload the script, or execute the script, or upload the config.
13:32 Mate and yes, trusty said I should add -P, and it does work with the current stable
13:33 Mate but f8732ce broke it on both distros with an existing config
13:36 aqua^c joined #salt
13:36 murrdoc joined #salt
13:36 Twiglet yup, broke my trusty bootstrapping as well
13:37 Twiglet works with -P
13:37 quasiben joined #salt
13:37 mapu joined #salt
13:38 favadi joined #salt
13:39 Twiglet * ERROR: You need to allow pip based installations (-P) in order to install the python package 'tornado >= 4.0'
13:40 quasiben1 joined #salt
13:41 shantanoo joined #salt
13:42 shantanoo hi, i want to check whether mysql db is absent and then want to run another state
13:43 shantanoo salt '*' mysql.db_exists 'dbname' <--- this works from command line
13:43 shantanoo when i try this in .sls, it fails
13:43 shantanoo Error: State 'mysql.db_exists' was not found in SLS 'tmp'
13:44 racooper joined #salt
13:45 N-Mi joined #salt
13:48 shantanoo i tried using 'mysql_database.present' but i don't want it to create the database
13:48 kbaikov joined #salt
13:49 murrdoc google saltstack prereq, saltstack module.run
13:49 murrdoc together it will solve your problem
13:51 jaybocc2 joined #salt
13:52 druonysus joined #salt
13:52 druonysus joined #salt
13:53 Ph-x Hi. I am pondering about key management. Is the directory based file structure on the salt master the only available minion key backend at this point?
13:54 stoogenmeyer_ joined #salt
13:55 xintron Are grain keys case-sensitive?
13:55 Mate yes
13:56 drawsmcgraw shantanoo: You're using the "module" on the command line
13:56 drawsmcgraw When you're writing sls files, you're calling "states"
13:56 drawsmcgraw And there's no "mysql" state :/
13:56 quasiben joined #salt
13:57 kbaikov joined #salt
13:57 drawsmcgraw Go here -> http://docs.saltstack.com/en/latest/salt-modindex.html
13:57 drawsmcgraw And run a text search for "states.mysql"
13:57 jmreicha joined #salt
13:57 shantanoo murrdoc: tried https://gist.github.com/anonymous/bbee92db907e2504fc09
13:57 drawsmcgraw to see the states available.
13:58 murrdoc shantanoo:  u need to change func to name
13:59 drawsmcgraw Ah... I see now. My mistake
13:59 drawsmcgraw Yeah what murrdoc said
14:03 pcn Does anyone know of any projects that use the salt codebase to be a more minimal salt-call for testing?
14:04 pcn I'm looking through the source, and it looks like if I want to I could mimic most of what salt-call does, down to calling state.show_sls, but using passed-in data instead of discovering pillars and grains
14:04 mpanetta joined #salt
14:05 pcn it should be possible.
14:05 murrdoc google salt python api
14:05 tmilam i'm reading this and getting confused about managing my state files http://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html#moving-beyond-a-single-sls
14:05 dude051 joined #salt
14:06 tmilam how would you layout your file structure for 3 environments: test, dr, prod
14:06 tmilam and all 3 have potentially different config files?
14:06 tmilam right now i have srv://test,dr,prod
14:06 jaybocc2 joined #salt
14:06 pcn Yeah.  That's why the git modules are so attractive
14:07 silenth is anyone here using salt-cloud? I have tried 2015.5.3 2015.5.0 2015.8.0rc1 on OSX, Ubuntu 12.04 and 14.04 and still can't provision ec2 hosts
14:07 tmilam that getting started page has an apache example, but i might want different apache configs in each environment
14:07 pcn tmilam: You can do that
14:07 pcn silenth: what's failing?
14:08 Twiglet silenth: did this start about 2 hours ago?
14:08 shantanoo murrdoc: after changing to 'name' it is giving, 'The following arguments are missing: m_name'
14:08 Twiglet because the bootstrap updated about 2 hours ago which seems to break my ubuntu stuff
14:08 silenth pcn: it starts the instance however the debug logs say that it is waiting for an IP (even tho it is up and I can ssh to it)
14:09 silenth Twiglet: not really - it has been a problem since I upgraded my homebrew version of saltstack to the latest version
14:10 tmilam pcn: sorry to ask such a basic question, but what should i be reading to understand how to manage different states & environments, keeping everything seperated?
14:10 silenth since then I have tried umpteen versions on a myriad of different hosts, created new IAM users, etc
14:10 pcn If you use the aws cil, e.g. aws ec2 describe-instances --instance-ids <instance id> the state should be running
14:10 murrdoc shantanoo:  well you are using kwargs wrong, you have to use m_name … its in the docs
14:11 shantanoo murrdoc: aah. i was using m_name, but inside kargs...
14:12 silenth pcn: it is...that is the point..but 20 minutes later salt-cloud is still in a loop : INFO Starting new connection to
14:12 silenth "Starting new HTTPS connection (1): ec2.ap-southeast-2.amazonaws.com"
14:12 silenth then "{}"
14:13 pcn Can you use the aws cli from the salt master?  That looks like a network or API issue in ec2 in that region
14:14 tmclaugh[work] joined #salt
14:15 shantanoo murrdoc: removing 'charges' is working. thanks
14:15 shantanoo s/charges/kargs/
14:16 silenth pcn: yeah I can use the aws cli..I need salt to be able to auto-provision instances
14:16 silenth pcn: I have tried multiple regions too..
14:16 silenth here is the log http://pastebin.com/BWzPYQPn
14:16 pcn Ah, that's good info
14:18 linjan joined #salt
14:23 dendazen joined #salt
14:23 silenth pcn: any clues that you can see?
14:24 pcn Looking at our launching script
14:27 TheoSLC joined #salt
14:27 gcfhvjbkn there's something weird with one of my several minions
14:28 gcfhvjbkn although i can ping it without a problem (using os ping command)
14:28 gcfhvjbkn i only seldom can get a response from it with salt '' test.ping
14:28 gcfhvjbkn same goes for all the other salt commands
14:29 silenth pcn: thanks :)
14:29 gcfhvjbkn by "i can ping it without a problem" i mean that pings pass in less than 1ms
14:30 pcn silenth: our launch script is working, calling salt-cloud, and the node is provisioned and starting its highstate.  DUnno what to tell you
14:31 suresh22r joined #salt
14:31 aqua^c joined #salt
14:31 silenth pcn: weird...I thought evenryone would be using salt to provision to ec2...at the moment I feel like I am an edge case!
14:32 suresh22r left #salt
14:33 jartsu joined #salt
14:33 chiui joined #salt
14:33 aparsons joined #salt
14:35 clintberry joined #salt
14:37 silenth pcn: should I log an issue on GH?
14:37 silenth pcn: would --no-deploy have an effect on this?
14:37 wnkz joined #salt
14:40 silenth I just tried without "--no-deploy" and get the same result
14:41 pcn silenth: it looks like there is a trace log level, too
14:42 silenth pcn: do you want me to try with trace?
14:42 linjan joined #salt
14:43 * silenth spends $$ running ec2 instances
14:43 pcn I think you should; it looks like that includes response data.  It'll be drinking from the firehose
14:47 silenth pcn: https://paste.ee/p/rvu04
14:49 silenth the last bit repeats over and over...even until console output is available (confirmed via web ui)
14:49 tpaul joined #salt
14:49 aqua^c joined #salt
14:53 murrdoc joined #salt
14:56 icflournoy joined #salt
14:57 dude051 joined #salt
14:58 TheoSLC joined #salt
14:58 mcote joined #salt
14:58 zmalone joined #salt
14:59 pcn silenth: I'm not sure why that's happening.  Is it possible you've got known_hosts_file configured per https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/ec2.py#L2086 ?
14:59 aqua^c joined #salt
14:59 tipiak joined #salt
15:00 silenth pcn: yes I do...that is the exact reason I use salt - to securely put the ssh_host keys into my known hosts
15:00 Brew joined #salt
15:04 dude051 joined #salt
15:04 andrew_v joined #salt
15:04 pcn Does the console for the AMI you use print out the ssh key the way that code is expecting?
15:05 silenth pcn: good question...it used to until I upgraded
15:05 pcn That's what it's waiting for
15:06 pcn I'd suggest that you should file a bug on salt-cloud because it doesn't tell you why it's siting there forever.  That's something the user should be made aware of.
15:06 tipiak joined #salt
15:06 cowpunk22 joined #salt
15:07 sdm24 joined #salt
15:07 silenth pcn: yep
15:07 pcn It's also pretty trivial to add the code, you could do that as PR in about as much time as it took us to figure this out :)
15:08 pcn And of course you've got to go file a bug with whoever maintains that AMI
15:08 kaptk2 joined #salt
15:08 jondonas joined #salt
15:08 aqua^c joined #salt
15:09 silenth pcn: that output is standard on ubuntu and comes from cloud-init
15:10 kawa2014 joined #salt
15:11 pcn So is that appearing on the console?
15:11 mcote HI guys, new salt user here.. Looking for a state alternative for the module "file.find", is there any other than a cmd.run with bash's find?
15:12 XenophonF mcote: you can use the module state to run file.find, if that helps
15:13 mcote oh, that's great, didn't know that, sure helps. Thanks!
15:13 furrowedbrow joined #salt
15:15 ksj joined #salt
15:17 silenth pcn: um depends on what you mean by the console...it is available from the aws ec2 get-console-output / or the aws web ui
15:18 bharper joined #salt
15:19 jhauser joined #salt
15:19 pcn That should be the same as what comes out of GET /?Action=GetConsoleOutput&InstanceId=i-265264fa&Version=2014-10-01 HTTP/1.1
15:19 ksj hi. salt-ssh doesn't appear to be picking up custom grains (i.e. in /etc/salt/grains). I've tried --refresh and removing the cache, but nothing works. I've even tried starting and stopping the minion service (which shouldn't affect it, as far as I can tell)
15:19 jartsu left #salt
15:21 silenth pcn: yeah...in the trace output it eventually has a bunch of encoded data..but that data never seems to make it to known_hosts
15:22 silenth pcn: I wonder what the ssh connect fail has to do with it all
15:22 iggy tmilam: you need to understand the implications and use the scheme that works best for your setup
15:22 ALLmightySPIFF joined #salt
15:22 iggy tmilam: f.ex. we don't use saltenv's, we have completely separate masters for each environment
15:22 pcn silenth: the console output should start when ssh connects
15:22 silenth I am trying it now without known_hosts option
15:23 XenophonF iggy, i'm heading that direction too
15:23 XenophonF was just thinking about setting up a dev salt master for the dev environment this morning
15:23 silenth pcn: really? doesn't the ec2 driver get the console output from the api?
15:23 iggy gcfhvjbkn: what version of salt?
15:25 totte joined #salt
15:25 pcn silenth: at https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/ec2.py#L2073 it waits for the ssh port to become available.  Only when it can connect on the port does it try to get the console output from the API with that get request.  That's what I was trying to say.
15:26 silenth pcn: ah
15:27 zsoftich1 joined #salt
15:28 gcfhvjbkn iggy: 2015.5.2
15:28 silenth pcn: so does it need to successfully authenticate?
15:29 silenth pcn: maybe the timeout is too short
15:30 pcn silenth: it doesn't need to authenticate, it's not actually initiating an ssh connection, it's just checking that the port is listening.
15:30 pcn silenth: the timeout is 15 minutes I think
15:31 pcn (for the ssh port to become available)
15:33 silenth pcn: the port is certainly available as I can ssh into the host
15:33 dfinn joined #salt
15:33 virusuy joined #salt
15:34 VSpike joined #salt
15:34 iggy gcfhvjbkn: is there any kind of weird network topology in play?
15:35 VSpike If I want to install nscd and I'm pretty happy with the default config, should I touch the config file? Obviously, someone could edit it after install, but seems like a lot of Salt stuff is mostly designed to be run on a clean machine or be idempotent on an already set up machine
15:36 VSpike You can't try to cover every possibility, right?
15:36 VSpike I could ship a config file, but I think I'd need a different one for each OS and version
15:37 teryx510 joined #salt
15:39 gcfhvjbkn iggy: i don't really know, it's aws ec2
15:39 gcfhvjbkn any way i can check?
15:39 silenth pcn: thanks for all your help btw...
15:40 silenth pcn: I think the "Caught exception in wait_for_port: timed out" could be significant...it seems to swap the waiting for port to the waiting for console output
15:41 silenth pcn: if what you say is true then it should wait for 10 minutes for ssh to become available and THEN get console output
15:41 silenth meanwhile it is the opposite
15:41 VSpike gs
15:41 VSpike sorry wrong window :)
15:42 iggy gcfhvjbkn: are they in the same az/vpc/etc?
15:42 oeuftete Is there a way to fire all beacons?  I have some slowish ones that run at longer intervals, but at the end of a highstate I'd like it to immediately run.
15:43 perfectsine joined #salt
15:43 pcn silenth: there's a 30 second timeout per loop, but it's business as usual.  Each loop it'll print that message.  It has only failed when it prints "Port connection timed out"
15:43 gcfhvjbkn iggy: same vpc, different availability zone though
15:44 iggy gcfhvjbkn: do you have other minions in the different az? Do they exhibit the same symptoms?
15:45 gcfhvjbkn iggy: nope, my other minions are on the same id with the master
15:48 oeuftete I get the feeling from googling that the reactor and beacon systems aren't that widely used.
15:50 lothiraldan joined #salt
15:50 robothands i read that as bacon system. got excited then
15:52 silenth pcn: it only prints that message once
15:53 terratoma joined #salt
15:53 napsterX joined #salt
15:54 iggy gcfhvjbkn: it sounds like maybe the routers between the 2 AZs are timing out the connections
15:55 iggy gcfhvjbkn: you can play with the keepalive settings in the minion or try raet maybe
15:56 iggy oeuftete: beacons are brand new, so no not widely used... reactor on the other hand is widely used
15:58 gcfhvjbkn iggy: thanks
15:58 cwright joined #salt
15:59 unholycrab joined #salt
15:59 shantanoo joined #salt
16:01 linjan joined #salt
16:02 silenth I also ran a tcpdump and no attempt was made at a connection
16:02 manfred joined #salt
16:02 sunkist joined #salt
16:03 aqua^c joined #salt
16:04 silenth pcn: thanks for all your help..I gotta get to bed :)
16:04 pcn silenth: all of the "caught exception" messages are at https://github.com/saltstack/salt/blob/develop/salt/utils/cloud.py#L628
16:06 pcn silenth: it seems like you've got an interesting test setup.  Get some sleep, let me know how you're doing tomorrow.  I'm pretty sure I'll be here.
16:07 silenth pcn: thanks mate...I'm probably gonna have recurring dreams about this haha
16:07 silenth gnight
16:07 pipps joined #salt
16:08 hasues joined #salt
16:08 hasues left #salt
16:08 FredFoo joined #salt
16:09 Ztyx joined #salt
16:10 denys joined #salt
16:11 pcn good night
16:12 thekabal joined #salt
16:12 pcn iggy: Just to make sure I'm not duplicating anyone else's work, has anyone done something like this already: https://gist.github.com/pcn/9f2717c993c0d7e4d862
16:13 thekabal Is it possible in a top.sls or init.sls file to use glob matching like “if ‘a’* in grains['fqdn’]”?
16:17 denys joined #salt
16:21 aqua^c joined #salt
16:24 iggy thekabal: no
16:25 thekabal Ok! That is useful, thank you! Then, my question becomes what is the best practice for where to set a “role” for a machine to match against (“This is a MySQL server”), in grains or in pillars?
16:25 Slimmons joined #salt
16:26 Slimmons Having some problems with a mysql setup.  I'm getting errors, but I'd also like to know if there is a way to have my database and db user have the same name.  It's mentioned in the comments on the gist.    https://gist.github.com/johnsimmons/5aa76d29d24a493e98b8
16:26 Slimmons Any help is appreciated
16:27 bhosmer joined #salt
16:27 iggy pcn: not that I'm aware of, but bringing it up on the mailing list before you get too far might be a good idea
16:27 jaybocc2 joined #salt
16:28 iggy thekabal: {% if 'a' in grains['id'] %} means match any minions with a in the id grain, so the * would be redundant there
16:28 pcn OK, thanks.  It's a great tour of this part of the internals, but I would rather use my time efficiently!
16:29 iggy thekabal: there are pluses and minuses to putting roles in grains or pillars, you should be able to find plenty of examples in this channel's logs
16:30 hal58th joined #salt
16:30 aqua^c joined #salt
16:32 iggy thekabal: top file can be matched sort of... do a grains match of 'roles:foo*' and it'll match, but you wouldn't do it with jinja (jinja in a top file is... complicated)
16:32 thekabal Excellent! I’m looking through the chat logs now and found an example of setting it on grains
16:33 thekabal Is it possible to set the grain in a file from the master? (I haven’t made it that far in the log conversation yet)
16:34 iggy you'd probably use pillars for that
16:35 iggy the bad part is that at some level you have to have a source of truth for all this
16:35 iggy so you're left matching hostnames in top files (for pillar roles) or you have to get them into grains on the minion somehow
16:36 GnuLxUsr joined #salt
16:38 thekabal iggy> Heh, for sure tricky! I think based on the logs and the helpful page http://docs.saltstack.com/en/latest/topics/targeting/grains.html , that I’ll set the role in the /etc/salt/grains file on each minion, and then use salt to manage the state of that file, giving one “source of truth” on the master. Does that seem reasonable? Any major things I’m missing from that?
16:39 iggy we use grains and I wrote a custom grain module that pulls the roles from GCE metadata
16:39 thekabal OOoo VERY cool
16:40 iggy you can also set grains from salt-cloud if you use that
16:40 amcorreia_ joined #salt
16:40 thekabal I don’t yet, but I suspect I will in the near future
16:40 iggy then the cloud map becomes your source of truth
16:41 iggy so... it all depends what you're trying to do, what your limitations are, what kind of systems you have to work with, etc.
16:41 thekabal Well thanks, iggy, you’ve been very helpful. I’m going to try setting up these grains and roles. I may return. :)
16:41 iggy I lucked out, when I started here, they had nothing, so I got to build it all from scratch
16:41 iggy if you have legacy systems to deal with, probably not so lucky
16:43 icflournoy joined #salt
16:48 aqua^c joined #salt
16:50 kevinquinnyo joined #salt
16:55 spookah joined #salt
16:56 shantanoo joined #salt
16:56 shantanoo joined #salt
16:56 jodv joined #salt
16:57 ksj hi. salt-ssh doesn't appear to be picking up custom grains (i.e. in /etc/salt/grains). I've tried --refresh and removing the cache, but nothing works. I've even tried starting and stopping the minion service (which shouldn't affect it, as far as I can tell)
16:59 kevinquinnyo i am generating a random password in a pillar file, but i need that password to persist.  How can I do this?  It's generating a new password for each minion
16:59 iggy ksj: salt-ssh doesn't use the minion service and afaik doesn't read anything minion related from /etc/salt
17:00 iggy kevinquinnyo: write a bridge to vault?
17:00 soren joined #salt
17:00 kevinquinnyo iggy: sorry i dont follow, can you clarify that
17:01 sdm24 kevinquinnyo: how is the password being generated? If Salt is doing it, you can have a check with either an unless statement or {% if pillar['password'] == ..%} maybe
17:01 iggy vault is a piece of software that is meant for just that, you could write an ext_pillar that talked to it
17:02 spookah left #salt
17:02 ageorgop joined #salt
17:02 kevinquinnyo iggy: i was doing something like this password: {{ salt['random.get_str'](13) }}
17:02 ksj iggy: thanks. that's what I thought, but salt-ssh should read grains right?
17:03 ksj custom grains I mean
17:03 kevinquinnyo er sdm24 rather
17:03 iggy ksj: that would be a minion config thing, so no
17:03 ksj damn....
17:03 ksj double damn. I define all my systems through custom grains
17:04 iggy I'm not exactly sure how you could set grains in a salt-ssh setup
17:04 aparsons joined #salt
17:05 icflournoy joined #salt
17:05 sdm24 kevinquinnyo: one way that I can think of, is to have the salt master use mine data to create a file for each minion, with a template of  {{ salt'[random.get_str'](13) }}, and then use the file_tree pillar options
17:05 sdm24 http://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.file_tree.html
17:05 sdm24 I use a similiar method to have salt generate SSH-keys for all my linux minions, and then push those keys out
17:06 aqua^c joined #salt
17:06 kevinquinnyo sdm24: that could definitely work
17:07 kevinquinnyo yeah im keeping pillar data in github, so i dont want any actual sensitive data in the repo.  So this could work for that
17:07 sdm24 https://gist.github.com/sdm24/445ef07f62edf3b279e9 heres that state
17:07 kevinquinnyo thanks
17:07 murrdoc gareth you around
17:08 sdm24 no problem. I know that it isn't organized perfectly and might be kind of confusing to understand, so let me know if you have any questions/comments
17:10 bluenemo joined #salt
17:10 bluenemo joined #salt
17:11 ksj iggy: so....what alternatives do I have? I'm looking at the minion_opts in roster, but it's not really documented and I can't figure out if I can push grains via that
17:12 iggy ksj: no clue, I don't use salt-ssh
17:12 forrest joined #salt
17:12 Gareth murrdoc: i am.
17:12 theologian joined #salt
17:13 KyleG joined #salt
17:13 KyleG joined #salt
17:14 dendazen joined #salt
17:15 murrdoc hey hey
17:15 murrdoc scheduler needs more documentation
17:15 murrdoc like .. how do i use raid for one
17:16 Gareth raid?
17:16 murrdoc brain has crossed streams, sorry, how do i use range
17:16 murrdoc "This will schedule the command within the range specified. The range parameter must be a dictionary with the date strings using the dateutil format.
17:17 * Gareth looks
17:17 murrdoc so how do i give it a range of 6-9pm daily
17:17 conan_the_destro joined #salt
17:18 Gareth murrdoc: a dictionary with start: 6:00pm & end: 9:00pm
17:18 murrdoc and thats it ?
17:18 Gareth murrdoc: there is an example in utils/schedule.py that should get built into the docs.
17:18 Bryson joined #salt
17:18 quasiben joined #salt
17:18 Gareth murrdoc: Yup.
17:19 murrdoc https://github.com/saltstack/salt/blob/2014.7/salt/utils/schedule.py#L91
17:19 murrdoc yeah its not in the docs
17:19 murrdoc THANKS
17:20 Gareth weird.
17:21 murrdoc http://docs.saltstack.com/en/2014.7/ref/states/all/salt.states.schedule.html#salt.states.schedule.present
17:21 murrdoc is that the wrong doc
17:21 murrdoc should i be looking at another one
17:21 Gareth that would be one place....needs an example of using range in the state it seems :)
17:22 murrdoc whats the recommended doc for schedules
17:22 Gareth http://docs.saltstack.com/en/latest/topics/jobs/schedule.html
17:23 sdm24 and it should change the second example to seconds: 3600 instead of seconds: 15 ;)
17:23 ageorgop joined #salt
17:24 joeto joined #salt
17:24 murrdoc Gareth:  maybe the states doc should link to that
17:24 aqua^c joined #salt
17:24 murrdoc and thanks
17:27 ksj https://docs.saltstack.com/en/develop/topics/ssh/roster.html hints that I should be able to set grains using the thin_dir parameter, but i can't see where to set them in that dir
17:27 ajw0100 joined #salt
17:30 ageorgop joined #salt
17:31 mpanetta joined #salt
17:33 aqua^c joined #salt
17:38 perfectsine joined #salt
17:41 hrumph joined #salt
17:41 hrumph hello
17:41 hrumph i will be running approx 60 minions. Do you guys have any idea about what kind of resources the salt master will need?
17:42 jodv very little
17:42 conan_the_destro joined #salt
17:43 hrumph as in minimum for the OS?
17:45 shantanoo joined #salt
17:45 shantanoo joined #salt
17:47 X67r joined #salt
17:51 iggy hrumph: what are your options?
17:51 hrumph iggy we'eere coming up with specs for a new server now
17:51 iggy physical or virtual?
17:51 hrumph one vm will be a (so far ) dedicated salt master
17:51 hrumph iggy, physical with a bunch of vm's
17:53 iggy then get them to throw in some extra mem for s&g's and you'll be fine
17:56 iggy our biggest master has about 50-75 minions at different times and it's a 2cpu+7G GCE instance that barely goes over ~7% cpu usage
17:56 gcfhvjbkn joined #salt
17:56 rall0r joined #salt
17:57 breakingmatter joined #salt
17:58 mpanetta joined #salt
18:00 conan_the_destro joined #salt
18:07 aw110f joined #salt
18:09 perfectsine joined #salt
18:12 pcn Has anyone seen vagrant deployments of a salt minion finish a highstate, then just kind of never close the ssh connection, like it's not exiting from the sudo call or something?
18:14 napsterX joined #salt
18:15 baweaver joined #salt
18:20 soren joined #salt
18:21 ageorgop joined #salt
18:27 gimpy973 Using 'service.running' with 'enable: True' it will start a service if it is stopped, how do I have Salt re-check that is still running every X minutes (in other words, run the state again)?
18:27 ajw0100 joined #salt
18:28 aqua^c joined #salt
18:29 sdm24 It was my understanding that service.running will start a service if it is stopped, and restart a service already running if there is a requirement statement
18:30 sdm24 as for running the state every X minutes, check out the scheduler docs https://docs.saltstack.com/en/latest/topics/jobs/index.html#scheduling-jobs and http://docs.saltstack.com/en/latest/ref/states/all/salt.states.schedule.html
18:32 dopesong joined #salt
18:34 gimpy973 sdm24: Been looking at those, I don't get what I have to do though, as in, to start with where do I define these jobs?  https://gist.github.com/anonymous/480b0266d57fa08dad70
18:34 cliluw joined #salt
18:37 druonysuse joined #salt
18:38 sdm24 https://gist.github.com/sdm24/0d674df95455a2334c14 that will run the ntp state every 5 minutes
18:38 neil__ joined #salt
18:40 gimpy973 sdm24: That goes in its own file, top.sls, or ntp.sls?
18:42 quasiben joined #salt
18:43 twork latest kindergarten question: what's the salt translation of "variabl=`output from whatever`"? i've got cmd.run, cmd.run_stdout, i just don't see how to put them into a template and the docs only show command line examples.
18:43 murrdoc joined #salt
18:44 neil__ I am running into a problem with a fresh salt bootstrap: The following packages have unmet dependencies:  python-requests : Depends: python-urllib3 (>= 1.7.1) but it is not installable
18:44 twork is it as simple as {% set foo = cmd.run_stdout: [...]"?
18:44 neil__ Has anyone else seen that problem or is it something unique to my situation?
18:44 twork ...uh, %}
18:44 druonysuse joined #salt
18:46 aqua^c joined #salt
18:49 murrdoc twork:  yes
18:49 williamthekid joined #salt
18:50 twork thanks. might have been a stupid question but now when i inevitably get this wrong i'll at least know that's the gist. and, other places with similar patterns...
18:52 sdm24 gimpy973: That can go in a couple options. In /etc/salt/minion.d/, and rename the file to schedule.conf. Or put the contents directly at the end of /etc/salt/minion, or put the contents in a pillar .sls file and target that pillar on the specific minions
18:53 iggy {% set foo = salt['cmd.run_stdout']('/path/to/cmd') %} <- probably better
18:53 sdm24 gimpy973: restart salt-minion after placing the file
18:53 andrew_v joined #salt
18:56 cpowell joined #salt
18:59 Slimmons Having some problems with a mysql setup.  I'm getting errors, but I'd also like to know if there is a way to have my database and db user have the same name.  It's mentioned in the comments on the gist.    https://gist.github.com/johnsimmons/5aa76d29d24a493e98b8
19:01 sdm24 Do other mysql setups work?
19:01 zooz joined #salt
19:01 Slimmons I haven't gotten any others to work, no
19:02 sdm24 I remember when I was setting up my mariadb databases, I had a similiar error. I think the fix was that I didn't have the mysql python extension
19:03 zer0def ok, dumb question: would you i use a mysql database as an ext_pillar?
19:03 Slimmons There's this, that says I should have require's set up for otehr packages....even if I already have them, they want the require.  Which seems weird.  After my most recent test finishes, I'm going to try that. https://groups.google.com/forum/#!topic/salt-users/EwHh7SjKjgU
19:03 zer0def the docu leaves me slightly baffled
19:03 tipiak joined #salt
19:03 zer0def actually, nevermind. i'm just tired.
19:04 surge__ joined #salt
19:04 aqua^c joined #salt
19:05 surge__ Hey all
19:05 chiui joined #salt
19:05 surge__ If I want to require the presence of a user and directory and I’ve already defined them elsewhere in the state file, is this the proper way to reference it ? http://pastebin.com/vDppCkpK
19:06 * murrdoc sends zer0def brawndo
19:06 murrdoc also u can configure ext_pillar by uh .. reading the code :D
19:06 zer0def yeah, kinda did just that.
19:07 tipiak joined #salt
19:07 iggy you and your reading the code
19:13 aqua^c joined #salt
19:14 dingo Slimmons: did you figure out your mysql issue?
19:15 dingo basically salt contains "shims" that allow for the modules to be "imported", but otherwise empty or throwing error if their dependent 3rd party module (in this case, the python-mysql module) is not found.
19:15 Slimmons dingo: not yet.  My most recent run (which had no changes) froze up...not sure what that's about, but no solution yet.
19:15 dingo if you have a salt state, in of itself, cause those 3rd party modules to be installed, they should be 'require'd by those dependent state functions, and your installation state should contain 'refresh_modules: True' (i may mispell the var-name there)
19:16 zmalone joined #salt
19:16 dingo a 'freeze' up may be a good thing, try with salt-call -l debug, perhaps, it might be a tcp connection timeout to mysql host? if you're lucky :)
19:17 kevinquinnyo how do i ensure that a state runs on a particular minion before it runs on any others?
19:18 gimpy973 sdm24: Ok, I have that schedule in a pillar but it doesn't seem to be taking effect, I killed the service and it is not being restarted.  'pillar.items' shows that config is indeed in the client's pillar
19:19 dingo kevinquinnyo: orchestrate?
19:19 sdm24 try salt '*' saltutil.refresh_pillar to update the pillar info. pillar.items will use the updated info but won't actually update it
19:20 sdm24 slimmons: When I run our mariadb state (which was made by a coworker) it freezes the first time it is ran (no return messages, nothing). After killing the job and/or ctrl+C, running the state a 2nd time works
19:20 kevinquinnyo dingo: it seems that you can use tgt: which allows a glob matching on the minion id.. is there a way for me to match in an orchestrate file based on something else?
19:21 kevinquinnyo like a grain of the minion
19:21 dingo you're beyond me, good luck :)
19:21 twork i've tried every veriaion i can think of for, {% set mydate = cmd.run_stdout: 'date' %} (inside an sls file, ftr) and they're all wrong.
19:21 kevinquinnyo dingo: actually it looks like you can
19:21 kevinquinnyo tgt_type: grain
19:21 kevinquinnyo sweet!
19:23 kwork joined #salt
19:23 sdm24 twork: what is the output of just running cmd.run_stdout?
19:26 twork sdm24: 'cmd.run_stdout' by itself draws an error (obvs.); cmd.run_stdout 'date' (on the minion) returns "local: Wed Jul 22 14:24:53 CDT 2015"
19:27 sdm24 I have a similar command, where I set a variable using the dnsutil.A command, to get the IP to set in /etc/network/interfaces. The format I use is {% set DNSIP = salt['dnsutil.A](grains['host'] + "." + grains['domain'])[0] %}. I'm not sure if that format will help you
19:27 baweaver joined #salt
19:27 twork ah, maybe the "salt[..." part is what i'm missing.
19:28 twork couldn't hurt to try...
19:28 sdm24 worked for me
19:28 ajw0100 joined #salt
19:28 sdm24 https://gist.github.com/sdm24/c7e199b6545a412717dd quick test state
19:30 baweaver joined #salt
19:30 tstc joined #salt
19:31 aqua^c joined #salt
19:33 twork ok, part of my trouble has been that [ whole salt command ] needs to be [function](arguments)
19:33 twork ...and i have to tell salt to run itself.
19:33 sdm24 Yeah, I'm still not sure how to get some nested keys/arguments with that  format
19:34 twork so 'var = command' bcaomes 'var = salt['salt function']('arguments')'
19:35 twork which makes sense once i see it spelled out (like all salt things do) but i never would have arrived at it on my own
19:35 twork (ibid)
19:35 quasiben joined #salt
19:35 hrumph where does a custom grains file go in windows ?
19:35 twork thanks sdm24
19:36 sdm24 no problem, took me a while to figure out how to make it work myself
19:37 hrumph (I woould guess C:\salt\conf) i'll find out...
19:37 shantanoo joined #salt
19:39 sdm24 hrumph: you can check by using grains.setval. It will create the file needed. http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.setval
19:41 kevinquinnyo http://docs.saltstack.com/en/2014.7/topics/tutorials/states_pt5.html  <--- what am I missing?  Where are the list of allowed "tgt_type"s ?
19:41 kevinquinnyo I must be looking at the wrong docs?  Or do most of you just go straight to the source code for answers like this?
19:42 SheetiS https://docs.saltstack.com/en/develop/topics/targeting/index.html talks about the various types of targeting
19:43 hrumph it was C:\salt\conf
19:43 hrumph was/is
19:43 SheetiS I find the little table at https://docs.saltstack.com/en/develop/topics/targeting/compound.html useful for seeing most at a glance, since the compound matcher refer to other target types.
19:43 hrumph should be in the docs...
19:44 ksj anyone use salt-ssh with grains? I have the following in my roster, which from what I understand of the docs, should work, but doesn't:   http://dpaste.com/3F2FRJ8
19:46 kevinquinnyo i can see tgt_type: has several options in an orchestration from viewing the source code, glob, list, expr_form, ipcidr ...  Anyone know where this is documented?
19:46 kevinquinnyo ksj: i dont think salt-ssh uses the minion so it doesn't know about grains (i could be wrong though, learning myself)
19:48 ksj kevinquinnyo: that's what the thin_dir option is for, but it's barely documented
19:49 pipps joined #salt
19:49 ksj sorry, meant minion_opts
19:49 jasonrm joined #salt
19:49 ksj theoretically you can set minion options, which I presume means any options from /etc/salt/minion
19:49 aqua^c joined #salt
19:50 ksj you also need thin_dir to store salt data permanently on the minion
19:50 peters-tx joined #salt
19:50 druonysuse joined #salt
19:50 ksj but like I said, it's not really documented
19:51 trolling joined #salt
19:51 trolling hi all
19:52 chiui joined #salt
19:54 * trolling Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday |||||||||||||
19:54 * trolling Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday |||||||||||||
19:54 * trolling Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday ||||||||||||| Like my page on FACEBOOK ----> www.facebook.com/movtoday |||||||||||||
19:54 und1sk0 lol
19:54 TaiSHi basepi: ping, we have a spammer :P
19:55 trolling left #salt
19:56 basepi Thanks
19:56 Slimmons whoaaaaa that dudes got 12 likes.  looks like the spamming is going great
19:56 TaiSHi Slimmons: he's a pro, we can't deny that
20:00 s_kunk joined #salt
20:00 napsterX joined #salt
20:01 alemeno22_ joined #salt
20:02 budrose joined #salt
20:02 stoogenmeyer_ joined #salt
20:03 repl1cant well, at least the username was legit
20:03 XenophonF brb guys, need to check facebook
20:03 cowpunk22 joined #salt
20:04 kevinquinnyo documentation sure is frustrating.  Still can't find anything on "target types" / tgt_type ...
20:04 cberndt joined #salt
20:04 budrose howdy, I posted an issue to github but wanted to run it by irc as well. When bootstrapping, I am running into the issue I mention here: https://github.com/saltstack/salt-bootstrap/issues/632 ... trying to figure out how to fix this and get our CM system working again
20:07 aparsons joined #salt
20:07 baweaver joined #salt
20:07 Mate budrose: i hardcoded the commit id of stable^1 to the deploy script
20:08 aqua^c joined #salt
20:08 Mate https://raw.githubusercontent.com/saltstack/salt-bootstrap/1370165d8638c8c910a5c4204959f249f4324b35/bootstrap-salt.sh this one is working
20:08 budrose awesome, thanks ! gonna give it a shot
20:09 ksj so....anyone know anything about the minion_opts in roster (and why I can't seem to set grains)? I've tried everything I can think of
20:10 ksj except abandoning grains....which I don't want to do as they're very convenient
20:10 pipps joined #salt
20:12 cpowell joined #salt
20:14 whytewolf ksj check your versions. apperently grains in minion_opts didn't work until 2015.5.1
20:14 wendall911 joined #salt
20:15 whytewolf ksj: https://github.com/saltstack/salt/issues/23628
20:16 druonysus joined #salt
20:17 ksj 2015.5.3
20:17 Slimmons sdm24: yep, I had to have python-mysqldb.  Not 100% sure why, but adding that fixed all the problems.
20:18 twork argh. i am still trying to handle a simple file template. sdm24 helped me get my subshell command working; no file.replace won't spot the source i want it to replace. here's what i've got right now: https://gist.github.com/mjinks/714b10c3073f1eb6d720
20:18 jonlangemak joined #salt
20:20 g3cko joined #salt
20:20 sdm24 twork: what does the file look like on a minion? Does the first jinja render correctly?
20:20 ksj whytewolf: thanks for the link. weirdly, it's definitely recording the grains on the minion in the thin_dir, just not reading them
20:20 twork update: just added the output from salt-call
20:21 twork sdm24: yes it does, counter to what i posted. let me fix that...
20:22 is_null hi all, why can't file.managed download a file ? it complains that it's unable to determine the hash of the source file http://dpaste.com/3J19S2D
20:23 twork ...ok, fixed
20:23 sdm24 twork: One thing to try is changing that template, to last updated: {{ salt['cmd.run_stdout']('date') }}, although I believe that will update the date each time the state is run
20:24 twork sdm24: that's actually what i do want
20:24 twork ...and what i was aiming for with the pattern replace business
20:24 sdm24 so even if there are no other changes, that date will get updated I lebieve
20:24 sdm24 believe*
20:25 twork good point. and what i want. "this host is up to date as of...", not "this file is..."
20:25 itru joined #salt
20:26 aqua^c joined #salt
20:28 twork as this is all really a learning exercise, i'd like to make it work the first way, but for now i'm happy to see if i can get it to work with the logic inside the template rather than in the state.
20:28 linjan joined #salt
20:28 sdm24 yeah, I've made a lot of compromises, as long as things work
20:29 twork ding. worky-worky.
20:29 murrdoc sdm24:  in life or in salt
20:29 bhosmer joined #salt
20:29 twork murrdoc: what's the difference?
20:29 sdm24 you can put the variable in the state using - context: \n     date: {{ mydate }}, and the template having "Last updated: {{ date }}", but its kinda redundant
20:30 is_null does this work for anybody ? salt-call --local state.single file.managed source=http://updates.jenkins-ci.org/update-center.json name=/tmp/test.json
20:31 murrdoc no clue
20:31 Slimmons Anybody have a good (fairly simple) example of setting up RVM, and installing a few gems?
20:32 cliluw joined #salt
20:32 iggy is_null: you have to set a hash for http:// uris
20:33 is_null ohh thanks
20:34 is_null iggy: so it can't be a changing file ?
20:34 iggy is_null: correct
20:34 is_null which means i have to install something such as wget or curl ... oh well, thanks
20:35 murrdoc well not exactly
20:35 murrdoc you can do cp.get_url
20:35 iggy is_null: the other option is to host the hashes in a file on the server and have it fetch those too
20:35 aqua^c joined #salt
20:36 Barbarossa joined #salt
20:36 Barbarossa hi
20:36 ajw0100 joined #salt
20:37 Barbarossa I'm wondering why salt updates the whitespaces within one source.list on every run, even if I removed the file and placed it on the machine with salt-call seconds before the next run
20:37 Barbarossa This only happens with this file, but on some (not all) machines
20:37 Barbarossa Any hints?
20:38 iggy because it's supposed to
20:38 Barbarossa Why whould that be?
20:38 babilen Barbarossa: Why would salt touch the sources.list at all? (i.e.: "How do you manage it?")
20:38 Barbarossa If salt wrote the file, why would it want to change it again?
20:39 Barbarossa Its a simple text file which I push by file.managed
20:39 Barbarossa like this
20:39 babilen Ah, well, you could have used pkgrepo.managed
20:39 Barbarossa /etc/apt/sources.list:
20:39 Barbarossa file.managed:
20:39 Barbarossa - source: salt://apt/sources.list.{{ grains.os }}.{{ grains.oscodename }}
20:39 iggy every run it generates the file in a tmpdir, then compares it to what's on the actual fs
20:40 babilen What are the kind of whitespace changes you are seeing?
20:40 Barbarossa like that: http://pastebin.com/pqLKnKst
20:41 Barbarossa My original contains tabs, the one on the minion only on space
20:41 Barbarossa (between deb and the url)
20:41 jodv joined #salt
20:42 is_null iggy: interresting, good to know for stable files, thanks
20:42 babilen Barbarossa: Does the same happen if you use spaces and not tabs in there? (and it constantly repeats the same changes?)
20:43 X67r joined #salt
20:43 babilen So, it claims to have put tabs in there, but it didn't?
20:43 sdm24 Can I get file.append or file.prepend to create a file if it doesn't exist?
20:43 iggy do you have any pkgrepo.managed states?
20:43 babilen Are you aware of anything that might also perform those changes?
20:43 babilen any changes really
20:44 Barbarossa If I delete the sources.list on the minion and the let salt place it there, it contains on space instead of one tab and the next runs seem to claim to update the space into a tab, but don't
20:44 ksj ugh...still no luck with grains via roster....or any other way with salt-ssh. gonna have to file a bug report, unless anyone else has it working
20:44 aqua^c joined #salt
20:44 Barbarossa let me check what happens if I use spaces only
20:45 iggy sdm24: will file.touch -> file.append not work?
20:45 Barbarossa If I put one space in the file on the salt master it doesn't get changed
20:45 Barbarossa dafuq?
20:46 kevinquinnyo anyone ever get this error:  http://pastebin.ca/3071622 ?
20:46 sdm24 iggy: I did file.managed instead, which I guess is pretty much the same thing
20:47 Barbarossa If I use spaces for alignment (like "deb    http://..") I get the same reoccuring non-change again
20:47 Barbarossa iggy: Yes I have one pkgrepo.managed state but that write another file
20:47 ksj kevinquinnyo: path does not exist....makes sense to me
20:47 kevinquinnyo path does exist though
20:47 kevinquinnyo i'm using a salt master and a syndic setup
20:48 kevinquinnyo it exists on both
20:48 kevinquinnyo i've tried removing it as well and restarting salt-master and salt-syndic
20:48 kevinquinnyo weird that it's not catching the exception too
20:49 Barbarossa iggy: Do you suspect the file.managed vs. pkgrepo.managed is a problem?
20:49 ksj permissions?
20:50 iggy pkgrepo reads and interprets the repo config files, I guess it's also writing them
20:50 iggy Barbarossa: ^
20:51 Barbarossa Hm
20:51 Barbarossa The ones it shouldn't fiddle with, too?
20:51 babilen Barbarossa: Could you show us your pkgrepo.managed state? (preferrably not on pastebin.com, but on, say, http://refheap.com or as gist or ...)
20:51 iggy I'm not sure
20:51 Barbarossa http://pastebin.com/nLdHRp9j
20:52 babilen (or what happens if you disable/comment that state)
20:52 Barbarossa sorry, to late :)
20:52 babilen It simply is a horrible website ;)
20:52 babilen No consolidate in there
20:52 babilen And freifunk+ :D
20:52 Barbarossa I started to annoy me when asking for capchas some days ago, yeah
20:53 babilen That shouldn't really change anything
20:53 aqua^c joined #salt
20:53 Barbarossa That's what I though :)
20:54 iggy worth a try anyway (disabling the pkgrepo state)
20:54 babilen But then I still don't quite understand what the exact symptoms are. Is it that salt claims to perform the same change (tab to space or space to tab) conversion over and over again and that the actual file doesn't change, or is it writing the file in the first run, then changing it in the second to be happy afterwards?
20:55 Barbarossa the first
20:55 Barbarossa it claims it changes some white spaces, but it doesn't
20:55 babilen I'd cut it down (you can run single states with state.sls) so that you have a minimal and complete example of all states that exhibit the behaviour
20:55 Barbarossa (md5sum proves that)
20:55 Barbarossa I already to
20:56 babilen I personally consider tabs in your sources.list a bad thing, but you still shouldn't see the problem
20:56 Barbarossa That's the whole state https://www.refheap.com/5fc6ab254b58586a9c16fad2c
20:56 VR-Jack joined #salt
20:56 Barbarossa Well I like the URLs aligned, but I could stop doing that. Mainly I consider this a bug
20:56 jodv joined #salt
20:56 iggy if you disable the pkgrepo does it change things?
20:57 Barbarossa yea
20:58 Barbarossa then salt changes the white spaces for once, and after the first run it doesn't change anything again
20:58 Barbarossa If I enable the pkgrepo state again, it starts changing whitespaces again
20:58 kevinquinnyo in which contexts do i have to use salt['pillar.get']('some:thing:here') vs just using pillar.get()
20:59 giantlock joined #salt
20:59 Barbarossa The first one is able to get the x:y:z thing, the second one is the python dict.get() function
20:59 kevinquinnyo Barbarossa: thanks
20:59 kevinquinnyo confusing
20:59 Barbarossa basicly use the first one ever and you are fin
20:59 Barbarossa fine even
21:00 iggy more confusing
21:00 pipps joined #salt
21:00 iggy salt.pillar.get is sometimes the same as salt['pillar.get']
21:00 jaybocc2 so... i have /srv/salt/_grains/ec2_tags.py
21:00 jaybocc2 but it doesn't show up in salt \* grains.items
21:00 jaybocc2 is there anything else that needs to be done to get the grains working?
21:01 jaybocc2 ran saltutils.sync_grains and syncall
21:01 napsterX joined #salt
21:01 jaybocc2 still not getting any grain output for that custom grain module
21:01 Barbarossa Now I'm confused.. https://www.refheap.com/7ae04eac027dc173f14cd2e19
21:02 iggy jaybocc2: is the file in /var/cache/salt/minion/extmods/grains
21:02 Barbarossa I kind of hate salt error messages. They are so... helpful
21:02 aqua^c joined #salt
21:03 iggy jaybocc2: does salt-call grains.items show it?
21:03 jaybocc2 /var/cache/salt/minion/extmods/grains does not exist
21:03 druonysus joined #salt
21:03 jaybocc2 also, no, grains.items does not show the grain
21:03 druonysus joined #salt
21:03 subsignal joined #salt
21:04 ksj kevinquinnyo: I've been using salt for over a year and fighting with exactly that sort of thing that I found confusing. Last week I started moving everything to pure python states, and it's wonderful
21:05 williamthekid joined #salt
21:05 tkharju joined #salt
21:05 ksj jinja confuses everything. with pure python you actually get sane error messages that correlate to the line numbers in your file
21:05 Barbarossa Does anyone have an idea what's wrong with the pkgrepo thing now? On Wheezy it works fine :-/
21:06 ksj and by the way, I don't know python at all. you don't need to. it's very easy to pick up, and things like the difference betweeen how to get grains start to actually make sense
21:07 sdm24 ksj: you probably use formatters and spell check too :( it takes alll the fun out of it
21:07 quasiben joined #salt
21:07 cilkay joined #salt
21:08 saltycharles joined #salt
21:09 kevinquinnyo ksj: yeah i'm considering doing the same -- jinja driving me nuts
21:09 is_null hi all, question about this snippet / error: http://dpaste.com/2DTAQVD why does the require statement on line 20 causes "Recursive requisite found" ?
21:09 jab416171 anyone familiar with the pip module?
21:09 kevinquinnyo i find that jinja + yaml is not readable or intuitive at least to me
21:09 jab416171 http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pip_state.html
21:09 jab416171 I'm trying to install a python package from an insecure pip server
21:10 cilkay Hello. I'm using hg.latest to clone or update and notice that even though no one is making any changes on the server in question, if I do "hg status", I get many modified files, as if there were local changes. If I manually do "hg update -C -r default", the changes are discarded. I added the "clean: True" parameter to hg.latest. Any idea why first, I'm getting these modified files and second, why "clean: True" isn't discarding those changes?
21:11 ksj seriously, I suffered so much pain with jinja and yaml states. it's not that either jinja or yaml is necessarily bad (though jinja is pretty awful), it's that you don't have access to the power of a programming language
21:11 ksj you can't do basic things like defining a function and calling it with different parameters
21:11 ksj switch to pure python. you won't regret it. took me about a day to really get to grips with it - without knowing any python previously
21:12 jaybocc2 iggy: it seems that when i call saltutil.sync_all and sync_grains its not sending the grains to the minion
21:12 cilkay I could do a "cmd.run hg up -C -r default" I suppose but that defeats the purpose of specifying "clean: True" in hg.latest, or at least my understanding of the purpose of it.
21:13 scoates I'm looking at boto_vpc: http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.boto_vpc.html ; when ensuring subnets, you seem to need the VPC ID, but that's dictated by Boto/AWS API, not by Salt. Is there a way to get this from `boto_vpc.present`, somehow?
21:14 cilkay Never mind. I figured it out. I was changing permissions on all the files.
21:14 scoates oh, I guess vpc_name might work there. I can specify that. Instant rubber duck. /-:
21:15 Barbarossa This pkgrepo thing is driving my ad
21:15 Barbarossa mad even
21:17 dendazen_ joined #salt
21:18 jaybocc2 Barbarossa: not sure what you're referring to, but on deb jessie i'm using pkgrepo in a few places without issue.
21:18 Barbarossa jaybocc2: https://www.refheap.com/5fc6ab254b58586a9c16fad2c -> https://www.refheap.com/7ae04eac027dc173f14cd2e19
21:19 sdm24 ksj: did you just follow the examples at http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.pydsl.html to use python? did you need to include #!pydsl at the top of each .sls file?
21:20 monkey66 joined #salt
21:20 iggy just #!py afaik
21:20 jaybocc2 Barbarossa: https://gist.github.com/jaybocc2/200273cf4a61aee78529
21:20 jaybocc2 sdm24: ^^^
21:20 sdm24 cool thanks
21:20 jaybocc2 i use pyrender, not pydsl or pyobjects renderer
21:20 sdm24 my bosses use python, so maybe this will help me convince them to use/write salt
21:21 aqua^c joined #salt
21:21 kevinquinnyo anyone ever try to run orchestration from a masterOfmasters to a syndic?  if so how?
21:21 iggy oh, py renderer and pydsl are different
21:21 kevinquinnyo salt wptest-syndic-01 cmd.run 'salt-run state.orchestrate percona'
21:21 kevinquinnyo i'm doing that from the masterofmasters but i dont get any output at all, and i dont see much happening in the debug output on the syndic either
21:22 Barbarossa jaybocc2: Looks similar to me
21:22 Barbarossa On a wheezy machine this works, on jessie it doesn't
21:22 Barbarossa sls unchanged
21:22 jaybocc2 mhmmm... not sure... we are on jessie and have no issues either
21:22 cberndt joined #salt
21:23 Barbarossa would you mind testing my snippet?
21:23 Barbarossa I'm curious
21:23 jaybocc2 sec
21:24 UtahDave joined #salt
21:26 viq joined #salt
21:26 wryfi joined #salt
21:27 ksj sdm24: I don't use pydsl. that's just another unnecessary layer of abstraction. use pure python.  #!py  for the shebang
21:29 sdm24 gotcha, thanks. Trying my hand at it now
21:29 ksj you won't regret it. it's a joy to work with. just return nested dictionaries!
21:29 Bart_ joined #salt
21:30 Bart_ Hi guys, OSX SSH question here
21:30 Bart_ If I do a 'salt-ssh hostname test.ping'
21:30 is_null and you can TDD your #!py slses ;)
21:30 Bart_ the minion freezes instantly
21:30 Bart_ I need to reboot the System
21:30 Bart_ anyone had any similar issues ?
21:31 Bart_ seems strange, specially since it's 'salt-ssh'
21:31 ksj goddamn salt-ssh with grains is impossible. I thought I had it working...but XXXXing caching conused me.
21:36 sdm24 https://gist.github.com/sdm24/8548ff2d30920e059bea what am I missing here? I want to create the file, and make its content salt['dnsutil.A'](grains['host']), which will work in yaml/jinja. When I run this, it will create the file but not update the contents
21:37 murrdoc __grains__['host'] as __salt__['grains.get'] might work
21:37 murrdoc also why python
21:37 sdm24 trying it out
21:37 murrdoc jinja is better than python
21:37 murrdoc ask utah dave
21:37 sdm24 its not my fault. They made me do it!
21:38 UtahDave Eh, I don't like jinja at all, actually.  What I prefer is simple yaml states.  So clean and clear!
21:38 UtahDave a little jinja sprinkled in where needed
21:39 sdm24 I changed it to your recommendation murrdoc, same result
21:39 aqua^c joined #salt
21:39 sdm24 "File /srv/salt/hello exists with proper permissions. No changes made."
21:39 murrdoc UtahDave:  you shoudl have said that
21:39 murrdoc cos since u mentioned u dont like jinja, peeps be quoting u to write python states
21:39 UtahDave really??
21:39 UtahDave Noooo
21:40 UtahDave I've never even written a python state
21:40 UtahDave not once
21:40 murrdoc yeah .. at my work, from our friday meeting with raine
21:40 sdm24 yeah, I don't have any issues with the YAML. but jinja can have some real big issues
21:40 ksj UtahDave: you should try it....
21:40 murrdoc its unnecessary ksj
21:40 UtahDave People, avoid "programming" your infrastructure
21:40 murrdoc write a state module function
21:41 UtahDave yes
21:41 UtahDave ^^
21:41 murrdoc and call it with yaml
21:41 snave joined #salt
21:41 UtahDave murrdoc: are you my twin???
21:41 murrdoc i wish i was that handsome
21:41 murrdoc u sexy beast :D
21:42 murrdoc but intellectually i am follwoing your lead
21:42 baweaver joined #salt
21:42 UtahDave Yes, if you find yourself "programming" your infrastructure with jinja or whatever, you should probably look at creating an execution module and state that you can then use in your yaml sls files
21:42 UtahDave lol
21:42 Gareth UtahDave: o/
21:42 murrdoc Gareth:  is the evil twin
21:42 UtahDave sup, Gareth!?
21:42 Gareth murrdoc: definitely evil...but twin of whom?
21:42 UtahDave I'm putting together a couple proposals for talks at SCALE
21:43 jab416171 anyone familiar with the pip module?
21:43 Gareth UtahDave: Not too much :) yourself? :)
21:43 iggy too much boilerplate in python modules+states
21:43 Gareth UtahDave: awesome!
21:43 jab416171 rather, pip state
21:43 UtahDave jab416171: I've used the pip module lightly a few times.
21:44 jab416171 UtahDave, have you ever used it with an insecure pip server?
21:44 murrdoc you need to file.manage your pip config jab416171
21:44 jab416171 The repository located at [...] is not a trusted or secure host and is being ignored.
21:44 iggy just cmd.run it
21:44 murrdoc eugh
21:44 * murrdoc smacks iggy
21:44 * iggy runs
21:44 murrdoc no cmd.run in our code
21:44 jab416171 lol
21:44 jab416171 yeah, I'd like to avoid cmd.run
21:44 iggy not for long...
21:44 jaybocc2 UtahDave: if you need an in with Scale i'm tight with Ilan :)
21:45 murrdoc UtahDave:  will there be a salt day at scale, i might present how we did salt at where i work
21:45 jab416171 murrdoc, can I tell the pip config to ignore all untrusted hosts or something?
21:45 ksj yeah, I liked that "don't program your infrastructure" idea when I first heard it back when I was learning ansible. nearly two years later, and I'm willing to admit defeat on it
21:45 murrdoc nothing special in the talk, probably just a good 'usecase' talk
21:45 murrdoc jab416171:  yes
21:45 ksj writing python states has been a revelation
21:45 ksj but everyone does things differently...if it doesn't work for you, don't do it
21:45 iggy isn't infrastucture as code the new black?
21:46 ksj salt is wonderfully flexible like that
21:46 jab416171 murrdoc, do I need to put the file in /root/.pip/pip.conf?
21:47 zmalone Does Ansible advocate not representing infrastructure as code?  I can't find anything about that, and am curious about their reasons.
21:47 zmalone (other then that Ansible lends itself to being used as a parallel shell)
21:47 pcdummy joined #salt
21:47 pcdummy joined #salt
21:47 ksj sdm24: as a tip, in all my python states I have a function that dumps to a file in /tmp - so I can print out variables and see what they're set to at various points in the code
21:49 ksj I started on ansible. it's much less flexible than salt. the docs emphasise (or used to) defining your hierarchy, rather than trying to code it
21:49 sdm24 gotcha, I'm still struggling with this state
21:49 murrdoc jab416171:  yes
21:49 ksj problem is, it never works like that in practice
21:49 murrdoc file.mange that
21:50 cowpunk22 joined #salt
21:50 zmalone hierarchy, not infrastructure, okay.
21:50 ksj sdm24: being able to print variables to a text file does wonders for debugging
21:50 sdm24 ksj: how would I do that? I keep getting this error now Given text is not a string or a list of strings
21:51 sdm24 https://gist.github.com/sdm24/1d34cfde82bfe25b6c21
21:51 ksj ahh ok. can you pastebin the error
21:51 ksj ok
21:51 sdm24 tahts my state, not the error
21:51 aparsons joined #salt
21:51 sdm24 updated to include output
21:52 iggy text is not a string or list...
21:52 ksj quick tip btw - took me a while to realise this. the actual states are run on the minion, so if you're using any pure python calls, they'll be executed on the minion (e.g. if you print to a file)
21:52 ksj I've never used the text option of file.append
21:52 iggy seems pretty self explanatory (note: never used py states)
21:53 ksj I'll have to check the docs
21:53 sdm24 Me neither, not sure how to convert to a string or list, or what the output is
21:53 jab416171 murrdoc, do you happen to know what should be in the config?
21:53 iggy sdm24: why did you make it a dict?
21:53 ksj it's python! str(yourlist) should do it
21:53 ksj or something like that
21:54 murrdoc jab416171:  should be here https://pip.pypa.io/en/latest/user_guide.html#config-file
21:54 ksj like I said, I really don't know python, but it's a lot easier to find out than trying to figure out how jinja handles that sort of thing
21:54 monkey66 joined #salt
21:55 UtahDave jaybocc2: I'll keep that in mind!!  :)
21:55 sdm24 iggy: it started as a dict because I originally tried to do file.managed with context, forgot to change it back
21:55 ksj oh, and by the way, I made all my pillars into dictionaries - no lists - so that python doesn't choke unexpectedly
21:55 UtahDave murrdoc: I'm not sure if there's going to be a whole Salt day at SCALE, but I'd love to hear a talk about how you did salt at your work
21:56 murrdoc UtahDave:  yeah we can do two, like the crew from work
21:56 UtahDave murrdoc: awesome
21:57 murrdoc ceph or openstack provisioning, and our general provisioning solution
21:57 aqua^c joined #salt
21:57 UtahDave nice!
21:57 bbbryson joined #salt
21:58 jodv joined #salt
21:59 JimStar12 joined #salt
22:02 monkey661 joined #salt
22:02 napsterX joined #salt
22:06 aqua^c joined #salt
22:07 monkey66 joined #salt
22:08 jab416171 blah
22:09 druonysuse joined #salt
22:09 druonysuse joined #salt
22:09 jab416171 it puts the config file in after trying to install the packages >_>
22:09 monkey661 joined #salt
22:13 theologian joined #salt
22:13 andrew_v joined #salt
22:15 saltstackbot joined #salt
22:15 quasiben joined #salt
22:15 stoogenmeyer_ Hey, has anyone used the salt-boostrap script to install the develop branch on a ubuntu machine? It finished installing but then salt-master won't start
22:15 aqua^c joined #salt
22:15 stoogenmeyer_ also, how do I delete salt on ubuntu? (-: I want to just install the stable version
22:17 pipps joined #salt
22:18 iggy stoogenmeyer_: are you using the most recent salt-bootstrap script?
22:18 iggy https://github.com/saltstack/salt/issues/25270 ?
22:18 saltstackbot [#25270]title: [2015.8.0rc1] salt-bootstrap fails to properly install a minion | `curl -s -L https://bootstrap.saltstack.com | sudo sh -s -- -U -P -p python-jinja2 -A master git v2015.8.0rc1`...
22:18 iggy there was a master version too
22:19 stoogenmeyer_ I assume so. basically just curl -o install_salt.sh -L https://bootstrap.saltstack.com followed by sudo sh install_salt.sh -M -P git develop
22:20 stoogenmeyer_ the stable one failed to install as well so I'm gonna scratch the machine and get another one instead..
22:24 aqua^c joined #salt
22:27 quasiben joined #salt
22:27 stoogenmeyer_ ok so definitely there's something wrong.. shiny new ubuntu 14.04 machine on aws. first thing I do after logging in is `curl -L https://bootstrap.saltstack.com -o install_salt.sh | sudo sh install_salt.sh -M`
22:27 stoogenmeyer_ here's the error: ` * ERROR: You need to allow pip based installations (-P) in order to install the python package 'tornado >= 4.0'`
22:29 stoogenmeyer_ It used to be that I didn't have to install pip beforehand, and specify the -P flag. something change?
22:31 lothiraldan joined #salt
22:33 aqua^c joined #salt
22:36 baweaver joined #salt
22:37 quasiben joined #salt
22:40 monkey661 left #salt
22:42 aqua^c joined #salt
22:48 pipps joined #salt
22:51 Savemech joined #salt
22:56 pipps joined #salt
22:59 Savemech joined #salt
22:59 snave anybody use salt to control a single line in a config file? I usually use file.managed to provide whole files. However, I'd like to ensure that a config file has one line at the end and allow the rest of the file to remain custom in this case.
23:00 forrest snave: How about file.append
23:02 snave forrest: checking it out now. thanks!
23:02 forrest snave: NP.
23:03 napsterX joined #salt
23:03 quasiben joined #salt
23:04 baweaver joined #salt
23:08 iggy bonus, file.append won't re-append if you already have that line somewhere else (not necessarily the last line)
23:08 pipps99 joined #salt
23:10 quasiben joined #salt
23:13 Bryson joined #salt
23:13 breakingmatter joined #salt
23:14 jaybocc2 is anybody else having issues with custom grains in _grains not being loaded?
23:14 iggy nein
23:14 jaybocc2 salt 2015.5.2 (Lithium)
23:16 jaybocc2 i have a custom python grain at /srv/salt/_grains/ec2.py and it _will_ _not_ load
23:16 jaybocc2 i've run saltutils.sync_all, saltutils.sync_grains, salt-call grains.items, everything i can do to think get salt to recognize it...
23:17 jaybocc2 is there a configuration option for the master to tell it where to look for custom grains?
23:21 jaybocc2 iggy: mind sharing some configuration details for how you're delivering and setting up custom grain modules?
23:21 jaybocc2 i've followed all of the documentation but having them not sync is quite frustrating
23:23 zsoftich1 joined #salt
23:25 Nazca__ joined #salt
23:26 jaybocc2 heh
23:27 jaybocc2 so grains are tied to environments, which is not covered in the documentation... the docs just say drop in /srv/salt/_grains and you're good to go...  Needs to be in /srv/salt/${env}/_grains
23:28 ageorgop joined #salt
23:29 iggy jaybocc2: they are in /srv/salt/_grains, they get sync'ed by sync_all (run by a reactor) at minion start
23:30 iggy jaybocc2: I'd guess your grain is backtracing or it's __virtual__ is returning false
23:30 iggy oh, you sorted it out, good
23:30 whytewolf jaybocc2: actually it says located under file_roots. which DEFAULTS to /srv/salt/_grains. http://docs.saltstack.com/en/latest/topics/targeting/grains.html#writing-grains
23:30 iggy BAM!
23:31 iggy </elzar>
23:33 viq joined #salt
23:33 Bryson joined #salt
23:40 jodv joined #salt
23:44 quasiben joined #salt
23:55 aqua^c joined #salt

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