/srv/irclogs.ubuntu.com/2019/03/06/#snappy.txt

mwhudsonhm00:20
mwhudsoni thought as a developer of a snap i could download it by revision?00:20
mwhudsonah https://forum.snapcraft.io/t/as-a-snap-owner-not-able-to-download-a-snap-by-revision/10062/200:23
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
mborzeckimorning05:56
mborzeckinew kernel 5.0.0-arch1-1-ARCH06:08
mborzeckia lot of ubuntu-16.04-32 prepare jobs failed06:37
mborzeckimvo: morning07:10
mvohey mborzecki ! good morning07:16
mborzeckii'll be out for a while, left a note in the forum07:19
mvomborzecki: thanks for letting me know07:21
mvomborzecki: s/me/us/ :)07:21
mborzeckimvo: sure07:22
mborzeckimvo: i've restarted some travis jobs, seems like ubuntu-16.04-32 was reaching a kill timeout in prepare07:22
mborzeckibut i'd guess it's repos being slow07:23
=== chihchun_afk is now known as chihchun
mupPR snapd#6569 opened: tests: check that apt works before using it <Created by mvo5> <https://github.com/snapcore/snapd/pull/6569>08:01
pstolowskiheyas08:03
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
mupPR snapd#6570 opened: snapstate: only keep 2 snaps on classic <Created by mvo5> <https://github.com/snapcore/snapd/pull/6570>08:20
pedronismvo: hi, I created a card about that ^08:29
pedronismvo: see bottom of upcoming08:30
mvopedronis: thanks08:31
mvopedronis: I added the PR to the card08:39
pedronismvo: I'm not seeing it08:40
mvopedronis: hm, trello acted up, should be there now08:43
pedronismvo: yes, probably the if it's kept open for too long it needs a reload (sometimes)08:44
mvoyeah, I think that was what happend08:44
mvo(reload "fixed" it)08:44
=== tobias is now known as Guest42681
pedronismvo: there's  a lot red in tests09:19
pedronisanything clear about why?09:19
zygagood morning09:20
mvopedronis: yes, working on it - 6569 should fix it09:22
mvohey zyga - good morning09:22
pedronisah09:23
zygahey, sorry, long night,  starting late to be awakee09:24
zygamvo: I replied to https://github.com/snapcore/snapd/pull/649809:25
mupPR #6498: cmd/libsnap: add cgroup-pids-support module <Created by zyga> <https://github.com/snapcore/snapd/pull/6498>09:25
zygaoh, tests are red today09:25
mvozyga: thanks, I see - yeah, +1 then on the PR. thanks for explaining the difference09:26
zygago.googlesource.net 502 :/ https://www.irccloud.com/pastebin/dHeNm5vD/09:27
zygamvo: we use the freezer to track snap-wide scope and  pid to track security-tag scope09:27
zygamvo: in v2 we can  design a nicer hierachy where  snapd/foo.snap/bar.app/ is used, for example09:28
mvozyga: 6569 should make tests green again09:29
zygafun :)09:29
zygathank you09:29
zygalast night was hours and hours of homework09:30
zygafollowed by some more hackng but I finished late after midnight09:30
zygamvo: wow, thank you for https://github.com/snapcore/snapd/pull/657009:33
mupPR #6570: snapstate: only keep 2 snaps on classic <Created by mvo5> <https://github.com/snapcore/snapd/pull/6570>09:33
mvomy pleasure09:33
mborzeckizyga: i think we need to have a package that wraps calls to snap-seccomp09:33
mborzeckizyga: added some code to interrogate snap-seccomp when building the system-key and it's a bit awkward09:34
zygamborzecki: can you tell me more about this idiea09:34
zyga*idea09:34
zygamborzecki: I _may_ have something better soon09:34
zygamborzecki: but for 2.39 at earliest09:34
zygamborzecki: snap-seccomp won't need to exist as a binary anymore09:35
mborzeckizyga: ah, your custom bpf compiler? :)09:35
=== tobias is now known as Guest33668
zygamborzecki: just really a super simple assembler09:35
zygamborzecki: all I need is the syscall tables now09:35
zygamborzecki: the advantage is that we have less C code, no need for a standalone binary and one less  depednency09:36
zygamborzecki: given that we use snap-seccomp for a very simple task it is not hard to reproduce that09:36
zygabut anyway, let me know  more about your current idea09:37
mborzeckizyga: ho?09:37
zygamborzecki: sure, gimme a sec09:37
zygamborzecki: I'm in standup09:38
mborzeckizyga: joining09:38
mvomborzecki: hey, what was the outcome of the parallel install gnome discussion yesterday?09:38
mborzeckimvo: i did no see anything off int he mounts, also couldn't reproduce that locally09:39
mborzeckimvo: when ken discarded the mount ns and run the snap again, everything was ok09:39
mborzeckimvo: so either some sort of race, or soemthing nonobvious in mount ns setup09:40
mvomborzecki: hm, ok - and also worrying we should try to get to the bottom of this, I have the feeling it will come back09:40
pedroniszyga: I did a pass on #650209:47
mupPR #6502: dirs,overlord/snapstate: add Soft and Hard refresh checks <Created by zyga> <https://github.com/snapcore/snapd/pull/6502>09:47
zygapedronis: thank you! I will iterate on it now10:02
zygamvo: hey, we figured out why mborzecki's branch is failing10:02
mvozyga: tell me more please10:02
zygamvo: well, partially figured out: it is due to the service that bootstraps snapd from snap10:02
zygamvo: we run the compiler before snapd.snap is installed10:02
mborzeckimvo: i had the a quick and dirrty install gedit_master && run && remove gedit_master gnome-... gtk-common-themes loop running for a while, but was not able to reproduce the problem10:03
mvozyga: btw, any idea about why the namespace reset yesterday helped with the gnome issue yesterday?10:03
zygamvo: so a quick question: how does the service operate? where is the snapd.snap mounted during the bootstrap process?10:03
zygamvo: oh? I don't know anything about that10:03
zygamvo: I recall some people discussing snap-discard-ns but not sure if that's the topic you refer to10:03
mborzeckizyga: https://irclogs.ubuntu.com/2019/03/05/%23snappy.html ~16:2510:04
mvozyga: when snapd is run it will bootstrap itself, i.e. it will read seed and perform the actions10:04
mvozyga: so the bootstrap is literally just "mount snapd snap, run snapd and let it run"10:04
mvozyga: once the snapd snap is installed by the snapd binary it will restart itself and all is well defined10:04
zygamvo: right, but before seeding backends will initialize, snap-seccomp will be invoked from a path that doesn't (apparently, this is still a theory) does not exist yett10:04
mborzeckimvo: when snapd is run, snap-seccomp will be in the same directory as /proc/self/exe of snapd, right?10:04
mvomborzecki: yes10:05
mvomborzecki: we actually should run snap-seccomp always from that dir, no?10:05
mborzeckimvo: yes, just confirming things10:05
mvocool10:05
zygaI see the conversation now: interesting, I would have to check some things10:05
mborzeckimvo: seccomp backend initialization calls to snap-seccomp, we have a feeling that this fails, so backend fails to initialize and things break down10:05
zygaperhaps interplay with mounting the instance name, the non-instatnce name and the content10:06
pedronismvo: ken said it was the oldest parallel installed snap he had10:06
zygaI have a test in spread that shows how something similar fails10:06
mborzeckizyga: something similar, as in mounts or snap-seccomp during bootstrap?10:06
zygais it reproducible?10:06
zygamborzecki: as in mounts10:06
mborzeckizyga: i was not able to reproduce it yesterday10:07
zygahttps://github.com/snapcore/snapd/blob/master/tests/main/layout-symlink-bind-revert/task.yaml10:07
zygathis encodes some of the problem (but you have to read deeply  about what goes on in an associated commit message)10:07
mvo6569 is green and should make tests green again10:07
mvo(needs a second review)10:07
zygahttps://github.com/snapcore/snapd/commit/adf75238b85540d19027dc2f1c576bd266641af2#diff-a6e200ddb24754df8611a002020deccd10:08
zygamvo: anyway, I  will investigate10:08
mvothank you zyga10:08
ograogra@nanopc-t4:~$ uname -a10:10
ograLinux nanopc-t4 4.19.20-dirty #1 SMP PREEMPT Tue Mar 5 16:58:29 CET 2019 aarch64 aarch64 aarch64 GNU/Linux10:10
ograogra@nanopc-t4:~$ cat /proc/cpuinfo |grep -c ^processor10:10
ogra610:10
ograogra@nanopc-t4:~$ free -h | grep ^Mem10:10
ograMem:           3.8G        124M        3.4G         11M        280M        3.5G10:10
ogra:D10:10
zygaogra: raspberry pi 4? :D10:14
ograhaha, no ... a rockchip 3399 board ... but it not only has 6 2GHz cores and 4G, it also has an M.2 SATA connector :D10:14
ograjust trying to get lxd armhf images up and running ... then i'll likely have a home-builder thats as fast as the LP buildds ;)10:15
ogra(minus the queue ;) )10:15
zygaogra: build libreoffice then :)10:18
ograonce i have everything up i will ... images are here in case someone else has such a board http://people.canonical.com/~ogra/snappy/nanopc-t4/ :)10:19
pedronismvo: so seems we have the problem that on a classic system with reexec getting a base: core18 snap doesn't get you an auto-updating snapd10:21
pedronisbecause we don't get core (nor the snapd snap)10:21
pedronismvo: https://forum.snapcraft.io/t/core18-snap-fails-to-run-on-16-04-cannot-locate-the-core-snap/10292/1010:22
mupPR snapd#6569 closed: tests: check that apt works before using it <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6569>10:23
mvopedronis: yeah, still no 2.37.x in xenial :/10:23
mvopedronis: our SRU process is still slow10:23
pedronismvo: does 2.37 pull in core though?10:23
pedronisit will fix that problem10:24
pedronisbut not the stale snapd10:24
mvopedronis: right10:24
mvopedronis: let me read the full thing, I thought this was about the bug that without core snaps won't run. but yeah, with only core18 we lose the re-exec right now10:25
threshhow am I supposed to pass stuff between an unconfined app's /tmp/ and a confined app, like vlc?  https://trac.videolan.org/vlc/ticket/21558 is the ticket we got for VLC, where user wants to open an attachment from Thunderbird in a confined VLC.10:31
zygathresh: this would only work through XDG portals, something that is not widely available yet10:31
mborzeckizyga: yay, no more import cycles, https://paste.ubuntu.com/p/X4vqjPsj85/ that's with the seccomp compiler wrapper under sandbox/seccomp10:34
zygamborzecki: nice, I think this is what we need :)10:35
threshzyga, ok, can you point me to the docs?10:35
mborzeckizyga: similar wrapper for apparmor under sandbox/apparmor would be trivial too :P10:35
threshafaics, most of my users are on ubuntu 18.0410:35
zygathresh: there are no docs for this issue per-se, there's  the movement  to get document portal in place with snapd and with snaps but it is far from complete10:36
threshzyga, ah, I see, thank you.10:36
mupPR core#102 closed: hooks: add force_turbo to PI_CONFIG_KEYS <Created by zyga> <Closed by pedronis> <https://github.com/snapcore/core/pull/102>10:58
mborzeckizyga: https://github.com/bboozzoo/snapd/commit/07f3aeab765514a1e8e5501fb4490ffca273a1e211:16
zygammm11:16
mborzeckitiny :)11:17
mborzeckii'm finishing fixing up the tests and will stat looking into the spread test of core1811:18
mborzeckizyga: got your comment, will add that11:19
zygamborzecki: +111:19
zygamborzecki: I left one comment11:19
zygathanks!11:19
mborzeckii'm heading home11:22
Chipacamo'in all11:24
Chipacaback earlier than i feared, although I'll have to go out again this afternoon11:25
Chipacameanwhile, there's a user out there wondering why 'sudo umount -a' causes their snaps to stop working11:25
pedronispstolowski: I added some more highlevel considerations to 656211:29
pedronisChipaca: hi, sorry for the slightly grumpy review of #6564 , the diff there is very hard to read11:30
mupPR #6564: cmd/snap, tests: refactor info to unify handling of 'direct' snaps <Created by chipaca> <https://github.com/snapcore/snapd/pull/6564>11:30
pedronispstolowski: let me know if you have questions, need to lunch now though11:30
pstolowskipedronis: yep, looking, thanks!11:31
Chipacapedronis: yeah11:32
pedronismvo: any particular reason to push #6570 to 2.38 ?11:50
mupPR #6570: snapstate: only keep 2 snaps on classic <Created by mvo5> <https://github.com/snapcore/snapd/pull/6570>11:50
mvopedronis: just to make foundations happy11:53
mvopedronis: fine to remove the milestone11:53
pedronismvo: I don't think it's risky, but is not a bug fix either11:53
pedronismvo: I removed it11:54
pedronismvo: we have just one thing open for 2.3811:54
pedronisnow11:54
Chipacapedronis: why is 'load' wrong, and why is 'examine' better, for a function that does cmd.ClientSnapFromSnapInfo(snap.ReadInfoFromSnapFile(snap.Open(...))) ?12:02
mvopedronis: having it in 2.38 makes sure it lands in time for 19.04 - but we can always pull it into 2.38.N if 2.39 does not make it in time12:03
pedronismvo: I understand12:03
pedronisChipaca: are we loading the snap?12:03
pedronisdo we use load for this anywhere?12:03
pedronisChipaca: the line you pasted has no verb load in it12:04
pedronisit has a read12:04
pedronisChipaca: it would be good also to find something else than "direct"12:06
pedronisChipaca: examine had "?" after it, it was a proposal12:07
Chipacato me "load" is pretty close to "open and read", but I recognise that this might be a 'me' thing12:10
pedronisChipaca: yes, I think you tried to sneak it in somewhere else, but we don't use it that way12:10
pedronisChipaca: to me load  sounds like bring this entire thing into memory12:10
pedronisChipaca: I suppose the problem of that direct is shared by the other ones "local" and "remote", they are adjective used as names,  I think of the bunch direct is the one that sounds the most like it would be a bool12:12
pedronisbut maybe that's me12:13
=== ricab is now known as ricab|lunch
pedronisChipaca: maybe we should turn them all into remoteSnap, localSnap and diskSnap ? don't lnow12:14
pedronisChipaca: I commented on this a bit more in the PR itself12:59
pedronisChipaca: wasn't this fixed already https://bugs.launchpad.net/snapd/+bug/1818306 ?13:41
mupBug #1818306: disabled daemons are started after refresh <snapd:New> <https://launchpad.net/bugs/1818306>13:41
=== ricab|lunch is now known as ricab
Chipacapedronis: yes13:46
pedronisChipaca: the report is recent13:48
mupPR snapd#6570 closed: snapstate: only keep 2 snaps on classic <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6570>13:54
mvo6418 needs a second review13:56
Chipacapedronis: we fixed it for refresh, not for install i guess?13:58
Chipacapedronis: what's the right behaviour for install?13:58
pedronisfor install?13:59
Chipacayes13:59
pedronisdegville: 3 is actually mentioned here  https://forum.snapcraft.io/t/getting-started/3876 under "snap revert" docs14:00
pedronismvo: ^14:00
degvillethanks pedronis!14:00
Chipacapedronis: actually I see the same behaviour on refresh14:01
Chipacaneed to dig a bit14:01
pedronisChipaca: ok14:01
pedronisChipaca: I think internally that install is a refresh14:01
pedronisor not different to a refresh14:01
Chipacait should be, yes14:01
pedronisChipaca: anyway don't dig too much if you are doing something else14:02
pedronisChipaca: we made a card14:02
Chipacadunno if i'd complicate the services handling over it though14:02
Chipacapedronis: also https://forum.snapcraft.io/t/disabled-snap-gets-enabled-after-a-refresh/745714:03
zygaChipaca: standup or  are you skipping?14:03
Chipacagoing14:03
Chipacapedronis: #5777 was never merged14:08
mupPR #5777: wrappers/services.go: don't start disabled services <Created by anonymouse64> <Closed by anonymouse64> <https://github.com/snapcore/snapd/pull/5777>14:08
pedronisChipaca: ah, so it's rally all tangled together as we discussed in Malta14:15
pedronis*really14:15
feelextraHello! is there a Snap store besides Snapcraft's website? i thought Snap software can be distributed anywhere.14:19
roadmrfeelextra: what made you think that?14:24
feelextraI watched this video that says: "snap stores are basically software repositories. of course canonical has their own snap store but anybody can have a snap store, and assuming your snap store is signed and secure you could technically pass it around in a PPA very similar to the way Ubuntu distros work today" source: https://www.youtube.com/watch?v=ixWuE1hhZfw14:34
feelextraat around 1:00 into the video14:35
diddledanfeelextra: there is no currently available snap store implementation besides the official store which is proprietary.14:36
diddledanyou _can_ reimplement it but you also need to modify the snapd to be able to recognise the alternative store location14:37
feelextradiddledan: thank you, that adds to my understanding of Snap!14:37
diddledanat the moment snapd is hardcoded to only use the canonical-sponsored store14:38
diddledanuntil there are alternative software to run your own store that's likely to remain as is14:38
feelextrai see.14:39
Chipacathere was a store implementation out there, but it lagged14:41
Chipacaand pointing snapd at a different store is reasonably straightforward14:41
Chipacabut it's not a federated system, at all14:41
Chipacayou choose one store and stick to it14:41
Chipacausing our staging store, for example, requires everything from scratch, even core14:41
Chipaca(because the assertions are all different)14:42
=== chihchun is now known as chihchun_afk
=== tobias is now known as Guest42027
Chipacastepping out for a while15:37
=== tobias is now known as Guest33922
=== tobias is now known as Guest8608
mupPR snapd#6566 closed: interface: avahi-observe: Fixing socket permissions on 4.15 kernels (2.38) <Simple 😃> <Created by jdstrand> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6566>15:47
=== chihchun_afk is now known as chihchun
mborzeckizyga: i've updated #648516:13
mupPR #6485: interfaces/seccomp: regenerate changed profiles only <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6485>16:13
zygalooking16:13
mborzeckizyga: our mocking setup feels super fragile16:13
zygamborzecki: yes16:14
zygaespecially across packages16:14
mborzeckizyga: btw. https://forum.snapcraft.io/t/plans-for-sharing-a-gl-lib/1029816:17
zygaoh, fun16:18
zygawill you reply or shall I?16:18
mborzeckizyga: go ahead16:29
mborzeckizyga: oh, and core18 works now, but I haven't confirmed that we suspected was actually the problem16:30
zygawhat16:30
zygadid you change anything relevant?16:30
mborzeckizyga: there were some changes in the code that finds where snap-seccomp is16:31
mborzeckizyga: the test is running now, i'll let it finish16:31
mborzeckidamn,  Failed for "golang.org/x/crypto/cast5" (failed to clone repo): exit status 128, rly?16:32
zygaheh16:33
mborzeckizyga: heh, it's only rebooting the node now, so maybe it still doesn't work16:34
=== tobias is now known as Guest51748
zygaarchive woes :/ https://www.irccloud.com/pastebin/amKlkAyM/16:43
zygaChipaca: let's add ubuntu to the list of distros without reliable archives16:43
pedroniszyga: please undo your change to 641816:43
pedronisit doesn't achieve the goal of the PR16:43
zygaoh? can you tell me more?16:44
pedroniszyga: we want to pivot16:44
pedronisthat code won't16:44
pedroniszyga: I also tried to answer your other comments in the PR16:45
zygapedronis: I agree about the pivoting aspect16:48
zygapedronis: shall I revert or force push?16:48
pedroniszyga: what is more convenient16:48
pedroniszyga: anyway one of the comment explain a refactoring that is useful either way16:48
pedronisfor the clarity of snap-confine16:48
pedronisthis change (in principle) should be simple either place16:49
pedronisit isn't16:49
zygaabout pivot, I'm again not sure what should happen, it's complex16:51
pedroniszyga: it's not complex16:51
pedronisor shouldn't be16:51
zygathe code doesn't need to pivot if boot base is core16-like and base snap is core16-like16:52
zygafor the maximum compatibility between core and core1616:52
pedroniswe don't want that16:52
pedroniscore16 is accepting to move forward16:52
pedronisas a base16:52
zygaI'm not sure of that, if you think about what happens in core today it may break working snaps16:52
pedronisothewise those snaps will fail on core18 devices16:52
pedronisin unexpected ways16:53
zygaand I don't think we will give people to option to stay on pure core? (or will we?)16:53
pedroniszyga: we are introducing "base: core" as well, remember16:53
zygacore18 devices are new, those may not work _yet_, this may break stuff that does work now16:53
pedroniszyga: ?16:53
pedronisif a snap puts base: core1616:53
pedronisin itself16:53
pedronisis getting places16:54
pedronis(that doesn't even work right now, remember, there is no stable core16)16:54
zygapedronis: if this changes pivot semantics (when we pivot vs when we not pivot); the deployed base of snaps on core devices (with core as boot base), however wrong or correct, function now. If we migrate those to core16+snapd over time their semantics will change16:54
pedroniszyga: if you put base: core or no base16:55
pedronisyou'll get the previous semantics16:55
zygacore16 was about unbundling snapd from core, this seems to make an extra assumption developers must be ok with16:55
pedronisit's not, we cannot really let people make core16 based snaps16:56
pedronisthat don't work on core16 devices16:56
pedronissorry on core18 devices16:56
pedronisno base snaps16:56
pedronisare a greyer area16:56
pedronisbecause of the choices we made16:56
zygaI agree but they are a grey area that is yet unexplored16:56
zygaI see your point of view but I'm worried core16 will break people more than it will help16:57
zygawe could discard the non-pivoting mode entirely and see what happens16:57
pedronisthat is a different issue16:57
zygaperhaps the whole argument is moot, I think we don't really know16:57
pedronisanyway I don't see how making base: core16 potentially let you build snaps that don't work on core1816:58
pedronisbe progress16:58
pedronistoward the goal or turning off pivoting completely16:58
zygapedronis: I think nobody will ship something that doesn't work16:59
zygapedronis: the difference is who pulls the trigger, is it us for the developers (core -> core16 + snapd) or themselves16:59
zygapedronis: I pushed a revert to the branch now16:59
pedroniswe will still pivot if the snap has no base16:59
pedroniseven on core16+snapd16:59
zygapedronis: I will look at making a refactor you suggested16:59
pedronis(we'll need to code for that)16:59
pedronisor might pivot17:00
pedronisanyway that's part of the discussion how to get there17:00
zygapedronis: snaps always have a base as far as snap-confine is concerned, it is just the string "core" when it is not explicitly defined17:00
pedronisoption for base: core16 early17:00
pedronismeans something else17:00
pedroniszyga: I know17:00
zygaanother aspect is that the branch feels like an optimization17:00
zygaand we don't know what the correct mode is (or is it just me?)17:00
zygaif this never lands we just pull in core16 in addition to core17:01
zygaand then use base core1617:01
zygawhen snaps use core16 as their explicit base we will always pivot17:01
pedroniszyga: we need to decide, we need a correct implementation either way to let people play17:01
zyga(in the current code)17:01
pedroniszyga: anyway my main take away for all of this, is this comment: https://github.com/snapcore/snapd/pull/6418#discussion_r26302792717:01
mupPR #6418: many: allow core as a fallback for core16  <â›” Blocked> <Created by mvo5> <https://github.com/snapcore/snapd/pull/6418>17:01
pedroniswe should do either way17:01
pedronisbecause the current layering is not good(tm)17:02
zygayeah17:02
zygaI agree17:02
pedronisso that should be a separate prereq PR either way17:03
pedroniszyga: mvo: you need to decide who would tackle that17:04
zygaI'm attempting that refactor now17:04
carifdon't know what the ettiguette is for this, but I posted a question https://forum.snapcraft.io/t/is-there-a-list-of-currently-enabled-ubuntu-core-boards-by-architecture-and-model-number/1026317:12
carifi read something in the forums that its the preferred approach to capture and discussions and answers. ty17:13
pedroniscarif: the best people to answer that were at some events last week17:14
carifpedronis, ack, i can be patient. just wanted to learn the protocol, ty.17:15
mvozyga: thanks for tackling this17:25
zygapedronis, mvo: I pushed a small branch that begins  the refactoring while remaining readable https://github.com/snapcore/snapd/pull/657117:30
mupPR #6571: cmd/snap-confine: introduce sc_invocation <Created by zyga> <https://github.com/snapcore/snapd/pull/6571>17:30
mupPR snapd#6571 opened: cmd/snap-confine: introduce sc_invocation <Created by zyga> <https://github.com/snapcore/snapd/pull/6571>17:30
pedroniszyga: the user/groups ids vs the rest seems a bit different concerns (I see 3 calls to getresuid atm)17:41
mupPR snapd#6572 opened: cmd/snap-confine: populate enter_non_classic_execution_environment <Created by zyga> <https://github.com/snapcore/snapd/pull/6572>17:41
mupPR pc-i386-gadget#8 opened: Adding empty configure hook to enable configuration for gadget <Created by kubiko> <https://github.com/snapcore/pc-i386-gadget/pull/8>17:42
mupPR pc-i386-gadget#9 opened: Adding empty configure hook to enable configuration for gadget <Created by kubiko> <https://github.com/snapcore/pc-i386-gadget/pull/9>17:42
mupPR pc-amd64-gadget#12 opened: Adding empty configure hook to enable configuration for gadget <Created by kubiko> <https://github.com/snapcore/pc-amd64-gadget/pull/12>17:42
mupPR pc-amd64-gadget#13 opened: Adding empty configure hook to enable configuration for gadget <Created by kubiko> <https://github.com/snapcore/pc-amd64-gadget/pull/13>17:42
zygapedronis: I wanted to keep the property of a  refactor, I'm neither addnig nor removing more calls17:42
zygapedronis: but I see your point, perhaps we should evacuate them from the struct17:43
zygapedronis: and pass them around separately?17:43
pedroniszyga: yes, I just a fear getting that struct to the few other places that care will need huge changes17:44
pedronisseems a separate concern17:44
pedronisI mean care about those17:44
zygapedronis: so, what to do?17:45
pedroniszyga: pass them separetly17:45
pedronisas you said17:45
pedronisin snap-confine.c17:45
pedronisitself17:45
pedronisat least for now17:45
zygaok17:45
pedroniszyga: also do we use saved_uid/gid except printing them for debug?17:50
zygawe use only three of those17:50
pedronisseems down in the working bits we use only real_uid/gid17:52
pedronisin snap-confine.c17:52
pedronisitself17:52
zygapedronis: pushed17:53
zygathe format is  silly, sorry about that, it's the indent style we use17:53
pedroniszyga: thanks17:54
zygapedronis: I also merged this into https://github.com/snapcore/snapd/pull/657217:56
mupPR #6572: cmd/snap-confine: populate enter_non_classic_execution_environment <Created by zyga> <https://github.com/snapcore/snapd/pull/6572>17:57
pedroniszyga: is apparmor passed around a lot?18:07
zygait's passed in a few places18:07
zygawe need it to run helpers18:07
pedroniszyga: grepping my feeling would be to carry it separately as well18:08
pedronisso invocation is really things derived from arguments18:09
pedronis(and further derived from those)18:09
pedroniszyga: not a strong opinion either way18:14
zygapedronis: let's keep it inside for the purpose of this  mini patch-series, I can move it out after we start to  pass invocation around mount-support and ns-support18:17
zygapedronis: by then will have useful data18:17
pedroniszyga: isn't it easier the other way around? I suppose it depends a bit how we got about it18:17
pedroniszyga: the question is really is whether the depth sc_invocation should go is about the same of apparmor or deeper18:18
pedronisas well18:18
zygapedronis: right now we pass it as a separate argument but the number of arguments to  enter_ is  already pretty large18:18
mupPR snapd#6573 opened: cmd/snap-confine: call sc_should_use_normal_mode once <Created by zyga> <https://github.com/snapcore/snapd/pull/6573>18:18
zygapedronis: I don't mind removing it if it makes sense, just wanted to reach the point of the refactoring we  were discussing initially18:19
zygapedronis: I think invocation should go as deep as it makes sense to avoid passing the same arguments over and over18:19
pedroniszyga: well, as long as the target uses at least two things from it18:20
pedroniszyga: I'm a bit surprised about the last patch18:21
zygaI knew some of this code was a bit rusty but I was reluctant to change it without a path for rapid review and feedback cycle18:21
zygapedronis: I started using the invocation but it grew bigger so I proposed the intermediate step first18:21
pedroniszyga: that's not the issue, can't we call sc_should_use_normal_mode in main ?18:22
pedronisand put it in sc_invocation18:22
pedroniswe can then extract it down for now18:22
zygapedronis: ah, yeah18:22
zygapedronis: that won't explode the size of -3 yet18:22
zygaactually18:23
zygapedronis: no :/18:23
pedroniswhy ?18:23
pedronis(genuine question)18:23
zygapedronis: because it must be probed after reassociate_with_pid1_mount_ns18:23
zygaI can move that to main18:23
zygathen move the check along with it18:23
zygathe thing is, we only did this in the non-classic path for now18:24
pedroniszyga: you can keep in the else path for now18:24
zygawhich I think should remain so18:24
pedronis(but we have plans to make classic more like the rest)18:24
zygayeah, that's true18:24
zygajust trying to limit possibility of fallout18:24
pedronisyes, I agree18:25
zygaone more idea18:25
pedronisbut we can find a middle ground18:25
zygawe can make a classic invocation18:25
zygaand a strict invocation (for lack of a better name)18:25
zygawhere classic is no-op empty18:25
zygaand strict has more things inside and is intialized at the right time18:25
pedronisdo we need to?18:26
pedronisI'm not sure it helps in itself18:26
zygaI think it won't help much, just may make it clear that some fields are only used for strict path18:27
pedronisyea, we can set normal_mode to false on the classic path18:28
pedronisthat's not the issue I think18:28
zygammm, yeah18:29
zygalet's do that18:29
zygait will also means the functions start to change the invocation but I think that's ok18:29
zygaI started off with const because that's safer to explore18:30
pedroniszyga: we could also have sc_invocation exist only in the else path18:34
zygayeah18:34
pedronisgiven is the other path does nothing18:34
pedronisand the code after calls just a couple of things18:34
pedronisthat could use it (but also not)18:34
zygawe can solve it later when we do classic mount instances18:34
pedronisyes18:34
zygaI pushed the earlier suggestion to -318:35
zygais_normal_mode is now in the struct18:35
zygahttps://github.com/snapcore/snapd/pull/6573/commits/c7633e9debfebe64dd320996c5ae4a373e0ea25e18:35
mupPR #6573: cmd/snap-confine: call sc_should_use_normal_mode once <Created by zyga> <https://github.com/snapcore/snapd/pull/6573>18:35
zygapedronis: are you happy with the direction so far in -1, -2 and -3?18:36
pedroniszyga: yes18:38
zygapedronis: I think we can pass the invocation to the main places that currently carry the chain of arguments like snap name, base snap name, etc18:38
zygapedronis: we may (perhaps) split the invocation so that things that are static and dynamic are not mixed as much but we shall see how this looks like18:38
pedronisas I said  I think it should be fine to send to anything that was taking at least two of the members18:39
zygapedronis: I would love to eventually marry this with the idea that for each security tag we can ask the system, reliably and without user injections, what is the base snap, classic confinement mode18:39
zygaand drop the need for environment variables and arguments as trusted input18:39
zygawhich we do our best to validate but still cannot prove correct (e.g. call one snap's app with another snap's confinement)18:40
zygaI need to break now, ttyl!18:43
mvoChipaca: can I interest you in the review of 6381? second review, hopefully boring :)18:44
zygastuff is failing on fatal: unable to access 'https://go.googlesource.com/net/': The requested URL returned error: 50219:18
zygaany ideas?19:18
zygaI need to EOD19:18
zygabut if anyone is trying to land stuff, that's breaking all builds now19:19
ograzyga, FYI https://github.com/snapcore/pi3-gadget/pull/20 ... open since Nov19:31
mupPR pi3-gadget#20: dots in interface names are not allowed, fix spi <Created by ogra1> <https://github.com/snapcore/pi3-gadget/pull/20>19:31
ograjust merge it (or make sil2100 merge it ... )19:32
dot-tobiasIs there an ETA when snapcraft 3.2 will be available on launchpad builders?21:32
dot-tobias(for core16-based snaps)21:32

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