Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-09-12

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

All times shown according to UTC.

Time Nick Message
00:09 fannet joined #salt
00:29 schemanic_ Hey, I'm having a salt-cloud issue
00:29 schemanic_ apparently something is wrong with a yum repo?
00:33 flowstate joined #salt
00:36 nidr0x joined #salt
00:37 hasues joined #salt
00:37 hasues left #salt
00:54 John_Kang joined #salt
00:54 systo joined #salt
00:55 hemebond Nothing to render a pillar into XML? Aw...
00:57 * MTecknology blicks
00:57 MTecknology because I forgot how to blink
00:58 edrocks joined #salt
01:01 synapse joined #salt
01:05 AvengerMoJo joined #salt
01:24 PerilousApricot joined #salt
01:26 subsignal joined #salt
01:33 flowstate joined #salt
01:36 sp00ky left #salt
01:45 catpigger joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.12, 2016.3.3 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
02:04 bastiand1 joined #salt
02:13 hemebond joined #salt
02:26 kshlm joined #salt
02:32 flowstate joined #salt
02:32 barmaley joined #salt
02:39 systo joined #salt
02:40 ssplatt joined #salt
02:48 badon joined #salt
02:57 bltmiller joined #salt
03:01 edrocks joined #salt
03:14 schemanic_ joined #salt
03:14 schemanic_ hi, can anyone help me figure out this sls render error?
03:15 schemanic_ https://gist.github.com/anonymous/0a7ab3ff090b84bbc7369cbd79aa5ad8
03:15 hemebond schemanic_: You need to paste the part of the SLS it's referring to.
03:16 schemanic_ sls file: https://gist.github.com/anonymous/f837e05914e742339f254099449bae32
03:17 schemanic_ I think its an indentation error but I cannot understand where
03:18 hemebond Are your spaces regular spaces?
03:18 schemanic_ they should be. How would I know?
03:18 schemanic_ Im using atom, then pasting into vim
03:18 hemebond Your editor.
03:18 hemebond Is map.jinja okay?
03:19 schemanic_ I haven't changed it.
03:20 schemanic_ it came from a formula
03:20 hemebond Ah.
03:21 schemanic_ https://github.com/saltstack-formulas/users-formula/blob/master/users/map.jinja
03:22 schemanic_ can I have a formula name and a state name be the same as long as the formula is under a directory?
03:22 hemebond No.
03:22 schemanic_ That might be it then.
03:22 hemebond Not if they both resolve to the same directory.
03:22 hemebond er, path
03:23 schemanic_ no they dont
03:23 hemebond Where is the formula?
03:23 schemanic_ I have /srv/salt/sftp_jail.sls and /srv/formulas/user/sftp_jail.sls
03:24 schemanic_ would those both resolve to the same salt path? I dont think so
03:24 hemebond Why is the SLS in the Gist called users.sftp_jail.sls?
03:24 schemanic_ because thats how I'm referring to it in the top file
03:24 hemebond Uh... Oh I see.
03:25 hemebond So the SLS you pasted is from the formula. Got it.
03:25 schemanic_ well thats my formula
03:25 schemanic_ I made sftp_jail.sls
03:26 schemanic_ I also have another one that creates a directory somewhere
03:26 schemanic_ as I mentioned before
03:26 schemanic_ users.sftp_jail runs the permissions on the user directories, sftp_jail/init.sls creates the top level sftp directory
03:30 hemebond Well, I can't really see a problem. The master log might tell you more.
03:31 schemanic_ It seemed to be the names of the files
03:32 onlyanegg joined #salt
03:32 hemebond oh?
03:32 schemanic_ yeah
03:32 schemanic_ so I had /srv/salt/sftp_jail/init.sls and /srv/formulas/users/sftp_jail.sls
03:33 schemanic_ I changed /srv/salt/sftp_jail to /srv/salt/sftp_chroot
03:33 schemanic_ that got my states running again
03:33 hemebond That seems very odd.
03:33 hemebond How did you install your formula?
03:33 schemanic_ I downloaded the zip package, unzipped it
03:33 schemanic_ I dont want to install from git
03:33 hemebond Sure, but how did you get it into the Salt master?
03:34 hemebond Like, symlinked from states to the subdirectory or using the master config?
03:34 schemanic_ with the custom formula sls (sftp_jail.sls) I went into /srv/formulas/user  and called vim sftp_jail.sls
03:34 schemanic_ then I wrote it in there
03:35 schemanic_ master config says file roots are /srv/salt and /srv/formulas
03:35 hemebond Ah, so you added it as a file_root, okay.
03:35 hemebond That's another way to do it.
03:36 schemanic_ do most people do /srv/salt/formulas?
03:36 hemebond I still don't understand why you had a naming conflict.
03:36 schemanic_ well now I have another problem
03:36 schemanic_ getpwnam() argument 1 must be string, not OrderedDict
03:37 schemanic_ it doesnt seem to like that I'm telling it to build a path from {{ home }}{{ sftp_home }}
03:38 fgimian joined #salt
03:38 schemanic_ if I want to build a string from two variables do I need to call some sort of contatenation function?
03:39 hemebond var1 ~ var2
03:39 hemebond But that's only within {% %}
03:40 schemanic_ yeah
03:40 schemanic_ Whats this error about then?
03:40 schemanic_ it's on the users.sftp_jail.sls gist I posted
03:41 hemebond Well, there's no getpwam in your Gist so I imagine it's somewhere else in the formula.
03:41 schemanic_ what is getpwam?
03:41 hemebond "getpwnam() argument 1 must be string, not OrderedDict"
03:41 hemebond getpwnam
03:42 schemanic_ yeah, but what is calling it? I'm just telling it to use the user
03:43 hemebond You do understand that including "users" will run that file too, yes?
03:43 hemebond So you're going to be creating groups and users and then creating your SFTP stuff.
03:43 schemanic_ oh I'm an idiot
03:43 schemanic_ the formula I copied this from uses {{ name }} not {{ user }}
03:47 subsignal joined #salt
04:18 komputes joined #salt
04:21 badon joined #salt
04:27 schemanic_ Okay
04:27 schemanic_ Riddle me this:
04:27 schemanic_ Why is user.present - password not the same as calling passwd?
04:28 fgimian joined #salt
04:32 ajw0100 joined #salt
04:37 ajw0100 joined #salt
04:52 subsignal joined #salt
04:52 jeddi joined #salt
05:00 Shirkdog joined #salt
05:03 edrocks joined #salt
05:04 XenophonF it isn't?
05:07 XenophonF oh that's right, password takes a hash on unix/linux
05:07 XenophonF well it's because on unix/linux, user.present and friends edit the local account database directly
05:08 XenophonF while on windows, the database format being binary and somewhat poorly documented, salt doesn't
05:09 XenophonF iirc on windows it calls out to net.exe to create accounts
05:09 XenophonF as to why this dichotomy, i don't know
05:10 XenophonF probably b/c in the former case it's possible to tell when one's making changes, whereas on windows, you wouldn't necessarily know that the account password is already set without trying it
05:18 badon joined #salt
05:33 yomilk joined #salt
05:41 harry_rumballs joined #salt
05:43 MTecknology I'm trying to figure out how to share file contents with the master via mine
05:47 MTecknology I'm half considering having a jinja template that just copies the file contents into what I hope is a proper yaml structure into a config file...
05:48 jxm_ joined #salt
05:51 MTecknology I guess then that would be grains, but grains are easy to share
05:51 MTecknology heh... I actually don't hate this idea
05:52 PerilousApricot joined #salt
05:52 rdas joined #salt
05:53 lompik joined #salt
05:53 subsignal joined #salt
05:56 om joined #salt
06:11 colttt joined #salt
06:14 badon joined #salt
06:19 felskrone joined #salt
06:26 nebuchadnezzar joined #salt
06:29 yuhlw_ joined #salt
06:31 krymzon joined #salt
06:37 MTecknology holy crap, that was easy
06:38 ivanjaros3916 joined #salt
06:39 babilen MTecknology: What did you end up with?
06:44 MTecknology babilen: A state that uses - context: {% for foo in bar %} {{ foo }}: {{ salt['cmd.run']('cat /etc/foo/' ~ keyname ~ '/filename')|indent(14) }} {% endfor %}  - name: /etc/salt/minion.d/foo.conf  - watch_in: - service: salt-minion
06:44 MTecknology ^ file.managed
06:46 MTecknology I tried using salt['cmd.run'] in the template, but that didn't seem to exist
06:53 MTecknology babilen: do I sound smart or stupid right now?
06:54 subsignal joined #salt
07:03 kbaikov joined #salt
07:04 oyvindmo joined #salt
07:05 edrocks joined #salt
07:06 Reverend g'mornin chaps.
07:06 Reverend everyone had a nice weekend I hope?
07:07 MTecknology no
07:07 Reverend :'(
07:11 kbaikov joined #salt
07:11 barmaley joined #salt
07:12 pfc joined #salt
07:14 ronnix joined #salt
07:17 JohnnyRun joined #salt
07:24 babilen MTecknology: I don't quite see how that gets data into the mine
07:27 MTecknology babilen: mine_functions: foo: - mine_function: grains.get \n - foo
07:28 toanju joined #salt
07:28 * MTecknology needs to nap now that he got this far
07:28 babilen Ah .. and you define a grain in the template?
07:29 babilen If so: I would suggest to define a custom grain that does the same thing
07:29 babilen But, I guess, your approach works well also
07:54 geomacy joined #salt
07:56 krymzon joined #salt
07:58 lero joined #salt
08:04 Hybrid joined #salt
08:05 impi joined #salt
08:13 keimlink joined #salt
08:14 jhauser joined #salt
08:17 infrmnt joined #salt
08:25 LiamMon joined #salt
08:45 SWA joined #salt
08:47 SWA in a state i define {% set something = '#somethingelse#' %} (with the #), when called the variable returns None, how so?
08:49 N-Mi joined #salt
08:51 ronnix_ joined #salt
08:51 philhuk joined #salt
08:56 subsignal joined #salt
09:05 hoonetorg joined #salt
09:08 edrocks joined #salt
09:13 Rebus joined #salt
09:20 agend joined #salt
09:42 hemebond SWA: Likely an issue elsewhere.
09:42 hemebond Have you tried " instead of ' ?
09:42 hemebond (just to test)
09:42 SWA hemebond: yes, tried single quote, escaping, etc
09:43 SWA if i remove the preceding # the variable is applied correctly
09:57 subsignal joined #salt
10:01 hemebond Oh really? That seems odd.
10:02 hemebond Oh wait.
10:02 hemebond What are you using it for?
10:02 hemebond # is used for commenting in YAML.
10:02 hemebond So if you're using it in a pillar or state it will think it's a comment.
10:03 hemebond swa ^
10:04 kbaikov joined #salt
10:42 kbaikov joined #salt
10:43 flowstate joined #salt
10:45 PerilousApricot joined #salt
10:52 teryx510 joined #salt
10:58 subsignal joined #salt
11:04 napsterX joined #salt
11:05 napsterX left #salt
11:10 edrocks joined #salt
11:18 LiamMon_ joined #salt
11:34 voxpop joined #salt
11:37 cyborg-one joined #salt
11:41 Emkeh joined #salt
11:46 ronnix joined #salt
11:54 Arnold joined #salt
11:54 PerilousApricot joined #salt
11:54 Guest36324 hello
11:55 Guest36324 i need help in making winrepo work
11:55 impi joined #salt
11:57 Guest36324 i am trying to use salt winrepo in a close environment and its always says : cant locate package *something*
11:58 misconfig joined #salt
12:00 subsignal joined #salt
12:03 schemanic_ joined #salt
12:03 dendazen joined #salt
12:08 ecdhe joined #salt
12:09 fredvd joined #salt
12:10 flowstate joined #salt
12:11 ssplatt joined #salt
12:12 flowstate joined #salt
12:14 manji joined #salt
12:22 edrocks joined #salt
12:29 edrocks joined #salt
12:29 west575 joined #salt
12:30 edrocks joined #salt
12:31 DanyC joined #salt
12:32 DanyC hi all, anyone tried to install/ deploy salt minion on CoreOS  ?
12:34 XenophonF Guest48747: we're going to need more than that to try to figure out what's wrong
12:35 XenophonF at least the complete error message would help - post it to gist.github.com or bpaste.net or paste.debian.net or something
12:42 PerilousApricot joined #salt
12:48 impi joined #salt
12:59 racooper joined #salt
13:01 subsignal joined #salt
13:01 dyasny joined #salt
13:02 jhauser joined #salt
13:03 numkem joined #salt
13:04 zer0def joined #salt
13:08 ferbla joined #salt
13:12 flyboy82 joined #salt
13:17 west575_ joined #salt
13:18 schemanic_ joined #salt
13:24 west575 joined #salt
13:25 t0m0 joined #salt
13:32 LiamMon joined #salt
13:37 Reverend yo - is tgere a noop in salt?
13:37 perfectsine joined #salt
13:37 babilen tgere?
13:38 Reverend blergh
13:38 Reverend typo. There.
13:38 Reverend :)
13:38 babilen Ah!
13:38 babilen There is
13:38 babilen One second please
13:38 Reverend do tell babilen
13:38 Reverend no problem :)
13:39 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html#salt.states.test.succeed_without_changes
13:39 Reverend thank you darling.
13:41 Tanta joined #salt
13:43 bluenemo joined #salt
13:43 toanju joined #salt
13:49 catpig joined #salt
13:50 flowstate joined #salt
13:50 Morrolan joined #salt
13:52 west575_ joined #salt
13:54 flowstat_ joined #salt
13:59 flowstate joined #salt
14:00 west575 joined #salt
14:02 subsignal joined #salt
14:03 dendazen joined #salt
14:04 flowstate joined #salt
14:05 mpanetta joined #salt
14:05 pppingme joined #salt
14:07 t0m0 joined #salt
14:07 Morrolan joined #salt
14:08 ekristen joined #salt
14:10 flowstate joined #salt
14:11 Brew joined #salt
14:13 beardedeagle joined #salt
14:13 hasues joined #salt
14:13 hasues left #salt
14:15 dyasny joined #salt
14:15 CeBe joined #salt
14:19 LiamMon_ joined #salt
14:21 teryx510 joined #salt
14:26 lovecraftian joined #salt
14:29 ivanjaros joined #salt
14:30 LiamMon joined #salt
14:31 bowhunter joined #salt
14:35 LiamMon_ joined #salt
14:38 hoonetorg joined #salt
14:39 west575_ joined #salt
14:43 _JZ_ joined #salt
14:44 west575 joined #salt
14:44 flowstate joined #salt
14:45 flowstate joined #salt
14:47 Annihite1 joined #salt
14:47 Annihite1 Hi
14:48 Reverend Annihite1 hi
14:48 _JZ_ joined #salt
14:48 Annihite1 I've taken mysql-formula from github, in my base dir I have: net.sls and top.sls, state.apply net.sls works, however top.sls doesn't
14:49 Annihite1 My top.sls contains: base:
14:49 Annihite1 - mysql-formula
14:49 Annihite1 (and mysql-formula directory is placed in base)
14:49 west575_ joined #salt
14:49 Reverend you shouldn'
14:49 Reverend sorry - i keep pressing carriage return by accident
14:49 armonge joined #salt
14:49 Reverend anyway... you couldn't need to include your forumla into your top.sls
14:50 Reverend if it's in the right folder, salt should see it. but you need to restart your master (AFAIK) to use it like you would a builtin
14:50 Annihite1 Yes, I've read about it. For my the best option is to execute this formula directly, but nothing works
14:50 Reverend whats the github link?
14:50 Annihite1 No, i cloned the repo
14:50 Annihite1 And this is from master debug:
14:50 Annihite1 [DEBUG   ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pull.ipc
14:50 Annihite1 [DEBUG   ] Sending event - data = {'fun_args': ['mysql-server'], 'jid': '20160912160613753383', 'return': ["No matching sls found for 'mysql-server' in env 'base'"], 'retcode': 1, 'success': True, 'cmd': '_return', '_stamp': '2016-09-12T14:06:14.090694', 'fun': 'state.apply', 'id': 'u3', 'out': 'highstate'}
14:51 jenastar joined #salt
14:51 Reverend No matching sls found for 'mysql-server' in env 'base'
14:51 Reverend there's your problem.
14:51 Annihite1 Yes, but I've tried combinations: mysql-server/mysql.client, etc
14:51 Annihite1 So many attempts
14:52 Reverend do you have the github link for that formula you're using so i can check the readme
14:52 Annihite1 https://github.com/saltstack-formulas/mysql-formula
14:53 Reverend and that's in the forumla/ folder right?
14:53 Annihite1 I suppose this can be a simple mistake but I've been fighting with this for 2 hours :)
14:54 edrocks_ joined #salt
14:54 Annihite1 And the most important, my /etc/salt/master:
14:54 Annihite1 file_roots:
14:54 Annihite1 base:
14:54 Annihite1 - /home/mateusz/salt
14:54 Annihite1 - /home/mateusz/salt/mysql-formula
14:55 Annihite1 And I have cloned this formula at /home/mateusz/salt/mysql-formula
14:55 Reverend yeah. okay.
14:56 Annihite1 In /home/mateusz/salt there is net.sls with simple example from salt documentation and it works fine
14:57 Annihite1 I'm trying to use: salt 'u3' state.apply mysql-formula
14:57 Reverend yeah. I get the weirdest feeling that that forumla is looking for a mysql-server definition in an SLS and it can't find it... so it doesn't know what the fuck it's doing
14:57 Reverend you shouldn'
14:57 Reverend t  need to use mysql-formula
14:58 Reverend you should be able to use "state.apply mysql"
14:58 PerilousApricot joined #salt
14:58 Annihite1 [ERROR   ] Data passed to highstate outputter is not a valid highstate return: {'u3': ["No matching sls found for 'mysql' in env 'base'"]
14:59 Annihite1 THat's why I get when I try it
14:59 Reverend have you restarted your master to find the formula?
14:59 Annihite1 Yes, many times (I've tried to start with salt-master -l debug to examine the problem)
14:59 Reverend lel
15:00 Annihite1 It looks for simple problem, at a first glance, but I have no idea now
15:00 Annihite1 :)
15:00 Patch joined #salt
15:00 Reverend hmm. yeah, I can look at it in a bit and see if I can test it on my box, but I'm just debugging windows shyte atm
15:00 fer_bla joined #salt
15:01 Reverend it seems weird that it can't see the state there for you to use.
15:02 Reverend it's this line that's breaking it for you:
15:02 Reverend include:
15:02 Reverend - mysql.server
15:02 Reverend in the init.sls on the git repo
15:02 subsignal joined #salt
15:03 west575 joined #salt
15:03 Reverend have you written your pillar yet?
15:03 Reverend Annihite1 ^
15:05 ALLmightySPIFF joined #salt
15:05 nicksloan joined #salt
15:06 ALLmightySPIFF joined #salt
15:07 xmj moin
15:07 Reverend hi xmj
15:08 xmj is it possible to use the virt state's running argument to create  VMs ?
15:09 whytewolf Annihite1: what do you see if you run: salt 'minion' cp.list_master | grep mysql
15:10 west575_ joined #salt
15:11 whytewolf xmj: with a description of 'Starts an existing guest, or defines and starts a new VM with specified arguments.
15:11 whytewolf ' i would say yes it should create new VM's
15:11 Annihite1 whytewolf: it lists the files in  base/mysql-formula
15:11 sp0097 joined #salt
15:11 whytewolf base/mysql-formula?
15:12 Annihite1 Yes
15:12 whytewolf so it shows it as base/mysql-formula/mysql?
15:12 xmj whytewolf: the odd one out is it doesn't specify which hypervisor to use.
15:12 Annihite1 mateusz@xubuntu:~/salt/base$ salt 'u3' cp.list_master | grep mysq
15:12 Annihite1 - base/mysql-formula/.git/HEAD
15:12 Annihite1 [...]
15:12 Annihite1 and so on
15:12 xmj and there could be multiple (e.g. kvm / openvz)
15:12 whytewolf xmj: "running libvirt"
15:13 shoemonkey joined #salt
15:13 DammitJim joined #salt
15:13 xmj ?
15:13 whytewolf xmj: basicly you need to figure out the kwargs in module.virt to figure out how to use it
15:13 xmj right, the docs seem lacking.
15:14 subsignal joined #salt
15:14 whytewolf Annihite1: that explains why you can't just call mysql ... the mysql formula isn't a root
15:14 CeBe joined #salt
15:15 whytewolf it is expecting base.mysql-formula.mysql [which won't work once it gets to that include Reverend saw earlyer]
15:17 Annihite1 hmm
15:17 whytewolf xmj: xmj generally you don't have more then one hypervisor on a system
15:17 xmj whytewolf: again.
15:18 xmj think one "real" hypervisor (KVM/Xen) and one "not-real" one (lxc/openvz/jails)
15:19 Reverend whytewolf - I suspect it can't build the server.sls as Annihite1 hasn't given it a pillar yet to build the sls from.
15:19 whytewolf Reverend: it isn't the pillar it hasn't gotten that far. it can't find the state files
15:19 Reverend ah okay. :)
15:20 whytewolf xmj: the libvirt module speaks KVM/Xen
15:20 Reverend oh yeah - you're right. otherwise you'd get build errors with the pilla right?
15:20 Reverend whytewolf ^
15:20 whytewolf Reverend: exactly
15:20 Reverend jinjaaaaaa
15:20 Reverend channel - can you use raw python as your renderer?
15:21 whytewolf Annihite1: I saw your file_roots earlyer, did you restart the salt master after making that change
15:21 whytewolf Reverend: yes.
15:21 xmj whytewolf: you're missing the point
15:21 xmj whytewolf: libvirt speaks many things, the question is how to specify which of those virt module will use.
15:21 Reverend I KNOW THINGS
15:21 whytewolf xmj. your missing the module. I didn't say libvirt only speaks XenKVM i said the libvirt module does
15:22 xmj hm
15:23 whytewolf xmj: notice the lack of anything not Xen/KVM in this module https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.virt.html#module-salt.modules.virt
15:23 xmj the runner has a 'hypervisor' flag
15:23 xmj so maybe
15:23 whytewolf the runner isn't what the state calls
15:24 Annihite1 whytewolf: yes, I've restarted many times
15:25 Tanta joined #salt
15:25 xmj yeah this seems more like spotty docs..
15:26 whytewolf it could be. the libvirt module is kind of under used.
15:26 M-liberdiko joined #salt
15:26 xmj :-)
15:26 whytewolf it could also be under developed
15:27 whytewolf which would be why the module doens't have anything more then is_kvm_hyper and is_xen_hyper
15:28 ageorgop joined #salt
15:29 xmj heh
15:29 raspado joined #salt
15:29 xmj and in another place of that same file you find hints to esxi, which is most definitely not xen
15:29 raspado hi all, is there a way I can run this using salt's states.pkg?  "yum -y localinstall http://download.zfsonlinux.org/epel/zfs-release$(rpm -E %dist).noarch.rpm" im running this using cmd.run right now
15:29 whytewolf Annihite1: whats strange if your file roots. look nothing like the layout you presented for cp.list_master. i don't see where base is coming from
15:30 Annihite1 Hmm
15:32 whytewolf maybe ... Annihite1 you used 2 spacees right? I attribited it earlyer to just irc being badly formatted. but maybe it isn't reading your file_roots right
15:32 Annihite1 My current file roots is:
15:32 Annihite1 e_roots:
15:32 Annihite1 base:
15:32 Annihite1 - /home/mateusz/salt
15:32 Annihite1 - /home/mateusz/salt/mysql-formula/mysql
15:33 Annihite1 And for example this command:
15:33 Annihite1 mateusz@xubuntu:~/salt$ salt 'u3' cp.list_master | grep mysql | grep sls
15:33 Annihite1 - mysql-formula/mysql/client.sls
15:33 whytewolf Annihite1: the - is under the s of base correct?
15:33 spuder joined #salt
15:34 Annihite1 Definitely it's corrent
15:34 cscf joined #salt
15:34 Annihite1 Spaces are correct I think
15:34 whytewolf this might be easier if you tossed it into gist or some other online paste program that preserves formatting
15:35 Annihite1 On the salt minion (u3) i have:
15:35 Annihite1 [DEBUG   ] Could not find file from saltenv 'base', 'salt://mysql.sls'
15:35 Annihite1 [DEBUG   ] Could not find file from saltenv 'base', 'salt://mysql/init.sls'
15:35 Annihite1 [DEBUG   ] compile template: False
15:35 Annihite1 [ERROR   ] Template was specified incorrectly: False
15:35 cscf When I try to use Salt to add the salt repo and update the minion, it returns success but doesn't upgrade because apt is prompting whether to overwrite /etc/salt/minion
15:35 whytewolf also, take the mysql off of the line. it should just be - /home/mateusz/salt/mysql-formula
15:36 Annihite1 Ok, I'm checking
15:37 Annihite1 Ok, works
15:37 Annihite1 Strange, I thought I already tried this...
15:38 Annihite1 Anyway, thanks for all clues
15:38 whytewolf no problem :)
15:38 Annihite1 Very nice and helpful community saltstack has
15:38 Annihite1 :)
15:39 cscf Is there a good way to get Salt to upgrade salt-minion and preserve /etc/salt/minion ? Do I need to cmd.run ?
15:40 ssplatt cscf: if you use a proper package managed like apt or yum then it will not overwrite the config files unless you tell it to
15:40 whytewolf cscf: that isn't good. it shouldn't be trying to overright /etc/salt/minion ... apt-get normally detects the file exists and rights to a second temp file.
15:40 cscf ssplatt, that's the problem, apt is prompting whether it should overwrite, and pkg.installed returns success instead of even failing
15:41 cscf At least I assume that's what's happening, since it prompts when I run apt upgrade manually
15:41 ssplatt https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.upgrade
15:41 PerilousApricot joined #salt
15:42 ssplatt salt \* pkg.upgrade should do the expected. and leave a .dpkgnew or whatever file for you to merge manually later
15:43 whytewolf ssplatt: i think his conffile prompt has been changed so that apt-get is not reconizeing that it should do dpkgnew
15:43 cscf whytewolf, apt config has been chaanged?
15:44 cscf I will look into that.  Regardless, if apt hangs on a prompt, the module should return failure rather than success, shouldn't it?
15:44 whytewolf cscf: honestly it shouldn't return at all and eventually timeout
15:44 cscf Or that
15:45 whytewolf cscf: there is something screwy in your enviroment
15:46 cscf whytewolf, it's an LXC container, that might have something to do with it
15:46 tvinson cscf: if you take a look at the aptpkg execution module it runs the apt-get with -y and --force-confdef so i think you're on the wrong trail
15:47 whytewolf huh, didn't know it ran with --force-confdef but that would explain it returning with success
15:47 cscf "--force-confdef: ask dpkg to decide alone when it can and prompt otherwise. Thisis the default behavior of dpkg and this option is mainly useful in combination with--force-confold."
15:48 whytewolf cscf: it might be the fact you are in a container. their filesystems are ... wonky. it could be returning that everything updated. when nothing happened
15:49 west575 joined #salt
15:49 cscf whytewolf, I mean, I can do both apt install/upgrade and pkg.installed for everything else.
15:49 cscf It's just salt-minion that has problems
15:49 tvinson cscf: looks like it passes force-confold too unless you pass in force_conf_new
15:50 cscf tvinson, which should be exactly what I want, but it's not working
15:50 BattleChicken joined #salt
15:51 whytewolf cscf: i don't think it is the conf file that is the issue. i think there is something with the container not allowing an upgrade of salt-minion
15:51 cscf whytewolf, but why?  It's just another package
15:52 cscf I don't see anything in apt config or dpkg config that changes this behaviour
15:54 whytewolf how was salt originally installed into the container?
15:58 cro joined #salt
16:02 spuder_ joined #salt
16:05 harry_rumballs joined #salt
16:06 smcquay joined #salt
16:07 west575_ joined #salt
16:10 cscf whytewolf, I think salt-minion is part of the image.  But I just talked to a coworker and I think I might know how to fix it
16:14 west575 joined #salt
16:15 wendall911 joined #salt
16:15 M-MadsRC joined #salt
16:15 freelock[m] joined #salt
16:18 CimmX joined #salt
16:18 jenastar joined #salt
16:19 edrocks joined #salt
16:26 PredatorVI joined #salt
16:27 west575_ joined #salt
16:30 lumtnman joined #salt
16:31 drew_ joined #salt
16:31 mschiff_ Is there some more efficient way to transfer small files via salt than using file.recurse? I use it to transfer >1000 files which tales a long time to transfer the over all <5MB
16:32 Reverend more importantly mschiff_ - can you preserve permissions... answer: no. you can.t
16:32 mschiff_ Reverend: thats not important in my case...
16:34 drew_ does anyone know how to change syndic_wait in a syndic node?
16:36 Trauma joined #salt
16:40 GreatSnoopy joined #salt
16:41 teryx510 joined #salt
16:42 teryx510 joined #salt
16:48 felskrone joined #salt
16:49 shoemonkey joined #salt
16:51 KyleG joined #salt
16:51 KyleG joined #salt
16:54 toastedpenguin joined #salt
16:56 onlyanegg joined #salt
16:58 harry_rumballs Noob here. I'm trying to use the postfix-formula from github. I can't seem to get the postfix.config state to work. When I include it in my state file, it fails. The debug output reports, "Rendering SLS 'base:postfix.config' failed: Jinja variable 'None' has no attribute 'keys'" I think I may be misunderstanding a concept on calling states.
17:02 pipps joined #salt
17:04 spuder joined #salt
17:04 debian112 joined #salt
17:05 Tanta that means you're trying to iterate over nil instead of a true list or dict
17:06 MTecknology babilen: ah, ya, now that I see this solution, that one makes a lot more sense. I guess I went the slsy route first and now I need to take the salty route?.. some bad pun like that.
17:08 lumtnman joined #salt
17:11 harry_rumballs Tanta: thanks. I figured I'm either not providing the right parameters to postfix.config or I'm calling it in the wrong place in the salt state file. Either way, the debug output doesn't point me to where postfix.config is stopping. Any suggestions on how to narrow down what line is having trouble?
17:12 MTecknology babilen: Thanks! :)
17:14 Trauma joined #salt
17:19 wendall911 joined #salt
17:21 toastedpenguin joined #salt
17:21 rm_jorge joined #salt
17:22 cscf mschiff_, you could always tar the directory and then use archive.extracted.  But that won't work if there's templates.
17:24 onlyanegg joined #salt
17:24 mschiff_ cscf: yeah thanks, that would be a workaround.. but no real solution
17:24 cscf mschiff_, do you have templates in it?
17:25 mschiff_ cscf: no
17:25 cscf mschiff_, if it takes really long to copy, you could file a bug report about the performance.
17:26 mschiff_ cscf: yes, that may be a good idea
17:36 edrocks joined #salt
17:38 toastedpenguin anyone using salt for win2k12 servers and configuring server roles e.g. IIS and/or adding .NETx.x/ASP.NET post salt-cloud deployment?
17:43 infrmnt joined #salt
17:48 pipps joined #salt
17:53 geomacy joined #salt
17:53 Edgan joined #salt
17:56 west575 joined #salt
17:58 Morrolan joined #salt
18:01 edrocks joined #salt
18:02 pipps joined #salt
18:03 pipps99 joined #salt
18:08 nonades joined #salt
18:11 PredatorVI Any saltstack folks on that can reopen an issue for me?
18:15 Salander27 joined #salt
18:28 perfectsine joined #salt
18:30 salty_mcsalterso joined #salt
18:31 Kelsar joined #salt
18:31 Kelsar joined #salt
18:32 dyasny joined #salt
18:32 SaltyMcSalterson Hey, so is there a way to delay the rendering of a python salt state until after a predecessor has executed?  Like, the python salt state needs to look through the contents created by a prior state.
18:33 armonge_ joined #salt
18:34 tvinson SaltyMcSalterson: requisites work the same way in python salt states. if you can pastebin i may be able to help with specifics.
18:35 iggy SaltyMcSalterson: normally you'd use orchestrate for stuff like that
18:35 tvinson SaltyMcSalterson: depending on what you mean by rendering
18:35 iggy there isn't a way to make a state re-render all of the templates
18:35 jenastar joined #salt
18:37 ivanjaros joined #salt
18:39 SaltyMcSalterson yea, so it's a  python state that should read the directory of an exploded tar ball that was extracted in an earlier step.
18:41 SaltyMcSalterson the python state will then create additional file.symlinks to another location.  Unfortunately, since the file isn't present when the python state gets rendered into yaml, nothing will get produced on the first highstate.
18:41 armonge_ joined #salt
18:42 SaltyMcSalterson In this situation, I have to run two highstates to accomplish a task.  So, in reality, highstate isn't a highstate.  :-(
18:45 SaltyMcSalterson Hmm, what is this orchestrate?
18:45 shoemonkey joined #salt
18:57 toanju joined #salt
18:58 toanju joined #salt
19:02 Tanta have high state call a separate script that can do it outside of Salt
19:02 nonades joined #salt
19:04 SaltyMcSalterson yea, but that way prevents the creation of a diff with a test run prior to highstate.
19:07 pipps joined #salt
19:08 Tanta not if the script outputs the diff you need in stdout
19:08 Tanta cmd.run will capture all the output of the commands run
19:10 SaltyMcSalterson Does salt provide any documentation about the different phases of the highstate?  Like, when is the state rendered from a template to yaml?
19:10 pipps joined #salt
19:12 perfectsine joined #salt
19:15 strangeattractor joined #salt
19:19 lionel joined #salt
19:20 badon joined #salt
19:21 cscf If I want to assemble a config file out of concatenated jinja files, is file.append the best way?  What if I change a section a bit, won't it get added twice?
19:24 cscf Or is that what file.accumulated is for?
19:26 jenastar joined #salt
19:31 iggy SaltyMcSalterson: not that I've seen (re: docs)
19:31 shoemonkey joined #salt
19:31 iggy cscf: yeah, that's what the accumulator is for
19:31 coredumb Hey folks
19:32 lionel joined #salt
19:32 coredumb I'm wondering what's *best* to use to automate highstates runs
19:33 coredumb looking at doc I can either use crontab for that or use salt.states.schedule
19:33 coredumb what would it be ?
19:34 iggy whichever you are more comfortable with
19:34 MTecknology a schedule that kicks off and orchestrator :D
19:34 iggy they are equally terrible, so pick the one that works best for you
19:35 coredumb or a crontab on master that runs salt '*' state.apply ?
19:35 coredumb :O
19:35 coredumb to much choice
19:35 coredumb too*
19:36 chadhs joined #salt
19:37 MTecknology I set up my home environemnt that after pushing to a git repo a countdown starts. If five minutes pass with no more pushes, an orchestrated highstate is kicked off; except it uses cmd.run to run "salt -b 10% '*' state.highstate" because the orchestrator apparently doesn't support passing a batch size.
19:38 MTecknology using sdb for that timer
19:38 flowstate joined #salt
19:38 MTecknology coredumb: but... don't try to copy that; just know that's where too much choice gets you! :P
19:39 coredumb MTecknology: I see
19:40 coredumb something I don't get
19:40 coredumb when a minion issues a state.apply
19:41 coredumb does it get the sls files from the server first ?
19:41 teryx510 joined #salt
19:44 tapoxi joined #salt
19:48 coredumb also
19:49 coredumb how do I exec something after a file change from an sls ?
19:49 pipps joined #salt
19:50 viq coredumb: just have a state that depends (or even better watches) the state that changes the file
19:51 viq And yes, minions get sent the sls files
19:51 coredumb viq: mind showing me an example of a state that watches that change ?
19:52 coredumb if there's one readily available in doc that I overlooked indeed :)
19:52 viq There are such examples in tutorials, let's see who gets there first ;)
19:53 coredumb mmmmh thought I read that :O
19:54 viq https://docs.saltstack.com/en/latest/ref/states/requisites.html#watch
19:54 coredumb ah no didn't read that :D
19:55 coredumb thx
19:57 edencrane joined #salt
20:00 edencrane Hi, I have my minion in top.sls matching and applying states. I want to add an additional section that ALSO matches that minion (but not some other minions from the first match) and apply states. But as soon as I add another section, I get "No Top file or external nodes data matches found." every time I do a state.apply on my minion. Is this normal?
20:01 viq edencrane: can you show what you have?
20:02 druonysus joined #salt
20:02 hemphill joined #salt
20:03 sp0097 joined #salt
20:04 edencrane viq: Thanks! https://gist.github.com/edencrane/d1e9683bf43608af4f00cebc95b3a952
20:06 subsignal joined #salt
20:06 viq edencrane: any errors in your master log?
20:07 coredumb pkg.refresh_db does not work with the watch requisite grumpfs
20:07 edencrane No errors in the master log.
20:08 viq edencrane: (assuming states in /srv/salt) do you have /srv/salt/test/ping.sls or /srv/salt/test/ping/init.sls ?
20:09 edencrane viq: I seem to have made an error with test.ping, let me see...
20:10 sp0097 joined #salt
20:10 fredrick joined #salt
20:14 edencrane Oh man, I had a missing colon at the end of my (broken) target. Not apparent in the minimal example I pasted. Thank you for the help!
20:14 keimlink joined #salt
20:15 ssplatt joined #salt
20:15 whytewolf missing colon. i hear that cause a lack of shit happening
20:16 edencrane whytewolf: ISWYDT
20:20 subsignal joined #salt
20:23 subsignal joined #salt
20:31 coredumb oh come on you can't make anything watch on something ?
20:33 pipps joined #salt
20:33 om joined #salt
20:33 Trauma joined #salt
20:34 shoemonkey joined #salt
20:35 toastedpenguin is it possible to sync contents in S3 to a local directory on a minion?
20:41 marie1972 joined #salt
20:42 marie1972 left #salt
20:44 whytewolf coredumb: your nouns are to vague to form a response. define: anything, and something
20:45 LiamMon joined #salt
20:47 raspado is there a way in salt to only run a command once?
20:47 whytewolf toastedpenguin: I do believe that you can use s3:// urls in file.managed and file.recurse don't quote me on that though
20:47 raspado cmd.run seems to make the command run every time
20:47 west575 joined #salt
20:47 coredumb whytewolf: well I was expecting being able to call pkg.refresh_db on a file watch
20:49 whytewolf raspado: use onlyif and unless
20:49 shoemonkey joined #salt
20:49 whytewolf coredumb: pst. module.run
20:50 whytewolf with onchanges
20:50 raspado thx whytewolf
20:50 coredumb whytewolf: arf
20:50 whytewolf careful, you'll start a howl
20:51 aasirc joined #salt
20:51 coredumb whytewolf: should I use module.run with onchanges or module.wait with watch ?
20:52 whytewolf humm.. good question. module.wait with watch might be the better choice
20:53 Kelsar joined #salt
20:54 coredumb whytewolf: works as expected
20:54 coredumb thanks
20:54 whytewolf no problem
20:54 aasirc joined #salt
20:54 coredumb seems I've got a lot to read :D
20:54 CimmX whitewolf - I use a grains item to run through commands for single uses
20:55 whytewolf coredumb: there is a lot of info. sometimes it just takes time to understand most of it. then start to connect the dots on what you can do
20:55 CimmX Does module.wait get me the same result?
20:56 whytewolf CimmX: module.wait is like cmd.wait it waits for another state to run [which you specify with watch] and then does it's thing.
20:57 whytewolf if the state it is watching doesn't do anything then it doesn't run it's module that run
20:58 aasirc left #salt
20:59 whytewolf i guess it could be used for what you are talking about. have a file.managed create a lock file. and a module.wait that watches that lock file. since the lock file will never change that file.managed will never run again
20:59 whytewolf kind of hacky though
21:02 whytewolf oh raspado if your cmd.run creates a file you can also use the creates line for cmd.run. which won't run the cmd.run if the file listed in it already exists on the file system
21:02 whytewolf lots of different ways of making non stateful things stateful
21:02 raspado kk
21:03 raspado might end up setting a grain to true/false
21:04 pipps joined #salt
21:15 silicon_id joined #salt
21:18 pipps99 joined #salt
21:18 pfallenop joined #salt
21:18 CimmX Is there an example online using a state file version of a if-elif ...   something like {% if grains['thisgrain'] == 'value' %} and {% elif grains['thisgrain'] == 'othervalue' %}
21:18 silicon_id I'm trying to manage file mode on files in a hidden directory (node-modules/.bin) but when I run the state I get the error "No directory to create node-modules/.bin in" when I know the parent directory exists... does salt have a problem with hidden directories?
21:19 perfectsine joined #salt
21:21 Trauma joined #salt
21:35 pfallenop joined #salt
21:36 shoemonkey joined #salt
21:38 winsalt joined #salt
21:38 shoemonkey joined #salt
21:38 Trauma joined #salt
21:41 ponyofdeath hi, what is the recommended way to overwrite values for a imported formula like postgress inside my salt state file?
21:44 om joined #salt
21:46 pfallenop joined #salt
21:51 raspado anyone who can help, how can I define a version if im installing pkgs with sources? http://pastebin.com/0kFk7vuF
21:51 raspado id like foo to be a specific version
21:51 hemebond raspado: Aren't you pointing to a specific file?
21:51 hemebond Isn't that the point of sources?
21:52 hemebond Which means the file should be the version you want.
21:52 hemebond Versioning is used for repositories that can contain multiple versions or changes in versions.
21:52 raspado hemebond: gotcha gotcha
21:52 raspado thx for the clarification hemebond :D
21:54 hemebond 👍
21:56 BattleChicken left #salt
21:57 flowstat_ joined #salt
22:02 corby joined #salt
22:08 pipps joined #salt
22:09 pipps joined #salt
22:13 PerilousApricot joined #salt
22:18 mavhq joined #salt
22:25 agend joined #salt
22:36 ekristen joined #salt
22:37 asoc joined #salt
22:39 adelcast left #salt
22:41 pipps joined #salt
22:50 cyborg-one joined #salt
22:52 pipps99 joined #salt
22:52 jeddi joined #salt
22:53 pipps99 joined #salt
22:57 raspado hemebond: is there a way i can run yum localinstall?
22:58 hemebond raspado: I don't know what that is, sorry.
22:58 raspado np
22:58 hemebond Have you checked the yum state or execution modules?
22:58 jholtom raspado: yeah, you can use the sources option in the pkg state
23:00 jholtom raspado: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html under the sources heading
23:00 raspado thx jholtom
23:01 jholtom np
23:01 pipps joined #salt
23:04 raspado jholtom: when I do it by sources it does "Executing command ['yum', '-y', 'install', '/var/cache/salt/minion/extrn_files/playground/download.zfsonlinux.org/epel/zfs-release.el7.centos.noarch.rpm'] in directory '/root'"
23:04 raspado but the install should be localinstall so yum can install an rpm
23:04 MTecknology Can you not use : to select a subkey of mine data?  I tried  {{ salt['mine.get'](fqdn, 'public_ip:inet') }} and it acted like that just doesn't exist. If I skip ':inet' I get a dictionary with the 'inet' key in it.
23:04 jholtom raspado: yum as of el7 should be able to yum install and realize that its an rpm
23:04 MTecknology or do I need something like mine.get()?
23:04 raspado hmm interesting wonder what the heck
23:04 raspado ok
23:04 jholtom you shouldn't need to specify localinstall
23:05 jholtom is it not working?
23:05 GnuLxUsr joined #salt
23:07 hemebond MTecknology: You're not querying a structure, you're getting the value of a grain.
23:07 hemebond So you need to fetch it again then access it like a Jinja variable.
23:07 hemebond I think.
23:08 hemebond Remember that you're asking for the value of a mine function, it's not like a pillar.
23:09 MTecknology hemebond: makes sense... sucks, but makes sense
23:09 hemebond Just chuck it into a Jinja variable and you should be able to access it as usual.
23:10 MTecknology I was hoping to avoid that, but that doesn't seem too terrrible
23:10 MTecknology well... not /that/ much worse than the slop I have now
23:11 perfectsine joined #salt
23:14 MTecknology hemebond: ya, the more I'm reworking it, the more it makes perfect sense why what I want wouldn't work
23:15 shoemonkey joined #salt
23:18 shoemonkey joined #salt
23:18 coredumb I must be stupid, but what am I missing ? http://pastebin.com/VTtTZTZM
23:18 hemebond Uh, are you using Puppet templating in your SLS?
23:19 hemebond Oh...
23:19 hemebond You're also not structuring your SLS properly.
23:19 hemebond There's no module, or function, and your arguments aren't a list.
23:19 spuder joined #salt
23:20 coredumb hemebond: that's a pillar
23:20 hemebond Oh, it says "Rendering SLS" and I couldn't see any other context.
23:20 whytewolf coredumb: {% not <%
23:20 hemebond Still wrong though, unless you're not using Jinja as your renderer/
23:20 coredumb arf damn
23:21 coredumb I knew it was stupid
23:21 coredumb >_<
23:21 coredumb yeah works better indeed
23:21 coredumb thx again whytewolf
23:22 whytewolf np
23:22 coredumb guess I should just go to sleep lol
23:22 flowstate joined #salt
23:25 shalkie joined #salt
23:36 ekristen joined #salt
23:39 druonysus joined #salt
23:39 keimlink_ joined #salt
23:39 toastedpenguin joined #salt
23:41 PerilousApricot joined #salt
23:55 hasues joined #salt
23:56 hasues left #salt

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