/srv/irclogs.ubuntu.com/2019/02/14/#snappy.txt

mupPR # closed: snapd#5644, snapd#5915, snapd#5962, snapd#6079, snapd#6098, snapd#6108, snapd#6111, snapd#6162, snapd#6177, snapd#6238, snapd#6258, snapd#6270, snapd#6281, snapd#6313, snapd#6322, snapd#6324, snapd#6325, snapd#6327, snapd#6329, snapd#6341, snapd#6347, snapd#6356, snapd#6360,00:10
mupsnapd#6367, snapd#6376, snapd#6381, snapd#6401, snapd#6404, snapd#6410, snapd#6418, snapd#6436, snapd#6472, snapd#6482, snapd#6485, snapd#6487, snapd#6488, snapd#6491, snapd#6492, snapd#6494, snapd#6496, snapd#6497, snapd#6498, snapd#6499, snapd#6501, snapd#6502, snapd#6503, snapd#650400:10
mupPR # opened: snapd#5644, snapd#5915, snapd#5962, snapd#6079, snapd#6098, snapd#6108, snapd#6111, snapd#6162, snapd#6177, snapd#6238, snapd#6258, snapd#6270, snapd#6281, snapd#6313, snapd#6322, snapd#6324, snapd#6325, snapd#6327, snapd#6329, snapd#6341, snapd#6347, snapd#6356, snapd#6360,00:11
mupsnapd#6367, snapd#6376, snapd#6381, snapd#6401, snapd#6404, snapd#6410, snapd#6418, snapd#6436, snapd#6472, snapd#6482, snapd#6485, snapd#6487, snapd#6488, snapd#6491, snapd#6492, snapd#6494, snapd#6496, snapd#6497, snapd#6498, snapd#6499, snapd#6501, snapd#6502, snapd#6503, snapd#650400:11
NickZman, the arm build farm on launchpad is backed up something fierce03:11
NickZi have a 3 hour wait time on my snap packages03:11
zygaGood morning06:51
zygaHey mvo07:14
* zyga updated his aquaris E4.5 to "16"07:27
zygaguess my phone runs xenial now07:27
mvozyga: good morning07:30
zygawow, the phone says in the future it will support snaps!07:31
zygathat's neat07:31
zyga(though they said that it is not supported now because of upstart)07:31
mvonice07:31
MattJHmm, is there a way to reinstall a snap with --classic without losing its data?07:45
mvozyga: btw, did you find out more from morphis about the jenkins issue he has with 2.37?07:45
zygamvo: no, we need to get more feedback about how to reproduce the issue07:45
mvozyga: thanks! so he didn't reply yet?07:46
zygaI failed to reproduce it on 18.04 with lxd and classic snaps in /var/lib/test07:46
zygacorrect07:46
mvozyga: thanks for looking into this!07:46
zygamorphis: ^ please ping us when you are up07:46
mupPR snapd#6501 closed:  tests/main/auto-refresh-private: make sure to actually download with the expired macaroon <Created by pedronis> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6501>07:54
mvo6503 is an easy win07:54
morphiszyga, mvo: hey!07:57
zygagood morning :)07:57
zygamvo: (reviewed)07:57
morphiszyga: didn't you say you can easily reproduce it?07:57
zygamorphis: that was dry run mode, it is easy to reproduce conceptually but it doesn't actually happen for me07:58
morphisok07:58
zygamorphis: so I started digging deeper to the point where I had lxd and the same version and it still wasn't happening07:58
morphiszyga: so what do you need from me?07:58
zygamorphis: in your setup, how was jenkins installed?07:58
morphisgood question, plars did it long time ago07:58
morphisI guess via debs07:58
zygacan you drop us a bug report with: os version, container installation system on host, guest container os version, snap version on both sides, jenkins installation method in guest and the name of the snap used in the CI job07:59
zygaI will use that to reproduce and fix it07:59
zygaI mean, we kind of feel the fix is a one liner08:00
zygabut without a regression test08:00
zygait's a hand-wave-y one08:00
morphiszyga: where do you guys file bugs these days? github?08:03
=== pstolowski|afk is now known as pstolowski
pstolowskimorning08:03
zygamorphis: still on lp08:03
morphiszyga: ok08:03
zygalaunchpad.net/snapd08:03
morphiszyga: the snap isn't from the store but I will drop it by mail08:05
zygamorphis: it is probably sufficient to classify it (strict or classic)08:05
zygathe denial was not related to the snap but to snap-confine08:05
morphisit's a classic snap08:07
zygaperfect08:08
zygaok08:08
pedroniszyga: does this rings any bell:   cannot perform readlinkat() on the mount namespace file descriptor of the init process: Permission denied08:11
zygayes08:11
zygaphone08:13
morphiszyga: https://bugs.launchpad.net/snapd/+bug/181586908:14
mupBug #1815869: Command of classic snap fails with denial when output is redirected <snapd:New> <https://launchpad.net/bugs/1815869>08:14
mvopedronis: do we have dmesg output with the appamror denials for this one?08:17
pedronismvo: I don't know, it was on a server08:17
pedronismvo: I'm asking08:18
zygaOne sec, home stuff08:22
zygare08:23
zygapedronis: it is an issue that surfaces once in a while, typically on older kernels08:24
zygapedronis: it doesn't affect anything, that I'm aware of, is in production08:24
zygamorphis: thank you08:24
pedroniszyga: a service died on it08:24
pedronisbut there were other denials before as well08:24
pedronisthen it restarted08:25
pedronisI mean snap-confine denials08:25
zygado you have the log?08:25
pedronisyes08:26
zygamorphis: I asked one more question on the bug08:34
morphiszyga: answered08:35
zygamorphis: I'm not familiar with lxd that much, how do I set up nesting + privileged08:37
zygamorphis: is lxd on the host a snap?08:37
morphisyes08:38
morphislxc launch ubuntu:x test -c security.nesting=true -c security.privileged=true08:39
zygathank you!08:39
morphisyw08:39
zygalaunching now08:39
zygaI suspect it is an unsupported configuration in some form, I will confirm soon :/08:39
zygahttps://www.irccloud.com/pastebin/3G9BKJuL/08:41
zygamorphis: ^ this is from installing core in that system08:42
zygaFeb 14 08:41:18 xenial snapd[378]: 2019/02/14 08:41:18.178394 backend.go:303: cannot create host snap-confine apparmor configuration: cannot synchronize snap-confine apparmor profile: open /var/lib/snapd/apparmor/profiles/snap-confine.core.6350.Ll210MNsYGb3~: no such file or directory08:42
zygaI'm installing core now08:44
zygamvo: will xenial get SRU for newer snapd?08:44
morphiszyga: that one is new, I am running snapd in various LXD containers for a long time now08:45
mvozyga: for 2.37.2 ? yes08:46
zygamvo: perfect, thank you08:46
mvozyga: I think its even in the unapproved queue, I need to check08:46
morphiszyga: hm, that doesn't happen in a unprivileged container08:46
mvozyga: is that the fix?08:46
mvozyga: if so I will push a bit harder for that08:46
zygamorphis: specifically apparmor stacking but please hold on, I don't know the key part yet08:47
zygamvo: no, just curious08:47
morphiszyga: unprivileged does not mean there is no apparmor profile for the LXD container08:47
morphiss/unprivileged/privileged/08:48
zygainstalling strictly confined snap in xenial container with privileged/nesting enabled https://www.irccloud.com/pastebin/ghbLQFrn/08:48
zygamorphis: ^ I cannot even install a snap in this container08:50
zygamorphis: but I managed to reproduce the issue08:51
zygalut 14 09:50:40 crusty kernel: audit: type=1400 audit(1550134240.752:161): apparmor="DENIED" operation="file_inherit" namespace="root//lxd-xenial_<var-snap-lxd-common-lxd>" profile="/snap/core/6405/usr/lib/snapd/snap-confine" name="/home/ubuntu/foo" pid=15267 comm="snap-confine" requested_mask="w" denied_mask="w" fsuid=1000 ouid=100008:51
zygaat least that much is good08:51
zygaI will investigate08:51
morphiszyga: then the initial snapd setup broke at some point. This container is running for ~1.5y now08:51
morphiszyga: great!08:52
=== cpaelzer__ is now known as cpaelzer
zygaI updated the bug report again08:55
zygamorphis: unsupported may not be broken for some time but may still be unsupported, I'm trying to get to the bottom of what that container setup does08:56
morphiszyga: security.privileged=true means the container is not running in a UI namespace08:56
morphissecurity.nesting=true allows processes inside the container to use a stacked AppArmor profile which is otherwise  forbidden by the default LXD AppArmor policy08:57
zygaUI namespace?08:57
morphiss/UI namespace/UID namespace/08:57
zygaah08:57
zygaisn't security.nesting the default? otherwise snaps would just be permanently broken inside containers08:58
morphisno08:58
zygathat's unexpected, are you sure?08:58
* zyga tries another container08:58
morphissecurity.nesting=false is the default08:58
morphischeck https://lxd.readthedocs.io/en/latest/containers/08:58
morphisthat is why you need security.nesting=true if you want to run snaps inside LXD containers08:59
zygawe never set that in our lxc tests08:59
morphislxc or LXD?08:59
morphiszyga: looks like snapd works without security.nesting=true too09:01
zygasnapd works correctly then09:01
zygathe whole container has nesting09:01
zygaperhaps that option controls the ability to use nested apparmor inside the container09:01
zygaso more nesting09:01
zygaotherwise we do get nesting09:01
morphisno, you still can't run nested LXD or docker inside a container without security.nesting=true09:02
zygathe whole profile is namespaced09:02
zyga(ie: nested)09:02
zygathat's different09:02
zygalxd does nesting09:02
zygaso you need security.nesting to run lxd inside lxd09:02
zygasnapd doesn't do nesting09:02
morphisyes09:02
zygait just requires a clean slate (nested setup as lxd does automatically)09:02
morphissee https://github.com/lxc/lxd/blob/a6b780703350faff8328f3d565f6bac7b6dcf59f/lxd/apparmor.go#L41809:02
zygaso a non-privleged container without extra nesting support works OK09:03
zygaI ran a busybox snap inside a default container09:04
zygazyga@crusty:/proc/19399$ cat attr/apparmor/current09:04
zygalxd-xenial-default_</var/snap/lxd/common/lxd>//&:lxd-xenial-default_<var-snap-lxd-common-lxd>:snap.snapd-hacker-toolbelt.busybox (enforce)09:04
zygait has a nested profile applied09:04
zygaok, so that much is good09:04
zygalxd nowadays also uses zfs09:05
zygaman, all of those are not tested by us :/09:05
popeydegville: when you have a moment, I have some PRs for the tutorial :)09:07
degvillepopey: awesome, thanks!09:08
zygapstolowski: hey09:08
zygasudo snap remove gnome-3-26-1604 gnome-calculator gnome-characters gnome-logs gnome-system-monitor gtk-common-themes09:08
zygathis takes forever on 18.0409:09
zygaconflicts09:09
morphiszyga: it uses ZFS for quite a long time, if I remember right even 2.0 used it09:09
zygapstolowski: conflicts https://www.irccloud.com/pastebin/fgPcJpHn/09:09
zygapstolowski: is this expected?09:10
pedroniszyga: yes, known bug09:10
pedronisthere's actually a fix up09:10
zygaaha, good09:10
pedronisbut needs to land early in 2.39 cycle09:10
pedronisbecause is delicate09:10
pstolowskiyep09:11
pstolowskizyga: it should succeed after w (long) while09:12
pstolowskipedronis: found intersting bug around hotplug and disconnect thanks to my spread test09:13
zygamorphis: a container using lxc launch ubuntu:x xenial -c security.nesting=true works OK09:15
zygamorphis: I can install more snaps but I still get the denial09:15
zygamorphis: I should be able to fix that this way09:16
Chipacao/09:16
zygamorphis: but using privileged containers is (for whatever reason) not supported now as things break on installation09:16
zygahey Chipaca :)09:16
Chipacazyga: dunno if you've seen https://forum.snapcraft.io/t/9927/509:17
mupPR snapd#6505 opened: packaging: avoid race in snapd.postinst <Created by mvo5> <https://github.com/snapcore/snapd/pull/6505>09:17
morphiszyga: it was working until 2.37.*09:17
zygamorphis: that's unrelated09:18
mvohey Chipaca - good morning09:18
zygaI'm saying _supported_09:18
zygait may work by accident09:18
Chipacamvo: suuuup09:18
zygaChipaca: I haven't09:18
pstolowskipedronis: almost at the end of the test after a series of succesful plugin/replugging i re-plug the device, snap interfaces is happy, connection is restored, but "snap disconnect .." creates an empty change with no tasks (status=Hold). adding an artificial sleep in the test just before disconnect makes it happy. the disconnect bit in api.go looks suspicious, we query repo a few times but there is no locking, so in theory09:18
pstolowskiwe may get inconsistent view of things. ionterestingly it happens all the time on 16.04, but not on 18.04 (in nested vm)09:18
morphiszyga: is it documented anywhere which configuration is supported and which not?09:18
Chipacazyga: any snap app gets "cannot create lock directory /run/snapd/lock: Permission denied"09:18
zygamorphis: only what we test09:19
morphisthat is pretty hard to dig out09:19
zygamorphis: regular and cloud versions of ubuntu + several other systems09:19
zygamorphis: lxd on ubuntu with default config09:19
mvoChipaca: more fun with .3709:19
zygamorphis: that's that, anything more may work or not but is not something we test for09:19
zygamorphis: but I'm not saying it's hopeless :)09:20
zygamorphis: just clarifying why we have not caught that09:20
morphissure09:20
zygamorphis: do you need to run a privileged container in your case or was that just a convenience/accident?09:20
Chipacamvo: in what shape, this time?09:24
pedronispstolowski: ah, interesting09:24
zygahmm, I opened a forum topic for unsupported features09:25
zygaand I cannot find it09:25
Chipacazyga: finding forum topics for unsupported features is an unsupported feature09:25
pedronispstolowski: ok, I'm not surprised we found issues around our use of the repo, it has an internal lock, doesn't mean it be consulted many times without an external one09:28
pstolowskipedronis: yes09:28
zygapedronis: yes, that's true09:28
zygapedronis: in all the cases that we need consistency we should craft a method that uses private unlocked versions while holding the lock for the repo09:29
pstolowskipedronis: although what's puzzling me is the fact that snap interfaces check done before disconnect reports the connection, so in theory things should be settled at this point09:29
pstolowskibut clearly the need for short "sleep" before disconnect contradicts it09:30
mvoChipaca: apparently the catalog update is a bit too non-random and causes store issues09:33
pedronismvo: I'm discussing that with Chipaca09:33
mvota09:33
mvoI was about to say - pedronis knows the details better :)09:33
pstolowskizyga: re the waiting.. issue you asked about earlier - https://github.com/snapcore/snapd/pull/647209:34
mupPR #6472: overlord: fix ensure before slowness on Retry <⛔ Blocked> <Created by stolowski> <https://github.com/snapcore/snapd/pull/6472>09:34
zygapedronis: is that overlord change so risky that we cannot just land it for .38?09:35
Chipacamvo: I was hoping it was the same thing =)09:35
pedroniszyga: we can reevaluate, remember in theory we should haved cut 2.38 already09:36
pedronisbut here we are09:36
zygayeah09:37
zygaI would vote on landing it to master and reverting if we need to release and feel uneasy about it09:37
pstolowskizyga: it looks innocent but is of high risk. if there is anything wrong around this area you may end up with snapd getting stuck and not picking tasks (been there while working on this fix)09:39
zygapstolowski: hence edge09:39
pedronispstolowski: we could probably mitigate the risk of getting totally stuck doing something in the Loop09:41
pstolowskipedronis: i can look at it ~next week if time on sprint permits as this week i'd like to address hotplug PRs. i wouldn't rush this fix though given that we don't hear many complaints about it (do we?)09:47
pedroniszyga: pstolowski: I don't think we risk getting totally stuck actually, because of the PruneTicker09:47
morphiszyga: I currently trying to figure out what the reason was for that09:47
pstolowskipedronis: getting stuck was most likely specifically related to my attempts to read from timer channel, so you may be right09:49
pedronispstolowski: yes, that we don't do09:50
pedroniswe have one place doing that09:51
zygamorphis: so I applied a simple fix09:51
zygabut ... it has no effect?09:51
zygadigging09:51
zygaah, sorry09:52
zygaall good09:52
zygamorphis: I will have a fix and a regression test09:52
zygamvo: ^ CC, low risk patch re-introducing /var/lib/** rw,09:52
mvozyga: that sounds good09:53
mvozyga: so re-adding this fixed morphis bug?09:53
zygamvo: yes, as expected09:53
zygait is interesting that lxd is a factor09:53
pedronisdo we have a +1 from jdstrand?09:54
zygabecause of how profile transitions work09:54
pedronisis the setup supported anyway?09:54
zygapedronis: he said as much yesterday in snappy-internal09:54
zygapedronis: lxd is supported, home in /var/lib is not but this was working before so we can keep it working until apparmor grows the delegation features jdstrand described09:54
zygapedronis: the specific case of lxd with stock profile, snapd with classic snaps and home in /var/lib/* will work09:55
pedroniszyga: can we make a test?09:58
zygapedronis: certainly, I'm on it now :)09:58
zygapedronis: that's why I ask for bug reports09:58
zygathen I can make a regression test and have a matching bug number with more details09:58
pedronispstolowski: mvo: I removed the blocked on #6472 with a comment10:12
mupPR #6472: overlord: fix ensure before slowness on Retry <Created by stolowski> <https://github.com/snapcore/snapd/pull/6472>10:12
mvothanks10:12
pstolowskipedronis: k, thanks10:12
pstolowskiit needs 2nd review still10:18
pstolowskipedronis: i've addressed/replied to your comments on https://github.com/snapcore/snapd/pull/596210:18
mupPR #5962: ifacestate/hotplug: hotplug handlers <Complex> <Hotplug 🔌> <Created by stolowski> <https://github.com/snapcore/snapd/pull/5962>10:18
pedronispstolowski: do we know already an example that would produce different interfaces at the same devpath?10:30
pstolowskipedronis: now, but i was thinking about an "foo-observer" and "foo-controller" type of interfaces10:31
pstolowski*no10:31
pedronisok, I see10:31
pstolowskiso, read-only or full control10:31
pedronispstolowski: did you not push some changes?10:34
pstolowskipedronis: ah, of course10:35
pedronisor is github confusing me10:35
pstolowskipedronis: sorry, now10:38
pstolowskipedronis: aaa, we have err shadowed in api.go disconnect - this is the reason of earlier disconnect issue i talked about: error: snap "serial-port-hotplug" has "hotplug-add-slot-serial-port" change in progress10:42
pstolowskirepo access wrt locks is a separate potential problem, but not in this case i think10:43
mupPR snapd#6506 opened: overlord/snapstate: add some randomness to the catalog refresh <Created by chipaca> <https://github.com/snapcore/snapd/pull/6506>10:45
Chipacapedronis: ^ à votre santé10:46
zygaok, that should do it :)10:58
mupPR snapcraft#2472 closed: project loader: do not leak a part's build-environment <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2472>11:01
pedronispstolowski: +1 on 5962 but with some requests of tweaks11:04
pstolowskipedronis: yay! thank you, will do11:06
* pstolowski runs malta-related errand11:07
* pstolowski runs malta-related errand (not a haircut)11:07
* marcustomlinson loves pstolowski's beautiful long locks11:11
pstolowskimarcustomlinson: lol11:12
mupPR snapd#6507 opened: cmd/snap-confine: allow writes to /var/lib/** <Created by zyga> <https://github.com/snapcore/snapd/pull/6507>11:15
zygamorphis: https://github.com/snapcore/snapd/pull/650711:16
mupPR #6507: cmd/snap-confine: allow writes to /var/lib/** <Created by zyga> <https://github.com/snapcore/snapd/pull/6507>11:16
zygapopey: nice talk at fosdem!11:17
zygapopey: I asked one question https://www.youtube.com/watch?v=UAEdSjou3c4&lc=UgwCtVt0IXrkcLD1jLB4AaABAg11:17
popeythanks11:17
zygamvo, pedronis ^ (jenkins regression fix)11:18
popeyzyga: answered there, but the question came from an endless developer who wanted to see how multiple versions of the same app was presented to the desktop (desktop files) compared to flatpak11:21
zygaah11:21
zyganeat11:21
zygaI think making desktop icons smarter would be great11:21
zygato add some disambigution in gnome shell11:22
zyga(classic, snap, flatpak, etc)11:22
zygaor version informationi11:22
zygamy wonky "i" make me type like some fake italian11:22
mvozyga: thank you11:32
mupPR snapd#6505 closed: packaging: avoid race in snapd.postinst <Created by mvo5> <Closed by mvo5> <https://github.com/snapcore/snapd/pull/6505>11:45
pedronisChipaca: spread tests for catalog are now failing on that PR :/11:47
pedronisnot too unexpectedly11:47
Chipacapedronis: :-)11:47
pedronisChipaca: one test doing: test -s /var/cache/snapd/commands.db11:49
ijohnsonhey zyga, mind pointing me to the spot in snap-confine where nvidia specific udev stuff is run? I only see udev setup from https://github.com/snapcore/snapd/blob/master/cmd/snap-confine/snap-confine.c#L354 AFAICT which won't run if we turn off udev tagging from snapd11:54
zygaijohnson: hey11:54
zygaone sec11:54
ijohnsonthanks11:54
zygaijohnson: https://github.com/snapcore/snapd/blob/master/cmd/snap-confine/udev-support.c#L23711:55
zygabut looking at this now I think you are good11:56
ijohnsonokay, cool. I tested this with my machine with nvidia on it, and still didn't see any udev setup with my PR so it looks good in empirical testing too11:56
ijohnsonI'll add a comment to the PR11:56
mupPR snapd#6508 opened: packaging: avoid race in snapd.postinst <Created by mvo5> <https://github.com/snapcore/snapd/pull/6508>12:11
zygapstolowski: hey12:22
zygado you have a sec for a quick discussion12:22
zygapstolowski: the context is this bug https://bugs.launchpad.net/snapd/+bug/181572212:22
mupBug #1815722: Namespaces for failed snap installations are not discarded <snapd:In Progress by zyga> <https://launchpad.net/bugs/1815722>12:22
zygapstolowski: I'm trying to figure out where the code for this should live12:22
zygapedronis, Chipaca: ^ CC12:22
zygawhen the install hook fails we will undo the whole change12:22
zygabut it's unclear which task should be responsible for discarding the mount namespace12:23
zygashould we encode that as an undo task for the install hook12:23
zygashould we encode that as special logic inside the implementation of that specific task (in the do path, when it fails just discard)12:23
zygaor should we do something entirely different12:23
pedroniszyga: can this happen in some form on a refresh as well?12:24
zygapedronis: install hooks don't run then, if any other hook fails we just restore the old revision and that's handled correctly12:25
zygathis feels like a special case12:25
pedronisis it handled correctly also if layout related stuff fails?12:25
zygapedronis: it depends on what you mean by fine, if layout application fails we fail loudly (commands and hooks cannot run), then proceed to undo; any changes made to the mount namespace remain intact and are accounted for12:27
zygathe subsequent call to snap-update-ns will attempt to change the mount namespace in accordance to what is the new desired format12:28
zygabut in either case we never discard the namespace in such situation12:28
pstolowskire12:28
morphiszyga: thanks12:39
zygaany advice?12:41
pedroniszyga: we have the same problem on install if starting services fails, no?12:45
zygapedronis: anything that causes a freshly installed snap to fail to install12:46
pedronisand runs something potentially12:46
zygayeah,12:46
pedronisjust saying that I don't think concetrating on install-hook12:46
pedronismakes sense12:46
pedroniszyga: anyway it seems something to do in the undo of link snap if the situation is a first install attempt?12:48
zygayes, I was thinking about anything that is special to first-install12:48
zygaI agree12:48
zygaperhaps link is the right place12:48
zygait's also annoying because this is cross manager12:48
zygabut I think we have handlers for that12:48
pedroniszyga: well , we need to merge bits of tasks of ifacestate and snapstate anyway12:49
zygayes but hopefully not for this fix :)12:51
pedroniszyga: where do we discard the namespace for remove ?12:51
zygathere's a dedicated task for that IIRC12:51
zygalet me look12:52
pedroniszyga: it's done in discard-snap12:54
pedronisso that's already snapstate afaict12:54
pedroniszyga: pstolowski: my impression is basically there might be more bits done in discard-snap12:55
pedronisthat we also need to do in undo link-snap12:56
pedronisif it's a first install12:56
pstolowskireading the backlog12:57
pedronispstolowski: do we need to remove the config as well for example?12:57
pedronispstolowski: zyga: basically compare  the code under https://github.com/snapcore/snapd/blob/master/overlord/snapstate/handlers.go#L1387 vs https://github.com/snapcore/snapd/blob/master/overlord/snapstate/handlers.go#L108412:59
pedroniswhat does make sense for both12:59
pedronisdo the 2nd seems to have more len(seq) == 1 sections13:00
pstolowskipedronis: indeed, we have a problem with config too, we should remove it in undo of link-snap13:04
pstolowskipedronis, zyga and i agree, undo of link snap is a good place for the namespace cleanup13:04
pedronispstolowski: there is a call to config.RestoreRevisionConfig with an XXX later there13:05
pedronispstolowski: not sure what it does? are we missing a test?13:06
zygapedronis: indeed, thank you, I'm looking at this now13:06
pstolowskicachio: i pushed fixes to hotplug-nested-vm, it's now passing for me on 16.04. old qemu is not a problem.13:09
cachiopstolowski, nice, I'll give a run again13:12
cachiothanks for fixing it13:12
=== ricab is now known as ricab|lunch
pstolowskipedronis: RestoreRevisionConfig would restore configuration of previous revision of the snap, but that's not going to help on undo of new install, we will leave config behind. yes i think undo is missing a test for this13:15
pedronispstolowski: yea, that code looks broken, like the condition should be the reverse?13:16
pedronis!= 113:16
Chipacapstolowski: pedronis: that's one of the places I added an XXX i think13:21
Chipacaas the logic didn't seem to make much sense13:21
pedronisChipaca: yea, seems there is a bug lurking there and missing tests13:21
* zyga breaks for a walk with the dog13:22
pstolowskipedronis: yes i think you're right13:22
Chipacahttps://github.com/snapcore/snapd/blob/master/overlord/snapstate/handlers.go#L1125 <- that's the one i meant13:23
pstolowskipedronis: i can add it to my todo list and address soon13:23
pedronispstolowski: thx13:23
Chipacapedronis: it's a different one -- with possibly the same logic13:24
* Chipaca ⇝ lunch13:24
pedronisChipaca: heh13:25
popeydegville: fyi, I edited "Installing snap on kde neon" and replaced your dark theme screenshots with default theme ones :)13:40
popey(at the kind and friendly request of upstream) :)13:41
degvillepopey: thanks! you're absolutely right... I've used it so long I forget it's not default.13:41
popeyI think the words were "Which nerd uses the dark theme?" :)13:42
popey(I do too)13:42
popeyI <3 KDE Neon13:42
degvilleahaha... yeah. Arc Dark and Papirus ftw.13:43
mupPR snapd#6509 opened: overlord/snapstate: discard mount namespace when undoing 1st link snap <Created by zyga> <https://github.com/snapcore/snapd/pull/6509>13:44
zygapedronis: ^ thank you for the idea again13:45
Chipacahmmm13:56
* Chipaca hmms13:56
t1mpHow do I downgrade to snapcraft2 with snap? On https://snapcraft.io/snapcraft I can only find 3.x versions13:57
pstolowskizyga a question there13:57
Chipacat1mp: snapcraft3 ships 2 as well14:06
Chipacat1mp: if your snapcraft.yaml doesn't have a base, you get 214:06
t1mpI use core18 as base. But snapcraft3 broke some things (probably I can fix them, but it takes more time which I don't have right now)14:07
Chipacat1mp: which things? (maybe the fix is easy)14:09
Chipacasergiusens: ^14:09
t1mpsome things were easy, like the version should be "2" instead of 2 (int).14:18
popeyversion is indeed a string14:18
t1mpI worked around the cloud parts that I couldn't use any more14:18
t1mpand now, I have this:14:18
t1mpversion-script: python3 ../qmenta_gui/python/qmenta/gui/version.py14:18
popeyit was a bug that it allowed int14:18
t1mpso when I build the package now, that cannot be executed. I don't have those files in the vm that multipass created. I guess with snapcraft2 it was not executed in a vm.14:18
popeyone thing you might want to try is "snapcraft --shell-after" which drops you into the vm post-build, which allows you to debug these things14:20
popeyI have started using adopt-info: partname, and using "snapcraftctl set-version '$(something)'" to set the version in override-build: | section in the part14:20
popey(there's some examples of this in the snapcrafters repo)14:20
mvozyga: https://github.com/snapcore/snapd/blob/master/sanity/apparmor_lxd.go#L33 <- this is what we have currently for testing inside containers14:23
=== ricab|lunch is now known as ricab
t1mpdebugging is a bit of a hassle, because every time I rebuild the snap it takes 10 minutes or so14:49
popeythe handy thing about debugging with --shell-after, is you get dropped in the VM, and can cd project/ and then run snapcraft *in* the VM14:50
popeywhich will save time14:50
t1mpI'll try that in the next re-run :)14:50
zygamvo: right, we would have to have some more logic to check if we are running without pid namespace14:55
zygamvo: er, uid namespace14:55
zygamvo: this is not sufficient (separate issue)14:55
t1mphmm.. The snap I create locally works as expected. But the snap created from the same source, on jenkins, has a bug.14:55
t1mpI can try to install snapcraft 3 there. But then I have Google VM -> Docker Ubuntu 18.04, with snapcraft 3 snap package, creating a qemu (?) vm to build the snap package..?15:00
t1mpif I am already in an ubuntu 18.04 docker image, do I really need a VM for creating snap packages?15:02
Chipacat1mp: no, if you're in docker, you can tell snapcraft to chill about the vm15:02
popeythere's a way you can do that, yes.15:02
Chipacaif you're already in an ad-hoc vm that is15:02
t1mpyeah, I'm in a container15:02
* Chipaca nods15:03
Chipacait wasn't --chill-about-the-vm-already15:03
popeyI can't for the life of me remember what it is15:03
t1mpthe container is only created to run tests and build the package15:03
popeysergiusens: ^ what's the "let me do dangerous things" parameter for snapcraft? (to build on a host)15:03
Chipacat1mp: popey: --destructive-mode15:05
* Chipaca hugs grep15:05
popey💣15:05
Chipacafwiw: grep -hor --include '2019*' 'snapcraft.*--[a-z_-]*' ~/.config/hexchat/logs/15:06
t1mpChipaca: I guess that is not printed on purpose when I do --help?15:11
t1mpChipaca: anyway, thanks :)15:11
Chipacat1mp: your guess is as good as mine15:11
Chipacat1mp: it's probably supposed to only be internal15:12
popeybugs.launchpad.net/snapcraft :)15:12
Chipacat1mp: as it's what snapcraft uses to launch snapcraft inside the vm, afaik15:12
t1mpah. snapcraft help build shows it.15:12
mupPR snapd#6510 opened: tests: stop catalog-update test for now <Created by mvo5> <https://github.com/snapcore/snapd/pull/6510>15:27
sergiusensChipaca: popey t1mp it is printed with `snapcraft <pull|build|stage|prime|snap> --help`15:29
sergiusenssnap is the default param for snapcraft, I wish we did not have a default, life would be simpler15:30
sergiusenspopey: when inside the VM, no need to `cd project`, you can run snapcraft from whatever PWD15:32
popeyTIL15:32
jdstrandmvo: I commented on https://github.com/snapcore/snapd/pull/6508. I think the access() is unneeded...15:46
mupPR #6508: packaging: avoid race in snapd.postinst <⚠ Critical> <Created by mvo5> <https://github.com/snapcore/snapd/pull/6508>15:46
t1mpis snapcraft using qemu instead of lxd to be compatible with windows/macos?15:47
sparkieg`t1mp: essentially, yes15:51
=== sparkieg` is now known as sparkiegeek
zygafor all the meetings https://twitter.com/garabatokid/status/1016240967702204416 ;-)15:54
* cachio lunch15:55
jdstrandmvo: oh, I misread. sorry, nm15:58
mvojdstrand: thank you15:59
mvojdstrand: maybe I should have added a comment there or rewrite the code, its definitely not obivous (which is why this is buggy :(15:59
jdstrandmvo: maybe an added comment "If after the rewrite we are still not ok, die" or something16:00
jdstrandmvo: but pr approved as is16:01
Chipacajdstrand: very low priority ping about icdiff16:07
mvojdstrand: \o/ thanks, I will add the chnage16:09
pedronismvo: why the mount-support.c change there ?16:15
pedronisI mean I mentioned that issue in another PR16:16
pedronisbut why mixing it with that?16:16
mvopedronis: the upgrade test from 2.15.2 fails without it16:19
mvopedronis: it will die because it claims it can't find ubuntu-core16:19
mvopedronis: 2.15.2ubuntu1 is still using ubuntu-core as base16:19
jdstrandChipaca: you wouldn't know it because I haven't been transparent, but I've been working hard on a review-tools update to support that16:20
jdstrandthey had some old janky code that was brittle and I rewrote it. should be committing today, at which point I'll add the aliases16:21
jdstrand(and ask for a store pull, etc)16:21
pedronismvo: can put it in a comment somewhere in it16:21
mvopedronis: sure, adding it now16:23
pstolowskizyga: i see that repo.ResolveDisconnect is only used by api - disconnect; i'm going to change it to return []*Connection instead of []*ConnRef to remove the need for second call to repo. do you see any problem with that?16:25
mvopedronis: updated the comment16:25
zygapstolowski: I honestly don't know, is it tricky?16:26
zygalooking at the code now16:26
pstolowskizyga: no, not really16:26
pstolowskizyga: and it's easy to get ConnRef from Connection, if needs be16:27
pstolowskizyga: this will just let avoid ping-pong with the repo for disconnect case16:27
zygayeah, looks ok16:27
zygaI wonder if connref should grow something16:27
zygato detect unexpected changes colliding16:28
pstolowskizyga: connref? can you elabortae16:28
pstolowski*elaborate16:28
zygaa cookie derrived from the number of changes to the repo16:29
zygaso you can get a conn ref in one place16:29
zygapass it elsewhere16:29
zygaand use it if it is still "fresh'16:29
zygayour desire to change the return type, is it to avoid a race?16:29
pstolowskiah, a "smart pointer" ;)16:29
pstolowskizyga: yes, to avoid repo.Connection() on a connref returned by repo.ResolveDisconnect(), that may no longer be there16:32
pstolowskion the other hand, i'm not sure it's worth fixing16:33
pstolowskiit's basically for the cases where you don't fully specify plugs or slots, and let resolve compute the list16:34
pekkarihI #snappy, I hit an error with juju snap, cannot create user data directory, Permission denied, can anybody help?16:39
zygapekkari: can you be more specific please16:39
pekkariI see -> cannot create user data directory: /path_to_my_home_folder/snap/juju/6362: Permission denied when I execute anything in juju16:40
zygawhat is your home folder path?16:40
pekkarifor some reason, it's decided to be under /var/lib/home/my_user, I cannot tell who was having that great idea :$16:42
zygapekkari: that location is not supported by snapd16:42
pekkarinevertheless the folder ~/snap/juju/6362 exists16:43
pekkarihummm... unfortunately I cannot decide on the folder path zyga, customer stuff16:43
mupPR snapd#6511 opened: daemon/api: fix error case for disconnect conflict <Created by stolowski> <https://github.com/snapcore/snapd/pull/6511>16:43
zygapekkari: we cannot support arbitrary folder names either16:43
pekkariI'll need to try to bind mount the folder on /home/my_user16:44
zygapekkari: I'm curious what was the motivation to store the home folder in /var/lib/ rather than in /home, is it a service (e.g. jenkins) or just some specific customer convention?16:48
pekkarizyga: customer convention, no service, but shared account for a team16:48
Chipacajdstrand: thanks for the update! no worries about the rest of it16:48
pekkarihave you any experience using mount --move zyga? seems to be the way to go as long as bind still resolves the /var/lib/home/blah folder16:49
pekkariI just never happen to use it16:49
zygapekkari: using it in which sense? yeah it works and snapd used to use it internally for one specific case16:50
zygapekkari: but I'm not using the feature myself much16:50
pekkariwell, use it to solve the path problem without screwing the home folder where I have the sensitive info16:51
zygapekkari: I don't understand, can you explain what you mean?16:51
pekkariI just want to know it's a safe operation, ta16:52
zygaperhaps? I don't know for sure16:52
zygaon a live production system?16:52
pekkarino, testing env, but still I have an fce workspace there that I'm taking backups just in case16:53
pekkarigrrrr. shared mount...17:01
Pharaoh_Atemzyga: does that mean that home directories on Silverblue don't work either?17:12
Pharaoh_Atemthey're in /var/home rather than /home17:12
* cachio afk17:15
zygaPharaoh_Atem: correct17:55
zygaPharaoh_Atem: we cannot support all the random locations people come up with17:55
Pharaoh_Atemwell, it's symlinked to /home17:55
zygaPharaoh_Atem: we can add support for /var/home perhaps but not for every single random combination :)17:55
zygaPharaoh_Atem: with mount namespaces, symlinks don't matter sadly17:55
Pharaoh_Atemwell /var/home is used by Atomic Fedora and SUSE MicroOS17:56
zygawell, they should have just used home17:56
zygait's just a location after all17:56
zygathey can mount there17:56
Pharaoh_Atemit's when there isn't separate partitions17:56
zygawe can support /var/home eventually17:56
zygajust weird17:56
zygaI don't see how this is related to partitions17:56
Pharaoh_Atemthe standard layout has two partitions, one managed by OSTree and another umanaged17:57
Pharaoh_Atem*unmanaged17:57
Pharaoh_Atemthey've moved all the written stuff to there by default17:57
* Pharaoh_Atem shrugs17:57
zygaif your ostree has /home you can mount there, right?17:57
Pharaoh_Atemyes17:57
Pharaoh_Atemand people do if they have a separate /home partition17:57
zygaso what's the need for /var/home?17:57
Pharaoh_Atemif when they don't have it17:58
zygayou don't need a separate home partition17:58
Pharaoh_Atemusually it'd be / if you don't have a separate /home17:58
zygayou can bind mount /home or even each /home/whatever17:58
zygayou can mount subtrees17:58
Pharaoh_AtemI know17:58
Pharaoh_Atembut they do it by symlink right now17:58
zygaso /home/foo is a symlink to /var/home/foo?17:59
zygaI guess snapd could learn a trick to make /var/home/$LOGNAME a way to access user's (whatever) home directory18:00
zygabut dragons apply :)18:00
zygaanyway18:02
zygaI meant to thank you for the release coordination the other day18:02
zygaI'm sleepy as hell now18:02
zygaI was meant to say I'll EOD now18:03
mupPR snapd#6510 closed: tests: stop catalog-update test for now <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6510>18:10
Chipacaniemeyer: could spread error if you told it to run on a system that doesn't exist?18:35
niemeyerChipaca: Hmm.. doesn't it?18:40
Chipacaniemeyer: not with globs18:40
Chipacaniemeyer: just spotted a test that had systems: [ubuntu-16-*, ubuntu-18-*]18:41
Chipaca(neither of those matches anything)18:41
niemeyerChipaca: Yeah, it's definitely plausible since we have the full real set in memory.. we ought to do that.18:41
niemeyerChipaca: ah, wait18:41
niemeyerChipaca: I misunderstood.. I thought you were asking for it to run on the cmdline and didn't match anything18:42
* Chipaca feels misunderstood18:42
niemeyerChipaca: Maybe it should warn in those cases you mention18:42
niemeyerChipaca: Not sure if error as it could make a refactoring pretty boring18:43
niemeyerChipaca: Or maybe let's just do it and see if people get mad at us18:43
niemeyerErroring on the safe side can't go too wrong18:44
Chipacaniemeyer: a warning would've helped indeed18:44
Chipacaniemeyer: and yeah there're probably people depending on the behaviour :-)18:45
pedronisChipaca: see mvo find on the PR, we need to use int64 and corresponding rand helper19:03
* Chipaca looks19:15
Chipacapesky puny computers19:15
ChipacaI'm going to EOD now before I break something important19:16
Chipacao/19:16
mupPR snapd#6507 closed: cmd/snap-confine: allow writes to /var/lib/** <Created by zyga> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6507>20:42
mupPR snapd#6509 closed: overlord/snapstate: discard mount namespace when undoing 1st link snap <Created by zyga> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6509>20:43
mupPR snapcraft#2471 closed: test: test-beta <do-not-merge-yet> <Created by sergiusens> <Closed by sergiusens> <https://github.com/snapcore/snapcraft/pull/2471>20:45
pedronisChipaca: surprisingly butn not, catalog-update passes also with /names down20:52
pedronisso we shouldn't turn it off20:52
Chipacapedronis: yes I noticed that locally, assumed mvo saw it fail20:52
pedronisChipaca: we should push to turn it on20:53
pedronisagain20:53
Chipacapedronis: push who?20:54
pedronisChipaca: you were pushing stuff recently? can you otherwise I can try to do it20:54
mvohow come this works when /names is down? just curoious haven't looked at the details of the test20:55
pedronismvo: it doesn't really check that we got date, it checks that we tried20:55
Chipacamvo: because all it does is check that catalog refreshes was attempted20:55
Chipacayeah20:55
pedronisdata20:55
Chipaca"at least you tried" golden star20:55
pedronisthe other two do check data20:56
pedronisapt-hooks20:56
pedronisand snap-advise-command (except that it was not run)20:56
pedronisChipaca: are you working on turning it back on? otherwise I'm close myself20:59
pedronisChipaca: mvo: pushed to turn catalog-refresh back on21:09
pedronis*catalog-update21:09
mvopedronis: ta21:11
mupPR snapd#6508 closed: packaging: avoid race in snapd.postinst <⚠ Critical> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6508>21:12
Chipacapedronis: sorry, was afk for a bit21:15
pedronisChipaca: it's ok21:16
pedroniswe should all be eoded really21:16
mvopedronis: yes, I need to go21:18
mvo5606 should be squashed21:18
mvoI will merge tomorrow into 2.3721:18
* mvo waves21:18

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