Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-03-04

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

All times shown according to UTC.

Time Nick Message
01:08 onlyanegg joined #salt
01:29 exarkun joined #salt
01:40 masber joined #salt
02:23 shiranaihito joined #salt
02:57 ilbot3 joined #salt
02:57 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.9, 2017.7.4 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
03:05 armyriad joined #salt
03:08 yidhra joined #salt
03:19 onlyanegg joined #salt
03:31 gmoro joined #salt
04:02 amy_ joined #salt
04:02 armyriad joined #salt
04:35 NightMonkey joined #salt
04:51 onlyanegg joined #salt
05:03 xet7 joined #salt
05:03 amy_ joined #salt
06:19 thelocehiliosan joined #salt
06:28 amy_ joined #salt
06:32 onlyanegg joined #salt
07:37 zulutango joined #salt
07:53 impi joined #salt
07:58 masuberu joined #salt
08:00 impi joined #salt
08:30 amy_ joined #salt
08:40 cewood joined #salt
08:55 armyriad joined #salt
09:23 aldevar joined #salt
09:35 pcdummy Does someone know how "onfail" works? For me it always executes.
09:47 viq pcdummy: can you show your states?
09:47 pcdummy Yeah, working on a simple example
09:51 pcdummy viq: http://paste.debian.net/plain/1013024
09:53 pcdummy The first state creates a container, the second run "ls" in it to check if it has been bootstraped, the 3rd creates the file if the 2nd fails
09:53 pcdummy the 3rd runs all the time
09:53 pcdummy The 2nd even shouldn't run as it got a "watch" command
09:56 zer0def have you tried removing the `require` requisite on the state with `onfail`?
09:57 zer0def that state already has a conditional chain dependency through that `onfail`, anyway
10:02 pcdummy zer0def: that works, sadly
10:02 zer0def not really sadly, if you double check requisite behavior: https://docs.saltstack.com/en/latest/ref/states/requisites.html#requisite-overview
10:02 pcdummy I have a lot more `require`s
10:03 zer0def `require` and `watch` imply being always executed, `prereq`, `onchanges` and `onfail` are hook-like/conditional
10:04 zer0def and i personally read hook-likes as "ok, the first thing run (and hence, requisites are safistied), so to *this* when…"
10:04 zer0def s/to /do /
10:05 pcdummy May you can help: I have one state that checks if the container has been bootstraped `checked`, if that fails i call some scripts on that container, if all scripts worked i reboot the container, then i make it `checked`
10:06 pcdummy I'm on the way to implement: https://github.com/saltstack-formulas/lxd-formula/issues/3
10:07 pcdummy So i need "onfail AND require" or something
10:07 pcdummy The simple example now works, thank you zer0def
10:08 zer0def "all scripts" is a superset of "some scripts" in this instance?
10:08 pcdummy this is the full .sls: http://paste.debian.net/1013026/
10:09 pcdummy zer0def: its a list of cmd's the formula user will be able to pass by pillar.
10:11 pcdummy For a single scripts its: "create container" -> copy script to container -> run script -> reboot -> make executed
10:11 zer0def as far as i can tell, a `require` on a state which in turn has `onchanges`/`onfail` will run just fine, if the `onchanges`/`onfail` requisite doesn't execute
10:14 zer0def pcdummy: https://ghostbin.com/paste/sna5m is this the behavior you're looking for? or does `c` conditionally execute only after `b` actually runs?
10:15 zer0def in the latter case, i'd just swap out `c`'s `require` for `onchanges`, but that trips over when `b` actually runs, but reports no changes
10:18 pcdummy zer0def: this is what i need i think: https://ghostbin.com/paste/5d9kf
10:18 pcdummy zer0def: thank you a lot!
10:19 zer0def although, if we're talking saltifying, i'd probably run the `manage.boostrap` runner or `cloud.create` state
10:19 pcdummy zer0def: no ssh in the container initialy available
10:19 zer0def yeah, figured as much
10:19 Hybrid joined #salt
10:19 pcdummy zer0def: have been talking a lot with gtmanfred about that.
10:20 pcdummy Will get: https://github.com/saltstack/salt/issues/46233
10:21 zer0def couldn't your hook in an event, which the master would react to and launch appropriate saltifying?
10:22 pcdummy The current solution is very easy but requires "auto_accept" sadly
10:22 pcdummy well it doesn't you can accept later on the master
10:22 pcdummy manualy
10:23 zer0def is there a in-between situation between auto-accepting and manually accepting that you might need?
10:24 zer0def i picture it this way - master gets an event from a minion about a new container starting, pregenerates a keypair for the soon-to-be-minion'd container and delegates bootstrapping to the minion machine to provision this new container
10:24 pcdummy sounds great
10:24 zer0def https://docs.saltstack.com/en/latest/ref/wheel/all/salt.wheel.key.html#salt.wheel.key.gen
10:25 zer0def and `gen_accept` just below
10:25 pcdummy Think thats what publish.wheel should do
10:25 zer0def `publish` is… a state?
10:25 zer0def that is, a state module
10:27 zer0def ok, nevermind, it's an execution module: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.publish.html
10:27 pcdummy In the end i need a solution for "Minion creates container -> minion asks master for new key for it -> minion saltifies minion with that
10:28 pcdummy Not sure theres a in-between solution for that.
10:28 zer0def i'm a bit skeptical about allowing minions to push commands onto other minions, but i don't see a beacon or engine that would relay events from lxd onto salt's event bus
10:29 pcdummy gtmanfred talked about implementing something like a whitelist for publish.wheel (which minions are allowed to call that).
10:30 zer0def that is one way.
10:31 amy_ joined #salt
10:35 pcdummy zer0def: "conditional chain dependency" was the thing i need to make this work, thanks a lot again, works great now need to fixit up and push it.
10:36 pcdummy No state executed after rerun, YEHA i love it
10:36 zer0def glad to have been of help
10:39 pcdummy zer0def: that docker_events thingy (from private chat), do you want me to publish lxd events to salt or ?
10:39 zer0def for the record: for the case of bootstrapping dynamically provisioned LXCs, i think creating an LXC/LXD engine would be sufficient to achieve saltifying newly spawned containers
10:40 zer0def yeah, engines imply publishing events from sources outside of Salt into it's event bus
10:41 zer0def i think `docker_events` does a similar enough thing to take hints from
10:41 pcdummy Someone asked here for such a feature: https://github.com/pcdummy/saltstack-lxd-formula/issues/5 i don't know how it could be usefull for me.
10:43 zer0def well, in your particular case, i'm guessing there's an LXD API event published on it's daemon socket when a container is spawned/created
10:44 chowmein__ joined #salt
10:45 zer0def then again, if you want to get info through your minions, beacons might be more appropriate than engines (indirect vs direct subscription)
10:45 zer0def would need to give it some constructive thought, though
11:00 pcdummy Lots of work but a very small commit: https://github.com/saltstack-formulas/lxd-formula/commit/a5ad50854aa7c3a51a18b007accbb9b95f44feb2 :)
11:01 pcdummy The most bugging one was this one: https://github.com/saltstack-formulas/lxd-formula/commit/b1125691ddde358313995b515fe883ee8206249f#diff-14d56b1b051ffaf50ba22c2f52225321R1899
11:04 syd_salt2 joined #salt
11:11 yidhra joined #salt
11:24 pualj joined #salt
11:32 yidhra joined #salt
11:33 syd_salt joined #salt
11:37 aldevar joined #salt
12:04 yidhra joined #salt
12:17 yidhra joined #salt
12:26 yidhra joined #salt
12:33 amy_ joined #salt
12:44 yidhra joined #salt
12:47 swa_work joined #salt
13:07 yidhra joined #salt
13:29 aldevar joined #salt
13:51 smead joined #salt
13:54 swa_work joined #salt
14:24 kiorky joined #salt
14:35 Hybrid joined #salt
14:35 amy_ joined #salt
14:50 xet7 joined #salt
14:54 Hybrid joined #salt
15:04 tiwula joined #salt
15:06 tiwula joined #salt
15:20 Tyrant joined #salt
15:38 LostSoul joined #salt
15:39 amy_ joined #salt
16:39 amy_ joined #salt
16:42 tiwula joined #salt
16:44 tiwula joined #salt
16:45 tiwula joined #salt
16:47 tiwula joined #salt
16:48 tiwula joined #salt
16:50 tiwula joined #salt
16:51 tiwula joined #salt
16:53 tiwula joined #salt
16:55 tiwula joined #salt
17:23 rjc joined #salt
17:40 amy_ joined #salt
17:43 fl3sh joined #salt
18:02 tiwula joined #salt
18:04 tiwula joined #salt
18:05 tiwula joined #salt
18:07 tiwula joined #salt
18:10 exarkun joined #salt
18:25 amy_ joined #salt
18:37 sayyid9000 joined #salt
18:48 aldevar joined #salt
18:49 thelocehiliosan joined #salt
19:04 thelocehiliosan joined #salt
19:05 GrisKo joined #salt
19:19 smead joined #salt
19:49 onlyaneg1 joined #salt
20:00 thenut joined #salt
20:12 aldevar joined #salt
20:15 thelocehiliosan joined #salt
20:35 Zachary_DuBois joined #salt
20:47 amy_ joined #salt
21:01 sjohnsen joined #salt
21:05 Trauma joined #salt
21:21 rjc joined #salt
21:26 exarkun joined #salt
21:33 aviau joined #salt
21:53 onlyanegg joined #salt
22:24 aldevar left #salt
22:25 yidhra joined #salt
22:29 amy_ joined #salt
22:34 Shirkdog joined #salt
22:42 swa_work joined #salt
22:52 fignew joined #salt
22:53 ProT-0-TypE joined #salt
23:06 exarkun joined #salt
23:18 meena left #salt
23:39 onlyanegg joined #salt

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