[02:15] PR snapd#7580 opened: spread.yaml: exclude vendor dir [02:29] PR snapd#7581 opened: tests: add netplan test on ubuntu core [02:36] PR snapcraft#2748 opened: meta: warn about command mangling [05:17] morning [05:20] PR snapd#7564 closed: interfaces: add cgroup-version to system-key [05:20] school run, back in 30 or so [06:02] re [06:02] mvo: morning [06:05] PR snapd#7568 closed: snap: when running `snap repair` without arguments, show hint [06:06] PR snapd#7567 closed: snap-repair: error if run as non-root [06:07] hey mborzecki [06:07] mborzecki: good morning [06:08] mvo: can you take a look at https://github.com/snapcore/snapd/pull/7571 ? [06:08] PR #7571: sandbox/cgroup: refactor process cgroup helper to support v2 and named hierarchies [06:09] mborzecki: uh, I think I wanted to do this yesterday already :/ [06:09] mborzecki: let me do this *now* [06:16] sorry, had super stubborn kids [06:16] one is still at home [06:16] ugh :| [06:17] ok, let's try to focus... [06:19] mvo: thanks! [06:19] mvo: https://twitter.com/samerhaj/status/1182121464813756419 [06:20] and check out the next tweet there, vmware working on this? [06:20] esxi for raspi anyone? [06:20] zyga: wow, nice [06:21] I, for one, would not mind a raspberry pi with a proper boot stack [06:21] zyga: any clue how does uefi/acpi combo could handle hats? [06:21] no idea [06:26] mborzecki: added a comment, please let me know if it makes sense or if its too terse. happy to talk here as well if you want :) [06:26] mvo: looking [06:28] mvo: i see, it's a bit yagni right now, once we land the named hierarchy, the string will no longer the be controller name, but insteadf a named hierarchy name ('snapd' in this case) [06:29] mborzecki: right, landing it is fine [06:29] mborzecki: I was mostly wondering if consumers of the ProcGroup() need to know what matcher to create [06:30] mborzecki: or if we could simply keep using a string here [06:30] mborzecki: and the string in the future might be "snapd" [06:30] mborzecki: or is this not how it will work :) ? [06:30] * mvo obviously has less context [06:33] mvo: hm you'd have to pass name=snapd to be explicit, or "" when you mean a unified hierarchy, feels a bit too magical [06:35] mborzecki: hm, but we know internally in the cgroup module if we are unified or mixed so could we leverage this knowledge? [06:35] mvo: we use cgroup v1 even in unified mode [06:35] so perhaps it's all going to be simplified eventually [06:35] s/use/going to use/ [06:37] ok, I don't want to rathole this too much, sry! it just seems to me right now right now we only have one user of "cgroup.ProcGroup" and we always use freezer here so I wonder if we could encapsulate the knowledge that its freezer/something-else inside the cgroup package itself maybe? [06:37] we could but the cgroup package doesn't know that, it's the overlord that knows this; I think it's fine as is, it will change shortly, perhaps before the next release [06:38] mvo: zyga: hm so perhaps we could have a separate call cgroup.SnapProcGroup which internally knows whether to ask for freezer or a named group? [06:38] it is my understanding that by the time we are done it will use a different selector or a hard-coded string for the new location [06:38] I really don't think we need to do more now [06:38] just land and iterate [06:38] meanwhile, I'm back to https://github.com/snapcore/snapd/pull/7576 [06:38] PR #7576: spread.yaml,.gitignore: sync ignored files [06:39] why does something so simple have to be so hard :D [06:39] zyga: userd is currently using it and it does not know about freezer either, does it? its just snap-confine that knows about freezer (or am I missing something?) [06:40] userd is using cgroups? [06:40] zyga: I did a "git grep ProcGroup" and a match there [06:40] zyga: yeah, it is, that's the next thing, we'll probably need some api that encodes information about how snap cgrups are made [06:41] zyga: fwiw, I disagree with "why does something so simple have to be so hard" [06:41] zyga: it's for checking whcih snap the talking to userd over dbus comes from [06:41] oh, I didn't notice that [06:41] I just read that code [06:41] mborzecki: sry again for lack of context - but do we need (external) api for how cgroups are made? mostly wondering if we can keep most of this knowledge internal to the cgroup package [06:42] mvo: (I was referring to the gitignore PR) [06:42] zyga: oh, sorry [06:42] zyga: then I misunderstood :) [06:42] mvo: ignoring in spread and git consistently is haaard :) [06:42] zyga: I thought it was about my bikesheding api here :) [06:42] and it should not [06:42] no no, sorry [06:42] zyga: git hard> makes sense ;) [06:42] mborzecki: I wonder if the pid usage in userd could go away [06:42] and use /proc/pid/root instead [06:43] but that's a separate conversation [06:43] we discussed this with james, as long term API for discovering snap processes [06:43] brb, need tea, coffee [06:43] I'll catch up on the thread here [06:43] mvo: we don't, that's why the cleanups are being done, afaik we have 3 places rightr now that made up the grup names themseleves, userd, snapstate/refresh and s-u-n [06:43] but mostly want to unbreak that gitignore branch [06:43] * zyga loves the acronym s-u-n [06:44] mvo: 'groups are made' as in how the path under the relevant group mount point is constructured for a snap :) [06:44] mborzecki: oh, this is spread out right now? yeah, a good reason to consolidate it :) [06:47] mborzecki: anyway, my concern with the PR as it is is just that the current code in userd has cgroup.ProcGroup(pid, "freezer"). that seems to require knowledge in userd about freezer that should probably not be needed there. the new code now also adds the fact that its a v1controller there. so it seems like it makes this slightly worse. I think we can land but we should reverse the direction in the next prs to require less knowledge about how exa [06:47] ctly we do cgroups outside of the cgroup package. does that make sense? [06:49] back with coffee [06:50] mvo: I agree that eventually we should instead have an API that refers to app / hook tracking [06:50] and similar pid discovery [06:50] and encapsulate the cgroup logic there [06:50] I still would merge this as-is and iterate because velocity and not-worse-than-before [06:51] mborzecki: last night I needed to sober up after looking at 22MB binaries [06:51] so I started making those few-kb, built-with-C, hello-world programs that don't need libc [06:51] that was refreshing [06:52] offtopic: I found a great use for raspi zero -- it's the cheapest reliable serial logging device I've had [06:53] just plug a wire and log away [06:53] mvo: right, i mean it makes sense, we should be able to figure everything out in cgrup package given the security tag [06:53] (hopefully) [06:53] mborzecki: I would not even use cgroup as the wrapper [06:53] we may end up not using cgroups eventually [06:54] the package should be conceptual - pid tracking and discovery, it may use cgroups internally [06:54] zyga: snaptrack? :P [06:54] but what it should really have is functions like PidsOfSnap and SnapOfPid or similar [06:54] pidof ;-) [06:54] mvo: since you're doing reviews already, can you take a look at this one too? https://github.com/snapcore/snapd/pull/7578 again it's moving some pieces scattered around into the cgroup pacakge [06:54] PR #7578: sandbox/cgroup, overlord/snapstate: move helper for listing pids in group to the cgroup package [06:55] ok [06:55] back to gitignore [06:58] mborzecki: 7578> sure - the title is promising for sure! [06:58] mvo: hope the content doesn't disappoint :P === pstolowski|afk is now known as pstolowski [06:59] morning [06:59] pstolowski: hey [06:59] hey pawel :) [07:04] * zyga reads how git does .gitignore [07:06] /o\ [07:06] git has a screen full of global variables [07:15] mborzecki: love it [07:15] mborzecki: I would even go a bit further and hide pidsCgroupDir from the outside [07:16] mborzecki: but fine as is [07:21] PR snapd#7571 closed: sandbox/cgroup: refactor process cgroup helper to support v2 and named hierarchies [07:47] mborzecki: so I had a look at those exclude patterns [07:47] and I have the following compromise [07:47] mborzecki: git needs /foo to exclude a file ./foo won't cut it [07:47] mborzecki: spread's use of tar is exactly the opposite [07:47] hahah [07:48] mborzecki: it requires ./foo and /foo won't cut it [07:48] I think it's fine if I document it [07:48] it's better then sending garbage [07:48] and better than not working [07:48] I don't see any way out of this for now [08:22] * mvo has some eoan problems today and regrets upgrading to it [08:23] mvo: what happens? [08:23] mvo: I'm running on a similar-ish thinkpad and apart from suspend resume killing input (ha ha) it works okay (sob) [08:25] fitting that you regret upgrading to eoan in the morning [08:26] zyga: its on my desktop, sound issues, stuttering and it always select the wrong output on login so I need to go to gnome-settings etc [08:26] mborzecki: oh god [08:26] mborzecki: tar has --exclude-vcs-ignores [08:26] mborzecki: it reads .gitignore directly [08:26] can I just path spread instead? [08:27] mvo: man, that sucks :/ [08:27] mvo: it's the future though, better bite the bullet and report them [08:28] zyga: doing that but its a bit of a time sink this is why I regret it [08:29] indeed [08:29] Chipaca: hahaha [08:29] Chipaca: took a while until the penny dropped [08:32] mvo: no regrets [08:32] zyga: hm can we teach spread about --exclude-vcs-ignores then? [08:32] I just did locally [08:32] it'll take a while to land it though [08:33] it doesn't seem to work [08:33] hahahah [08:33] running a debug session to see if the files really got copied [08:33] it's driving me insane [08:33] I hate doing this, it breaks all C testing I work on [08:33] well, i'm trying to teach postrm and snap-mgmt about the snap.mount unit :/ so i feel you [08:34] * zyga hugs mborzecki :) [08:35] btw. noticed something intersting in the tests, we've supposedly stopped lxd service (and i guess any containers it ran), but then removing /var/snap/lxd/comon/ns/mntns fails with EBUSY [08:35] are you sure it stopped containers? [08:36] well, i guess i hope it did [08:40] --debug doesn't work if project prepare fails [08:40] WAAAAAAAAAAT [08:40] ah, no, spread is picky where --debug is [08:40] man [08:43] mborzecki: the plot thickens, the ignore patterns work [08:43] but it's removal that matters now :D [08:43] man, dpkg, you sure are picky [08:46] zyga: what're you fighting against? I think I missed that bit [08:47] Chipaca: being able to spread a tree with built files while also passing debian build package thing that hates them [08:47] Chipaca: almost there though [08:47] now that I see what the error message is [08:48] zyga: ah [08:48] ondra: if/when you have more time to poke at that slow boot, given your last pastebin, the next step would be to do a profiling of the slow step [08:49] Chipaca I did some progress with more logs [08:49] Chipaca in the meeting now, but will report back [08:49] k [08:57] zyga: there was a snap.mount unit before? [08:57] mborzecki: I got it :) [08:58] mborzecki: so... back to your question [08:58] there used to be but we nuked it and got the snap.mount.service [08:58] AFAIR [08:59] mborzecki: why? [08:59] mborzecki: but I don't recall exactly why [08:59] mborzecki: gobs of complexity [08:59] mborzecki: note there's also a snapd-generator [08:59] mborzecki: look at cmd/snapd-generator/ [08:59] it creates a mount unit AFAIR [08:59] looking at some postinst helpers, and there's a comment about snap.mount in 2.31 [08:59] I think we used to have snap.mount [08:59] deb postinst [09:00] but it was too "strong" [09:00] so we moved it to the generator conditionally [09:00] or something like that [09:00] and the snap.mount.service is a separate beast for $REASONS [09:00] I honestly don't recall, I'd have to dig [09:00] * Chipaca steps away for a bit (washing machine beeping) [09:01] zyga: no need, just curious [09:04] one more place and I think this is good [09:09] mborzecki: heh, now the delta code sends the crap again [09:09] or is it... [09:10] I don't see it in the tree anymore [09:10] but I do see it in the tarball we make early on [09:34] ehh debhelper [09:37] https://bugs.launchpad.net/snapd/+bugs?field.status%3Alist=NEW is a thing of beauty [09:38] Chipaca, try that on the ubuntu package :) [09:38] * Chipaca kickbans seb128 [09:38] sorry *g* [09:38] mborzecki: it's fun, disabled the repack helper for a second and I see tar is still ask to send the stuff over [09:38] :*) [09:38] mborzecki: maybe it's a bug in tar [09:38] checking [09:42] yeah [09:42] tar is not respecting those [09:42] looking deeper [09:42] man this used to be easier [09:44] Chipaca: no open bugs [09:45] Chipaca: \o/ [09:46] mvo: no open bugs? [09:46] did we just close them for 5 minutes to feel better ;) ? [09:46] zyga: thats what LP told me [09:46] " [09:46] There are currently no open bugs. [09:46] " [09:46] zyga: in https://bugs.launchpad.net/snapd/+bugs?field.status%3Alist=NEW [09:46] zyga: its a lie of course, it should be "no open bugs in this filtered view" [09:47] :D [09:47] I see it now [09:47] but I like the other string better [09:47] :) [09:47] 369 open bugs make a man feel honest about himself and that to err is human [09:47] being a software developer humbles me every single day^Wminute [09:48] zyga: #1761621 sounds like fun for you [09:49] mmm [09:49] zyga: it's private because of a stacktrace, i presume, let me know if you can't see it [09:49] I can [09:50] I'll look later todaty [09:50] ah i see you in the list, even [09:57] anybody with better stacktrace-reading chops than myself (basically all of y'all), #1762686 is a puzzle [10:01] hah! I'd forgotten the "Ubuntu was created for the red-eyed onanists engaged in anal balancing act" [10:08] I wonder if there's a non-escalating way of telling them that was unappropriate [10:08] inappropriate, even [10:13] That isn't just obvious ban-fodder? [10:13] mvo (and maybe cachio when he's around): anything we should do about #1734845 ? [10:13] Bug #1734845: hook (core) configure β†’ exit status 1 cannot create lock directory /run/snapd/lock β†’ Permission denied [10:14] cjwatson: I don't know the policy, nor the tools available to enforce it; maybe i should, if i'm going to start calling people out on this kind of stuff [10:14] and I am going to call people out on it [10:14] Was this on Launchpad? [10:14] yes [10:14] I failed to find it [10:15] cjwatson: #1818584 [10:15] Bug #1818584: snaps applications can't open files on an USB key [10:16] OK, your response is probably appropriate for what seems like a first offence from a frustrated person. If they escalate let me know and we'll take administrative action [10:17] cjwatson: will do [10:26] mvo: your input (or your redirect to somebody else) on #1747735 would be good [10:26] Bug #1747735: command-completion for 'snap' on 14.04 does not recommend snapd [10:27] Chipaca: in a meeting, will get back to you [10:31] a bug for snapd/ubuntu: gnome display manager it's slow with devuan [10:32] * Chipaca is nearly WATed out [10:32] mborzecki: debugged it [10:32] maaaan [10:32] zyga: ok, i think i have worked around dh_systemd_start, but heh it's ugly [10:33] Chipaca, stop complaining, just fix it ! [10:34] (its just a quick port to sysvinit to fix that devuan problem) [10:34] ogra: in the _description_ of the bug they say "it was only solved by installing the Nvidia drivers." [10:35] ogra: so the bug is... probably? that nouveau drivers are slow? [10:35] ah, then it is easy, just make the nvidia drivers a hard dep of snapd [10:35] chocolate por la noticia [10:36] (how would it work on devuan *at all* ? there is no systemd, logind or any other of the lennartisms in it) [10:40] PR snapd#7578 closed: sandbox/cgroup, overlord/snapstate: move helper for listing pids in group to the cgroup package [10:49] PR snapcraft#2743 closed: meta: warn about command mangling [10:52] PR core18#140 closed: run-snapd-from-snap: check for snapd.service existing too [10:53] Chipaca hi [10:54] Chipaca I added more logs and essentially this is all down to sha384 :( [10:54] ondra: I feel like you owe me a beer or something for not believing me [10:54] Chipaca as when we preparing seed, we calculate sha384 while we are parsing seed.yaml [10:55] ondra: would've saved us both a few hours of work :) [10:55] Chipaca I'm happy to get you beer :) [10:55] Chipaca but it's not key generation, this is snap assertion validation [10:55] ondra: strange that you don't see the io or cpu usage of it though, maybe things aren't lining up properly in the bootchart? [10:56] Chipaca also interesting one is, if I calculate it from shell, I get 100% cpu load and I get it also 2 as fast for all snapc [10:56] ondra: _before_ even looking at key gen etc i said it was probably still the sha3 [10:56] :-/ [10:56] Chipaca I loop through all snaps, and it's not taking me as much time [10:57] Chipaca ah, sorry for that, I did miss sha3 message from you [10:57] Chipaca I did not know we calculate sha3 before we start seeding, I though we do that at time of actual snap seeding [10:57] * pstolowski walk, bbiab [10:57] Chipaca but cpu load is indeed something puzzling [10:58] PR snapd#7580 closed: spread.yaml: exclude vendor dir [10:58] ondra: look for an email with subject 'booting the pi', 26 Jan 2017 [10:58] Chipaca: snap on trusty - oh well [11:00] mvo: ikr [11:00] Chipaca ahh nice, found it === asymptotically is now known as Guest37136 === asymptotically2 is now known as asymptotically [11:03] sil2100: thanks for merging the latest core18 PR from ijohnson ! our of curiosity, when do we plan the next stable core18 snap release? [11:04] sil2100: we have this fix and the netplan update in edge, would be great if those would make it to stable soon(ish) [11:04] ondra: wrt looping through all the snaps: did you unmount them and drop caches first [11:04] ondra: it's possible a large chunk of it is i/o [11:04] depends on how slow the sd card is maybe [11:04] Chipaca no I did not umout them [11:05] ondra: i'm assuming having them mounted keeps them in the cache somehow but could be wrong [11:05] ondra: also, what are you using to hash them from shell? [11:05] mvo: yw! In theory today's a Thursday, so if the timing is right it should get picked up by automation into beta and then to certification testing - we might be able to get it to stable around Monday [11:05] sil2100: amazing, thank you [11:05] Chipaca may be some, but I doubt entire snap and all, that would be half of all mem available [11:06] ondra: because sha3-384 is not sha384 [11:06] Chipaca I just called sha384sum [11:06] ondra: yeah, that's the wrong hash [11:06] Chipaca ah [11:06] that's an easy hash :) [11:06] Chipaca which one to use then? [11:06] ondra: snap install sha3384 ? [11:07] pedronis: 7556 has two +1, my two nitpicks can easily be done in a followup, I would love to see this landing so that the next pr is smaller, wdyt? [11:09] re: https://discourse.ubuntu.com/t/testing-default-snap-apps-against-equivalent-deb-apps-slow-start-times/12875/17 the desktop launcher script runs gdk-pixbuf-query-loaders and gtk-update-icon-cache and gio-querymodules.. could we utilise the $SNAP_DATA or $SNAP_COMMON directories for these caches and generate them in an install and/or refresh hook? [11:10] PR snapcraft#2746 closed: elf: handle missing dependencies not found on system [11:15] Chipaca yep. now time alines more [11:15] Chipaca damn it, no cheap wins :( [11:16] diddledan: is there a way to do it incrementally so a user can also have local stuff? [11:17] those caches only parse files that are distributed within the snap or runtime-snap so the user won't have their own local stuff, AFAIK [11:18] then why is it done at install at all? [11:18] why isn't it in the snap itself? [11:18] anyway, ⇝ lunch [11:18] it is in the snap currently as part of desktop-launch script which wraps the actual command [11:19] I was thinking we could extract it from running every launch to only running once when the snap is installed or refreshed [11:20] at the moment it conditionally runs on refresh at launch time. so we can move it to refresh-time so that the initial launch after a refresh is perceviably faster [11:22] i.e. in the launch script it has equivalent of `if refreshed, rebuild caches, then run the app` [11:23] mborzecki: did you had a chance to look at the error log in 7572? [11:24] PR snapd#7572 closed: gadget: rename "boot{select,img}" -> system-boot-{select,image} [11:30] yeah, but it dodn't make any sense though, if it keeps repeating we'll probably need to take a closer look at either glibc or go in arch [11:30] mvo: ^^ [11:32] mborzecki: ok, thats fine. lets assume its just a glitch [11:33] mvo: might be serious though, afaict it was related to thread local storage [11:33] mborzecki: hm, ok [11:37] zyga: tests/main/lxd is leaking this: https://paste.ubuntu.com/p/zkY96DMsT6/ [11:38] zyga: or, iow lxd is leakingthis [11:38] i suppose the debug output should include findmnt [11:38] that's curious [11:38] the common/ns/mntns thing is a bind mounted mount namespace [11:38] I really really wish lxd removal would clean up [11:39] mborzecki: can we paper over this with lxd-tool patch? [11:39] mborzecki: tests/lib/bin/lxd-tool [11:39] though it's more serious as it seems to break actual "snap remove", right? [11:39] zyga: we can, stil, removing lxd snap does not clean this up [11:39] yup [11:42] PR snapd#7582 opened: spread: include mounts list in task debug output [11:42] zyga: ^^ [11:49] mborzecki: +1 but would you mind changing that to co via prepare-restore.sh --debug-each and move the code there. This way more shellcheck love is applied. [11:50] zyga: this is covered by spread-shellcheck already [11:50] debug: | ? [11:50] zyga: i mean spread.yaml [11:50] hmm let me double check [11:52] mborzecki: https://github.com/snapcore/spread/pull/89 [11:52] PR spread#89: runner: pass --exclude-vcs{,-ignores} to tar [11:52] zyga: yup, debug && debug-each are covered by spread-shellcheck [11:52] mborzecki: fair enough, +1 [11:52] though I'd still prefer to have less things in the main yaml [11:52] but that's not a problem for this [11:53] mborzecki: I think we should re-check the leak checker [11:53] mborzecki: and see if we can land it for classic [11:53] mborzecki: even if core is still leaking other stuff I didn't fix [11:53] Chipaca: mvo: https://github.com/snapcore/spread/pull/89 might interest you as well [11:53] PR spread#89: runner: pass --exclude-vcs{,-ignores} to tar [11:53] mborzecki: we'd know earlier [11:56] zyga: wodner if that's something that snapd could police as well [11:56] mborzecki: that's a whole new world there [11:56] otoh lxd is a special snowflake === ricab is now known as ricab|lunch [12:07] PR snapd#7583 opened: usersession: drive by fixes for things flagged by unused or gosimple [12:07] really simple PR ^^ [12:19] I wish I knew what these stacktraces were about [12:19] they're just … noise [12:20] PR snapd#7576 closed: spread.yaml,.gitignore: sync ignored files [12:25] brb [12:42] Chipaca: which ones? [12:42] mborzecki: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1841384 or https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1762686 for ex [12:42] Bug #1841384: snapd crashed with SIGSEGV [12:47] Chipaca: interesting, in https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1762686 there's an awful lot of threads stuck in receiving from a client, probably via the snapd socket [12:49] Bug #1811534 changed: snap - install skype warning - main.go: should be wrapped in (i18n) [12:49] PR snapcraft#2748 closed: meta: warn about command mangling [12:50] Chipaca: then in the other one, there's only a single thread that's not stuck in something sleep related, and it's calling runtime.scanobject (b=824633781392, gcw=0xc000044170) at /usr/lib/go-1.11/src/runtime/mgcmark.go:1140 [12:50] Chipaca: hm memory corruption perhaps? [12:53] man, it's raining like hell again [12:53] * mborzecki was hoping for a bike ride today [12:54] yeah [12:54] me too [12:54] it's looking like Saturday will be nice [12:54] 20C and sun, wow [13:07] PR snapd#7584 opened: .gitignore: pair of trivial changes [13:10] mborzecki: ^ [13:12] PR snapd#7585 opened: spread.yaml: drop exclude list, use .gitignore [13:18] pstolowski: it's a one liner to measure the time it really took to run configure [13:18] pstolowski: I can show you where to patch [13:18] pstolowski: it's useful to do this if you have the rest of the setup [13:19] zyga: sure [13:20] pstolowski: on an os/exec.Cmd you can get .ProcessState which has .SystemTime and .UserTime [13:20] just log them after the process terminates [13:20] it's that simple [13:21] zyga: ah, that, right, i think we discussed that at some point some time ago [13:21] yeah, JFinallyDI === ricab|lunch is now known as ricab [13:38] mvo: if you can review the spread change it woulod help me a little [13:39] zyga: sure thing [13:39] zyga: you may need to remind me toromorrow though [13:39] zyga: today is super busy :/ [13:39] (for me) [13:39] mvo: it's a one liner [13:40] https://github.com/snapcore/spread/pull/89 :) [13:40] PR spread#89: runner: pass --exclude-vcs-ignores to tar [13:51] cachio: I got this error in the test log, do you know how can I get more information on what failed? https://api.travis-ci.org/v3/job/596058356/log.txt [13:51] cachio: look for "build failed" [13:52] cachio: ah ok, just found an error messages several lines above that [13:52] cachio: but that line number doesn't make any sense :\ [13:58] ondra, Chipaca if you want faster SHA3 on arm, please +1 this issue https://github.com/golang/go/issues/28148 [14:07] cachio: perhaps you could look at https://github.com/snapcore/spread/pull/89 [14:07] PR spread#89: runner: pass --exclude-vcs-ignores to tar [14:10] pstolowski: can you please look at https://github.com/snapcore/snapd/pull/7584 -- 3 lines [14:10] PR #7584: .gitignore: pair of trivial changes [14:10] gitignore [14:18] does snapd identify if a snap requires a specific content snap and install the content snap automagically? [14:18] (i.e. snapian) [14:21] roadmr: afaik snap.yaml must name a default-provider for a given content plug [14:21] mborzecki: and the named default-provider snap gets auto-installed/ [14:22] ? [14:30] roadmr: yes [14:31] thanks mborzecki :) [15:17] ijohnson: out of curiosity, how hard would it be to pull that in to our snapd build for armhf? [15:17] you're pulling my armhf [15:18] not too hard, it would be a little awkward IIRC because the hashers in crypto aren't used directly they're registered with the hash package and so we'd have to go use the hasher from sha384 directly rather than using crypto [15:18] Chipaca: ^ [15:18] the big thing why I don't think we should do that is because now we have to maintain that SHA3 crypto code [15:18] yeah i get that [15:19] but https://go-review.googlesource.com/q/hashtag:%22crypto-assembly%22+(status:open) [15:19] does not fill me with hope [15:21] Chipaca: yeah from talking some of the other go devs, the main person who does crypto + assembly review for Go is very very busy and has had a lot of other $GOOGLE things to do in recent years [15:33] brb, rebooting [15:49] PR snapd#7583 closed: usersession: drive by fixes for things flagged by unused or gosimple [15:52] pedronis: do you mind if I merge 7462 (the grade support for models in uc20?) [15:53] mvo: I can do it, one sec [15:54] PR snapd#7462 closed: asserts: introduce explicit support for grade for Core 20 models [15:54] pedronis: thanks [15:55] pedronis: 7556 can probably also be merged, the suggestions could be done in a follouwp, this would unblock the next review I think(?) [15:56] mvo: it's about documenting, maybe renaming TargetFunc, right ? [15:57] Chipaca I managed to shave 40s from that boot now :) [15:57] mvo: and a typo [15:57] mvo: I can merge and then I would apply those in the follow up [15:57] if that's ok [15:57] Chipaca it will need reviewing from someone who can understand more implications of what I changed [15:57] mborzecki: some questions/comments to schedule fix PR [15:58] Chipaca but thats ~80s to ~40s [15:58] pedronis: yeah, lets do it this way (merge+followup) [15:58] Chipaca see bootchart https://private-fileshare.canonical.com/~okubik/bootchart-20191010-1545.svg [15:59] pedronis: thank you! [15:59] ogra https://private-fileshare.canonical.com/~okubik/bootchart-20191010-1545.svg [15:59] PR snapd#7556 closed: image,seed/seedwriter: switch image to use seedwriter.Writer [16:00] mvo pedronis this could be something we might consider for landing once polished, see the difference in cpu from 60 to ~100 second [16:00] https://private-fileshare.canonical.com/~okubik/bootchart-20191010-1545.svg and https://private-fileshare.canonical.com/~okubik/bootchart-20191008-1710.svg [16:00] ondra: what is the change? [16:00] ondra: what exactly? [16:00] ondra: do you have a diff or something? [16:01] Chipaca mvo diff soon [16:01] Chipaca mvo but I'm calculating sha3384 in parallel [16:01] so this will be even faster on multicore devices [16:02] on 4cores this cut hashing to half, and it's mostly because one snap is 3x bigger then next biggest [16:04] mvo Chipaca one of you just need to review if I'm not messing up with snap seeding order [16:04] we are touching that code quite a bit atm [16:05] so it's probably easiest to just see the diff and measure it and do it again if it's useful [16:06] pedronis are any of your changes parallelising hash calculation? [16:06] no, but we intergrating UC20 code [16:06] which does still differently [16:06] pedronis right [16:06] I will prepare clean diff [16:06] is this a change in seed16.go ? [16:06] or the older code? [16:07] I still think this is worth to consider, as we sit there for 2 minutes with one core maxed and rest of the system is idling [16:07] pedronis in seed16.go [16:07] ok [16:07] that shouldn't change a lot anymore [16:07] but we'll see [16:07] clean diff is a good start [16:08] pedronis +1 [16:14] Chipaca mvo it influenced order how snaps are seeded [16:14] so it will still need some tweaking there [16:19] ondra: that doesn't sound right [16:19] to be clear [16:19] pedronis well this is first shot and I'm just checking how to address this [16:22] #7558 is ready for review [16:22] PR #7558: boot,dirs,image: various refinements in the prepare-image code switched to seedwriter === pstolowski is now known as pstolowski|afk [16:22] Chipaca: there are also bits in boot there ^ [16:23] k [16:23] i don't think i'll get to that today [16:23] np [16:23] just fyi [16:43] PR snapd#7584 closed: .gitignore: pair of trivial changes === genii_ is now known as genii [16:56] pedronis: you have two entries in the meeting notes for Thursday [16:56] is one of them for Friday or should they be merged? [17:00] zyga: one is pedronis' clone [17:00] that explains it :) [17:01] anyhoo, i'm outa here [17:01] see y'all tomorrow [17:01] good call :) [17:01] πŸ‘‹ [17:01] * zyga hugs Chipaca [17:01] bye :) [17:01] * Chipaca hugs back [17:18] niemeyer: hello, low priority but also low effort request to look at a small change to spread: https://github.com/snapcore/spread/pull/89 [17:19] PR spread#89: runner: pass --exclude-vcs-ignores to tar [17:40] * cachio afk [20:34] PR snapcraft#2749 opened: storeapi: add StoreErrorList to handle store errors [21:01] hey zyga [21:01] hey [21:02] it's a little late so I may not respond instantly [21:02] but please leave me a message and I'll get to it as soon as I can [21:02] zyga: ah apologies, i keep missing you [21:03] just wondering if you can help with what exception i need to add to apparmor for [21:03] `[285928.025967] audit: type=1400 audit(1570741250.597:1384598): apparmor="DENIED" operation="signal" profile="docker-default" pid=703 comm="kubelet" requested_mask="receive" denied_mask="receive" signal=kill peer="snap.kubernetes-worker.kubelet"` [21:03] no need to apologize, it's not our fault :) [21:03] sure [21:04] this means that the profile called 'docker-default' constrains a process with pid 703 so that it cannot receive the kill signal from a process labelled snap.kubernetes-worker.kubelet' [21:04] if you can craft the docker-default profile then it's a one liner to change [21:05] AFAIR, without checking something like: signal (receive) peer=snap.kubernetes-worker.kubelet, [21:05] note that the permission applies on both sides [21:06] so the snap.kubernetes-worker.kubelet needs a send permission with the appropriate peer [21:06] joedborg: does this make sense? [21:07] joedborg: you can constrain the signal further with set=(...) [21:07] zyga: is there a quick line i can get round it with? [21:07] * that i can add to app armor [21:07] signal (receive) set=(kill) peer=snap.kubernetes-worker.kubelet, [21:07] though note that the peer here specifies the snap name [21:07] so only that snap (and only that snap) would work [21:08] it may require some more ooomph [21:08] perhaps the signal could be accepted from any snap that can send it [21:08] so you could just say: [21:08] signal (receive) set=(kill) peer=snap.* [21:08] (make sure to add the trailing comma) [21:09] zyga: thanks, i'll try that now [21:09] it's just a further PoC, so I can arrest it if and when it works :) [21:11] joedborg: cool :) [21:11] joedborg: yeah, try that, let me know if it works or not [21:12] zyga: sadly not, I added that to the profile `/var/lib/snapd/apparmor/profiles/snap.kubernetes-worker.kubeletΒ¬ [21:12] * `/var/lib/snapd/apparmor/profiles/snap.kubernetes-worker.kubelet` [21:12] that's not the profile [21:12] look at what I said above [21:12] this is confining the process using the docker-default profile [21:12] whatever owns and writes *that* profile must change [21:12] when you have two processes with apparmor profiles [21:12] and they signal each other [21:13] the sender needs the send permission for the peer [21:13] (and you have that or the denial would say profile=snap.foo.bar) [21:13] the recipient needs the corresponding permission [21:13] that matches the peer [21:14] it's funny but you can craft an apparmor profile that denies sigkill with this [21:14] (from unconfined) [21:14] joedborg: does this make sense? [21:14] zyga: how do i get at the docker-default profile? [21:14] joedborg: I don't know that, presumably something writes one, one sec [21:15] zyga: i can't see it in `/var/lib/snapd/apparmor/profiles/` [21:15] it's not a profile made by snapd [21:15] so I suspect the snap itsef makes it [21:15] ijohnson: ^^ perhaps you know? [21:16] joedborg: in other words, no amount of changes to snapd will fix it [21:16] let me read the scrollback [21:16] the profile you must change is made or belongs to another package, presumably just docker [21:16] ijohnson: tl;dr; do you know if docker snap makes "docker-default" apparmor profile? [21:16] and if so, do you know how to change the code that makes it so that it has one more line [21:17] ah yes docker-default is generated by docker/runc when you create containers [21:17] in the docker snap we had to patch the docker-default profile to allow containers to start properly when dockerd is confined by snapd/apparmor [21:18] ijohnson zyga so there's nothing i can do on a running system to patch this? [21:18] essentially, the default docker-default profile only allows unconfined processes to talk to it, so confined ones like dockerd inside the docker snap are denied as you see above [21:19] joedborg: unfortunately IIRC dockerd generates the docker-default profile in /tmp, loads it into the kernel and then deletes the /tmp profile, so no I don't think you can do to a running system to patch this [21:19] joedborg: not without fighting with docker [21:19] you need to patch dockerd to modify the docker-default profile to include that line [21:19] zyga: ijohnson well containerd in my case [21:19] joedborg: you could create a profile that is the same, has one more permission, and load that [21:19] err yeah [21:20] zyga: ijohnson: I can carry on in devmode and log it as a bug? [21:20] but that would have to be done again each time docker decided to reload the profiles [21:20] containerd/dockerd/runc/moby/the kitchen sink/a bag of chips/ [21:20] joedborg: you'd have to run docker in devmode [21:20] jodbord: nah I don't think so, because you need the docker-default profile to be in devmode, not the snap [21:20] there's a way to launch a container with containers having their apparmor profiles turned off though [21:21] err that was akward to say [21:21] actually [21:21] there's an option to dockerd/containerd/whatever to launch containers without the docker-default profile [21:21] nah, that's not a good idea [21:21] I can't remember off the top of my head [21:21] * zyga remains quiet [21:21] zyga: yeah it's not a good idea, but it's the same as running in devmode [21:21] zyga: ijohnson: so this is for the kubernetes-worker snap which has containerd bundled inside the snap [21:21] I was thinking about using aa_complain [21:21] but I think that only works if you can point it to a profile text [21:22] joedborg: ah if you're building the snap then you can just patch dockerd/containerd [21:22] ijohnson: how? :) [21:23] joedborg: this is the patch we used in the docker snap for github.com/docker/docker (aka github.com/moby/moby): https://git.launchpad.net/~docker/+git/snap/tree/dockerd-patches/snappy-apparmor-tweaks.patch [21:23] * zyga doesn't know that and returns to audiobooks and assembly [21:24] zyga: go do that and stop working :-) [21:24] thank you ijohnson [21:24] joedborg: you are in good hands :) [21:24] thanks zyga, sorry to have kept you at your desk [21:24] joedborg: how are you building containerd? [21:25] ijohnson https://github.com/charmed-kubernetes/snap-kubernetes-worker/blob/master/snap/snapcraft.yaml [21:25] it's being built in the snap [21:26] hmm this snapcraft.yaml is a bit weird, is there a reason you use `go get ...` instead of the source spec for all these parts? [21:26] ijohnson: i thought we had similar issue that jdstrand got into the containerd profile [21:26] ijohnson: yeah because kubernetes doesn't build things properly [21:26] but anyways since you're building containerd from scratch patching it shouldn't be too much work [21:27] hmm well still you could let snapcraft check it out, that would save you rebuild times, but oh well [21:28] ijohnson: can you give commit hashes to snapcraft? [21:28] yes, `source: github.com/....` and then do `source-commit: SHA` [21:29] joedborg: see https://snapcraft.io/docs/snapcraft-parts-metadata#heading--source [21:29] ijohnson: thanks, i'll add that in the todo to look at [21:31] joedborg: so you need to patch https://github.com/containerd/containerd/blob/1ac546b3c4a3331a9997427052d1cb9888a2f3ef/contrib/apparmor/template.go [21:31] that's the "docker-default" profile in containerd AFAICT [21:32] I don't actually see anything named docker-default in containerd, so I assume it's probably k8s or something else that is using the docker-default name when driving containerd [21:33] ijohnson: cool, thanks, and there's no way to do this outside of containerd upstream? I might (and probably) mixing different issues, but I think that jdstrand and I saw a similar signal violation (of containerd inside the snap) and fixed it in the template for the interdace [21:34] *interface [21:35] joedborg: jdstrand is the apparmor expert so perhaps I'm mistaken but when I went through this excercise for the docker snap, we had to patch docker because the issue was not that the _snap_ processes were being denied stuff from apparmor, but rather that the _container_ processes were being denied stuff and the container processes are under a different apparmor label, so that different label has to be modified [21:36] If you look in docker-support interface, you can see that there's a rule to allow transition between the snap apparmor label and an apparmor profile named docker-default, so dockerd can launch a process, which will be confined by the snap's apparmor profile, then have that process transition to the container apparmor profile [21:37] I see that this k8s snap is using docker-support, so actually I assume that is part of why you need to use docker-default even when k8s is driving containerd, as there's no transition rule for i.e. containerd-default apparmor profile that I see [21:38] joedborg: the only other thing I could think of would be to launch every container with a manually specified apparmor profile, but that might interfere with users who have their own apparmor profile they want to launch containers with [21:39] ijohnson: yeah i get that, it's an issue we've been seeing a lot - where directories inside the container are being given readonly; even though they're confined by the pivot route [21:39] ijohnson: I suspect we added some to get the PoC working but, in fact, we need to open the containerd profile up a bit more by patching the file you suggested [21:40] /pivot route/pivot root/ [21:40] joedborg: another useful patch you might want to look at from the docker snap is the one that changes pivot_root to just chroot all the time, because when you pivot_root then apparmor doesn't understand that your new files you touch are really prefixed with the old_root parameter [21:41] so that leads to you having to add all these random accesses that ideally wouldn't be necessary since the container isn't ever touching any host files or base snap files, it's just using it's own rootfs from $SNAP_DATA or somewhere, so it's fine to let it use whatever files it wants [21:41] joedborg: that patch is here: https://git.launchpad.net/~docker/+git/snap/tree/dockerd-patches/snappy-real-chroot.patch [21:42] ijohnson: ah that’s sounding like we’re seeing the same thing, cool. Just reading that patch [21:43] yeah I recommended to someone a long time ago that as they start working on building k8s into a strict snap they should look at the docker snap, but apparently that advice was forgotten [21:43] πŸ€·β€β™‚οΈ [21:44] ijohnson: yeah, docker isn’t cool anymore so we’ve gone down the containerd path 😊 [21:44] ... and yet still have the same problems πŸ€” [21:44] πŸ™‚ [21:46] PR core-build#54 closed: initramfs: update unlock keyfile parameter [21:46] ijohnson: haha yes, seem so. we had time pressure for the poc so I think the rules jdstrand put in were to get the basics cleared. we could reconcile when he’s back? it’d be nice to sort this properly (and we could get a free containerd snap too) [21:47] joedborg: yeah that sounds good [21:47] I think jdstrand is back next week iirc [21:48] ijohnson: awesome. yeah I think so too. thanks a lot for your help :) [21:54] np, happy to help while z y g a should be offline :-)