[00:35] PR pc-amd64-gadget#22 closed: Store changes [00:39] hrm [00:41] why does the home interface not allow me to read data produced by one snap via the other in a ~/snap//current/ subdir [00:41] ogra@acheron:~/snap/arduino-mhall119/current/Arduino/test$ esptool -cp /dev/ttyUSB0 -cd none -ca 0x40000 -cf test.ino.generic.bin [00:41] produces : [00:41] Nov 05 01:39:38 acheron audit[4633]: AVC apparmor="DENIED" operation="open" profile="snap.esptool.esptool" name="/home/ogra/snap/arduino-mhall119/5/Arduino/test/test.ino.generic.bin" pid=4633 comm="esptool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000 [00:42] funnily enough i can copy the file to ~/ and am allowed to open it [00:42] i'd have thought he home interface allows this ? [06:06] ogra: that is by design [06:06] Snaps cannot read each other’s data [06:15] morning [06:16] PR snapd#7718 closed: sandbox/seccomp: accept build ID generated by Go toolchain [06:27] hey mborzecki [06:27] zyga: hey hey [06:27] mborzecki: we should talk today [06:28] mborzecki: about how to salvage app tracking [06:33] zyga: do we need mvo for this discussion too? [06:33] mborzecki: we can split the call into more technical and more strategic parts [06:33] mborzecki: in this sense we can discuss without him [06:37] mborzecki: let's try to have a call in an hour or so [06:37] mborzecki: I have one idea for a frankenstein that might owrk [06:37] mborzecki: but it's all terrible [07:29] how can I remove this *** tracker [07:29] it spawns every few seconds logging stuff [07:30] zyga: what tracker? [07:30] Started Tracker metadata database store and lookup manager. [07:30] this shows up every few seconds [07:30] it is a systemd unit in the user session [07:30] tried disabling it [07:30] doesn't hel [07:30] help [07:30] disabled search in gnome [07:30] removing it would remove half of ubuntu [07:31] zyga: try the tracker command, `tracker daemon ` iirc [07:31] hm didn't know it's already hooked up as user service [07:32] thanks, let's see if that helps [07:59] * zyga break === pstolowski|afk is now known as pstolowski [08:10] morning [08:19] pstolowski: mvo: hey [08:19] mvo: https://github.com/snapcore/snapd/pull/7665 is green [08:19] PR #7665: devicestate: add support for gadget->gadget remodel [08:20] mborzecki: yes, I just looked at this and thats great [08:20] it just needs a second review [08:22] pstolowski: do you think you could have a look at 7665 ? [08:22] mvo: sure [08:24] thank you :) [08:25] pstolowski: thanks! [08:25] mvo: in #7715 there's a check whether a base/kernel needsInstall, and otherwise it's just adding task set with link snap task, do you think we need to do the same for gadget snap? [08:25] PR #7715: overlord: add base->base remodel undo tests and fixes [08:27] mborzecki: its done this way so that the bootloader is updatd [08:27] mborzecki: link-snap is a bit overkill actually, all we really need there is just "set-next-boot" [08:28] mborzecki: we may want something similar for gadget but its much less important, for bases its quite common to go e.g. core18->core20 but having core20 already installed because its used by some app snaps [08:29] mvo: ok, so maybe there's a case missing after all, iirc snapstate.Install() errors out if the snap is already installed, so a remodel back to the old one when the old gadget snap is still around could fail? [08:34] mborzecki: correct [08:34] mborzecki: I think this is not terrible, a followup is ifne [08:34] mvo: rigth, so land 7665, 7715 and then a followup using some code from 7715 [08:34] mborzecki: its really a corner case [08:34] mborzecki: correct [08:34] mvo: sgtm [08:34] mborzecki: cool === arnatious_ is now known as arnatious [09:08] re [09:10] zyga: feeling better today? [09:10] Chipaca: I'll feel good if we can make the feature work [09:10] Chipaca: last evening was grim [09:10] but some light at the end of the tunnel [09:10] zyga: imagine if you'd found out after implementing the whole thing [09:14] Chipaca: and merging to master ;) [09:16] mborzecki: and then steal it again! [09:17] wait no that's https://www.youtube.com/watch?v=ALZZx1xmAzg [09:25] hahah [09:28] man lubuntu is *fast* [09:42] PR snapd#7547 closed: many: use a dedicated named cgroup hierarchy for tracking <β›” Blocked> [09:45] mvo: can you cherry-pick to 5995e03cf8b2e34ef4327a6419922fe49d41332f ? [09:45] mvo: to 2.42 ofc :) [09:48] mvo: looks like we're missing the release artifacts for 2.42.1 [09:53] mborzecki: oh, right, let me fix that [09:53] mborzecki: cherry-picked :) [09:53] mvo: thanks! [10:03] mborzecki: published, sorry for that [10:03] mvo: np, i can update the arch and fedora packges now [10:05] ta [10:10] need to run an errand, back online in 40 or so [10:17] * Chipaca not feeling too good today [10:17] take care Chipaca [10:17] i am :) thanks [10:18] * dot-tobias waves [10:22] eh, might as well do this mandatory training now [10:24] mvo: I discussed ideas with mborzecki [10:29] zyga: nice [10:29] mvo: the idea is to use a sub-directory of whatever cgroup is assigned by systemd [10:29] PR snapd#7659 closed: snap/snapenv: preserve XDG_RUNTIME_DIR for classic confinement [10:31] zyga: oh, that will work? [10:31] mvo: not for notification, but we can scan /proc and find out what we need in a loop [10:32] zyga: wrt xdg thing, ask also for non-issue [10:32] zyga: otherwise nobody trying it, and everybody trying it and finding no issues, looks the same :) [10:32] Chipaca: pardon, I don't follow [10:32] Chipaca: ah [10:32] I see [10:32] +1 [10:32] good idea [10:35] my mind is blank but I'll do my best to implement it [10:35] it's more likely to succeed than the idea from last evening === seb128_ is now known as seb128 [11:07] re [11:09] pstolowski: thanks for the review, i'll be addressing your comments shortly [11:10] mborzecki: np, ping me for re-review [11:13] mvo: can you also cherry pick 08397513608150c6fd796ceb974557c0e19d6085 to 2.42? [11:15] mborzecki: yes, done [11:15] mborzecki: thank you! [11:16] pstolowski: thanks for the review of 7665! [11:18] zyga, hrm ... we should really have some kind of interface to allow this ... coyping files to home first is very annoying [11:18] yw [11:18] mvo: cool, thanks! [11:19] ogra: it'd be somewhat tricky to make since there's a bunch of special code to make sure you cannot read /home/*/snap/ using home [11:21] i mean, it is the first time i hit this and i can probably mke the arduino ide store to home but it kind of hinders productivity since snaps typically point to ~/snap/snapname/current for their default paths ... and i can imagine a lot of use cases where one snap uses data created by another [11:23] (i.e. creating graphics with the gimp snap that i want to use in a libreoffice presentation with the libreoffice snap ... forcing people to copy around the world for that wont really make us freinds among users :) ) [11:23] zyga, mvo, jdstrand: Re: https://github.com/snapcore/snapd/pull/7655 β†’ Thanks for the 2.42.1 candidate, I tested my snap against the new version. Does the change also cover the post-refresh hook? When I run the code that requires the Introspectable interface from a plugged app, it works fine now. But when the same code is run during post-refresh, I still get the same AppArmor denial. network-manager is plugged in top-level > hooks > [11:23] post-refresh > plugs, and I also added a top-level β€œplugs” dict with `network-manager: {}` to no avail. Holding it wrong? [11:23] PR #7655: interfaces: allow introspecting network-manager on core [11:24] dot-tobias: can you check the generated apparmor profile in /var/lib/snapd/apparmor/profiles/snap.$SNAP_NAME.hooks.post-refresh [11:24] and see if it has the introspection chunk [11:24] dot-tobias: I don't recall cherry-picking anything for post-refresh, its probably in edge only. if you tell me a git rev I can cherry pick in case we do a 2.42.2 [11:25] mvo: it wasn't for post refresh, it was for network-manager introspection on dbus [11:25] dot-tobias: otherwise in the next stable release in ~4 weeks [11:25] mvo: I could find the patch number if you want [11:25] zyga: aha, sry, in any case, if anything needs cherry picking please let me know but only if its really important [11:25] mvo: 5bc7682f2ef572f074dd0764015358cbe139d35d [11:25] dot-tobias: note that it was made to only affect core [11:26] aha, right [11:26] thanks [11:26] well, if its really important I can cherry pick, otherwise its in 2.43 (its not clear we do a 2.42.2 at this point) [11:26] I didn't check if that's in a point release [11:26] pstolowski: while in the remodel review swing, maybe you can have a look at 7715? [11:27] I think it might but please check what's in the apparmor profile I mentioned first [11:27] pstolowski: it should be very similar in style to the gadget one you just reviewed :) [11:30] mvo: sure, will do [11:31] zyga: https://paste.ubuntu.com/p/yJbVPHnXsX/ β†’ apparmor profile seems to contain the necessary chunk for post-refresh. Note this is after I refreshed the snap from a local unsquashed FS via `snap try`, which had the part of its post-refresh hook disabled where Introspectable would be called. [11:31] dot-tobias: please don't use snap try for refresh-related hooks [11:32] they don't operate correctly [11:32] because snapd is confused by "before" and "after" being the same revision [11:33] zyga: Testing on a Core device. Oh ok, would it suffice if I reset the snap to an older revision and then `snap try` the newer revision with the patched post-refresh hook? The older revision doesn't plug network-manager for the hook, so I don't know how to test otherwise. [11:33] dot-tobias: I think using snap try in testing the refresh hook is not useful [11:33] just snap pack the new version [11:34] zyga: And then refresh from this local .snap file? [11:35] correct [11:35] Will test, brb [11:41] zyga: Nope, still the same AppArmor denial. I packed the modified version (changed meta/snap.yaml to include a top-level plug `network-manager: {}` and incremented version number) + installed via snap install. Relevant log entry: https://paste.ubuntu.com/p/HjC6pjcb8K/ [11:42] dot-tobias: can you look at journalctl [11:42] dot-tobias: perhaps we run the hook before the profile of network-manager is updated? [11:44] dot-tobias: if so that would be a separate bug, which would be unfortunate [11:46] zyga: What should I look for in journalctl specifically? When I search for the AppArmor denial, the lines above indicate that the network-manager profile *is* updated before: `Nov 05 12:37:29 localhost kernel: audit: type=1400 audit(1572953849.274:306): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.network-manager.networkmanager" pid=14712 comm="apparmor_parser"` [11:46] (same for the other network-manager 3 profiles) [11:57] zyga: So … I checked the AppArmor profile for NetworkManager itself and it seems that even if I plug network-manager for my post-refresh hook, the profile doesn't seem to be updated. I'll open a forum thread about this. [11:57] dot-tobias: re [11:57] sorry, watching some internal HR stuff [11:58] dot-tobias: so in journal - look at the *order* for the events where apparmor_parser is invoked [11:58] for the hook [11:58] and for the network-manager service [11:58] ok [11:58] looking [11:58] it's interesting because it says "same as current" [11:59] perhaps the bug is not fixed afer all [11:59] because network manager ought to get the permission to receive it [12:00] no worries, appreciate all the help from your side 😊 [12:01] zyga: ^ and: I'm double-checking if I made a mistake, but what trips me up is that the Introspectable access works fine once my snap is refreshed (which only works when I disable the NM-related parts of my post-refresh hook, ofc). [12:01] dot-tobias: review the patch I sent for fixing this and check if there is anything that looks wrong [12:01] it should be symmetric [12:06] zyga: You mean the two snippets in https://github.com/snapcore/snapd/pull/7655/files#diff-323f555eb7f1a661aaa0bea83295e4f1R297 right? I'm writing up my test procedure and results, brb [12:06] PR #7655: interfaces: allow introspecting network-manager on core [12:06] yes [12:08] Chipaca: hey, what's the status of https://bugs.launchpad.net/snapd/+bug/1660970 ? [12:08] Bug #1660970: snap info could autocomplete against installed snaps [12:09] pstolowski: still in progress: snap run doesn't complete yet [12:10] pstolowski: I've got it tagged to reply in more detail when i can [12:10] pstolowski: (from zyga asking me( [12:10] )) [12:11] Chipaca: great, thanks [12:25] Chipaca: there is one other bug where zyga asked you for a status - https://bugs.launchpad.net/snapd/+bug/1750527 [12:25] Bug #1750527: dashboard does not validate text fields [12:30] pstolowski: yep, also tagged [12:30] πŸ‘ [12:33] zyga: https://paste.ubuntu.com/p/pq29pv6zK8/ β†’ It seems to me that your hunch is right: the NetworkManager slot rule is not updated for the post-refresh hook [12:33] dot-tobias: that's interesting, if you disable and enable n-m (via snap disable/enable) [12:33] if so that's a serious bug [12:34] pstolowski: also the ellipsis in utf8 one [12:35] and the snapd on 1804 proxy settings one [12:35] mborzecki: question on the idea [12:35] mborzecki: can we use the unified hierarchy in v1 [12:35] zyga: snap disable n-m / enable n-m shows no change to the Introspectable chunks … (don't know if *that* is the serious bug or if it would update πŸ˜‰ ) [12:35] dot-tobias: that's not bad then, it's a regular bug then [12:35] dot-tobias: we should check why there's no snippet there though [12:35] one second please [12:36] sure [12:36] mborzecki: the logic I have so far looks for non-v2 cgroup hierarchy that has name=systemd [12:36] mborzecki: but also supports the v2 nameless, controllerless one [12:36] but this other choice, id=0 one is always present as /sys/fs/cgroup/unified in v1 world [12:36] and we can put processes there [12:37] so... perhaps that's consistency? [12:37] (after all?) [12:41] zyga: id=0 (i.e. 0::/some/path) is actually v2 hierarchy [12:41] I know [12:41] zyga: so yeah, we can do it ;) [12:41] that's why I menitoned id [12:41] yeah [12:41] I will go for it [12:41] it's consistent and easier [12:41] and actually [12:42] zyga: double check on 14.04 if we still care [12:42] I don't know how to make use of the ID otherwise [12:42] the only other piece that references it is /proc/cgroups [12:42] zyga: 0 is reserved for v2 anywya [12:42] but from there it's hard to match to /proc/self/mountinfo [12:42] unless I need to match the ID to controller [12:42] and then consider anything with that controller viable [12:42] but I don't see any supporting evidence in the documentation [12:42] I will check 14.04 before proceeding [12:43] zyga: w8, why matching with data from /proc/self/mountinfo? [12:43] mborzecki: because you don't know where the cgroup is mounted [12:43] is might be /sys/fs/cgroup or /sys/fs/cgroup/unified [12:43] I know we can check for v1-v2 mode [12:43] but it'd be nicer if this was not so "based on assumption" [12:44] hmm, my nas is down (didn't power up after last power outage) [12:44] so my 14.04 image os off, I'll just spawn spread [12:44] zyga: duh, right [12:45] zyga: hm there's only one possible instance of v2 so just looking for mount of type cgroup2 will do [12:45] yes [12:45] that's why I want to do it [12:45] it's non-ambiguous [12:45] unlike v1 [12:45] it also has one more property [12:45] we _could_ actually use the events file [12:45] haha [12:45] though I didn't think about how deeper yet [12:45] but we could [12:45] anyway [12:45] zyga: double check on 14.04 ;) [12:45] back to checking [12:46] I wish spread had -workers 1 or something [12:46] oh well [12:46] zyga: cachio's spread does [12:46] yeah but you know [12:46] ... [12:46] I only have one spread [12:46] spread-ng ;) [12:48] zyga, https://cachio.s3.amazonaws.com/spread/spread2 [12:48] cachio: thanks! [12:48] cachio: any outlook for merging -workers 1 into spread? [12:49] zyga, you can use -workers 1 -order [12:49] to follow the specific order also [12:49] dot-tobias: let me know if you find out more please [12:49] cachio: right [12:49] zyga, there is a PR for this https://github.com/snapcore/spread/pull/79 [12:49] PR spread#79: New -workers option used to define the number of workers by system [12:50] but not reviews yet [12:50] cachio: try pinging gustavo maybe [12:50] he's really receptive when pinged IMO [12:50] mborzecki: we're good, [12:50] mborzecki: 14.04 has it and it's full of stuff already (not barren) [12:52] zyga: Will do, is there something specific I should test? Not quite sure where to start here. In any case, I'll put the tasks that post-refresh should do for my snap in a service startup; shouldn't be too much overhead to run them on each startup instead of once per refresh. [12:52] dot-tobias: I think the mystery is why n-m doesn't have the new snippet [12:52] dot-tobias: look at the patch and at the file, I don't know why it might not be present [12:52] maybe our assumptions are wrong somehow? [12:55] zyga: Slightly of my depth on this (should become my motto here …) πŸ˜„ As a starter, how is ###PLUG_SECURITY_TAGS### generated in https://github.com/snapcore/snapd/pull/7655/files#diff-323f555eb7f1a661aaa0bea83295e4f1R312 ? [12:55] PR #7655: interfaces: allow introspecting network-manager on core [12:56] dot-tobias: it's generated in the line above, hidden in the diff: https://github.com/snapcore/snapd/pull/7655/files#diff-323f555eb7f1a661aaa0bea83295e4f1L480 [12:57] that returns a string that describes the labels of all plugs connected to the slot [12:59] I'm assuming the profile for n-m is only updated if there are new rules, and if my snap's post-refresh hook is somehow not recognized by the plugAppLabelExpr helper, it won't be included there? [13:00] https://github.com/snapcore/snapd/blob/aebfc2b83d7ac3ec49ff6811ddf8bc8c4c93b92d/interfaces/builtin/utils.go#L73 β†’ would plug.Apps() also return hooks? [13:01] dot-tobias: the profile is generated in memory and reloaded if it changes; we even reload them if they don't change for a specific reason, this is why you saw the message that profile was the same as before [13:02] dot-tobias: yes, that's correct [13:02] plug.Apps would not return hooks [13:02] perhaps that is the bug?! [13:02] that's cool [13:02] that's the bug IMO [13:03] zyga: A shy β€œyes … maybe??” from me πŸ˜„ [13:03] pstolowski: ^ [13:03] dot-tobias: can you add that the the existing bug or open a new one [13:03] I think it's unfortunate for you but this is should be easy to address [13:03] but on the up side, now that it is know it can be fixed, otherwise the next release would be equally buggy [13:04] dot-tobias: thank you! you nailed it [13:04] Hey, happy to help out once instead of just receiving help 😊 I'll open a new bug since this probably affects all hooks, brb [13:06] yes, I think a new bug is more appropriate [13:06] zyga: why should Apps return hooks too? [13:06] they should not [13:07] but the label ought to include hooks too [13:07] using slotAppLabelExpr is just wrong [13:07] it ought to say slotAppOrHookLabel(slot) [13:07] because why would we refuse to allow hooks to have those permissions? [13:07] zyga: That might also explain why my connect-plug-network-manager hook kept failing with similar AppArmor denials for n-m:service, even though that's the whole point of connect-plug-* hooks πŸ˜„ [13:08] oops /o\ === ricab is now known as ricab|lunch [13:08] thank you for catching that! [13:08] and I'm sorry for not writing a spread test [13:08] it would show this [13:09] mborzecki: offtopic, I learned to love #pragma once [13:09] every production toolchain supports it [13:09] and it's far less silly than the ifndef approach [13:09] no need to invent names [13:10] zyga: i see [13:11] * pstolowski school run, bbiab [13:11] zyga: No worries, you people have so much on your plate with the snap ecosystem … there's always some workflow to improve, and resources are constrained. Happy to help 😊 [13:11] dot-tobias: I'll gladly help you fix this if you want to [13:12] pstolowski: pushed fixes to https://github.com/snapcore/snapd/pull/7665 [13:12] PR #7665: devicestate: add support for gadget->gadget remodel [13:12] zyga: Very much wanted, because I'd probably overlook some helper or introduce even worse bugs πŸ˜„ [13:13] dot-tobias: expand AppLabelExpr to take a map of hooks as well [13:13] the rest is a consequence of that [13:14] adjust names of the functions to convey the fact that it is not just apps now [13:14] I think this bug is silly [13:14] it's an old design that we lifted [13:14] but buggily so [13:14] we designed it so that hooks could not have interfaces initially, not all of them [13:14] I think we never noticed when this restriction went away [13:14] that the label expression is only for apps [13:14] there's some tricky code in that function [13:14] as it tries to produce nicer output than brute force [13:15] my suggestion would be to cahng it so that it considers not hooks or apps [13:15] but just a slice of names [13:15] whatever they are [13:15] and have the names be a concatenation of app labels and hook labels [13:15] β€œapps” in that context are apps + services in snapcraft lingo? [13:16] dot-tobias: there are no tests for appLabelExpr so I would suggest to start with that [13:16] ok, moving back home [13:16] just create a test that checks the label for the current code [13:16] dot-tobias: yes, apps are all apps, equally [13:16] services are just certain apps [13:16] dot-tobias: there is code that tests this indirectly [13:16] zyga: Ok, I'll install go, set up snapd locally and then get back to you in a week or two πŸ˜‰ [13:17] but a direct test that generates snap.pkg.*, snap.pkg.{app1,app2} and snap.pkg.app3 as output would be good [13:17] as those are all the variants the current logic handles [13:17] dot-tobias: let us know if you need help but I think this is fairly nicely scoped [13:18] dot-tobias: you can build a new function, move code over from the old function, remove the old function in stages [13:18] zyga: Will do. I have some spare time atm, so this should be a nice way to a) contribute code and b) learn something new [13:18] dot-tobias: this definitely affects lots of interfaces, just git grep AppLabelExpr [13:19] zyga: Would you recommend setting things up directly on a Ubuntu host, or can I use my main macOS env to develop? [13:19] dot-tobias: linux is strongly recommended, you will have issues as our code has many parts that only build on linux [13:19] dot-tobias: personally I use vmware fusion [13:20] dot-tobias: as for the host, any linux will do really [13:20] dot-tobias: for this sort of change at least [13:20] zyga: thought so, check. Ok, I'll start with completing the bug report πŸ˜„ [13:26] uh [13:26] found an issue [13:26] but I'll wait for maciek [13:31] zyga: ^ does this relate to the issue we discussed, or sth else? [13:31] no no [13:31] it's for the cgroup thing [13:31] πŸ‘ [13:35] mvo: I'll run the new plan by stgraber and xnox today [13:35] maybe to avoid and learn from the last experience? [13:35] * zyga needs a break [13:35] see you all at the standup [13:53] zyga: cool, thanks for chasing this [14:04] mvo: so.... model assertions [14:05] mvo: $ snap known --remote model series=20 model="ubuntu-core-20-amd64" brand-id=canonical [14:05] xnox: in a meeting [14:05] tells me that none are found =) [14:05] xnox: right, will reply in a wee bit [14:05] who should i talk to, about making a core20 pc-kernel model? =) [14:05] ack [14:10] xnox: you can try https://paste.ubuntu.com/p/DpZ2c3y4h9/ ? [14:11] xnox: its "my" model, not the canocnial one yet [14:11] xnox: but I get error: cannot use gadget snap because its base "" is different from model base "core20" with that so I need to look [14:11] xnox: either pc is not quite right (the snap) or something else, haven't had time yet to dig (meeting) [14:28] mvo: why is it series=16? [14:28] xnox: loooooong story [14:28] mvo: would be nice to be series 20 and make that the default track [14:29] mvo: why is there no snapd snap listed? [14:29] xnox: the "series" is about the "format" of the entire architecture of snaps [14:29] mvo: how does one specify to use "edge"? [14:29] xnox: its implicit, I guess we could/should make it explicit though [14:29] xnox: ubuntu-image --channel=edge [14:29] xnox: that should work [14:29] ok [14:30] xnox: I got further, my image creation is now exploding that "dangerous" is not yet supported [14:30] mvo: how does one create model assertions? [14:30] * xnox wants to play with this stuff [14:30] mvo: also do we have git models committed anywhere? or is it simply in the store? [14:31] xnox: use https://paste.ubuntu.com/p/VfkNwGQCHK/ as input, modify brand-id and then run snap sign [14:31] mvo: ack [14:31] xnox: there is a doc that describes this, still in a meeting so can give you only 15% of my attention [14:31] * xnox ponders to commit them into the pc gadget git repo, on respective branches === ricab|lunch is now known as ricab [14:37] i am confused what are the magic values of like authority-id brand-id id [14:38] xnox: its in your account page [14:38] ack [14:38] xnox: meeting over, now you can have more attention :) [14:38] xnox: https://dashboard.snapcraft.io/dev/account/ [14:38] xnox: there is the accound-id there [14:39] xnox: use that for brandh-id, authority-id [14:40] mvo: ok, and ids on snaps? is that the unique ids of the snaps, in addition to just their name? [14:40] xnox: snap info --verbose will show you the snap id [14:40] xnox: correct, snap info --verbose will give you those [14:42] mvo: can timestamp be in the future? we should set it to 2020-04-23T20:04:00:00.0Z [14:42] xnox: not sure that this will work [14:43] mvo: because you think hardware clocks have real time?! that's just silly. [14:45] mvo: grade dangerous is invalid, no? it's called "devel" [14:53] xnox: that sounds slightly outdated, let me try to find where this was written down but I can point you to the code. its "unset", "secured", "signed" and "dangerous" there [14:53] mvo: i find it extremly odd to use key "grade" in both model & snapcraft, with widely different meaning and values. [14:54] xnox: https://github.com/snapcore/snapd/blob/master/asserts/model.go#L320 [14:54] xnox: right, unfortunately samuele is on vac, that's a topic for him [14:54] mvo: then it should be called like model-grade, not just grade =/ [14:56] mvo: imho we should be able to build "signed" one today, no need for "dangerous" [14:56] xnox: yeah, if you feel strongly, please mail samuele to discuss this, I don't think its set in stone but it will get harder to change the closer we get :) [14:57] mvo: also, this implies we will have two models, and two images for core20 => with and without tpm-fde? but current working assumption is that a single image can be both. [14:58] i.e. "signed" should be allowed to be "secured", wheres as "secured" should not be. Ie. "signed" should be a superset of "secured", and ditto "signed" and "dangerous" should be supersets of previous one. [14:58] i.e. it's totally fine to have "dangerous" one effectively running as "secured" if all pieces work. [14:59] xnox: dangerous can still have fde, it just allows to sideload stuff, or am I misunderstanding? [14:59] xnox: also, my next meeting starts now ./ so back to 15% of my attention for you [14:59] xnox: sorry! [15:02] ETOOMANYMEETINGS? πŸ€” [15:05] snap sign cannot do GPG it seems.... it cannot find a key named "default" wtf?! [15:05] * xnox uses a smartcard [15:09] cmatsuoka: some comments under #7687 [15:09] PR #7687: snap-bootstrap: check gadget versus disk partitions [15:11] hey snappy people, in a classic snap, when I use sudo, should i use the "sudo" binary of core? [15:14] kjackal: you should simply use sudo, with PATH discovery. ie. just "sudo" not any absolute path. [15:14] I see MicroK8s in Centos 8.0 and fedora 29 failing when using sudo and I am wondering if I should package sudo or use the host's, or use the core's [15:14] note sudo is not universal, and is not guaranteed to be installed, or usable. [15:15] one might be root already, then no sudo should be needed, etc. [15:15] xnox: this is the error I am getting https://forum.snapcraft.io/t/pam-account-management-error/14026 [15:16] kjackal: some of it, looks like a broken core snap [15:16] in my case sudo is available but the libraries are not in the right places (?) [15:17] or rather mixed up LD configuration / overrides / preloads, ie. system pam is used with libraries from a core snap, which will never work =) [15:18] kjackal: i wonder if environment that snap setup for you, is interfering with using system PAM session correctly [15:18] Back home now [15:20] xnox: I am setting some env variables here: https://github.com/ubuntu/microk8s/blob/master/microk8s-resources/wrappers/microk8s-enable.wrapper#L4 could these be a problem? [15:20] * cachio afk [15:20] * cachio lunch [15:32] kjackal: yes, all of them. [15:32] kjackal: these are good, for using binaries from inside the snap, but bad if one tries to dlopen system installed ones (like pam does for pam modules which dlopen things) [15:33] xnox: but i am doing for example "sudo " so... ? [15:34] kjackal: which is operating sudo itself with those environment variables in effect. which is bombing out. [15:35] because sudo, tries to open a pam session, as per system wide config, loads pam modules from the system-wide, yet with LD_ path pointing inside the snap which is incompatible with with system-wide libraries [15:36] kjackal: store and export original path, ie. with export STOCK_PATH=$PATH ditto for STOCK LD_LIBRARY_PATH [15:36] kjackal: and i expect something like this will work: [15:36] PATH=$STOCK_PATH LD_LIBRARY_PATH=$STOCK_LD_LIBRARY_PATH sudo PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH sed -i [15:37] kjackal: ie. use system wide sudo, with system-wide PATH & LD_LIBRARY_PATH, but use snap paths for sed. [15:37] although imho one can rely on system sed too, as it's fundamental too. [15:37] although imho one can rely on system sed too, as it's fundamental tool. [15:37] I see, will try that [15:38] thank you xnox [15:38] kjackal: your problem is that one cannot really create and use pam session from inside a snap, and expect it to work with the system-wide pam config. Meaning one has to use system-wide sudo [15:38] because all of those things use absolute paths to dlopen() libraries which all must match. [15:39] it "works" by magic on like Ubuntu due to e.g. snap build on xenial, and libraries staying compatible for basic things like that [15:39] (i.e. when host == snap abi's by accident) [15:40] kjackal: also note that i have no idea what i'm talking about and i'm jsut a random person on irc who has zero idea about how snaps work =) [15:41] :) === mborzeck1 is now known as mborzecki [15:43] snapd in AUR has been updated to 2.42.1 [15:43] * mvo hugs mborzecki [15:47] spread tests in #7715 and #7665 are very alike, i'm not sure who was first ;) fwtw i'm adding same comments ;) [15:47] PR #7715: overlord: add base->base remodel undo tests and fixes [15:47] PR #7665: devicestate: add support for gadget->gadget remodel [15:51] mvo: error: cannot override channels, add local snaps or extra snaps with a model of grade higher than dangerous [15:52] mvo: hm..... prepare-image fails..... but i'm confused about these constraints. How do I build image of a model, using edge channels? model doesn't allow to specify channel does it? [15:52] xnox: yeah, I hit this too, I'm looking into it [15:52] xnox: basicly we need to land one more PR (7712 [15:53] xnox: then we can have a "grade: dangerous" model that allows overriding [15:53] xnox: I was also looking into: https://paste.ubuntu.com/p/5bhBPMvVJj/ [15:53] xnox: but that fails with a strange error, that it can't find core20 which I think is a lie [15:54] mvo: reviewed #7715 [15:54] PR #7715: overlord: add base->base remodel undo tests and fixes [15:54] mvo: hm.... i'm not sure if that's what i am hitting..... because all the snaps i'm using are acked and in store. I'm not using any unsigned, or unasserted snaps [15:55] xnox: you did specify --channel=edge, maybe? [15:55] pstolowski: cool, will look [15:55] * mvo needs to taxi kids around for ~30min [15:55] bbiab [15:57] for me it's fetching the wrong gadget snap! [15:58] re again [15:58] * zyga had dinner and an unexpected encounter [15:59] my neighbor was venting old stuff and asked me if ... I want any of his 90s games collection [15:59] so now I have a CD-ROM with dungeon master 2 [15:59] and a few similar games [15:59] anyway [15:59] back to work [15:59] xnox: hey [16:00] xnox: we have an idea and before pursuing further wanted to ask you for advice [16:00] xnox: it is related to systemd and cgroups [16:00] xnox: the idea is: when snaps are invoked they put themselves into a new leaf under wherever systemd had placed them [16:00] xnox: in the unified v2 hierarchy [16:01] xnox: so for example, on /user.slice/user-1000.slice/user@100.service/snap.pkg.app [16:01] xnox: or something equally appropriate for system services [16:01] xnox: we'd be stealing the process from systemd [16:01] xnox: but placing it deeper in the same hierarchy [16:02] xnox: casual testing shows that systemd is not confused and still manages services correctly [16:03] xnox: we intend to use the unified hierarchy in v2 mode, obviously, because we have no other choice [16:03] xnox: but also in the v1 mode [16:03] xnox: because it is seemingly working the same way for what we intend (associating PIDs with snaps) [16:04] so i have this https://bugs.launchpad.net/snapd/+bug/1851401 [16:04] Bug #1851401: snap prepare-image downloads wrong snaps [16:07] zyga: "when snaps are invoked they put themselves into a new leaf under wherever systemd had placed them" using children, and further scoping is always safe. Moving "up" is usually either not-allowed, or is a priviledged operation. Systemd should not get confused, as long as you don't change notification agents on it. And yes it should be fine under v1/v2/hybrid. BTW why do you want to do this? [16:07] i.e. what are you trying to solve? [16:07] xnox: that's good news [16:07] xnox: we want this to implement a feature where snapd pauses refreshes while an app is open [16:08] that's insecure and abusable. [16:08] xnox: and can, having tried to refresh but deciding not to [16:08] as unpriviledged user can create those cgroups and put arbitrary processes into them. [16:08] xnox: then decide to refresh it reasonably fast after it was closed [16:08] xnox: that's ok, we have safeguards for that [16:08] xnox: that is, firefox running forever in a snap will eventually referesh anyway [16:08] *refresh [16:09] i.e. you could make binaries be "systemd-run actual binary" cause then pid1 will put the process into a system cgroup, which is authoritative. [16:09] xnox: we considered that but we don't have systemd-run across all versions we support [16:10] xnox: but it's also a problem there [16:10] xnox: because we want to have this available uniformly across all apps [16:10] xnox: including services [16:10] xnox: and using systemd-run from inside what is effectively a service file with Exec line [16:11] zyga: you do have sytemd-run everywhere.... given that it's in core16 [16:11] xnox: we are at the mercy of what systemd allows us to do here sadly, as snaps need to integrate with existing system services and be managed by systemd directly [16:11] zyga: you don't need systemd-run for services, as pid1 already placed them into an authoritative cgroup [16:11] xnox: I think we don't have that on 14.04 [16:11] xnox: but even then the other problem is more severe [16:11] xnox: "apache", "firefox" and "grep" type workloads need to be supported in this mode [16:11] zyga: systemd-run is inside core snap, and on 14.04 it runs against subordinate systemd which has it..... [16:12] xnox: I see but core is not mandatory and it would also complicate startup, what if you install a snap with bare base on 14.04? [16:12] zyga: if you only do this for "user" apps, that's fine. I.e. i don't want to hold up daemon refreshes, due to unpriviledged user controlled cgroups. [16:13] xnox: we want this to work uniformly for all applications but there's some smarts for services [16:13] i.e. somebody executing "snap --help" and freezing it, should not prevent snapd refresh for example [16:13] xnox: snap --help won't prevent snapd from refreshing [16:13] zyga: it's insecure, thus you must have security team review / signoff on this logic. [16:14] xnox: can you specify what is insecure specifically [16:14] xnox: (we always get security review for features like that) [16:14] zyga: arbittrary users can create the cgroups like /user.slice/user-1000.slice/user@100.service/snap.pkg.app which have never been executed via snap/snapd [16:15] with zombie /bin/true process [16:15] indeed, this is true [16:15] xnox: at this point we ran out of ideas for things that work across the stack unfortunately [16:16] you could use kernel keyrign to list snap invocation_ids which is read only, to then lock that up. Cause that's what e.g. systemd-run does [16:16] xnox: users don't have to be nasty, they can just run the real app [16:16] xnox: so it is not a new problem of the feature [16:16] zyga: also i challenge you on the 14.04 assertion, i believe systemd-run is available there. [16:16] xnox: invocation IDs? [16:17] systemd creates process keyring and puts a unique key there and makes it readonly and exports it as an evironment variable. Then processes can share that keyring (ie. group of services) and then they can all know that they are part of the same "reexec" for example. Kind of like a cohort key. [16:18] but with kernel protection that nobody can modify or fake it [16:18] xnox: interesting, which syscalls govern that? I'll read about it [16:18] xnox: and do you know if this will work inside LXD [16:18] xnox: as whatever we need to do needs to work in lxd across the stack [16:18] it does work in lxd today, but i don't remeber when it was added. [16:18] (we are in this situation after we realized mounting a v1 name=snapd cgroup doesn't work) [16:18] zyga: why do you care about 14.04? [16:19] xnox: it's still supported, we cannot abandon it without some official kick [16:19] xnox: but I would not hold onto 14.04 [16:19] xnox: it's just that systemd-run doesn't do what we want to AFAIK [16:19] zyga: it's passed end of basic support, and excludes support for snapd in ESM [16:19] xnox: unless I misunderstand [16:19] zyga: it's dead to you [16:20] and i.e. subordinate systemd is not supported there for sure. [16:20] xnox: I need mvo to tell me that, I asked recently and I got a different answer [16:20] mvo [16:20] not in this channel [16:20] it seems he is not connected now [16:20] xnox: but even assuming we can run systemd-run [16:20] xnox: can you outline how we could use that to identify all snap execution entry points? [16:21] that is, all apps, hooks and services [16:21] so that when scanning PIDs [16:21] we can see where they came from [16:21] zyga: and 14.04 is very unconfined, as far as i understand. i.e. most interesting interfaces are not supported on 14.04 anyway. [16:21] xnox: I think actually only fuse is not, everything else is not special cased on 14.04 [16:21] it's not supported for desktop apps but that is all [16:22] vorlon: what's status of supporting snapd on 14.04? i thought it's dead and not part of ESM. [16:23] xnox: so would snap-run invoke systemd-run which would invoke snap-confine and then snap-exec? [16:23] xnox: I don't know why you had that impression; you should look to the Security Team for a specific support statement, but I'd be surprised if snapd wasn't in scope [16:23] I suspect that the nature of ESM is that it's too soon to say something is not supported [16:24] the policy in snapd team, for now, as far as I know, is that 14.04 is still a target [16:24] zyga: imho that call chain "makes sense" but potentially breaks a lot of desktop integration, unless one is careful to do --user / --system for the systemd-run bit. [16:24] and we are not introducing features that don't support it [16:25] xnox: can you walk me through the operations of systemd-run, what do we get by using it and how should we invoke it? [16:25] zyga: i'm very busy, and i've spend too much time talking to you already. So no, i don't. plese read man pages for systemd-run, they have a lot of details. [16:26] xnox: I will, thank you for the advice and for the discussion, it's very useful [16:27] xnox: I don't think we can use systemd-run [16:27] xnox: based on the man page itself [16:27] vorlon: zyga: snapd is explicitely called out as an exclusion for 14.04 ESM that's where i got this impression from https://wiki.ubuntu.com/SecurityTeam/ESM/14.04#Exclusions [16:27] xnox: but we should be able to use the cgroup sub-directort leaf [16:28] zyga: it starts an invocation, as a dynamic .service unit. meaning one can query it with systemctl list-units snapd-execs.* for example [16:28] and it can like prevent user from having two copies of the thing running in parallel, etc. [16:29] yes, but it doesn't give me a way to run a classic snap this way, e.g. a classic installation of python, to get interactive pty [16:29] xnox: well, if it's published as an exclusion, there's your answer :-) [16:29] it needs to support all the kinds of interactions snap apps support: desktop apps, services and all the command line stuff, including classic snaps [16:29] mostly useful to start "dynamic" things but monitored, i.e. executing user-written hooks, which can be arbitrary long, with journald logging, confiment, etc. [16:30] it does break the scope & confiment, even basic things like "what is my stdin" [16:30] yeah, so while we could use it for services, for services arguably systemd is already giving us all of that already [16:30] I think it will also be a less invasive change [16:30] I'm very curious about the keyring operation [16:30] as that seems like a way out of the too-easy-to-spoof problem [16:31] zyga: start with keyctl manpage about kernel keyring, and invocation_id stuff inside systemd [16:31] though it doesn't really solve the problem as you can just run the real thing (real snap app) and not close it for the same effect [16:32] it seems like a potentially interesting replacement for the snap cookie concept though [16:32] but I need to read on it more now [16:32] * zyga hugs xnox [16:32] thank you :) [16:40] * cachio afk [16:55] * ijohnson hugs zyga after reading backlog [16:55] ijohnson: what specifically? : [16:55] :) [16:55] the many changes to refresh awareness, sounds like quite a rollercoaster [16:55] ijohnson: the only question is [16:56] ijohnson: is it still going up or are we already going down? ;) [16:56] but yeah, it's quite a feature [16:56] haha :-) [16:57] * ijohnson is not really around today, still in Arizona for meetings [16:57] * ogra waits for the time where the snapd snap is bigger than his kernel snaps on core images [16:58] * ijohnson quietly shoves edgex snap inside snapd to get ogra to stop waiting [16:58] haha [16:59] ijohnson, reading that ... we'll need to talk about edgex before EOM ... (got another exhibition and we want to shw edgex finally) [16:59] the setup doc we have seems outdated [16:59] sure that doc is probably out of date, but let's try to keep Tony and Don in the loop too [16:59] ogra: when is your exhibition? [17:00] last week of nov. [17:00] (i think at least ... /me checks) [17:01] yeah, 26 to 28 https://sps.mesago.com/nuernberg/en.html [17:05] ogra: ack are you going to be in vancouver next week for the sprint? [17:11] ogra: we will link everything into one binary so that it can stay at comfortable 20MBs forever [17:11] mvo: heye [17:11] mvo: you missed some nice discussion about systemd stuff with xnox [17:12] mvo: I think I will wrap it for today [17:12] mvo: the big takeaway is that xnox effectively confirmed that the idea from Maciek is workable [17:12] mvo: he also raised a number of important points for us to discuss [17:12] mvo: but I will try to propose the branch implementing this tomorrow [17:13] mvo: everything is broken and nothing works, but i made progress! [17:14] hey zyga [17:14] mvo: hey :) [17:15] xnox: ha! [17:15] zyga: cool [17:15] xnox: I think we have a bug in the core20 getting [17:15] xnox: what kind of progress did you made? [17:16] xnox: the pending PR#7712 should make everything easier, I will review it tomorrow morning [17:22] mvo: see email from me. if that PR helps that's great, will try that if/when it's available to me in a track/grade/branch to me [17:22] mvo: some things i can work around with, by like passing locally downloaded snaps etc. but other things seem broken - i.e. ubuntu-image doesn't do anything for me. [17:23] xnox: aha, nice [17:23] xnox: got the mail now [17:23] mvo: and i question some design choices in the model assertion, which i guess i need to type up and send. [17:31] I'm wrapping up [17:32] ijohnson, no vancouver for me ... [17:32] ogra: cool maybe we could setup a hangout early next week then [17:33] yeah, that sounds fine [17:59] ok, EOD for me [17:59] πŸ‘‹ === pstolowski is now known as pstolowski|afk [18:48] PR snapd#7720 opened: asserts: add "snapd" type to valid types in the model assertion [21:04] PR snapcraft#2792 opened: pluginhandler: use well-formed build package/snap lists [21:10] PR snapcraft#2793 opened: tests: enable SNAPCRAFT_BUILD_INFO for spread === msalvatore_ is now known as msalvatore === heather is now known as hellsworth