Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-02-20

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

All times shown according to UTC.

Time Nick Message
00:00 kiltzman joined #salt
00:02 catpig joined #salt
00:02 aarontc joined #salt
00:03 kiltzman joined #salt
00:03 kiltzman joined #salt
00:04 kiltzman joined #salt
00:06 kiltzman joined #salt
00:08 kiltzman joined #salt
00:08 kiltzman joined #salt
00:10 awpti joined #salt
00:14 jgarr how can I apply a state and wait for a system to reboot?
00:16 Deliant joined #salt
00:17 denkijin joined #salt
00:21 hemebond jgarr: Reboot during a state apply?
00:26 MikaT joined #salt
00:29 desku joined #salt
00:30 Deliant joined #salt
00:32 glyf joined #salt
00:32 glyf joined #salt
00:41 kiltzman joined #salt
00:47 IRCFrEAK joined #salt
00:47 IRCFrEAK left #salt
00:57 shoemonkey joined #salt
01:01 doublemetres joined #salt
01:10 Deliants joined #salt
01:10 madboxs joined #salt
01:30 Deliant joined #salt
01:33 edrocks joined #salt
01:51 jas02 joined #salt
02:02 jgarr ya, I can't figure out a good way to poll for it from a state. I'm falling back to ansible
02:02 babilen Why not use the proper salt function?
02:03 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event
02:03 jgarr I saw that, but the id_list would need to be everyhost that rebooted. It's not know ahead of time
02:04 babilen How is that list determined?
02:06 babilen You could use the same target expression in a mine.get call as you use in the state targeting
02:06 jgarr I'm registering a variable and then rebooting hosts based on the variable
02:06 babilen So target a mine.get call for that variable (wherever you set it)
02:08 jgarr I set it at the top of the state file. I'll have to look into doing it with mine
02:08 babilen How do you target the state then?
02:09 babilen A {% set foo = 'bar' %} in a SLS doesn't really have an effect on minions
02:11 babilen And do you really have to wait for *all* those systems to reboot before you continue with the state application on each?
02:11 babilen Quite often you want to apply some states, reboot one / the current box and continue
02:12 babilen That can be easily done with wait_for_event and {{ grains['id'] }} in the id_list
02:14 jgarr I'm selectively rebuilding hosts (not just a reboot) so the wait_for_event can take ~30-60 minutes. I can only rebuild ~200 hosts at a time which is why I need to wait for a host to finish rebuilding before starting the next host
02:14 jgarr I was doing my targetting in the salt command and using -b 200
02:17 babilen So you target all your minions in batches of 200 and you want them to apply a single SLS that includes a reboot?
02:30 babilen (if som the above dies that)
02:30 babilen *does
02:32 jgarr I target everything, run it in batches of 200, and in the state I'm registering a variable that says if I should rebuild/reboot the host or not
02:41 babilen Where do you register it?
02:41 babilen And .. can't you reboot it based on the value of that variable and then wait for its reboot with a *single* host in the wait_for_event state?
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:53 catpigger joined #salt
02:54 jgarr I register it at the top of the state file from a script. I think I could wait for a single host
02:54 jgarr oh, I need to not start a new batch until the host is rebuilt
02:57 babilen How and where do you register it?
02:58 babilen And I am still under the impression that the wait_for_event with grains{'id'] as suggested above would do exactly what you are after
03:12 evle joined #salt
03:15 mgi joined #salt
03:15 mgi hi all - I'm having a problem where targeting by my custom 'role' grain is returning 'No response' from the minions, but targeting by other grains is fine
03:16 mgi eg. salt -G 'os:Windows' test.ping is fine
03:16 mgi but salt -G 'role:productionsetup' test.ping gets 'No response' from all the servers that have that grain set
03:19 scc joined #salt
03:21 oida joined #salt
03:24 mgi (all minions and master are version 2016.11.2)
03:32 hemebond mgi: salt myminion grains.get role
03:32 hemebond What does that return? (myminion should be a minion with the grain)
03:33 mgi it returns productionsetup
03:34 mgi if I target role:production (the previous role, before I used 'setval' to change it), it targets correctly
03:34 mgi I've done saltutil.sync_all, is there some kind of caching going on?
03:34 hemebond What do you mean by targets correctly? Targets minions that should have the new value?
03:34 mgi I want to change the role to 'productionsetup' and only target the minions with that grain set
03:35 hemebond Tried sync_grains?
03:35 mgi so the correct minions are "targeted", but they all return "No response"
03:35 mgi hmm ok I'll try it
03:35 hemebond Wait... they're targeted but return no response...
03:35 mgi nup same problem
03:35 mgi correct
03:36 mgi if I target them directly (or with another grain, like OS) they respond find
03:36 hemebond What if you do the grains.get on the minion using salt-call?
03:36 mgi fine*
03:36 mgi it shows the role as 'productionsetup' as expected
03:36 mgi and like I said, if I target with the /old/ role ('production'), they all return correctly! it's bizarre..
03:37 mgi should I maybe restart the master?
03:37 hemebond I wonder if the master knows the new value but the minions don't.... somehow.
03:37 mgi yeah, that's what I'm thinking too.. but the sync should sort that out right?
03:37 mgi in theory
03:38 hemebond Could put a minion into debug mode then try again, see if the job shows up in the minion log.
03:38 mgi wouldn't grains.get return the values from the minion (not the master)?
03:38 mgi ok, I'll try that
03:38 DEger joined #salt
03:38 hemebond I assumed the master cached grains.
03:39 hemebond But yes, it should query the minion.
03:40 mgi ha... running one of the minions in debug, and that one minion responded (the others didn't)
03:40 mgi perhaps restarting the minion is what fixed it..
03:41 hemebond Quite possibly, yeah.
03:41 hemebond Wouldn't be the first time I've seen a restart fix a minion issue.
03:41 mgi heh
03:41 mgi is there a way to tell the minions to restart (the service, not the machine)?
03:41 hemebond https://docs.saltstack.com/en/latest/faq.html#linux-unix
03:42 mgi ah, cool easy - thanks
03:48 JPT joined #salt
03:53 madgoat joined #salt
03:53 madgoat left #salt
03:54 jas02 joined #salt
03:55 orionx joined #salt
04:00 scsinutz joined #salt
04:03 pratik joined #salt
04:10 kiltzman joined #salt
04:11 kiltzman joined #salt
04:12 kiltzman joined #salt
04:13 kiltzman joined #salt
04:13 kiltzman joined #salt
04:14 kiltzman joined #salt
04:18 ivanjaros joined #salt
04:49 rdas joined #salt
04:54 DEger joined #salt
05:04 ronnix joined #salt
05:08 jas02 joined #salt
05:08 scsinutz joined #salt
05:17 KennethWilke joined #salt
05:33 ronnix joined #salt
05:35 edrocks joined #salt
05:36 madboxs_ joined #salt
06:17 armyriad joined #salt
06:25 jas02 joined #salt
06:32 jas02 joined #salt
07:02 colttt joined #salt
07:09 felskrone joined #salt
07:17 Inveracity joined #salt
07:28 cyborg-one joined #salt
07:39 teclator joined #salt
07:41 impi joined #salt
07:43 oyvindmo joined #salt
07:45 fracklen joined #salt
07:54 madboxs joined #salt
07:55 scristian joined #salt
07:56 madboxs joined #salt
07:57 madboxs joined #salt
08:00 lasseknudsen joined #salt
08:01 jhauser joined #salt
08:03 darioleidi joined #salt
08:10 juntalis_ joined #salt
08:14 kiltzman joined #salt
08:14 kiltzman joined #salt
08:16 ReV013 joined #salt
08:18 fracklen joined #salt
08:18 kiltzman joined #salt
08:19 kiltzman joined #salt
08:20 kiltzman joined #salt
08:20 candyman88 joined #salt
08:21 kiltzman joined #salt
08:22 kiltzman joined #salt
08:24 JohnnyRun joined #salt
08:25 preludedrew joined #salt
08:26 llua joined #salt
08:27 o1e9 joined #salt
08:28 ivanjaros joined #salt
08:29 fracklen joined #salt
08:29 fracklen joined #salt
08:34 armyriad joined #salt
08:39 DEger joined #salt
08:48 lasseknudsen2 joined #salt
08:51 krymzon joined #salt
08:51 dariusjs joined #salt
08:55 bdrung_work joined #salt
08:58 rimk joined #salt
08:59 mavhq joined #salt
09:02 DanyC joined #salt
09:11 achedeuzot joined #salt
09:13 koleg2 joined #salt
09:16 yuhl______ joined #salt
09:17 madboxs joined #salt
09:18 mikecmpbll joined #salt
09:20 madboxs_ joined #salt
09:21 masber joined #salt
09:22 koleg2 hello. I need to use a different python version than the system one. I've think on virtualenv and pyenv, I am not used to them. seesm different beasts. Do I need pyenv to setup multiple python versions and then virtualenv to setup different package sets? do anyone have an example on how to accomplish this with salt?
09:23 koleg2 the end goal is to use thumbor, that needs python 2.7.9 over a ubuntu14.04 (it comes with 2.7.2)
09:25 koleg2 thank you in advance for any clue, of course :)
09:27 s_kunk joined #salt
09:30 dariusjs joined #salt
09:33 yuhl______ left #salt
09:35 ronnix joined #salt
09:36 teclator joined #salt
09:40 CrummyGummy joined #salt
09:43 dariusjs joined #salt
09:44 netcho_ joined #salt
09:44 ronnix joined #salt
09:46 lorengordon joined #salt
09:49 felskrone joined #salt
09:55 erhandsome joined #salt
09:56 ronnix joined #salt
10:04 hemebond koleg2: That's really a Python question, not Salt.
10:04 hemebond But, pyenv is for Python3 and virtualenv is for Python2 (basically).
10:04 hemebond They both work roughly the same way.
10:12 jas02 joined #salt
10:18 cliluw joined #salt
10:22 nicerobot[m] left #salt
10:24 ravi_ joined #salt
10:29 gmoro_ joined #salt
10:31 mikecmpbll is it typical to have the ubuntu version number, e.g. 16.04 or 14.04 in the package source URL?
10:32 mikecmpbll when i run `do-release-upgrade` to go from trusty to xenial, it updates all the package sources for you by changing "trusty" to "xenial" and it always borks on saltstack because the version number doesn't get updated
10:32 mikecmpbll curious why that is the case for saltstack and no other sources i use /shrugs
10:33 AndreasLutro that sounds silly, figure out where the version number is being pulled from
10:33 AndreasLutro I think it's from lsb_release -a
10:33 AndreasLutro or -rs technically
10:34 mikecmpbll AndreasLutro : where the version number is being pulled from for what?
10:34 AndreasLutro in salt
10:34 ravi_ Hi guys,
10:34 ravi_ I'm trying to generate yaml from sls using this command `salt '*' cp.get_template salt://path/to/template /dev/stdout`.
10:34 ravi_ But its throwing this error, "Passed invalid arguments: coercing to Unicode: need string or buffer, bool found." Why its giving error. I'm using salt 2016.11.2 in ubuntu:14.04.
10:34 AndreasLutro grains.osrelease or whatever
10:34 mikecmpbll it's not to do with anything salt is doing
10:34 mikecmpbll just around salt's package repo and ubuntu
10:35 AndreasLutro ah sorry I misunderstood
10:35 AndreasLutro yeah we always write custom dist-upgrade scripts to deal with stuff like that
10:37 edrocks joined #salt
10:41 rbjorklin joined #salt
10:41 rbjorklin When using cloud maps is it possible override the availability_zone in the cloud map file?
10:46 darioleidi_ joined #salt
10:47 darioleidi_ joined #salt
10:59 hoonetorg joined #salt
11:02 darioleidi joined #salt
11:09 Kelsar joined #salt
11:15 Shirkdog_ joined #salt
11:16 kbaikov joined #salt
11:17 Kelsar joined #salt
11:24 dariusjs joined #salt
11:28 evle1 joined #salt
11:29 mritchie joined #salt
11:29 mritchie joined #salt
11:40 CrummyGummy joined #salt
11:41 candyman88 joined #salt
11:48 jas02 joined #salt
11:58 lasseknudsen joined #salt
12:09 stooj_ joined #salt
12:12 funabashi joined #salt
12:13 lasseknudsen2 joined #salt
12:15 jj_ joined #salt
12:15 jj_ left #salt
12:17 Kruge Does the salt 2016.11.2 require python3, by any chance?
12:18 Kruge I'm trying to figure out what might be causing the salt-cloud problem I was blethering on about yesterday
12:18 Kruge Or the day before, or whenever it was
12:21 Ztyx joined #salt
12:22 Neighbour Kruge: not that i'm aware of...even salt-devel runs find on python2
12:23 kiltzman joined #salt
12:24 Kruge Hrm.  I'm getting an error message from salt-cloud about exceptions needing to be old-style classes or derived from BaseException, not nontype.  I follow the debug info, and it seems to be happening in wait_for_task() in vmware.py
12:25 Kruge THe annoying thing is that it all worked a few weeks ago, and now seems to not
12:27 Kruge https://paste.ee/p/OCjYf shows my salt version info
12:29 Kruge I've tried it with pyvmomi 6.5 and 6.0.2016.whatever_the_fixed_version_was
12:31 netcho_ joined #salt
12:32 haam3r Kruge: I'm seeing the same thing
12:33 haam3r The task is actually being executed in vmware
12:33 Kruge Yes, but the timeout exception gets thrown
12:33 haam3r and it's intermittent...usually on the third or fourth attempt it works
12:33 Kruge It reliably creates a VM for me
12:34 Kruge Similarly, it always reports failure to delete but actually does delete
12:34 haam3r yep
12:34 Kruge The only change I've made to my vsphere setup is moving from NFS to iscsi datastores, but I don't see how that should change anything
12:35 haam3r I'm seeing it with other types datastores as well so yeah that should not be the cause
12:36 haam3r I saw a an issue about it for an earlier version I think...so maybe a regression...gimme a moment I'll try and find it again
12:36 Kruge There is an issues open on github already for this... got there before me
12:36 Kruge I have tried copying the vmware.py from develop over the top of the packaged version, but it still failed
12:39 BHauser joined #salt
12:45 haam3r Kruge: I'm guessing you mean this one: https://github.com/saltstack/salt/issues/37845
12:45 saltstackbot [#37845][OPEN] VM creation / deletion on vSphere 5.5 is aborted with "Error: None" | Description of Issue/Question...
12:48 shoemonkey joined #salt
12:52 Kruge Thats the one
12:52 Kruge What I didn't try was the older version of pyvmomi with the develop version of vmware.py
12:54 swa_work joined #salt
12:59 Kruge Well, that appears to work
13:02 Kruge Issue updated
13:03 flawi joined #salt
13:05 flawi is there a way for me to do {% for minion in <minions with a given grain>%} in an orchestrate file? to be more specific, is it possible for me to get a list of minions that have a given grain set to a given value?
13:06 flawi I'm doing a grain targeted system.reboot, and would like to use wait_for_events to wait until the rebooted minions are back up, but can't figure out a way of passing the rebooted minions to the id_list required by wait_for_event
13:07 haam3r flawl: maybe salt-mine is what you are looking for
13:07 flawi hmm, all right, I'll take a look
13:07 flawi thanks
13:08 dariusjs joined #salt
13:10 mikecmpb_ joined #salt
13:12 ronnix joined #salt
13:12 gableroux joined #salt
13:16 Kruge haam3r: Just went through a full salt-cloud deploy and destroy, and it all works now.  Looks like the combination of pyvmomi 6.5 and 2016.11.2 doesn't play nice.
13:19 alexlist joined #salt
13:20 haam3r Kruge: just checked...I'm on pyvmomi (6.0.0.2016.6)
13:22 bakins joined #salt
13:28 jas02 joined #salt
13:29 ksk hey guys; Im reading about putting packages into a map.jinja here: https://docs.saltstack.com/en/latest/topics/best_practices.html
13:29 ksk these examples have dictionries like "server:apache" - is there a way to make it work with a list of packages to install (as I eg. have 50 packages to install, and only want to pass the list in init.sls but not put every "$name" in there. hope yout get what I want..
13:36 ksk I got it, need to reference the right way (in this case without "-" in init.sls)
13:38 samodid joined #salt
13:38 puzzlingWeirdo joined #salt
13:40 jas02 joined #salt
13:41 edrocks joined #salt
13:45 AbyssOne joined #salt
13:45 Kruge haam3r: And you copied the salt/utils/vmware.py from develop over the 2016.11.2 version?
13:49 haam3r Kruge: not yet...a bit busy..I'll try and test as soon as I get the chance
13:51 Hybrid joined #salt
13:53 mage_ any idea how on minion "backup.lan" I could set a pillar key: "foo", where "foo" is the result of the "icinga2 pki ticket --cn backup.lan" which is executed on minion "icinga.lan" ?
13:54 CeBe mage_: that sounds more like grains than pillar
13:54 CeBe wait, not really, as these are two different minions
13:54 mage_ yes
13:55 CeBe mage_: and icinga is not the master, right?
13:55 mage_ icinga.lan is the master
13:55 mage_ ah Salt you mean ?
13:56 mage_ no, icinga.lan is a minion, but it's the master icinga
13:57 mage_ I have ~50 clients and I'd like to avoid having to execute "icinga2 pki ticket --cn myclient" and create a dedicated pillar file
13:58 numkem joined #salt
13:59 CeBe mage_: https://docs.saltstack.com/en/latest/topics/development/external_pillars.html
13:59 CeBe maybe that helps somehow
14:00 mage_ let me check :)
14:03 fracklen joined #salt
14:08 gableroux joined #salt
14:15 mikecmpbll joined #salt
14:22 flawi haam3r, it seems that I could do it with mine, but is there really no simpler method? in my use case I'm using 'salt-run state.orchestrate' on the master to do this, and it seems backwards to me that I would have to configure the minions to publish information the master already surely knows
14:23 flawi for example the names of minions that match G@roles:somerole
14:29 ssplatt joined #salt
14:29 jas02 joined #salt
14:32 numkem joined #salt
14:36 mage_ so it should be possible to write a function that execute some_command on some_minion, take the output and use it as an external pillar for another_minion?
14:37 mage_ the documentation is quite short on that topic :(
14:38 haam3r flawl: does the orchestrate function not accept something like:
14:38 haam3r - tgt: 'role:auth_servers'
14:38 haam3r - tgt_type: grain
14:38 flawi the wait_for_events one doesn't, since it requires an id_list of minions to wait for
14:38 dxiri joined #salt
14:38 flawi I'll pastebin an example, gimme a sec
14:40 haam3r flawl: ack
14:40 flawi haam3r, https://gist.github.com/Flaw/ad4ce011244c6eb4dc62a61c183e1b05
14:41 flawi so instead of listing the minions on the id_list, I'd preferrably do some jinja magic to loop through the minions and generate that list on the fly
14:41 ssplatt still no word on saltconf? :(
14:42 t0m0 joined #salt
14:42 mritchie joined #salt
14:47 dendazen joined #salt
14:50 racooper joined #salt
14:52 dariusjs joined #salt
14:55 fracklen joined #salt
14:59 sagerdearia joined #salt
14:59 haam3r flawi: How are you executing the orchestrate? against all minions?
15:00 flawi I was under the impression that it's the tgt parameter that defines which minions are targeted during orchestration, so on the command line I'm not specifying anything extra
15:01 flawi but in this particular case it's only running against a third of my minions, but that might change if I end up doing something more than just rebooting and waiting for the restart with orchestrate
15:03 flawi well, installing a piece of software which requires a reboot, then rebooting and waiting for it
15:03 flawi to be precise
15:12 mpanetta joined #salt
15:16 haam3r flawi: TBH I'm not coming up with anything other than salt-mine..maybe guys smarter than me on the channel can suggest something
15:20 fxpester joined #salt
15:20 fxpester hi all, is it possible to create a openstack flavor with salt-cloud ? I can see only listing options...
15:21 gmoro joined #salt
15:23 gmoro joined #salt
15:24 flawi haam3r, all right, thanks anyways
15:26 ronnix joined #salt
15:33 DEger joined #salt
15:33 cmarzullo fxpester: https://docs.saltstack.com/en/latest/topics/cloud/config.html#openstack
15:39 inad922 joined #salt
15:43 Aleks3Y joined #salt
15:44 mage_ mmh it seems uber complicated to do this in Saltstack: "take the output of cmd.run my.cmd from minion B and use it as pillar data for minion A" ... or am I wrong?
15:44 lompik joined #salt
15:46 mage_ or should I use a custom module with the Salt API to do this?
15:49 cmarzullo mage_: yeah that's kinda of a complicated scenario. You are looking at an external pillar. Or having the minion push data to the mine
15:54 fracklen joined #salt
15:54 mage_ I think I definitively need a custom pillar
15:57 netcho_ joined #salt
15:57 jimklo joined #salt
16:01 cmarzullo external pillar/
16:01 mage_ yes external pillar sorry :)
16:01 * mage_ <- tired
16:02 numkem joined #salt
16:05 lompik joined #salt
16:09 Reverend I take it reactors can 'return' output data from salt?
16:12 brd With Jinja I a trying to write a simple for loop to create users and I can't figure out how to give it the list of users:
16:12 brd {% for usr in "user1 user2" %}
16:15 cmarzullo that is a string
16:15 cmarzullo {% for user in ['user1', 'user2'] %}
16:15 cmarzullo that's an array
16:16 brd oh, so it expect an array?
16:16 cmarzullo it expects an iterable.
16:16 cmarzullo I think if you iterate over a string you get each charecter as an element.
16:17 cmarzullo You can also iterate over a dictionary. So like maybe you have a ditionary that is basically your user directory. With passwords, keys, shells, whaterver.
16:17 brd cmarzullo: aha, thanks!
16:18 brd Right, I saw examples of those being used, but not how to create them
16:18 brd they always called other functions
16:18 ranomore left #salt
16:18 cmarzullo usually you pass in your data via pillar.
16:19 brd I haven't learned about pillar yet
16:19 cmarzullo Generally speaking, with cfg mgmt you want to separate your data from the actions upon the data.
16:19 brd that makes sense
16:19 cmarzullo in that case pillar will probbaly solve a bunch of thigns for you.
16:20 brd this is for creating service accounts, so maybe not in this case?
16:20 cmarzullo Like different hosts get different users
16:20 cmarzullo perhaps. do you have a web service account on a db server?
16:20 cmarzullo I dunno. depends on your env.
16:20 brd I have a dns state that only gets included on dns*
16:21 brd But maybe that isn't the best way
16:21 cmarzullo that's fine. Most people start that way.
16:21 fracklen joined #salt
16:21 cmarzullo it's very approachable and will solve the imediate problem.
16:21 brd yeah
16:22 cmarzullo Eventually as you mature you'll find you keep doing the same stuff. Like creating users. So you'll want to have a single set of states that manage users, so you can apply it to any minion
16:22 cmarzullo and the only difference is the pillar which determines what happens on each host.
16:22 cmarzullo The whole "DRY" thing
16:23 brd Right
16:23 brd Let me go read the pillar tutorial
16:24 darvon joined #salt
16:24 fracklen joined #salt
16:26 cyborg-one joined #salt
16:27 cmarzullo So who's upgrading salt with salt.
16:28 cmarzullo I'm glad the added the bit where it won't patch on you by accident. But now I want to patch salt across the fleet.
16:28 wendall911 joined #salt
16:30 teclator joined #salt
16:39 DEger joined #salt
16:41 netcho_ joined #salt
16:42 dyasny joined #salt
16:43 fracklen joined #salt
16:44 ivanjaros joined #salt
16:50 brd awe, file.uncomment doesn't support multiple regexes
16:53 impi joined #salt
16:56 Guest5348 joined #salt
17:09 J0hnStee- joined #salt
17:09 iter joined #salt
17:09 MajObvio1sman joined #salt
17:09 fhh_ joined #salt
17:09 netzvieh_ joined #salt
17:09 DEger joined #salt
17:09 telxr joined #salt
17:09 s_kunk joined #salt
17:09 Horgix joined #salt
17:09 ecdhe joined #salt
17:09 oida joined #salt
17:09 ssplatt joined #salt
17:10 afics joined #salt
17:12 __number5__ joined #salt
17:12 OfficialLeibniz joined #salt
17:14 jas02 joined #salt
17:17 DEger joined #salt
17:18 tom29739 joined #salt
17:24 Sammichmaker joined #salt
17:24 jas02 joined #salt
17:25 scsinutz joined #salt
17:28 samodid joined #salt
17:30 raspado joined #salt
17:32 Inveracity joined #salt
17:48 jas02 joined #salt
17:48 dxiri joined #salt
17:50 Edgan joined #salt
17:51 Tanta joined #salt
17:52 ekristen joined #salt
17:54 ekristen anyone familiar with using state.sls_id ?
17:56 MTecknology probably
17:57 edrocks joined #salt
17:58 ekristen nm, I found my answer by looking through the issues https://github.com/saltstack/salt/issues/20049
17:58 saltstackbot [#20049][MERGED] state.sls_id does not consider watch(_in)? | Hi there!...
17:58 norrit joined #salt
17:59 icebal joined #salt
18:04 mikecmpbll joined #salt
18:15 onovy joined #salt
18:17 Nahual joined #salt
18:21 debian112 joined #salt
18:24 SaucyElf joined #salt
18:29 zer0def joined #salt
18:37 onlyanegg joined #salt
18:39 ChubYann joined #salt
18:43 fracklen joined #salt
18:43 samodid joined #salt
18:52 jas02 joined #salt
19:02 nixjdm joined #salt
19:03 dariusjs joined #salt
19:04 noob joined #salt
19:05 jas02 joined #salt
19:27 candyman88 joined #salt
19:35 icebal joined #salt
19:36 onlyanegg joined #salt
19:37 dps joined #salt
19:40 DanyC joined #salt
19:44 bltmiller joined #salt
19:53 cyborg-one joined #salt
19:57 filippos joined #salt
19:59 armonge joined #salt
20:02 onlyanegg Is it possible to run a state until it returns true?
20:02 nidr0x joined #salt
20:04 norrit Starting to learn salt for work, there was mention by co-workers of a vagrant build I could use. My question is, I don't know vagrant, so would it be better to do a VM with just salt for learning or is it easy enough that I may as well learn vagrant while I'm at it?
20:04 MTecknology What was the attendance at the last saltconf?
20:05 onlyanegg norrit: vagrant is pretty simple to use. I'd say it's worth it.
20:06 norrit onlyanegg: cool, I'll give it a go. Lots of new things to learn going from a general linux sysad to a hybrid position that wants me to move toward devops.
20:06 dps joined #salt
20:10 CeBe Hi, what would be the safest way when creating lvm lvs with salt to create a file system on them?
20:10 CeBe of course I want to run the mkfs only when the lv is just created and not accidentally run it on an existing lv that contains some data
20:10 jas02 joined #salt
20:11 CeBe I am using lv_present to create the lv: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.lvm.html#salt.states.lvm.lv_present
20:12 Trauma joined #salt
20:13 cmarzullo MTecknology: they said it was pretty good last year. they were bragging about it. Sad that we haven't seen any info if they will haveone this year.
20:14 s_kunk joined #salt
20:14 onlyanegg CeBe: Have you looked into requisites? https://docs.saltstack.com/en/latest/ref/states/requisites.html
20:14 Firewalll joined #salt
20:15 MTecknology they'll have one, it's just going to be a different venue, I've heard rumors of date/location but I'm not allowed to share because it's not definite, yet.
20:15 jimklo joined #salt
20:15 cmarzullo well presumably it's not in march.
20:16 CeBe onlyanegg: I knew about some of them. seems they are more powerful than I thought. I also did not find a state module for filesystems, is that a thing or should I use cmd.run with mkfs.ext4?
20:16 cmarzullo I was thinking of pulling a quick one and going to dusseldorf for salt (mining) cong
20:16 cmarzullo err conf
20:18 onlyanegg CeBe: I'm currently using the xfs salt module, but it looks like the blockdev state might do what you want
20:18 DEger joined #salt
20:19 MTecknology As long as it's near a marriott, I'm happy. I wonder if I can use PDR for the flight...
20:19 MTecknology I don't think I can, but I at least have an absurd number of marriott points :D
20:20 CeBe onlyanegg: thanks, that is exactly what I was looking for!
20:26 adelcast left #salt
20:27 mritchie joined #salt
20:28 icebal joined #salt
20:33 fracklen joined #salt
20:38 icebal joined #salt
20:39 raininja joined #salt
20:40 DEger joined #salt
20:41 fracklen joined #salt
20:43 justanotheruser joined #salt
20:44 dxiri hello everyone, I am trying to use salt as a cloud controller to deploy some VMs, I already have my base image created, but when using virt.init, salt gets stuck here:
20:45 dxiri [DEBUG   ] get_iter_returns for jid 20170220144106270432 sent to set(['a172-25-151-61.deploy']) will timeout at 14:51:06.272986
20:51 adelcast joined #salt
20:58 whytewolf dxiri: what is the full command you are trying [sanatized of coarse]
20:59 dxiri whytewolf: just a single VM to start, like this:
20:59 dxiri salt-run -l debug virt.init centosTEST3 4 2048 salt://centos6-base.img
21:01 whytewolf humm try with -l all instead.
21:02 whytewolf I've never used the virt stuff so can only do basic guesses
21:02 dyasny_ joined #salt
21:09 ekristen basepi: how goes it?
21:14 dxiri k let me try
21:16 impi joined #salt
21:20 dxiri http://pastebin.com/mbR6QWHX
21:20 dxiri -l all shed some light :)
21:20 mritchie joined #salt
21:20 dxiri but not sure what that error means
21:22 whytewolf humm looks like the virt runner is trying to run the virt exacution module
21:26 netcho_ joined #salt
21:26 jas02 joined #salt
21:27 winsalt joined #salt
21:29 onlyanegg joined #salt
21:30 DEger joined #salt
21:35 dxiri any tips to troubleshoot? I'm stumped
21:35 dxiri the command to create the VM gets to the minion, but apart from that, seems like its doing nothing
21:38 dps joined #salt
21:40 dyasny_ joined #salt
21:41 dps_ joined #salt
21:43 winsalt anyone have a suggestion for returning orchestration output somewhere, --return isnt an option for salt-run?
22:03 J0hnSteel joined #salt
22:04 raspado joined #salt
22:05 colttt joined #salt
22:08 scsinutz joined #salt
22:10 jhauser joined #salt
22:28 onlyanegg joined #salt
22:30 five04tluv joined #salt
22:31 brd To use the salt mine, do I have to enable anything?  This returns nothing: salt '*' mine.get '*' '*'
22:32 jas02 joined #salt
22:33 five04tluv are the salt built-in modules not really supposed to be used in top.sls. trying to do sysctl.persist and it is not applying
22:34 fgimian joined #salt
22:35 onlyanegg five04tluv: you need to use the module.run state to run execution modules with an sls file. https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
22:37 dxiri whytewolf: seems like trace is showing a loop: http://pastebin.com/yGQfhMkV
22:39 whytewolf brd: that command means almost nothing... what is that last '*' supposed to be?
22:39 whytewolf dxiri: welp at this point we are out of my depth about the virt modules.
22:41 brd whytewolf: well I am trying to pull back the ipaddresses of all my machines so I can compile a zone file and the docs on salt mine are not helping nor is searching the web
22:41 brd whytewolf: so at this point I am trying to find out if it is returning anything at all
22:42 whytewolf five04tluv: you want states [which are what the top.sls file calls to put the system into a state] the corrasponding state module to sysctl.persist. would be sysctl.present https://docs.saltstack.com/en/latest/ref/states/all/salt.states.sysctl.html#salt.states.sysctl.present
22:42 whytewolf brd: the command you ran wouldn't return anything because there is no mine function [unless you created one] called '*'
22:42 brd whytewolf: ok
22:42 whytewolf read this https://docs.saltstack.com/en/latest/topics/mine/
22:43 gmoro joined #salt
22:43 brd whytewolf: yeah, I have that up, but I am missing something..
22:43 whytewolf brd: did you create any mine functions?
22:43 brd whytewolf: I have a pillar file that I am trying to return all the grains in
22:44 whytewolf that sentance made no sense.
22:44 brd let me show you
22:45 brd whytewolf: my pillar file pillar/ipaddr.sls contains: http://slexy.org/view/s210zBgiAb
22:45 whytewolf humm
22:45 whytewolf yeah that won't work
22:46 whytewolf one moment let me dig into my gist archives
22:48 brd whytewolf: ok, I am not understanding how these things are connected
22:49 whytewolf https://gist.github.com/whytewolf/eff4a15f0eaa8d5354a3
22:49 whytewolf the pillar is used to tell mine what functions to run pereoticly to save to the master
22:49 whytewolf other wise it does nothing
22:49 brd right
22:51 onlyanegg joined #salt
22:51 whytewolf first. you don't need the - it is supposed to be a dict not a list. second. if yoru mine function is the same name as the function you are running you don't need to add the other info just wrpa it up in :[]
22:52 whytewolf second when you are calling the mine you need to reference a mine function
22:52 brd so like this:
22:52 brd mine_functions:
22:52 brd network.interfaces: []
22:52 whytewolf so salt '*' mine.get '*' network.interfaces
22:53 whytewolf yes
22:53 brd returns nothing
22:53 brd well it returns each host, but with nothing underneith
22:53 whytewolf a. does the pillar show up on all hosts
22:54 whytewolf b. did you run mine.update
22:54 brd i.e. http://slexy.org/view/s2slrji8MD
22:54 brd let me run mine.update
22:54 whytewolf first make sure the pillar is showing up
22:55 whytewolf doesn't do any good if the pillar isn't right
22:55 brd right
22:56 brd ok, so that has data
22:56 brd like I expect
22:57 edrocks joined #salt
22:57 WesleyTech_ joined #salt
22:58 brd whytewolf: so now, to use that in a file.managed jinja template
22:58 bd joined #salt
23:01 whytewolf something like {% for server ,addy in salt.mine.get('minion targetting','mine.function',expr_form='targeting type') | dictsort() %} {{server}} {{addy|first}} {%endfor%}
23:01 brd whytewolf: ok, where does "server" come from at the beginning of that for loop?
23:02 whytewolf from the mine
23:02 whytewolf it is meant to fill in both fields
23:02 brd but I don't have a mine_function for server?
23:03 whytewolf it is comeing from mine. it should be the minion id of the return data
23:03 brd oh!
23:04 whytewolf key,value return of a dict basicly
23:05 brd can the value be a dict?
23:05 whytewolf yeah
23:05 brd i.e. the network.interfaces result?
23:05 whytewolf in fact it will be a list
23:05 brd ok, because I have a few machines with *lots* of interfaces
23:05 whytewolf shouldn't be a problem
23:05 justan0theruser joined #salt
23:06 brd right, I just need to get the IP of the main interface, so I have a couple of choices
23:07 whytewolf for getting ip i personally prefer ip_addrs which lets me select the ip address based on cidr or other items
23:07 brd so I was thinking of having an {% if interface.em0 %} {% interface.em0.addr %} {% endif %}
23:07 DEger joined #salt
23:07 brd yeah, I would like that too, but I don't think that will work in this case because we have so many interfaces with internal addresses on them
23:11 whytewolf well, i have hundreds of interfaces. but each has it's own subnet. [gotta love openstack controllers to royally confuse people with network]
23:12 flawi_ joined #salt
23:14 brd fun
23:14 brd hmm
23:14 brd this isn't working
23:14 brd {% for server,interface in salt['mine.get']('*', 'network.interfaces', expr_form='grain') | dictsort() %}
23:14 brd ={{ server }}:{{ interface['bce0']['inet']['address'] }}:300
23:15 brd {% endfor %}
23:15 whytewolf what are you getting?
23:15 mswart joined #salt
23:16 brd nothing
23:16 brd the header of the template, but that loop isn't producing
23:16 whytewolf not even an error?
23:16 brd right
23:16 brd I am running: salt 'ns0*' state.highstate from the master
23:17 whytewolf okay... and salt 'ns0*' mine.get '*' network.interfaces
23:17 whytewolf returns the information you are expecting?
23:17 brd whytewolf: returns the huge list of interfaces from every host as expected
23:18 whytewolf humm. strange ... and the place the loop is at doesn't even have =::300
23:18 brd right
23:18 whytewolf ?
23:18 whytewolf is this in pillar?
23:18 brd the loop?
23:18 whytewolf yeah.
23:19 brd no, it is in the file.managed template: jinja file
23:19 whytewolf ohhhh
23:19 whytewolf salt 'ns0*' mine.get '*' network.interfaces expr_form=grain
23:21 whytewolf if you are not targetting with grains just leave off the expr_form
23:22 brd ooh, ok
23:26 beardedeagle joined #salt
23:27 brd whytewolf: can I limit the network.interfaces results to up: True somehow?
23:28 whytewolf network.interfaces has no options
23:28 beardedeagle is there anyway to force cmd.run to use something other than 32bit powershell
23:29 * whytewolf shrugs
23:29 whytewolf I really should play around with salt on windows at some point
23:32 beardedeagle werd, I'll dig into the code.
23:33 jas02 joined #salt
23:56 brd whytewolf: given this data, {{ interface.bce0.up }} works, but {{ interface.bce0.inet }} does not
23:57 brd whytewolf: that seems strange
23:57 mikecmpbll joined #salt
23:59 whytewolf try {{interface.bce0.inet[0]}}
23:59 mavhq joined #salt

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