/srv/irclogs.ubuntu.com/2021/07/14/#snappy.txt

mborzeckimorning05:13
mardy'morning!05:57
mborzeckimardy: hey06:06
pstolowskimorning06:15
mborzeckipstolowski: hey06:35
=== zyga_ is now known as zyga
zygagood morning :)07:11
* zyga braces for 34C today07:11
zygaufff07:11
pstolowskihey zyga 07:12
* pstolowski physio07:49
mardypedronis: on the mount interface: I guess that when removing a snap, we should unmount all the mounts created by the snap, right? Or is it the snap's responsibility to do so?08:24
pedronismardy: no, we should do that08:24
=== zyga_ is now known as zyga
zygamardy, perdronis: would a snap disable also unmount those?08:26
zygait's a tricky question, because it carries into what happens when the snap refreshes, would those mounts go away ?08:26
mardypedronis: OK. Any hints on where in the code we should do it?08:28
mardyzyga: I would expect that disable would simply disable the mount unit, without doing the unmount08:28
pedronisgiven the use case I suspect that we would do something heavy ended only on remove08:29
pedronisfor the rest it would be up the snap to do things from the hooks08:29
pedronis*handed08:30
zygamardy: that's interesting but also not what snapd does historically08:36
zygapedronis: yeah, I think this is more practical08:36
pstolowskire08:52
mardyI still don't know where I should hook into the removal process to do the unmount... I see that Repository.DisconnectSnap() calls disconnect(), which just calls delete().08:54
zygamardy: so about that08:55
zygamardy: is mount-control going to use a new interface backend?08:56
zygamardy: or is it going to define something entirely new?08:56
zygamardy: historically all of the interface woo woo was going on in interfaces/*.Backend type08:56
zygamardy: like the mount backend writing our special .fstab files and calling snap-update-ns08:57
zygamardy: what is your plan for the mount control interface?08:57
mardyzyga: nope, it's just a new interface, using the existing backends09:02
mardylet me push what I have so far09:02
zygamardy: hmm09:03
zygamardy: but none of the existing backends can create system-level mount units, unless you count the systemd interface which is only used by gpio 09:03
mardyzyga: https://github.com/snapcore/snapd/pull/1047309:04
mardyzyga: the mounts are not created by the interface itself, but by a new snapctl subcommand09:04
zygamardy, looking09:05
zygamardy, what's the mount::%s thing?09:06
mardyzyga: in parseStringList(), the %s can be either "options" or "type" (if I understood your question :-))09:08
pedronispstolowski: I re-reviewed https://github.com/snapcore/snapd/pull/10515 thanks for the work there09:10
zygamardy, I meant the double colon09:10
mardyzyga: ah, I guess it's a sign I've been writing C++ for too long :-)09:11
zygaah, haha09:11
zygano worries, I was just curious09:11
pstolowskipedronis: ty!09:11
mardyzyga: so, the interface itself does very little: it verifies the attributes (which show what are the allowed mount options) and sets up the apparmor snippet, so that the snap could call mount itself as long as it matches the declared attributes09:14
zygayeah, I see09:14
zygahold on, let me read the rest09:14
mardyzyga: then we have a snapctl mount command, which can do the mount, and if --persistent is given, sets up a mount unit09:15
mborzeckipedronis: i've updated https://github.com/snapcore/snapd/pull/10510 the tests inflate the diffstat a bit09:18
mborzeckii should probably come up with more tests for the error path09:18
zygamardy, yeah, so it's not like a typical interface for sure09:20
zygaI left two random comments towards the bottom09:20
zygamardy, and your question on lifecycle stands09:20
mardyzyga: thanks!09:23
mardyso, interfaces don't have a method which gets called when plugs and sockets get disconnected?09:24
pedronismborzecki: thx, it's in my queue, I'll see when I can look at it, lots of meetings today09:30
mborzeckipedronis: that's ok, thanks!09:30
zygamardy, they do09:48
zygamardy, it's just not that direct09:48
zygamardy, what gets called is backend methods09:48
zygamardy, what you connect impacts a backend specification09:48
zygamardy, and in the end backend spec is used to tell the backend what to do09:48
zygamardy, the final call is backend.Setup and Remove calls09:49
zygamardy, everything in the middle just feeds the system09:49
zygamardy, since snapctl doesn't really change the interface system, it doesn't seem that you can rely on this mechanism here for mount-control09:54
zygamardy, but I may have missed something 09:54
mardyzyga: what about the "auto-disconnect" event? Could I add a handler for it, which does the unmount? (assuming that you can have more than one handler)09:58
zygamardy, auto-disconnect is when the interface is disconnected due to snap removal _I think_09:58
zygaI mean09:58
zygadon't get me wrong09:58
zygayou _can_ hook to something09:58
zygain the snap remove flow for sure09:58
zygamy point was that it's not for free by changing the mount backend09:59
pedronismardy: you are going through wrappers to create the mount units?  we can probably add somethign there to deal with this. Anyway because how mount units are named, we probably need to add markers anyway. We have to do that for some other kinds of files like for dbus10:15
zygapedronis, oh that's a good point10:16
zygathere's no way to auto-detect snap mount units 10:16
zygabecause their name is decided and cannot contain a specific marker10:16
pedronisyes, we have a similar problem with dbus activation files10:17
pedronismardy: you might want to look at wrappers/dbus.go , especially RemoveSnapDBusActivationFiles for some inspiration10:19
pedronisthat one is called much more often, but we can have a similar helper called more precisely/rarely10:19
ograshould "snap logout" not force me to use sudo for snap install/remove ? https://forum.snapcraft.io/t/sudo-less-snap-commands/2544110:26
zygaogra, I _guess_ so 10:36
pstolowskipedronis: can you land https://github.com/snapcore/snapd/pull/10511 ? unrelated failures, including deltas11:26
pedronispstolowski: done11:34
pstolowskithanks11:37
_moep_Hello!  how is it possible to install via snap a package and deploy the content from .config/ to /snap/bla/current/.config/? When I don't start the snap, /snap/…/.config doesn't exist. Do you have any suggestions?12:19
mardypedronis: the method to create mount units is in systemd/systemd.go; do you think I should create a wrapper for it under wrappers/ instead (maybe wrappers/services.go)? Or is it fine to use it from where it is?12:30
pedronismardy: as I said we probably need to extra markers, I think it probably needs to be in wrappers calling something in systemd for symmetry12:33
zyga_moep_, no, because all the content in /snap/bla/$number is not a bunch of files you can modify but an entire file system that was mounted12:40
pedronis_moep_: if you need something from .config that is specific to your app , you can ask a personal-file access for it and add code to one of the installation hooks to copy it when the snap gets installed12:49
_moep_pedronis: thx and how can I do this?13:28
ogra_moep_, you add a personal-files interface entry to your snapcraft.yaml, upload to the store (this goes into manual review) and file a forum post in the "store-requests" category at forum.snapcraft.io ... take a look at exsiting requests in there13:40
_moep_ok thx13:43
mardypedronis: it looks like there is a marker already: https://github.com/snapcore/snapd/blob/master/systemd/systemd.go#L105213:45
mborzeckidamn it's hot13:55
pedronismardy: well we probably need to change those description for this new units, that description is meant to indicate the mount of the snap itself14:02
pedronis*these14:02
pedronismborzecki: I made a pass on https://github.com/snapcore/snapd/pull/1051014:32
mborzeckipedronis: thanks, yeah had a bit of hard time picking the right name for post finish, nothing fit reasonably well14:33
mborzeckipedronis: tried to answer the question about recovery system and errors there, perhaps we need to make sure that GoundDeviceContext() is always the one with the old model, which I think will not be the case now once set device runs14:55
mborzeckialthough the state won't be updated until unlock, so it should be ok if we reboot before that point, and the contexts will be correct14:56
pedronismborzecki: sorry, I don't understand your comment14:57
mborzeckipedronis: quick chat?14:58
pedronismborzecki: I don't think my question is about recover in that sense. I mean about the recovery system recover14:58
pedronismborzecki: I have meetings14:58
pedronismborzecki: I mean, what happens if reboot and and do a system action recover14:58
mborzeckipedronis: as in by running `snap recover`? or picking a recovery system from boot list?14:59
pedronispicking from the boot list14:59
pedronisbut either really15:00
pedronisthe rules are the same afair15:00
pedronisI'm not too picky if we have an error, which system we can recover with, as long as there is one. My worry is that neither works15:00
pedronisperhaps15:01
pedronisdoes the question make sense?15:01
pedronisI think the test should check something about this15:01
pedronis*tests15:01
mborzeckipedronis: afaiu one of them works, depending on the state the reboot happens15:01
pedronismborzecki: that's fine, would be good to check15:01
mborzeckipedronis: if the reboot happens after we swap the models, just the new one works, if it happens before but after try model is set, then it's either of the systems, if even before that, then just the old system15:02
pedronismborzecki: can we add checks in tests about this?15:03
mborzeckipedronis: you mean a spread test?15:03
pedronismborzecki: whatever makes sense15:03
pedronisI'm fine to check in the integrationy unit tests if it's trustable enough15:04
mborzeckithe unit tests already verify which model is present in modeenv and which model is on the disk15:04
mborzeckipedronis: a spread test, i.e. trying to boot the system, is the only way to make sure it works15:04
pedronismborzecki: my question is because of how  currentSeededSystem is defined, I think there is something off15:07
mborzeckipedronis: we've only had one until now, so it's likely picking the first one is not quite what we want there15:08
pedronismborzecki: we should probably discuss tomorrow, I'm a bit confused about this15:08
mborzeckipedronis: ok, let me schedule something in the morning15:09
mborzeckipedronis: added soemthig before desktop sync, let me know if we should try another time slot15:12
cachiomborzecki, ijohnson[m] pr #10409 is fixed, when you have a time could you please take a look?15:13
pedronismborzecki: sounds fine15:23
ijohnson[m]cachio: sure, I'll take a look, also you mentioned some test was still failing somewhere and that I should take another look ?16:04
ijohnson[m]what test was that?16:04
cachioijohnson[m], not on this pr16:05
cachiothere are some random errors related to timeouts trying to connect to uc20 instances16:05
cachioI couldn't reproduce it yet16:05
cachiobut I saw that in some github action logs16:06
ijohnson[m]cachio: is that what was discussed about using the wrong machine type with GCE that might be fixed with one of your pr's to spread ?16:06
cachioijohnson[m], there are 2 errors16:11
cachiothat one 16:12
cachioand something new 16:12
cachioI saw some connections timeout16:12
cachioon uc2016:12
cachioand the logs I reviewed didnt show errors16:12
cachioijohnson[m], I also see this error https://github.com/snapcore/snapd/pull/10409/checks?check_run_id=3068339849#step:5:18416:15
ijohnson[m]hmm that last one you sent is new, I haven't seen that before, it seems like the machine just got stuck and froze16:17
mvoijohnson[m]: is a squash merge of 10522 okay? for easier cherry-picking?16:19
ijohnson[m]let me look16:19
ijohnson[m]mvo: yeah that's fine16:19
ijohnson[m]mvo: did we decide if we need security review on this ?16:19
cachioijohnson[m], https://github.com/snapcore/snapd/pull/10409/checks?check_run_id=3068339849#step:5:175616:19
cachiothis test also failed16:20
mvoijohnson[m]: let me quickly look at it16:20
ijohnson[m]huh that's interesting16:20
cachioit is where we are installing 2.4516:20
cachioperhaps it is rebooting16:21
cachiofor refresh16:21
cachioijohnson[m], I'll try to reproduce it locally16:22
mvoijohnson[m]: looks good, added one question16:28
ijohnson[m]mvo: do you want me to fix that typo in the PR before squash merging ?16:29
mvoijohnson[m]: would be nice, but not super important. if you do it, make sure to add skip-spread to avoid a full run16:30
ijohnson[m]mvo: ah well too late I already pushed it16:30
ijohnson[m]also does skip-spread work if we already opened the PR without  skip-spread ?16:30
ijohnson[m]I thought skip-spread is like run-nested in that it has to be closed and re-opened16:30
mvoijohnson[m]: I think so but only before you push16:30
mvoijohnson[m]: but maybe I'm wrong, I'm a bit out of touch16:31
ijohnson[m]hmm interesting, I'll have to give it a try sometime16:31
ijohnson[m]mvo: do you want me to cancel the run and add the label and re-try ?16:31
mvoijohnson[m]: it's fine16:32
mvoijohnson[m]: we are not in a rush I think(?)16:32
mvoijohnson[m]: do we have a deadline for the interface?16:32
mvoijohnson[m]: (again, sorry for not being on top of this :/)16:32
ijohnson[m]mvo yeah I think TPE needs it rather urgently unfortunately16:34
ijohnson[m]So sooner it's in beta the better 16:34
ijohnson[m]Not sure if you were planning to start a release today or not 16:34
ijohnson[m]mvo see MM16:35
mvota16:36
cachioijohnson[m], https://paste.ubuntu.com/p/YmMbJ2t4fZ/16:43
cachiothere is an auto-refresh on the vm16:43
ijohnson[m]cachio: ah interesting16:50
cachioIs it ok to force refresh.hold in this scenario?16:50
ijohnson[m]cachio: yeah probably 16:50
cachiook, I0'll try that16:50
cachioijohnson[m], so17:38
cachiostill fails17:38
cachioauto-refresh is happening17:38
cachioperhaps the way is to update default config for pc gadget17:39
ijohnson[m]cachio: ah yeah that makes sense, do you remember how to do that?18:04
ijohnson[m]there are other nested tests which modify gadgets too18:04
cachioyes, I'll try to reuse that18:07
cachioijohnson[m], I am not sure if it is gonna work18:09
cachiobut I am gonna try18:09
cachiobecause the core is 2.45 and the pc gadget is the current18:10
cachiobut it the images builds ok now it means it should work18:10
ijohnson[m]hmm18:10
ijohnson[m]cachio: could you instead unpack and repack the core snap before building the image such that it doesn't have the same hash and thus won't be refreshable since it will be installed dangerously?18:11
cachiosure18:12
cachiothat is easied18:12
cachioeasier18:12
cachioijohnson[m], pushed the fix18:33
cachiotested and tests are passing18:33
_moep_what is a good default value for refreshing snaps? (at a stable branch and no bleading edge)18:40
ijohnson[m]cachio: ack I'll take a look in a little bit, prepping 2.51.3 right now20:26
ijohnson[m]_moep_: what do you mean? default value of what ?20:26
cachioijohnson[m], which changes are included in .3?20:35
cachiois it a bug fix?20:35
ijohnson[m]cachio: just a change for http response header timeouts from pawel and the sd-control interface which TPE needs very urgently20:36
ijohnson[m]it's a very small release20:36
cachioijohnson[m], ok20:36
cachioI'll make sure the validation is done overnight20:37
ijohnson[m]cachio: it's probably fine for you to start tomorrow, no need to rush to get it started tonight20:37
ijohnson[m]cachio: I can only assume that the core snap is going to get stuck in review because it always does20:37
ijohnson[m]but maybe the snapd snap should be ready earlier20:38
cachioijohnson[m], sure20:38
ijohnson[m]thanks cachio I'll ping you when the snaps are in the beta channel20:38
cachioijohnson[m], nice, thanks20:39
ijohnson[m]cachio: approved #10409, some followup material but otherwise lgtm21:33
cachionice, thanks21:33
ijohnson[m]cachio: snapd snap 2.51.3 is now in beta22:31
cachioijohnson[m], nice, tests are starting now23:25
ijohnson[m]Great thanks 23:27

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