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

mupPR snapcraft#2468 opened: [WIP] many: support for stage-snaps <do-not-merge-yet> <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/2468>01:15
zygaGood morning06:26
=== doko_ is now known as doko
zygahello mvo08:04
=== pstolowski|afk is now known as pstolowski
pstolowskiheyas08:09
zygahey, how are you?08:10
zygahttps://github.com/opencontainers/runc/commit/0a8e4117e7f715d5fbeef398405813ce8e88558b is fun08:14
* dot-tobias says hi08:18
pstolowskihey zyga, i'm fine, thanks, you? wife and baby back home?08:24
zygapstolowski: yes, we are all home now :-)08:24
pstolowskigreat :)08:26
mvozyga: yay, great news!08:27
mvopstolowski: and good morning to you as well08:27
mvoand hello dot-tobias08:27
pstolowskihey mvo!08:38
pstolowskii feel like i'm ready to tackle selinux PRs today08:39
pedronismvo: hi, I landed a couple things that were green etc and seemed innocent enough, hope it's ok08:40
mvopedronis: yeah, that sounds good08:43
=== ricab is now known as ricab|bbl
pedronismvo: Chipaca has a couple PRs that need 2nd reviews10:03
Chipacayes, yes I do10:03
pedronisChipaca: one has a couple nitpicks from me as well10:04
Chipacapedronis: yes. I will address them, but am waiting for a review10:04
Chipacamaybe i should say as much10:04
mupPR snapd#6492 opened: snapstate: restart into the snapd snap on classic <Created by mvo5> <https://github.com/snapcore/snapd/pull/6492>10:08
mvopedronis: good timing, just finished my current task, I have a look now10:08
mvoChipaca: 6034 and 6356?10:09
Chipacamvo: ye10:09
=== ricab|bbl is now known as ricab_
pedronismvo: I answered a couple of nitpicks for Chipaca11:05
mvopedronis: ta11:06
=== sgclark is now known as sgmoore
pedronismvo: what can we do about https://github.com/snapcore/snapd/pull/6252  it seems to have hit some weirdness where now there's a lot of conflicts ?11:46
mupPR #6252: userd: handle help urls which requires prepending XDG_DATA_DIRS <Created by kenvandine> <https://github.com/snapcore/snapd/pull/6252>11:46
mvopedronis: mbozecki was looking at the test, let me see11:47
mvopedronis: uh, I think ken has pushed something incorrec,t it says 10k+ commits11:48
mvopedronis: this needs some manual surgery it seems, I can look at this after lunch11:50
Chipacazyga: is #1814450 something you know about?12:20
mupBug #1814450: subsync - error: signal: segmentation fault <snapd:New> <https://launchpad.net/bugs/1814450>12:20
zygaChipaca: the bug in general, no12:21
Chipacazyga: the 'annot use "/snap/gtk-common-themes/818/share/icons/Suru" as bind-mount source: not a directo'?12:21
zygahttps://gitlab.gnome.org/Community/Ubuntu/gtk-common-themes/issues/112:21
* Chipaca is bad at cut-n-paste12:21
zygathat's been open for a while12:21
zygaI meant to ping will about it yesterday but then the return happened12:22
Chipacazyga: aha! i'll update the bug with this info12:22
mupPR snapd#6493 opened: userd: handle help urls which requires prepending XDG_DATA_DIRS <Created by mvo5> <https://github.com/snapcore/snapd/pull/6493>12:22
Chipacaabeato: ping12:23
Chipacawait, probably unping12:23
Chipacayeah, wrong person, sorry12:23
zygakenvandine: hey, can we bump https://gitlab.gnome.org/Community/Ubuntu/gtk-common-themes/issues/1 somehow?12:26
Chipacapstolowski: got a sec?12:27
mupIssue # closed: core18#56, core18#86, core18#89, core18#11712:31
mupPR # closed: core18#43, core18#63, core18#72, core18#90, core18#9812:31
pstolowskiChipaca: in 1512:31
mupIssue # opened: core18#56, core18#86, core18#89, core18#11712:32
mupPR # opened: core18#43, core18#63, core18#72, core18#90, core18#9812:32
abeatoChipaca, haha, nw12:34
* Chipaca ⇝ lunch12:43
=== ricab_ is now known as ricab
=== ricab__ is now known as ricab|laptop
Chipacamvo: #1814484 should be fixed, right?12:51
mupBug #1814484: wal-e no longer works as of snapd 2.37 <canonical-is> <PostgreSQL Charm:Confirmed> <snapd:New> <https://launchpad.net/bugs/1814484>12:51
Chipacapopey: might #1814242 be something you can look into?12:52
mupBug #1814242: Remmina snap package review <snapd:New> <https://launchpad.net/bugs/1814242>12:52
popeythanks Chipaca will take a look12:53
Chipacamvo: did the latest change wrt --classic for strict land in .2?12:53
pedronisChipaca: yes12:54
Chipacadegville: when you have a bit, could you see if you have suggestions wrt #1811276 ?12:57
mupBug #1811276: Installing an already-installed snap docs could be more helpful <snapd:Confirmed> <https://launchpad.net/bugs/1811276>12:57
degvilleChipaca: yep, or course.12:57
Chipacapedronis: #1811063 for your consideration12:58
mupBug #1811063: "snap refresh" does not report failure to update because snap switched to classic confinement <snapd:New> <Snappy:Invalid> <https://launchpad.net/bugs/1811063>12:59
Chipacapedronis: also #181098212:59
mupBug #1810982: Preseeding Snaps Broken for Trusty <snapd:New> <https://launchpad.net/bugs/1810982>12:59
diddledandid I share this in here yet? https://snapstats.org/13:00
pedronisChipaca: isn't the first bug a matter of using warnings appropriately?13:00
pedronisthe user marked it invalid13:00
Chipacapedronis: invalid in snappy, not in snapd13:00
Chipacapedronis: I think so, warnings would make it better13:00
Chipacapedronis: I'll explain on the bug13:01
Chipacapedronis: and assign it to me because why not13:01
pedronisthe trusty one we are aware from other channels, nobody had time to dig into it13:01
pedronisso far13:01
Chipacapedronis: ah ok13:02
Chipacapedronis: maybe tweak the bug so that much is clear?13:02
pstolowskiChipaca: hey, sorry, had to bring my daughter from school, i'm in now, what's up?13:02
Chipacapstolowski: I've got a question about 'snap get' vs 'snapctl get', and thought you might know13:03
Chipacapstolowski: 'snapctl get' always returns a document?13:03
Chipacapstolowski: or is it only if the thing is documentish13:03
Chipacaah, yes13:03
Chipacapstolowski: so, sorry, my actual question is: why don't we support a bare -d in snapctl get? any strong reason?13:04
pedronismvo: are you ok to get https://bugs.launchpad.net/snapd/+bug/1810982 assigned, it involves livecd-rootfs which I don't think anybody else is familiar with13:06
mupBug #1810982: Preseeding Snaps Broken for Trusty <snapd:New> <https://launchpad.net/bugs/1810982>13:06
=== Saviq is now known as ricab|test
=== ricab|test is now known as Saviq
pstolowskiChipaca: hmm, i'm looking at ctlcmd/get.go and it has '... short:"d" description:"always return document, even with single key"'13:09
pedronispstolowski: I think Chipaca is asking about "snapctl get -d"  with no key13:10
pedroniswhich I think maybe you mentioned in your open PR13:10
pstolowskipedronis: ah13:11
Chipacayep, -d with no key13:12
Chipaca#181487613:13
mupBug #1814876: snapctl get -d doesn't allow returning full config <snapd:New> <https://launchpad.net/bugs/1814876>13:13
pstolowskiChipaca: right. I *think* (i wasn't yet in the team when snapctl was implemented) the idea was the "snap get" is user facing tool, so it's desirable to return entire document to discover options; snapctl is queried programatically, the snap knows its options so it just retrieves specific keys13:14
pstolowskiChipaca: i vaguely remember hearing that reasoning from someone.. but it's possible i made it up ;)13:17
ChipacaI agree the primary use case is that one, but developers still like to debug their things :-)13:18
Chipacaallegedly13:18
pstolowskiChipaca: not disagreeing13:19
dot-tobiasIs it possible to delete old revisions of a snap in the store?13:20
=== ricab is now known as ricab|lunch
pedronisChipaca: pstolowski: fwiw I'm not against making -d without key work until we have finished other stuff. I think arbitrary differences between snapctl and snap are mostly not worth it13:22
pedroniss/until/after/13:22
pstolowski+113:24
diddledandot-tobias: no, you can only remove them from any channels13:43
dot-tobiasdiddledan: ok, thanks!13:44
pedronispstolowski: I did a first pass over #5962, didn't quite look at everything yet13:47
pedronissome questions there13:47
mupPR #5962: ifacestate/hotplug: hotplug handlers <Complex> <Hotplug 🔌> <Created by stolowski> <https://github.com/snapcore/snapd/pull/5962>13:47
pstolowskipedronis: thanks13:47
pstolowskicachio: proposed a trivial PR https://github.com/sergiocazzolato/snappy-qa-jobs/pull/213:51
mupPR sergiocazzolato/snappy-qa-jobs#2: Added doc about SPREAD_TESTS and SKIP_TESTS vars <Created by stolowski> <https://github.com/sergiocazzolato/snappy-qa-jobs/pull/2>13:51
pedronismvo: should we close #6252 now that you made 6493 ?13:52
mupPR #6252: userd: handle help urls which requires prepending XDG_DATA_DIRS <Created by kenvandine> <https://github.com/snapcore/snapd/pull/6252>13:52
pedronispstolowski: also reviewed #6490 with a small comment13:56
mupPR #6490: tests: fix NFS home mocking <Created by stolowski> <https://github.com/snapcore/snapd/pull/6490>13:56
cachiopstolowski, nice, I'll take a look13:56
cachiothank13:57
mvopedronis: yeah, let me close it now, its not useful in its current form13:58
zygamvo: hey, there are some milestones on https://launchpad.net/snapd/trunk that feel stale, would you mind if I closed them? (2.36.x)13:58
pstolowskipedronis: thanks13:58
mupPR snapd#6252 closed: userd: handle help urls which requires prepending XDG_DATA_DIRS <Created by kenvandine> <Closed by mvo5> <https://github.com/snapcore/snapd/pull/6252>13:59
kenvandinemvo: thanks!14:00
mvokenvandine: if you could quickly double check14:00
kenvandinemvo: looking14:01
zygaoh14:02
zygastandup14:02
mvokenvandine: thanks14:02
zygakenvandine: hey :)14:03
zygakenvandine: I sent a ping earlier today, not urgent but please confirm that you saw it14:03
kenvandinezyga: i did see it14:03
kenvandinei think jamesh might have submitted a fix to Yaru instead14:04
zygagreat, thank you14:04
zygakenvandine: I think it's still out in the wild so I wonder if it's a matter of publishing something to stable14:04
kenvandinezyga: that should be fixed by https://gitlab.gnome.org/Community/Ubuntu/gtk-common-themes/merge_requests/814:16
zygashould the issue be closed then?14:16
zygapeople still report it14:17
kenvandineit's still waiting for feedback14:19
t1mphello14:41
t1mplooks like snapcraft broke backwards compatibility for me, without warning14:41
t1mpFailed to get part information: Cannot find the definition for part 'desktop-gtk3', required by part 'app'.14:41
t1mpRemote parts are not supported with bases, so make sure that this part is defined in the `snapcraft.yaml`.14:41
t1mpthe same snapcraft.yaml was working before14:41
popeysnapcraft 3.x did indeed disable remote parts14:42
t1mpalso, version: 2 is no longer accepted (but version: "2") works14:42
t1mpis there some manual on how to migrate? What should I use instead of the remote part?14:43
diddledan2 is a number. '2' is a string. if it accepted 2 before that was a bug14:43
popeyt1mp: https://paste.ubuntu.com/p/jdMWkMJKhF/14:43
* diddledan pastes his link again for anyone who missed it - go look :-p https://snapstats.org/14:45
t1mppopey: thanjsk!14:46
t1mp-j14:46
popeynjp14:46
diddledan:-p14:46
diddledanpopey: yeejit :-p14:46
t1mpwhy do I need to remove the base: core18 line?14:47
t1mpthat's what I'm using for my snap too14:47
popeybecause snapcraft define wont work with it14:47
popeyyou dont need to remove it in *your* yaml, only in the tmp one14:47
diddledanit won't expand the definition with it in place - the base: core18 triggers snapcraft to use new features and remove old ones14:48
=== ricab|lunch is now known as ricab
diddledanof course you can add it back as soon as you've run `snapcraft define`14:49
t1mpok14:49
* cachio lunch14:54
t1mppopey, diddledan: okay, thanks. I'm rebuilding my snaps (with snapcraft 3.. and 2 on jenkins. I hope that one still works after my changes).14:55
t1mpI get some errors,14:57
t1mpStaging desktop-gtk314:57
t1mprm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied14:57
t1mpbut the pull seems to continue after that14:57
t1mpI require coffee. brb14:58
t1mpAn error occurred when trying to execute 'sudo -i snapcraft prime' with 'multipass': returned exit code 2.15:03
t1mpah. I have a version-script, and I guess before snapcraft wasn't building the stuff in a vm. Now it is and my script is not available there.15:05
* zyga is eating lunch15:20
mupIssue # closed: core18#56, core18#86, core18#89, core18#11715:20
mupPR # closed: core18#43, core18#63, core18#72, core18#90, core18#9815:20
mupIssue # opened: core18#56, core18#86, core18#89, core18#11715:21
mupPR # opened: core18#43, core18#63, core18#72, core18#90, core18#9815:21
diddledanmup seriously needs educating about what "closing" means - it keeps on with things like ^^^^^ where it says "foo is closed" immediately followed by "foo is new and just been opened!!!! OMGZOR IT'S BRAND NEW!!!!"15:22
Chipacadiddledan: github api hiccups15:24
Chipacaand mup-side state15:24
Chipacaafaik15:24
Chipacaikn15:24
Chipacaikr?15:24
Chipacawtf15:24
diddledanoh dear. stack smashing in a quit message?15:25
diddledanref: 15:25:04 ⇐ mdeslaur quit (~mdeslaur@ubuntu/member/mdeslaur) Quit: *** stack smashing detected ***15:25
diddledanthat sounds nasty15:25
pstolowskipedronis: re your comment about why do i only log error on from addHotplugSeqWaitTask(chg, key) - it's a good point - i wonder what's the right thing to do; is chg.Abort() the right way of dealing with this? we have change and tasks already created in the state, but we shouln't run them if seq task couldn't be added15:34
pedronispstolowski: need to think a bit15:35
pedronispstolowski: I think is doing things with a patter that we don't use15:35
pedronis*pattern15:35
pedronispstolowski: we usually have all the tasks, and then add them to the change15:37
pedronispstolowski: we might have to tweak the helper15:38
pstolowskipedronis: btw, error here is if things go really bad (failure other than NoState from st.Get("hotplug-seq"..))15:38
pedronispstolowski: I understand but see my comment here15:38
pstolowskipedronis: i'd move allocHotplugSeq out of the helper, so it needs to be allocated by the caller and passed to the helper. that way it can be allocated (or fail) early before creating change and tasks. wdyt?15:44
pedronispstolowski: yes, something like that15:45
pedronispstolowski: we should follow other places and create the change last15:46
pstolowskipedronis: i see15:46
Chipacafun things to do: run out of space on /tmp  🗹16:22
mupPR snapd#6490 closed: tests: fix NFS home mocking <Created by stolowski> <Merged by stolowski> <https://github.com/snapcore/snapd/pull/6490>16:22
pedronisChipaca: just a reminder that #6034 description/commit needs updating, it still using the original names of things16:27
mupPR #6034: many: save media info when installing, show it when listing <Squash-merge> <Created by chipaca> <https://github.com/snapcore/snapd/pull/6034>16:28
Chipacapedronis: thanks16:28
Chipacapedronis: I'm waiting for an answer from mvo, but I'd already forgotten about the desc16:28
pedronisChipaca: about the test?16:29
Chipacapedronis: yes16:33
Chipacapedronis: (description updated)16:33
pedronisthx16:37
pstolowskipedronis: thanks for catching a few issues in the hotplug PR; i think i've addressed all your 1st pass comments17:20
=== pstolowski is now known as pstolowski|afk
mupPR snapd#6493 closed: userd: handle help urls which requires prepending XDG_DATA_DIRS <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/6493>18:56
=== JanC_ is now known as JanC
=== blackboxsw_ is now known as blackboxsw
=== hunterk_ is now known as hunterk
=== bashfulrobot_ is now known as bashfulrobot
pedronismvo: I looked again at #6418, I am a bit confused because the code you changed in snap-confine looks like it was originally buggy?19:07
mupPR #6418: many: allow core as a fallback for core16  <Created by mvo5> <https://github.com/snapcore/snapd/pull/6418>19:07
mvopedronis: thanks, let me check19:07
mvopedronis: I remember I fixed something in there, yes19:07
mvopedronis: let me check, you mentioned the new code looks also a bit strange, let me open it19:08
pedronismvo: mind not buggy, just strange19:08
pedronisthe new code19:08
* mvo nods and looks19:08
mvopedronis: yeah, the triple access is strange, I have a look what can be done19:25
pedronismvo: going to eod, I'll continue with your other PRs in the morning19:31
mvopedronis: thank you!19:31
jdstrandmvo: hey, I can't recall the details, but I feel like you said something like this would break snapd: https://code.launchpad.net/~paelzer/ubuntu/+source/libseccomp/+git/libseccomp/+merge/36290619:45
jdstrandmvo: (server team is adding a syscall to bionic's libseccomp)19:45
mvojdstrand: thanks, let me check19:57
mvojdstrand: hm, I don't recall having said this, zyga was working on statx, maybe he remembers more -^20:00
jdstrandmvo: I thought you said that the act of adding syscalls to trusty's libseccomp complicated things for you20:10
mupPR snapcraft#2467 closed: [legacy] ruby plugin: support new download URL <Created by kyrofa> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2467>20:11
jdstrandmvo: or maybe that was vivid. like I said, I do not recall the details :)20:14
mvojdstrand: I don't remember .( I will double check with -proposed tomorrow20:21
=== gurmble is now known as grumble
mupPR snapcraft#2469 opened: cli: clean up snapcraft push output <Created by cmatsuoka> <https://github.com/snapcore/snapcraft/pull/2469>20:38
mwhudsonhm i want to capture communication between snap and snapd for testing later21:02
mwhudsoni wonder how many recording proxies support unix sockets :)21:02
mwhudsonand then i guess i'd need to coerce snapd to talk to it anyway21:03
mwhudsoner snap21:03
Chipacamwhudson: you can have snapd take arbitrary sockets by tweaking its .socket unit21:04
mwhudsonhmm21:04
Chipacamwhudson: even, gasp, ip21:04
Chipacamwhudson: (but good luck getting unix credentials)21:05
=== epod is now known as luk3yx
mwhudsonprobably easier just to hack my own snapd binary that writes all requests and responses somewhere?21:05
mwhudsonargh snap binary21:05
Chipacamwhudson: either would work -)21:06
mwhudsoni can't type 'snap' without the 'd' apparently21:06
Chipacamwhudson: I'm going to write a tool and call it 'snadp', just for you21:07
mwhudsonChipaca: i hope you feel bad21:07
Chipacapretty good actually21:07
Chipacamy mum sent triple-choc brownies21:07
mwhudsoni guess this Client.Hijack method might be useful for this21:15
mwhudsonother question21:16
mwhudsonis there a snapd api i can use to ask if there is an update available for a particular snap?21:16
mwhudsoniirc i could only ask about all installed snaps which i guess is ok too21:17
mwhudsonbasically i'm working on adding support for triggering a self refresh to subiquity and am wondering about how to test it21:17
Chipacamwhudson: snap refresh --list ?21:24
Chipacamwhudson: (sorry I didn't see your question)21:25
Chipacamwhudson: wrt logging, I'd look at (*client.Client).do21:26
Chipacaactually, this sounds useful21:27
* Chipaca looks21:27
mwhudsoni would actually like it for my other thing so i can see which api snap refresh --list is hitting :)21:27
Chipacamwhudson: http snapd:///v2/find select==refresh21:29
mwhudsonChipaca: thanks21:29
Chipacamwhudson: niets te danken21:29
Chipacamwhudson: but21:32
Chipacamwhudson: snapd is already logging that :-)21:32
ChipacaFeb 12 21:32:20 fleet snapd[6262]: daemon.go:296: DEBUG: pid=26464;uid=1001;socket=/run/snapd.socket; GET /v2/find?select=refresh 244.125698ms 20021:32
ChipacaI thought you were looking at POSTs21:33
mwhudsononly if you turn up logging right?21:33
Chipacamwhudson: just SNAPD_DEBUG=121:34
Chipacayes21:34
ChipacaDEBUG21:34
mwhudsonbut yes i want post and response bodies in general21:34
Chipacaok, I'll play with that in a bit21:34
mupPR snapd#6494 opened: interfaces/builtin/udev: add spec to disable udev + device cgroup <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/6494>21:34
mwhudsonwould be great21:34
mwhudsoni can hack something for my own use but i'm sure your version would be cleaner :)21:35
Chipacamwhudson: http://paste.ubuntu.com/p/RN5xYkwf3c/21:45
Chipacamwhudson: that still won't log the body of the request, but I can add that if this would work21:45
ChipacaI also have a delogger.py you might find useful21:45
Chipacamwhudson: https://gist.github.com/chipaca/5d0f0e2b7fecd2df87f25b798a6c653721:46
Chipacadelog.py21:46
mwhudson+Key: "SNAPD_DEBUG_HTTP",21:57
mwhudson-D?21:57
mwhudsonbut thanks21:57
mwhudsonChipaca: where would that log to?22:03
Chipacamwhudson: yeah, it's not pretty22:03
Chipacathat logs to the log :-/22:04
Chipacaas in22:04
ChipacaSNAPD_DEBUG=1 SNAPD_DEBUG_HTTP=7 /tmp/snap refresh --list22:04
Chipaca*** here22:04
Chipaca2019/02/12 21:44:33.361905 logger.go:67: DEBUG: > "GET /v2/find?q=&select=refresh HTTP/1.1\r\nHost: localhost\r\nUser-Agent:22:04
Chipacaetc etc22:04
mwhudsonoh you need SNAPD_DEBUG=1 as well22:05
Chipacathere's probably some standard for logging http requests that is weeping22:05
Chipacaalso whoa what's with tht funky date format22:15
* Chipaca hopes it'll make sense in the morning22:15
Chipacao/22:16
kyrofaHey jdstrand, how is the docker (not docker support) interface being used these days? Reading the code, it kinda looks like I can't even install a snap that plugs it, is that true? (allow-installation: false)22:37
jdstrandkyrofa: you can do an unasserted install with --dangerous. you need a snap decl to distribute via the store22:38
jdstrandthe docker socket gives you device ownership, just like docker-support since it gives you access to the socket whose listener has docker-support and there aren't acls on the api22:39
kyrofaAh, so nothing random folks can really use, then22:40
jdstrandcorrect22:40
jdstrandI mean, if it is legitimate use, that is one thing22:41
jdstrandeg, k8s or something, but it is superprivileged22:42
kyrofaI just want to be able to fire up a docker container from within a confined snap. Bundling docker would require super plugs, and it seems using docker ALSO requires super plugs22:42
kyrofaDecent confinement would require mediation, basically?22:43
ijohnson_kyorfa: the "designed" way to do this with the docker snap is to plug the docker:docker-executables slot in your snap and then use the docker binary from the docker snap in your snap22:43
ijohnson_kyrofa: ^22:43
kyrofaijohnson_, what if I want to use the API instead of shelling to a binary?22:44
ijohnson_then you would plug docker:docker-daemon also slotted by the docker snap (which is the "docker" interface which allows access to the unix socket)22:44
kyrofaThat one isn't a super plug?22:45
ijohnson_no, the "docker" interface is explicitly not slotted by the core snap, only docker-support is slotted by the core snap22:46
ijohnson_as jdstrand pointed out you will have a hard time getting an auto-connection for the docker-support interface if you aren't actually docker or k8s, etc.22:46
ijohnson_this is the "designed" way to launch docker containers from a different snap, which is admittedly quite awkward and not well supported at the moment22:47
ijohnson_it should work though, please let me know if it doesn't22:47
kyrofaijohnson_, who is maintaining that snap these days, you?22:47
jdstrandit is super22:48
jdstranderr22:48
jdstrandit is super for the slot22:49
jdstrandbut the docker snap has a snap decl that allows connecting to it22:50
* jdstrand forgot about that22:50
jdstrandso if you use the docker snap, you can plugs it22:50
jdstrandbut it won't autoconnect22:51
kyrofaHeh, yeah I didn't even think to see if core provided a docker slot, of course it doesn't22:51
jdstrandsomeone else couldn't slots docker or plugs it22:52
kyrofaIndeed, that makes sense22:52
ijohnson_hey also jdstrand while you're here talking about the docker snap, there was a CVE published yesterday concerning a bad actor being able to overwrite the runc binary which docker runs as root to start containers. The snap wasn't affected because the runc binary is mounted read-only (cause squashfs), but looking through the apparmor we allow writes to /proc/[0-9]*/fd/[0-9]* (which is what I think /proc/self/exe resolves to22:52
ijohnson_anyways)22:52
ijohnson_is mounting as read-only the only way we can prevent similar attacks overwriting a binary using /proc/self/exe?22:53
jdstrandso, I'll revise my answer. if you have the docker snap installed, you can plugs docker and manually connect and go on your way22:53
jdstrandijohnson_: apparmor protects us as well22:53
jdstrandit is a symlink so it resolves to the binary and the policy doesn't allow arbitrary writes22:54
ijohnson_hmm when I was looking yesterday it seemed to allow it22:54
ijohnson_err wait you mean don't allow arbitrary writes to $SNAP ?22:54
jdstrandijohnson_: as for programmatically fixing this for a container management system that doesn't use apparmor, you can do something like what the runc devs did22:54
jdstrandthey have an ingenious approach. I suggest reading https://wiki.ubuntu.com/SecurityTeam/KnowledgeBase/runC22:55
ijohnson_good to know, thanks for the link22:55
ijohnson_I meant that https://github.com/snapcore/snapd/blob/master/interfaces/apparmor/template.go#L306-L313 allows writes to /proc/*/fd/* doesn't it?22:55
jdstrandijohnson_: if you can write to what /proc/self/exe is pointing to, then you can use the same technique. but, you don't need to use the technique because you already have write access to it. the difference is that with runc you were able to escalate privileges and write to somewhere you weren't supposed to22:57
ijohnson_ah I see, okay22:58
ijohnson_thanks for confirming22:58
jdstrandso for snapd, it isn't an issue on several fronts. $SNAP is ro squashfs, apparmor doesn't allow it, apparmor doesn't allow strict mode snaps to write to /var/lib/snapd/hostfs, etc. in forced devmode, it is wide open. we aren't providing file restrictions so no priv escalation22:59
ijohnson_yep that all makes sense now22:59
jdstrandijohnson_: to specifically answer your /proc/*/fd/* question. we do allow reads there and writes to [0-9]*, but importantly, those are symlinks that apparmor will resolve23:08
ijohnson_ack23:08

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