Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-12-13

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

All times shown according to UTC.

Time Nick Message
00:08 akhter joined #salt
00:10 stooj joined #salt
00:26 stooj joined #salt
00:27 viccuad joined #salt
00:32 mikecmpbll joined #salt
00:38 wwalker and str1 was not actually a string...
00:38 stooj joined #salt
00:42 t0m0 joined #salt
00:43 akhter joined #salt
00:44 wwalker jgarr: sudo salt int-work-01 cmd.run 'env | sort'  shows me a very small environment that 'env'  is running in
00:44 wwalker I expect that the puppet run is an equally thin environment and that is affecting facter
00:45 teclator joined #salt
00:45 stooj joined #salt
00:47 hemebond wwalker: Salt does not load environment variables.
00:47 hemebond You have to provide your own through Salt.
00:48 Shirkdog joined #salt
00:48 Shirkdog joined #salt
00:48 jgarr I figured out that running puppet locally I get Runtime environment: puppet_version=3.8.7, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8 but running via salt I get Runtime environment: puppet_version=3.8.7, ruby_version=2.0.0, run_mode=user, default_encoding=US-ASCII
00:49 jgarr wwalker: I found https://docs.saltstack.com/en/latest/ref/internals/unicode.html but trying to figure out where to set the variable so the environment is UTF-8 instead of US-ASCII
00:49 ninjada joined #salt
00:50 wwalker jgarr: what distro (i'm fighting this 3exact battle right now
00:50 wwalker (lang)
00:50 jgarr rhel 7
00:50 UtahDave jgarr: try adding `reset_system_locale=False`
00:50 t0m0 joined #salt
00:51 jgarr UtahDave: where do I add that? I can't add it to the end of the salt puppet.run
00:52 UtahDave jgarr:   salt '<minin id>' puppet.run reset_system_locale=False
00:52 buglessdr joined #salt
00:52 UtahDave We force the system locale to -US-ASCII so we get consistent output for parsing purposes.
00:52 jgarr [ERROR   ] Command 'puppet agent --vardir /var/lib/puppet --confdir /etc/puppet  --test --color false --reset_system_locale False' failed with return code: 1
00:53 jgarr [ERROR   ] stderr: Error: Could not parse application options: invalid option: --reset_system_localey
00:54 wwalker jgarr, I have to bail but should be back online in half an hour.  ping me directly if the reset system locale doens't fix it.  My solution is more complex but "fixes" all the apps on the machine to see en_US.UTF-8 for LANg
00:54 jgarr UtahDave: should every module implement reset_system_locale=False or is there a way to set that globally?
00:55 UtahDave remove the --
00:55 jgarr I didn't add the --. the puppet.run module adds that automatically
00:55 UtahDave no, Salt needs the system locale set most of the time
00:56 UtahDave Ah, I see. puppet run is consuming that.  Hm. just a sec
00:57 jgarr salt 'node' puppet.fact os-release puppet=True reset_system_locale=False gives a similar error
00:57 UtahDave crud. puppet.run accepts *args and **kwargs so it sucks everything in
01:01 t0m0 joined #salt
01:05 buglessdr joined #salt
01:07 UtahDave jgarr: reviewing that with someone else right now
01:07 ninjada joined #salt
01:08 jgarr UtahDave: k, I can change my command to `salt '*' cmd.run 'puppet agent -vt --color false' reset_system_locale=False` but sucks the module doesn't already do that for me
01:08 ninjada joined #salt
01:10 buu Is there any kind of article to read on the difference between a minion on saltmaster and orchestration?
01:14 pipps joined #salt
01:16 pipps99 joined #salt
01:18 UtahDave jgarr: the problem is that the puppet.run function was written kind of crappily.  Makes it hard to get the correct arguments passed in
01:18 jgarr agreed :)
01:19 jgarr I had debated writing my own but mostly just fell back to cmd.run instead
01:21 UtahDave yeah.
01:22 jgarr should I open an issue for it?
01:22 UtahDave Yeah, probably.  You might search and see if there's one already open for it.
01:23 netcho joined #salt
01:26 austin_ joined #salt
01:32 pipps joined #salt
01:38 iggy buu: they are nothing alike
01:43 jgarr UtahDave: thanks for the help Here's the issue https://github.com/saltstack/salt/issues/38219 cc: wwalker_away
01:43 saltstackbot [#38219][OPEN] puppet.run consumes all arguments. Doesn't allow reset_system_locale=False | Description of Issue/Question...
01:44 UtahDave jgarr: awesome, thanks!
01:45 stooj joined #salt
01:45 buu iggy: what's the difference
01:53 UtahDave buu: they both use Salt's state compiler to execute states, but a minion on the saltmaster can only run commands on the salt master.  Orchestration allows you to orchestrate executions across any number of minions
01:53 ninjada joined #salt
01:53 buu UtahDave: What if I want to have a state that rsyncs a directory from the master to some children?
01:55 amcorreia joined #salt
01:56 UtahDave set up rsync on the master and then run a state that tells each minion to rsync the directory down.
01:56 UtahDave You don't need orchestration for that, unless you want it to happen in a certain order
01:57 buu UtahDave: minion states don't support rsync daemon connections =[
01:58 UtahDave right, not for the communication with the master
01:58 J0hnSteel joined #salt
01:58 UtahDave But you can tell the minion to rsync down files from the master
01:58 buu So how so I have them rsync without allowing them to ssh into the master?
01:58 UtahDave Ah, I see where you're coming from.
01:58 UtahDave I've done this two ways.
01:58 buu Yeah =[
01:58 buu My life is hard.
01:59 UtahDave 1. Set up rsyncd to run on the salt master and give the minions authorization to rsync from that
01:59 UtahDave 2. Have the salt master configure a special user for itself on the minions and have the master ssh+rsync into the minions
02:00 buu UtahDave: How do you configure the minions to rsync to the daemon?
02:01 UtahDave set up rsyncd on your master and configure authorized users.  Then you have salt states that configures each of the minions to pull data from the master's rsyncd server?
02:01 ninjada joined #salt
02:01 buu UtahDave: oh you mmean with cmd.run
02:01 UtahDave Basically, pretend the salt-minion is you and whatever you'd do to configure the server, you can make the salt-minion do it.
02:01 UtahDave yeah.
02:02 buu Why doesn't the rsync state support the daemon?
02:02 UtahDave I'
02:02 UtahDave I've never used the rsync state. I'm not sure if it does or not. It might just need to be added.
02:05 pipps joined #salt
02:06 catpiggest joined #salt
02:10 buu =[
02:11 pipps joined #salt
02:14 iggy because you generally wouldn't want to have your master/minion stuck in the middle of a rsync state while all the other minions are pulling files
02:15 buu what?
02:15 buu What was that in response to?
02:16 iggy you trying to serve files via rsync
02:18 buu but it supports regular rsync
02:18 buu just not rsyncd
02:19 iggy and I just explained why
02:19 buu if you say so
02:23 anotherzero joined #salt
02:26 tduerr joined #salt
02:32 evle joined #salt
02:36 spuder joined #salt
02:37 eprice joined #salt
02:40 Roelt joined #salt
02:42 UtahDave left #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.4, 2016.11.0 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
02:49 Nahual joined #salt
02:49 fxhp joined #salt
03:03 tawm04 joined #salt
03:07 swills joined #salt
03:18 mpanetta joined #salt
03:21 bluenemo joined #salt
03:27 moooooo joined #salt
03:34 bastiand1 joined #salt
03:36 writtenoff joined #salt
03:41 writtenoff joined #salt
03:44 akhter joined #salt
03:53 netcho joined #salt
03:57 aw110f joined #salt
04:02 jas02 joined #salt
04:13 raspado joined #salt
04:39 anotherzero joined #salt
04:58 yetanotherzero joined #salt
05:05 amontalban joined #salt
05:14 fracklen joined #salt
05:29 jas02 joined #salt
05:32 rdas joined #salt
05:36 dlam joined #salt
05:36 dlam is there a command to list all the states i can run?   im using the elasticsearch-formula and want to display a summary of everything in there
05:37 samodid joined #salt
05:42 iggy dlam: you mean like state.show_sls ?
05:43 iggy or do you want a list of all state modules?
05:57 bocaneri joined #salt
06:00 ninjada_ joined #salt
06:04 jas02_ joined #salt
06:21 netcho joined #salt
06:23 whytewolf dlam: you mean the page at https://github.com/saltstack-formulas/elasticsearch-formula doesn't tell you enough about the states in the formula?
06:24 whytewolf and no there is not a command to query for avalible state files.
06:25 whytewolf well i guess ls on the local filesystem plus knowing what is in your git repos
06:26 vodik is there a proper way to embed utf-8 inside a sls file?
06:26 __number5__ there are `cp.list_states` but that might not be really helpful
06:27 __number5__ sorry that's for dlam ^
06:27 vodik dlam: 'salt-run fileserver.list_file' might help, but its going to show everything together, no way to know if its reactor or orchestrate, etc
06:28 whytewolf salt 'random minion' cp.list_master | grep '.sls'
06:28 vodik ah, found it, double quoted escaped charcaters
06:29 whytewolf kind of like the fileserver.list_file only would be what is actually served by the fileserver instead of just everything in a boiling stew
06:29 netcho joined #salt
06:29 netcho joined #salt
06:31 vodik -ssid=????????
06:31 vodik +ssid=ð±ð±
06:31 vodik lol, nope
06:32 hemebond vodik: What if you use {% raw %}?
06:32 hemebond Is this in a state or pillar?
06:32 vodik state
06:32 vodik i used:         ssid: "\u0001f431\u0001f431"
06:33 vodik didn't change it if i did is with \x... as per how python2 repr represented it
06:33 vodik hemebond: ^
06:34 hemebond I'm confused. Did you figure it out>
06:34 hemebond ?
06:35 vodik no, i didn't. i found this https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#yaml-support-only-plain-ascii
06:35 vodik tried it, and it didn't work
06:35 whytewolf have you tried a render other then yaml?
06:35 vodik no
06:36 felskrone joined #salt
06:36 vodik whytewolf: oh, yes, its jinda
06:36 vodik *jinja
06:37 vodik try something else
06:37 whytewolf ssid: "\u0001f431\u0001f431" that doesn't look like jinja. that looks like yaml. you can change both the yaml and jinja
06:38 whytewolf coarse that being said not sure what render would have better utf8 support
06:38 whytewolf maybe the py render
06:39 ninjada joined #salt
06:39 iggy python + utf = failure
06:39 whytewolf most scripting langs + utf = fail
06:40 vodik whytewolf: no, i understand what you mean now, its just yaml
06:40 vodik i just learned there are alternative renderers... heh
06:40 buu whytewolf: that's why we use perl
06:40 vodik hemebond: i'll try that
06:41 hemebond vodik: It won't help :-(
06:41 disaster123 joined #salt
06:41 hemebond I didn't realise your unicode wasn't going through Jinja.
06:41 hemebond I just tried a simple test: Unable to manage file: 'ascii' codec can't encode character u'\u263a' in position 0: ordinal not in range(128)
06:44 vodik hmmm
06:45 hemebond PyYAML itself seems to be able to accept unicode characters.
06:45 vodik that's what i found, i wonder if !unicode works
06:45 akhter joined #salt
06:45 hemebond Oh...
06:49 vodik Rendering SLS 'router:hostapd' failed: could not determine a constructor for the tag 'tag:yaml.org,2002:python/str'
06:49 vodik shit
06:49 vodik guess i'm hardcoding the ssid then ;)
06:54 hemebond What about a Python renderer?
06:54 sh123124213 joined #salt
06:55 vodik hemebond: yeah, thinking about it
06:57 vodik hemebond: but i think i really should open an issue - something is incorrectly deserializing \xf0\x9f\x90\xb1\xf0\x9f\x90\xb1 to ð±ð±
06:57 vodik hmmm
07:01 madboxs joined #salt
07:02 vodik well thanks for the help, i'm going to bed
07:06 ProT-0-TypE joined #salt
07:07 ninjada joined #salt
07:08 netcho_ joined #salt
07:22 akhter joined #salt
07:23 fracklen joined #salt
07:30 keimlink joined #salt
07:34 sh123124213 joined #salt
07:43 teclator joined #salt
07:50 nohuihami joined #salt
07:53 onlyanegg joined #salt
08:02 raspado joined #salt
08:03 onlyanegg joined #salt
08:04 rai_ joined #salt
08:05 jas02_ joined #salt
08:07 o1e9 joined #salt
08:10 xMopxShell joined #salt
08:15 fracklen joined #salt
08:17 ecdhe joined #salt
08:18 fracklen_ joined #salt
08:18 fracklen joined #salt
08:19 jas02_ joined #salt
08:19 samodid joined #salt
08:20 ninjada joined #salt
08:25 sergeyt joined #salt
08:26 swills joined #salt
08:28 fracklen joined #salt
08:28 fracklen joined #salt
08:34 theblazehen joined #salt
08:38 netcho_ hi all,  salt-call boto_ec2.get_unassociated_eip_address returns none but i have 2 unassociated eips
08:39 netcho_ running in debug mode it prints all my eips but not the 2 it should return
08:40 netcho_ [DEBUG   ] No unassociated Elastic IP found!
08:40 dijit salt-minion on windows seems to leak memory.
08:40 dijit (latest)
08:40 dijit I just caught it using 700mb. :(
08:41 buu Who provide the debian package for salt-minion?
08:41 buu It sure would be nice if the package prompted for the master host on install
08:42 JohnnyRun joined #salt
08:48 onlyanegg joined #salt
08:48 buu What can I run to test if a salt-minion can connect to the salt master?
08:49 dijit salt-call will try to contact the master.
08:49 buu um
08:49 buu I ran 'test.ping' and got 'local:
08:49 buu True
08:49 dijit yeah that's nto what you want
08:50 dijit salt-call -l debug state.apply
08:50 dijit or the "not applying" version of that.
08:50 AndreasLutro if it says local: True that means it's connected to the master successfully
08:51 buu really?
08:51 AndreasLutro yes
08:51 buu Why can't the master talk to it then?
08:51 buu "    Minion did not return. [Not connected]"
08:52 AndreasLutro have you got a firewall? did you open both 4505 and 4506?
08:52 ProT-0-TypE joined #salt
08:53 AndreasLutro also are you sure your minion is actually connecting to the correct master?
08:53 buu Well, I've only got one
08:53 AndreasLutro also you're supposed to run salt-call test.ping on the minion, not the master
08:53 buu AndreasLutro: I did
08:53 AndreasLutro probably firewall things then
08:53 buu Also the documentation said ports 4510,4511,4506
08:53 AndreasLutro unless you've configured your minion to be masterless
08:53 buu =/
08:53 AndreasLutro ok? what documentation?
08:54 buu some website at saltstack.com
08:54 AndreasLutro right...
08:54 buu Much better
08:55 buu so is 4510 actually used for anything?
08:55 AndreasLutro I'd like to see where you got 4510 and 4511 from
08:55 AndreasLutro if you google "salt ports" you get https://docs.saltstack.com/en/latest/topics/tutorials/firewall.html which tells you all you need to know
08:56 netcho_ 4505 and 4506 for me
08:56 netcho_ never heard or 10 and 11
08:56 buu "Publish port used when ipc_mode is set to tcp.
08:56 buu heh
08:58 * buu shrugs
08:58 netcho_ windos?
08:58 buu I'm pretty confident it didn't come to me in a dream but I configured that several days ago so I don't have the page handy
08:59 netcho_ maybe for win machines cuz they don't have POSIX IPC
08:59 mikecmpbll joined #salt
08:59 buu Well, they don't
09:00 buu At least that's what this says
09:05 Parits joined #salt
09:06 Parits I want to know how to install basic postgreSql using salt version 9.5.1
09:07 Parits This doesn't work
09:07 Parits postgresql:   pkg.installed:       - version: 9.5.1
09:08 buu are you sure there's a package that matches that version?
09:08 buu Perhaps use the postgresql formula
09:09 Parits postgreSql formula is too complicated in github
09:09 buu welp
09:21 ernescz joined #salt
09:27 s_kunk joined #salt
09:39 cyborg-one joined #salt
09:40 sebastian-w joined #salt
09:57 demize joined #salt
09:58 ninjada joined #salt
10:01 inad922 joined #salt
10:10 jhauser joined #salt
10:19 sergeyt joined #salt
10:22 Bryson joined #salt
10:22 ninjada joined #salt
10:33 jas02 joined #salt
10:40 ninjada joined #salt
10:43 yidhra joined #salt
10:53 theblazehen joined #salt
11:03 amcorreia joined #salt
11:04 N-Mi_ joined #salt
11:07 theblazehen71 joined #salt
11:11 zigurat joined #salt
11:12 Bico_Fino joined #salt
11:18 jas02_ joined #salt
11:19 bayindirh joined #salt
11:20 bayindirh Hello all, I'm trying to install a package via pkg.install in an sls file. pkg.installed is not suitable since I'm supplying a local file which I freshly download from a remote place.
11:22 babilen You can define sources: and let the state handle it
11:22 babilen I would, however, recommend to either setup your own repository or host the file in salt;//
11:22 babilen salt:// that is
11:24 Reverend ^ +1. that's how I've done a couple of mine. Just get the RPM and host it on salt://
11:24 Reverend works a treet
11:25 Hybrid joined #salt
11:26 Cadmus salt:// also means you don't have to mess around with hashes, but we had some very large packages so ended up making a web server. Large binaries and gitfs are not good friends.
11:27 bayindirh My packages are small.
11:28 bayindirh However, how can I ensure the packages are installed in the order that I want? I'm converting a script to an sls file, which will be used on massive amounts of servers (500+)
11:29 scoates joined #salt
11:30 jas02 joined #salt
11:30 xmj require / require_in
11:30 zigurat joined #salt
11:30 xmj alternatively, have packages correctly register their dependencies on other packages - then go from there.
11:31 bayindirh OK, thanks. I'll take a look at those. I'm not the creator of packages unfortunately. If that was the case, I'd of course do that :)
11:31 xmj do any of the packages ship the same file?
11:32 xmj or why do you care about the order in which packages are installed?
11:33 bayindirh One of the packages is epel-release. The second package needs packages from epel, however the packages which depend on packages on epel, do not depend on epel-release package.
11:33 jas02 joined #salt
11:33 bayindirh So if I don't install EPEL before, things go nuts in a pretty spectacular way :)
11:35 xmj right, so you write one pkg.installed for epel-release, and then require that state from all the epel packages
11:36 bayindirh so, an SLS for EPEL, which forces pkg.installed. Then require it in the other (core-installer) sls file.
11:36 bayindirh am I right?
11:37 babilen bayindirh: You can require individual states within the same SLS
11:37 xmj oh!
11:37 bayindirh babilen: OK, by writing it at the top?
11:37 babilen But you could, naturally, write an epel SLS, include that in all SLSs that need it and use suitable require requisites on the respective pkg.installed states
11:39 babilen bayindirh: No, you just use foo: pkg.installed: .... - require: - pkg: $ID_OF_EPEL_PACKAGE_STATE
11:39 babilen If you define ID_OF_EPEL_PACKAGE_STATE in a different SLS you'd have to include that SLS at the beginning (so that you can refer to the states defined therein)
11:39 bayindirh OK, will try that. what is  $ID_OF_EPEL_PACKAGE_STATE
11:40 bayindirh the package name? or the direct file path? or... ?
11:40 babilen It's the ID of the state you defined to install the epel package
11:40 bayindirh OH, ok.
11:40 babilen You can also refer to it by its "- name: ..." argument
11:41 babilen So "foo_state: pkg.installed: - name: foo-package" could be referred to as either "- pkg: foo_state" or "- pkg: foo-package" in - require: ...
11:41 bayindirh I'm new to salt, so will start with all-inclusive sls-files and transform them as system grows.
11:41 babilen Fair enough
11:42 bayindirh If I can make salt behave, I'll try to see its limits. So making this run is one of the most important rites of passage :)
11:43 bayindirh another small question. How come pkg.del_repo works in command line and not in an SLS file?
11:43 babilen pkg.del_repo is an execution module function, while you use states in SLS files
11:43 bayindirh oh, so I can't use execution states in SLS file, right?
11:44 babilen Salt is designed in such a way that you have actions (execution module functions) that can be called either interactively from the command line or by states. State define, well, a certain state and consist of checks if the state has already been achieved and certain actions (i.e. execution module function calls) that have to be taken if that is not the case
11:45 babilen So you would have a "module is absent" state that would check if the module is defined and would call pkg.del_repo if it is (or do nothing if the state has already been achieved)
11:46 babilen You can call execution module functions in states, but normally that is a sign of either: Somebody should define a state to do that or "you are doing it wrong" :)
11:46 babilen You'd use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#salt.states.module.run for that
11:46 babilen Err .. not "module is absent", but "repository is absent" state naturally
11:47 * babilen → lunch
11:47 bayindirh babilen: bon apetite.
11:58 jas02_ joined #salt
12:03 madboxs joined #salt
12:03 scoates joined #salt
12:09 jas02_ joined #salt
12:14 hojgaard joined #salt
12:45 Inver joined #salt
12:58 patrek joined #salt
13:03 patrek joined #salt
13:03 keimlink joined #salt
13:03 madboxs joined #salt
13:04 numkem joined #salt
13:09 justanotheruser joined #salt
13:17 sergeyt joined #salt
13:19 scoates joined #salt
13:26 sergeyt joined #salt
13:27 rdas joined #salt
13:30 geomacy joined #salt
13:31 fracklen joined #salt
13:32 netcho joined #salt
13:41 ninjada joined #salt
13:57 hojgaard joined #salt
13:59 edrocks joined #salt
14:00 bayindirh I've sorted out nearly all of the stuff. Last question? Is there a way to update all system packages with a salt state file?
14:01 bayindirh In other words, is there an equivalent of pkg.update in SLS file?
14:02 XenophonF yes
14:03 XenophonF bayindirh: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.uptodate
14:03 XenophonF unfortunately, pkg.upgrade (the underlying exec module) isn't implemented on windows :(
14:03 alvinstarr joined #salt
14:05 madboxs joined #salt
14:07 bayindirh XenophonF: Thanks for the link. Also thanks for the heads-up, but I've not seen Windows for a long time :)
14:10 XenophonF you're missing out
14:10 XenophonF ;)
14:15 blackflow joined #salt
14:15 bayindirh XenophonF: All the chaos, blood, sweat and tears?
14:15 bayindirh :)
14:18 spuder joined #salt
14:18 blackflow Hello. Question about events. Is there a limit to the size of data passed through  salt-call event.fire '{ some big data dictionary here }' 'tag'  ?
14:21 blackflow I'm guessing shell limits in number of chars for arguments apply, but anything else?
14:22 blackflow (and I intend to use salt.client and fire events from a python script anyway)
14:36 Hetman joined #salt
14:37 armin_ joined #salt
14:38 nickabbey joined #salt
14:39 jas02_ joined #salt
14:39 armin joined #salt
14:41 Tanta joined #salt
14:41 armin joined #salt
14:46 AndreasLutro I doubt it
14:47 AndreasLutro blackflow: have you ever seen the size of an event for a highstate? if there were limits salt would probably hit it itself
14:48 armin joined #salt
14:49 blackflow AndreasLutro: well I'm asking if maybe this particular transport is not intended for "large" datasets, whatever "large" is in that case.
14:51 AndreasLutro salt's datasets are already huge so I wouldn't worry about it
14:58 gladia2r joined #salt
15:04 babilen I am rendering a configuration file with "{{ settings|default({})|yaml(False) -}}" but run into problems if I have escape characters in the data. "foo\." is, for example, being rendered as "foo\\." -- Any way to deal with this "double escape" ?
15:06 babilen It's rendered from pillar data defined in YAML
15:11 racooper joined #salt
15:11 blackflow AndreasLutro: mkay, thanks.
15:12 edrocks joined #salt
15:14 vegardx joined #salt
15:16 yetanotherzero joined #salt
15:16 vegardx Sooo.. I'm doing some very simple stuff. Adding nginx with `nginx: pkg.installed`, but when I try to do `nginx: pkg.removed` it fails. I can also remove the package manually, and `pkg.installed` will still say it's already installed. Running Debian 8 and using the official repos.
15:18 Reverend whats the error?
15:18 Miouge joined #salt
15:21 mohae_ joined #salt
15:22 Tanta pkg.absent I think
15:22 Tanta or pkg.purge
15:23 Reverend https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.removed
15:23 Reverend pkg removed -is- a thing.
15:23 vegardx "The following packages failed to remove: nginx.", when trying pkg.removed. When I manually remove (or remove and purge) the package it thinks its still installed. Also, when I do remove, it only remove the primary package, not the dependencies. And apt doesn't even know about the dependencies.
15:23 Tanta try purged
15:23 vegardx As `nginx` is sort of a meta/virtual package, except it isn't.
15:23 vegardx I'll do that.
15:23 keltim joined #salt
15:24 vegardx But I think this is a deeper issue than just purged vs. removed. :)
15:24 Tanta it's different functions implemented in the Salt API essentially
15:24 Reverend if you're using centos/rhel, isn't nginx called 'nginx-release' or something stupid?
15:24 vegardx Debian 8, Reverend. :)
15:24 Tanta there are cases where you'd use different formats of the delete, but the implementation is largely opaque so you just try and fail until you find one that workd
15:24 * Reverend throws up
15:24 Reverend plebian. psshhttttt
15:24 Reverend :P
15:25 vegardx Same issue with purged.
15:25 Tanta then your package name is wrong, likely
15:25 vegardx Hehe, someone quickly mention systmed and we go full circle!
15:25 inad922 joined #salt
15:25 Tanta rpm -qa | grep i pkg_name
15:25 vegardx Last time I checked Debian didn't use rpm :)
15:25 Tanta dpkg --list
15:25 vegardx (but it does exist)
15:25 Tanta same thing
15:26 vegardx nginx is a package in debian that has nginx-full and nginx-common as dependencies.
15:26 Tanta http://askubuntu.com/questions/235347/what-is-the-best-way-to-uninstall-nginx
15:26 nickabbey joined #salt
15:26 vegardx I can use Google, Tanta.
15:26 Tanta read the answer
15:26 Tanta it explains how to do it
15:27 Tanta sudo apt-get purge nginx nginx-common
15:27 vegardx The point is, if I do pkg.installed on `nginx` salt should know what to do with the same package.
15:27 Tanta that's not how it works
15:28 Reverend kek
15:28 Reverend vegardx: salt concats all of the list into one, so if you do
15:28 Reverend - ngnix
15:28 Reverend - nginx-common
15:28 Reverend it might work
15:28 Tanta pkg: - purged -pkgs: - - - or whatever the syntax is
15:29 tapoxi anyone using thorium?
15:29 promorphus joined #salt
15:29 Reverend omg tapoxi hi
15:29 Reverend <3
15:29 tapoxi hahaha yo
15:30 onlyanegg joined #salt
15:31 Reverend ohdamn. im baout to bump like 8 versions.
15:31 Reverend odamn
15:31 vegardx Reverend: Seems like I jus have to use nginx-full. Fun issue.
15:31 Reverend kek. Good solve vegardx
15:33 spuder joined #salt
15:34 ninjada joined #salt
15:34 gladia2r I'd appreciate any hint on this simple SLS with jinja - apparently I just can't seem to make it catch that specific grain https://gist.github.com/gladia2r/4e9b5b0737da7d0180a76fe464a0fdfc
15:35 mikecmpbll joined #salt
15:38 coredumb Hello
15:39 coredumb I was wondering if there was - like in top file - a way to segment some group of minions access to files content?
15:39 coredumb not through pillar indeed :D
15:40 XenophonF coredumb: if you're talking about the salt:// file server, no, not without operating separate minions
15:40 XenophonF you have to use pillar for that
15:40 coredumb XenophonF: that's what I thought
15:46 eprice joined #salt
15:47 raspado joined #salt
15:48 netcho joined #salt
15:48 ivanjaros joined #salt
15:49 madboxs joined #salt
15:51 gladia2r i'm happy to hear if anyone can advise on that simple looking, but not working - jinja ^ (see gist) :D
15:51 coredumb XenophonF: could you please explain a bit what you meant by "separate minions" in this case ?
15:52 XenophonF er,
15:52 XenophonF i recently turned 40 and apparently have lost the ability to be coherent outside of my own head
15:52 XenophonF i meant "separate masters"
15:53 Brew joined #salt
15:53 coredumb :D
15:54 coredumb XenophonF: now I get it
15:54 coredumb :P
15:54 coredumb think I'll try to see how to make something that can validate and render sls files for me to ensure paths are not set to somthing they shouldn't
15:55 coredumb seems a bit complicated and not robust enough
15:55 XenophonF you can use file.managed
15:55 coredumb oh that I know
15:55 XenophonF ok
15:56 coredumb what I need is ensure that adminX is staying in his filesX and not trying to pull filesY from adminY
15:56 ninjada joined #salt
15:57 sarcasticadmin joined #salt
15:57 coredumb a tricky adminX would put filesY as variables and/or pillars to make it difficult to detect
15:57 coredumb so I need to fetch adminX pillars as well and render his sls files
16:01 tercenya_ joined #salt
16:02 XenophonF i've been thinking about this, too
16:03 XenophonF my end goal is to revoke direct access to the master itself
16:03 XenophonF and have git commits trigger a webhook that triggers a highstate (or something like that)
16:04 XenophonF mixed in with git commit signing
16:07 sh123124213 joined #salt
16:07 coredumb I've alredy a git hook validating that userX doesn't try to create something outside his userX directory
16:07 coredumb tell me more about your webhook thing ?
16:07 yuhl__ joined #salt
16:08 XenophonF well i had something working and then it broke, but the idea is that we have our configs all in a git repo
16:08 XenophonF e.g., github
16:08 XenophonF and then we configure github (or gitlab or gogs or codecommit or whatever) to call a salt-api webhook
16:09 coredumb XenophonF: I've already sorted this out
16:09 coredumb ohhhh salt-api
16:09 XenophonF which signals reactor via an event
16:09 sh123124213 joined #salt
16:09 XenophonF and from there we can do "stuff"
16:09 XenophonF i initially wrote it to do a fileserver.update on the master
16:09 coredumb i do that indeed
16:10 coredumb and a pillar refresh if event been fired from _pillars repo
16:10 XenophonF https://github.com/irtnog/salt-states/blob/development/salt/files/reactors/github.sls
16:10 XenophonF if you have a working reactor i'd love to see it
16:10 XenophonF mine broke for some reason
16:11 _JZ_ joined #salt
16:11 coredumb I've a reactor calling on an orchestrator
16:12 coredumb works fine
16:13 sh123124213 joined #salt
16:14 DammitJim joined #salt
16:19 Tanta_G joined #salt
16:22 Tanta joined #salt
16:22 mikecmpbll joined #salt
16:23 XenophonF gladia2r: you're doing a string comparison when you ought to be doing a numerical comparison
16:23 XenophonF '50' != 50
16:23 XenophonF lines 15 and 17 in your gist
16:24 XenophonF alternatively, you could change your source path a couple of different ways
16:24 XenophonF you could specify it like salt://repo/path/to/file.{{ grains['number'] }}
16:24 XenophonF that's the easy, sloppy way to do it
16:24 XenophonF i prefer to use the |format filter in jinja
16:25 XenophonF {{ 'salt://repo/path/to/file/%d'|format(grains['number'])|yaml_encode }}
16:25 XenophonF which will escape things nicely just in case
16:25 XenophonF that's the belt-and-suspenders approach
16:26 XenophonF but do whatever is easiest for you-6-months-from-now to read
16:35 teclator joined #salt
16:35 yesimon joined #salt
16:39 Trauma joined #salt
16:40 st8less joined #salt
16:44 seanz joined #salt
16:44 seanz Howdy, all. I'm trying to check out a tag using git.latest, which was working before, but now I get this error:
16:44 seanz Command 'git reset --hard origin/4.6.1' failed. Stderr: "fatal: ambiguous argument 'origin/4.6.1': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'"
16:44 seanz I'm checking out WordPress, tag 4.6.1.
16:45 jas02__ joined #salt
16:46 seanz What would cause an already-working checkout to not work?
16:46 seanz Or commands on that checkout, rather.
16:46 nidr0x joined #salt
16:47 seanz Never mind - git wasn't happy with my force_reset attempt.
16:47 jas02__ joined #salt
16:50 st8less joined #salt
16:50 madboxs joined #salt
16:52 st8less joined #salt
16:52 jas02_ joined #salt
16:54 nickabbey joined #salt
16:58 st8less joined #salt
16:59 esharpmajor joined #salt
17:05 amontalb1n joined #salt
17:05 sarcasticadmin joined #salt
17:06 gladia2r i'm getting the "Neither 'source' nor 'contents' nor 'contents_pillar' nor..." stuff and I guess because the grain is not recognized, but not sure really why - https://gist.github.com/gladia2r/4e9b5b0737da7d0180a76fe464a0fdfc
17:06 lws joined #salt
17:07 gladia2r ah
17:09 gladia2r gotcha - all set, works (ah numerical vs string comparison)
17:10 st8less_ joined #salt
17:11 UtahDave joined #salt
17:16 nethershaw joined #salt
17:16 irated Hey Guys, https://gist.github.com/pryorda/8b47f0414f49f19ea3aa55b184e1ab18
17:17 jas02_ joined #salt
17:17 irated I'm a boss at being a noobsause salt guy!
17:18 s_kunk joined #salt
17:21 irated HEY XenophonF you around.. You always have some great advice for my issues....
17:23 UtahDave irated: what exactly are you having trouble with?
17:24 jhauser joined #salt
17:25 irated The file is not getting the data from the pillar
17:25 irated Does local expect it to be a local pillar too?
17:26 UtahDave salt-call still gets pillar data from the master.   salt-call --local will require pillar data to be defined or accessed from the minion
17:26 irated Im doing this to test: salt-call --local --file-root=/root state.sls proftpd test=True
17:26 irated should I rsync my pillar stuffs down for testing
17:27 UtahDave Yeah, that's not going to work.   the `--local` makes it completely self contained
17:27 UtahDave if your pillar data is defined on the master then --local will make that pillar data from the master unavailable.
17:27 UtahDave You'd have to set up pillar_roots on your minion and define pillar data there.  Or use some kind of external pillar from the minion
17:28 irated UtahDave: thats exactly what i thought
17:28 irated Good to know
17:28 irated easily fix able
17:28 UtahDave cool
17:29 onlyanegg joined #salt
17:31 promorphus joined #salt
17:33 irated UtahDave: that was actually really easy
17:33 irated Test proved it will work TY.
17:33 UtahDave That usually means you did it right!   :)
17:33 irated I really need to figure out how to set up a test kitchen and have jenkins running tests
17:33 irated instead of my manual super uber ugly sauced tests from hell
17:36 Drunken_angel joined #salt
17:42 edrocks joined #salt
17:45 NeoXiD joined #salt
17:45 nickabbey joined #salt
17:50 jas02_ joined #salt
17:50 Edgan joined #salt
17:52 Salander27 joined #salt
17:55 wryfi is there a way to specify a range of acceptable package versions with pkg.installed?
17:55 babilen No
17:55 wryfi there are a number of apt repos that remove old point releases when they add a new one
17:56 babilen apt works under the assumption that you want the latest version
17:56 babilen (unless you specifically hardcode a specific version)
17:57 woodtablet joined #salt
17:57 fir3 joined #salt
17:58 wendall911 joined #salt
18:04 jas02_ joined #salt
18:06 sarcasticadmin joined #salt
18:07 jas02_ joined #salt
18:21 jas02_ joined #salt
18:21 stooj joined #salt
18:22 nickabbey joined #salt
18:23 eprice joined #salt
18:27 stanchan joined #salt
18:27 promorphus joined #salt
18:30 stooj joined #salt
18:44 bluenemo joined #salt
18:45 ProT-0-TypE joined #salt
18:49 debian112 joined #salt
18:59 djgerm joined #salt
19:02 st8less joined #salt
19:03 mikecmpbll joined #salt
19:03 jas02_ joined #salt
19:08 nickabbey joined #salt
19:12 gru1234 joined #salt
19:13 gru1234 Hi all.. Is there a way to store metadata on a salt minion that would be available to the salt-master during a state apply?
19:14 gru1234 For instance, I'm working on dynamic EC2 creation and can only have one base AMI.. So I have a start up script that defines the RPM name in the new EC2 that the Salt master needs to know while it is being set up.
19:15 gru1234 Then Salt master would get the RPM name from the EC2, and use it while applying state to install it.
19:16 bltmiller joined #salt
19:17 promorphus joined #salt
19:18 Sketch technically the minion applies the state, not the master...you just call it from the master.
19:19 gru1234 Fair point.. I guess I can use grains as well.
19:19 Sketch grains seem like the easiest way
19:20 Sketch if you actually want to pass something on the command line, you can pass pillar data to state.apply
19:20 Sketch https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
19:20 st8less joined #salt
19:20 Miouge joined #salt
19:21 st8less joined #salt
19:23 st8less_ joined #salt
19:24 jas02_ joined #salt
19:28 st8less joined #salt
19:31 s_kunk joined #salt
19:35 st8less joined #salt
19:35 iggy there are some grain modules that pull ec2 metadata if you want that
19:35 iggy https://github.com/saltstack/salt-contrib/tree/master/grains
19:38 Tanta you can also use cmd.run with curl to query the local virtual endpoint at http://169.254.169.254/latest/meta-data
19:38 iggy eww
19:38 Tanta pretty sure that grains interface is just a pretty way of that
19:38 Sketch Tanta: yeah, that came to mind as well, but i would avoid unnecessary cmd.runs
19:38 Tanta region=$(curl --silent http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/.$//')
19:39 Tanta I do stuff like that frequently in BASH scripts
19:39 Sketch the grains are cached by the client, i don't think it has to fork processes to read them.
19:39 Sketch i figure a highstate already forks enough processes, i don't need to fork more unnecssarily
19:39 Sketch s/client/minion/
19:40 Tanta yes, the runtime context of the script is not shared with the salt highstate
19:40 Tanta I was just pointing out the origin of the EC2 metadata
19:41 jas02 joined #salt
19:42 samodid joined #salt
19:43 iggy the other bad part about cmd.run is it shows up as a change every run
19:44 bltmiller joined #salt
19:44 dxiri joined #salt
19:45 Tanta not if you do {% set var = salt[cmd.run]('whatever') %}
19:45 Tanta only populated during the initial highstate assembly
19:45 Sketch neat, i didn't realize i could do that
19:46 Sketch though it seems obvious now that i see it :)
19:46 hemebond left #salt
19:46 hemebond joined #salt
19:47 Tanta {% set git_tag = salt['cmd.run']('cd ' ~ app_git_root ~ '/src/bitbucket.org/company/' ~ app_name ~ '  && git describe > /dev/null 2>&1 || echo "N/A"') %}
19:47 Tanta here's a non-trivial example
19:48 Tanta this is not a preferred way to do anything, but sometimes I go back in and hack in extra stuff and it's convenient
19:53 Miouge joined #salt
19:54 bbradley joined #salt
19:59 dyasny joined #salt
20:00 cyborg-one joined #salt
20:01 Xopher joined #salt
20:02 ALLmight_ joined #salt
20:04 Xopher joined #salt
20:04 Xopher joined #salt
20:06 ninjada joined #salt
20:07 ninjada joined #salt
20:14 tercenya joined #salt
20:15 ajw0100 joined #salt
20:16 pipps joined #salt
20:17 promorphus joined #salt
20:19 promorphus joined #salt
20:20 Bryson joined #salt
20:25 jas02 joined #salt
20:25 pipps joined #salt
20:26 iggy for that you should use cmd.shell
20:26 winsalt whats wrong with archive.extracted? it complains about a top-level directory even though it has one
20:28 Bryson joined #salt
20:28 yetanotherzero joined #salt
20:34 nickabbe_ joined #salt
20:37 irctc266 joined #salt
20:37 seanz joined #salt
20:40 tercenya joined #salt
20:43 irctc266 What is the difference between ping_interval and master_alive_interval?
20:44 workthrick left #salt
20:49 nickabbey joined #salt
20:49 Sketch hmm, is there a simple way to do something like {{ variable_{{foo}} }}
20:52 madboxs joined #salt
20:52 Tanta you could do it in two steps: {% set foo = 'variable_' ~ salt['pillar.get']('foo') %} {{ foo }}
20:53 nickabbey joined #salt
20:53 Tanta but I don't know of something equivalent to 'eval'
20:54 Salander27 joined #salt
20:57 rubenb Hi, is it possible to store grains in an external database?
20:58 Edgan rubenb: yes, theforeman does that
21:00 rubenb Edgan: Thanks, will look into that.
21:03 nidr0x joined #salt
21:06 mrueg joined #salt
21:10 scoates joined #salt
21:11 gimpy2939 left #salt
21:12 promorphus joined #salt
21:13 jhauser joined #salt
21:19 edrocks joined #salt
21:25 teclator joined #salt
21:38 ALLmightySPIFF joined #salt
21:39 bowhunter joined #salt
21:40 jikjak joined #salt
21:40 ALLmightySPIFF joined #salt
21:40 netcho joined #salt
21:41 preludedrew joined #salt
21:49 jikjak Hey folks. Anyone know if I configure a database for my master job cache, will it store jobs in there in addition to or instead of the default mechanism?
21:51 Sacro joined #salt
21:51 jhauser joined #salt
21:51 Sacro Anyone here using the mysql-formula and got bind-address to work without screwing things over?
21:52 ninjada joined #salt
21:54 ninjada_ joined #salt
21:54 pipps joined #salt
21:55 madboxs joined #salt
22:00 wwalker_away d
22:08 geomacy joined #salt
22:11 Praematura joined #salt
22:23 mk-fg joined #salt
22:35 ponyofdeath hi, so i have a top.sls which has a list of states to run. is it a top to bottom run of that list because it seems to be running them in a different order than i have. and if so how to i make it run in the order i have them?
22:35 nZac joined #salt
22:39 pcn ponyofdeath are there any dependencies or inclusions within the states?
22:41 pipps joined #salt
22:42 ponyofdeath pcn: there are some includes
22:42 fracklen joined #salt
22:42 ponyofdeath but that sls still comes after the one i want to run first
22:44 pcn So salt reads the .sls files, and creates an ordering of what will happen.
22:45 pcn If you run salt <node target> state.show_highstate you'll get some insight into how salt perceives your instructions.
22:45 pcn If there are dependencies or includes that would affect that, you need to tease them apart to create the order you want.
22:46 infrmnt joined #salt
22:46 ponyofdeath pcn thanks!
22:46 gtmanfred include should run the states from the included file first, otherwise by deafult it runs top down, unless you use requisetes
22:46 gtmanfred https://docs.saltstack.com/en/latest/ref/states/requisites.html
22:47 gtmanfred ponyofdeath: here is a doc all about how states are ordered https://docs.saltstack.com/en/latest/ref/states/ordering.html
22:51 pipps99 joined #salt
22:51 raspado what ports are used between the salt-minion and salt-masters?
22:51 hemebond 4505 and 4506
22:51 raspado thx hemebond!
22:54 invalidexception joined #salt
22:56 madboxs joined #salt
22:56 jas02 joined #salt
22:59 pipps joined #salt
23:05 teclator joined #salt
23:08 pipps joined #salt
23:11 Xopher joined #salt
23:12 ALLmight_ joined #salt
23:17 debian112 joined #salt
23:32 UtahDave raspado: specifically the master needs ports 4505 and 4506 open.  The minions don't need anything special except to be able to reach the master.
23:35 kgoetz joined #salt
23:40 sh123124213 does the reactor take events of the bus or just reads them and acts ?
23:40 UtahDave Just reads them and acts.
23:41 UtahDave the event bus is designed to be ephemeral.  Although I think someone added a feature to shove them all into a database
23:41 Derangeer joined #salt
23:45 sh123124213 I have thought about adding events to a database but would just complicate things. Do you have any links of that feature though ? just for informatino
23:45 packeteer joined #salt
23:49 sh123124213 https://github.com/felskrone/salt-eventsd
23:51 UtahDave sh123124213: in your master config look for   event_return: mysql
23:55 sh123124213 does reading events from the salt python api slow down the overall performance of salt ?
23:56 dxiri joined #salt
23:57 dxiri_ joined #salt
23:58 UtahDave I'd say that in most cases no, there's no effect.   I know of several VERY large installations of Salt that use the event bus heavily. If you're trying to push lots of large hunks of data you can see a slowdown. That's why there's a configurable default cutoff of how much data you can send in an event.
23:59 UtahDave Always test, though.  :)

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