Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-03-02

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

All times shown according to UTC.

Time Nick Message
00:00 whytewolf humm, that is already live though. what version are you running?
00:01 rylnd 2016.11.1
00:01 rylnd there is also still the lingering issue of https://github.com/saltstack/salt/issues/37845
00:01 saltstackbot [#37845][OPEN] VM creation / deletion on vSphere 5.5 is aborted with "Error: None" | Description of Issue/Question...
00:03 rylnd i wasnt able to test with dev yet though as i have other commitments at the moment which require my attention :-(
00:03 whytewolf humm. that sucks. there apperently is a fix in to fix that. but they might not have gotten it into 2016.11.3 because there is no info on backporting it in that ticket
00:06 jrgochan any idea why this won't work?
00:06 jrgochan http://pastebin.com/iQ7HvKi4
00:08 whytewolf jrgochan: with the error message i would say because you are watching a filename and not a state. watch doens't trigger on files. it triggers on state changes
00:09 whytewolf also, that state. most likely will have issues anyway. since you are trying to restart the server running the restart
00:09 whytewolf s/server/service
00:09 jrgochan any thoughts on how to reload salt-minion configuration files gracefully?
00:10 whytewolf https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt
00:10 nafg Anyone around that uses SaltPad or Molten?
00:10 jrgochan oh my
00:10 jrgochan whytwolf: Thank you!
00:10 whytewolf jrgochan: no problem
00:10 whytewolf nafg: sorry i don't do guis
00:11 nafg whytewolf: yeah one of the other guys want one though
00:11 gms joined #salt
00:11 nafg whytewolf: what I'm wondering about is they seem to be frontend side only, so it would seem to require exposing salt-api to the world
00:12 whytewolf well, exposing salt-api to the system running them.
00:12 nafg whytewolf: no, because it calls it from the browser, as far as I can tell
00:12 whytewolf saltpad shouldn't
00:12 nafg That's what I mean frontend side only
00:12 nafg whytewolf: what system runs saltpad besides your browser? I don't see any server-side code there
00:13 whytewolf thought saltpad was written in node.js
00:13 nafg It's weird because the docs say set netapi to localhost but then put an nginx in front of it to re-expose it
00:14 nafg whytewolf: as far as I can tell it's just frontend javascript
00:14 rylnd i think a gui would be beneficial to quickly find out which ran successfully or which did not. the cli is very overwhelming with the JIDs. i would also love to have a way to say 'if state did not ran successfully, inform me via email/slack/piegeons'
00:15 whytewolf rylnd: there is always the enterprise version
00:15 nafg ok something weird, the saltpad code in github doesn't look like what I installed :)
00:15 rylnd whytewolf: and if i had any say we would have bought that ;-)
00:16 brousch__ joined #salt
00:17 whytewolf i have never met a gui i have ever liked. so can be quite biased agains tthem. so take everything i say about them with a grain of salt
00:17 dendazen joined #salt
00:17 nafg be careful what metaphors you use...
00:18 nafg :)
00:18 whytewolf salt 'whytewolf' grains.get punny
00:19 rylnd nafg: did you maybe download saltpad v1 by mistake? i know its now a v2 with different design
00:19 nafg idk this makes zero sense. whytewolf the instructions say download from github releases which just has an index.html and static/ dir
00:19 mschiff joined #salt
00:19 mschiff joined #salt
00:19 nafg rylnd: it's pre-alpha 3.1
00:19 * whytewolf shrugs i have never installed saltpad
00:19 nafg latest release
00:20 rylnd we are talking about https://github.com/Lothiraldan/saltpad, right?
00:20 nafg Yes
00:20 nafg I'm guessing the old one is https://github.com/peopledoc/saltpad ...
00:21 nafg rylnd: any clue? Also is the author on IRC ever?
00:21 whytewolf never met them
00:22 rylnd nafg: sorry, no clue. molten and saltpad is still on the list for eval when our testing environment is set up
00:22 hemebond1 Oooh, I didn't know Saltpad was still being worked on.
00:22 nafg hemebond1: is it?
00:22 rylnd if the testing environment will ever be set up lol
00:22 nafg hemebond1: latest commit is last september
00:22 whytewolf last commit was 6 months ago and that was to docs.
00:22 hemebond1 nafg: That's not that old.
00:23 nafg hemebond1: true
00:23 nafg hemebond1: any clue about my question? It seems to require exposing the api to the world
00:23 nafg AFAICT it's a static frontend JS app that talks to the API from your browser
00:24 hemebond1 It requires exposing the API to whomever needs access.
00:24 whytewolf last time i heard it was a python app. so a pure javascript app seems like a step backwords
00:24 nafg whytewolf: that looks to be the other repo which is last updated 3 years ago
00:25 hemebond1 whytewolf: Well it's just using the API still.
00:25 rylnd anyway. i am off to bed again. thanks again for your help whytewolf and gtmanfred
00:25 hemebond1 Moving the work into the browser.
00:25 nafg hemebond1: true but I don't understand why he says to only expose to loopback and then put nginx in front which undoes that
00:25 nafg Same question about Molten
00:25 hemebond1 nafg: That seems odd.
00:25 whytewolf hemebond1: true. honestly the api should be pretty locked down anyway. with ssl and eauth setup
00:26 nafg hemebond1: any clue if the author is on IRC or how to find out more?
00:26 whytewolf nafg: looking through the docs the only place i found that said loopback was in the vagrent test install
00:26 hemebond1 This Lothiraldan isn't here.
00:26 hemebond1 I have no idea if they are actually in here or not.
00:27 hemebond1 is there  a problem?
00:27 whytewolf hummm in the changelog for the very first release is says "This rewrite and architecture change now require that the salt-api is contactable from the browser directly. If it's a concern for you and don't want to use the new version because of it, please open an issue."
00:28 hemebond1 Maybe so they can close it with "git gud"
00:28 nafg ?
00:29 hemebond1 (as in, secure your API like you would any other web-accessible service)
00:29 nafg whytewolf: maybe I read the tone wrong before. E.g. https://github.com/Lothiraldan/saltpad/blob/master/docs/installation/salt-api-cherrypy-cors.md says
00:29 nafg shows the configuration with 127.0.0.1 and then
00:29 nafg Warning, this configuration has ssl disabled and it only listens to localhost, if you want to expose the salt-api to the network, you should really deploy it behind nginx with ssl, do not change the host to 0.0.0.0 without proper ssl support as well! It's documented later how to proper deploy ssl for protecting the salt-api, for the moment doesn't touch the
00:29 nafg host nor disable_ssl.
00:30 hemebond1 Yeah, you read it wrong.
00:30 nafg So that makes a lot of sense... except my only question is,
00:30 nafg can't salt-api do SSL itself?
00:31 nafg Why `disable_ssl: True`?
00:31 hemebond1 Yeah, but I think they point might be that cherry_py isn't really a production-level web server.
00:31 nafg meaning bigger danger of security hole than e.g. nginx?
00:31 hemebond1 nginx is a large security hole?
00:32 nafg who said that
00:32 hemebond1 Probably more about security, performance, etc.
00:33 hemebond1 I dunno. I'm quite interested in trying out this new version though,.
00:33 whytewolf cherrypy isn't really insecure. just well it's http stack isn't the best performing on out there
00:33 nafg BTW cherrypy or tornado? and what is saltnado
00:34 nafg whytewolf: ok but for saltpad don't need much performance ;)
00:34 nafg And the API will be the bottleneck anyway
00:34 Gareth cherrypy works well for testing.  But I found I had to restart it every couple days.  Would stop responding.
00:34 nafg (in previous discussion cherrypy and tornado would be interchangeable)
00:35 whytewolf saltnado is a silly name given for rest_tornado
00:35 Gareth Ended up using the WSGI bits inside gunicorn.
00:35 Gareth nginx sitting in front.
00:35 nafg whytewolf: I was trying to parse https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_tornado.html which says REST_TORNADO - a websockets add-on to saltnado
00:35 hemebond1 Gareth: By going around cherrypy?
00:36 hemebond1 e.g., directly serving salt-api using gunicorn?
00:36 Gareth hemebond1: Yup.
00:36 hemebond1 Sounds very interesting.
00:37 nafg Also does rest_tornado support custom webhooks, static, and static_path?
00:37 Gareth Happy to Gist configs if you're curious.
00:37 hemebond1 Gareth: Very curious!
00:37 gtmanfred nafg: there are a lot of things that rest_tornado doesn't support
00:37 Gareth uno moment.
00:37 hemebond1 Thank you very much ☺
00:37 gtmanfred nafg: https://github.com/saltstack/salt/issues/26505
00:37 saltstackbot [#26505][OPEN] Bring Saltnado up to feature parity with rest_cherrypy | [As has been discussed](https://github.com/saltstack/salt/issues/13698#issuecomment-94056727) now that Tornado is a dep for Salt core it makes sense to move development effort on a REST API to Saltnado. We do not yet have a timeline for this work but we cannot deprecate `rest_cherrypy` until Saltnado has feature parity and identical interfaces so this issue will serve as a place to tra
00:38 nafg gtmanfred: thanks
00:39 nafg Ok so basically what I'm getting at, is can't I just stick saltpad in the cherrypy static path, and let cherrypy deal with SSL, and skip nginx
00:39 hemebond1 Yes, you can.
00:39 whytewolf you CAN, the question is SHOULD you
00:39 nafg yup
00:39 Gareth hemebond1: https://gist.github.com/garethgreenaway/01831ae5ce171ea859518588c463370d
00:39 whytewolf the answer to that would be no
00:39 nafg I think for now I'll skip the UI...
00:39 hemebond1 If it's just one user then nginx won't provide much benefit.
00:40 nafg whytewolf: I assume you mean as far as exposing the API?
00:40 hemebond1 Gareth: Lovely, thank you.
00:40 Gareth hemebond1: no worries.
00:40 whytewolf no, I"m actually in favor of locking down the api and exposing it. just not with a cherrypy doing all the work
00:41 nafg whytewolf: as far as what?
00:41 whytewolf ssl and the http handaling
00:41 leonkatz Is there a non greedy glob? so i can do something like '*master*' for minion filtering.
00:41 Gareth the cherrypy server isn't designed for heavy lifting.
00:41 nafg what heavy lifting
00:41 hemebond1 leonkatz: How would a non-greedy glob work?
00:42 hemebond1 (there is only one glob behaviour)
00:42 Gareth eg. running saltpad
00:42 gtmanfred ^^
00:42 nafg whytewolf: you mean if I let cherrypy do the SSL there might be a security hole?
00:42 gtmanfred it really isn't
00:42 gtmanfred there is a reason we wrote the eapi for the enterprise product
00:42 nafg Gareth: how is that heavy lifting
00:42 whytewolf nafg: there is more to worry about then just security
00:42 gtmanfred i don't really care much for the gui, but the enterprise api is good
00:42 nafg whytewolf: I'm all ears
00:43 nafg whytewolf: what is there to worry about then
00:43 whytewolf performence of threading.
00:43 leonkatz so my minion is called  'johns-master.blab.com' so i want to be able to '*master*' it
00:43 whytewolf how the http socket is handled to keep from dropping connection mid session
00:44 nafg whytewolf: why should I care about performance if one person is using it once in a blue moon
00:44 hemebond1 leonkatz: You can.
00:44 hemebond1 No?
00:44 gtmanfred leonkatz: that works.
00:44 gtmanfred salt '*master*' test.ping
00:44 leonkatz k thank i'll give it a try
00:45 whytewolf nafg: because. it might not always be person a once in a blue moon
00:45 whytewolf and it is better to get it right now, then have to fix it later
00:45 nafg premature optimization ;)
00:45 Gareth nafg: I'd say give cherrypy a try.  Try it out, Hell even try running saltpad in it if you must.  Eventually it's going to fall over on it's face and you'll likely want to move to something else. :)
00:46 jrgochan sorry to be a bother again, but any thoughts on this problem?
00:46 jrgochan http://pastebin.com/qWSdEUFp
00:46 whytewolf hell, I setup up cloudfront on an s3 hosted web server that doesn't even get 10 hits.
00:49 * whytewolf shudders ... if someone snuck a clean: true onto that
00:49 gtmanfred lol yeah that is exactly what i was thinking
00:49 Gareth jrgochan: doing a file.recurse from the / down seems like a really really bad idea.
00:49 gtmanfred jrgochan: i would be very carefull with that file.recurse
00:50 gtmanfred i would very much feel better having a couple extra file.recurse
00:50 jrgochan heh. since it's just me i'm not too woried
00:50 gtmanfred and not risking possibly nuking the whole system
00:50 jrgochan but i may split it out
00:50 gtmanfred one day it may be not just you
00:50 jrgochan indeed
00:50 gtmanfred If it sucks but it works, it will never get fixed
00:50 jrgochan I'm not quite sure how to efficiently copy our directory structure of various files otherwise
00:51 jrgochan we have gigs of stuff in /opt /etc /tftpboot /home etc etc etc
00:51 gtmanfred btsync it down
00:51 gtmanfred use salt to setup btsync
00:52 Gareth or use a shared file system?  NFS? Gluster?
00:52 gtmanfred fun fact, if you didn't know this was a thing https://github.com/saltstack/salt-fuse
00:53 whytewolf huh, I did not know about that.
00:53 whytewolf I don't know how i should feel about that
00:53 jrgochan I was thinking of nfs mounting and rsyncing the bigger stuff
00:54 gtmanfred whytewolf: neither does joseph, and he wrote it
00:54 gtmanfred jrgochan: honestly, check out btsync or resilio
00:55 jrgochan not sure it would fly where i work
00:55 jrgochan but i could inquire i suppose
00:57 nafg Someone posted this earlier https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt
00:57 whytewolf that would be me
00:57 nafg I confess I hadn't thought about the problem and have been doing it the naive way
00:58 nafg The machine uses systemd
00:58 nafg I hadn't noticed any problems
00:58 whytewolf systemd has a keepalive mechinism. so it might be why you hadn't noticed any problems
00:59 nafg whytewolf: what is that? And does it mean I'm safe?
00:59 whytewolf well, it means it will restart the service if it is "breaks"
01:00 nafg what?
01:00 whytewolf I still wouldn't put my company on it always working 100% though
01:01 nafg whytewolf: actually my case is a bit different. I'm restarting the salt *master*
01:01 nafg The master is also its own minion
01:01 nafg and it's for when I update the master's config
01:02 nafg Maybe that's safer because it's async?
01:02 whytewolf kind of. you might actually get an error about the master going away in your command but other wise it won't "break" anything. it just might not compleate anything that happens after that state runs
01:03 nafg ah -- so it could actually be nondeterministic?
01:03 whytewolf exactly
01:03 nafg that's even scarier :)
01:03 whytewolf and yes it is. half finished things scare me to death
01:06 nafg whytewolf: but, what is a safe time? 1 minute might be too early. OTOH I want results applied as soon as possible
01:06 nafg i guess the alternative
01:07 nafg looks a lot more arcane
01:07 nafg What is python_shell: True?
01:08 whytewolf tells python to actualy run the command through a real shell
01:09 nafg hmm don't see it in cmd.run docs
01:09 whytewolf are you looking at the state or the module?
01:10 nafg state
01:10 nafg Oh the `at` approach is because they have order:last on the triggering command
01:10 nafg so presumably I could do the at approach, and put order:last on the cmd.run at?
01:11 whytewolf okay, it gets passed to cmdmod a s a kwarg so that might be why it doesn't show up in the state version of cmd
01:12 whytewolf here it is from the cmdmod python_shell (bool) -- If False, let python handle the positional arguments. Set to True to use shell features, such as pipes or redirection
01:12 nafg btw question about that, I had in my head that kwarg includes all extra arguments, but I somewhere someone had kwarg as an explicit option with things nested under it
01:12 nafg whytewolf: weird the `at` sample doesn't use python_shell yet uses a pipe
01:13 whytewolf might have been writen before the change to cmd.run
01:13 nafg they did a breaking change?
01:14 whytewolf several revisions back. i think it was 2014.something
01:14 whytewolf it was a security thing
01:15 onlyanegg joined #salt
01:15 nafg ok well I'm waiting for someone to approve my pull request to add the edit link so someone can update it ;)
01:16 saintpablo joined #salt
01:16 nebuchadnezzar joined #salt
01:21 big|bad|wolf joined #salt
01:27 madboxs joined #salt
01:41 shoemonkey joined #salt
01:52 sp0097 qq, When running a salt state (i.e. salt formula ) is there a timeout for how long a job runs for?
01:53 sp0097 fwiw, my task will be running for about 8 -10 minutes roughly
01:58 jas02 joined #salt
02:06 aphor sp0097 the salt command will stop polling for status after a configurable timeout, but there's no limits AFAIK on runtime.
02:08 sp0097 k, thanks.  I had a task that appears to timeout after 4 minutes.  I wonder if the minion was so hammered that it couldn’t send an status.
02:22 dps joined #salt
02:23 Nahual joined #salt
02:41 catpigger joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.5, 2016.11.3 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
02:49 MasterNayru joined #salt
02:57 amcorreia joined #salt
02:58 _JZ_ joined #salt
03:15 sp0097 would orchestrate runner be better for a long running task?
03:15 DammitJim joined #salt
03:20 hemebond1 sp0097: What kind of long-running task?
03:21 sp0097 running through an installer on windows, takes about 8-10 minutes
03:39 tom29739 joined #salt
03:48 onlyanegg joined #salt
03:59 jas02 joined #salt
04:01 ivanjaros joined #salt
04:09 onlyanegg joined #salt
04:15 sarlalian joined #salt
04:21 sarlalian joined #salt
04:41 rdas joined #salt
04:43 SaucyElf joined #salt
04:51 evle joined #salt
04:52 ahrs joined #salt
05:05 preludedrew joined #salt
05:24 zenchiken joined #salt
05:27 tshep joined #salt
05:28 sh123124213 joined #salt
05:31 onlyanegg joined #salt
05:34 sh123124213 joined #salt
05:36 impi joined #salt
05:43 icebal joined #salt
05:59 jas02 joined #salt
06:13 ninjada joined #salt
06:21 bocaneri joined #salt
06:24 bocaneri joined #salt
06:29 bocaneri joined #salt
06:37 PeterO joined #salt
06:37 ninjada_ joined #salt
06:38 onlyanegg joined #salt
06:47 ninjada joined #salt
06:47 felskrone joined #salt
07:00 teclator joined #salt
07:04 denkijin joined #salt
07:04 Miouge joined #salt
07:08 cryptolukas joined #salt
07:12 lasseknudsen joined #salt
07:12 jas02 joined #salt
07:17 lasseknudsen joined #salt
07:20 lasseknudsen joined #salt
07:24 lasseknudsen joined #salt
07:38 Inveracity joined #salt
07:41 jas02 joined #salt
07:42 JohnnyRun joined #salt
07:45 jas02 joined #salt
07:49 duncanmv joined #salt
07:58 LostSoul Hi
07:59 LostSoul Anyone meet problems with setting up stash/bitbucket as backend for salt configs?
08:06 madboxs joined #salt
08:07 lasseknudsen joined #salt
08:09 aldevar joined #salt
08:10 lasseknudsen joined #salt
08:12 impi joined #salt
08:25 o1e9 joined #salt
08:26 LostSoul My saltmaster is waiting for password for git@host - but key was added to stash
08:26 LostSoul I'm also able to clone from stash salt repo
08:26 LostSoul But when saltmaster uses gitfs he is not able to get it
08:26 LostSoul Any idea how to debug it?
08:31 netcho_ joined #salt
08:34 ninjada joined #salt
08:39 ninjada joined #salt
08:39 Rumbles joined #salt
08:45 impi joined #salt
08:48 ivanjaros joined #salt
08:48 CrummyGummy Morning. What is the best way to make sure that a command runs once successfully? I need to bootstrap a slave database but don't want that to run for every minor change? Can you set a persistent grain on the host indicating that the action has been performed? Any other ideas?
08:49 sh123124213 joined #salt
08:52 samodid joined #salt
08:54 teclator joined #salt
08:54 dunz0r CrummyGummy: Is there some way you could look at some file to see if it has run?
08:54 dunz0r Or some value
08:55 CrummyGummy I could maybe set a file based flag, yes.
08:56 madboxs joined #salt
08:56 ronnix joined #salt
08:56 madboxs joined #salt
08:57 KyleG joined #salt
08:57 KyleG joined #salt
08:59 geomacy joined #salt
09:01 inad922 joined #salt
09:06 s_kunk joined #salt
09:07 mikecmpbll joined #salt
09:09 hemebond1 CrummyGummy: https://docs.saltstack.com/en/latest/ref/states/requisites.html
09:09 hemebond1 Specifically https://docs.saltstack.com/en/latest/ref/states/requisites.html#unless
09:11 duncanmv joined #salt
09:11 ninjada joined #salt
09:12 madboxs joined #salt
09:14 sh123124213 joined #salt
09:16 CrummyGummy Thanks hemebond1 I'll give it a good read through. I need to make two commands and a mysql query run on this condition so hopefully it will help me.
09:18 gmoro joined #salt
09:18 DanyC joined #salt
09:20 teclator joined #salt
09:23 cryptolukas joined #salt
09:23 cryptolukas left #salt
09:28 DanyC hi all, anyone do have any suggestion as to how i could document the pillar data model ? i've have the pillar structure etc and that all works okay but i'm struggle how i can document that so other end users can benefit from it
09:29 hemebond1 DanyC: I don't understand what you mean.
09:29 hemebond1 What is a "pillar model"?
09:29 hemebond1 *"pillar data model"
09:31 DanyC hemebond1: sorry for not being clear, will try to rephrase it: so i have some pillar sls files and in each fo them there is a structure (yaml lists, dicts etc with key & values). Now my question is: any tips on how i can document that so other end users when they want to deploy to a different env, to know what those yaml keys are etc ?
09:32 hemebond1 I would just create a commented copy of the full structure.
09:32 hemebond1 You can comment out the whole lot using Jinja {# #}
09:32 hemebond1 Then just put comments for each item.
09:34 DanyC hemebond1: right, that i guess will do, is just one sls is 600 lines long :) maybe i should split into smaller sls files and then comment as per your suggestion
09:34 hemebond1 That's a big-ass pillar file.
09:36 JohnnyRun joined #salt
09:37 jhauser joined #salt
09:40 ivanjaros joined #salt
09:46 hlub jinja :(
09:46 hemebond1 ?
09:47 hlub does not give any simple way to loop over some stuff and produce a simple boolean.
09:47 manji DanyC, you could write a validator specifically for your data
09:47 hemebond1 hlub: Like what?
09:48 manji DanyC, similar tou xmllint
09:48 manji to*
09:48 manji that is what I am planning to do for my stuff anyway
09:49 DanyC manji: have you came across to any of this already ?
09:49 manji DanyC, I do have the same problem obviously, for stuff like house application yml stuff
09:49 hlub hemebond1: very common situation, for instance, check if a nginx virtual host has ssl enabled.
09:50 DanyC manji: you got it, we are on same boat ;)
09:50 manji yeap, only thing I could think of was writing my own validator
09:50 manji no matter what you do to document that, or write a tamplate, it will look ugly
09:50 hemebond1 hlub: Shouldn't that just be a case of reading the pillar value?
09:51 hlub hemebond1: the values are in a list because the ordering matters, so how would you read that value?
09:52 hemebond1 for and if?
09:53 hemebond1 I guess I would have to see it.
09:53 hemebond1 I think the nginx formula has a global use_ssl in its pillars.
09:53 nafg What's the shortest way to write a state, if I don't need to set any arguments
09:53 nafg I saw somewhere it did state.name: []
09:53 hlub yes, for and if and then update some dict you have introduced before the loop. then, you have a boolean value after the loop but this is far from optimal.
09:54 nafg Is that really necessary?
09:54 hlub manji: state_id:\n  module.state
09:54 hlub oops
09:55 hlub meant nafg
09:55 nafg hlub: so if it's just a string it will do the right thing?
09:55 nafg That's what I hoped
09:56 hlub nafg: as long as you have only one state per the state id.
09:56 nafg Next question, salt['grains.get']('...') really? Can't they provide shorter syntax?
09:56 hemebond1 hlub: Normally the dict you use matches the pillar data you want.
09:56 nafg hlub: is it possible to have more than one state with the same id? Not sure what you meant
09:56 hemebond1 Dunno. Sounds weird.
09:57 hemebond1 nafg: That is the recommended method.
09:57 impi joined #salt
09:57 hemebond1 You can use salt.grains.get
09:57 hemebond1 Or even grains.get
09:57 hemebond1 But I think they behave differently.
09:57 nafg so verbose
09:57 hemebond1 Using salt['grains.get'] and salt['pillar.get'] uses special methods.
09:57 hlub hemebond1: the dict is only for saving the boolean, because AFAIK you cannot set a variable within for loop so that it is visible after the loop scope.
09:58 hemebond1 nafg: Write a macro.
09:58 nafg can't those special methods be exposed more concisely?
09:58 nafg hemebond1: not familiar
09:58 nafg (rings a bell from last time around...)
09:58 hemebond1 hlub: It's difficult, but not impossible, to update values. But it sounds like you're doing far more than a templating engine would be used for.
09:59 lasseknudsen joined #salt
10:00 DanyC manji: i agree with you. I need to think more how this validator will shape out
10:00 hlub hemebond1: yes, I know it is possible as I just explained how it can be done but the thingis that such vomit in your jinja template is awful and unreadable.
10:00 manji DanyC, good luck mate, it is not easy :p
10:00 DanyC manji: likewise ;)
10:00 hlub but being unable to achieve something easily with jinja does not mean it does not belong to a template.
10:01 manji hehe
10:02 lasseknudsen2 joined #salt
10:03 ravenx joined #salt
10:03 ravenx hey guys is saltpad dead?
10:03 ravenx https://github.com/Lothiraldan/saltpad
10:03 hemebond1 hlub: I'll have to disagree with you there.
10:03 hemebond1 ravenx: It was updated 6 months ago.
10:03 ravenx that's the thing lol
10:03 losh joined #salt
10:04 ravenx is 6 months considered death or alive?
10:04 hemebond1 It's not a part of Saltstack.
10:04 LostSoul Hi
10:04 hemebond1 It's maintained by one person.
10:04 LostSoul Anyone meet problems with setting up stash/bitbucket as backend for salt configs?
10:04 LostSoul My saltmaster is waiting for password for git@host - but key was added to stash
10:04 LostSoul I'm able to clone from stash salt repo
10:04 LostSoul But when saltmaster uses gitfs he is not able to get it
10:04 LostSoul Any idea how to debug it?
10:04 hlub hemebond1: for what part?
10:04 ravenx hemebond1: ah i see
10:04 ravenx LostSoul: nope.  i actually am usign that right now
10:05 hemebond1 hlub: Putting logic into templates.
10:05 ravenx LostSoul: it shoudlnt' matter, it's all git at the end of the day though
10:05 LostSoul I had gitlab - I mean repo in gitlab
10:05 LostSoul I tried to switch to stash and it can't download it as it contantly asks for password while trying to fetch it
10:05 LostSoul I've added key to stash and I'm able to clone it to salt VM manually
10:05 LostSoul But salt can't do it
10:06 LostSoul I've also added setting to .ssh/config for this host ... and still nothing
10:07 hlub hemebond1: I think checking whether a ssl is enabled or not is very similar than checking for instance whether a selinux is enabled or any other grain or pillar value.
10:08 hemebond1 hlub: Sure, but that's not all you were talking about doing.
10:08 hlub it was
10:08 hemebond1 Okay, then salt['pillar.get']('nginx:use_ssl')
10:08 hemebond1 Easy.
10:09 ravenx LostSoul: could it be a key issue?
10:09 ravenx what is the error you are getting?
10:10 hlub hemebond1: I need that info per every virtualhost. and there the only problem is jinja + lists.
10:11 LostSoul ravenx: I don't think so
10:11 LostSoul ravenx:  < LostSoul> I've added key to stash and I'm able to clone it to salt VM manually
10:11 hlub hemebond1: it should be as easy too
10:11 hemebond1 hlub: I've personally not had any trouble with lists.
10:11 LostSoul Problem is salt-master is hanging on it
10:11 LostSoul I don't know what is wrong
10:11 LostSoul I just can't see it in logs or whatever
10:12 LostSoul [salt.utils.gitfs ][ERROR   ][28615] Exception 'len([]) != len(['Permission denied, please try again.', '', '', '', '', 'and the repository exists.'])' caught while fetching gitfs remote
10:12 ravenx can you run it in -ldebug
10:12 ravenx permission denied definitely sounds lke some auth issue...
10:12 LostSoul ravenx: I did so ... and I happen to see that it hangs on waiting for password to git@host
10:12 ravenx password....
10:12 LostSoul Yes
10:12 ravenx but this is key based right?
10:12 ravenx i'd use keys with salt lol
10:13 LostSoul So it can't connect via ssh key
10:13 LostSoul I do..
10:13 ravenx it can't connect via ssh key?
10:13 ravenx can you connect via the command line? :)
10:13 LostSoul As I told you when I try to clone repo (via ssh) it went smooth with key
10:13 hlub hemebond1: I personally try to avoid use of lists in pillar data for those reasons :)
10:13 LostSoul It's just salt master is not able to do so
10:13 LostSoul ravenx: When I do "git clone *repo*" - it works
10:14 LostSoul When salt-master tries to he hangs and wait for password
10:14 gmoro joined #salt
10:14 ravenx aaah
10:14 LostSoul I have no idea what is wrong, some damn cache? (I tried to remove /var/cache/salt and nothing happened)
10:14 ravenx is the key file in the right format?  the salt-master can read it?
10:14 ravenx cuz if the salt master cannot read it (chmod/chown)
10:14 LostSoul Yes, it worked for gitlab
10:14 ravenx then all is naught
10:14 ravenx oh
10:15 LostSoul It's not for for stash (while manully it is)
10:15 LostSoul It's hard to debug what the hell is wrong :P
10:15 LostSoul I can try to do upgrade of salt-master but then it can go really bad
10:15 duncanmv joined #salt
10:17 ravenx and salt-master's gitfs works for gitlab?
10:17 LostSoul Yes ravenx
10:19 LostSoul Any idea what can I do? I mean .. damn I can't find what is going wrong
10:19 LostSoul As it works while I try to fetch it manually
10:20 ravenx maybe settings in stash?
10:20 ravenx cuz clearly, your salt master is set up right
10:20 ravenx and you know how to set it up for gitlab.
10:23 LostSoul Hard to think, what can cause it in stash
10:23 LostSoul As I said - manually it works
10:28 dps joined #salt
10:33 arapaho joined #salt
10:35 mbologna joined #salt
10:47 fracklen joined #salt
10:55 dps_ joined #salt
10:59 big|bad|wolf joined #salt
11:12 chadhs joined #salt
11:17 KyleG joined #salt
11:17 KyleG joined #salt
11:23 LostSoul I guess no help here :P
11:24 XenophonF LostSoul: which git backend are you using?
11:24 XenophonF GitPython? pygit2? wut?
11:24 LostSoul XenophonF: Gitpython
11:25 XenophonF hang on looking through the chat log
11:25 LostSoul ?
11:25 LostSoul Ok :)
11:25 XenophonF not all of us live in your time zone ;)
11:26 XenophonF OK so are you using the same SSH key-pair to perform test clones as you configured for salt-master?
11:27 LostSoul XenophonF: I know man, I'm just confused that's all :P
11:27 LostSoul XenophonF: I mean - I didn't configure any key-pair for salt-master
11:27 madboxs joined #salt
11:28 XenophonF by that I mean, can you su to the salt-master account (typically root) and run `git clone`?
11:28 LostSoul Thing is ... a) it worked for repo in gitlab b) I forced to use private key in ~/.ssh/config for this host
11:28 LostSoul XenophonF: Yes, git clone works
11:29 LostSoul In debug mode I saw it hangs on connecting to git@host - it waits for password, so something went wrong
11:29 brousch__ joined #salt
11:29 XenophonF here's my config - https://github.com/irtnog/salt-pillar-example/blob/master/salt/example/com/init.sls
11:29 XenophonF i use users-formula and salt-formula to manage my master
11:30 XenophonF so you have something in ~root/.ssh/config like "Host gitlab.com" followed by "IdentityFile ~/.ssh/salt-master-gitlab"
11:30 XenophonF or something like that
11:30 LostSoul XenophonF: Same here
11:31 XenophonF and then whatever you're calling ~root/.ssh/salt-master-gitlab has the correct private key?
11:31 LondonAppDev joined #salt
11:32 LostSoul Looks familiar to mine
11:32 XenophonF are you absolutely sure that gitfs_provider is set to GitPython? are you sure that GitPython is installed correctly?
11:32 LostSoul Yes, as I said it worked for repo in gitlab .. it's not working for stash repo
11:32 XenophonF oh
11:32 XenophonF stash, hm, missed that
11:33 XenophonF OK
11:33 XenophonF so you can git clone from the stash repo, no problem?
11:33 LostSoul But it still works when I type git clone YYY
11:34 LostSoul Yes
11:34 XenophonF looks like ravenx went down the same path
11:34 LostSoul It works, without any password, without any problems
11:34 XenophonF anything in the stash logs?
11:34 LostSoul I guess salt-master uses other key
11:34 LostSoul I don't have access to those logs sadly
11:35 XenophonF does the stash server have a minion on it? ;)
11:36 XenophonF you could try switching to pygit2
11:36 XenophonF and then specify the username/password combo in the gitfs config
11:37 XenophonF but it's likely some kind of keying material mismatch
11:37 XenophonF I'd double-check the Stash server; make sure the Salt master's SSH public key got registered properly
11:38 XenophonF It's possible that Stash doesn't like your keymat even though GitLab et al do.
11:38 XenophonF E.g., I switched to ed25519 keys a while back for GitHub and elsewhere, but I still have to use 2kbit RSA2 keys with AWS.
11:39 * XenophonF thinks Amazon is super lame for not supporting other SSH key types.
11:40 XenophonF You could also try linting your SSH client config by creating a new user account on a dev system, loading just the SSH key for Stash, and trying a git clone.
11:41 XenophonF Bear in mind, too, that we can't see your salt-master or ssh configs.
11:41 XenophonF It might help us help you if you sanitize them and post them to gist or something.
11:46 inad922 joined #salt
11:47 watersoul joined #salt
11:52 darvon joined #salt
11:52 fredvd joined #salt
11:56 darvon joined #salt
11:58 darvon joined #salt
12:10 LostSoul XenophonF: Sorry, I was away
12:10 LostSoul Catching up
12:13 LostSoul Hard to say, but it's annoying :(
12:17 alexzel joined #salt
12:17 KyleG1 joined #salt
12:18 alexzel hello, I have a state that is rendered as py, the state just get some info and puts it in a database, for some reason the float values are getting turned to int
12:19 alexzel I'm using the elasticsearch module, and from a quick debug session I notices that by the time the document gets to the modules all the float values are ints
12:26 madboxs joined #salt
12:29 ronnix joined #salt
12:29 puzzlingWeirdo joined #salt
12:34 oms101_ joined #salt
12:44 ronnix joined #salt
12:52 AvengerMoJo joined #salt
12:54 nledez joined #salt
12:54 nledez joined #salt
12:55 alexzel anyone?
12:56 numkem joined #salt
12:56 ronnix joined #salt
12:58 onmeac joined #salt
13:08 cyborg-one joined #salt
13:08 dendazen joined #salt
13:13 amcorreia joined #salt
13:15 LostSoul joined #salt
13:19 onmeac left #salt
13:22 CrummyGummy joined #salt
13:27 madboxs joined #salt
13:29 ninjada joined #salt
13:30 lasseknudsen joined #salt
13:33 lasseknudsen2 joined #salt
13:36 aphor alexzel: sounds like you may want to give the source a read through and possibly open an issue or even fix it and submit a PR.
13:36 aphor ... if it's in the execution module.
13:45 Seb-Solon left #salt
13:45 jwerak` joined #salt
13:47 ssplatt joined #salt
14:07 scoates joined #salt
14:08 nethershaw joined #salt
14:12 LostSoul joined #salt
14:20 rubenb joined #salt
14:21 jas02 joined #salt
14:24 ninjada joined #salt
14:24 saintpablos joined #salt
14:26 jdipierro joined #salt
14:26 PeterO joined #salt
14:28 madboxs joined #salt
14:43 jdipierro Any insider info around here on when SaltConf17 might be announced?
14:43 jschoolcraft joined #salt
14:43 racooper joined #salt
14:44 PeterO joined #salt
14:44 _JZ_ joined #salt
14:46 cmarzullo They being mean and won't tell us.
14:53 rem5_ joined #salt
14:57 DammitJim joined #salt
15:00 dyasny joined #salt
15:08 InfluentialDave joined #salt
15:09 _JZ_ joined #salt
15:09 evle1 joined #salt
15:10 xet7 joined #salt
15:10 InfluentialDave Hi all, I'm having trouble calling file.list_backups from the master to a minion where a Windows Directory path is involved containing spaces and brackets, the error thrown is "-bash: syntax error near unexpected token `('"
15:11 nickabbey joined #salt
15:12 InfluentialDave For example [salt 'minionname' file.list_backups C:\salt\var\cache\salt\minion\file_backup\C_\Program Files (x86)\filename] won't run as bash finds ( unexpected
15:12 InfluentialDave Does anyone know the correct way to call this function on a Windows directory listing with brackets and/or spaces?
15:13 Tanta joined #salt
15:13 dendazen joined #salt
15:15 Guest76598 joined #salt
15:18 duncanmv joined #salt
15:20 pg208327e joined #salt
15:25 Rumbles probably need to escapoe the brackets?
15:25 Rumbles and maybe the spaces too....
15:26 Rumbles C:\salt\var\cache\salt\minion\file_backup\C_\Program\ Files\ \(x86\)\filename ??
15:26 Rumbles no idea though with silly Windows paths
15:29 ekristen is there a way to call a module via publish and store the result as pillar item on the local minion?
15:30 edrocks joined #salt
15:31 sp0097 joined #salt
15:32 tapoxi joined #salt
15:32 teclator joined #salt
15:33 Rumbles you mean as grain not a pillar perhaps?
15:37 ekristen maybe, here is the idea …
15:40 ekristen Basically I need a value that is dynamically generated on one minion to populate a config on another minion, but I only ever need it done once.
15:40 ekristen IE I don’t need the config file to be changed with a new value very single time the state is run
15:41 ekristen I’d like to run the state to populate the config, if I haven’t received the value from the other minion then use publish.publish to acquire it, otherwise use the value it already received
15:49 InfluentialDave Sorry for the late reply, that didn't work Rumbles :(
15:50 ivanjaros joined #salt
15:54 LostSoul joined #salt
16:00 InfluentialDave Don't worry, I derped. I was trying to list the backup file, and not the file that should have been backed up. e.g. I was attempting to list the entire salt backup path and not the original file...
16:01 InfluentialDave Also, I found you can get around the brackets/spaces by simply putting the entire directory listing within ' marks.
16:04 brakkisath joined #salt
16:05 zenchiken joined #salt
16:12 DanyC joined #salt
16:12 djgerm joined #salt
16:15 tkojames joined #salt
16:19 shoemonkey joined #salt
16:21 duncanmv joined #salt
16:22 DammitJim do many of you have different versions of the same OS in your salt managed environment?
16:22 DammitJim I'm so confused as to what I should do now that we are rolling out ubuntu 16 servers (we have 14)
16:22 Brew joined #salt
16:23 nickabbey joined #salt
16:25 impi joined #salt
16:26 cscf DammitJim, what is confusing?
16:27 nickabbey joined #salt
16:28 cscf You can grains match on "oscodename:xenial" if that's what you're wondering
16:29 cscf or osrelease:16.04
16:29 DammitJim where do I do that?
16:29 cscf DammitJim, anywhere you like?
16:30 cscf Where do you want to?  In top.sls? In states?
16:30 gableroux joined #salt
16:31 leonkatz joined #salt
16:32 samodid joined #salt
16:32 ekristen is there any way natively in saltstack to run and cache a response from publish.publish so that I can use the value in the config, but not have it called once it has gotten a value at least once?
16:33 DammitJim oh, I can do this in top.sls?
16:34 DammitJim I read that one should be defining the package names in some kind of yaml file according to the grains
16:36 cscf DammitJim, if you have a state that is mostly the same except for package names, sure.  Usually that's more for cross-distro states, though.
16:36 DammitJim cscf, what do you mean cross-distro
16:37 DammitJim like, now that we are going to ubuntu 16, we'd like to use tomcat8 vs tomcat7
16:37 DammitJim man, I can see how I should do a lot of these things more dynamic
16:37 cscf DammitJim, when people make formulas and they want them to work on Ubuntu and CentOS, they declare the package names as variables like that
16:37 DammitJim like I add users to the tomcat7 grouops
16:37 DammitJim for ubuntu 16, I'll have to add those users to tomcat8 group
16:37 DammitJim oh
16:37 DammitJim so, mine might not be THAT far off
16:38 sp0097 joined #salt
16:43 cscf DammitJim, if your state will otherwise be the same, then sure, you can declare a var, "tomcat_ver" as either "tomcat7" or tomcat8
16:44 cscf inside an if statement,  if grains['oscodename']  == xenial
16:44 SaucyElf joined #salt
16:44 jdipierro If I call `saltutil.refresh_pillar` from inside a module would that refresh the pillar dunder?
16:45 cmarzullo I wouldn't thik so.
16:47 edrocks joined #salt
16:55 tiwula joined #salt
16:57 austin_ joined #salt
16:57 ChubYann joined #salt
16:58 aldevar left #salt
17:04 jas02 joined #salt
17:05 nZac joined #salt
17:10 keltim joined #salt
17:10 hasues joined #salt
17:12 DanyC joined #salt
17:12 gtmanfred jdipierro: https://github.com/saltstack/salt/pull/39790
17:12 saltstackbot [#39790][OPEN] add get_or_set_hash to sdb | What does this PR do?...
17:21 cachedout joined #salt
17:31 nickabbey joined #salt
17:33 jas02 joined #salt
17:37 onlyanegg joined #salt
17:39 wendall911 joined #salt
17:45 gmoro joined #salt
17:46 jhauser joined #salt
17:49 jdipierro joined #salt
17:49 miker_ anyone know wheere i can get the new enterprise beta console
17:50 notCalle joined #salt
17:51 nickabbey joined #salt
17:52 jas02 joined #salt
17:55 cachedout miker_: We can schedule a demo for you if you want to drop me an email: mp@saltstack.com
17:56 SaucyElf joined #salt
18:00 candyman88 joined #salt
18:03 writteno1 joined #salt
18:03 edrocks joined #salt
18:04 cyborg-one joined #salt
18:05 Miouge joined #salt
18:10 vexati0n so... anyone have any idea why a minion would keep saying 'No Top file or external nodes data matches found' while using gitfs where the states are working fine, and a top file does actually exist ?
18:15 s_kunk joined #salt
18:15 cscf vexati0n, your top file might be malformed
18:16 cscf for example, forgetting a colon
18:16 orionx joined #salt
18:17 vexati0n cscf: no, it's fine. what's happening is the minion is only considering the first top file found in the list of gitfs repos. the rest of them aren't being merged in. if i move the instructions from one of the missing top files into the first one in the list, then they work fine
18:18 cscf vexati0n, I believe that is the expected behavior?
18:18 orionx joined #salt
18:18 vexati0n why would that be expected? "top file merging strategy", a setting for the salt master, infers that top files will be merged.
18:18 gtmanfred between environments
18:19 tiwula joined #salt
18:19 vexati0n so how am i supposed to handle multiple states that all belong to a single environment?
18:19 gtmanfred if you have multiple top files, and they are all in the base environment, salt only uses the first one it finds
18:19 vexati0n that's super silly
18:20 gtmanfred you have to rememebr, top.sls is just like any other sls file
18:20 inad922 joined #salt
18:20 gtmanfred if you had two something.sls files, the second one is just a backup in case it is not found in a file_root above it
18:21 gtmanfred vexati0n: explained here https://docs.saltstack.com/en/latest/ref/file_server/file_roots.html#directory-overlay
18:21 vexati0n can i at least put a top file in /srv/salt locally on the master and leave them out of the gitfs repos?
18:21 nickabbey joined #salt
18:22 gtmanfred yes
18:22 gtmanfred just make sure you have roots in your fileserver_backend
18:23 vexati0n otherwise i'd need a new environment for each separate state. so.. ok. i still think it should be smarter than that, but at least i think i understand
18:23 vexati0n thanks
18:24 gableroux joined #salt
18:26 gtmanfred no problem :D
18:26 Edgan joined #salt
18:28 nickabbey joined #salt
18:31 vexati0n now just need to figure out why the minion refuses to retrieve some of the files in a git repo despite the fact that they very much exist, and it has access to other files in the same repo
18:32 edrocks joined #salt
18:35 jdipierr_ joined #salt
18:39 rlatimore joined #salt
18:42 jhauser joined #salt
18:44 raspado joined #salt
18:57 austin_ in external auth, i'm trying to limit the user to only a single minion
18:58 austin_ however, i can't seem to get it to work right
18:58 austin_ no matter what i do, its unauthorized
18:58 austin_ any one have an example of compound minion targetting in ext auth
19:01 SaucyElf joined #salt
19:01 inad922 joined #salt
19:02 KyleG joined #salt
19:02 KyleG joined #salt
19:04 Gareth morning
19:07 gtmanfred o/
19:10 Gareth gtmanfred: hey . hows things?
19:12 jdipierro joined #salt
19:12 gtmanfred not much, closing bugs and getting ready to bake sourdough tomorrow
19:12 Eugene Pics of bread
19:13 austin_ gtmanfred: if you are doing a compound match in ext auth (via ldap)... is it something like 'G@a:b:c': ?
19:17 gtmanfred i think so?
19:18 Rumbles joined #salt
19:18 gtmanfred Eugene: http://imgur.com/a/nilax
19:19 Eugene Awwwww yissss
19:21 mikecmpbll joined #salt
19:21 djgerm is there a way to show the config of the master that are currently in memory?
19:21 djgerm that it's using
19:21 ssplatt you can rea the config, yeah
19:22 fracklen joined #salt
19:22 gtmanfred djgerm: so, there is a way, but it is odd...
19:23 gtmanfred djgerm: set pillar_opts: True in the master config, and then check the minions pillars for the master config
19:29 djgerm i'll try that, thanks
19:29 jhauser joined #salt
19:33 gtmanfred djgerm: https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-opts
19:33 cachedout This can be done with two lines of python in a custom runner. def dump_config(): return __opts__
19:34 madboxs joined #salt
19:34 gtmanfred oh, that is way better
19:34 cachedout Wait, I lied actually. That will give the runner's version of the opts which are probably the same but not necessarily.
19:34 jas02 joined #salt
19:36 cachedout But if that is all you are after, that will work.
19:37 bakins joined #salt
19:49 jas02 joined #salt
19:49 cachedout If there are any Terraform users, the dev team is seeking feedback on this proposal: https://github.com/saltstack/salt/pull/39754
19:49 saltstackbot [#39754][OPEN] [WIP] terraform roster | ...
19:49 jrgochan Hello. I'm following the instructions in the third YAML box on this page and I still can't seem to get my NFS service to reload. Is this page still accurate? https://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html
19:50 gtmanfred jrgochan: that should work, what do your states look like?
19:51 jrgochan http://pastebin.com/4SzYRVxS
19:52 jrgochan So that should mean it will reload NFS every time I apply the state, correct?
19:52 gtmanfred that is not correctly formatted
19:53 jrgochan hrm. Only when the watched state changes eh... Is there any way to just reload the state every time?
19:53 gtmanfred oh wait
19:53 gtmanfred yes it is
19:53 gtmanfred i forgot you could put it on the state id
19:53 nickabbey joined #salt
19:53 gtmanfred jrgochan: you could do a service.dead and then a service.running after
19:55 gtmanfred jrgochan: https://docs.saltstack.com/en/latest/ref/states/requisites.html#watch
19:55 gtmanfred there is the actual documentation of watch
19:56 jrgochan Hrm. I'd just like it to reload, so perhaps I can get it to issue an 'exportfs -a' command
19:56 ivanjaros joined #salt
19:56 Trauma joined #salt
19:56 gtmanfred if you just want it to do exportfs -a every time, you could just do a cmd.run of that command
19:57 jrgochan hrm. I think I might. unless i can figure out how to get the service reloaded
20:00 jas02 joined #salt
20:00 bbbryson joined #salt
20:01 tongueroo joined #salt
20:01 Rumbles joined #salt
20:02 scarcry joined #salt
20:03 sjorge joined #salt
20:03 sjorge joined #salt
20:05 tongueroo wondering if it is possible to do a highstate on a minion node specifying a git branch to use instead of using master.  Trying: salt-call state.highstate saltenv=mygitbranch but setting this error. https://gist.github.com/tongueroo/d1adf6a23e49b370706c4abea9f0e2fd
20:05 tongueroo only way Ive been able to "switch" branch is by 1. reconfiguring the /etc/salt/master file on the salt master 2. restarting it 3. and then the salt-call state.highstate on the minion uses mygitbranch :)
20:12 wangofett tongueroo: you may want environments instead - dev, qa, prod, for instance
20:12 DanyC joined #salt
20:12 wangofett you can specify branches that way, IIRC
20:12 edrocks joined #salt
20:12 jdipierro joined #salt
20:14 wangofett though... you could just do `git checkout mybranch && sudo salt "myminion" state.highstate`
20:14 gableroux joined #salt
20:16 tongueroo @wangofett um, so I run a `salt-run fileserver.update` on the salt master first and then I run a `salt-call state.highstate` on the minion
20:16 tongueroo Im actually unsure where the git repo gets downloaded to on the salt master :)
20:16 gtmanfred it gets downloaded to /var/cache/salt/master/gitfs/<barerepo> iirc
20:16 tongueroo but unsure how I can do a `git checkout mybranch` since I think that is handled by `salt-run fileserver.update`
20:17 gtmanfred if you put the git repo as /srv/salt you could do that, but i don't think you would want that
20:17 gtmanfred tongueroo: how do you reconfigure the master?
20:18 tongueroo @gtmanfred thanks!  I foudn that before but its weird in that folder, in that it is not like a 'git clone' of our repo. It has a refs folder and it looks like the code is in there https://gist.github.com/tongueroo/4fa731c8448f7b8bef16abb2a6e17834
20:18 gtmanfred it is a git clone --bare
20:18 gtmanfred all of the refs are in there, and it can pull any branch out of it
20:18 tongueroo @gtmanfred I change the gitfs_base: master in the /etc/salt/master https://gist.github.com/tongueroo/ec7de29cec4d0464ccbe09546ce4802b  and restart the salt master
20:19 tongueroo RE: it is a git clone --bare -> oh that explains it
20:19 duncan joined #salt
20:19 duncan hi
20:20 tongueroo changing the /etc/salt/master and restarting is my hack so I can do some dev work on a git branch and highstate that for testing
20:20 duncan gtmanfred, I am looking into 39764
20:20 tongueroo before merging the pull request into master
20:20 gtmanfred so, you should be able to use saltenv=mybranch, but you will need a top file in that other branch, but you might need https://docs.saltstack.com/en/latest/ref/configuration/minion.html#std:conf_minion-top_file_merging_strategy
20:20 tongueroo figured there's got to be a proper way to do this though :)
20:20 gtmanfred duncan: cool
20:20 Rumbles joined #salt
20:20 duncan what happened to tests recently... seems that develop depends on a non-published module ImportError: No module named pytestsalt.utils
20:21 gtmanfred pedro moved it all over to pytest
20:21 gtmanfred pip install -r requirements/pytest.txt
20:21 tongueroo @gtmanfred RE: https://docs.saltstack.com/en/latest/ref/configuration/minion.html#std:conf_minion-top_file_merging_strategy -> Great! will read through after lunch. Awesome for sending a link to a lead!
20:21 duncan gtmanfred, so runtests.py is obsolete? how do I run a single unit test now?
20:21 gtmanfred no, we are still using runtests for now
20:22 gtmanfred but you can run python tests/runtests.py -v -n unit.modules.test_docker
20:22 gtmanfred but you can run python tests/runtests.py -v -n unit.modules.test_docker.DockerTest.test_sls_build
20:22 gtmanfred s0undt3ch: ^^
20:22 duncan If I do that
20:22 duncan I get
20:22 duncan ImportError: No module named pytestsalt.utils
20:22 duncan File "/space/git/saltstack/salt/tests/support/processes.py", line 18, in <module>
20:22 duncan from pytestsalt.utils import SaltRunEventListener as PytestSaltRunEventListener
20:23 gtmanfred duncan: https://github.com/saltstack/salt/blob/develop/requirements/pytest.txt ?
20:23 gtmanfred oh
20:23 gtmanfred he didn't include it
20:23 gtmanfred or it hasn't been mreged yet...
20:24 gtmanfred duncan: https://github.com/saltstack/pytest-salt
20:24 edrocks joined #salt
20:24 gtmanfred duncan: https://github.com/saltstack/salt/pull/39759/files
20:24 saltstackbot [#39759][MERGED] Update development requirements file | What does this PR do?...
20:25 kekem joined #salt
20:26 duncan ok, if I checkout pytest-salt, I can run the stuff, and then I get
20:26 duncan Could not locate test 'unit.modules.test_docker.DockerTest.test_sls_build'. Exiting.
20:26 duncan (salt)
20:27 gtmanfred i think it is actually DockerTestCase
20:27 duncan which is the same thing I got while doing https://github.com/saltstack/salt/pull/39754 and why I had to include a unittest.main() in the testcase
20:27 saltstackbot [#39754][OPEN] [WIP] terraform roster | ...
20:28 kekem left #salt
20:28 jas02 joined #salt
20:28 gtmanfred python tests/runtests.py -n unit.modules.test_docker.DockerTestCase.test_sls_build ?
20:29 duncan same, Could not locate test 'unit.modules.test_docker.DockerTestCase.test_sls_build'. Exiting.
20:29 duncan I got the same problem while trying to run the terraform roster unit test
20:29 gtmanfred one second, lemme get a server up.
20:30 SaucyElf joined #salt
20:31 tongueroo @gtmanfred read through https://docs.saltstack.com/en/latest/ref/configuration/minion.html#std:conf_minion-top_file_merging_strategy.  Im a little new to salt so still grasping my head around this.  Our top.sls on both git master and mybranch looks like this https://gist.github.com/tongueroo/512d73ab755205bc95369709ef222f01 .  We have a top.sls on each branch so I was thinking it should run the salt formulas because both git branches have t
20:31 tongueroo op.sls files.  Instead error is "No Top file or external nodes data matches found" https://gist.github.com/tongueroo/d828ec395f1e63fef9dc698a35920001
20:31 onlyanegg What happens when I cntl-c out of a orchestrate or a state run on a salt master? Does a signal get sent to jobs on the minions?
20:31 gtmanfred tongueroo: on the mybranch one, it needs to have the name of the branch at the top, not base
20:32 gtmanfred tongueroo: our you can but {{saltenv}}
20:32 tongueroo oh ic!
20:32 tongueroo thank you!
20:32 gtmanfred onlyanegg: it does not stop the runs on the minion
20:32 gtmanfred it just stops checking for their returns, and doesn't send any new ones
20:32 gtmanfred same as ^c salt \* state.apply
20:33 onlyanegg gtmanfred: ok, good to know. thx!
20:35 xet7 joined #salt
20:38 gtmanfred duncan: hrm, i do not know, because it is working here when I use the git.salt stuff from salt-jenkins to setup my test environment http://ix.io/nTu
20:38 jrgochan do you guys know if you can do a 'module.run' as root?
20:38 viccuad joined #salt
20:38 jrgochan i'm trying to rsync files and it can't copy anything without any other perms
20:39 viccuad Hi folks. I see in the docs that file_mode: keep for file.recurse is supported, but for me it is dropping from 744 to 644 when copying. I'm running 2016.11. Am I missing something? thanks in advance
20:42 SaucyElf joined #salt
20:46 shoemonkey joined #salt
20:49 duncan gtmanfred, are you using the virtualenv setup?
20:54 hrumph joined #salt
20:54 g3cko joined #salt
20:55 orionx joined #salt
20:58 gtmanfred duncan: I am not, i boot a clean server for the testruns
20:58 gtmanfred duncan: and then I use this script to initialize the server https://gist.github.com/gtmanfred/73937f85d57c6a3caacbd6eaaa3de00e
20:59 gtmanfred also, i believe the whole thing works on the centos/systemd docker container
21:00 jhauser joined #salt
21:01 duncan open("/space/git/saltstack/salt/tests/unit/modules/test_docker.py", O_RDONLY) = 11
21:01 duncan fstat(11, {st_mode=S_IFREG|0644, st_size=33669, ...}) = 0
21:01 duncan uhm, it is finding it
21:05 Rumbles joined #salt
21:06 SaucyElf joined #salt
21:16 jeffspeff joined #salt
21:18 fracklen joined #salt
21:18 Rumbles joined #salt
21:18 leonkatz joined #salt
21:21 tongueroo @gtmanfred That works!  Thanks for explaining it. I understand how git branch and environments works more now.
21:36 apatil joined #salt
21:39 geomacy joined #salt
21:50 gableroux joined #salt
21:53 kuromagi^ joined #salt
21:55 leonkatz joined #salt
22:00 rideh joined #salt
22:01 basepi joined #salt
22:01 Vye joined #salt
22:02 sjorge joined #salt
22:02 sjorge joined #salt
22:05 bryguy joined #salt
22:07 jas02 joined #salt
22:08 hemebond1 Does anyone have an example of accessing Salt Mine over netapi?
22:15 hasues Anyone have a set of eyes to see what I'm doing wrong with my salt states?  I'm just trying to learn.
22:16 hemebond1 hasues: Have you pasted the state somewhere?
22:16 hasues I'll do so now.
22:17 * duncan is frustrated with runtests.px
22:18 cachedout duncan: What is the issue?
22:19 duncan cachedout, I can't get runtests.py find tests by name using the virtualenv setup
22:20 duncan you can see I had to add a main() to the terraform roster unit test, I am facing the same issue trying to run only the docker test
22:20 cachedout Hmm, I have never tried that. You're using the -n flag?
22:21 duncan yes
22:21 cachedout It's just not finding the tests. Is there a traceback or just an error?
22:21 duncan what is the other option? I mean, the unit tests do not have a unittest.main() in the file
22:22 cachedout Just making sure we're on the same page is all. :]
22:22 duncan Could not locate test 'unit.modules.test_docker.DockerTestCase.test_sls_build'. Exiting.
22:23 cachedout Looking
22:23 duncan it does not show any other output, not even with -v
22:26 cachedout This must be a quirk with unittest2's loadTestsFromName()
22:27 cachedout Let me just verify that I can load that without a virtualenv
22:27 cachedout This is the head of develop?
22:27 ninjada joined #salt
22:36 madboxs joined #salt
22:38 gtmanfred I can load it without a virtualenv on develop
22:44 duncan cachedout, yes
22:46 cachedout It works fine for me with a virtualenv :-/
22:47 cachedout (And without as well)
22:47 duncan what line are you using?
22:47 hasues Someone make sense of this to me http://dpaste.com/3E6AP9P  How do it make a set of includes like this work
22:47 jrgochan kinda curious. anyone know what the group of six digits is at the end of a file backup?
22:47 jrgochan hosts.allow_Tue_Dec_20_17:22:46_376991_2016
22:48 cachedout duncan: One sec, let me verify one thing
22:48 duncan cachedout, are you standing in the root of the git tree?
22:48 cachedout in salt/tests
22:51 cachedout Yup, still working fine.
22:51 cachedout Python version?
22:51 cachedout And do you have the latest salt-testing?
22:53 orionx joined #salt
22:55 duncan cachedout: uhm, I installed from pip, not from git (salt-testing) let me check
22:55 cachedout There were some recent changes to that and I don't think a new release has been pushed yet
22:55 cachedout So a git checkout might be worthwhile
22:58 duncan yeah, I realized that develop also depends on pytest-salt, which is not pushed yet
22:59 apatil8 joined #salt
22:59 cachedout Not as a package, no. That also needs a git checkout.
22:59 shoemonkey joined #salt
22:59 cachedout We're working on transitioning all of that over, so we're a little behind on the packaging aspect. Apologies. :]
23:01 apatil8 Please suggest some good resources to learn SALT
23:01 duncan ok no luck
23:01 duncan unfortunately I need to stop now. midnight here
23:01 duncan I hope I can revisit the docker bug another evening
23:01 apatil8 Is there a good book that I can refer to? I usually like to read books.
23:02 cachedout duncan: Sorry about that. We'll be here tomorrow and hopefully we can get it sorted. Sleep well.
23:02 bbbryson joined #salt
23:03 cachedout apatil8: This is the book I recommend. https://www.amazon.com/Learning-SaltStack-Second-Colton-Myers/dp/1785881906
23:09 StolenToast joined #salt
23:18 foreal joined #salt
23:19 jas02 joined #salt
23:22 dendazen joined #salt
23:24 jrgochan is there a way to register a handmade file as a salt backup?
23:25 hemebond1 What does that mean?
23:25 jrgochan i'm manually creating files in /var/cache/salt/minion/file_backup and want them to appear in a salt "*" file.list_backups command
23:26 jrgochan they have the same file name format
23:28 apatil8 cachedout: Thank you
23:30 s0undt3ch gtmanfred: the dev requirements file now also includes the pytest-salt requirement
23:37 madboxs joined #salt
23:38 iggy joined #salt
23:38 djgerm If I have a binary I want to put on minions via a state, is file.managed the best way?
23:39 djgerm i'm too lazy to make a package and repo :P
23:39 hemebond1 That's how I've done it but I'm not happy about it.
23:40 rewbycraft joined #salt
23:44 edrocks joined #salt
23:46 shoemonkey joined #salt
23:51 jdipierro joined #salt
23:52 Praematura joined #salt
23:56 orionx joined #salt

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