/srv/irclogs.ubuntu.com/2018/10/12/#snappy.txt

sergiusenscachio: that is a test that recently broke, joc can put you up to speed on that.00:27
cachiosergiusens, great, thanks00:58
mupPR snapcraft#2339 closed: lifecycle: switch to multipass by default <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2339>01:40
mupPR snapcraft#2344 opened: schema: remove the deprecated snap keyword for bases <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/2344>02:35
mupPR snapcraft#2345 opened: build providers: remove the qemu implementation <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/2345>02:47
=== chihchun_afk is now known as chihchun
mupPR snapd#5972 opened: tests: initial setup for testing current branch on nested vm and hotplug management <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/5972>03:35
zygagood morning05:23
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
mvogood morning! 5867 needs a second review06:32
mborzeckimorning06:51
mvohey mborzecki06:54
mvomborzecki: if you have a moment, a second review for 5867  would be great06:54
mborzeckimvo: looking06:56
mborzeckimvo: left a comment there07:05
=== pstolowski|afk is now known as pstolowski
pstolowskiheyas07:05
mborzeckipstolowski: hey07:05
mvohey pstolowski ! good morning07:08
mupPR snapd#5913 closed:  daemon: expose snapshots to the API <Snapshots 📸󠁟> <Created by chipaca> <Merged by chipaca> <https://github.com/snapcore/snapd/pull/5913>07:44
mupPR snapd#5879 closed: vendor, cmd/snap: refactor to accommodate the new less buggy go-flags <Created by chipaca> <Merged by chipaca> <https://github.com/snapcore/snapd/pull/5879>07:45
Chipacamorning07:46
Chipacawho was it that said something about everything being green, yesterday07:47
Chipacayou've doomed us all07:47
mborzeckiheh ;)07:48
zygaHey07:49
zyga(again)07:49
zygaSorry I sent kids to school and overslept again if that is a thing07:50
zygaI’ll be down shortly07:50
ChipacaWRT "Sorry I sent the kids to school", homeschooling sucks tho07:50
loologra: how long to land the kernel patch in source and a kernel deb and a kernel snap?  :-)07:59
pstolowskimvo: hey, wrt to hooks optimization from yesterday, hijacking seems to be the only painpoint. the problem is this: in ifacestate.Connect() i know which hooks exist based on snapinfo.Hooks (it has all hooks defined explicitely and also those not defined but present on the disk in meta/hooks). but hijacked ones (core - configure only?) are exceptional as (afaiu) they don't have to be listed in snap yaml (and they have no07:59
pstolowskifile on the disk). ideally i'd just ask hookmgr if a (snap, hook) IsHijacked, but we don't have access to hookmgr there. any thoughts on this? there would be no issue if we required hijacked hook to be explicitely listed in the snap yaml.07:59
Chipacaohhh, nice, there's a spread test that hasn't been working for who-knows-how-long and we didn't know because pipefail :-(08:05
mvoChipaca: *gar* we should simply kill pipefail again08:05
mvoChipaca: I think it trades one horror for another08:05
* Chipaca looks at mvo08:05
Chipacamvo: yes, yes it does08:06
Chipacamvo: my looking at you was because I was looking at 'git log -p' for the test in case08:06
Chipacamvo: you should feel guilty08:06
mborzeckiChipaca: which one?08:06
Chipacanothing serious :)08:06
mvopstolowski: hm - I need to look but if adding the one hijack we have to meta/snap.yaml for core that seems ok08:06
mvoChipaca: which oneß08:06
Chipacastill, let me guilt some cake out of mvo08:06
mvoChipaca: ?08:06
Chipacamvo: tests/main/help/task.yaml08:06
mvoChipaca: guilt is my default emotion08:07
Chipacamvo: grep -e and grep -E are *not the same thing*08:07
pstolowskimvo: but how about reverts?08:07
mvoChipaca: *cough* indeed - this looks like you reviewed this though ;) I usually write '(foo|bar)'08:08
Chipacamvo: and in particular, grep -evFx 'foo|bar' will always fail because the pattern is now vFx and 'foo|bar' the file to search for08:08
Chipacamvo: yep, i missed this too08:08
Chipacamvo: but what's the fun in blaming myself when I can blame somebody kilometers away08:08
mvoChipaca: :( what an annoying bug08:08
mvoChipaca: haha08:08
Chipacaanyway, nothing serious, i'll just be removing the test entirely soon :-)08:09
Chipaca(because I know how to do this in static tests now :-) )08:09
mvoChipaca: shame that its review friday or we could just push a pr that removes pipefail again08:09
Chipacamvo: i think we've already removed pipefail, otherwise this would've failed?08:10
mvoChipaca: oh, ok08:10
Chipacabut, yeah no, pipefail is just choosing one bag of bugs over another08:10
mvoChipaca: I thought you discovered while looking at it08:10
mvoChipaca: anyway, I get back to core1808:10
Chipacanah, while looking at running it 'by hand' for a static check08:11
Chipacamvo: enjoy your eighteen cores08:11
Chipacasergiusens: do you have tests for packing things with weird exclusion lists?08:12
dot-tobiasI'm having trouble installing snapcraft or git through apt in the classic snap on Core stable. “E: Sub-process /usr/bin/dpkg returned an error code (1)” → Does someone have a hint how I can fix that?08:15
mupPR core18#82 opened: hooks: use hkp:// to fetch the key from the keyserver <Created by mvo5> <https://github.com/snapcore/core18/pull/82>08:15
ogralool, thats a ppisati question, he said he'd put it nxt on his TOOD08:19
ogra*next08:20
loologra: Hmm ok, should we put a workaround in place?08:20
loolI realize we have been without a 3b+ compatible image since Jan/Feb, but I'm keen to wrap up this effort, especially since UC18 is coming soon08:21
pedronismvo: pstolowski: hijacking exists for core configure only, pstolowski are you doing your change in hookstate, and just for interface hooks?08:21
pedronis*and not just08:21
dot-tobias(re my own question five minutes ago): seems like this error line: “update-alternatives: error: error creating symbolic link '/etc/alternatives/jsonschema.dpkg-tmp': No such file or directory” is the root cause; once I've created /etc/alternatives everything works fine08:21
pedronispstolowski: we run configure even before we have the core08:22
pedronisso we cannot depend on it being there in the meta yaml08:22
pedronisby definition08:22
sil2100mvo: thanks for the PRs for console-conf! I'll release them into the PPA in some moments08:22
mvosil2100: I have one more pending08:22
pedronispstolowski: we need to do snap set system before we have core08:22
pstolowskipedronis: no, i'm doing it in ifacestate.Connect only for interface hooks. i know hijacking is for core configure only, but it's kinda 'open-ended' and made extensible08:22
mvosil2100: testing it right now08:22
pedronispstolowski: we cannot make it mandatory to have it in meta.yaml anyway08:23
pedronispstolowski: it's designed exactly to work even before the snap there08:23
pstolowskipedronis: i see08:23
pedronispstolowski: honestly if you are changing ifacestate, I would ignore the problem for now08:23
mvomborzecki: hm, I just go "error: internal error: unsupported download with instance name "/home/mvo/devel/snaps/core18/core18_18_amd64.snap"" from ubuntu image - that looks like a recent change, no?08:24
pstolowskipedronis: i could naively make an exception for core configure in ifacestate, but that would circumvent hijacking (which in the future can have more hijacked stuff, at least in theoyr)08:24
ogralool, well, honestly .... i wouldnt have held back on this issue but the test lab wil not be able to manage when their IPs change, i dont think its a biggie and it will be easily fixed with a kernel update08:24
ograand image with a known issue is still better than no image at all ... any workarounds would be rather hackish08:24
ogra*and an08:24
pedronispstolowski: I don't understand how configure relates to ifacestate08:24
pedronisI'm getting a bit lost08:24
mborzeckimvo: what was the command?08:25
mborzeckimvo: ah it was from ubuntu image08:25
loologra: I was thinking u-boot var to override mac address, perhaps via cmdline/initrd08:25
pstolowskipedronis: ifacestate.Connect() with my change will only create HookTask if it sees given hook. and if it doesn't create task for core configure, then hijacking will not even have a chance to run08:25
loolbut yeah, I agree it's hackish08:25
mvomborzecki: yes, via --extra-snaps08:25
loologra: alright, let's fix it cleanly and take the time08:26
ogralool, well, that first needs an initrd hack to make use of that uboot var08:26
Chipacamvo: ogra: who "owns" the classic snap?08:26
pedronispstolowski: what's the relation between ifacestate.Connect and core configure ?08:26
pedroniscore configure is not an interface hooks08:26
pedronispstolowski: I'm missing something here08:26
ograChipaca, theoretically mvo and me i guess08:26
mborzeckimvo: that's weird, it's like it's calling Download(/home/mvo/....core18_18_amd64.snap)08:26
pstolowskipedronis: aaah, you're right, silly me08:27
pstolowskiof course08:27
Chipacaogra: mvo: dunno if you read dot-tobias's report above, but it looks like we've broken it recently with /etc/alternatives shenanigans08:27
mvoChipaca: uh08:27
ograChipaca, i used it yeterday ... i that core 16 ?08:27
pstolowskipedronis: so yeah, it's theoretical problem anyway in case of future hijacked hooks08:27
ogra+s08:27
Chipacaogra: did you use it to install something that tried to write to /etc/alternatives?08:28
pedronispstolowski: I don't think we need to solve it now, anyway as I said given the nature of hijack08:28
pstolowski(i got carried away with configure hook because of that)08:28
pedronisexpecting it to be in the yaml08:28
ogranah, just to build a snap with snapcraft08:28
mvodot-tobias: thanks for the report! we will fix it soon08:28
pedroniswould not be a solution08:28
ogradid we change alternatives handling in core 16 ? i thought that was an 18 thing08:29
mvomborzecki: aha - nevermind, its not validation its just a stupid error message08:29
mvomborzecki: typo in the path08:29
mvomborzecki: so it does stat() fails -> tries to download08:29
mvomborzecki: which is silly, if it looks like a path it should give a useful error. sorry for the noise08:30
mborzeckimvo: right, we could produce more useful error in image.go:acquireSnap()08:30
mborzeckimvo: in case the snap ends with .snap08:30
mvomborzecki: yeah, not high priority but definitely a good improvement08:30
mborzeckimvo: also funny cause it would actually poke the store to get that snap? :)08:31
mborzecki(if it wasn't for that instance name check)08:31
mvomborzecki: yeah08:31
dot-tobiasmvo, ogra: I just double-checked, the error occurs on a raspi 3B with core 16-2.35.2 stable (rev 5546) and classic snap 16.04 rev 26 (edge)08:33
dot-tobias(/etc/alternatives thing with apt install)08:33
Chipacadot-tobias: and this was trying to install what?08:37
dot-tobiasChipaca: Tried installing git and snapcraft (independently)08:38
mupPR snapd#5944 closed: cmd/snap: speed up unit tests <Created by chipaca> <Merged by chipaca> <https://github.com/snapcore/snapd/pull/5944>08:38
ograweird, i did the same just yesterday08:38
ograon a dragoboard though but that shouldnt matter08:39
mborzeckiChipaca: left some comments in #5955 and #595708:40
mupPR #5955:  cmd/snap, tests: snapshots for all <Snapshots 📸󠁟> <⛔ Blocked> <Created by chipaca> <https://github.com/snapcore/snapd/pull/5955>08:40
mupPR #5957: overlord/snapshotstate/backend: fall back on sudo when no runuser <Snapshots 📸󠁟> <Created by chipaca> <https://github.com/snapcore/snapd/pull/5957>08:40
Chipacamborzecki: yep, just reading08:40
Chipacamborzecki: when you say "list" i'm assuming you menan "list-snapshots" or some such?08:40
mborzeckiyes08:41
Chipacamborzecki: note "saved" was not my decision, but was arrived at after much discussion08:41
mborzeckiahh ok, so then it08:41
Chipacasame for all of the commands in there, actually08:41
mborzecki's ok for me08:41
Chipacaonlu one I winged was check08:41
Chipacaonly*08:41
mborzeckiChipaca: maybe we could make that check help message more friendly08:42
Chipacamborzecki: «check-snapshot tells you if your 📸󠁟 is actually a 🍆»?08:43
* Chipaca runs08:44
mborzeckieggplant?08:44
Chipacavegetable08:45
mborzeckihaha08:45
Chipacamborzecki: https://www.dictionary.com/e/emoji/eggplant-emoji/08:46
mborzeckiwell, hashsums feels brutalist :)08:46
mborzeckiwow, that's one interesting emoji08:46
Chipacahehe08:47
mborzeckimvo: the logs are here https://forum.snapcraft.io/t/snapd-not-responding/7867/608:52
mborzeckihm should failure in catalog refresh be fatal?08:55
mborzeckinvm, the errors are only logged, the machine is rebooting though09:01
mvomborzecki: hm, hm, the logs are not exactly telling much :(09:07
mvomborzecki: I guess we need grub-editenv list next to see if something strange in our boot config is happening09:07
mvomborzecki: but it might be something external rebooting, like a broken watchdog or something09:08
* mvo scratches head09:08
zygamvo: systemd knows why the system rebooted09:14
* zyga tires to remember how09:14
mborzeckizyga: journalctl -b -1 ?09:17
zygaI think there was something deeper09:26
zygaperhaps it was not systemd but UEFI09:26
zygaAFAIK the boot reason is stored for user space to know09:26
zygabut starting with the last boot log would be useful09:26
mvozyga: did scott get back to you last night about the overlay issue btw?09:26
mvozyga: I wonder what the status here is and if we need some last minute fixes09:27
zygamvo: I read the backlog09:27
zygaand I have the data to reproduce this09:27
zygaI think it is problematic, we were not expecting this use case09:27
zygagive me a moment09:27
zygawoah!09:30
zygaI managed to install a snap09:30
zygaafter installing core09:30
zygabut then core install failed09:30
zygaand I got a snap without core09:30
* zyga collects changes09:30
=== cpaelzer_ is now known as cpaelzer
zygahttp://paste.ubuntu.com/p/q7pNPtJKNH/09:32
zygamvo: the system is using overlayfs09:33
zygamvo: AppArmor service is active (despite some logic that disables it when / is overlayfs, the logic doesn't trigger in this case because the backing directory is different,09:34
zygasnapd detects the overlay and injects a special profile for snap-confine09:35
zygabut that profile is probably not active, we did not reload the profile of the system-loaded snap-confine (the one in /etc, not from the core reexec)09:35
pedronismvo: one of the conclusion was that they don't actually need snapd to work09:36
pedronisin that context09:36
pedronisindeeed is a bit of waste of snapd to seed there09:36
zygaI think there is a real bug still09:37
pedronisbut they have use case with overlayfs that need to work to some extent09:37
pedroniszyga: it's ok, I just expected them to then lament that we made seeding work but then boot there is slow :)09:37
zygaheh :)09:38
pedronisI mean fixing bug is orthogonal to turning off snapd there anyway09:38
mvopedronis: aha, thank you09:38
zygainterestingly, in the scenario today we do not reexec09:39
zygabecause 18.10 is ahead of stable09:39
zygathat probably compounds the bug I mentioned09:39
zygabut something more is fishy, hold on09:39
zygaaha09:40
pedronismvo: I think last words sounded like they could probably work around things on their side by disbaling snapd.service completely there09:40
pedronisthat sounded what steve was proposing09:40
zygawe grant permission: "/media/root-rw/overlay/{,**/}" r,09:40
zygaand the denial is: "/overlay/" r,09:41
mupPR snapd#5973 opened: image: improve validation of extra snaps <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/5973>09:41
zygaI suspect the paths differ because of something that was done in intrd09:41
mborzeckimvo: this should catch the typos and invalid names ^^09:41
mvomborzecki: nice09:41
zygamvo: we can detect and add a hack09:42
zygawith that changed I can install and run a simple snap09:42
zygatrying to install lxd now09:43
zygatrying to use lxd for whatever09:45
zygamvo: lxd doesn't work because it cannot setup networking09:47
zygafailed to list ipv4 rules for LXD network lxdbr0 (table filter)09:47
zygathere are no more denials09:47
zygaso perhaps missing module or something like that09:48
zygaanyway, I think that we can fix the immediate issue they saw with a one liner hack09:48
zygabut it's not something I'm very proud of09:48
zygamvo: let me prepare a patch, you can decide09:49
mvozyga: ta09:54
mvoand 5971 needs a review09:57
Chipacamvo: i retried 5971 ~5 times last night09:57
Chipacafyi09:58
mvoChipaca: meh, that sounds nasty09:59
mvoChipaca: failures all over the place? or some pattern?10:00
mvothings look very red in general right now :/10:00
Chipacamvo: no discernible pattern10:00
zygamvo: what is the magic LP:# syntax that is picked up by gnome-terminal10:00
zygafor launchpad bug references10:00
Chipacawat10:00
mvozyga: in changelogs we use LP:#123410:01
mupPR #1234: debian: make snapd get its environ from /etc/environment <Created by chipaca> <Merged by niemeyer> <https://github.com/snapcore/snapd/pull/1234>10:01
zygathanks!10:01
cjwatsonmissing a space there10:01
mvozyga: *but* gnome-termainal I'm not sure10:01
mvocjwatson: aha, thanks (^- zyga)10:01
cjwatsonLP: #123410:01
cjwatsonhttps://help.launchpad.net/Code/Git#Linking_to_bugs has the regex10:01
mvota!10:01
zygahmm10:06
* zyga found more weirdness10:06
zygabut anyway10:06
zygapatch incoming10:06
zygamvo: I think there will be two patches, one is ready, the other one may be needed to trigger regular snap-confine profile reload10:08
zygawe don't have code for that, do we?10:08
zygaplus this will go south if someone notices and fixes the apparmor.service unit not to start10:08
mvozyga: hm, hm10:09
mupPR snapd#5974 opened: osutil: workaround overlayfs on ubuntu 18.10 <Created by zyga> <https://github.com/snapcore/snapd/pull/5974>10:15
zygamvo: ^10:15
zygamvo: I also updated the bug report10:15
zygaI will check the other part of this issue now10:15
mvota10:16
zygamvo: ok, I looked10:17
mupPR snapd#5975 opened: ifacestate/hooks: only create interface hook tasks if hooks exist <Created by stolowski> <https://github.com/snapcore/snapd/pull/5975>10:17
zygawe are good, we do reload profiles10:17
pstolowskimvo, zyga, pedronis ^10:17
mvopstolowski: thanks10:20
mvoha! 5971 is green - now it just needs reviews :)10:20
pstolowskimvo: i'm curious how it improves situation10:20
niemeyermvo: Minor suggestion for the message on #5971 and LGTM10:22
mupPR #5971: interfaces: include invalid type in Attr error <Simple 😃> <Created by mvo5> <https://github.com/snapcore/snapd/pull/5971>10:22
mvoniemeyer: thank you!10:22
mupPR snapd#5739 closed: interfaces/default: don't scrub with change_profile with classic <Created by jdstrand> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/5739>10:32
mupPR snapd#5867 closed: many: enable layouts by default <Created by zyga> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/5867>10:32
zyga\o/10:32
Chipacamvo: question for you sir: is there anything using .snapignore that you know of?10:33
mupPR snapd#5971 closed: interfaces: include invalid type in Attr error <Simple 😃> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/5971>10:33
mvoChipaca: I don't know10:33
Chipaca:+1:10:34
Chipaca:)10:34
mvoChipaca: is it supported by snapcraft too?10:34
mvoChipaca: or just by us?10:34
Chipacamvo: no10:34
mvoChipaca: ok, then I think its fine to kill it10:34
Chipacamvo: it's from 201510:34
mvoChipaca: its cargo cult from click10:34
Chipacayep10:34
Chipacamvo: and what about the exclusion of DEBIAN/?10:34
Chipacasounds weird also10:34
mvoChipaca: same I would say10:34
Chipacamvo: maybe we don't need exclusions at all :-)10:35
mvoChipaca: killemall10:35
mvoChipaca: haha10:35
mvoChipaca: really?10:35
mvoChipaca: are those the only patterns? we are an inclusive bunch10:35
Chipacamvo: well, snapcraft very carefully builds the thing10:35
Chipacamvo: nah, we have a bunhc10:35
Chipacabunch10:35
mvogood point10:35
mupPR snapcraft#2345 closed: build providers: remove the qemu implementation <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2345>10:35
mupPR core18#82 closed: hooks: use hkp:// to fetch the key from the keyserver <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/core18/pull/82>10:41
zygapstolowski: reviewed the hooks PR10:45
mborzeckizyga: wonder if we could improve detection of snap mount dir in snapd, say what if we could ask snap-confine for the right path (i.e. the path it was configured with)?10:46
zygamborzecki: I would actually do it backwards10:47
zygamborzecki: have snapd tell snap-confine10:47
pstolowskizyga: thanks! looking10:47
zygaand have the entire logic in dirs.go in one place10:47
zygamborzecki: it's not supposed to be a new PR Friday but I have a PR that removes the directory configure option from snap-confine that I mentioned a few times10:47
mborzeckizyga: yeah, one source of truth would be nice10:48
zygaone source of facts ;-)10:48
mborzeckizyga: as for no-new-PRs, I opened one :P although a simple one10:48
zygamborzecki: let's explore this on monday10:48
zygaand devote this day to important fixes and reviews10:49
zygamvo: have you seen the overlay PR:?10:49
ppisatiogra: we already have facilities to set the mac address from DT: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial/commit/?h=raspi2&id=d093067d07ffba9f50d38a2e572f7ddbd36daf5a10:49
ppisatiogra: check drivers/of/of_net.c::of_get_mac_address10:50
ppisatiogra: it's the same stuff as the other patch10:50
ppisatiogra: oh, same for LEDs10:51
ppisatiogra: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial/commit/?h=raspi2&id=1ad73f268cedf4a7999fabf9aecb77e0f0cd3c0010:51
pstolowskizyga: replied11:05
zygayep, I see11:05
jdstrandmvo: hi! as you probably saw in the email, I didn't finish the k8s interfaces, but I could today. I just have a couple of open questions I can discuss with niemeyer to clean things up for the review11:42
zygajdstrand: hey11:44
jdstrandniemeyer: hi! do you have a few minutes to discuss some kubernetes interfaces?11:44
jdstrandthat I'm working on11:44
jdstrandniemeyer: I have 3 questions11:45
jdstrandhey zyga :)11:45
zygajdstrand: can you look at https://github.com/snapcore/snapd/pull/597411:45
mupPR #5974: osutil: workaround overlayfs on ubuntu 18.10 <Created by zyga> <https://github.com/snapcore/snapd/pull/5974>11:45
zygait's very short, just tell me what you thibnk11:45
jdstrandzyga: what does mountinfo say about this system?11:52
zygajdstrand: the test I added shows the mountinfo data exactly from the affected system11:53
zygaand I still have it booted if you have any questions11:53
jdstrandzyga: that shows a single entry, yes, but are there multiple?11:53
zygamultiple overlayfs-es?11:54
jdstrandeg, maybe there are layered overlayfs11:54
zygano, there's only one11:54
zygalet me pastebin the whole file11:54
zygahttp://paste.ubuntu.com/p/6kgSyPjJGG/11:55
zygaI have to "paste" the URL by hand because $reasons11:55
mborzeckiwhen a snap has sockets or timers, snapctl stop <snap> only stops the service, but not the sockets nor timers, then #5777 addresses that, but when snapctl start is issued it starts sockets, timers and the service :/11:56
mupPR #5777: wrappers/services.go: don't start disabled services <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/5777>11:56
zygamborzecki: I'm more re-affirmed that we should expose the full set of services, sockets and timers inside the snap and not outside11:56
zygamborzecki: and on the outside, only expose "knobs" that are arbitrary subsets of the real set11:57
zygamborzecki: that are defined by the snap developer11:57
mborzeckizyga: well, atm you cant really disable a socket or a timer from inside the snap11:57
mborzeckiidk feels like we're missing something or trying to hide too much11:58
zygaI agree11:58
jdstrandzyga: you are supposed to end up with this rule: '"###UPPERDIR###/{,**/}" r,' which becomes '"/overlay/{,**/}" r,'11:59
jdstrandzyga: which should cover '/overlay/'11:59
zygaright11:59
zygajdstrand: am I missing something/12:00
jdstrandzyga: oh, you are saying that you fixed *that*12:00
zygayes12:00
zyga:D12:00
jdstrandI thought you were saying that still remained12:00
zygano no, it's working with this patch12:00
zygabut I cannot explain the behaviour of the kernel12:00
jdstrandok, well the overlayroot thing is doing a pivot_root or something12:00
zygahmmm, I'm not sure it does12:01
zygabut it may12:01
zygabut ...12:01
zygathe upper and lower paths are still available12:01
zygaI mean, /media/... all of that exists and shows the real stuff12:01
zygabtw12:01
zygaI noticed something odd, look at the path of the workdir12:01
zygayes, it ends with _12:01
zygawhy?12:01
ograppisati, well, then i dont get why it does not work ... does the code actually use "local-mac-address" from the DT ?12:01
jdstrandI was wondering about that too. but that is setup by whatever did the mount12:01
jdstrandwell, typically12:02
zygayep12:02
ograppisati, because thats where it is in the DT12:02
jdstrandmaybe the kernel changed12:02
jdstrandzyga: what package is used to setup the mount?12:02
zygaI don't know but there is /etc/overlayroot.local.conf12:02
zygalet me look12:02
zygalooks like overlayroot12:03
mvojdstrand: yeah, saw it but no worries, if its isolted we can cherry pick it later12:03
zygajdstrand: cloud-initramfs-tools12:03
ijohnsonmborzecki: what do you think I should do with #5777 ? I haven't gotten a chance to add tests, but from the forum it seemed unclear that everyone was on board with `snap stop <service>` always also stopping the associated sockets/timers, which is what I implemented12:03
mupPR #5777: wrappers/services.go: don't start disabled services <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/5777>12:03
jdstrandah, cloud-initramfs-tools12:03
zygajdstrand: reading that now12:04
zygagod how I hate shell12:05
jdstrand# PERSIST_DIR will persist after pivot-root12:05
zygamiles of shell in initrd12:05
jdstrandso, something is doing that12:05
zygayeah12:05
zygabut it is set to /run/initramfs12:05
jdstrandthat's good enough for me to explain the directory12:05
jdstrandthat dir, yes12:06
jdstrandthe point is, its talking about the initramfs pivot, etc12:07
Chipacazyga: is your lab & mac available for some poking?12:07
zygaChipaca: sure12:07
Chipacazyga: ok thanks12:07
Chipacazyga: ssh: Could not resolve hostname imac-pro-zygmunt.local: Name or service not known12:07
zygaah, I think I tried to fix the hostname12:08
zygaone sec12:08
Chipacaheh12:08
zygamoved from wired to wifi12:08
zygatry ipro-zygmunt.local please12:08
Chipacabetter12:08
zygaI renamed it because while I had both connections macOS would rename the hostname to unclash it with itself12:08
zygajdstrand: so how do you feel about the PR12:09
zygaI think nothing short of teaching apparmor about pivot root will break this12:10
zygabut if that happens all hell will break loose12:10
zyga(we'll notice)12:10
jdstrandah, the man page talks about overlayroot doing a chroot12:11
jdstrandzyga: I like the pr fine. I don't like why we don't know why the path is what it is12:11
zygabrb, the dog is telling me it's time to go12:16
zygajdstrand: grepping for pivot_root in the package yields nothing12:16
zygajdstrand: but chroot *is* used12:17
zygajdstrand: btw, I looked at /proc/self/root and it was /12:17
zygais that expected if a chroot happened?12:17
zyga(I'll reply from the phone)12:17
jdstrandyes, and with chroot, you'll see the beginning of the path for the chroot (ie, the chroot directory is known to apparmor)12:17
zygaAnother question is why this happens here and not on the live cd12:19
zygaIs it just a coincidence that it works on the live cd?12:19
zygaAbout chroot, so are you saying that since I saw / and not some longer path then chroot did not happen?12:20
jdstrandzyga: I'm saying that a) I didn't read or trace the whole source to figure out exactly what is happening but that b) we know it is using a combination of overlay and chroot (as opposed to overlay and pivot_root)12:25
jdstrandzyga: so I responded to the PR with that in mind12:26
jdstrandzyga: in summary, I approved it, but please adjust the comment12:27
zygaAck12:27
zygaThank you12:27
mupPR snapd#5976 opened: interfaces: improve Attr error further <Created by mvo5> <https://github.com/snapcore/snapd/pull/5976>12:27
jdstrandniemeyer: can you ping me when you have a couple of minutes, I don't want to just fire of the questions with no context12:27
jdstrandoff*12:27
mupPR snapd#5973 closed: image: improve validation of extra snaps <Simple 😃> <Created by bboozzoo> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/5973>12:31
niemeyerjdstrand: Heya12:41
niemeyerjdstrand: I have a few meetings back to back now, but later in the afternoon it's open.. happy to chat12:42
jdstrandniemeyer: hi!12:42
jdstrandniemeyer: I think this should be quick12:42
jdstrandniemeyer: the context is that we want interfaces to support k8s worker nodes12:43
jdstrandniemeyer: and this is defined as kubelet and kubeproxy12:43
jdstrandniemeyer: which are two different daemons12:43
jdstrandniemeyer: so I have 2 interfaces, currently named k8s-kubelet and k8s-kubeproxy. I think that should change12:44
jdstrandniemeyer: to use -support at least. eg, k8s-kubelet-support or just kubelet-support12:44
jdstrandprobably the latter12:45
jdstrandthoughts?12:45
jdstrand(and of course, kubeproxy-support (or whatever))12:45
jdstrandniemeyer: these are similar to other -support interfaces in that we are granting special things that only these need12:46
mupPR snapd#5977 opened: release: 2.36~pre2 <Created by mvo5> <https://github.com/snapcore/snapd/pull/5977>12:48
mupPR snapd#5947 closed: many: cleanup remaining parallel installs TODOs <Parallel installs ⛓> <Created by bboozzoo> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/5947>12:53
popeyOn a clean core install, if you snap refresh it reboots twice. One for core, one for kernel. Why doesn't it bundle them in one boot?13:12
ograpopey, never heppened to me ... weird13:36
ogra*happened13:37
popeymight be pilot error13:39
ppisatiogra: uhm, ok13:39
ppisatiogra: let me dig in13:39
ograppisati, i definitely see the MAC changing in the running system but i also see the MAC fixed in the DT ... so something isnt properly picked up13:43
ppisatiogra: do you get a random MAC at every reboot?13:45
ograppisati, yes ... ifconfig shows a different one every boot ...13:47
ograthe devicetree has the same one in "local-mac-address" though13:47
ogra(the same non-changing one that is ... differing from ifconfig output)13:48
ppisatiogra: ok13:49
smoserzyga: i think i root-cause diagnosed that bug. commented on your pull request.13:49
zygasmoser: looking13:49
smosersorry for the bikeshed conversation with jdstrand (i hadn't noticed he'd commented there) on the code comments :)13:51
smoserbut i do think it better to mention the 'overlayroot' package than "Ubuntu server 18.10"13:51
* pstolowski late lunch13:53
roadmrzyga: time to try that snap upload that was giving you trouble - the required version of reviewer tools is now in the store13:56
jdstrandsmoser: the overlayroot man page and scripts specically say they used chroot. if pivot_root was used, I would expect the directory to be '/', not '/overlay/' in the apparmor denial. regardless. the comment can be further generalized. the code was never meant to be completely generalized for any overlay situation13:56
zygaroadmr: thanks, I will try now13:57
zygaI tried earlier today without success13:57
zygasmoser: looking at the source of the package I was unable to find the use of pivot_root but I did see chroot13:57
jdstrandsmoser: but rather only meant to handle specific situations where we know snaps are being run in a overlayfs situation. we need better apparmor/overlay support in the kernel to be better13:57
mvocachio: I triggered the 2.36~pre2 core build, should be in edge ~1h13:58
smoserjdstrand: overlayroot is a "normal" initramfs hook. it sets up some mounts and then lets initramfs do its normal pivot and exec of /sbin/init13:58
mvo(max)13:58
zygasmoser: ah, I see, this explains it then13:59
zygaand is in sync with the pivot_root behaviour of apparmor13:59
jdstrandwell except that upperdir is showing up as /overlay/ somehow with apparmor13:59
jdstrandI don't know the overlyroot and initramfs stuff well enough to explain why it is happening that way14:00
smoserjdstrand: did you read my comment ?14:00
jdstrandI did14:00
niemeyerjdstrand: +1 to dropping the k8s- prefix14:00
smoserthe code just should not assume that the first field '/cow' in casper14:00
smosermeans anything14:00
niemeyerjdstrand: Are their needs different enough to justify the two interfaces, or would it be worth exploring the potential for a single one?14:00
jdstrandsmoser: as mentioned, this code can't be generalized without better apparmor/overlay support in the kernel14:01
smoserrather it needs to parse /proc/mounts in reverse order to find the second field that matches.14:01
smoserit can be generalized for at least these 2 cases.14:01
smoserbut yes, i do understand that apparmor and overlayfs aren't the best of friends.14:02
jdstrandniemeyer: ok, well, there is an existing kubernetes-support interface, but it is ancient and nothing uses it14:02
jdstrandniemeyer: jcastro (yes, that ancient) was super jazzed about k8s as a snap so I through something together for comment and then never heard anything back14:03
niemeyerjdstrand: But are they mostly the same?14:03
jdstrandniemeyer: they is significant overlap, yes. the old kubernetes-support has overlap with docker-support too though14:04
jdstrands/is//14:05
cachiomvo, nice14:05
jdstrandniemeyer: see https://github.com/snapcore/snapd/compare/master...jdstrand:k8s-worker-interfaces?expand=114:05
jdstrandniemeyer: but kubelet needs more than kubeproxy14:05
jdstrandniemeyer: and kubelet needs a lot14:05
jdstrandniemeyer: specifically, kubelet needs to do mounts into the container, but kubeproxy does not14:06
niemeyerI see14:06
jdstrandniemeyer: so it would be nice if kubeproxy didn't have those accesses14:06
jdstrandniemeyer: we could have attributes for flavors of a single interface14:06
jdstrandwhich achieves the desired security properties, but isn't as transparent to the user of the system14:07
niemeyerjdstrand: +114:07
jdstrandok, I'll refact to use attributes14:08
jdstrandrefactor14:08
niemeyerjdstrand: If we have nothing using kubernetes-support, we should probably kill it14:08
jdstrandniemeyer: well, or, I could just use it with attributes :)14:08
jdstrandpedronis: can you do a store search to see if anything is using the kubernetes-support interface?14:09
jdstrandniemeyer: I'll work through those details, but I have another interesting question14:09
pedronisjdstrand: in a meeting, I can in a bit14:09
jdstrandniemeyer: so, you may recall the probelsm with ptrace14:09
jdstrandpedronis: thanks14:10
niemeyerjdstrand: Meeting rolling too, but feel free to go ahead and I'll reply once I'm off14:10
jdstrandniemeyer: specifically, the kernel triggers a ptrace (trace) denial in situations when an application is not actually trying to attach and read its memory/etc14:10
jdstrandniemeyer: eg, certain invocations of 'ps' will cause ptrace denials14:11
jdstrandniemeyer: that use of ptrace is harmless enough, but we can't tease out the difference in policy between that and a full on gdb-style "I'm taking you over" ptrace14:12
jdstrandniemeyer: because the kernel doesn't give us the info to do that (it is kinda similar to how SYS_ADMIN is a catchall for a lot of things. 'trace' groups unrelated things together14:13
jdstrand)14:13
jdstrandniemeyer: ok, so, we need to allow 'ps' in, say, system-observe (that is the point of the interface), but we don't ptrace (trace) of unconfined, etc, etc because that would constitute a sandbox escape14:14
jdstrandniemeyer: all of the above is context for the fact that we have 'deny ptrace (trace)' rules sprinkled in a couple interfaces to cut down on ridiculously verbose logged denials, but allow the use of something like 'ps' (ps will trigger the denial but work fine otherwise)14:15
mupPR snapd#5777 closed: wrappers/services.go: don't start disabled services <Created by anonymouse64> <Closed by anonymouse64> <https://github.com/snapcore/snapd/pull/5777>14:16
jdstrandniemeyer: *but* k8s actually needs 'ptrace (trace)' to function. because you can't undo a deny rule, the k8s worker can't (currently) specify 'plugs: [ system-observe ]'14:17
mupPR snapd#5970 closed:  snapstate: tweak GetFeatureFlagBool() to have a default argument  <Created by mvo5> <Merged by stolowski> <https://github.com/snapcore/snapd/pull/5970>14:18
jdstrandniemeyer: which brings me to my point: I'd like for the worker to user standard interfaces like system-observe, network-control, etc rather than copying stuff from those into the k8s interface to avoid the deny rule14:19
Chipacamvo: I remembered what I was going to say in the standup and then forgot14:21
jdstrandniemeyer: but wanted you opinion on how to do it. the option I'm currently liking is that system-observe, network-control, etc have the same default behavior, but we add an interface attribute (eg, 'omit-ptrace-deny: true') which, when specified, simply skips adding those rules to the policy14:21
Chipacamvo: cachio: starting with 2.36 I'd like to add a new step to the release checklist; how do I go about doing that?14:22
jdstrandniemeyer: in these specific cases, that's ok security wise, because we are default deny and the access is still block by the interface. but it allows another interface to be used in conjunction with it14:22
jdstrandniemeyer: another route is not expose it to the snap developer and instead simply reuse the rules unconditionally in the k8s interface14:23
jdstrandniemeyer: but don't pull in the ptrace rules. eg, system-observe internally has systemObserveConnectedPlugAppArmor, so we might break that into systemObserveConnectedPlugAppArmor and systemObserveConnectedPlugAppArmorDenyPtrace. then in kubernetes-support it adds systemObserveConnectedPlugAppArmor to its policy14:26
jdstrandniemeyer: so it would get all of it by simply using 'plugs: [ kubernetes-support ]'14:26
jdstrandniemeyer: a 3rd option is trying to work out a new 'ptrace' or two, but I don't quite know what that would look like14:27
jdstrandniemeyer: a new 'ptrace' interface*14:28
jdstrandniemeyer: I don't really want to pursue that last option now-- it is roadmapped (not product roadmapped, mind you) as something to look into in the future14:28
jdstrandniemeyer: ..14:28
zygasmoser: about parsing proc/mounts, we do parse it and in the right order too14:30
zygasmoser: it's just that according to the kernel the upperdir is different14:30
zygasmoser: this is probably because of pivot_root14:30
zygasmoser: so unless I misunderstood something there is nothing that we can do better14:30
zygasmoser: please do correct me if I'm wrong, I can show you what we do today in the code if that helps14:30
zyga(actually, we don't iterate over the mount entries in reverse order, that's an omission on my part)14:31
zygasmoser: the logic is on https://github.com/snapcore/snapd/blob/master/osutil/overlay_linux.go#L2714:31
rharperzyga: why does apparmor not see the same mount path as present in the mountinfo ?14:34
zyga rharper I believe this is a kernel question that only jjohansen can answer14:34
zygarharper: but in general apparmor doesn't "see" pivot root14:35
zygaso if you setup a profile with some paths14:35
zygathen pivot root14:35
zygathe profile is not changed14:35
niemeyerjdstrand: I see.. hmmmm14:35
rharperzyga: interesting14:35
zygaand applies to the paths as they are14:35
zygarharper: what is more interesting IMO14:35
zygais that mountinfo doesn't reflect this either14:35
zygaso if you mount something like overlayfs14:35
zygaand pivot_root14:35
zygathe paths lie14:35
niemeyerjdstrand: The attribute feels too much like a hack for very difficult to understand reasons, for a person that isn't developing snapd14:36
zygathey may or may not be representable in the new root14:36
zygabut the kernel just says "those are the paths"14:36
zygawhere in other places it actually hints at the fact they are no longer there14:36
zygajust not in this case14:36
zygarharper: in the ephemeral Maas image case the kernel really says "overlayfs is mounted there and those are the options"14:36
zygabut it doesn't render the mount options with the relation of the current root14:37
zygait just seems to say what they were at the time mount happened14:37
rharperzyga: it seems fine for pivot_root to close of some mounts if they're not available under the new root; but why can other things "See" the old paths ?14:37
zygarharper: this is unusual in the sense that other parts of mountinfo are always rendered from the perspective of the observer14:37
jdstrandniemeyer: yes, it is weird. also, one could argue that kubelet can't function without system-observe, so why have it as a separate interface that could be manually disconnected14:38
niemeyerjdstrand: We might come up with something like an AllowPtrace() method in the intenral AppArmor specification, and when the profile is being generated, check if AllowPtrace is on, otherwise deny it14:38
zygarharper: as I said above :) it's a jj question14:38
rharperzyga: =)14:38
niemeyerjdstrand: This is relatively clean, and prevents exposure of implementation difficulties14:38
jdstrandniemeyer: iiuc, you are saying that in k8s we would set AllowPtrace such that in system-observe it can ask if AllowPtrace is set and make a decision. correct?14:39
niemeyerjdstrand: Almost.. Imagine a method AllowPtrace() which sets a private attribute allowPtrace=true in the apparmor Specification14:41
niemeyerjdstrand: This would generally be false14:41
jdstrandoh14:42
niemeyerjdstrand: When the apparmor is being generated, we always deny it, unless one of the interfaces allowed it14:43
niemeyers/apparmor/apparmor profile/14:43
jdstrandright. at the very, very end, before writing it out, we can see if it is set14:43
jdstrandand if it is, do something14:43
jdstrandI like that14:43
niemeyerRight, exactly.. if nothing enables it, we deny it14:43
niemeyerThen the interfaces that want to enable it would call the method instead of putting it directly into the profile14:44
jdstrandit yes, that is very nice indeed14:45
jdstrandI think I can use this idea with a problem I had with a conflicting x modifier between home and docker-support14:46
jdstrandcool14:46
jdstrandniemeyer: ok, my 3rd question was what to do with the existing kubernetes-support. if pedronis tells me nothing is using it, i'll just take it over14:47
jdstrandniemeyer: thank you! :)14:47
* jdstrand really like the spec variable idea14:47
jdstrandlikes*14:47
pstolowskimvo: do you want to take a look at https://github.com/snapcore/snapd/pull/5975 or can i land when green?14:47
mupPR #5975: ifacestate/hooks: only create interface hook tasks if hooks exist <Created by stolowski> <https://github.com/snapcore/snapd/pull/5975>14:48
pstolowski(it has 2 reviews)14:48
mvopstolowski: yes, I had a quick peek already and it looked good but I did not do a line by line proper review14:48
mvopstolowski: let me look again14:48
mvopstolowski: and thanks for doing this so quickly!14:48
mvoChipaca: what step?14:49
mvoChipaca: aha, right14:49
mvoChipaca: I think sergio is maintaing this checklist now14:49
pstolowskimvo: yw, happy to move to something else other than hotplug ;)14:49
Chipacamvo: cachio: updating the brew formula14:49
niemeyerjdstrand: Glad it sounds reasonable.. let's see if it works out14:50
mvopstolowski: *g*14:50
Chipacamvo: cachio: I'll do 2.36, and then I'd like to hand it off (should be just chaning a version number and updating a hash)14:50
Chipacachanging*14:50
smoserok. i'm back. and reading14:51
smoserzyga, rharper pivot_root issues aside, snapd's logic there is broken14:52
smoserit is trusting the first field of /etc/fstab to mean something14:52
smoserit does not mean anything14:52
zygasmoser: ? can you be more precise please14:52
smoseroverlayroot uses 'overlayroot' as the 'fs_spec' for the mount it does14:52
smosercasper uses '/cow'14:52
smoserthe kernel ignores it14:53
smoseras overlayroot reads the relavent values from 'fs_file' (second field) and upperdir=,workdir=14:53
zygawe do not read /etc/fstab14:53
smosersorry14:53
zygawe read /proc/self/mountinfo14:53
smosernot fstab. proc/mounts14:53
smoseror mountinfo14:53
smosersame thing really14:53
mvocachio: 2.36~pre2 is in beta now14:54
zygaso what are we doing wrong?14:54
zygawe look at the filesystem type14:54
zygasmoser: we are not looking at the backing device14:55
zygawhich as you say can be anything14:55
zygawe are looking at the filesystem type "overlay" and the mount point "/"14:55
smoserok. re-reading as i assumed /proc/mounts let me see14:56
rharpersmoser: https://github.com/snapcore/snapd/blob/master/osutil/mountinfo_linux.go14:56
zygawe don't use proc mounts because it has fewer things exposed14:57
zygasmoser: and to be clear, our logic did trigger in the image I tested14:57
zygait just used the wrong path, as instructed to by the kernel14:57
zygaall I did in the fix was to re-map it manually because we know what happens in this particular case14:58
zyga(where "knows" is perhaps too strong but you know what I mean)14:58
rharperhttps://bugs.launchpad.net/apparmor/+bug/170367414:58
mupBug #1703674: inconsistent required directory rules needed with overlayfs <aa-kernel> <AppArmor:New> <https://launchpad.net/bugs/1703674>14:58
rharperzyga: is that the bug that tracks the "odd" requirement for the path ?14:58
smoserok. zyga this is casper /proc/1/mountinfo14:59
smoserhttp://paste.ubuntu.com/p/ftMNjsv8tx/14:59
zygarharper: I don't know - perhaps14:59
smoserand this is overlayroot14:59
smoserhttp://paste.ubuntu.com/p/b4PZXYhCF7/14:59
smoserI *think* that you are reading the 10th field of line 9 (/cow) in casper to mean something14:59
zyga28 0 0:24 / / rw,relatime shared:1 - overlay overlayroot rw,lowerdir=/media/root-ro,upperdir=/media/root-rw/overlay,workdir=/media/root-rw/overlay-workdir/_15:00
zygaI don't think we do15:00
zygawe read the fstype filed15:00
zyganot the backing store15:00
zygahttps://github.com/snapcore/snapd/blob/master/osutil/mountinfo_linux.go#L18315:00
ChipacaI'm going afk for a few hours. Have a great weekend, y'all!15:00
zygaChipaca: enjoy :)15:00
zygasmoser: the first field after the -15:01
Chipacazyga: i'll be asking for logs of this conversation later, to catch up -- super interesting15:01
* Chipaca off15:01
smoserzyga: i'm reading https://github.com/snapcore/snapd/blob/master/osutil/overlay_linux.go#L5815:01
smoser"if mount source is path, strip it from dir"15:02
zygasmoser: as ultimate proof I can show you this https://github.com/snapcore/snapd/pull/5974/files#diff-989405fde2087a02f99e11b0c532699dR8815:02
mupPR #5974: osutil: workaround overlayfs on ubuntu 18.10 <Created by zyga> <https://github.com/snapcore/snapd/pull/5974>15:02
smosermount source does not mean anything15:02
pedronisjdstrand: no snap has been granted use of kubernetes-support15:02
cjwatsondiddledan: hi, you've typoed "build-on" as "build on" in your audacity snapcraft.yaml15:02
zygasmoser: ah, I missed that aspect15:02
zygaI was focusing on the triggering15:03
smoseri pointed to that line in my comments!15:03
smoser:)15:03
zygalet me think, I think this came from jdstrand15:03
diddledanoh fudge15:03
diddledanthanks cjwatson15:03
zygasorry, I missed that15:03
cjwatson(noticed because LP emailed me an oops report)15:03
diddledanyey15:03
smoserwell, zyga you were derailed by my 'fstab' comments. which i understand were confusing.15:03
zygahmm15:03
zygabut if dir, ok := entry.SuperOptions["upperdir"]; ok {15:03
zygadir is the upper path15:03
smoserthat part is right.15:04
cjwatsonit should go somewhere more useful, and arguably shouldn't oops, but ...)15:04
smoserwell, right for this :)15:04
pedronisjdstrand: but maybe you were asking if anything has kubernetes-support plug, that is a trickier question15:04
zygajdstrand: can you explain that part please: https://github.com/snapcore/snapd/blob/master/osutil/overlay_linux.go#L5815:04
zygasmoser: I never saw mount source being a path15:05
zygaI'm curious as well now15:05
zygasmoser: thank you for persisting! I totally missed that15:05
cjwatsondiddledan: same for gnome-twitch, but I see you noticed that too :)15:05
jdstrandpedronis: that is good enough. it needs an installation constraint15:05
diddledanyup, both fixeded15:05
cjwatsonta15:05
diddledanthanks for the alert :-)15:05
jdstrandpedronis: so it would have to be granted the use for anyone to use a snap with it15:05
jdstrandzyga: what is the question? all of this is very casper specific. we knew it would have to be updated if the livecd pattern changed15:06
diddledan(some people might say I'm a "lert")15:06
zygajdstrand: the question is why do we interpret mount source in overlayfs detector15:06
zygajdstrand: since mount source is unused arbitrary string in the cases I'm familiar with at least15:07
jdstrandbecause of the way casper set it up, it was something we could look at15:07
jdstrandyes15:07
zygajdstrand: that's interesting, thanks!15:07
zygasmoser: so we should look at casper15:07
jdstrandit's not 'dependable'15:07
zygabut I think the path is (probably) an accident more than a feature, I wonder if overlayfs itself uses it15:08
zygaI will finish writing a test for something I have and return to this15:08
jdstrandhttps://github.com/snapcore/snapd/commit/0f40f37c416587bd2e3b51db66601262869d2dc715:08
diddledanam I correct with my belief that snaps don't expose url handlers currently? i.e. vscode in a snap cannot hook the vscode:// url scheme from the system (I'm triggering it with a non-snap process, so it's not the confinement out of another snap that's a problem): https://github.com/Microsoft/vscode-pull-request-github/issues/57315:09
zygadiddledan: they do15:10
zygadiddledan: grep for vscode in generated desktop files in /var/lib/snapd/desktop15:10
diddledanwhat am I looking for?15:11
jdstrandzyga: see the above commit. the detection is completely arbitrary based on what we observed. it was always known that if something changed or we wanted to support something else, we'd need to do things differently15:11
zygadiddledan: desktop files can declare URL handlers15:11
zygajdstrand: thank you, I see15:11
zygaI will dig into that shortly after the other bug15:11
zygadiddledan: let me grep my system15:11
popeyzyga: isnt the list hard wired?15:11
jdstrandso, right now it is looking for '/cow', cause that is what we know casper does15:11
zygapopey: which list?15:12
popeymailto: http etc15:12
popeywe discussed this in belgium15:12
zygathat's in the snap handler15:12
jdstrandso the upperdir is /cow/upper, but because of the pivit root htat becomes simply /upper15:12
zyganot in what is published to the system15:12
jdstrandpivot*15:12
jdstrandso yes, now I see smoser's point fully15:13
zygajdstrand: right I think we were not discussing the pivot aspect, just that overlayfs mount source (which is "overlay" or "overlay root" or "whatever unused") was being used by the logic15:13
zygaright15:13
zyga+115:13
zygapopey: vscode is not defining any15:14
zygapopey: compare to telegram desktop for example:15:15
zygatelegram-desktop_telegramdesktop.desktop:MimeType=x-scheme-handler/tg;15:15
popeybut even if it did, it woudln't work, surely, because they're hard wired in snapd15:15
popeyyes, that one doesnt work15:15
popeybecause it's not listed in snapd15:15
jdstrandzyga (cc smoser): ok right, it has all come back to me. in a general fashion, we can't tell that something is going to pivot_root and to what from simply the mountinfo entry. so for the livecd, we try to discover if we think it is a livecd mountinfo entry, and then do stuff (assuming it will be consistent)15:15
zygawhat is hard wired?15:15
popeythe list of handlers15:15
zygapopey: if the handler is registered the opening that URL from the desktop does work15:15
popeywe discussed this in belgium, talking about extending the list15:15
zygasnaps cannot open such links though15:15
kyrofazyga, I'm trying to use snap try in 2.35.2 and I'm getting "cannot snap-exec: cannot read info for "my-snap-name": cannot find installed snap "my-snap-name" at revision x1: missing file /var/lib/snapd/snaps/my-snap-name_x1.snap" whenever I try to run the app. Any ideas?15:16
diddledanthe new window action has the wrong Exec line, too: https://www.irccloud.com/pastebin/TA7qUMzu/15:16
zygakyrofa: are you using encrypted FS?15:16
jdstrandzyga (cc smoser): if we have this: overlayroot / overlay rw,relatime,lowerdir=/media/root-ro,upperdir=/media/root-rw/overlay,workdir=/media/root-rw/overlay-workdir/_ 0 015:16
kyrofazyga, full, yeah. Used to work15:16
zygadiddledan: indeed (ouch)15:16
zygamvo: ^15:17
jdstrandzyga (cc smoser): then, in theory, we could look for 'overlayroot' instead of '/cow', and then try to do something with upperdir15:17
jdstrandzyga (cc smoser): for the overlroot case15:17
zygayeah15:17
kyrofazyga, not home dir encryption15:17
zygawe could hold a map of the use cases we saw and apply a transofrmation15:17
jdstrandie, '/' + basename(upperdir)15:17
zygakyrofa: where is your snap?15:18
zygakyrofa: as in in the filesystem15:19
zygapopey: extending the list is something we can discuss and arrange for, I'm not opposing that15:19
kyrofazyga, /var/lib/snapd/snaps15:19
zygawait, you had that snap there?15:20
kyrofazyga, oh wait, sorry, misunderstood15:20
zygah15:20
zygaso where was it when you tried it?15:20
kyrofazyga, in my home dir somewhere15:20
zygadid you remove the prime/ directory?15:20
zygaand built it again?15:20
zygacan you please paste /proc/self/mountinfo, grep for the snap to make the output shorter15:20
kyrofaNo, just ran `snap try prime` and then tried running the command immediately15:20
zyga(ideally one line)15:20
kyrofazyga, oh wait, actually, it was in /tmp. I bet that's the issue huh15:21
* cachio lunch15:21
zygammm, perhaps but I want to see the mountinfo anyway15:21
zygabut most likely so15:21
zygabecause snap-exec cannot handle that15:21
zygawell15:21
zygaactually, ignore me15:21
zygait should not matter15:21
zygaat that stage it should be mounted in /snap/...15:21
zygado you see your snap mounted there?15:21
pstolowskicachio: the nested vm PR seems to have failed misteriously ("null"), is it too expensive to build ubuntu image maybe?15:22
pstolowskicachio: btw, added a few comments, this is going to be great, thanks for working on this15:22
kyrofazyga, https://paste.ubuntu.com/p/sgdjp5v3tg/15:22
kyrofazyga, yeah, it's mounted in /snap/my-snap-name/x115:22
zygakyrofa: this looks correct15:23
zygammm15:23
zygahold on, I need to break for dinner now15:23
zygakyrofa: please hold this bug :)15:23
mvozyga: in a meeting right now, would love to get a tl;dr summary in a bit15:26
zygak15:26
mupPR snapd#5977 closed: release: 2.36~pre2 <Created by mvo5> <Merged by zyga> <https://github.com/snapcore/snapd/pull/5977>15:26
mupPR snapd#5978 opened: interfaces: don't allow snaps to write to $HOME/bin <Created by zyga> <https://github.com/snapcore/snapd/pull/5978>15:27
zygajdstrand: ^15:27
mupPR snapd#5976 closed: interfaces: improve Attr error further <Created by mvo5> <Merged by stolowski> <https://github.com/snapcore/snapd/pull/5976>15:30
mborzeckipstolowski: hey, can you take a look at https://github.com/snapcore/snapd/pull/5948 ?15:33
mupPR #5948: asserts, image: ensure kernel, gadget, base and required-snaps use valid snap names <Parallel installs ⛓> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/5948>15:33
pstolowskimborzecki: sure15:33
mborzeckipstolowski: thanks!15:33
mborzeckipstolowski: responded :)15:45
zygare15:45
pstolowskimborzecki: ok, i'm still on it15:47
smoserzyga, jdstrand just as an fyi. http://paste.ubuntu.com/p/pzDk8bZMjb/15:49
smoserif i change overlayroot like ^ and update initramfs then it works15:49
smoseras basically this puts '/media/root-rw' in the source (fs_spec) option fed to 'mount' for my overlay mount15:50
smoserand that makes it happy.15:50
zygasmoser: ack15:51
smoserbut that will break 'overlayroot-chroot' command15:51
zygasmoser: I'm not familiar with that command but I think with the workaround I proposed for snapd we don't need to change anything else15:52
smoserwhich relies on finding 'overlayroot' in /proc/mounts15:52
smoserwell, that command is probably not used by anyone other than me.15:52
smoserbut it allows you to easily remount rw and jump into the "real root" to make a change15:52
mupPR core18#83 opened: add swapfile support (ported from ubuntu-core-config) <Created by mvo5> <https://github.com/snapcore/core18/pull/83>15:53
=== chihchun is now known as chihchun_afk
=== pstolowski is now known as pstolowski|afk
zygaroadmr: trying now16:07
zygaroadmr: no change16:07
zygasame error as last time16:07
roadmrmm16:08
roadmrzyga: did the snap change?16:08
zygaI rebuilt the snap but I believe it didn't change at all16:08
zygathe error is :16:09
zyga  - __all__: The upload does not appear to be a valid package.16:09
mupPR core18#84 opened: hooks: port classic mode generation to UC18 <Created by mvo5> <https://github.com/snapcore/core18/pull/84>16:09
roadmrzyga: let me check the snap I have against the tools16:09
zygathank you16:10
zygamvo: man, you are killing it on Friday :)16:10
zygamvo: how about locale?16:10
zygamvo: can you please review https://github.com/snapcore/snapd/pull/597416:10
mupPR #5974: osutil: workaround overlayfs on ubuntu 18.10 <Created by zyga> <https://github.com/snapcore/snapd/pull/5974>16:11
roadmrzyga: the tools work fine with the snap build I have, so perhaps your rebuild did introduce more evil. Wormhole?16:13
zygasure16:13
mvozyga: whats the status for 5974 ? do we need it?16:17
mvozyga: if so, for 2.35? 2.36?16:17
mvozyga: I can review after dinner in a bit16:18
zygamvo: I think we need it16:18
zygafor whatever ships16:18
mvozyga: for whatever ships would be 2.35.516:19
mvozyga: do we need it like *now* i.e. tonight/before the weekend?16:19
zygamvo: I'm not sure what to answer16:20
zygasmoser: ^16:20
zygasmoser: so we need it like now, tonight, before the weekend?16:20
smoserI think that submitting as "zero day SRU" is fine.16:23
smoserall users of overlayroot and our images are broken16:23
smoserwhich is clearly bad, but16:23
smoserthe two users that i'm aware of are16:24
smoser a.) open-iscsi autopackage test http://autopkgtest.ubuntu.com/packages/o/open-iscsi/cosmic/amd6416:25
smoser b.) curtin vmtest (we just put in a workaround to disable snapd)16:25
smoser c.) MAAS installation.  this works fine because they disable apparmour16:25
smoserso I personally dnot think there is reason for fire-drill upload at this point since we have it well understood.16:26
smoserbut... if there was an upload going to happen anyway16:28
smoserthen i think that that pull request should be taken16:28
smosereven in its simple form it fixes default use-case16:28
smoserzyga: ^16:28
smosermvo: ^16:28
zygaack thanks16:29
zygaI think we will still release but for another reason16:29
zygaand we can piggy back this patch16:29
plarsogra: I can't recall, is bluetooth expected to work on our rpi images?16:29
plarsogra: nm, I found https://bugs.launchpad.net/snappy/+bug/1674509 - I thought there was something like that but that it had been resolved already16:34
mupBug #1674509: Unable to find bluetooth device on RPi3 running Ubuntu Core 16 <snapd-interface> <Snappy:Confirmed> <linux-raspi2 (Ubuntu):Invalid by p-pisati> <https://launchpad.net/bugs/1674509>16:34
zygaroadmr: any finings?16:38
zygafindings :)16:38
roadmrzyga: still fighting kibana for the logs16:38
zygathank you16:38
smoserzyga: for now the solution is just to special case '/media/root-rw/overlay' as you did ?16:44
zygayes16:44
zyganext week we can explore better options16:44
smoseri think thats appropriate for now.16:44
smoserthank you16:44
zygawithout time pressure16:44
zygathank you! and double so for pointing out the other aspect of the current solution :)16:44
roadmrzyga: does git-lp still exist/work?16:50
zygaroadmr: I don't know, I'm not using it16:50
roadmrok :)16:50
roadmrzyga: hey any chance you could retry pushing the snap? log spew is making it very hard to find the exact entry I need17:00
roadmrhaving a shorter time window owuld help :)17:00
zygadoing now17:01
zygadone17:01
roadmrthanks!17:02
jjohansenrharper, zyga: its a limitation in the LSM atm that we are working on fixing by extending the hooks available17:05
zygajjohansen: thank you for confirming this, so our prediction about pivot_root being the cause are correct?17:05
zygajjohansen: would you consider it a separate bug that mountinfo doesn't show correct paths after pivot_root?17:06
zyga(in the mount options field)17:06
jjohansenyes, we see the pivot_root and can mediate it but we can't properly update/track it because its a permission hook, not a stateful hook which means the pivot_root might actually not happen, and if we track at that point, and it fails we are completely messed up17:07
jjohansenwell, no more messed up than now I suppose, its mess up one way or the other17:08
zygaI mean, regardless of apparmor in this case17:08
jjohansenatm namespaces in general are a problem because we don't have hooks to perform permission checks or track unshare or setns17:09
jjohansenright, it messes up apparmor not the kernel17:09
zygajjohansen: right but I was specifically asking about just plain /proc/self/mountinfo17:14
zygapart of the problem is that apart from the apparmor aspect we got confused by the path reported by the kernel there17:15
zygait seems like a bug in overlayfs17:15
zygaor mountinfo rendering of itself17:15
mupPR snapcraft#2346 opened: ruby plugin: add support for base <Created by kyrofa> <https://github.com/snapcore/snapcraft/pull/2346>17:15
jjohansenoverlayfs is another issue17:15
jjohansenyou have two mounts17:15
smoseri never expected mountinfo to be updated.17:15
jjohansenwill potentialy more17:15
jjohansens/will/well/17:15
smoserid have ben surprised if two processes (one with an NS change and one without) saw different values for 'upperdir='17:16
zygasmoser: mountinfo is updated when you pivot normally17:16
zygafor all the other paths17:16
jjohansenyep17:16
zygasmoser: but the upperdir (being a mount option string) is probably just printed verbatim17:16
jjohansenpivot_root is magic17:17
zygait just seems that using system paths in mount options is not that common17:17
smoserright.17:17
smoserbut essentially you're just feeding '-o' as a string to the filesystem17:18
zygaright17:19
smoserso anything could go in there and is only properly understood by that specific fs17:19
zygaright17:19
zygabut it could be :)17:19
roadmrzyga: hey do you have the exact filename for the snap you tried to upload? pm if you like17:20
zygayes, same as I gave you but ..17:21
roadmrzyga: I'm not finding anything in logs, makes me suspect it's barfing even before being able to determine the snap id17:21
roadmrbecause I'm searching with snap id and getting nothing17:21
smoseroh. hm.. zyga so in http://paste.ubuntu.com/p/P2pdtCDn2v/17:21
smoserwhihc is a "post-pivot" /proc/1/mountinfo17:21
zygaroadmr: fedora29.2018.10.12.x86_64.snap17:21
smoserdid the kernel remove '/cow' from some string above line 9 ?17:22
roadmrthanks zyga17:22
smoseri couldnt understand how 'upperdir=/cow/upper' was a thing at the point of that mount17:22
zyga30 1 0:24 / / rw,relatime shared:1 - overlay /cow rw,lowerdir=//installer.squashfs://filesystem.squashfs,upperdir=/cow/upper,workdir=/cow/work17:22
zygaprobably it existed in the initrd17:22
zygamkdir /cow17:22
zyga...17:22
zygapivot17:22
zygaI played with pivot and overlayfs almost all of last week17:23
smoserbah. duh17:23
smoseri guess i was just expecting to see *some* '/' mount17:23
zygatrying to write a spread test for the live CD fix17:23
zygamm17:23
smoserbut the initramfs / doesn't get represented anywhere17:23
zygayou have / mount17:23
zygaoverlay is there :)17:24
zyganothing else17:24
smoseryeah. but i was expecting to see something above that line.17:24
zygathe fact that overlay still holds onto a mounted filesystem17:24
zygathat we cannot see17:24
zygais not visible17:24
smoserright.17:24
zygaif you had a process living in the initrd namespace17:24
zygayou would see that17:24
zygait's actually easier to reason about17:24
zygajust make a mount namespace17:24
smoser:)17:24
zygado a overlayfs + pivot there17:25
zygaand see what you see in mountinfo17:25
zygayou can get to one-liner overlatyfs + /proc17:25
zyga*overlayfs17:25
zygabut you can see the backing store in the initial mount namespace17:25
zygaroadmr: perhaps the permissions on the snap directory tree are unusual?17:26
smoserok. yeah, well that is enough for me today.17:26
zygaor something else is making it fail17:26
smoseri really should be looking at other things.17:26
zyga:-)17:26
smoserthank you17:26
zygathank you smoser :)17:26
ograplars, sadly not, i pinged koza on the forum about it today as well ...17:28
ograthe bluez snap delivers everything we need but it needs manual intervention to actually initialize the BT stack17:29
plarsack17:29
mupPR snapd#5979 opened: install: don't start disabled services <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/5979>18:45
mupPR snapcraft#2343 closed: schema, meta: add "full" app adapter <Created by kyrofa> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2343>19:36
mupPR snapcraft#2346 closed: ruby plugin: add support for base <Created by kyrofa> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2346>19:39
mupPR snapcraft#2347 opened: extensions: support adding root properties <Created by kyrofa> <https://github.com/snapcore/snapcraft/pull/2347>19:45
kyrofaAny update on when 2.36 will be stable?19:47
roadmrzyga: still around?20:00
mupPR snapd#5978 closed: interfaces/home: don't allow snaps to write to $HOME/bin <Created by zyga> <Merged by zyga> <https://github.com/snapcore/snapd/pull/5978>20:06
mupPR snapcraft#2344 closed: schema: remove the deprecated snap keyword for bases <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2344>20:24
mupPR snapcraft#2347 closed: extensions: support adding root properties <Created by kyrofa> <Merged by kyrofa> <https://github.com/snapcore/snapcraft/pull/2347>21:30
mupPR snapcraft#2348 opened: extensions: remove root extensions <Created by kyrofa> <https://github.com/snapcore/snapcraft/pull/2348>21:36
mupPR snapd#5980 opened: interfaces/apparmor: conditionally add explicit deny rules for ptrace <Created by jdstrand> <https://github.com/snapcore/snapd/pull/5980>22:20
mupPR snapcraft#2349 opened: extensions: use extension docstring <Created by kyrofa> <https://github.com/snapcore/snapcraft/pull/2349>22:51

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