Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-02-17

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

All times shown according to UTC.

Time Nick Message
00:01 alexlist joined #salt
00:09 shanathon was hoping the logs would say where its attempting to create the domain in active directory but it doesnt :(
00:12 shanathon * sorry the computer object not the domain
00:24 sp0097 joined #salt
00:36 jas02 joined #salt
00:55 gableroux joined #salt
00:59 spuder joined #salt
01:01 orionx joined #salt
01:08 mgi joined #salt
01:09 mgi hey - I get errors about conflicting IDs when issuing a 'pkg.refresh_db'
01:09 mgi some intellij packages (which I don't use)
01:09 hemebond mgi: Are you using it from a state?
01:09 mgi it happens when I just do sudo salt server65 pkg.refresh_db
01:10 hemebond That's very odd.
01:10 hemebond It's not applying any states so I'm not sure what IDs are conflicting.
01:10 mgi I'll paste the output in a pastebin
01:11 mgi
01:11 mgi brb, terminal is stuffing up
01:11 mgi joined #salt
01:11 mgi http://pastebin.com/8kfspWeS\
01:11 mgi whoops ignore the trailing \
01:12 hemebond Oh, winrepo stuff.
01:12 hemebond You'll need to check those winrepo states.
01:12 mgi the ones mentioned in the error?
01:13 hemebond Yeah
01:14 mgi I'm pretty noob when it comes to salt - but are these SLS files getting sucked down via git? eg. someone has changed them and broken them?
01:14 mgi because this stuff was fine a few days ago
01:14 hemebond I've no idea.
01:14 hemebond I haven't used any of the new winrepo stuff.
01:14 mgi ok, no worries
01:14 hemebond And I have no Windows minions to test with.
01:16 mgi hmm this looks like my issue: https://github.com/saltstack/salt-winrepo-ng/issues/648
01:16 saltstackbot [#648][OPEN] Compile Issues  pkg.refresh_db result | ```...
01:17 hemebond Nice find 👍
01:21 nickabbey joined #salt
01:22 mgi also, can anyone familiar with this yaml wizardry explain what this is should do?
01:22 mgi {% for version in '14.1.4' %}
01:22 hemebond That's Jinja
01:22 mgi is it going to yield '1', '4', '.', '1'..?
01:22 mgi an oh
01:22 mgi ah ok*
01:22 hemebond I would think it would yield each character.
01:22 mgi that doesn't seem right
01:22 mgi I guess I'll have to fix it
01:27 mgi whoever is maintaining winrepo-ng please have a look at intellij-*.sls and duplicati.sls. I can't see how the intellij-* files were ever going to work, and it's surprising they were pushed into git without being tested.
01:29 mgi (unless I'm missing some fundamental)
01:29 mgi something*
01:33 phx joined #salt
01:34 rimk joined #salt
01:35 MConceicao joined #salt
01:39 MarcioConceicao joined #salt
01:40 krymzon joined #salt
01:41 Marcio__ joined #salt
01:47 whytewolf only thing i can think is they are not meant to both be put on the same server
01:47 shoemonkey joined #salt
01:50 MConceicao joined #salt
01:54 icebal joined #salt
01:55 Nahual joined #salt
02:00 sh123124213 joined #salt
02:02 WesleyTech joined #salt
02:06 icebal joined #salt
02:32 bbradley joined #salt
02:34 beardedeagle joined #salt
02:37 jas02 joined #salt
02:41 Nahual joined #salt
02:46 spuder joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.5, 2016.11.2 <+> 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:56 DammitJim joined #salt
02:57 catpigger joined #salt
03:00 flughafen joined #salt
03:00 kbaikov joined #salt
03:03 scsinutz joined #salt
03:17 scsinutz1 joined #salt
03:22 ninjada joined #salt
03:25 orionx joined #salt
03:28 jimklo_ joined #salt
03:28 deepbook5broo joined #salt
03:28 deepbook5broo left #salt
03:31 nickabbey joined #salt
03:32 yo joined #salt
03:32 scsinutz joined #salt
03:34 scsinutz joined #salt
03:35 onlyanegg joined #salt
03:39 spuder joined #salt
03:42 scsinutz joined #salt
03:43 mdhas joined #salt
03:54 XenophonF i only want my template to call selinux.getenforce() if the selinux module is registered with salt
03:54 XenophonF how would i implement such a guard?
03:54 XenophonF i tried `'selinux.getenforce' in salt` but that throws a KeyError exception
03:55 XenophonF which leads me to believe that `salt` isn't really a dictionary
03:55 XenophonF the salt loader code makes my brain hurt :(
03:56 shoemonkey joined #salt
03:57 XenophonF mgi: I think that test ends up being a string equality check
03:57 XenophonF which kind of blew my mind when i found that out
04:01 ivanjaros joined #salt
04:01 fooker_ joined #salt
04:01 sh123124213 joined #salt
04:02 scsinutz joined #salt
04:02 edrocks joined #salt
04:05 orionx_ joined #salt
04:09 scsinutz joined #salt
04:15 writtenoff joined #salt
04:22 spuder joined #salt
04:31 scsinutz joined #salt
04:32 mdhas joined #salt
04:38 jas02 joined #salt
04:42 ninjada_ joined #salt
04:44 orionx_ joined #salt
04:44 onlyanegg joined #salt
05:01 spuder joined #salt
05:05 ninjada joined #salt
05:06 evle joined #salt
05:06 kbaikov joined #salt
05:07 spuder joined #salt
05:07 onlyanegg joined #salt
05:16 justanotheruser joined #salt
05:29 mavhq joined #salt
05:32 nickabbey joined #salt
05:37 preludedrew joined #salt
05:40 jas02 joined #salt
05:57 jas02 joined #salt
06:03 sh123124213 joined #salt
06:04 edrocks joined #salt
06:07 scsinutz joined #salt
06:15 onlyanegg joined #salt
06:20 spuder joined #salt
06:21 orionx joined #salt
06:22 gladia2r joined #salt
06:22 bocaneri joined #salt
06:23 madboxs joined #salt
06:24 ninjada joined #salt
06:28 ivanjaros3916 joined #salt
06:37 scsinutz1 joined #salt
06:38 felskrone joined #salt
06:40 scsinutz joined #salt
06:43 rimk joined #salt
06:46 yuhl______ joined #salt
07:05 krymzon joined #salt
07:26 mpanetta joined #salt
07:42 dariusjs joined #salt
07:43 jhauser joined #salt
07:51 teclator joined #salt
07:58 darioleidi joined #salt
08:00 tehsu is there something thats changed that would take local_batch out of the clients from the salt api?
08:00 bd__ joined #salt
08:01 jimklo joined #salt
08:02 candyman88 joined #salt
08:04 jas02 joined #salt
08:04 sh123124213 joined #salt
08:06 edrocks joined #salt
08:08 whytewolf tehsu: you mean like CVE-2017-5192
08:09 tehsu guess so, thx
08:10 jas02 joined #salt
08:14 juntalis_ joined #salt
08:15 JohnnyRun joined #salt
08:16 BHauser joined #salt
08:17 onlyanegg joined #salt
08:21 Inveracity joined #salt
08:22 BHauser Hi everyone is there some more information somewhere about the salt mine? I'm reading https://docs.saltstack.com/en/latest/topics/mine/ but I am still left with questions...
08:22 zulutango joined #salt
08:22 hemebond What are your questions?
08:22 hemebond IRC is usually a good place for answers.
08:23 whytewolf IRC is also a good place for sarcasim at times
08:23 BHauser hemebond: Whether or not the salt mine will forget old/stale data
08:23 BHauser hemebond: :)
08:23 hemebond You mean if you remove the mine entry? Yes, it will disappear.
08:23 BHauser hemebond: If i can also set the mine_interval option also from pillar.
08:24 BHauser hemebond: Ah so i have to clear it myself?
08:24 whytewolf i do not believe mine_interval can be setup through pillar.
08:24 hemebond https://github.com/saltstack/salt/issues/18098
08:24 saltstackbot [#18098][OPEN] salt mine - support for function specific mine interval | There's currently no way to provide a function specific interval for salt mine functions defined in a pillar....
08:25 whytewolf BHauser: well you have to remove the setting for the mine and after that it will dissapear on it's own after the next mine interval
08:26 BHauser whytewolf: ack, understood and understood
08:26 BHauser thanks for the help guys
08:26 whytewolf if that isn't fast enough there is the mine.delete and mine.flush exacution module functions
08:27 BHauser Maybe i'm back later but i now have a little fire to put out :)
08:27 preludedrew joined #salt
08:27 kows joined #salt
08:33 BHauser whytewolf: So what would happen if i have a minion that has an mine_interval of 60 and it puts item A in the salt mine. And i power down the minion?
08:33 BHauser The salt mine will evict Item A after 60 minutes?
08:34 hemebond No.
08:34 hemebond The mine data will be available even when the minion is offline.
08:34 whytewolf no, [also 60 would be 60 seconds]
08:34 BHauser ack, ack.
08:36 BHauser Ok, that gives me enough info to work with. Thanks! Maybe i'll be back later with some more questions :)
08:36 Morrolan joined #salt
08:38 Morrolan joined #salt
08:38 mikecmpbll joined #salt
08:50 jimklo joined #salt
08:51 achedeuzot joined #salt
08:51 mikecmpbll joined #salt
08:52 o1e9 joined #salt
09:00 sybix joined #salt
09:02 BHauser Question: What is the proper way to remove stale data from the salt mine (information from minions that don't exist anymore).
09:03 AndreasLutro salt-run cache.clear_mine $minion_id
09:03 AndreasLutro use reactors if you want to automate it
09:05 rimk joined #salt
09:05 Sammichmaker joined #salt
09:06 sagerdearia joined #salt
09:07 zionsofer joined #salt
09:08 BHauser AndreasLutro: Cool, thanks. (Where do you guys find this information btw? I have the feeling i'm missing something)
09:10 AndreasLutro can't remember, probably just googled "salt clear mine" or something
09:11 teclator joined #salt
09:11 scristian joined #salt
09:12 prg3 joined #salt
09:12 BHauser Lol! I think i have some other problems now: Exception occurred in runner cache.clear_mine: Traceback (most recent call last):
09:12 krymzon joined #salt
09:16 BHauser Ok fetched the latest from github that fixed it. And that command works.
09:17 dariusjs joined #salt
09:18 onlyanegg joined #salt
09:29 BHauser So i've cleared my entire salt mine. I was expecting that the mine would be populated again with information from the minions that are currently running (and have mine_interval set to 5)
09:30 BHauser However the mine stays empty and I only receive data from a minion if i restart the salt-minion on that minion.
09:31 BHauser Is the salt-minion maybe only updating the salt mine on changes?
09:32 AndreasLutro not sure how that works tbh, but you can do `salt '*' mine.update` to force a mine update everywhere
09:33 hvn joined #salt
09:33 nickabbey joined #salt
09:34 flughafen joined #salt
09:34 kbaikov joined #salt
09:38 MConceicao joined #salt
09:39 hvn joined #salt
09:41 zionsofer left #salt
09:47 Firewalll joined #salt
09:50 jeddi joined #salt
09:51 ruxu joined #salt
09:52 BHauser whytewolf: fyi: Here the mine_interval setting corresponds with minutes not with seconds
10:00 inad922 joined #salt
10:03 peters-tx joined #salt
10:05 pierB joined #salt
10:06 pierB Hi guys, I am looking for a way to define saltenv variable as a global environment variable, does anyone knows if its possible ?
10:06 sh123124213 joined #salt
10:06 Lionel_Debroux_ joined #salt
10:07 pierB I  am trying to avoid the need of passing the saltenv parameter to a highstate launch ... to prevent unwanted behavior in some way (I am using multiple base env)
10:10 darebwoi joined #salt
10:14 ninjada joined #salt
10:18 felskrone how can i "skip" a file.managed if a file already has local modifications?
10:19 BHauser felskrone: replace: false
10:20 felskrone ah thx, missed that in the docu, thx
10:21 BHauser https://hastebin.com/olabusanew
10:21 BHauser np
10:22 s_kunk joined #salt
10:23 BHauser I was wondering, what is the proper way to define dependencies/ordering between two formulas?
10:23 ninjada joined #salt
10:23 pierB_ joined #salt
10:24 BHauser errr nevermind that...
10:24 darioleidi joined #salt
10:25 pierB_ Hi, (unwillingly restarted Xserver ...:( ), still looking for a way to define saltenv varibale in a "global environment" way ... if anyone knows how to do this
10:25 darioleidi joined #salt
10:25 darioleidi joined #salt
10:27 darioleidi joined #salt
10:29 hemebond pierB_: Minion config.
10:30 flughafen joined #salt
10:31 kbaikov joined #salt
10:44 pierB_ hemebond : thanks for your answer, do you mean using a custom minion grain to define the environment ? I am looking at a minion config right now , thanks for the input
10:45 pierB_ I remember seeing everywhere in the salt docs that relying on the minion grain was not considerd "safe", anyway, I am still not sure that this what you are suggesting
10:45 hemebond I mean in the minion config itself.
10:45 hemebond You can set an `environment` setting.
10:45 hemebond Oh wait.
10:45 hemebond saltenv
10:46 hemebond Sorry I misunderstood what you were asking.
10:46 hemebond Pretty sure there is no way to do it.
10:46 hemebond saltenv is a parameter for command line.
10:49 pierB_ Ah, ok, thanks anyway, I am now checking the minion config docs, I amy find something else to address my issue in there ...
10:49 Hybrid joined #salt
10:50 hemebond What are you trying to define it for all commands?
10:50 hemebond (you could just use a bash alias)
10:52 sfxandy joined #salt
10:52 sfxandy hello everyone
10:53 pierB_ Yeah I thought about this way, but it looks a bit ugly ..... I have a 3 envs master setup, and I'd like to prevent users from launching a highstate with the bad saltenv setting or even without any saltenv in which case top files are mlerged from my understanding
10:54 pierB_ I know I should use Gitfs fir this kind of setup but we are not ready yet to use Gitfs .... It scares people that are not dev ... (working at the ops level here)
10:54 hemebond Well that's only a problem if your top.sls files are not setup properly.
10:54 hemebond GitFS won't change this for you.
10:54 hemebond It just moves the files into Git
10:55 sfxandy_ joined #salt
10:55 pierB_ hum we have 3 different sites, on which all servers are the same (same names, same function etc ...) just the subnets differs (believe me there is tons of them)
10:55 sfxandy_ hi, does anyone have any experience at all with the rsync state/execution module?
10:56 pierB_ I need to setup one master on each sites, but i do not want to ùaintain 3 master on 3 different sites, so I thought i'd create 3 envs that I could rsync from one site to the others
10:56 hemebond The minions have the same names?
10:56 hemebond You can't have multiple minions with the same name,
10:57 pierB_ yeah kind of the same names, the same pattern at least, only the last domain level differs
10:57 hemebond So just filter on the unique parts.
10:57 hemebond That's what I do.
10:57 pierB_ log.admin.ptf1, and log.admin.ptf2 for example
10:57 manji pierB_, maybe using different branches on git could be a cleaner solution
10:58 hemebond manji: The result would be the same.
10:58 pierB_ yeah, it looks easy as I am talking to you now
10:59 sfxandy_ i suspect the exceution module (and hence the state) doesnt support this, but I ccant see a way of passing multiple 'excludes' into an rsync state call.  i can use the 'excludefrom' paameter to pass in a file which I can put my excludes in, but that seems a bit ..... messy.
10:59 manji hmm
10:59 pierB_ manji :! Yeah that's why I was talking about Git, using branches could help me to differentiate all envs, or at least using them in an explicit way (that's what i thoufght)
11:00 hemebond Like I said, all it does is move the files into Git.
11:00 pierB_ I guess that filtering on the last domain level is the easier way, and cleaner, I am just not sure yet if it's going to be enough, I need to go further in my servers list and functionalities
11:00 hemebond The branches become your environments and you still need to target properly in the top.sls.
11:02 pierB_ I thought using Git would allow me to pull only one branches, which contains only the correct tree state, kind of transfering the responsability of differentiating env from salt to git
11:03 pierB_ but still I cannot use Gitfs now, so that's not an option
11:03 hemebond You could do that. But you would then need a separate master for each environment.
11:03 hemebond But GitFS pulls down everything.
11:03 pierB_ Gyus, I need to go have lunch now, ppl are waiting for me, thanks a lot for you thoughts they were helpful, see you this afternoon maybe, thanks !
11:04 pierB_ I do have a separate master for each site :)
11:05 hemebond I thought you wanted to avoid that.
11:05 hemebond In which case you can just explicitly pull down the branch you want on the master you want.
11:05 hemebond Can't use GitFS for that as far as I know.
11:06 fracklen joined #salt
11:06 AndreasLutro gitfs_base: master, gitfs_env_whitelist: [ base ]
11:07 AndreasLutro is what we do to make sure that only master branch gets pulled in by gitfs
11:07 hemebond Ah, didn't know you could whitelist branches.
11:13 moeyebus9 joined #salt
11:18 onlyanegg joined #salt
11:19 flughafen joined #salt
11:28 mpanetta joined #salt
11:28 dariusjs joined #salt
11:30 darioleidi joined #salt
11:33 mage_ is it OK to sudo cat icinga.lan.key | gpg --armor --batch --trust-model always --encrypt -r xxx to use the yaml|gpg stuff ?
11:34 nickabbey joined #salt
11:35 evle1 joined #salt
11:37 ksk hola.
11:42 ksk I have a rather strange problem; I can do on saltmaster: "salt 'client1' state.highstate" - and it runs fine. - but If I do "salt 'client1' state.sls some-formula" it says: Specified SLS 'foo.defaults' in environment 'base' is not available on the salt master. Am I doing it wrong?
11:43 hemebond ksk: Are you using environments?
11:43 hemebond Is some-formula in your highstate?
11:43 ksk eh, I dunno, have to look that up :)
11:45 ksk yes, I am using environments, and yes that formula is in the highstate.
11:50 JohnnyRun joined #salt
11:50 ksk I can narrow it down even more, on client1 I can do: "salt-call state.sls rac-formula" -> good; on saltmaster: "salt 'client1' state.sls rac-formula" -> Error: specified sls not avail
11:51 dariusjs joined #salt
11:59 zer0def gtmanfred: just as a reference to my yesterday's question on how execution modules are relevant in reactions - apparently i've forgot that masters can run execution modules like minions do
12:03 puzzlingWeirdo joined #salt
12:03 izibi is there any documentation on the datastructure a returner will receive as parameter?
12:08 sh123124213 joined #salt
12:08 edrocks joined #salt
12:22 mmichal joined #salt
12:23 darioleidi joined #salt
12:23 mmichal helo o try to use salt on centos 7 from salt
12:24 mmichal salt-latest
12:24 mmichal and i
12:25 mmichal and i try to install group of package i get error
12:25 mmichal http://pastebin.com/qDHjcyjh
12:27 mmichal and sls look like http://pastebin.com/cyCKaGdZ
12:28 mmichal did i do something wrong?
12:29 AndreasLutro no, that stacktrace has nothing to do with your sls
12:29 AndreasLutro it looks like a problem in python itself
12:30 AndreasLutro mmichal: what does `python --version` on your system say?
12:31 mmichal AndreasLutro: one moment i need to run VM
12:33 mmichal python --version
12:33 mmichal Python 2.7.5
12:34 numkem joined #salt
12:34 mmichal its almost clean install of centos d
12:34 diegows joined #salt
12:34 mmichal added repo are epel7 and salt repo
12:36 AndreasLutro really weird error... I think you'd have to use pdb to get some insight into what's going on
12:37 AndreasLutro but the error is coming from python's standard library, not salt
12:38 zer0def quick question - do execution modules ran on a master not use overridden modules/states/whatever on purpose?
12:38 zer0def meaning in a salt-master context, not a salt-minion one
12:38 AndreasLutro zer0def: you have to override them in a different way than on minions
12:38 AndreasLutro look at extension_modules or module_dirs in the master config
12:44 zer0def yup, that worked like a charm, thank you AndreasLutro
12:44 mmichal zer0def: all actions made on salt dir are http://pastebin.com/VpuwQhhW i don't think i can call it override
12:45 mmichal problem with recursion appear only when i try to use  pkg.group_installed
12:46 mmichal and as far as i can see yum is running over and over again
12:48 mmichal AndreasLutro: Can You add some link to this pdb how i should use it i am starting with salt
12:49 darebwoi joined #salt
13:08 numkem joined #salt
13:09 emdk joined #salt
13:11 k_sze[work] joined #salt
13:11 Roelt joined #salt
13:12 k_sze[work] joined #salt
13:13 dps joined #salt
13:17 dps joined #salt
13:19 onlyanegg joined #salt
13:23 XenophonF in a template, how might i tell whether a particular exec module is loaded before trying to call one of its functions?
13:23 DanyC joined #salt
13:24 XenophonF specifically, i don't want to try to call selinux.getenforce() if the selinux module isn't loaded
13:25 XenophonF i tried `'selinux.getenforce' in salt` but that throws a KeyError
13:25 zer0def have you tried `salt.keys()`?
13:25 zer0def not that it should matter
13:25 XenophonF no i haven't
13:27 XenophonF oh that's a method on the salt dictionary, right?
13:28 mpanetta joined #salt
13:28 AndreasLutro it's a general dict method, not sure it'll behave correctly for this purpose though
13:29 XenophonF wow that actually worked
13:29 XenophonF thanks zer0def!
13:29 zer0def that's sorta odd
13:29 zer0def but yeah, it falls back on more basic python types
13:31 XenophonF i realize that `salt` isn't purely a dict, but i was sure that `in` test was going to work
13:31 edrocks joined #salt
13:31 XenophonF glad .keys() did the trick!
13:31 XenophonF now to test the case where that should return true...
13:32 XenophonF and it looks like that worked, too
13:32 XenophonF fantastic
13:32 XenophonF thanks again!
13:35 nickabbey joined #salt
13:43 jas02_ joined #salt
13:52 djural joined #salt
14:00 nickabbey joined #salt
14:00 muxdaemon joined #salt
14:09 sh123124213 joined #salt
14:12 ninjada joined #salt
14:12 zer0def XenophonF: something that may prove relevant to your last case: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.sysmod.html
14:18 alvinstarr1 joined #salt
14:26 cyborg-one joined #salt
14:32 dendazen joined #salt
14:38 shoemonkey joined #salt
14:40 Tanta joined #salt
14:44 _Cyclone_ joined #salt
14:50 sarcasticadmin joined #salt
14:50 onlyanegg joined #salt
14:55 mpanetta joined #salt
14:55 candyman88 joined #salt
14:58 beardedeagle joined #salt
15:01 dariusjs joined #salt
15:02 mpanetta joined #salt
15:08 onlyanegg joined #salt
15:09 teclator joined #salt
15:11 xet7 joined #salt
15:12 tapoxi joined #salt
15:19 mdhas joined #salt
15:29 PatrolDoom joined #salt
15:30 XenophonF oh neat
15:31 XenophonF thanks zer0def
15:36 beardedeagle joined #salt
15:37 hvn joined #salt
15:37 hvn joined #salt
15:39 tapoxi does pkg.install only handle one package at a time?
15:41 Neighbour if you use - names: you can supply a list of packages to install
15:42 sjorge joined #salt
15:42 sjorge joined #salt
15:42 Reverend i normally use pkg.installed and then `- pkgs:`
15:42 Reverend buit i guess it's not really that much different
15:43 tapoxi the exec module I mean, not the state module
15:43 Reverend ah okay
15:44 Reverend that makes more sense now I am thinking about it
15:44 Reverend <3
15:44 tapoxi I have client.cmd_iter('web*', 'pkg.install', ['fortune', 'cowsay', 'tree']) in a runner and it just ignores cowsay and tree without failing
15:44 pcn Hey, I'm trying to use salt-ssh with the salt-formula to try installing salt on an AWS ubuntu 16.04 AMI I've launched.
15:45 tapoxi pcn: use salt-cloud?
15:45 pcn I've tried using the sudo roster option, and --sudo,  and also putting the thin-dir in /home/ubuntu, but for some reason I keep getting a permission denied on the writing tot he thin directory
15:45 pcn tapoxi: that only really works when I already have a saltmaster launche.d
15:45 pcn I'm working on defining a bootstrapping process that is as salt-baseed as possible
15:46 pcn So to be clear, I am trying to install a salt-master.
15:46 djgerm joined #salt
15:47 racooper joined #salt
15:47 cscf joined #salt
15:48 tapoxi pcn: ahh ok. well you can use salt-cloud and tell it to set your new machine as a master and just have salt-ssh on your laptop. you could include the salt bootstrap script in your cloud-config for ec2 so it configures itself, I did the latter
15:48 tapoxi haven't run into sudo issues with salt-ssh
15:50 tapoxi pcn: if you want to go the cloud-init route I can send you what I have
15:50 spuder joined #salt
15:50 foundatron joined #salt
15:51 edrocks joined #salt
15:52 pcn Hm. OK, so you're saying that salt-cloud, without a running master, can  be used to launch a node?
15:55 sp0097 joined #salt
15:55 pcn tapoxi: am I understanding that correctly?
15:57 jeffspeff joined #salt
15:58 djgerm1 joined #salt
16:00 djgerm joined #salt
16:05 muxdaemon joined #salt
16:06 tapoxi pcn: I think the only thing salt-cloud needs the master for is autoaccepting the key, however I did it with a master.
16:07 tapoxi to clarify, I used cloud-init to configure my first master in my openstack environment. I used that machine to provision my aws master via salt-cloud
16:07 dps joined #salt
16:08 orionx joined #salt
16:09 gableroux joined #salt
16:10 orionx_ joined #salt
16:10 ivanjaros joined #salt
16:11 tapoxi my cloud-init script sets up a few basic network settings and downloads an executes bootstrap_salt.sh and a wrapper with my install options (upgrade OS first, configure gitfs, install a few packages) that's encoded in gzip+base64
16:11 sh123124213 joined #salt
16:11 pcn OK, cool.
16:11 ronnix joined #salt
16:12 tapoxi after the bootstrap the master is configured and it calls state.apply on itself to do things that suck in cloud-init
16:12 pcn OK, got it.
16:13 pcn I think I found my salt-ssh problem - some paths in the master file were typo and had some newlines missing, and between those issues the errors reported were coming from hard to understand places
16:13 bakins joined #salt
16:13 pcn *I* understood what I wanted it to say :)
16:13 tapoxi tl;dr cloud-init is probably the simplest option, since you don't have any need for salt-ssh in the future, just reference it when spawning your vm
16:18 mdhas joined #salt
16:19 pcn And the last part is that trying to have multiple file-roots with salt-ssh seems broken
16:19 WesleyTech joined #salt
16:19 pcn I'm not sure I agree with the conclusion for my environment, but I'll look at it again in a bit.
16:20 spuder joined #salt
16:20 DammitJim joined #salt
16:23 DEger joined #salt
16:27 tiwula joined #salt
16:27 muxdaemon joined #salt
16:28 scottk_ joined #salt
16:29 scottk_ while writing an execution module, I'm trying to use grains to make sure something only runs on ubuntu. __grains__.get['os'] is not working. it says NameError: name '__grains__' is not defined. anyone know how to fix this? or a better solution?
16:30 babilen scottk_: Where are you using it?
16:30 babilen You could also keep it in a specific SLS that you only target to Ubuntu boxes in your top.sls
16:30 scottk_ I'm writing a python script right now.
16:30 brd joined #salt
16:31 babilen Could you paste it?
16:33 scottk_ <script src="https://gist.github.com/scottking2/d82f66260a57562e92274a04fe643dce.js"></script>
16:33 raspado joined #salt
16:33 scottk_ https://gist.github.com/scottking2/d82f66260a57562e92274a04fe643dce
16:33 scottk_ whoops
16:33 raspado how can I query multiple vars such as "salt -G "role:master,environment:prod" test.ping"
16:34 raspado rather, target multiple grains
16:36 babilen scottk_: Grains aren't defined when the module is loaded initially (they are monkey patched in later on)
16:36 babilen So, you'd have to write a proper function
16:36 scottk_ meaning that I'd have to put this into the execution module location and run it through salt for it to work properly?
16:36 pcn scottk_: did you import salt etc.?
16:36 fracklen joined #salt
16:37 babilen scottk_: If you want salt to run it then yes, that's the case
16:37 scottk_ great. Thanks. :)
16:38 pcn Oh, sorry, you don't need that in modules, but in runners
16:38 raspado oh I got it to work so I guess to query multiple grains is to do a compound match like so salt -C 'G@role:master and G@environment:prod' test.ping
16:39 pcn raspado: yeah
16:39 babilen raspado: That query would match minions in "prod" environment" with "master" in the role grain
16:39 raspado got it thx
16:45 armyriad joined #salt
16:50 scsinutz joined #salt
16:53 sjorge joined #salt
16:53 sjorge joined #salt
16:55 edrocks joined #salt
16:56 Ch3LL joined #salt
16:56 ronnix joined #salt
16:57 fracklen joined #salt
16:58 sh123124213 joined #salt
17:01 scsinutz joined #salt
17:02 DammitJim how does one use the user.present with the system option?
17:02 user15131 joined #salt
17:02 DammitJim I'd like to specify a range of UID that can be used to create the user
17:02 DammitJim for some reason, it's creating the users in the 10000 range instead of 1000
17:03 scottk_ Where do execution modules need to be located to run?
17:03 user15131 Is it possible to use salt "network.manage" on an "ens 160" network interface?
17:05 DanyC joined #salt
17:07 cscf user15131, should work with any interface name, why?
17:07 anotherzero joined #salt
17:07 cscf How can I get salt virt to set a static IP on the VM before it boots?
17:07 shanathon joined #salt
17:08 cscf Do I change "seed_cmd" ?
17:09 shanathon hello - i have 2 minions in connected to my salt master. 1 windows and 1 linux. I set up pillars to target the windows minion which works fine, but now it interferes with the high state of the linux minion.
17:09 shanathon I get the error " Data failed to compile: ----------     Pillar failed to render with the following messages:"
17:09 shanathon i can show you the the top files for both the pillar and the high state...
17:10 cscf shanathon, sure, pastebin them somewhere
17:10 shanathon ok one sec.
17:11 tapoxi this proper usage of pillar.get? {% if salt['pillar.get']('elasticsearch:use_repo') == 'True', True %}
17:11 cscf tapoxi, looks correct
17:12 shanathon http://pastebin.com/Ng85Ezeb
17:12 cscf tapoxi, oh, if it's not working, try putting the fallback "True" in the pillar.get args
17:12 shanathon that is the pillar high top file
17:12 tapoxi cscf: the args?
17:12 tapoxi cscf: confused
17:12 cscf {% if salt['pillar.get']('elasticsearch:use_repo', True) == 'True' %}
17:13 shanathon http://pastebin.com/KZdQ72t5
17:13 shanathon second link for the top high state file (in /srv/salt)
17:13 user15131 cscf: I get this error "Comment: Invalid option -- Interface: ens160, Option: ens, Expected: [eth|bond|alias|clone|ipsec|dialup|bridge|slave|vlan|pppoe|source]"
17:14 cscf user15131, sounds like you are trying to use ens as a type?  The interface name is ens160, the type is eth
17:15 tapoxi cscf: AHH thanks! I messed up the formatting
17:16 shanathon anything else that would be helpful to provide? please let me know.
17:16 cscf shanathon, the error message
17:17 user15131 cscf: You are correct, thanks for the help. So does type refer to the type of connection then? For some reason I thought it related to network interface name.
17:17 shanathon ill show the complete result of the high state.
17:17 shanathon one sec.
17:18 shanathon http://pastebin.com/1HpPrttm
17:18 cscf user15131, it's the type of interface.  So if it's a standard ethernet nic, you want 'eth'.  Interface names are mostly arbitrary strings.
17:19 inad922 joined #salt
17:19 cscf shanathon, when the linux box's top file is evaluated, it's "base:" and nothing else.  if you have a colon like that, and nothing below, it's like having a ( without a )
17:20 shanathon hmm
17:20 cscf You need to have something there
17:21 user15131 Alright thanks cscf
17:21 shanathon are you talkign about the top file for the pillar?
17:21 cscf Even something that will never match might work, like 'dummy': - some.state
17:21 shanathon or the high state
17:21 cscf shakalaka, the top file
17:21 shanathon ok
17:22 shanathon i thought i did have something below.
17:23 shanathon {% if grains['os'] == 'RedHat' %}     'cloud:aws':     - match: grain
17:23 shanathon that line is right under neath base
17:23 shanathon then it applies "- ops.aws.motd"
17:27 sarcasticadmin joined #salt
17:29 muxdaemon joined #salt
17:38 mdhas joined #salt
17:40 shanathon @cscf can you clarify what you mean by nothing below?
17:40 shanathon from what i can see, I do have syntax below
17:44 shanathon pwd
17:44 shanathon sorry ignore
17:46 mavhq joined #salt
17:50 jeffspeff joined #salt
17:58 mikecmpbll joined #salt
18:00 shanathon ok looks like it was the top file for the pillar
18:00 shanathon here is the new file that resolved the issue in case it helps for future ref.
18:00 palo left #salt
18:01 shanathon http://paste.debian.net/plain/915163
18:01 shanathon cheers. ty.
18:06 scsinutz joined #salt
18:09 SaucyElf joined #salt
18:14 brasticstack joined #salt
18:16 edrocks joined #salt
18:17 gableroux joined #salt
18:21 brasticstack I found some weirdness with grains.append from the cli, I'm wondering if this would be worth filing an issue on github: http://pastebin.com/LC0kuEee
18:23 brasticstack ^ the duplicate checking for lists doesn't apply when append a list, but does when appending single items.
18:25 s_kunk joined #salt
18:27 brasticstack arg! Apologies, that paste was missing the context. New one: http://pastebin.com/yb7NfiQ4
18:27 PatrolDoom joined #salt
18:32 Edgan joined #salt
18:32 renaissancedev joined #salt
18:33 scsinutz1 joined #salt
18:37 Heartsbane brasticstack: whatsup
18:39 brasticstack hey duder
18:39 Heartsbane Lunch in 20?
18:39 brasticstack sure
18:46 renaissancedev I've got a couple of questions about the development workflow for formulas that are contributed to the saltstack-formulas organization.
18:46 renaissancedev In particular, I have all of my formulas using the BSD-3-clause license so would I need to relicense them Apache 2 to submit them?
18:46 renaissancedev Also, once they are forked into the organization, should I then begin developing against the repository that is in the saltstack-formulas organization, or is it more typical to continue development on the original repo and then issue PRs into the saltstack-formulas repo?
18:48 nidr0x joined #salt
18:56 DammitJim joined #salt
18:57 tkojames joined #salt
18:59 orionx joined #salt
18:59 rimk joined #salt
19:00 orionx_ joined #salt
19:02 user15131 {%- for interface_name, interface in network.interface.iteritems() %}  {%- set interface_name = interface.get('name', interface_name) %} , How would I run this command from the salt master to view the ouput?
19:05 ruxu joined #salt
19:05 brasticstack @user15131 If that code's in a .sls, you could try running 'salt myminion state.show_sls my.state'
19:09 icebal joined #salt
19:10 tkojames So we have are moving our salt master to a different server. Some of our minions have the IP of the master hardcoded into the salt master field in minion config file. Is there command or sls file we could create to either make sure the  option is either commented out or set all to have certain server name? Or a salt cmd.run command?
19:12 cmarzullo https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.line
19:12 cmarzullo tkojames: ^
19:14 user15131 @brastictack I will try that
19:14 cliluw joined #salt
19:14 tkojames @cmarzullo thanks! next time should look better at the docs my bad
19:18 cmarzullo no worries m8!
19:23 dps joined #salt
19:24 dps joined #salt
19:25 fracklen joined #salt
19:27 cscf Anyone know what this virt.migrate error might be caused by? https://gist.github.com/lordcirth/8ce6bef754ed6043b44158e272a734e9
19:28 cscf It sounds like maybe accessing "list(origin_data.keys())" at index 0 isn't valid.  Maybe it's an empty list?
19:31 PatrolDoom joined #salt
19:32 ChubYann joined #salt
19:32 Xopher joined #salt
19:33 orionx joined #salt
19:34 austin_ joined #salt
19:36 cyborg-one joined #salt
19:39 felskrone joined #salt
19:39 Praematura joined #salt
19:50 debian112 joined #salt
19:55 rimk joined #salt
19:57 dyasny joined #salt
19:59 redmage123 joined #salt
20:00 redmage123 Hello all.  is service.running supposed to ensure that a specific service is running on a minion?  I.e. if the service isn't started, will service.running restart it?
20:05 BF_ joined #salt
20:07 cscf redmage123, yes, it will start the service, and by default, set it to start on boot
20:09 ALLmightySPIFF joined #salt
20:10 dps joined #salt
20:12 lionel joined #salt
20:16 brasticstack @cscf: "KeyError: 0"  The list is definitely empty.
20:16 cscf brasticstack, any idea why or what I can do about it?
20:16 Trauma joined #salt
20:16 cscf I followed the guide on salt virt migration
20:18 brasticstack I'm not familiar with virt. It looks like origin_data is empty also.
20:22 brasticstack @cscf: It looks like if it can't find a VM by the name specified in the migrate command, it'll return an empty dict.
20:25 sfxandy_ joined #salt
20:29 brasticstack I'm curious about this:  https://github.com/saltstack/salt/issues/28379  - If execution modules aren't supposed to be stateful, then why does grains.append disallow appending the same value twice? (unless you format it as a list)
20:29 saltstackbot [#28379][MERGED] Grains.append continues to append value  | When I run the following command:...
20:30 kojiro joined #salt
20:33 cscf brasticstack, well, there is definitely a VM by that name, created minutes before by virt.init
20:39 brasticstack @cscf: weird. Here's where I was looking for answers: https://github.com/saltstack/salt/blob/develop/salt/runners/virt.py#L472
20:41 Pulp joined #salt
20:42 DammitJim joined #salt
20:46 ninjada joined #salt
20:47 scoates joined #salt
20:51 rimk joined #salt
20:54 shanathon joined #salt
20:54 shanathon hello - is there a built-in scheduling mechanism within the salt master to use
20:54 shanathon to apply the high state
20:54 cmarzullo shanathon: yeah it's built in. just assign pillar.
20:54 orionx_ joined #salt
20:54 shanathon or do users just use cron or some OS scheduler
20:55 cmarzullo https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs
20:55 shanathon thank you!
20:55 cmarzullo np
20:56 cmarzullo we assign an highstate hourly to all our minions
21:00 user15131 Is there a way to get the interface name through grains?  Trying to get grains to output "ens160" or "eth0" depending on the minion
21:00 WesleyTech_ joined #salt
21:01 scoates joined #salt
21:01 cmarzullo salt-call grains.get ip4_interfaces
21:02 cmarzullo salt-call grains.get hwaddr_interfaces
21:04 whytewolf if you want a route not involoving grains there is also network.interfaces() or network.ifacestartswith()
21:05 toastedpenguin joined #salt
21:06 toastedpenguin left #salt
21:06 raspado joined #salt
21:07 raspado if i kick off a job manually by running "salt-call backup.run_backup" and this exact job is scheduled in salt to run every 6 hours. If the manual job I run runs for more than 6 hours, will the scheduled task run a duplicate job?
21:07 numkem joined #salt
21:09 cmarzullo dunno. would have to test it out.
21:13 gableroux joined #salt
21:14 scsinutz joined #salt
21:14 edrocks joined #salt
21:15 tapoxi raspado: probably.
21:15 raspado hmmm k
21:15 tapoxi raspado: in my deployment runner I set a lock file to avoid running into this problem
21:15 raspado i should probably disable the schedule then
21:16 tapoxi just have it create a /var/run/backup.lock when it starts, and delete when it finishes
21:18 raspado yeah makes sense
21:18 raspado doing a prod migration right now, i didnt expect this one backup to take forever
21:27 user15131 @cmarzullo, @whitewolf, thanks, The network.ifacestartswith might work for what I need. Once I figure this part out {% set host = salt['network.ifacestartswith'] ('10') %}
21:28 redmage123 joined #salt
21:28 cmarzullo your welcome
21:31 Tanta joined #salt
21:33 DammitJim joined #salt
21:33 DammitJim how does salt decide what UID to use for a new user?
21:34 cmarzullo Proobably just passes it throgh to the underlying useradd command
21:36 cmarzullo yeah just looked at source. does the same as useradd
21:41 bltmiller joined #salt
21:46 numkem joined #salt
21:46 fracklen joined #salt
21:47 rimk joined #salt
21:50 XenophonF hey all - has the cron.present state's behavior changed in 2016.11?
21:50 XenophonF it's no longer using identity kwarg to tag managed cron jobs
21:51 edrocks joined #salt
21:53 DEger joined #salt
21:54 XenophonF s/identity/identifier
22:05 WesleyTech_ joined #salt
22:12 tapoxi hostname mystery solved, the network state doesn't call hostnamectl
22:19 rubenb joined #salt
22:23 twork_ hi friends.  i once asked long ago, about the layout described at: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt4.html#environment-configuration
22:24 twork_ i gave up then; i'm trying again now; and i've tried a few different ways to fill in the gaps and all i get is different sorts of errors.
22:25 twork_ and i seem to recall being told, way back when, something like, "yeah that doesn't actually work, sorry, we're wrestling with it."  my recollection could be way off base.
22:29 twork_ i've started a couple of posts describing my present efforts but i thought, before i get too deep into describing everything i've tried, i'd ask if my recollection is true.  does that layered file root approach really work the way it's described there?
22:33 jeddi joined #salt
22:34 zulutango joined #salt
22:41 CeBe joined #salt
22:42 ninjada joined #salt
22:42 prg3 joined #salt
22:47 onlyanegg joined #salt
22:50 XenophonF hm
22:50 XenophonF are files from the base environment available in other environments?
22:50 XenophonF i didn't think that was the case
22:50 XenophonF i'll have to check that later - it'd certainly simplify my salt master config
22:51 XenophonF ttyl it's boys night and we're off to the bar
22:51 XenophonF duces
22:51 XenophonF deuces
22:51 XenophonF ducks
22:51 twork_ mmm, bar
22:51 * XenophonF fails at being cool
22:54 rimk joined #salt
22:54 ekristen Anyone familiar with writing execution modules and scheduling functions? It seems that it does not like that I’m using __utils__ to call a function but only when calling it as a schedule, using it any other time it works just fine
22:57 whytewolf wait, so you are calling a custom module in a schedule and that custom module has a __utils__ call that is failing? or you are trying to call __utils__ directly in a schedule?
22:58 whytewolf if the first, that would be a bug report.
22:59 ekristen whytewolf: the first, bug report eh? :( kk, I’ll put it together
23:02 twork_ ooooh, i think i may see my issue.  or one of them.  https://docs.saltstack.com/en/latest/ref/file_server/backends.html#defining-environments ...talks about "foo.txt", but, i've been trying to dev/test/base with sls files.
23:06 twork_ ...and my current error is "SLS IDs need to be globally unique".
23:06 mikecmpbll joined #salt
23:08 ekristen whytewolf: https://github.com/saltstack/salt/issues/39491
23:08 saltstackbot [#39491][OPEN] Unable to schedule a custom module function that references a custom utils function | Description of Issue/Question...
23:12 twork_ eh, nope, that wasn't it... take out the sls but leave in the flat file piece and i get "No matching sls found for 'motd' in env 'dev'".  i'll shut up now and go back to tinkering.
23:21 Trauma joined #salt
23:24 gmoro_ joined #salt
23:24 user15131 When you use network.managed, is it possible to make /etc/network/interfaces input  #broadcast 255.255.255.255?
23:24 ProT-0-TypE joined #salt
23:25 ProT-0-TypE can I use beacons with in masterless mode?
23:26 amir_ joined #salt
23:26 CeBe joined #salt
23:27 DEger_ joined #salt
23:30 amir_ Hi guys, I am very new to salt-stack and tried to do my homework but I cannot seem to figure out how to group minions based on hosts' route53 record (aws vac)? E.g., I create a zk node and add a record set "zk.zookeeper.domain.com" -> ip. Now, in my master config I define a nodegroup :*.zookeeper.domain.com". However, when I try to ping using this group it cannot find any minions in this group. I can ping if I use a wildcard though, so they
23:31 nidr0x joined #salt
23:32 Guest89748 joined #salt
23:32 amir_ One immediate way I can think of is to run a boto3 script to iterate through all record sets in route53 and get this host's dns name. But I am sure I am missing something and there is a simpler way to deal with this.
23:37 amir_ if I define a nodegroup using host's "private hostname", <IP>-us-west-2.compute.internal - ping also works.
23:41 onlyanegg I'm trying to write a deploy script using a salt state file that doesn't exit until the service is healthy on the ELB
23:42 spuder joined #salt
23:42 onlyanegg Is there a way to say until it's healthy, don't exit?
23:42 user15131 what are you inputing on the salt master? "salt -N nodegroup test.ping" something like that
23:42 orionx joined #salt
23:43 amir_ yeah, "salt -N nodegroup test.ping" it works if I use an internal dns name to define the group
23:43 onlyanegg I'm doing something similar using cmd.run and bash's until, but I'd rather not do that since I'll be invoking salt's boto module for this anyway...
23:47 onlyanegg amir_: I'm not super familiar with nodegroups, but I've never had to use them. My roles are defined by hostname, so I don't have any reason to create nodegroups.
23:48 CeBe joined #salt
23:49 onlyanegg I guess I'm wondering whether you need to use them...
23:50 amir_ Thanks onlyanegg. I need to provision based on the "logical service" the node belongs to. It would be annoying to change a master config every time I add/delete/replace an instance.
23:53 orionx_ joined #salt
23:53 onlyanegg The only use I see for nodegroups is if hosts with totally different names need to be configured in the same way. Like if onlyanegg.local and amir_.local were both web servers. If your hostnames / minion_ids follow a convention, you can use globbing or regex to target minions.
23:59 dxiri joined #salt

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