/srv/irclogs.ubuntu.com/2019/11/07/#snappy.txt

mupPR snapcraft#2795 opened: manifest: track and annotate `primed-stage-packages` <Created by cjp256> <https://github.com/snapcore/snapcraft/pull/2795>00:25
mwhudsonhm core refreshed and now google-play-music-desktop-player broke?01:49
mborzeckimorning06:35
zygaHey mborzecki06:38
zygaPlease read the review I got from Jamie06:38
zygaWe need to discuss this06:39
mborzeckizyga: hey hey, i've landed the fix for master yesterday, so please update your PRs if needed06:39
zygaPerhaps at 8:30?06:39
zygamborzecki: will do06:39
mborzeckizyga: yeah, 830 sounds fine06:39
mborzeckizyga: duh, epel8 build failed on s390x :/06:47
zygamborzecki: order one to debug at home ;D06:50
mborzeckihaha06:50
zygamborzecki: I rebased and pushed on https://github.com/snapcore/snapd/pull/772606:51
mupPR #7726: RFC: change how snapd tracks processes <Created by zyga> <https://github.com/snapcore/snapd/pull/7726>06:51
zygathe other two can wait, we need to discuss them first06:51
zygamborzecki: I also enabled f31 locally and confirmed 7726 *passes* there06:52
mborzeckizyga: nothing we can fix though https://kojipkgs.fedoraproject.org//work/tasks/4109/38804109/root.log Eighth_Doctor probably knows if this is being addressed06:53
zygayeah, let's ignore that06:54
zygabrb07:06
mborzeckihmm mvo isn't around yet07:18
* zyga adds test for https://github.com/snapcore/snapd/pull/772407:19
mupPR #7724: cmd/snap-confine: tracking processes with classic confinement <Created by zyga> <https://github.com/snapcore/snapd/pull/7724>07:20
zygamborzecki: I have a swap day for Friday07:20
zygamborzecki: I'll get a swap day for Monday at the sprint07:20
zygamborzecki: and two days for travel07:20
zygamborzecki: but I have a feeling I wont ever take them :/07:20
zygathat's nearly a swap week now07:20
mborzeckiunlimited company vacation? :)07:20
mborzeckizyga: btw. with your tweek from yday, it looks like you're prepping up fro the 4-day working week, tryign to squeeze 5 days worth of work into 4 days :P07:21
mborzeckiand the productivity is up :)07:21
zyga:D07:22
zygaI wish I had 4 day week07:22
zygaor that 5 hour workday07:22
zygaI feel tired lately07:22
mborzeckimvo: morning07:31
zygahey mvo07:31
mvohey mborzecki and zyga07:32
zygamvo: it's been a long evening07:32
mborzeckimvo: pinged you in https://github.com/snapcore/snapd/pull/7721 could use your input there07:32
mupPR #7721: gadget: add support for hybrid partitioning schemas <Simple 😃> <⛔ Blocked> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/7721>07:32
zygahttps://github.com/snapcore/snapd/pull/7722 :)07:32
mupPR #7722: cmd/snap-confine: add sc_join_sub_group <Created by zyga> <https://github.com/snapcore/snapd/pull/7722>07:32
mvomborzecki: thanks, I have a look07:32
mupPR snapd#7652 closed: o/ifacestate,interfaces,interfaces/policy: slots-per-plug: * <Needs Samuele review> <Priority 🏇> <Created by pedronis> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/7652>07:42
* zyga -> breakfast07:46
* zyga pushed a patch to https://github.com/snapcore/snapd/pull/7724 and now _really_ does breakfast07:54
mupPR #7724: cmd/snap-confine: tracking processes with classic confinement <Created by zyga> <https://github.com/snapcore/snapd/pull/7724>07:54
=== pstolowski|afk is now known as pstolowski
pstolowskimornings08:07
mborzeckipstolowski: hey08:08
* zyga breaks to rest for a while08:50
* dot-tobias hey all09:06
zygahey dot-tobias :)09:08
ackkhi, I'm getting an error when running snap commands (and in the snap service as well) about meta/snap.yaml not being found. but the file is obviously there09:10
ackkthis is from a "snap try"09:14
zygaackk: is it visible from the preserved mount namespace?09:16
zygaackk: to find out: sudo nsenter -m/run/snapd/ns/maas.mnt09:16
zygaackk: stat /snap/maas/current/meta/snap.yaml09:16
ackkzyga, it's not maas this time :)09:18
zygaackk: /o\ :D09:18
ackkzyga, stat fails09:18
ackkzyga, (it's canonical-rbac)09:18
zyganow you can explore what is there09:18
ackkzyga, https://paste.ubuntu.com/p/V9mn5GZztg/09:19
zygacheck what is mounted there09:20
ackkzyga, from within the ns or outside?09:20
ackkzyga, from outside I see nsfs on /run/snapd/ns/canonical-rbac.mnt type nsfs (rw)09:21
zygaackk: inside, where it is broken please09:22
dot-tobiasmvo: core 2.42.1 has been in candidate since Monday, will it get promoted to stable this week or did someone discover issues? Asking for an anxious stakeholder 😊09:22
ackkzyga, https://paste.ubuntu.com/p/FG4g8mBRNX/09:23
mupPR snapd#7727 opened: tests: improve TestDoPrereqRetryWhenBaseInFlight to fix occasional flakiness <Test Robustness> <Created by stolowski> <https://github.com/snapcore/snapd/pull/7727>09:24
zygaackk: and on the host?09:25
ackkzyga, https://paste.ubuntu.com/p/6GqMpSKWVt/09:25
ackkzyga, note, this is in a bionic container09:25
ackk(on disco as host)09:25
zygaright09:26
zygaideally compare what is mounted where you see the snap.yaml09:26
zygaand what is mounted where you don't09:26
ackkzyga, so the /snap directory inside is empty apart from those 2 files, which seems broken?09:29
mvodot-tobias: it was planned to go to stable yesterday, I need to check what happend, worst case is that it gets promoted this monday09:35
zygamborzecki: so09:45
zygamborzecki, mvo: that branch can be scrapped09:46
zygabut we can do something else still that's supported by systemd09:46
popeyogra: https://snapcraft.io/beebeep - you gonna update that? looks like a new release in edge?09:46
zygabut snap-confine will depend on dbus09:46
zygaand will require to use dbus to talk to systemd to run anything that is not a service09:46
zygaand will need to know if something is a service or not09:46
zygathat's the status quo09:46
mborzeckizyga: hm reading #fedora-devel now09:47
mborzeckizyga: ehh, so dbus and scope then?09:47
zygayes09:47
zygano other way09:47
mborzeckidamn, that sucks09:47
zygaI'm trying to pull some documentation that's better than just reading the source09:48
mborzeckizyga: so if i'm reading this right, fire up transient scope, wait for it, then move the process to that scope right?09:48
zygayes09:48
zygaStartTransientUnit and AttachProcessesToUnit09:48
zygaand it should be a scope, not a slice, for the reasons I gave on #fedora-devel09:49
mborzeckihm not exactly something we can simulate as separate steps in systemd-run09:49
zygamborzecki: wanna jump into this? :)09:49
mborzeckizyga: fixing up the f31 pr, but let's sync afterwards maybe?09:50
zygasure09:50
zygaI was supposed to rest anyway09:50
popeyogra: in fact there's an even newer upstream release. 5.8.2 - you should setup automatic builds :D09:50
mborzeckizyga: btw. one scope per user right?09:50
diddledanif only there was a service for automated snap builds09:51
mupPR pc-amd64-gadget#23 opened: Add missing partitions and improve grub.cfg-recovery <Created by mvo5> <https://github.com/snapcore/pc-amd64-gadget/pull/23>09:51
zygamborzecki: I don't know yet09:51
zygamborzecki: I think ... not09:51
zygamborzecki: I thik it's just one scope if I'm right09:51
zygabut let me write a prototype first09:51
mborzeckizyga: https://gist.github.com/bboozzoo/76b1535c93686a27bb7fdbaad0f560f7#user-process some notes from before09:51
mborzeckizyga: there's even a note about separate scope for snaps09:52
dot-tobiasmvo: Thanks for the update! (re Core update release)10:07
Chipacamvo: btw i've been puzzling over this 'have two grub.cfg' and i'm not sure i understand it10:53
pstolowskidoh, "{\"error_list\":[{\"code\":null,\"message\":\"Nonce is missing or10:53
Chipacapstolowski: where was that?10:54
pstolowskiChipaca: https://api.travis-ci.org/v3/job/608640768/log.txt10:54
pstolowskiChipaca: google:fedora-30-64:tests/main/selinux-lxd10:54
Chipacapstolowski: log seems truncated10:55
Chipacaanyway, i guess we need to retry those :-/10:55
pstolowskiChipaca: ah i restarted the job assuming .txt would be kept10:55
Chipacano worries10:56
ograpopey, yeah, will update it... i asked upstream about taking it over but he didnt reply (we actually had an active conversation that somehow died from his side)11:01
mvoChipaca: in a meeting right now11:02
mvoChipaca: but happy to talk to talk after11:02
popeyogra: cool. i wanted to pimp it on the snapcraft social account11:02
popeybut don't want to do that if it's not up to date11:02
ogragreat, i'll test the edge version today and will promote it if it works11:02
Chipacapopey: ogra: maybe pimping it is the push needed for them to take it on?11:03
ograyeah, perhaps11:03
popeywell, once we pimp it, the numbers will rise11:03
popeyit already has quite a few installs, but I think we can probably double it11:03
ograthe numbers are pretty high already ... i think its my most downloaded snap atm11:03
popeyI had never heard of it before today11:03
popeydid you know you can tell if it's your most downloaded by going to https://snapcraft.io/snaps11:04
ogra(an it still has one prob ... it doesnt beep :P ... )11:04
popeyit shows a graph at the top11:04
ograyeah11:04
popeyhttps://usercontent.irccloud-cdn.com/file/IQu0dsu0/Screenshot%20from%202019-11-07%2011-04-27.png11:04
ogra90k ?11:05
ograwhats that ?11:05
Chipacaogra: popey: maybe update the description so it doesn't say you need to unzip it?11:05
popeyyeah :)11:05
ograone of yours11:05
ograChipaca, lol, thanks, will do11:05
popeyno, not mine. just one i have access to11:05
popeyI bet diddledan has a nice looking graph on his page :)11:06
ogra(that snap was actually the result of an ubuntu-users ML discussion... i only invested like 30min into it to prove how quick one can make a snap out of 3rd party SW)11:06
popey(higher than any of mine)11:06
popeynice11:06
popeyput another 30 mins in :)11:06
ogranah, rather 1h or two11:06
ograit never really got polished11:06
popeyis it a pulseaudio problem?11:06
popeyok, I won't pimp it till you get audio and the theme looking a bit less.... Windows 9511:07
ograit uses some KDE audio lib11:07
popeymaybe use the kde frameworks snap11:07
ograsome outdated thing ...11:07
popeyto re-use their libs11:07
popeyoh, arts?11:07
ograno, the thing after arts11:07
ograsomething with q or p ... i forgot the name11:07
ographonon !11:08
popeyah yes11:08
zygajdstrand: some news11:08
zygajdstrand: bad news: we cannot do what I did in that PR11:08
popeySee, this is one thing I love about snaps, is preserving this old crap :)11:08
ograhaha11:08
popeysee also: mosaic11:08
zygajdstrand: good news: we can ask systemd to do exactly that for us11:08
zygajdstrand: bad news: it requires us to talk to systemd over dbus11:09
zygajdstrand: good news: it really works11:09
popeymosaic has nearly 300 installs. Lunatics :)11:09
zygajdstrand: good news: it does not change the snapd sice of the task much, the only difference is that the location is a scope so it looks like snap.foo.bar.scope11:09
zygajdstrand: bad news it's somewhat racy, we need to create a transient unit with the pid of the process we want to have11:10
zygajdstrand: and if that fails we instead need to attach process to the scope11:10
zygajdstrand: if that fails we need to retry creating the unit11:10
ograpopey, well, it is one of these things you install, try out once and forget11:11
popeytrue11:11
* popey schedules a tweet about mosaic for 7th January, when it will be 23 years old11:12
ograi'm sure i have an idling mosaic install on one of my machines that i only tried once11:12
* popey looks at Chipaca 11:13
* popey looks at the wikipedia page for netscape navigator11:13
* popey looks back at Chipaca 11:13
Chipacapopey: I know!11:14
popey:D11:14
Chipacapopey: but the on-disk filesystem seems to be incompatible :-(11:14
ChipacaI need to give it a weekend11:14
Chipacapopey: something changed _on disk_ since the libc5 days11:14
Chipacaat least that's what the errors tell me11:14
Chipacapopey: HOWever, mosaic isn't the oldest software in the store :)11:14
popeythe birthday is 21s February, so you have until then :)11:14
popeyoh?11:15
Chipacapopey: mosaic is from 199311:15
Chipacapopey: simcity is from 198911:15
popeyis simcity in the store?11:15
Chipacaobvs11:15
popeyi didnt find it11:15
Chipacapopey: 'micropolis'11:16
popeyoh!11:16
Chipacapopey: simcity is (tm) ea11:16
Chipacapopey: micropolis is a build from the now-free-software simcity code11:16
popeyclever11:16
* popey hugs diddledan 11:16
* popey gets that on the hype train11:16
Chipacaone of the nicest things about these old-as-hat things is that they're tiny :)11:17
ograbah11:17
ogra$ beebeep11:17
ograln: failed to create symbolic link '/home/ogra/snap/beebeep/13/.config/gtk-2.0/gtkfilechooser.ini': File exists11:17
ogra/snap/beebeep/13/beebeep: error while loading shared libraries: libxcb.so.1: wrong ELF class: ELFCLASS6411:18
ograso that requires some actual work it seems11:18
Chipacaogra: the elves class war! sounds like a socialist dystopia d&d thing11:19
mborzeckiman, spread suite on f31 is messy11:20
mborzeckiit's like the stuff breaks in most akward ways11:20
mborzeckiquick errand, back in 3011:24
* zyga lunch11:40
mvoChipaca: back now, if you want we can have a quick HO (now or later) about the two grubs/uc20 etc11:41
mvoChipaca: s/now/in 5min/ :)11:41
Chipacamvo: digging into some bugs atm11:42
Chipacamvo: didn't we land a fix to allow snapd in a model?11:42
Chipacain fact this model here has snapd11:42
ogracrap .. the new beepeep will need core18 ...11:47
Chipacaogra: everybody's on core18 these days11:48
pstolowskidoh #2,  x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error"11:48
Chipacapstolowski: _where_ are those coming from?! i got the too, a few days ago11:49
pstolowskiChipaca: https://api.travis-ci.org/v3/job/608640768/log.txt (not restarting it this time ;))11:49
pstolowskiChipaca: seems that those debian-sid tests failed because of that11:49
Chipacayeah11:50
Chipacapstolowski: i've raised it with the store, but please let me know if you see it again (and in what distro)11:51
Chipacait might be a broken CA wotsit on debian, for all i know11:52
pstolowskiChipaca: uhmm. going to restart it again11:53
Chipacapstolowski: k11:53
mupPR snapd#7470 closed: DRAFT: core20 snap install <Created by cmatsuoka> <Closed by cmatsuoka> <https://github.com/snapcore/snapd/pull/7470>11:54
Chipacacmatsuoka: 👋11:56
cmatsuokaChipaca: hello11:56
mvoChipaca: yeah, snapd should work, I think we are at the point now where the next missing piece is the extraction of the kernel11:56
Chipacacmatsuoka: do you know if, as well as the kernel, we need to have the initrd extracted for secure boot?11:56
mvohey cmatsuoka ! good morning :)11:56
cmatsuokamvo: hi. good morning. I just closed #7470 because all parts are handled elsewhere, I hope you don't mind11:57
mupPR #7470: DRAFT: core20 snap install <Created by cmatsuoka> <Closed by cmatsuoka> <https://github.com/snapcore/snapd/pull/7470>11:57
mvoChipaca: my understanding is ( cmatsuoka please correct me if I'm wrong) that the uc20 kernel will be a single file with an embedded initrmafs11:57
Chipacaahhhh11:57
mvocmatsuoka: yeah, thats great11:58
Chipacai was just thinking / remembering the days of single-blob kernel+initramfs (on a floppy)11:58
mvoChipaca: I'm not sure this is the case today though, I need to check11:58
mvoChipaca: haha - it all comes back (what is a floppy btw?)11:58
Chipacamvo: that thing that looks like a vending machine11:58
mvoChipaca: lol11:59
cmatsuokaChipaca, mvo: yes, I think the idea is still to have a single file11:59
Chipacamvo: that was in reference to this, btw: https://mobile.twitter.com/fea0er/status/116009913556906393611:59
mvoChipaca, cmatsuoka I just extracted the pc-kernel snap and it looks like at least today there is still an initramfs :/12:00
cmatsuokaChipaca, mvo: at that time I was probably rebuilding my kernels to avoid using initrds12:00
Chipacacmatsuoka: dhcp in the kernel, but tinyX in the initrd12:01
Chipacahm, let me try something :-)12:03
cmatsuokamvo, Chipaca: I didn't check the latest kernel snap but a few weeks ago it was quite outdated, I had to inject newer versions to run those entropy and crash tests12:06
mvocmatsuoka: thanks, thats good to know12:12
Eighth_Doctorzyga: I filed a bug report about it: https://pagure.io/releng/issue/897712:18
Chipacaok, i'm going out for a bit12:19
* zyga goes to implement the new thing 12:20
Chipacamvo: looks like having an embedded initramfs means recompiling the kernel every time you need to change the initramfs12:24
Chipacait's not just appending one to t'other12:24
mvoChipaca: uh, that will make testing very inconvenient12:24
Chipacayes12:24
Chipacamaybe there's a workaround, none of this is too well documented12:25
Chipacaanyway, i really need to step out for a bit :)12:26
* Chipaca goes, now12:26
zygaEighth_Doctor: thanks!12:26
mborzeckire12:27
mborzeckiEighth_Doctor: so releng is the right place for problems like this?12:28
Eighth_Doctorusually, yes12:28
Eighth_Doctorit means something went wrong when the packages were imported from the Red Hat CDN into Koji12:29
mborzeckiEighth_Doctor: got it!12:29
mvoChipaca: silly question, I thought the uefi grub has regexp build-in, I boot with -bios ...OVMF.fd but I dont't get regexp in my grub. did I misundersttood?12:38
mvoChipaca: anyway, not urgent, need to get lunch first :)12:38
ograhmm ... diddledan do you know anything about the alsa-libs part not working on build.s.io ? seems it stumbles over the ftp url12:39
ograworks fine locally12:39
* pstolowski lunch12:42
ograok, here we go ... switching to http download helps :)12:54
zygamborzecki: back?12:54
mborzeckizyga: yes12:54
zygamborzecki: I added a hack and it works12:55
zygamborzecki: using the dbus api now12:55
zygaI'll run a spread pass now12:55
zygamborzecki: I need to check instances as I'm worried that _ is invalid in scopes12:55
zygabut that's fine, we can escape if needed12:56
mborzeckizyga: _ ?12:56
zygayes12:56
mborzeckizyga: does systemd complain or just mishebaves?12:56
zygamborzecki: I didn't try it yet12:56
mborzeckizyga: ah, ok, so it's written down somewhere, tha's fine then12:57
zygayeah, whatever it is it's okay12:57
zygaI _think_ the situation is somewhat okay now12:57
zygabut12:57
zygaI need to check one last thing12:57
zygais using delegate breaking services now12:57
zygaor not12:57
zygagiven that we tell systemd what we did12:57
zyga(the suspense continues)12:57
ograpopey, the beebeep snap is updated and works so far (it even beeps now!!) but i have a hard time convincing my system to be english for an updated screenshot13:12
ograpopey, mind installing it from --edge and do a screenshot of the window ?13:12
popeysho thang13:12
ogragracias !13:12
popeydoes it use bonjour?13:12
ograyeah ...13:13
ograneeds two machines if you actually want to chat ... and on first start it offers to create a username, pick different ones on different machines13:13
zygajdstrand: around?13:13
ogravoice messages dont work (yet) btw13:14
popeyI once had a train using my phone as an insecure hotspot. Some rando connected to it, and I saw them show up via bonjour in pidgin. I pinged them and said "Yes, it is okay to use my hotspot" :D13:14
zygamborzecki: I think the next step is to implement that in C13:14
popeybonjour is awesome.13:14
zygamborzecki: but apart from that... not terrible?13:14
ograyep ...13:14
ogratoo bad android doesnt support it at all :(13:15
ogra(all my core installs around the house use it (using the avahi snap) but my phone always needs the IP anyway ...13:15
ogramy first snap using "audio-playback" !!13:16
* ogra knows jamie will like that13:17
ografunnily pulse is still autoconnecting ... not sure why13:17
popeyogra: sent you some via telegram13:21
zygaoh drat, I think jamie is off13:22
zygaoh well13:22
=== ricab is now known as ricab|lunch
zygaChipaca: it's odd that one cannot install a classic snap on core with --jailmode13:23
ograbah, since when do we have these silly minimal size restrictions for screenshots !13:24
popeyuse convert to scale it up :D13:24
zygabrb13:28
mborzeckicachio: hey, do we tweak the umask in fedora images for our spread tests?13:30
ograpopey, i used gimp to add a transparent frame :P13:34
ograpopey, anyway, website updated ... i'll promote it to stable now and we should be done13:35
popeythat looks much better!13:35
popeythanks ogra <313:35
popeywill line up a social post13:35
ograbah and now chromium is stuck :P13:36
ograaaand ... promoted13:37
dot-tobiasogra: Is there a way to build a Core image in which only *one* snap is not from latest/stable? E.g. I want all snaps from the normal stable channel, but one snap from other-track/stable.13:42
dot-tobiasrequired-snaps in the model assertion complains about invalid snap names if I use the notation that's allowed in build-snaps, i.e. `snap-name/track/channel`13:43
zygadot-tobias: AFAIK no, known limitation13:43
ogradot-tobias, not sure, i know there was a request to support that a while ago, but i dont know if anything was implemented yet13:44
Chipacazyga: you were working on #1851480, yes?13:51
mupBug #1851480: Hooks are not included in slot/plug label expressions <snapd:New> <https://launchpad.net/bugs/1851480>13:51
zygaChipaca: no, dot-tobias is13:51
Chipacaorly13:52
Chipacadot-tobias: should I set the bug to in progress?13:52
dot-tobiasChipaca: Not really, haven't had the time to start yet. Will ping here once there's something, have to dig into Go + snapd inner workings first13:53
Chipacadot-tobias: should I assign the bug to you?13:54
zygaChipaca: if you set it to in progress then please assign it to someone (dot-tobias)13:54
dot-tobiasChipaca: Yes please, unless there's someone idling around craving to fix this, I'll try to get to it until next week13:54
Chipacadot-tobias: what's your lp nick?13:55
zygadot-tobias: oh, btw, I'll be in US west coast timezone all of next week13:55
zygadot-tobias: and typically busy13:56
zygaI'm always on IRC but if I'm not responding this is probably why13:56
dot-tobiasChipaca: https://launchpad.net/~glancr → or you mean the display name?13:56
dot-tobiaszyga: Good to know, thanks for the heads-up 😊13:56
dot-tobiaszyga, ogra: Thanks for the feedback re ubuntu-image, I could've had a quick look at the ubuntu-image bug tracker before stealing your time: https://bugs.launchpad.net/ubuntu-image/+bug/1815580 → seems to me like --snap my-snap:channel is supported, though one needs to remember to juggle required-snaps in the assertion + --snap args for ubuntu-image13:57
mupBug #1815580: Support for snap prepare-image --snap=<snap>=<channel> <Ubuntu Image:Fix Committed by sil2100> <ubuntu-image (Ubuntu):Fix Released> <https://launchpad.net/bugs/1815580>13:57
ogradot-tobias, yeah ... thats a workaround/hack to overcome the current limitation ;)13:57
mvodot-tobias: just got clarification that core is actually promoted to stable, its just not at 100% rollout yet14:02
dot-tobiasmvo: Ah, great! Helps a lot, thank you for inquiring on my behalf. Much appreciated14:03
cachiomborzecki, no, we don't14:06
ograroadmr, so i got this graph at the top of https://snapcraft.io/snaps ... any idea why my most used snap is not in the list/graph at all ?14:07
ogra(mjpeg-streamer has way more users than any other snap i own but is not listed at all in that overview ... on its own metrics page it is fine though)14:08
mborzeckicachio: pushed the last batch of fixes to #7702, the suite should be able to run succesfully on f31 now14:10
mupPR #7702: tests: adding fedora 31 to google-unstable backend <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/7702>14:10
mvodot-tobias: you're welcome14:10
cachiomborzecki, thanks a lot14:15
=== ricab|lunch is now known as ricab
zygamvo: can we restrict refresh-app-awareness to 18.04+14:27
zygamvo: if so I think this can be done14:28
zygaOR can we backport systemd ;_)14:28
mvozyga: sounds like a question for foundations14:28
zygamvo: then I can rephrase my question as14:28
mvoChipaca: how do you run qemu/kvm to get the uefi grub? or is there a way to know which one was run?14:28
zygamvo: can I really require proper systemd version for this and not implement any hacks14:29
zygamvo: then if so I will focus on that14:29
zygamvo: and we can discuss backport as an option for foundations14:29
zygamvo: but I personally would not cry if it was not on 16.0414:29
mvozyga: I think its a conversation - chances are not that great but its worth a shoot14:29
mvozyga: maybe the relevant bits can simply be backported14:29
zygamvo: the feature is coupled to systemd running as a user session manager14:29
Chipacamvo: i go by the splash screen, but i think you can ask grub, but i'd need to get the efi-able box up to confirm (and i can't access it rn)14:30
zygamvo: aka 16.04 not having that, when that feature was implemented the APIs were created to support that14:30
Chipacamvo: basically, enter grub's commandline and see what "echo $prefix" prints14:30
diddledansupporting such an old release as 14.04 was gonna be painful eventually :-)14:30
Chipacaif it says EFI, it isn't EFI14:30
mvoChipaca: ok, I will poke around - I tried "regexp" iirc and that gave me an error14:30
Chipacamvo: ah, then you're not in EFI14:30
Chipacamvo: you need to copy regexp.mod in as well for that to work14:30
Chipacamvo: (EFI grub has regexp built in)14:30
mvoChipaca: I'm sure I'm holding it wrong, echo $prefix says (hd0,gpt2)/EFI/ubuntu14:31
Chipacamvo: it goes in EFI/ubuntu/i386-pc/regexp.mod14:31
mvoChipaca: but *maybe* I have the uc18 grub14:31
mvoChipaca: let me try to download the focal one14:31
Chipacamvo: the grub on the machine you run ubuntu-image impacts the grub on the image?14:32
Chipacamvo: note it's booting in i386-pc mode afaict (the error should mention it)14:32
Chipacamvo: so you'll need to find that mod, not the amd64 one you probably have14:32
mvoChipaca: I had to build my own pc gadget and I suspect it build it against core1814:32
mvoChipaca: again, thanks, that is good to know14:33
mvoChipaca: ha! I have grub 2.02 but focal has 2.04 so its all my fault14:33
zygamborzecki: check this out14:35
zygamborzecki: the test passes on 64 bit 16.0414:35
zygamborzecki: fails on 32 bit 16.0414:35
zyga?!?!?14:35
zygaon the 32bit it doesn't have AttachProcessToUnit14:35
zygaUnknown method 'AttachProcessesToUnit' or interface 'org.freedesktop.systemd1.Manager'.14:35
zygabut it really really works on 64bit14:36
diddledanzyga: just do it twice on 32bit so you have 64 :-p14:36
* zyga spawns shell to confirm this14:36
zygabut14:36
zygamvo: ^ this might indicate that we're not in hot water14:36
zygaas 16.04 x86_64 is where most of the sweet spot for support starts14:36
zygaor perhaps our 32bit images are old14:37
zygaI'll know soon (tm)14:37
diddledanI imagine the 64bit has a newer version somehow. It certainly seems odd for an API to not exist in a supposedly same release with different bittiness14:38
zygadiddledan: I suspect it's just a fluke in our test image14:40
zygacachio: are 32 bit and 64 bit images for ubuntu 16.04 in sync?14:40
diddledan"computer says no"14:40
cachiozyga, in sync?14:40
zygacachio: I suspect systemd version is different between them14:40
zygacachio: are the packages updated equally14:41
cachiozyga, on Monday both were updated14:41
zygainteresting14:41
zygathanks, I'll know the details soon14:41
cachiozyga, I don't have the details about that update14:42
cachioI know we update && upgrade14:42
cachioand install all the snapd dependencies14:42
mupPR snapd#7683 closed: overlord/ifacestate: remove automatic connections if plug/slot missing <Created by stolowski> <Merged by stolowski> <https://github.com/snapcore/snapd/pull/7683>14:58
zygamborzecki: I went towards uuid named scope15:06
zygamborzecki: this works on 16.04+15:06
zygamvo: is https://bugs.launchpad.net/snapd/+bug/1848567 fixed in 2.42.1?15:12
mupBug #1848567: autogenerated per-snap snap-update-ns apparmor profile may contain many duplicate mount rules causing excessive parser memory usage <aa-parser> <AppArmor:New> <snapd:Fix Committed by zyga> <https://launchpad.net/bugs/1848567>15:12
zygadid you cherry pick that apparmor parser memory fix?15:12
mvozyga: it is15:14
zygata15:15
mvozyga: but we need someone from foudnations to actually approve the SRU :/15:15
mborzeckicmatsuoka: posted some comments under #772315:17
mupPR #7723: snap-bootstrap: create encrypted partition <Created by cmatsuoka> <https://github.com/snapcore/snapd/pull/7723>15:18
jdstrandzyga: I am here now15:18
cmatsuokamborzecki: thanks!15:18
zygajdstrand: hey!15:18
zygajdstrand: so ... so much progress15:18
zyga :D15:18
jdstrandzyga: that is good news :)15:18
zygajdstrand: where do I start, I think the news is indeed good15:18
zygajdstrand: I sent an update to the PR15:18
jdstrandah, I only read backscroll15:19
zygajdstrand: I wanted to ask you how you feel about dbus15:19
zygahttps://github.com/snapcore/snapd/pull/7722#issuecomment-55108617015:19
* cachio lunch15:19
mupPR #7722: cmd/snap-confine: add sc_join_sub_group <Created by zyga> <https://github.com/snapcore/snapd/pull/7722>15:19
jdstrandzyga: let me read. otoh I have a comment, but let me read what you have15:19
zygajdstrand: tl;dr; we cannot do the move but we can ask systemd to do the move by calling a dbus methodf15:20
zygathat's all, I'll let you read the details15:20
jdstrandzyga: right15:21
jdstrandzyga: oh, heh, that comment is basically backscroll :)15:22
mvoxnox: can I build a new pc gadget with core20 ? I think you did a build against core18 but that means we have grub 2.02 without regexp in there which will not work with the latest grub.cfg that john added15:22
* jdstrand reads patch15:23
zygajdstrand: the API exists on 16.04+15:23
zyganot on 14.0415:23
zygajdstrand: the patch in the -wip branch does the two-way dance (with attach as a fallback) but I since reworked it15:24
jdstrandI think that is ok with how we defined 14.04 support15:24
zygajdstrand: to spawn a new scope each time15:24
zygajdstrand: with uuid inside15:24
jdstrandbut let me keep reading15:24
zygajdstrand: yes, I'm happy with that, 14.04 is ok15:24
zygaok15:24
mvoChipaca: I get a uc20 that boots now \o/ with your grub.cfg. it hangs in initrd but thats ok :)15:25
zygajdstrand: for the dbus call I was thinking to use sd-dbus C API, since we link to libudev which is a differently-named version of systemd it is not a new dependency15:26
jdstrandzyga: hehe, busctl15:27
zygayes :D15:27
zygatake that security15:27
zygalet's system() out to busctl15:27
zyga:D15:27
jdstrand\o/15:27
zygabut it helped to prototype this15:27
jdstrandok, more seriously15:27
jdstrandof course :)15:27
jdstrandso, it is super validating that my interpretation of that page was reasonable and my highlevel idea is what upstream recommends, even if I didn't precisely know how to do it ;P15:28
jdstrandthis isn't options 1-3 though15:29
jdstrandanyhoo15:29
jdstrandcool that there is a way with systemd15:29
mvosil2100: hey, I noticed its your SRU day, can I ask you to review the 2.42.1 SRU in unapproved please :) ?15:30
jdstrand(it is sorta 3 I guess)15:30
jdstrandok15:30
* zyga checks the 1-3 list again15:30
jdstrandzyga: it doesn't really matter. what I had forgotten and you reminded me today and yesterday is dbus is required15:31
zygajdstrand: there's one more cool thing there that I could mention15:31
jdstrandplease do15:31
zygajdstrand: systemd has a concept of a controller15:31
zygajdstrand: I'm not 100% sure how this is meant to be used15:32
zygabut15:32
zygajdstrand: you can have a unit that a controller watches over15:32
zygajdstrand: and it will tell you when it wants to wrap it up cause the job died15:32
zygajdstrand: and I was wondering if that's like notification for us15:32
jdstrandoh15:32
jdstrandyeah15:32
jdstrandinteresting15:32
zygajdstrand: but before I would go there I'd have to check more15:32
zygajdstrand: it's not documented, I read most of what I found by reading systemd directly15:32
* jdstrand nods15:32
zygajdstrand: there's a property on a scope15:32
zygajdstrand: controller15:32
zygajdstrand: it's not a cgroup controller15:33
zygajdstrand: it's a dbus path of the place you can call15:33
zygajdstrand: and it calls it with one method, RequestStop or something like that15:33
zygajdstrand: it _smells_ like something reaching into a container via a container manager15:33
zygajdstrand: but I think we don't need to rely on that15:33
zygajdstrand: just found it interesting15:33
zygajdstrand: to answer your earlier question15:34
zygajdstrand: this is mode 1 a15:34
jdstrandzyga: it makes sense> you put everything in places so systemd could track. it has a way to tell you about what it is tracking. that would obviate the need for the parsing code15:34
zygajdstrand: which is the :-) (happy face) variant15:34
zygajdstrand: I was thinking we _might_ keep the parsing code15:34
mborzeckiChipaca: you're interested in nonce logs?15:34
zygajdstrand: until snap-confine can be told it's starting a service15:35
Chipacamborzecki: sure15:35
zygajdstrand: then we could only do the scope for user commands15:35
zygajdstrand: and not for services where it is ... weird15:35
jdstrandzyga: maybe that is what nspawn uses </guess>15:35
mborzeckiChipaca: https://paste.ubuntu.com/p/wMr9Wq66BB/15:35
zygajdstrand: and I think this makes sense in more ways actually15:35
zygajdstrand: because it means all kinds of workloads are managed by systemd now15:35
zygajdstrand: services, user services, non-service apps and hooks15:35
zygajdstrand: each one is understood by systemd as a thing15:36
zygajdstrand: we could even feed it with unit level meta-data15:36
zygajdstrand: like Description15:36
zygajdstrand: man page references15:36
zygajdstrand: perhaps we could even reference snaps or whatever, I'd have to check15:36
zygajdstrand: since we make a dbus call and we can populate anything that a scope unit can model15:36
jdstrandzyga: ok, so as exciting as this is, I have some reservations about dbus, but I think we may be able to mitigate those concerns. hear me out (I'll type .. when done)15:37
zygajdstrand: understood15:37
jdstranda) calling dbus from snap-confine is going to bring a significant attack surface into snap-confine in terms of addressable apis in the address space15:38
jdstrandb) calling dbus is going to bring some likely undesired rules into the apparmor profile15:38
xnoxmvo:  so the pc-gadget in launchpad is built againt focal, with focal binaries. I can retrigger that, download, unsquashfs, sed core18 to core20 and release into the store15:38
xnoxmvo:  despite declaring core18, all binaries inside it are from focal15:39
jdstrandc) the combination of a and b is likely going to weaken the security posture of our hardening (primarily apparmor, but see address space)15:39
ograxnox, cheater !!! :)15:39
jdstrandd) having a dbus call in the list of things we do is going to really slow things down. not a big deal for a service, but for a non-daemon, yikes15:40
xnoxogra:  i only am blocked on IS to deploy my launchpad-buildd changes, and for my launchpad UI branches to be merged and deployed by webops.15:40
jdstrand(now to the mitigations)15:40
xnoxogra:  it's not like i didn't do everything to fix our infra to do the right thing properly first.15:40
* ogra hugs xnox ... i wasnt serious :)15:40
zygajdstrand: as a remark, a, b and c *might* not be needed if I can make it work from snap-run before setuid happens15:41
jdstrandreading the patch, I was happy to see that we first create the scope and then slice based on the security label15:41
jdstrandif that is the full label with command name, potentially not as nice15:42
zygascope/slice? there's only scope, the slice is what we got originally15:42
zyga(as in given to us by systemd)15:42
jdstrandI was happy cause I thought, ok, the first command invocation was slow, but then we can just add stuff ourselves, which is fast15:43
jdstrandbut then you said to add stuff, we need the second api15:43
jdstrandzyga: I said slice trying to use systemd parlance, but might've mispoke. I meant the scope ends up being a branch and the security label a leaf15:44
zygayes, that's correct15:44
jdstrand(back to soliliquy)15:44
jdstrandand the second api requires a dbus call, so every snap command invocation needs the calls15:45
jdstrandso (I15:45
jdstrand'm getting there)15:45
jdstrandthe first thought is, have a snap-dbus-helper in go that snap-confine calls out to15:46
jdstrandwe can profile transition to it and alleviate the setuidness/address space/expanding policy issues15:46
jdstrand(a-c)15:46
jdstrandif we fork/exec this we don't have to wait on it. we let it do its thing and perform the move any time later15:47
jdstrand(d)15:47
xnoxmvo:  i think i will take your PR and push it into the store15:48
jdstrandthe snap run idea is interesting as well. we can discuss the merits of that15:48
jdstrand..15:48
zygaso I think that's the thing to investigate now15:48
zygamy thinking is as follows:15:48
zygasnap run checks if a service is being started15:49
zygaif so, nothing new needs to happen15:49
zygawe can use existing systemd cgroup machinery for services to find what we need15:49
zygaif this is not a service or it is a hook then we call the dbus api from go and move snap run to a new scope with UUID + snap security tag in the name15:49
zygasnapd side we can differentiate those and scan /sys/fs/cgroup/{,systemd}15:50
zygain both cases holding a lock we can build the security-tag -> definitely-not-running data set15:50
zyga(and if possibly running we know the PIDs that existed at the time)15:51
zyga..15:51
zygaoh and perhaps as a side note, I would not go and optimize the dbus part until we know how much it really costs15:51
jdstrandzyga: it is 100 going to cost. feel free to measure it15:51
jdstrand100%15:52
jdstrandhow much, I don't know15:52
jdstrandbut, in theory, this can happen asynchronyously15:52
jdstrandit easily measurable, but don't do the measuring with busctl15:53
jdstrandit's*15:53
jdstrandso, does this api work with user sessions?15:53
jdstrandzyga: I would be surprised that a non-root process could move itself to a new leaf15:54
zygazyga@eoan:~/go/src/github.com/snapcore/snapd$ time busctl --user call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager StartTransientUnit 'ssa(sv)a(sa(sv))' testing.$(cat /proc/sys/kernel/random/uuid).scope fail 1 PIDs au 1 $BASHPID 015:54
zygao "/org/freedesktop/systemd1/job/787"15:54
zygareal0m0,010s15:54
zygauser0m0,006s15:54
zygasys0m0,003s15:54
jdstrandwhich would be required with snap run15:54
zygait can if all the permissions match15:54
zygathe pid is the same as the invoker and owner of the unit15:54
jdstrandzyga: the permissions being the uid/gid on the leaf?15:54
zyga(since you can move to a service as well)15:54
zyganot on the leaf, on the unit15:55
zygascopes have no oner15:55
zygasince they are crated dynamically and are injected relative to where you are15:55
zygaafter I invoked that call I got move tod:15:55
zyga0::/user.slice/user-1000.slice/user@1000.service/testing.ba4454d6-0242-49ac-864e-e6ab1d6c2fb4.scope15:55
zyga*moved to15:55
zygatry it15:55
jdstrandzyga: ok, so that would mean the scope would need to be per command, and per command per uid owner, no?15:55
zygano root needed15:55
zygathere's a per command scope, yes15:56
zygamy point is that the owner of each scope matches the invoker because that's the only way to have a scope15:56
zygathere's no unit for a scope file on disk15:56
jdstrandzyga: how do you calculate the uuid?15:56
zygaI ask the kernel for one, look at the command above15:56
jdstrandthat's another thing that would block in low entropy scenarios15:57
jdstrandcould*15:57
zygayes, alternative is to just use a counter15:57
zygajdstrand: but I wasn't sure what is doing the counting15:57
jdstrandwell, not block, but I guess this isn't a security mechanism15:57
zygafor things like sessions or systemd-run15:57
zygaa counter would be preferred if we can count reliably15:57
zygabut that might imply we need to maintain the counter in snap confine15:58
zygaalternatively perhaps we could open a tmp file on /run/snapd/counters15:58
zygaand the inode of that file is the value15:58
zygabut ...15:58
zygano ... that is broken15:58
zygaanyway, I think uuid is "good enough" to proceed15:58
jdstrandzyga: can you mockup the series of 0::s from the /proc/pid/cgroup for when a snap daemon starts, then a snap command is started twice by the same user and then a snap command is started once by a different user?15:59
zygayeah, hold on16:00
* jdstrand wants to visualize the end result to make sure we are on the same page16:00
zyganote that it depends on "where" the user is16:00
zygain particular it differs if I run firefox from the dock16:00
zygaor run it from the terminal :)16:00
zygaI'll show you16:00
jdstrandzyga: sure, mix two calls from the dock and one from the terminal in16:00
jdstrandzyga: (this would likely turn into a requested code comment ;)16:01
jdstrandzyga: while you are doing that, it means that dbus must be up and running before a snap can be started (unless we fork off). that is perhaps fine since systemd probably needs it itself early on, but a consideration nonetheless16:03
zygajdstrand: indeed, I think there is a way to depend on it though16:03
zygaI mean16:03
zygait's socket activated16:03
zygaso no need to really16:04
* jdstrand is trying to think through side effects16:04
jdstrandpotentially will slow down the first thing that is started, but shouldn't be a concern16:04
jdstrandzyga: I'll also say, this is probably not something that we can land in master before the sprint due to time constraints, measuring, etc. however, I think that mvo would be able to speak to this well. eg, "lots of investigative work was done and the probably is now fully understood. there were systemd interactions that complicated things, and we wanted to ensure we implemented something robust. until16:08
jdstrandlast week, everything was brittle, but now we know the methodology to use (confirmed with upstream) and we are working through the most performant and robust design. we should have that in the next week or so. I16:08
jdstrandWhile we missed the roadmap item, I16:09
jdstrand'm pleased with the work and the solid direction"16:09
jdstrandor similar16:09
jdstrand:)16:09
jdstrandif it were me, I would handle it that way. it isn't my call though16:09
jdstrandwhat is my call is letting you know that I'm concerned about rushing this. we should get Samuele signoff imho16:10
jdstrandmvo: fyi ^16:10
zygafirefox started from gnome shell: 0::/user.slice/user-1000.slice/user@1000.service/testing.cbdc667d-d3e6-4246-8ecb-7461ba346f51.scope16:11
jdstrands/probably/problem/16:11
zygavarious programs started from the shell:16:11
zyga0::/user.slice/user-1000.slice/user@1000.service/testing.cd8f04c3-56d2-425a-a74a-0693440a78a3.scope16:11
zyga0::/user.slice/user-1000.slice/user@1000.service/testing.dd2b526f-379f-465c-a704-10eb243fa991.scope16:11
zyga(all as my user)16:11
zygaodd, this is fedora 31, I think I noticed that it used to have some more variance before16:12
jdstrand(please show the leaves as well16:12
jdstrand)16:12
jdstrandzyga: this might be better understood in a pastebin16:12
zygayeah, I'll collect it, sorry for pasting in-the-middle work16:12
mvojdstrand: in a meeting, will read backlog16:12
zygathe leaves are owned my my user16:12
zyga[zyga@fedora31 ~]$ ls -ld /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/testing.dd2b526f-379f-465c-a704-10eb243fa991.scope16:13
zygadrwxr-xr-x. 2 zyga zyga 0 11-07 17:01 /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/testing.dd2b526f-379f-465c-a704-10eb243fa991.scope16:13
jdstrandno worries. I want to be able to see all of it so we can discuss by referencing line numbers16:13
zygaok16:13
jdstrandzyga: ftr, I'm *very* encouraged by this as an overall concept. how we iron out the details of the concept is all we're talking about16:14
jdstrand(ie, the scope/delegate/dbus bits)16:14
jdstrand(the snap run bits are the details :)16:14
jdstrand(or snap-confine, etc, etc...)16:15
zyga0::/system.slice/sleep.service <- a regular service16:15
* zyga collects everything16:15
jdstrandthanks16:29
ijohnsonhey marcustomlinson, is it okay if I adopt your patch at https://github.com/snapcore/snapd/commit/49114d576feb371a27fa4c0d5074dfa487aab358 to merge into snapd? I will need to refactor it a bit before we can merge it likely, and we can't use the 3rd party dep you have there, but this is great work and I would like to see it merged into snapd (as well as use it more for snap startup performance investigations)16:30
ijohnsonif you'd like I can just add commits on top of your commit in a branch, or I could just make a new commit with your changes there and provide attribution in the commit message/PR description16:31
marcustomlinsonijohnson: either is fine, I don't mind :)16:31
marcustomlinsonijohnson: and yes please! go ahead16:31
zygajdstrand: so I have a little bit16:34
zygahttps://www.irccloud.com/pastebin/mlAOGSGg/16:34
jdstrandzyga: fyi, my comment in the pr without putting any time constraints on you: https://github.com/snapcore/snapd/pull/7722#issuecomment-55115904916:36
mupPR #7722: cmd/snap-confine: add sc_join_sub_group <Created by zyga> <https://github.com/snapcore/snapd/pull/7722>16:36
zygajdstrand: I'm nearly convinced this doesn't need to be in snap-confine16:36
zygajdstrand: I'll try to move this to snap run16:37
zygajdstrand: with uuid and stuff16:37
zygajdstrand: 0 changes to snap confine would be a sweet deal out of this work16:37
jdstrandzyga: ok, so with this you are skipping the security label16:39
zygajdstrand: yeah, I think so16:39
zygajdstrand: well,16:39
jdstrandzyga: that is one of the things I wanted to get on the same page about. I was still thinking there would be a leaf16:39
zygajdstrand: given where we've been so far I think it's hard to say so for sure ;-)16:39
* jdstrand nods16:39
zygajdstrand: the leaf is the scope here, no/16:40
jdstrandzyga: what is happening at line 15? the ls seems to contain the same thing as the new scope16:42
zygain line 15 I just check the ownership of the scope16:42
ijohnsonmarcustomlinson: great, thanks!16:42
zygain line 12 I read it16:42
jdstrandoh, I missed -d16:42
zygait's printed on line 1316:42
jdstrandsorry16:43
zygano worries :)16:43
jdstrandzyga: remind me, StartTransient unit with Delegate is enough to keep systemd happy and for us to track?16:47
zygawithout delegate16:47
zygadelegate was needed to be able to move a process there later16:47
jdstrandI was trying to read backscroll and lost track of that16:47
jdstrandah right16:47
zygabut given that it dependso n more recent systemd and using an uuid is good enough I don't think we need to use that16:47
jdstrandthis is purely for tracking and don't need to move16:47
zygaso just starting a transient unit of type scope with snap-run PID16:47
zygayes16:48
zygawe could even leverage that in hooks16:48
zygawhere we "try" to kill hooks that are long running16:48
zygabut now we can really actually stop them16:48
zygareliably16:48
jdstrandzyga: and the real thing my do s/testing/snap-run/ (or something)16:49
jdstrandmight*16:49
jdstrand(for the scope name)16:49
zygaare you asking about the scope name to use for real?16:49
jdstrandyes16:49
jdstrandor were you thinkg the security label?16:50
zygaI think it should be f($SNAP_SECURITY_TAG), something like snap.PKG{,.hook}.NAME.$UUID16:50
jdstrandok16:50
zygawe can shuffle those around to look nice16:50
zygabut I think it's a good start16:50
zygaand as I mentioned earlier, only for non-service apps and hooks16:50
zygaservices are good to go as is16:51
jdstrandzyga: with this, every command invocation gets a new uuid. when are these cleaned up? will systemd be able to handle potentially thousands of these?16:51
zygathey are automatically cleaned by systemd16:51
zygaI can try how it scales16:51
jdstrandI think we'd need to understand that with the uuid approach16:52
jdstrandzyga: not saying we need to be thinking like this, but, it would seem ok if the best implementation used newer systemd features. we could downgrade from one to another but more I was thinking perhaps systems without a new enough systemd don't get the feature16:53
jdstrandzyga: thinking being, this is mostly handy for desktop, and desktop tends to keep moving forward16:53
mvozyga, jdstrand still in a meeting - but if we have dbus in the hot path of starting snaps we should probably get some sense how fast/slow this is, i.e. if it makes starting snaps slower16:53
jdstrandanyway, just something for back of mind16:53
zygagiven that this is supported in 16.04 I think it's a good idea as-is16:54
jdstrandzyga: I was more talking if the uuid approach wasn't as great as it could be, but we aren't there yet16:54
zygajdstrand: ah16:54
zygaI see16:54
zygajdstrand: I ran 1000 commands this way and they are not in sysfs anymore16:55
jdstrandmvo: yes. we discussed that and agree it needs to be measured. there are options that might allow us to fork and move on and let the child do the dbus stuff asynchronously16:55
jdstrandmvo: not sure how that would work with the current 'as of this minute transient unit via snap run' thinking, but yes, we agree it must be looked at16:56
zygajdstrand: we could send the method and perhaps not wait for the reply16:57
jdstrandzyga: those were command that exited though. how about 1000 sleep 600 commands?16:57
zygajdstrand: but something of this kind, it's really a message dispatch16:57
zygajdstrand: you read my mind :)16:57
jdstrandzyga: I16:57
jdstrandmeh16:57
zygajdstrand: though I did a sleep $i instead ;)16:57
jdstrand(different keyboard)16:57
jdstrandzyga: I'm assuming they exited that is16:57
zygajdstrand: yep16:58
zygajdstrand: while they are running you can see them16:58
zygahttps://www.irccloud.com/pastebin/KdUgFNrZ/16:58
jdstrandzyga: yeah, send and forget is perhaps good enough. I wonder how that command can fail (and we therefore lose track of a pid)16:58
zygathey even can be checked16:58
zygajdstrand: well, it's either that or wait :)16:59
jdstrandzyga: well, if we fork, the child can wait and retry16:59
zygaand if that fails?16:59
jdstrandthen we lose it17:00
zygasure but at some point: 1) you are failing but the app is running 2) the app is running untracked17:00
jdstrandit could be seen as best effort in that regard17:00
zygayep17:00
zygathough I would not go there initially, we need to see how it works still17:00
mupPR snapcraft#2782 closed: snapcraft: introduce click-based YAML configuration file support <Created by cjp256> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2782>17:00
jdstrandwhich by far most of the time would be great17:00
zygajdstrand: re cgroups, they are cleaned up as the scopes become empty17:00
jdstrandzyga: right, so the thing exits, systemd sees the last one left, it removes the scope. makes sense17:01
zygajdstrand: there's one reason we might want to use a delegate though17:01
zygajdstrand: using a delegate we could have another leaf level17:02
zygajdstrand: and attach eBPF programs there17:02
zygajdstrand: perhaps we will have to for device cgroup17:02
jdstrandzyga: I wonder how well that works with name=systemd since, aiui, they woul dhave to poll the cgroup.proc file rather than listen on cgroup.events in v217:02
jdstrandzyga: also for the cpu/mem discussion yesterday17:03
zygajdstrand: for cpu/mem it is relevant17:03
zygajdstrand: we cannot do that according to systemd rules17:03
zygajdstrand: you cannot write to anything that you are not a delegate of17:03
zygajdstrand: you can ask systemd to change properties of existing scopes/services17:03
jdstrandzyga: but maybe we just use systemd apis to control systemd's cpu/mem handling?17:03
zygajdstrand: but not externally by poking at sysfs directly17:03
jdstrandright17:04
zygayes, I think that's good if we can do that17:04
* jdstrand nods17:04
zygabecause the alternative is that we do use delegates for services17:04
jdstrandexactly17:04
zygai.e. have a slice (not a scope)17:04
* jdstrand nods17:04
zygaand put Delegate=snaps.slice17:04
zygaand then inside that be system manager and handle things17:04
zygabut I think ... that's systemd's job17:04
zygas/system/service/17:04
jdstrandright. we are trying to play nicely with it and leverage it, so why not for this too?17:05
jdstrandit does mean we are probably forever coupled to systemd17:05
jdstrandit is imaginable for an alternative init to be used with what we have now (service management, timers, etc)17:06
jdstrandeven if that is a heap of work17:06
jdstrandthis talks us a bit farther down the systemd path17:06
jdstrandtakes*17:06
zygajdstrand: yes, but perhaps to good effect,17:06
jdstrandI may not have slept enough last night ;)17:06
zygajdstrand: for instance killing hooks was sys-v init style17:07
jdstrandzyga: oh for sure, just calling it out. not a blocker17:07
zygaI think I'll wrap up for now17:08
jdstrandzyga: a property I like about snap run is that the correct user is doing the dbus call17:08
zygait's 18:00 and I want to not repeat yesterday17:08
zygaand you are right this won't land before the sprint17:08
jdstrandzyga: a property I like about snap-confine is it is in a position to organize things rigidly17:08
jdstrandzyga: food for thought17:09
zygahmm, now that I think of it17:09
jdstrandzyga: this was *super* interesting and fruitful17:09
zygaI think as a user I got a polkit prompt from the shell17:09
jdstrandohh....17:09
zyganeed to double check that17:09
jdstrandthat is important. that is cached17:09
zygawait, I'm dumb17:10
jdstrandzyga: if snap-confine is back on the table, I think I feel quite strongly we need a helper and that be written in go17:10
jdstrand(not saying it is)17:10
zygano prompt17:11
zygaI was passing --system :D17:11
jdstrandjust for back of mind17:11
zygahttps://www.irccloud.com/pastebin/8wRREiYV/17:11
zygaI'll double check that on ubuntu with v117:11
zygasame17:11
* jdstrand nods17:11
zygano prompt17:11
jdstrandyeah, come to think of it17:11
zygaso it can safely live in snap-run17:12
jdstrandyou wouldn17:12
jdstrandt need polkit for --user (duh) and it is also ok for the unconfined user to call the apis that systemd exports. moving this down doesn't affect the properties of the resource limits...17:12
jdstrandand snap run is pre confinement17:13
jdstrandwell, except when it isn't (snap calling snap)17:13
zygajdstrand: snap calling snap is semi-supported17:13
jdstrandthere might be more to investigate there17:13
zygajdstrand: I don't know what actually relies on it nowadays17:13
jdstrandyeah17:13
zygajdstrand: and apart from that, it only works in devmode17:13
jdstrandbut we should understand the implications17:13
zygajdstrand: as otherwise snap-confine cannot reassociate with pid-1 mount ns17:14
zygajdstrand: so in strict mode it is refused anywa17:14
jdstrandalso, make sure that classic doesn't have any gotchas17:14
zyga*anyway17:14
zygajdstrand: I _think_ it doesn't17:14
zygaI mean, classic is not affecting this in any way as far as I can see17:14
jdstrandzyga: yep, thanks so much for the work and discussion. we'll definitely pick this up, next week if not sooner17:14
zygajdstrand: tomorrow I'll focus on making snap-run do this via go-dbus17:15
jdstrandzyga: sure. a classic snap can call sddbus itself. anyway, just thinking through pain points and things to document17:15
zygajdstrand: both in a standalone PR and in a wip PR with the snapd side using it17:15
jdstrandzyga: have nice evening :) have a beer or do something fun. I think we cracked the overall approach :)17:16
zygaI think so17:16
zygaI don't know if I have any at home :)17:16
zygabut I plan to see what the family is up to upstairs17:16
=== pstolowski is now known as pstolowski|afk
jdstrandthis might be cause to leave the cave17:17
zygathank you for your focus, attention and wisdom :)17:17
zygahaha17:17
zygayes17:17
jdstrandzyga: back at you :)17:17
jdstrand(and thanks!)17:17
zygasee you tomorrow or if we miss each other somehow at the sprint next week :)17:17
jdstrandsounds good. take care17:17
zygao/17:17
* zyga EODs17:17
zygajdstrand, mvo: I wrote down the implementation plan on https://github.com/snapcore/snapd/pull/7722#issuecomment-55117937717:23
mupPR #7722: cmd/snap-confine: add sc_join_sub_group <Created by zyga> <https://github.com/snapcore/snapd/pull/7722>17:23
zygaI didn't include things like testing and measurement because I want to EOD but I agree those will happen17:24
jdstrandzyga: for when you come back online. when thinking about the benefits of snap run, lets also consider what is required for device (and freezer) cgroup (equivalents) going forward. ie, perhaps that means snap-confine calling a helper is better to have a uniform approach going forward (or not, just don't want you to do snap run only to realize we maybe didn't think that all the way through with future work)17:24
zygajust wanted to write it down while fresh17:24
jdstrandah, heh17:24
zygaha17:24
zygafreezer can go away at some point via new mount api17:24
zygain pure v2 we should just really assume you have matching kernel and use new syscalls17:24
zygadevices are more complex because they require (helper or not) eBPF attached to cgroup17:25
zygawe cannot do that unless we ask for delegate unit17:25
jdstrandthat perhaps makes sense17:25
zygathere's some special handling that happens then17:25
jdstrandright17:25
zygabecause the eBPF programs systemd itself uses are added with different mode17:25
mvozyga: yeah, lets discuss more tomorrow, get some rest :)17:25
zygaso that all programs run (aka multi mode)17:25
jdstrandmy ony point is if we know that, and we know what that will sorta look like, maybe we look at tracking through that lens17:25
jdstrandanyway, enjoy your evening :)17:26
zygaI think we can use helpers or bake it into snap* but it needs the delegate "hop" at some point17:26
zygabut that's a good observation that we can align on this for other features17:26
zygamvo: yeah, :)17:26
* zyga really EOD now17:26
jdstrandmvo: are you out of your meeting?17:26
mvojdstrand: yes17:29
jdstrandmvo: hey, so that is a lot of backscroll. let me get you the most important thing for next week (outside of the comments in the PR we made in the last day)17:34
mvojdstrand: thats super nice of you, thank you!17:35
mvojdstrand: I will have dinner now but you can mail or /msg me the important bits if that is ok17:36
jdstrandmvo: a) I think we want pedronis to review this and b) https://paste.ubuntu.com/p/7HdCp9p9K5/17:37
jdstrandmvo: that is fine. enjoy dinner17:37
mvojdstrand: thank you!17:37
mvojdstrand: yeah, thanks for the pastebin, I think thats a reasonable answer. will you be in vancouver?17:37
jdstrandmvo: meh, in the paste: /the probably/the problem/17:38
jdstrandmvo: I will17:38
jdstrandmvo: I have limited availability tomorrow (similar to today; front loaded the week with work)17:38
jdstrandmvo: but in Vancouver next week and zy ga and I will continue to discuss this17:39
mvojdstrand: excellent!17:40
* Chipaca EODs18:37
* cachio afk19:19
mupPR snapd#7724 closed: cmd/snap-confine: tracking processes with classic confinement <Created by zyga> <Merged by zyga> <https://github.com/snapcore/snapd/pull/7724>19:33
blake_rhaving issue where calculating the version of the maas snap is failing now with snapcraft22:46
blake_ri now see in the logs22:46
blake_rfatal: not a git repository (or any of the parent directories): .git22:47
blake_rfatal: not a git repository (or any of the parent directories): .git22:47
blake_rsome reason the .git directory is no longer being copied into the VM22:47
blake_rusing just source: .22:47
blake_rwith no source-type defined22:47
blake_rany ideas on why that is occurring now, when it didn't happen before22:47
blake_rsergiusens: ^22:48

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!