Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-26

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

All times shown according to UTC.

Time Nick Message
00:00 ssplatt joined #salt
00:00 yidhra joined #salt
00:04 AdamSewell joined #salt
00:07 ninjada joined #salt
00:07 lws joined #salt
00:13 PeterO joined #salt
00:17 SeaPhor looks like I have a big learning curve to 'un-learn'...
00:18 i90rr joined #salt
00:18 brianfeister joined #salt
00:21 Garyx joined #salt
00:21 yidhra joined #salt
00:23 baweaver joined #salt
00:23 aqua^c joined #salt
00:24 Garyx joined #salt
00:29 Garyx joined #salt
00:32 Garyx joined #salt
00:36 Garyx joined #salt
00:37 subsignal joined #salt
00:46 rem5 joined #salt
00:46 Adam__ joined #salt
00:51 Garyx joined #salt
00:54 Garyx joined #salt
00:56 SeaPhor My work sent me to some official Puppet training, even though they use the Opensource version- upon completion my management had me put together a proposal to re-structure our present puppet environment (mainly because I stressed how poorly it was structured to begin with) and now- another service we pay for Enterprise level support has Salt included in their next upgrade, including a web UI, SO- I want to take my re-structure plan and
00:56 SeaPhor create a new proposal with Salt instead, after looking over the link/s I see that it will be an extensive project and learning experience...
00:58 racooper joined #salt
00:58 akhter joined #salt
00:59 Garyx joined #salt
01:01 flowstate joined #salt
01:01 jfindlay well, don't be afraid to ask questions :)
01:02 jfindlay if you need/want saltstack can do professional service and training engagements
01:03 jfindlay also some of the users here could do consulting
01:03 SeaPhor it'd be nice if there was a "conversion-chart" for ... modules == ??, variable code differences, manifests == ??, etc
01:04 SeaPhor I already spent our training budget for the advanced "Puppet Practitioner" course
01:06 jfindlay I know almost nothing about puppet, but the basic core of what salt does are execution modules that interact with systems, applications, and APIs and state modules that use the execution modules to statefully manage things declaratively
01:09 jfindlay I'm not finding any concise translations with a ddg search, but plenty of user stories though
01:09 SeaPhor well, with the link you provided, I was able to tell that I will like Salt much better- however, the bulk of what we use puppet for is to manage/maintain config files, like sshd_config, pam, sudoers, hosts, ldap, etc... and to maintain the root passwords for each of our 3 environments (sandbox, dev, and production)
01:09 flowstate joined #salt
01:10 Garyx joined #salt
01:11 jfindlay from my naive perspective, that just sounds like a handfull of file.managed states
01:12 jfindlay s/full/ful/
01:13 SeaPhor well, if ldap requires other packages, like pam_nss_ldap, it ensures that they get installed from the repos <<== for example
01:13 Knuta that's still pretty basic stuff. You basically need pkg.installed, cmd.wait and file.managed
01:13 edrocks joined #salt
01:14 Knuta maybe user.present for the passwords.
01:14 SeaPhor I can spin up a brand new VM, with nothing configured for our environment, run puppet one time and BOOM, all set up and integrated into our environment
01:14 brianfeister joined #salt
01:14 Garyx joined #salt
01:15 Knuta that's the whole point of provisioning systems
01:16 meekrab joined #salt
01:16 SeaPhor well, for passwords, it more cryptic, using heira, and keeps it out of a "plain-text" format
01:16 iceyao joined #salt
01:17 SeaPhor and -- I am keeping it very basic here, and I can see the potential that Salt could provide for much more
01:17 racooper you can do all that with salt too.  I do similar, though not the passwords yet, and I haven't fully built out my deployment part but I'm working on it.
01:17 gladiatr SeaPhor: not to steamroll you with tons of information, but depending on your python-fu, it might not hurt to get familiar with the articles under https://docs.saltstack.com/en/latest/topics/development/index.html.
01:17 racooper every new machine I built - every new configuration - I put into Salt before I even get the OS on the VM.
01:18 renaissancedev joined #salt
01:18 nZac joined #salt
01:20 gladiatr SeaPhor: getting the hang of what the various types of modules are, their intended use and where they can be used (by You) can really help tie the proverbial room together.
01:21 SeaPhor gladiatr, TY, will do, racooper I do understand- please do not confuse my mentions- I am moving to Salt for 3 reasons-- 1. SUSE-Manager has it Built-In, and we pay for that, 2. we dont have support for puppet that we will have with Salt, 3. After reviewing the link jfindlay provided I see the better potential for it's use
01:22 racooper SuSE pretty much sucks in every way imaginable. I am dealing with the aftermath of an SMT deployment that constantly breaks, and slowly moving 160 SuSE servers to CentOS.
01:22 SeaPhor lol, I remember my first beer :P
01:22 racooper well...to be fair, the one thing SuSE has going for it...is that it's not Ubuntu.
01:23 flowstate joined #salt
01:23 gladiatr racooper: /snort
01:23 gladiatr racooper: none of them are FreeBSD :D
01:23 SeaPhor SMT, just like HA, was not supported- it was a 3rd party institution that SUSE allowed
01:24 iceyao joined #salt
01:24 Garyx joined #salt
01:25 SeaPhor SUSE-Manager mages SUSE (SLES), RHEL, OpenSUSE, Fedora, CentOS, and debian (if anyone wanted to...)
01:25 SeaPhor *^Manages
01:27 SeaPhor and, It has Salt incorporated into its API and WebUI
01:27 flowstat_ joined #salt
01:27 linjan__ joined #salt
01:28 SeaPhor so- I can manage all my RHEL and SLES repos, security patches, etc, and now all my configs and deployments using Salt,,, Its gonna be SCHWEET!
01:29 bastiandg joined #salt
01:31 SeaPhor in our current setup, I have hand-written over 68 modules that are in use in our infrastructure in puppet, and it has been a struggle, but, I did it and now I must re-do for Salt, and thats ok- a day without learning something new is a day wasted...
01:32 hasues joined #salt
01:32 hasues left #salt
01:32 Garyx joined #salt
01:35 SeaPhor lol, whenever someone bashes one distro over another, I usually challenge them to a LFS contest, to see who really understands what they're pre-judging... but, I'm getting too old for that now, and want to spend my time learning, not compiling :P
01:36 SeaPhor ^^ (debian -based distros not included... bash away :P )
01:37 SeaPhor j/k use what makes you feel free, thats what its all about
01:39 jfindlay I run gentoo on my private systems, but I guess that comes with it's own category of dismissals :-)
01:54 SeaPhor nah, I like the idea of Gentoo, I just personally dont have the time for it anymore, I just want a solid, stable, easily-upgrade-able OS, and for me thats OpenSUSE for personal, and SLES for professional, although I also manage RHEL servers as well
01:57 SeaPhor as a side-note, its GREAT to see that SUSE/SLES and RedHat/RHEL are working together and bringing a more consistent structure to Linux
01:57 Garyx joined #salt
01:57 jfindlay I like suse's new rolling release architecture
01:58 catpigger joined #salt
01:58 SeaPhor its not really 'new' but, agreed
01:59 jfindlay many engineers at saltstack use arch, but I can't divest myself from a certain amount of DIY attitude :)
01:59 SeaPhor it seems a bit better than back-porting everything all the time
02:00 jfindlay that's true
02:00 Garyx joined #salt
02:01 SeaPhor check out susestudio when you get the chance...
02:02 SeaPhor https://susestudio.com/
02:02 jfindlay yeah, I've been meaning to for a while
02:08 SeaPhor this may seem like a dumb question, but, ... in puppet, the puppet-master can also be it's own client, meaning it can use itself as it's master- is Salt similar?
02:09 jfindlay yes, you can run a minion on the same system as a master
02:10 SeaPhor I assumed so, just wanted to confirm..
02:11 Garyx joined #salt
02:14 Garyx joined #salt
02:18 mowntan joined #salt
02:18 Garyx joined #salt
02:21 favadi joined #salt
02:25 k_sze[work] joined #salt
02:26 flowstate joined #salt
02:32 PeterO joined #salt
02:33 zmalone joined #salt
02:35 brianfeister joined #salt
02:37 ramteid joined #salt
02:39 ninjada joined #salt
02:42 josuebrunel joined #salt
02:44 cyborg-one joined #salt
02:46 auzty joined #salt
02:47 PeterO joined #salt
02:49 ninjada_ joined #salt
02:53 Garyx joined #salt
02:56 Garyx joined #salt
02:59 meekrab joined #salt
03:10 lws joined #salt
03:10 willisbueller joined #salt
03:13 willisbueller Hey all, we're going to be building tools to modify salt states with a gitfs backend. Just wondering if anyone has any suggestions about avenues to consider that might be able to leverage salt code. A use-case might be: Create a new package to install into selected targets, be able to set versions of the package for diff environments. Right now we're looking at doing yaml processing and git manipulation through python libs.
03:13 willisbueller Before I go down that avenue though I'd thought I'd check in if there is any salt code/infrastructure I can leverage firs
03:13 willisbueller t
03:14 ajw0100 joined #salt
03:15 iceyao_ joined #salt
03:16 edrocks joined #salt
03:17 jfindlay have you looked at spm?
03:18 jfindlay https://docs.saltstack.com/en/latest/topics/spm/index.html
03:20 evle joined #salt
03:23 jerredbell joined #salt
03:27 flowstate joined #salt
03:29 Garyx joined #salt
03:32 Garyx joined #salt
03:34 mosen I'm not totally up to date, checking out spm :) whats the advantage over gitfs roots? locking versions down?
03:34 willisbueller hadn't seen spm yet. Checking it out now. Thanks for the suggestion.
03:35 kshlm joined #salt
03:35 ninjada joined #salt
03:36 Garyx joined #salt
03:37 willisbueller it looks like it will clean things up quite a bit, and only leave some programmatic git sls manipulation. I wonder if there's any salt code that allows me to look at the state trees, and figure out which sls files contain the entries that specify which package is being installed on a server
03:41 jfindlay mosen: it allows you to package up a salt formula (extension modules, sls, file artifacts) and formally treat the whole thing as a programmatic unit, or a package
03:42 mosen jfindlay: im guessing there will be some kind of canonical repo like the puppet forge :)
03:42 capricorn_1 joined #salt
03:42 jfindlay willisbueller: I'm not entirely understanding your requirements, but SPM is still new and we're still figuring some things out
03:43 jfindlay mosen: yes, I would love to have something like that
03:43 jfindlay https://github.com/saltstack/salt/issues/32253
03:43 saltstackbot [#32253]title: Create a central repository for SPM | Create a central repository for SPM to make it actually useful....
03:43 jfindlay hopefully that would make using salt formulas easier
03:44 Skwirelz joined #salt
03:44 mosen i think gitfs is pretty easy but theres some pitfalls :)
03:44 jfindlay well if all you have is a bunch of yaml files, SPM could be overkill
03:54 beardedeagle joined #salt
03:57 spuder_ joined #salt
04:05 sagerdearia joined #salt
04:05 n8n joined #salt
04:07 Garyx joined #salt
04:10 Garyx joined #salt
04:15 Garyx joined #salt
04:18 Garyx joined #salt
04:21 zmalone joined #salt
04:22 Garyx joined #salt
04:25 zmalone joined #salt
04:27 flowstate joined #salt
04:30 law hey AndreasLutro, you around?
04:33 Garyx joined #salt
04:43 ageorgop joined #salt
04:52 zmalone joined #salt
04:55 n8n joined #salt
04:56 beardedeagle joined #salt
04:59 meekrab joined #salt
05:07 sauvin joined #salt
05:17 aqua^c joined #salt
05:20 edrocks joined #salt
05:27 flowstate joined #salt
05:27 favadi joined #salt
05:49 aqua^c joined #salt
06:05 Zhen joined #salt
06:13 slav0nic joined #salt
06:14 Rumbles joined #salt
06:19 brianfeister joined #salt
06:25 flowstate joined #salt
06:29 Eureka703 joined #salt
06:36 keimlink joined #salt
06:38 dmaiocchi joined #salt
06:41 ivanjaros joined #salt
06:47 ajspa joined #salt
06:51 iceyao joined #salt
06:53 KermitTheFragger joined #salt
07:00 iceyao_ joined #salt
07:08 toanju joined #salt
07:08 kshlm joined #salt
07:12 dgutu joined #salt
07:12 impi joined #salt
07:17 josuebrunel joined #salt
07:21 ajw0100 joined #salt
07:23 edrocks joined #salt
07:25 ninjada_ joined #salt
07:25 flowstate joined #salt
07:31 linjan__ joined #salt
07:38 ninjada joined #salt
07:39 JasonHan joined #salt
07:41 JohnnyRun joined #salt
07:54 lero joined #salt
08:03 manji joined #salt
08:05 josuebrunel joined #salt
08:05 rrei joined #salt
08:08 brianfeister joined #salt
08:09 Rumbles joined #salt
08:26 flowstate joined #salt
08:28 GreatSnoopy joined #salt
08:33 ronnix joined #salt
08:39 s_kunk joined #salt
08:41 cswang joined #salt
08:43 renaissancedev joined #salt
08:44 ggoZ joined #salt
08:48 s_kunk joined #salt
08:48 s_kunk joined #salt
08:52 s_kunk joined #salt
08:52 s_kunk joined #salt
08:52 Garyx joined #salt
08:53 pavelic joined #salt
08:53 s_kunk_ joined #salt
08:54 s_kunk joined #salt
08:55 pavelic Hello folks, quick question, which PPA has 2015.8.8 for ubuntu 14.04? i'm using this one ppa:saltstack/salt , but that seems to have only 2015.5.3..
08:58 hemebond pavelic: https://repo.saltstack.com/#ubuntu
08:58 babilen http://repo.saltstack.com/#ubuntu
08:59 pavelic hemebond, babilen tyvm :)
08:59 pavelic y'know, if it wasnt linked at the top of the page in the official docs too -.-
08:59 * pavelic needs to rtfm better...
09:05 cswang joined #salt
09:18 garphy joined #salt
09:20 msn joined #salt
09:20 msn is there some specific editor for sls files, for example puppet has a whole eclipse module for checking syntax and trees.
09:23 babilen There are emacs and vim modes -- https://github.com/saltstack/salt-vim + https://github.com/deybhayden/salt-mode (for example)
09:23 hemebond I just use Sublime Text 3.
09:25 flowstate joined #salt
09:26 edrocks joined #salt
09:33 iceyao joined #salt
09:36 dmaiocchi joined #salt
09:37 msn that's just convinience anyway
09:38 msn babilen: is it possible to use grains in sls for example I have mysql master and slave and both have different configs, I want to put files in them based on what the grains['id'] is for each, would that be possible? current when i try it just inserts grains['id'] instead of the value itself
09:39 flebel joined #salt
09:40 babilen msn: The way to do this would be to generate the my.cnf from pillar data and to target different data to both minions. For mysql master/slave setups I typically simply use the same pillar, but make sure that server id is different
09:40 rrei hey guys
09:41 rrei can anyone point me to a good place to look for configuration of mysql within salt?
09:41 babilen msn: This can be easily done with the mysql-formula. If I remember correctly, you wanted to do this "The hard way™" and implement everything yourself, didn't you?
09:41 hemebond rrei: There's a formula for it.
09:41 josuebrunel joined #salt
09:41 babilen rrei: I use https://github.com/saltstack-formulas/mysql-formula/
09:42 msn babilen: it was taking me longer to figure out the formula then to do it myself
09:42 rrei babilen: :D yes, I would like to do everything on my own, to get a better overall understanding of salt
09:43 babilen msn: What was taking you so long? The formula should be pretty straightforward to use (include, define pillar data, target suitable states, done)
09:43 rrei but I'll take a close look at the formula and try to understand how they solve the "bootstrap" problem of setting up the root user's password
09:43 babilen rrei: It is being set via debconf on Debian (for example)
09:44 msn babilen: the point was not to use it, the point was to be able to modify it quickly when needed using it ofcourse is easier
09:44 rrei babilen: see, that's the kind of detail that I'd like to learn more about
09:45 babilen rrei: https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/server.sls#L22
09:45 rrei cool, thanks a lot everyone! :)
09:45 babilen msn: You could, naturally, simply include different file.manages sources: statements for your master and slave, based on the host ID.
09:46 babilen msn: My recommendation would be to still generate it from pillar data and to target different pillars to the master and slave
09:46 rrei debconf was something I was not even aware of until an hour ago... :( I still have a long way to go
09:46 damona joined #salt
09:47 babilen rrei: It is the db in which packages save all the answers you provide when they are being installed (or rather: configured)
09:48 rrei great :)
09:48 babilen By pre-seeding it the root password is already available when the package is being installed which serves two functions: 1. No need to ask the user for it 2. The package configuration can continue and set the password you desire, rather than the default for "no answer"
09:48 rrei so I suppose from the name this is only supported on debian-based systems, right?
09:48 babilen Yes, this is Debian specific
09:48 babilen (and derivatives)
09:48 babilen Which distribution are you interested in?
09:49 rrei alright, I guess that'll do for me since I'm mainly targeting ubuntu at the moment
09:49 babilen aye
09:49 DanyC joined #salt
09:50 rrei my first (naive) attempt was to install the mysql-server package without any debconf (remember I wasn't even aware such a thing existed), and then configure the root password using mysql_user state module
09:50 rrei but as you might have guessed, it didn't work
09:50 rrei :D
09:50 babilen Yeah, that requires root access already :)
09:51 rrei so I wanted to understand exactly what's going on here. I have mysql's connection settings in the pillar
09:51 babilen I am not really sure how this is done on RH derivatives or Arch
09:52 DanyC Hi all, have a question: anyone knows if salt-api (based on rest-cherrypy OR tornado) can interact with salt-cloud ?
09:52 rrei from glancing over the formula it seems they do this through shell commands
09:52 rrei old-style
09:52 rrei :D
09:52 babilen Right
09:53 rrei alright, this conversation was very instructive :) now it's time I really look into the formula
09:53 babilen enjoy ;)
09:53 rrei i'll probably come back later with more noob questions :D
09:53 rrei thanks for the help!
09:56 brianfeister joined #salt
09:57 dmaiocchi joined #salt
10:06 ninjada joined #salt
10:14 jhauser joined #salt
10:18 MadHatter42 joined #salt
10:23 akhter joined #salt
10:25 gmoro joined #salt
10:26 flowstate joined #salt
10:28 edrocks joined #salt
10:30 fgimian joined #salt
10:33 ronnix_ joined #salt
10:36 impi joined #salt
10:47 OliverX2 joined #salt
10:53 Rumbles joined #salt
11:04 linjan__ joined #salt
11:05 amcorreia joined #salt
11:25 flowstate joined #salt
11:31 Rumbles joined #salt
11:36 yomilk joined #salt
11:37 kshlm joined #salt
11:39 msn trying to start zabbix-agent via salt. minion says its running after state.highstate but its not where can i start to look for issues
11:39 AndreasLutro msn: that probably means the service was started but then shut down immediately. check zabbix's logs
11:39 manji msn, start from systemd
11:41 msn manji: systemd start works
11:41 josuebrunel joined #salt
11:42 msn nvm fails there command line starts though
11:42 manji msn, what does systemd status zabbix-agent saus ?
11:42 manji says*
11:42 msn active exited
11:43 manji hm
11:43 msn works now
11:43 manji I see
11:43 msn had to doa  restart with systemd
11:43 msn then stopped it salt wa able to start i after
11:43 manji but that is not proper
11:44 manji it has to work from the first go
11:44 manji anyway
11:44 manji I blame systemd no matter what
11:44 hemebond Is your state setup to use systemd to manage the service?
11:45 manji hemebond, the service module picks this from grain info
11:45 brianfeister joined #salt
11:46 hemebond Oh really? Someone was in here a few days ago having a similar issue and had to explicitly state the provider.
11:47 manji init:
11:47 manji systemd
11:47 manji systemd:
11:47 manji ----------
11:47 manji features:
11:47 manji +PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR
11:47 manji version:
11:47 manji 215
11:47 manji let me check the module itself
11:49 gmoro joined #salt
11:50 renaissancedev joined #salt
11:51 manji hemebond, if I am reading correctly, the detection is via os type and version
11:51 manji I was wrong
11:51 hemebond That's a frail check right there.
11:52 hemebond What OS was this>
11:52 manji msn 's?
11:54 hemebond Yeah
11:55 manji ask him/her :p
11:59 josuebrunel joined #salt
12:03 TooLmaN joined #salt
12:05 babilen Is there a way to delete a key (and value) from a dictionary in jinja?
12:06 babilen This seems to be unnecessarily complex
12:06 babilen Or rather: impossible
12:09 msn hemebond: debian 8 jessie
12:09 hemebond Ah okay.
12:11 blarghmatey joined #salt
12:11 josuebrunel joined #salt
12:19 fredvd joined #salt
12:21 ninjada joined #salt
12:24 edrocks joined #salt
12:24 iceyao joined #salt
12:25 rburkholder joined #salt
12:25 ht joined #salt
12:25 yomilk joined #salt
12:26 edrocks joined #salt
12:27 cro_ joined #salt
12:28 west575 joined #salt
12:31 bluenemo joined #salt
12:32 ssplatt joined #salt
12:35 josue joined #salt
12:38 DammitJim joined #salt
12:42 gh34 joined #salt
12:47 losh joined #salt
12:48 flowstate joined #salt
12:48 racooper joined #salt
12:52 IndyRob joined #salt
12:54 jmackie joined #salt
12:54 jmackie Can you target nodegroups via the salt-api? If so, what is the tgt syntax? Any help would be appreciated.
12:58 babilen Normally you just pass expr_from
13:00 meekrab joined #salt
13:02 babilen For nodegroups that would be expr_from='nodegroup' I guess .. or you use a compound matcher right away
13:03 justaname joined #salt
13:03 justaname salt '*' cp.list_master returns no files - but I have a cache of the svnfs_remote - any ideas?
13:04 ronnix joined #salt
13:04 jmackie Thanks babilen, I'll look into that.
13:05 newjersey joined #salt
13:05 squishypebble joined #salt
13:05 the_lalelu joined #salt
13:05 hal58th joined #salt
13:07 ferbla joined #salt
13:09 mage_ hello, I want to execute a state only if a file exists .. is this the way of doing it https://gist.github.com/silenius/5113ceb119736d66cd0be151d8e3c247 ?
13:10 mage_ or should I use - onlyif instead of prereq ?
13:11 giany joined #salt
13:11 zmalone joined #salt
13:12 giany hi, is there a way I can trigger from master a service (e.g nginx) check on a minion?
13:12 giany and if that service is down restart it
13:12 garphy joined #salt
13:14 gtmanfred you would just do a service.running state
13:14 rem5 joined #salt
13:14 gtmanfred otherwise, do a `salt \* service.status nginx` and manually do `salt \* service.start nginx`
13:15 gtmanfred https://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html#salt.states.service.running
13:15 gtmanfred giany: ^^
13:16 marie1972 joined #salt
13:16 giany thx
13:16 ravenx joined #salt
13:16 ravenx i have in my state.sls one state that i want to run only if i am in a certain os
13:16 ravenx how can i go about doing that?
13:18 gtmanfred wrap it in jinja
13:18 gtmanfred and do an if statement that checks the os
13:18 hemebond joined #salt
13:19 IndyRob ravenx:   {% if grains['os'] == 'XXX' %}
13:19 gtmanfred https://docs.saltstack.com/en/getstarted/config/jinja.html
13:20 IndyRob I need to browse the online documentation more, it's getting so much nicer these days
13:20 nZac joined #salt
13:23 justaname salt '*' cp.list_master returns no files - but I have a cache of the svnfs_remote - any ideas?
13:23 gtmanfred IndyRob: that is part of the get started tutorial stuff
13:23 gtmanfred there has been a lot of work put into that stuff
13:24 gtmanfred including a clickable guide
13:24 gtmanfred IndyRob: https://docs.saltstack.com/en/getstarted/
13:24 IndyRob yeah, I was just digging through that.  Looks great.
13:24 gtmanfred the docs people have been doing a lot of work on it :)
13:25 ravenx IndyRob: thanks
13:25 manji gtmanfred, as in, making them make actual sense ?
13:25 IndyRob lol
13:25 manji :D
13:26 subsignal joined #salt
13:26 gtmanfred pretty ure they make sense for the most part... anytime you find something that doesn't please update and put in a PR to fix them to help the next person that comes along
13:28 cpowell joined #salt
13:29 manji gtmanfred, I bumped into https://docs.saltstack.com/en/latest/ref/cli/salt-api.html
13:29 manji today
13:29 majikman joined #salt
13:30 subsignal joined #salt
13:30 manji as I wanted to learn about salt-api
13:30 gtmanfred https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html
13:30 gtmanfred so, that just is a man page for the executable
13:30 subsignal joined #salt
13:30 gtmanfred ref/cli
13:31 manji yes I found tha as well
13:31 gtmanfred just telling you how to start the daemon, not how to use the api
13:31 gtmanfred cause there are 3 different ways to run the api https://docs.saltstack.com/en/latest/ref/netapi/all/index.html
13:32 mapu joined #salt
13:32 manji I read it, what would help for instance, is a link or something to point to netapi
13:32 subsigna_ joined #salt
13:32 manji saltstack docs from 2 years ago gave me a really hard time
13:32 manji if you are saying it is getting better, it is
13:33 gtmanfred we do need better linking between documentation
13:33 ronnix joined #salt
13:34 brianfeister joined #salt
13:34 gtmanfred the problem with that one I think is it is turned into the man page for the salt-api command
13:35 gtmanfred and so putting an extra link into the documentation, that would also be in the man page is a little... meh
13:36 manji since this is probably a problem in other man-page like pages
13:36 manji there must be some acceptable way :)
13:39 Rumbles joined #salt
13:40 Adam__ joined #salt
13:40 akhter joined #salt
13:40 BitBandit joined #salt
13:47 snc joined #salt
13:47 akhter joined #salt
13:48 lws joined #salt
13:49 zmalone joined #salt
13:52 justaname Hello, salt '*' cp.list_master returns no files - but I have a cache of the svnfs_remote - any ideas?
13:53 akhter joined #salt
13:56 akhter joined #salt
13:58 Sketch joined #salt
13:58 josuebrunel joined #salt
13:58 jerredbell joined #salt
14:00 majikman joined #salt
14:02 _JZ_ joined #salt
14:04 tuxx_ joined #salt
14:10 flowstate anyone here using the boto orchestration states?
14:10 disbound joined #salt
14:12 hasues joined #salt
14:12 hasues left #salt
14:12 autofsckk joined #salt
14:14 gtmanfred Ryan_Lane probably is
14:15 AdamSewell joined #salt
14:16 ravenx joined #salt
14:16 tharkun joined #salt
14:16 ravenx for having logic in the state.sls file using jinja:  https://stackoverflow.com/questions/31940485/saltstack-how-to-use-jinja-logic-based-on-saltenv
14:16 ravenx is it only for controlling what the variable would be
14:16 ravenx or can i make it so that "run this state" if it is this env, else, don't run this state at all
14:16 ravenx i dont just want to enclose a variable, i want to enclose a whole state.
14:17 gtmanfred ravenx: have you read through how environments work in saltstack? https://docs.saltstack.com/en/latest/ref/states/top.html#environments
14:18 ravenx i haven't.
14:18 ravenx but environments take care of that?
14:18 gtmanfred yeah
14:18 ravenx but that means i will have (N environments) copy of my state file?
14:19 gtmanfred yes
14:19 ravenx hmm....
14:19 ravenx okay i'll check it out
14:19 ravenx as for now though
14:19 ravenx do you know if it is possible to enclose a jinja logic like taht?
14:19 ivanjaros joined #salt
14:19 gtmanfred saltenv is the multiple environments anyway
14:19 gtmanfred yeah
14:19 gtmanfred just wrap the whole state with an iff statement
14:19 ravenx let me show you what i did:
14:20 gtmanfred {%- if saltenv == 'base' %}
14:20 gtmanfred ....
14:20 gtmanfred {%- endif %}
14:20 gtmanfred and put the state in between ...
14:20 ravenx https://paste.debian.net/441173/
14:20 ravenx i'm trying to do it with host/id
14:21 ravenx we have two dev servers called 'one' and 'two
14:21 ravenx this command keeps being run.
14:21 gtmanfred so, you can't do it like that
14:21 gtmanfred but
14:21 gtmanfred i think you can do
14:21 Adam__ joined #salt
14:21 gtmanfred {%- if grains['id'] in ['one', 'two'] %}
14:21 ravenx ah i see.
14:21 ravenx lemme give that a shot.
14:22 ravenx weird is that, i can do that in my pillar files ;?
14:22 AdamSewell joined #salt
14:22 ravenx but hang on, i'm trying to do it so that it's NOT IN ['one', 'two']
14:22 ravenx i can just use "not in"?
14:22 gtmanfred yes
14:23 ravenx how come that logic that i showed you in my paste seemed to work on pillars but not in /srv/salt/asdf/init.sls files?
14:23 ravenx is there a reason or somethign?
14:23 gtmanfred so, the thing you have in there should always evaluate as true
14:24 gtmanfred because after the or, it just checks that 'two' is not an empty string, and then will be true
14:24 ravenx aaah i see
14:24 ravenx that means i need to change my pillars too then
14:26 majikman joined #salt
14:26 ronnix_ joined #salt
14:29 bbendy_ if you are using grains.setval how do you match inside SLS? I tried if grains['roles'] == "apache" but tha's not working, no way to do that from a if statement?
14:29 kojiro joined #salt
14:30 kojiro joined #salt
14:30 slav0nic joined #salt
14:30 gtmanfred that should work
14:30 gtmanfred if you run salt grains.setval roles apache
14:31 gtmanfred check grains.get roles
14:31 gtmanfred and then check the /etc/salt/grains on the minion
14:31 Adam__ joined #salt
14:31 bbendy_ yeah both are correct, hmm
14:33 IndyRob joined #salt
14:33 gtmanfred is it a list or is it a string
14:33 gtmanfred roles: apache
14:33 gtmanfred or
14:33 gtmanfred roles:
14:33 gtmanfred - apache
14:33 gtmanfred ?
14:34 bbendy_ well, i was a moron, i had a error in my SLS..lol but still not matching, this is a list right now
14:34 bbendy_ but i used grains.setval roles [bla,bla2,bla3]
14:35 majikman joined #salt
14:36 gtmanfred hehe
14:38 akhter_1 joined #salt
14:40 ronnix joined #salt
14:42 PeterO_ joined #salt
14:42 Rumbles My boss has asked me to install a file that is found on github on a number of machines. I was wondering, can I use git as a source for a file.managed?
14:43 gtmanfred yes
14:43 gtmanfred gitfs
14:43 gtmanfred then you reference it with salt://
14:43 gtmanfred Rumbles: https://docs.saltstack.com/en/latest/ref/file_server/all/salt.fileserver.gitfs.html
14:43 gtmanfred https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
14:43 Rumbles thanks
14:44 gtmanfred most people use it for storing their salt states and pillars, but you can use it just for storage of extra fiels if you wanted
14:48 shiriru joined #salt
14:48 justaname Hello, salt '*' cp.list_master returns no files - but I have a cache of the svnfs_remote - any ideas?
14:48 nidr0x joined #salt
14:48 gtmanfred do you still have the svnfs_remote configured?
14:49 justaname yes
14:49 gtmanfred then i got no clue
14:51 babilen justaname: Stop the master and run "salt-master -ldebug" -- check for messages pertaining to SVN.
14:52 * babilen wonders why anybody would still use SVN
14:52 gtmanfred because they love CVS?
14:52 babilen Is there a darcsfs_remote or cvsfs_remote ? ;)
14:52 gtmanfred don't think so
14:52 gtmanfred darcs would be fun heh, install the 786Mb compiler to get a vcs system
14:53 babilen Judging from the odd mention of svnfs in here there are at least some people who use it (if successfully I can't really say)
14:53 justaname babilen: no error messages from SVN in debug output
14:54 justaname the svnfs_remote is configured, and checkouts the configured root DIR to /var/cache/salt/master/svnfs/*
14:55 justaname but highstate returns "no top file...."  and cp.list_master returns 'minionid:   '
14:55 justaname do I need to mount the svnfs cache dir to the salt fileserver some how?
14:56 Brew joined #salt
14:57 mohae joined #salt
14:58 Brew joined #salt
14:58 IndyRob joined #salt
14:59 babilen I have never used svnfs -- could you paste your configuration and a, sanitised, excerpt from the salt-master output to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
14:59 babilen Maybe we spot something obvious.
14:59 babilen Also some indication as to why you think that there should be content would be helpful
15:00 flowstat_ joined #salt
15:01 beardedeagle joined #salt
15:04 manji joined #salt
15:07 manji joined #salt
15:09 keimlink joined #salt
15:10 justaname babilen: thank you - here is my gist: https://gist.github.com/anonymous/16efd978493455489fd716825152dc77
15:10 west575 joined #salt
15:11 jnials joined #salt
15:11 justaname my understanding of the cp.list_master command is that it returns the files that saltmaster is serving up - I've configured my salt master to server files from svn, so I would expect cp.list_master to return those svn files
15:12 beardedeagle justaname: why do you have mixed spacing in your config? is that just in the gist?
15:12 akhter joined #salt
15:13 noraatepernos joined #salt
15:14 rihannon joined #salt
15:15 justaname which lines?
15:15 beardedeagle https://gist.github.com/anonymous/16efd978493455489fd716825152dc77#file-gistfile1-txt-L1-L16
15:16 beardedeagle some have 1 space  before them and others 2
15:16 beardedeagle make them all 2
15:16 beardedeagle particularly your fileserver_backend and svnfs_remotes blocks
15:17 justaname the svnfs_remotes block because 'root' and 'mountpoint' should be nested under repo
15:18 beardedeagle right
15:18 beardedeagle but one of those lines is indented 1 space
15:18 beardedeagle the others 2
15:18 beardedeagle mixed indentation can sometimes cause issues
15:19 rihannon joined #salt
15:19 majikman joined #salt
15:19 bbendy_ gtmanfred, so its a list, not a string, why that if is not working
15:20 babilen beardedeagle: I'm sure that that is the actual issue
15:20 justaname per the documentation, one can nest under repo - https://docs.saltstack.com/en/latest/ref/configuration/master.html#std:conf_svnfs_remotes
15:21 beardedeagle You are not incorrect
15:21 beardedeagle that is not what I am saying
15:21 beardedeagle what I am saying is your indentation in the yaml should be uniform
15:21 beardedeagle either pick one space to indent with per nested block or pick 2
15:21 beardedeagle but not both
15:22 beardedeagle here, let me gist it for you
15:22 twork_ file state backups: i find backup_mode: minion documented a few places but i haven't been able to find any other modes (like, say, master) or how they behave if they exist. point me in the right direction?
15:22 babilen Also the correlation between "svnfs_mountpoint" and "svnfs_root" is not entirely clear
15:23 brianfeister joined #salt
15:23 flowstate joined #salt
15:23 babilen I would, for some reason, have expected that svnfs_root starts with /srv/salt (as per mountoint)
15:23 beardedeagle justaname: https://gist.github.com/beardedeagle/f5ab9ca47282c9bbf0d0604f38028576
15:24 justaname I added 'svnfs_mountpoint' thinking that was the problem, but it didn't help, top.sls still can't be found
15:24 Adam__ joined #salt
15:25 spuder joined #salt
15:25 justaname beardedeagle: so lines 10,11 should have one more space, is what you're saying?
15:26 renaissancedev joined #salt
15:26 beardedeagle yes, but also notice line 14 on down
15:26 justaname or, better yet, every indention should be 2x space
15:26 beardedeagle yes
15:26 beardedeagle exactly
15:26 Garyx joined #salt
15:26 ninjada joined #salt
15:26 justaname let me update my master config and see what I get.....
15:26 rihannon joined #salt
15:27 gtmanfred beardedeagle: if it is a list, you should check if the entry is in the list i think, instead of = list
15:27 gtmanfred bah
15:27 gtmanfred bbendy_: ^^
15:27 bbendy_ if 'bla' in grains['roles'] wa la
15:28 gtmanfred yeah
15:28 dfinn joined #salt
15:28 majikman joined #salt
15:30 justaname beardedeagle: same results, no top.sls found
15:30 bbendy_ yeah, i wasnt thinking :)
15:31 justaname I don't think the indention was the problem, because no error messages about it, and salt checked out from the svn repo to /var/cache/salt/master/svnfs/*  as expected
15:32 beardedeagle hrm...let me look into that backend, but just so we are clear you still want to do what you just did: https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#indentation
15:32 ageorgop joined #salt
15:33 justaname roger roger, thank you for the help
15:34 akhter joined #salt
15:36 mapu joined #salt
15:36 rocketnova joined #salt
15:40 akhter_1 joined #salt
15:43 quasiben joined #salt
15:45 favadi joined #salt
15:51 akhter joined #salt
15:53 rocketnova joined #salt
15:55 Aleks3Y joined #salt
16:00 akhter joined #salt
16:00 kojiro joined #salt
16:01 bltmiller joined #salt
16:02 alvinstarr joined #salt
16:02 armyriad joined #salt
16:03 beardedeagle justaname: not really seeing what you are doing wrong, if anything, from the configuration side with that. @babilen: any other ideas on this one?
16:03 flowstate joined #salt
16:04 babilen beardedeagle: Not really .. it looks quite fine
16:06 mpanetta joined #salt
16:06 renaissancedev joined #salt
16:07 adelcast joined #salt
16:07 justaname so where do we go from here?
16:07 akhter joined #salt
16:11 babilen I have never used svnfs before. I would probably simplify the setup as much as possible (no per-branch configuration, just defaults, ...) and take it from there.
16:11 babilen I'd also like to see the content of that repository and the master log when running "salt-run fileserver.update"
16:11 kevinquinnyo joined #salt
16:12 kevinquinnyo If I need to invoke a reactor from another reactor, should i just fire an event from the first reactor, or is there another way to do it
16:12 justaname @babilen: salt-run fileserver.update returned true
16:14 babilen (the "salt-master -ldebug" output during that)
16:14 babilen kevinquinnyo: No, that's exactly it
16:15 babilen kevinquinnyo: Think of the events as "edges" in a automaton
16:16 kevinquinnyo i've never heard that term before
16:17 babilen kevinquinnyo: https://en.wikipedia.org/wiki/Finite-state_machine would be one kind
16:17 saltstackbot [WIKIPEDIA] Finite-state machine | "A finite-state machine (FSM) or finite-state automaton (FSA, plural: automata), or simply a state machine, is a mathematical model of computation used to design both computer programs and sequential logic circuits. It is conceived as an abstract machine that can be in one of a finite number of states..."
16:17 babilen But if you haven't heard of that thinking of it certainly won't make things easier :)
16:17 justaname @babilen - debug output from fileserver.update https://gist.github.com/anonymous/19b89dbd41f6fdd2fba03f5b9a794c78
16:17 lws joined #salt
16:18 SpeeR joined #salt
16:18 babilen justaname: Okay, that looks good. I take it that cp.list_master still lists nothing?
16:19 justaname yes
16:19 babilen Did you remove all per-branch configuration from your configuration?
16:20 babilen Or rather: per-repo configuratoin
16:20 justaname you mean 'root' & 'mountpoint'?
16:20 babilen Yeah
16:20 babilen Everything that is not the repository
16:21 babilen It doesn't matter if things are in the right place, but I'd like to see some content in cp.list_master (even if imporperly namespaced)
16:21 babilen And just to ask the obvious: You actually *do* have content in your repository, don't you?
16:21 babilen Which version of salt is this?
16:22 justaname yes
16:22 babilen Note that you have to restart the master every time you tinker with those options
16:22 justaname 2015.8.8
16:23 justaname fileserver.update returns: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
16:23 babilen So, you removed the per-repo settings, restarted the master, executed "salt-run fileserver.updated" and "salt '*' cp.list_master" still doesn't show anything?
16:23 babilen Check your CWD
16:23 babilen s/updated/update/g
16:24 justaname ah, duh
16:24 justaname fileserver.updated returns 'true' and cp.list_master returns null - same as before
16:25 babilen Okay, could you add a "foo.sls" to /srv/salt/ and re-run "salt-run fileserver.update" ?
16:25 justaname there is nothing in /srv/salt
16:25 babilen Yes, which is why you put something these now
16:26 babilen *there
16:26 babilen (just make up some content, it doesn't matter - a simple: vim: pkg.installed would suffice)
16:27 justaname fileserver.update returns true
16:27 babilen Is foo listed in cp.list_master now?
16:27 justaname yes
16:28 babilen Okay, good.. Please keep it there. You mentioned a SVN related directory in /var/cache/salt earlier, didn't you?
16:28 justaname yes
16:28 justaname its the cache of the svn repo
16:28 borgstrom joined #salt
16:29 babilen Do you have subversion and pysvn installed on the master?
16:29 SpeeR will an error in the gitfs config portion cause all the minions to constantly reauth?
16:29 flowstate joined #salt
16:29 SpeeR I have this in the error logs along with all the minions constantly reauthing
16:29 SpeeR Unable to checkout branch master: 'git checkout origin/master' returned exit status 1: error: pathspec 'origin/master' did not match any file(s) known to git.
16:30 akhter joined #salt
16:30 justaname @babilen: pysvn.x86_64 & subversion.x86_64 & subversion-libs.x86_64
16:30 babilen justaname: Could you run "python" and then "import pysvn" -- Does that work?
16:31 justaname yes >>> import pysvn >>>
16:32 writtenoff joined #salt
16:33 babilen justaname: Good. Could you stop the master, recursively remove the SVN related bits in /var/cache/salt and then try again?
16:33 babilen justaname: It would also be much appreciated if you could show output such as that of the "tree" command in your SVN repository
16:34 hoonetorg joined #salt
16:36 justaname babilen:  here is an error when starting master after rm -rf /var/cache/salt/master/svnfs/*  https://gist.github.com/anonymous/cfc3a49301868e67391701155fe49b70
16:37 justaname I've see that behavior before, if I try to start the master a second time, it will start as expected
16:38 IndyRob joined #salt
16:38 armyriad joined #salt
16:39 grobinson joined #salt
16:39 justaname one thing I've noticed is that /var/cache/salt/master/svnfs/remote_map.txt is always empty - based on the error message in the above gist, I suspect that remote_map.txt is what maps the cache to the saltmaster fileserver, but thats just a hunch
16:39 grobinson Hello
16:39 grobinson I'm having a trouble understanding salt environments
16:40 babilen justaname: That is exactly right
16:40 babilen justaname: That looks like a genuine bug
16:40 grobinson I would like all environments to share the same states. Furthermore, all environments should inherit a base pillar, and then override with their custom dev, stage and production pillars
16:40 grobinson is this possible with Salt?
16:40 iggy grobinson: a lot of people don't use them
16:40 iggy (for reason)
16:40 grobinson iggy: for that reason?
16:41 iggy for various reaons
16:41 justaname babilen, can I manually input into remote_map.txt?
16:41 babilen justaname: Lets figure out what the content of that file should be, write it manually and see if that makes a difference
16:41 justaname I would have to see an example, of course
16:41 justaname yes, thanks
16:41 babilen Yeah, that is the tricky part now ;)
16:42 babilen It's some "HASH = URL"
16:42 edrocks joined #salt
16:43 babilen justaname: Do you have the repo URL?
16:43 justaname yes
16:43 justaname what would hash value be?
16:43 babilen What does "salt 'some_minion' config.get hash_type" return?
16:44 babilen md5 ?
16:44 amy_ joined #salt
16:45 justaname yes
16:45 justaname master is set to sha256
16:45 justaname but I've changed them both to the same thing with same results
16:45 AdamSewell joined #salt
16:45 armyriad joined #salt
16:46 babilen Changed what to what?
16:47 justaname sorry, hash_type: in master/minion config
16:47 akhter joined #salt
16:48 justaname default they are md5, but warning messages in debug say to change to sha256 - when I change them both to sha256, I still get the remote_map.txt write failure issue
16:48 armyriad joined #salt
16:48 babilen You will now compute the HASH with python as "hashlib.sha256(REPO_URL).hexdigest()"
16:49 kojiro How can I debug a state that's failing to compile? It says "Jinja variable 'dict object' has no attribute 'gitl'". There is a pillar named 'gitl' with (I think) appropriate contents, but I'm not sure if it's the state or the pillar that's wrong.
16:49 justaname so, just run that cmd from python prompt?
16:49 babilen Yeah
16:50 babilen kojiro: You have something like foo.gitl somewhere .. that isn't defined. Look at all references to "gitl" in that state and make sure that they are fine
16:50 amcorreia joined #salt
16:50 justaname returned File "<stdin>", line 1
16:51 justaname at svn://
16:51 babilen justaname: Let me try that locally ..
16:52 nZac joined #salt
16:52 justaname so I need to import pysvn first?
16:52 kojiro I have like `pillar['gitl']...`. Clearly it's not fine. Trying to figure out why gitl isn't a key in pillar
16:53 kojiro joined #salt
16:53 justaname importing pysvn didn't help
16:53 babilen justaname: Could you paste what you've done exactly? "hashlib.sha256('http://foo.bar.baz').hexdigest()" works perfectly fine here. Did you import hashlib?
16:54 justaname hashlib.sha256(svn://repo_url).hexdigest()
16:54 babilen Ah
16:54 babilen Make that 'svn://repo_url'
16:55 babilen I have a hunch as to what the bug might be, but lets try this first
16:55 justaname NameError: name 'hashlib' is not defined
16:55 babilen you have to "import hashlib" first
16:55 kevinquinnyo i have a real hard time troubleshooting reactors... Is there a trick to this?  I am watching salt-master -l debug and salt-run state.event pretty=True in another terminal.  I threw some intentional syntax error in the reactor/myreactor.sls just to see if it would error
16:56 justaname ah ok
16:56 kevinquinnyo but it doesnt log the errors anywhere i can tell, so i dont even know if it's able to fgind my reactor
16:56 kevinquinnyo i can see it catching the event, but nothing after that
16:57 Lionel_Debroux_ joined #salt
16:57 babilen justaname: Once you have that, you can edit remote_map.txt and add HASH = URL (obviously replace the values)
16:59 babilen justaname: Then start the master again and see what happens
17:00 babilen I think I have the bug, but I'd like to see how this behaves now
17:00 bltmiller joined #salt
17:00 ronnix joined #salt
17:01 AdamSewell joined #salt
17:01 justaname babilen, remote_map.txt gets overwritten
17:02 justaname let me del svnfs cache and try again
17:03 babilen justaname: Right, okay. Stop the master, edit /usr/lib/python2.7/site-packages/salt/fileserver/svnfs.py and comment "repos.append(rp_)" in there by prefixing it with # so it looks like "# repos.append(rp_)" -- This should be on line 193 (or somesuch) between "CLIENT.checkout(....)" and "new_remote = True"
17:04 justaname ok
17:04 babilen There aren't other occurences of that, so it shouldn't be too tricky to find
17:04 noraatepernos joined #salt
17:05 babilen Once you have done that, remove the svn fs cache again and run "salt-master -ldebug"
17:05 babilen That should result in it either working or a different error :)
17:06 kawa2014 joined #salt
17:06 akhter joined #salt
17:07 justaname so far no errors
17:07 justaname running cp.list...
17:07 babilen *drumroll*
17:08 justaname only lists foo.sls
17:08 babilen Damn .. does remote_map.txt look sensible now?
17:08 justaname yes
17:08 justaname wait...no
17:08 justaname I input the wrong hash value....standby....
17:09 Fiber^ joined #salt
17:11 justaname does hash value need to be in ' '?
17:11 racooper not sure what's going on here...using same jinja if/else syntax I use in other places, but this is failing.  gist has both sls and output error. https://gist.github.com/racooper/d88a3162d32793cbffcf9006e84de5ef
17:11 babilen You shouldn't have to edit that file at all
17:11 babilen justaname: Just remove it and let salt re-generate it
17:12 brianfeister joined #salt
17:12 babilen Ah .. you mean the "sha256" bit ?
17:12 babilen I'd just not set it
17:12 justaname no, the hash value in rempte_map.txt
17:12 babilen You shouldn't have to edit that manually at all .. just remove that file
17:13 justaname I thought we had to manually input it into remote_map
17:13 justaname then delete cache
17:13 babilen No .. it wasn't in there because of the bug
17:13 justaname oh ok...
17:13 babilen I was just curiuous if salt would work if we were to put in the correct value manually
17:14 AdamSewell joined #salt
17:15 justaname did this: stopped master, rm -rf /var/cache/salt/master/svnfs/*, restarted master
17:16 ageorgop joined #salt
17:16 justaname cp.list_master returns foo.sls  - and remote_map.txt contains cache DIR name  = repo url
17:16 justaname I guess I was expecting to see hash value (of repo url) = repo url in remote_map.txt
17:17 babilen yeah, so did i
17:17 babilen Is it working though?
17:17 justaname no, cp.list_master returns files from /srv/salt, not repo
17:18 justaname so why did we generate the hash in python?
17:18 keisetsu joined #salt
17:18 babilen Okay, there's something fishy .. This is the first time for me to look at the code as well
17:19 babilen Would you mind opening an issue on https://github.com/saltstack/salt/issues with the information we've gathered so far? In particular the error in https://gist.github.com/anonymous/cfc3a49301868e67391701155fe49b70 and the solution of removing "repos.append(rp_)"
17:19 justaname I think you're on the right track tho.  Thanks so much for your help!
17:19 ty2u joined #salt
17:19 linjan__ joined #salt
17:19 justaname sure
17:19 quasiben joined #salt
17:20 justaname anything else we can try now?
17:20 babilen justaname: We generated the hash, because the codebase has https://github.com/saltstack/salt/blob/2015.8/salt/fileserver/svnfs.py#L233 which references the hash generated in https://github.com/saltstack/salt/blob/2015.8/salt/fileserver/svnfs.py#L183
17:21 babilen justaname: My best advice would be to file a bug now with all the information we collected now. Feel free to ping me in there (@babilen) so that I can additional information.
17:22 babilen Just to make sure .. with that edit you no longer get "TypeError: string indices must be integers, not str" nor any other error when you start the master? What does "salt-master -ldebug" output now after removing the svn cache?
17:25 pipps joined #salt
17:25 pipps joined #salt
17:26 AdamSewell joined #salt
17:27 kawa2014 joined #salt
17:27 punkoivan joined #salt
17:27 lws_ joined #salt
17:27 keisetsu_ joined #salt
17:27 ninjada joined #salt
17:28 Rumbles joined #salt
17:29 justaname stopping the master and minion, rm -rf /var/cache/salt/master/svnfs/*  then restarting the master returns an error about missing 'branches' and 'tags'
17:29 justaname but no fatal errors
17:30 babilen Could you show me?
17:30 babilen Do you have "branches" and "tags" directories in your SVN repo?
17:31 aw110f joined #salt
17:31 justaname no
17:31 babilen Saltstack might require you to use branches/base/{top.sls,foo.sls,....}
17:31 justaname we don't use them
17:32 justaname well, yes we have them in the root of the repo
17:32 justaname but I don't have them in my feature branch
17:33 babilen But you *do* have "trunk" ?
17:33 justaname hold on, I do have them in my feature branch, I was drilling down too far... hold on
17:33 pipps joined #salt
17:33 babilen https://github.com/saltstack/salt/blob/2015.8/salt/fileserver/svnfs.py#L15
17:33 mapu joined #salt
17:36 akhter joined #salt
17:37 justaname ok, no errors about branches/tags/trunk now
17:37 justaname but cp.list_master returns null
17:37 debian112 joined #salt
17:37 justaname (I commented out - roots under fs_backend)
17:38 babilen File a bug please .. I'd like people who actually wrote that code to comment on this behaviour.
17:38 justaname will do, thanks
17:39 babilen Had hoped that fixing the remote_map.txt problem would sort things out, but that is apparently not the case
17:39 impi joined #salt
17:40 edrocks is there something I need to import to use zip() in my template? I'm trying to `for in` over two pillars
17:40 pipps joined #salt
17:40 edrocks it's saying zip is undefined
17:40 scoates anyone happen to have an example of block_device_mappings in boto_lc.present ?
17:40 babilen edrocks: You can't do that in jinja
17:40 babilen (yes, jinja sucks)
17:41 edrocks babilen: should I just copy paste then?
17:41 AdamSewell joined #salt
17:42 babilen edrocks: You can write states and pillars in Python (#!py renderer/shebang), which is what I do if I require anything that shitty jinja doesn't support
17:42 edrocks is it possible to merge pillars? From what I read you can do it, but when I tried my second pillar with the same name jsut replaced the first one
17:42 edrocks I have a general config pillar and one for a specific host with some extra options
17:43 babilen edrocks: https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-source-merging-strategy
17:43 babilen (and options underneath)
17:43 edrocks babilen: thanks
17:43 babilen In particular pillar_merge_lists might be of interest
17:44 babilen (not sure what the actual problem is)
17:44 edrocks I have a "config" pillar with options that all my servers use, and I have on that has extra options for one specific server
17:45 edrocks but the second one seems to replace the first dict entirely
17:45 edrocks I think pillar_merge_lists will work
17:46 babilen If not .. provide actual information (configuration, data, output) on one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
17:47 keisetsu joined #salt
17:50 flowstate joined #salt
17:51 quasiben1 joined #salt
17:52 majikman joined #salt
17:53 AdamSewell joined #salt
17:54 DammitJim joined #salt
17:54 garphy joined #salt
17:54 ggoZ joined #salt
17:54 manji joined #salt
17:55 toanju joined #salt
17:56 flowstate joined #salt
17:57 rm_jorge joined #salt
17:58 bbendy_ is there anyway to get more debug then just -l debug?  im getting a error that appears i have a variable without a attrbiute but i can't find it anywhere
17:58 gtmanfred -l travce
17:58 gtmanfred -l trace*
17:58 gtmanfred will show you the maximum amount of information
17:59 nidr0x joined #salt
18:00 s_kunk joined #salt
18:01 ronnix joined #salt
18:01 bbendy_ there we go, thanks!
18:03 bltmille_ joined #salt
18:05 baweaver joined #salt
18:07 druonysus joined #salt
18:07 ajw0100 joined #salt
18:08 jfindlay there's also garbage, but I don't think anything logs at that level
18:08 majikman joined #salt
18:08 jfindlay `git grep -En 'garbage' -- salt/`
18:13 autofsckk joined #salt
18:14 akhter joined #salt
18:16 garphy joined #salt
18:16 amcorreia joined #salt
18:20 AdamSewell joined #salt
18:21 baweaver joined #salt
18:21 PeterO joined #salt
18:25 ajw0100 joined #salt
18:25 WiuEmPe joined #salt
18:25 WiuEmPe hello
18:25 catpig joined #salt
18:26 WiuEmPe i destroy whole salt configuration, is possile to recovery it from server configured by salt?
18:27 justaname babilen: https://github.com/saltstack/salt/issues/32871
18:27 saltstackbot [#32871]title: svnfs_remotes - salt not mapping repo files to salt master fileserver | ### Description of Issue/Question:...
18:28 justaname Thanks again for all your help
18:28 josuebrunel joined #salt
18:29 lws joined #salt
18:31 nZac joined #salt
18:35 newjersey joined #salt
18:35 catpig joined #salt
18:37 AdamSewell joined #salt
18:38 kojiro joined #salt
18:42 riftman joined #salt
18:43 ageorgop joined #salt
18:44 garphy joined #salt
18:46 akhter joined #salt
18:48 onlyanegg joined #salt
18:50 kevinquinnyo so salt doesn't sync modules to a new minion that authenticates by default?
18:51 bantone gotta do a saltuti.sync_all
18:51 kevinquinnyo so if i have a reactor for when a minion starts, i need to do a __salt__['saltutil.sync_call'](data['id']) or something?  or is there a setting to have new minions get modules + mine.update and all that?
18:51 kevinquinnyo sync_all*
18:55 GreatSnoopy joined #salt
18:57 pipps joined #salt
18:59 punkoivan joined #salt
18:59 kojiro I am currently testing states in Vagrant that I eventually intend to use on AWS. A couple of the states explicitly point to /dev/xvdf for managing a block device and its filesystem. But on Vagrant the device is at a different path.
18:59 kojiro I'm conflicted about using a different minion id for testing than will be used in production for this instance
19:00 kojiro But I'm not sure how else to handle this
19:00 brianfeister joined #salt
19:02 AndreasLutro kojiro: I replace .mycompany.com with .vagrant.local when it comes to minion IDs - that way it's easy to pass vagrant-specific pillar overrides for stuff like that
19:02 kojiro hmm, I see. Nice
19:03 kojiro next question: I would really like to write more permanent tests. I've heard good things about salt-kitchen, but kinda want to avoid managing a ruby stack locally. Any suggestions there?
19:05 AndreasLutro there is python's testinfra - but truth is ruby's libs are far more mature in this regard, especially serverspec/specinfra which I believe is what kitchen uses under the hood
19:05 nidr0x joined #salt
19:05 PeterO_ joined #salt
19:06 UtahDave joined #salt
19:08 PeterO joined #salt
19:09 pipps joined #salt
19:10 garphy joined #salt
19:16 akhter joined #salt
19:20 keimlink joined #salt
19:20 akhter joined #salt
19:23 noraatepernos joined #salt
19:24 baweaver joined #salt
19:28 ninjada joined #salt
19:28 akhter joined #salt
19:32 akhter joined #salt
19:33 bVector kojiro: there was a talk at saltconf16 this year about testing salt states, let me see if its been uploaded yet
19:33 bVector nope nothing up yet that I see
19:33 tdenny joined #salt
19:33 bVector but there is a new 'mock' system that they're developing
19:34 mapu joined #salt
19:34 bVector hrm, found this looking for mock stuff, looks useful but not exactly what I was looking for
19:34 bVector https://docs.saltstack.com/en/latest/topics/development/tests/unit.html
19:35 bVector https://docs.saltstack.com/en/latest/topics/releases/2015.8.4.html "Added option mock=True for state.sls and state.highstate. This allows the salt state compiler to process sls data in a state run without actually calling the state functions, thus providing feedback on the validity of the arguments used for the functions beyond the preprocessing"
19:36 morissette joined #salt
19:37 edrocks joined #salt
19:38 sagerdearia joined #salt
19:39 debian112 left #salt
19:39 debian112 joined #salt
19:42 Garo_ joined #salt
19:46 akhter joined #salt
19:47 kojiro bVector: that's cool, thanks
19:48 amy_ joined #salt
19:49 kojiro What's the right way to tell salt to install a deb? It's not clear that the dpkg state can actually do the equivalent of dpkg -i, and scanning the pkg documentation I'm not sure if apt-get can do it either. I don't really want to mess with sources.list. I have the deb I want and have validated its checksum.
19:49 gtmanfred 8it can
19:50 gtmanfred for a state
19:50 gtmanfred couchbase-server:
19:50 gtmanfred pkg.installed:
19:50 gtmanfred - sources:
19:50 gtmanfred - couchbase-server: salt://qacouchbase/couchbase-server-community_x86_64_2.1.1.deb
19:50 gtmanfred and you can provide the checksum for it, i forget how
19:52 racooper gtmanfred,  please use a pastbin or gist for multi-line entries....
19:52 bantone gtmanfred works for salt he can do what he wants :D
19:53 _beardedeagle joined #salt
19:54 ferbla joined #salt
19:55 _beardedeagle joined #salt
19:57 ablemann joined #salt
19:57 rmc3 joined #salt
19:57 racooper heh. missed that. but still...channel (topic) rules :P
19:58 bltmiller joined #salt
19:58 bVector racooper: only the law is above the law
19:58 kitplummer joined #salt
19:58 kevinquinnyo what's the best way to deal with requisites when you are building states in a loop, ie for website in websites:\n\tstates[/etc/php5/fpm/pool.d/{0}.conf'.format(website)] = {# ...}
19:59 bVector using which renderer?
19:59 UtahDave left #salt
19:59 kevinquinnyo let me try to rephrase my question with a code example
20:00 bantone bVector is right haha
20:00 gtmanfred yes yes :)
20:02 g3cko joined #salt
20:04 newjersey joined #salt
20:04 zsoftich1 joined #salt
20:06 akhter joined #salt
20:06 Gareth- joined #salt
20:07 nidr0x joined #salt
20:09 jesusaur joined #salt
20:11 pipps joined #salt
20:11 debian112 joined #salt
20:18 twork_ we have two minions, identical except for the amount of RAM, with a lot of stuff in their state. the one with lots of RAM takes about six minutes to get to high state; the other one, about an hour.
20:19 kitplummer left #salt
20:19 twork_ i found 'max_event_size' on the minion an boosted that way up, and it does seem to let the minion use more RAM, but only to a point, and it doesn't seem to speed up much. any other tips for knobs to twist?
20:20 twork_ ...or, where to read. i do try, honest.
20:23 kevinquinnyo twork_: just a guess, is it possible it's the things the states are doing that are the bottleneck, rather than saltstack itself?  if it takes a long time with less ram, then i imagine something is having to swap or write to disk for some reason
20:24 kevinquinnyo is the one with less RAM swapping during it's highstate run
20:24 kojiro gtmanfred: thanks, I was not able to find documentation on checking the checksum of the deb in pkg.installed, but it worked well when I downloaded the deb and checked its hash with file.managed, and then use pkg.installed
20:25 akhter joined #salt
20:25 debian112 left #salt
20:25 twork_ kevinquinnyo: no
20:25 garphy joined #salt
20:26 twork_ kevinquinnyo: top says the minion is usion about 9% of RAM, if that means anything
20:27 twork_ *using
20:28 debian112 joined #salt
20:29 twork_ at first, it was maxing out around 6%, so i think that must have helped some, but allowing more doesn't seem to make any difference
20:29 twork_ or not? i dunno.
20:30 kevinquinnyo are you sure you don't have like a 100Mbps port vs a gigabit port on one minion vs the other?
20:30 kevinquinnyo sorry just throwing random troubleshooting things out
20:30 twork_ no no, i appreciate it, i'm at a loss
20:32 twork_ i haven't looked at traffic rates. i *think* these two VM's are on the same stack, so that hadn't really occurred to me, bu tit's worth a look.
20:33 kevinquinnyo worth ruling it out -- i've had weird problems before where i'm like "why is this POS so slow?" only to find out i accidentally setup a cloud instance rate-limited to like 1Mbps
20:33 eightyeight joined #salt
20:33 zmalone I'd think that would show up as iowait on a top
20:35 brianfeister joined #salt
20:38 kevinquinnyo twork_: if their VMs, could you temporarily boost the ram to match the other minion, and see if it's still slow?
20:39 teryx510 joined #salt
20:39 kevinquinnyo that would at least tell you if it's the ram, or something else going on with the slow one
20:39 kevinquinnyo they're*
20:39 akhter joined #salt
20:39 twork_ kevinquinnyo: that is indeed a thought, and i think that's the next step.
20:40 twork_ mostly i just came looking here for, "ah, n00b, clearly you don't know about foo or bar! try those."
20:40 kevinquinnyo heh
20:40 kevinquinnyo well there really could be something like that
20:41 kevinquinnyo one hour vs 6 minutes, just makes me think there's a deeper issue though
20:41 twork_ fwiw: %Cpu(s): 50.1 us,  0.2 sy,  0.0 ni, 49.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
20:41 twork_ that's pretty steady
20:42 kevinquinnyo that's with it trying to do it's highstate?
20:42 twork_ yeah
20:42 kevinquinnyo you getting packet loss if you ping / mtr / traceroute to the salt-master from that one?
20:42 kevinquinnyo or vice versa
20:42 kevinquinnyo that's weird though
20:42 twork_ nope
20:43 ggoZ joined #salt
20:43 s_kunk joined #salt
20:43 s_kunk joined #salt
20:44 dmaiocchi joined #salt
20:45 twork_ also fwiw (like you'd expect), the master is mostly twiddling its thumbs
20:45 kevinquinnyo i'm out of ideas
20:45 kevinquinnyo unless you have like, if __grains__['id'] == 'minion-2'
20:45 kevinquinnyo time.sleep(3600)
20:46 twork_ heh
20:46 kevinquinnyo i would up the ram just to at least rule that out
20:46 twork_ yeah, that does seem like the obvious thing
20:46 twork_ thanks
20:49 bltmiller joined #salt
20:52 jhauser joined #salt
20:53 AdamSewell joined #salt
20:56 skeezix-hf joined #salt
20:57 rem5 joined #salt
20:58 rem5 joined #salt
21:04 debian112 joined #salt
21:05 ageorgop joined #salt
21:09 baweaver joined #salt
21:10 Hrumph2 joined #salt
21:10 Hrumph2 hi
21:10 gtmanfred hi
21:10 Hrumph2 ok i'm lokoing at the minion configuration file
21:10 Hrumph2 startup_states
21:10 Hrumph2 one of the options is highstate
21:10 flowstate joined #salt
21:10 gtmanfred yup
21:10 Hrumph2 i wonder why it's not default
21:11 gtmanfred because it is not always ideal
21:11 Hrumph2 gtmanfred, can you give me an example of a non-ideal circumstance
21:11 gtmanfred so
21:11 gtmanfred there are people that don't use highstates at all
21:11 Hrumph2 ok
21:11 gtmanfred they do everythign through an orchestration
21:11 Hrumph2 ok fair enough
21:11 gtmanfred so when the minion starts up, they don't want to do a highstate
21:11 babilen justaname: Thank you! Very good bug report .. I'll check tomorrow if I have anything to add :)
21:11 gtmanfred so the expected behaviors would be to do what will work
21:12 gtmanfred if you start the minion the first time, and haven't created a top.sls, it will throw errors
21:12 Hrumph2 ok
21:12 Hrumph2 fair points
21:13 Hrumph2 i'm still new with salt in spite of hanging out in this chan on and off for months
21:13 Hrumph2 just getting started with real usage
21:13 gtmanfred no worries :)
21:14 nidr0x joined #salt
21:17 subsignal joined #salt
21:21 SheetiS joined #salt
21:24 rocketnova joined #salt
21:26 flowstate joined #salt
21:28 AdamSewell joined #salt
21:29 ninjada joined #salt
21:31 akhter joined #salt
21:31 pipps joined #salt
21:32 zmalone joined #salt
21:38 Hrumph2 if I use grains.present in a state, can in subsequently refer to it in a required?
21:38 Hrumph2 in a requires i mean
21:38 gtmanfred yes
21:38 Hrumph2 and if so what would be better, doing that or setting up custom grains + reactor to make sure they're available on highstate?
21:39 gtmanfred required just checks that the state ran and succeeded
21:40 Hrumph2 i can also make up a custom grains module (so it appears) but it looks like i would also have to obey the instruction at the end of https://docs.saltstack.com/en/latest/topics/reactor/
21:40 Hrumph2 where it says "Syncing Custom Types on Minion Start"
21:41 Hrumph2 so i'm wondering what would be the most standard practice
21:42 Hrumph2 gtmanfred, what do you think is best?
21:42 amy_ joined #salt
21:42 gtmanfred so
21:43 gtmanfred custom grains should be available on a highstate
21:43 gtmanfred becuase as part of a highstate, it runs a saltutil.sync_all
21:43 gtmanfred so you should sync states, grains, modules, beacons etc and refresh grains and modules before running
21:44 gtmanfred https://docs.saltstack.com/en/latest/topics/targeting/grains.html#syncing-grains
21:44 gtmanfred Syncing grains can be done a number of ways, they are automatically synced when state.apply is called, or (as noted above) the grains can be manually synced and reloaded by calling the saltutil.sync_grains or saltutil.sync_all functions.
21:45 Hrumph2 gtmanfred: "Salt will sync all custom types (by running a saltutil.sync_all) on every highstate. However, there is a chicken-and-egg issue where, on the initial highstate, a minion will not yet have these custom types synced when the top file is first compiled. "
21:45 gtmanfred ok
21:45 gtmanfred so for that
21:45 gtmanfred write a state that runs
21:45 gtmanfred saltutil.sync_all
21:45 gtmanfred module.run:
21:46 gtmanfred or whatever
21:46 Hrumph2 gtmanfred, tehre are explicit instructions right where i said
21:46 gtmanfred and put that state in your startup states
21:46 gtmanfred i don't see a link, where are you saying?
21:46 Hrumph2 https://docs.saltstack.com/en/latest/topics/reactor/
21:47 Hrumph2 see the bottom of the page under "SYNCING CUSTOM TYPES ON MININION START"
21:48 pipps joined #salt
21:48 gtmanfred yup you could totally do it that way
21:48 Hrumph2 so it looks like i've to to choices. I can use grains.present and requires statements with a bit of jinja, or i can make custom grains and follow these instructions
21:48 gtmanfred alternativelyyou can do it with a startup state
21:48 gtmanfred yup
21:49 Hrumph2 gtmanfred, so of the two choices i'm think of what would be closest to standard practice?
21:49 Hrumph2 i kind of like the custom grains idea myself
21:51 rocketnova joined #salt
21:52 riftman joined #salt
21:55 gtmanfred whichever one fits you best
21:56 gtmanfred if you prefer the custom grains one, use that one :)
21:56 Hrumph2 gtmanfred, ok
21:57 Hrumph2 gtmanfred, a tually i think i'm going to do niehter. these are deployment related issues, so I think i'll just manually add grains in the minion configs
21:57 Hrumph2 i was just talking with my co-worker and he thinks that the best too
21:57 AdamSewell joined #salt
21:57 Hrumph2 gtmanfred, but thanks for the help. i appreciate it
21:57 gtmanfred no problem :)
21:58 perfectsine joined #salt
21:58 rocketnova joined #salt
21:58 edrocks joined #salt
21:59 pipps joined #salt
21:59 punkoivan left #salt
22:02 mapu joined #salt
22:04 ageorgop joined #salt
22:05 Eureka703 joined #salt
22:05 AdamSewell joined #salt
22:13 kevinquinnyo1 joined #salt
22:13 jhauser joined #salt
22:13 Muchoz joined #salt
22:16 spuder joined #salt
22:18 spuder_ joined #salt
22:19 sagerdearia joined #salt
22:19 Atomics joined #salt
22:19 AdamSewell joined #salt
22:20 rocketnova joined #salt
22:21 bltmiller I just got a huge monkey wrench in my plans to use saltstack when I was informed that all our servers do not have internet access. we also dont get root, but I knew about that and can work around it. but I feel like I'm stuck now without even internet access to download tarballs on my machines. anyone have any ideas that allow me to still take advantage of config mgmt?
22:21 clevodearia joined #salt
22:22 hemebond bltmiller: No internet access at all? How are the servers currently managed?
22:22 devdearia joined #salt
22:22 bltmiller shit is placed on our boxes via scp. and services run on non-reserved ports.
22:22 bltmiller some setup bash scripts help "ease the pain"
22:23 nidr0x joined #salt
22:25 bltmiller some kind of proxy setup I can use perhaps?
22:25 bltmiller hard to narrow down in search since salt-proxy is a thing, but not the thing I necessarily need
22:26 hemebond I don't understand. How are you supposed to manage a server if you have no access and no rights over it?
22:26 flowstate joined #salt
22:26 bltmiller hemebond: good fucking question
22:29 bltmiller sounds like this might be my best option https://github.com/saltstack/salt/issues/8177
22:29 saltstackbot [#8177]title: Support http_proxy/https_proxy for sources | For example, a file.managed with source pointing to a file on a HTTP location will not work if you are behind a proxy....
22:30 mapu joined #salt
22:33 Garyx joined #salt
22:36 cpowell joined #salt
22:37 pipps joined #salt
22:38 zenlot joined #salt
22:40 pipps99 joined #salt
22:46 lws joined #salt
22:48 hemebond I thought there was no internet access.
22:50 mapu joined #salt
22:51 teryx510 joined #salt
22:54 iggy quit
22:58 belak I'm having issues with pkg.installed and the fromrepo option... it seems like if the package is installed, it won't update to the version from the other repo... for instance I'm trying to install tmux from jessie-backports...
22:59 belak (but tmux is already installed from the main repo) so nothing ends up changing.
23:00 Knuta belak: Have you read the documentation for fromrepo on https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html? It has a section specific for apt.
23:01 belak Knuta: ah, I missed that... but I think I'm doing it correctly...
23:02 belak I have pkgrepo.managed with deb http://http.debian.net/debian jessie-backports main
23:02 belak And I'm using fromrepo: jessie-backports
23:02 kevinquinnyo1 twork_: Did you ever figure out your issue with the two minions and the 54 minute highstate difference?  I'm just curious
23:03 Knuta belak: did you try the apt-cache policy trick to see if it gives the expected output?
23:04 ninjada joined #salt
23:04 belak Knuta: I mean, I'm not sure what I'm looking for...
23:05 ninjada joined #salt
23:05 Knuta belak: I presume you'd want there to be an entry for jessie-backports at least
23:05 belak I don't see anything obviously out of the ordinary... both jessie-backports/main and jessie/main are listed
23:07 belak ahhh, it's probably because of package.installed vs package.latest
23:07 flowstate joined #salt
23:08 zmalone joined #salt
23:08 justin___ joined #salt
23:08 belak The state sees that tmux is already installed so it doesn't bother installing from backports even though the version doesn't match
23:09 keimlink_ joined #salt
23:11 devdearia joined #salt
23:11 belak It seems like pkg.installed should ensure it's installed from the proper repo though.
23:12 justin___ hello, I am trying to use pillar to define roles of minions, am I trying to do something stupid?
23:13 hemebond justin___: Sounds fine.
23:13 hemebond Though you can normally get the same result directly via the top.sls.
23:15 justin___ hemebond: is doing it via top.sls documented?
23:16 hemebond justin___: top.sls is documented, yes. But it's not a special process, it's just the way top.sls works. How are you defining roles?
23:16 zmalone joined #salt
23:16 Knuta belak: you might want to submit a bug on that
23:17 lero joined #salt
23:17 west575 joined #salt
23:17 justin___ I was using a grain in the minion.conf file so that lead me to trying to manage the minion.conf with salt and using pillar
23:18 N-Mi joined #salt
23:18 N-Mi joined #salt
23:18 iggy belak: open an issue (but I expect they'll say that's expected behavior)
23:19 belak I have a feeling that it's an expected quirk with debian
23:19 belak :/
23:19 rem5 joined #salt
23:19 hemebond belak: Using pkg.latest? (is that a thing?)
23:19 bltmiller joined #salt
23:19 belak hemebond: pkg.latest is a thing
23:19 belak The problem is with pkg.installed
23:20 toastedpenguin joined #salt
23:20 iggy it says "pkg already installed, moving on" without checking that it's from the specified repo
23:20 hemebond What do you mean? The pkg is installed, yeah? Or does it not install from the repo you've specified?
23:20 belak hemebond: it doesn't install from the repo specified
23:21 hemebond Even when it's not already installed?
23:21 pipps joined #salt
23:21 iggy but I'm guessing nobody ever tested it in that kind of situation
23:22 belak hemebond: when it's installed from a different repo
23:22 hemebond Can you tell which repo a package came from if it's already installed?
23:22 iggy yes
23:22 belak Yes, because apt-cache policy tracks it
23:23 Garyx joined #salt
23:24 orion joined #salt
23:24 orion Hi. What's the recommended way of executing a command once on boot? I can'
23:24 orion I can't use @reboot in cron because it's not support in Salt.
23:25 flowstate joined #salt
23:25 orion (On Ubuntu)
23:26 ahammond Is there a way to have salt-key act on a -L type list of minion ids?
23:26 ahammond we are re-keying to 2k keys from 4k and... it's not much fun. :)
23:27 Garyx joined #salt
23:28 sjmh ahammond : can you use the autosign_file?
23:28 kevinquinnyo1 orion: I don't know what the preferred solution is, but could you throw it in a script and then put that script in /etc/rc.local
23:28 ahammond sjmh I'll go read about that.
23:28 sjmh https://docs.saltstack.com/en/latest/ref/configuration/master.html#autosign-file
23:29 orion kevinquinnyo1: What if I have multiple states competing for rc.local?
23:30 zenlot joined #salt
23:30 kevinquinnyo1 orion: file.append should only add if it doesn't exist, there shouldn't be any "clobbering" or anything?
23:31 Garyx joined #salt
23:31 orion kevinquinnyo1: The last line of the file must be "exit 0" though.
23:32 pipps joined #salt
23:32 kevinquinnyo1 orion: what file?  the script you execute via /etc/rc.local, ie /root/scripts/on-boot/script1.sh ?
23:32 zmalone joined #salt
23:33 belak hemebond: iggy: if you want more inforation, I've filed an issue at https://github.com/saltstack/salt/issues/32881
23:33 saltstackbot [#32881]title: salt.states.pkg.installed does not take fromrepo into account with apt | ### Description of Issue/Question...
23:33 orion The last line of /etc/rc.local must be 'exit 0'
23:34 Knuta orion: what makes you think you can't use @reboot in cron? Just use file.managed and slap it into /etc/cron.d yourself
23:34 orion I can't use it with the cron state.
23:34 Knuta you don't need the cron state
23:35 Garyx joined #salt
23:36 orion Yes, I suppose you're right.
23:37 lws joined #salt
23:37 rem5 joined #salt
23:38 kevinquinnyo1 can't blame orion for trying to "do it right", using the cron state.  Maybe @reboot could be a feature add to avoid "lower level" hacks being necessary?
23:39 Garyx joined #salt
23:40 rem5 joined #salt
23:43 Garyx joined #salt
23:45 marie1972 joined #salt
23:51 hemebond https://github.com/saltstack/salt/issues/2896
23:51 saltstackbot [#2896]title: cron.present should support magic string @reboot  | cron supports using some special strings replacing the first five time matching fields:...
23:51 Knuta kevinquinnyo1: I don't see any reason to use states just because they exist. I don't see what the cron state gives me that slapping a file into cron.d or cron.daily doesn't, and it also doesn't have the problem of the name changing when you change the command.
23:52 brianfeister joined #salt
23:53 rem5 joined #salt
23:54 pcdummy joined #salt
23:54 Knuta kevinquinnyo1: having a cross-platform handling of cron.daily, though, that would be something. That way you wouldn't have to deal with using /etc/cron.daily on Linux, /etc/periodic/daily on FreeBSD, etc
23:56 kevinquinnyo1 Knuta: yeah i see your point
23:56 kevinquinnyo1 I deal with the same OS on everything that I deploy so i usually get the benefit of avoiding cross-platform headaches
23:57 kevinquinnyo1 also i'm happy to just use cmd.run and stateful scripts if i know they will get the job done and the whole thing remains idempotent
23:58 hrumph joined #salt
23:59 onlyanegg joined #salt

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