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

mupPR snapcraft#2423 closed: Do not use `bash` package name in staging <Created by jdahlin> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2423>00:48
mupPR snapcraft#2289 closed: local source: only filter out snapcraft artifacts <do-not-merge-yet> <Created by kyrofa> <Closed by sergiusens> <https://github.com/snapcore/snapcraft/pull/2289>00:51
brlinhttps://github.com/ubuntu-core/hello-snapcraftio/pull/306:03
mupPR ubuntu-core/hello-snapcraftio#3: Fix I18N <Created by Lin-Buo-Ren> <https://github.com/ubuntu-core/hello-snapcraftio/pull/3>06:03
mborzeckimorning06:08
brlinG. afternoon06:17
mupPR snapd#6283 opened: osutil: do not import dirs <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6283>06:28
mupPR snapd#6284 opened: spread: make opensuse-42.3 manual <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6284>07:39
pedronismvo: hi,  do you have time for a chat?08:04
=== pstolowski|afk is now known as pstolowski
pstolowskimorning08:08
mvopstolowski: good morning08:10
mvopedronis: yeah, in 2min, just poking at the core18 image08:11
pedronismvo: I'm in the standup08:17
mupPR snapd#6285 opened: selinux: package to query SELinux status and verify/restore file contexts <SELinux> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6285>08:21
mborzeckipstolowski: mvo: pedronis: morning guys08:22
zygaHello08:26
pedronismborzecki: zyga: hi08:28
mborzeckihave you seen https://forum.snapcraft.io/t/snap-interface-to-run-smartctl/8929 ?08:43
zygaInteresting. I wonder what is the best approach: expose smartctl or provide a replacement that talks to snapd or other trusted helper08:47
mborzeckizyga: wonder what's the actual interface used by smartctl and hdparm, i'd say hdparm does ioctls, but smartctl?08:58
mborzeckizyga: hdparm: ioctl(3, SG_IO, {interface_id='S', dxfer_direction=SG_DXFER_NONE, cmd_len=16, cmdp="\x85\x06\x20\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x40\xe3\x00", mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=15000, flags=0, status=0x2, masked_status=0x1, msg_status=0, sb_len_wr=22, sbp="\x72\x01\x00\x1d\x00\x00\x00\x0e\x09\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x40\x50", host_status=0,08:59
mborzeckidriver_status=0x8, resid=0, duration=3914, info=SG_INFO_CHECK}) = 008:59
Chipacasome of us wish you all a good morning09:01
zygamborzecki: more ioctls :)09:01
mborzeckizyga: same for smartctl ioctl(3, SG_IO, {interface_id='S', dxfer_direction=SG_DXFER_FROM_DEV, cmd_len=16, cmdp="\x85\x08\x0e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xec\x00", mx_sb_len=32, iovec_count=0, dxfer_len=512, timeout=60000, flags=0, dxferp="\x40\x00\xff\x3f\x37\xc8\x10\x00\x56\x88\x2a\x02\x3f\x00\x00\x00\x00\x00\x00\x00\x31\x53\x41\x37\x39\x4a\x53\x44\x30\09:01
zygamborzecki: sandboxing ioctls with seccomp is not great09:02
mborzeckix36\x35\x34"..., status=0, masked_status=0, msg_status=0, sb_len_wr=0, sbp="", host_status=0, driver_status=0, resid=0, duration=7, info=0}) = 009:02
zygaSG_IO, the rest is in the struct09:02
mborzeckiChipaca: morning!09:02
zygamborzecki: I'd vote for a trusted helper09:02
* Chipaca would vote too, but then zyga might decide not to have the vote at the last minute09:03
zygalol09:03
zygaChipaca: last week I was impressed by the manner the MPs conduct themselves09:03
zygaChipaca: guess this week reminds me all too much of home09:04
mborzeckihaha09:04
mborzeckizyga: i suppose apparmor doesn't do much about ioctls either?09:06
zygaI don't think it does09:06
zygaapparmor can do only as much as the LSM layer allows09:07
zygaand even if, it must be implemented in the kernel09:07
zygaand even if, it must be implemented in the userspace09:07
zygaa trusted helper looks 10x more workable09:07
Chipacazyga: https://www.youtube.com/watch?v=Tjp5OmoDYQM09:07
mborzeckiand then it must reach distros09:07
mborzeckiehh09:07
zygaChipaca: I saw that, shared that yesterday, brilliant work09:07
Chipacazyga: :-)09:08
Chipacabut also, :-/09:08
Chipacatoo close09:08
zygaChipaca: my "radio" recently is https://parliamentlive.tv/Event/Index/d1114342-3529-43e7-86fa-2263df3271f209:08
zygaChipaca: at least it means the brits didn't lose their sense of humour :)09:08
mborzeckizyga: the struct is in /usr/include/scsi/sg.h insteresting read09:09
zygamborzecki: fun fact, installing golang on fedora pulls in subversion and mercurial09:10
zygawhat a blast from the past :)09:10
mborzeckihahaha09:10
mborzeckirich dependencies09:10
mborzeckizyga: another fun fact, installing snapd builddeps on fedora pulls in mongodb09:11
zygawhy on eart?09:12
zygaearth?09:12
mborzeckizyga: hah, probably because we're pulling in bson09:12
zygaoh, right09:12
zygals09:12
mborzeckiand the travis job in  https://github.com/snapcore/snapd/pull/6284 failed :/09:14
mupPR #6284: spread: make opensuse-42.3 manual <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6284>09:14
mupPR snapd#6279 closed: interfaces: tweak deny-auto-connect policy tests <Created by mvo5> <Closed by mvo5> <https://github.com/snapcore/snapd/pull/6279>09:18
mvoa review for 5845 would be great09:19
zygadoing that now09:22
Chipacazyga: #5845 still has a changes-requested from you on it09:22
Chipacaah ok09:22
* Chipaca leaves you to it09:22
mupPR #5845: interface: add new `{personal,system}-files`  interface <Created by mvo5> <https://github.com/snapcore/snapd/pull/5845>09:22
pedroniszyga: I answered/added a couple more comments to the features PR, is there anything we need to discuss on my comments?09:23
zygapedronis: I think I need to take some action now, I'll do that soon09:23
pedronisok, thx09:23
zygathank you!09:23
* zyga has sudden urge to refactor one bug in interface design09:26
mborzeckizyga: left a note under the topic09:26
zygasmartctl?09:27
mborzeckizyga: yup09:27
zygak09:27
mborzeckizyga: btw. https://github.com/snapcore/snapd/pull/6283 iirc you've stumbled upon some issues importing osutil too09:27
mupPR #6283: osutil: do not import dirs <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6283>09:28
zygamborzecki: yes, I had an idea when you left a comment yesterday09:28
zygadone09:29
zygais master still broken?09:29
mborzeckizyga: yeah, i've opened a PR to disable openssue for now, but the travis job failed, couldn't fetch the log and everything is broken :/09:30
zygaheh, must be Tuesday09:30
zygathank you09:30
mborzeckizyga: https://github.com/snapcore/snapd/pull/628409:43
mupPR #6284: spread: make opensuse-42.3 manual <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6284>09:43
zygamvo: done09:46
mvozyga: thank you!09:46
pstolowskimvo: thanks for commenting on that gpio attrs bug, i was (fruitlessly) trying to understand what went wrong...09:56
pstolowskimvo: i completly forgot it was limited to beta09:58
mvopstolowski: yeah, the trouble is really that this runs with the broken code so refreshing out of it is hard10:00
mvopstolowski: so lets see if that is good enough for them, if not we need to think harder :)10:01
zygabrb, quick coffee10:14
zygamvo: as a "simple" workaround10:14
zygadisabling the snap should be enough10:14
zygathen you can refresh ok10:15
zygaand re-enable it10:15
mvozyga: its the gadget - will that also work?10:16
zygaoh,10:16
zygaI don't know10:16
zygaI didn't anticipate it was the gadget itself10:16
zygaone thing one can do is to disconnect that interface10:16
mvozyga: aha, nice idea10:16
mborzecki#6284 is green, yay!10:17
mupPR #6284: spread: make opensuse-42.3 manual <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6284>10:17
mvozyga: feel free to commment in the bug (if you haven't already)10:17
zygaI haven't let me try10:17
mvota10:22
zygare10:24
ChipacaDec 10 08:44:04 milesdavenport snapd[3255]: error: EOF10:31
Chipacahmmm10:32
Chipaca:-)10:32
zygals10:33
Chipacano such file or directory10:34
mvoChipaca: heh, thats a useful error10:46
mupPR snapd#6284 closed: spread: make opensuse-42.3 manual <Simple 😃> <Created by bboozzoo> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/6284>10:48
pedronispstolowski: I made some comment in #618010:50
mupPR #6180: snap/info: bind global plugs/slots to implicit hooks <Created by stolowski> <https://github.com/snapcore/snapd/pull/6180>10:50
pstolowskipedronis: ty10:51
zygasome progress :)10:58
mupPR snapd#6286 opened: release: support probing SELinux state <SELinux> <⛔ Blocked> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6286>10:58
pstolowskipedronis: wrt to retry vs running tasks problem, i wonder if we shouldn't set task back from Doing to Do status on Retry error with After>011:07
pedronispstolowski: I haven't looked in the issue at all so far11:07
pedronisyou'll need to tell me more11:07
pedronisbut almost lunch here11:07
pstolowskipedronis: sure, enjoy, let me know when you're back and we can discuss11:09
cachiomvo, hey11:14
cachioabout the entropy on ubuntu core 1811:15
cachioany idea how to deal with this?11:15
Chipacacachio: y u hate mvo11:17
mvocachio: its hard, if you use spread you can use SPREAD_QEMU_GUI=1 in the environment and then type some keys when the qemu window comes up, keystrokes in the terminal are feed to the entropy11:17
mvocachio: there is also a way in qemu to use the entropy of the host, however I don't think spread is exposing this :/11:17
mvocachio: i.e. this would need a spread change11:17
cachiomvo, ok, I'll research a bit more11:18
Chipacamvo: cachio: spread looks up kvm in PATH; I have a ~/bin/kvm that adds -smp 411:18
Chipacaso if you know what options to pass kvm for it to pick up the host's entropy, you can do this11:19
mvocachio, Chipaca thanks! please try "-device virtio-rng-pci"11:20
Chipacahttps://pastebin.ubuntu.com/p/yg69DwrqTM/11:20
Chipaca^ that's my ~/bin/kvm11:20
Chipacabut it doesn't need to be this fancy :-)11:20
Chipacamvo: cachio: e.g., https://pastebin.ubuntu.com/p/jfw8GqVNV3/11:22
mupPR snapd#6287 opened: httputil: retry on temporary net errors <Created by mvo5> <https://github.com/snapcore/snapd/pull/6287>11:22
cachioit is hanging with -device virtio-rng-pci11:22
cachioChipaca, if I don use -nographic11:22
cachioI can add manually entropy by moving the mouse and with keystroke11:22
cachios11:22
cachiobut not sure if it will work the whole run11:23
mvocachio: once it provided it should work11:24
mborzeckicachio: try using -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng011:24
mvocachio: I mean, on subsequent reboots it should reuse things11:24
cachiomborzecki, running this11:25
cachiomborzecki, hanging11:25
cachiomvo, trying without -nographic11:27
cachiomvo, https://paste.ubuntu.com/p/x96XCC69wv/11:32
cachiosnapd.seeded.service failed11:32
mvocachio: what is the output of "journalctl -u snapd.seeded.service" ?11:32
cachiomvo, https://paste.ubuntu.com/p/MjP8mMWGdB/11:34
zygaI have a good grasp of how to implement refreshes during app downtime now11:45
zyganeed to write down my thoughts11:46
cachiomvo, tests already running on core 1811:55
mvosergiusens: the seeded failure is curious, I'm looking at it now11:55
cachioI'll let you know the results11:55
sergiusensmvo: not related to me I hope 🙂11:56
cachiomvo, wrong sergio I think11:56
mvosergiusens: *cough* sorry11:56
mvocachio: yeah11:56
cachioi am gonna create a new vm to see if I can reproduce it11:58
mvocachio: I think I have an idea11:59
mvocachio: about this failure, working on a possible fix11:59
cachiomvo, yes same error11:59
mvocachio: slightly strange that we don't see this all the time in our spread runs :/12:00
cachiomvo, yes, but the image is not created exactly the same12:01
cachioand the hypervisor is not the same as well12:01
cachiomvo, this is the snapd log https://paste.ubuntu.com/p/X465Jd8Vbs/12:03
cachioI see some errors12:04
cachionot sure if they are important12:04
mvocachio: can you give me the matching journalctl -u snapd.seeded.service?12:05
mvocachio: so that I can compare timestamps?12:05
cachiohttps://paste.ubuntu.com/p/R5Hg2DBX4f/12:06
cachiomvo, I had both12:06
mvocachio: thanks, looking12:06
mvocachio: I can also get the global journal log please?12:08
mvocachio: it looks like something is killing snapd12:08
mvocachio: and I wonder what12:08
cachiosure12:09
cachiomvo, https://paste.ubuntu.com/p/QGvrtRSThX/12:10
cachiosystemctl restart snapd.socket12:11
cachioI see this12:11
cachiosnapd[998]: main.go:147: Exiting on terminated signal.12:11
cachioDec 11 11:59:23 localhost systemd[1]: Stopping Snappy daemon...12:11
mvocachio: so the socket got restarted it seems12:12
cachiomvo, yes12:12
mvocachio: thanks! so this is a freshly generated image, right? we did not modified it as part of some test setup except for adding the user to run the tests?12:13
mvocachio: I think I can reproduce this, let me dig some more12:14
sergiusensmvo: since you have my attention, may I ask if you had time to look at the .snapcraft bug task I had?12:14
cachiomvo, fresh fresh12:15
cachioI genereted it with ubuntu-image yesterday12:15
mvosergiusens: yes, I replied there - is there something missing?12:15
mvocachio: I can reproduce now, I take it from here, still not clear yet about the why but it seems to be a bug in the firstboot setup12:16
sergiusensmvo: nah, I am just getting started and haven't looked yet but took the opportunity to ask as we started established a link12:16
cachiomvo, good, nice to find it now :)12:17
mvocachio: yeah, I wonder if this is new or if we had it in the previous image as well12:17
cachioI just tried the stable one and I saw the same error12:17
cachiolast stable published12:17
cachiomvo, so I think it is not new12:18
cachio:s12:18
mvocachio: :/ at least we found it now12:18
mvocachio: good, thanks for double checking12:18
cachiomvo, np12:18
cachiomvo, I'll be afk 15 minutes12:18
cachioneed to take my son to the kinder garden12:18
cachiomvo, tests are running on that image12:19
mvocachio: no worries, I don't need anything at this point, thanks12:19
mvocachio: annoying - its a race, I just tried again and it worked .(12:20
cachiomvo, yes, do you what the line I use to start the image?12:21
cachioI don't know if that could help12:22
mvocachio: its fine, I can reproduce in ~30% of the runs it seems12:22
cachiomvo, nice12:22
cachioI'll be bak in 15 minutes12:22
* cachio afk12:22
zygapedronis: I wrote https://forum.snapcraft.io/t/bug-saves-are-blocked-to-snap-user-data-if-snap-updates-when-it-is-already-running/3226/19?u=zyga - I feel comfortable having a discussion about the feature when you have the time12:33
zygapedronis: I will now resume work on my branches12:33
zygamborzecki: small leftover I didn't notice: https://github.com/snapcore/snapd/pull/628812:33
mupPR #6288: cmd/snap-confine: refactor call to snap-update-ns --user-mounts <Per-user mount ns  🐎> <Created by zyga> <https://github.com/snapcore/snapd/pull/6288>12:33
mupPR snapd#6282 closed: tests: force test-snapd-daemon-notify exit 0 when the interface is not connected <Created by sergiocazzolato> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/6282>12:34
mupPR snapd#6288 opened: cmd/snap-confine: refactor call to snap-update-ns --user-mounts <Per-user mount ns  🐎> <Created by zyga> <https://github.com/snapcore/snapd/pull/6288>12:34
pedroniszyga: thx12:34
zygapedronis: I will ask chipaca and jdstrand to review the draft12:35
pedronisok12:35
sergiusensmvo: if my reply to that bug is good, then I will implement like that12:36
=== chihchun is now known as chihchun_afk
mvosergiusens: what was the bugnumber again?12:43
sergiusensmvo: https://bugs.launchpad.net/snapcraft/+bug/180521912:43
mupBug #1805219: .snapcraft <19.04> <19.04-external> <Snapcraft:Triaged> <https://launchpad.net/bugs/1805219>12:43
pedronispstolowski: I'm looking at the taskrunner, and I'm not sure I understand how the bug happens actually, running is not based on status, is based on whether there's go routine/tomb12:47
pstolowskipedronis: yes i know, i realized that afterwards, but the idea was part of a "bigger" plan to prevent two tasks from ending up in "Doing" state in case of snapd restart. but at end i'm back at square one and no longer sure about proper fix atm tbh12:49
pstolowskipedronis: i can explain some more things in a HO12:50
=== chihchun_afk is now known as chihchun
pedronispstolowski: I have a meeting very soon, we can chat after the standup? about this and a bit about hotplug status?12:50
ackkSaviq, hi, is there a way to allow a user to use multipass without sudo-ing it?12:50
pstolowskipedronis: sure12:50
pedronisthx12:51
zygaChipaca: hey12:53
zygado you have 10 minutes to discuss something?12:53
zygamborzecki: replied on https://github.com/snapcore/snapd/pull/628812:55
mupPR #6288: cmd/snap-confine: refactor call to snap-update-ns --user-mounts <Per-user mount ns  🐎> <Created by zyga> <https://github.com/snapcore/snapd/pull/6288>12:55
Saviqackk: we normally use the `sudo` group, so if you add the user to that group (and potentially create that group if not there), it will work12:56
Saviqackk: we're fixing that to try 'adm' https://github.com/CanonicalLtd/multipass/pull/513, too - but ultimately it will be world-writable as security on it will be on a higher level (RPC encryption certificates)12:56
mupPR CanonicalLtd/multipass#513: Fix daemon missing group <Created by townsend2010> <https://github.com/CanonicalLtd/multipass/pull/513>12:56
ackkSaviq, so if I create a "multipass" group and chgrp'd the unix socket to it that would work for users in that group. right?12:59
ackkSaviq, I'm trying not to sudo our jenkins user12:59
Saviqackk: no, "multipass" is not a group we use13:00
Saviqackk: in the current builds, "sudo" is the only group we can do - with the above PR, "adm" will also work13:00
ackkSaviq, ah I see13:00
Saviqackk: you could add a post-start command in the multipassd service13:00
Saviqto change the owner/mode of the socket13:01
mborzeckihuh, our centos images have selinux in enforcing mode by default13:01
=== ricab is now known as ricab|lunch
mborzeckioff to pick up the kids13:02
Saviqackk: `systemctl edit snap.multipass.multipassd` and add a chown you like https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStartPre=13:02
Saviqackk: the socket is /run/multipass_socket13:02
ackkSaviq, won't the systemd service be regenerated on snap updates?13:05
zygaackk: not today13:06
ackkah cool13:06
ackkSaviq, is it correct that I get an empty file when editing the service?13:07
=== chihchun is now known as chihchun_afk
mupPR snapd#6289 opened: cmd/snap-confine: remove SC_NS_MNT_FILE <Simple 😃> <Created by zyga> <https://github.com/snapcore/snapd/pull/6289>13:26
Saviqackk: yes13:29
Saviqackk: systemctl lets you edit an override file13:29
Saviqackk: you can `systemctl cat snap.multipass.multipassd` afterwards to see the results13:30
=== chihchun_afk is now known as chihchun
mupPR snapd#6290 opened: cmd/snap-confine: fix typo "a pipe" <Simple 😃> <Created by zyga> <https://github.com/snapcore/snapd/pull/6290>13:35
ackkSaviq, ah I see thanks13:36
Chipacazyga: I do have 10 minutes to discuss somehting13:38
zygahey13:38
zygagreat13:38
zygado you prefer HO or here?13:38
Chipacazyga: here13:38
zygaok13:38
zygaI wrote some notes on the forum13:38
zygahttps://forum.snapcraft.io/t/bug-saves-are-blocked-to-snap-user-data-if-snap-updates-when-it-is-already-running/3226/19?u=zyga13:38
zygacould you please read that and tell me when we can discuss13:38
zygaI'm interested in your opinion on snap refresh task set design13:39
zygaif you think the proposal is sound or if you have better ideas13:39
Chipacaok, let me check, i think i already read it13:39
jdstrandmborzecki, zyga: if you're talking about ioctls for smartctl, that is something I need to look into. zyga is right. ioctls are a nightmare to deal with13:39
zygajdstrand: hello13:40
jdstrandmborzecki, zyga: or was it btrfs-- that's the other one I need to look at13:40
zygajdstrand: I agree and I don't believe we should attempt to expose the real smartctl13:40
jdstrandanyway. nightmare, yes13:40
zygayes13:40
zyganightmare(2) - alias for ioctl(2)13:40
zygajdstrand: I will have a question for you if you have a moment as well13:41
zygajdstrand: not sure if this is the best time13:41
jdstrandthere is stuff we could do with apparmor. its long, long been on the apparmor roadmap to handle those, but we don't (beyond mediating caps) at this time. the language would probably make it easier to work with as a policy author than what we have now with seccomp, but still would not be great13:41
jdstrandzyga: snap restarts? I saw the thread. I haven't read email yet today13:42
jdstrandzyga: regardless, ask away13:42
=== chihchun is now known as chihchun_afk
zygajdstrand: I was surprised that snap-seccomp profile compilation is very slow, do you think we should consider introducing caching13:43
zygajdstrand: where snap-seccomp would sort the system calls, discard comments, and use that as cache key13:44
zyga(regardless of snap name, so various snaps may end up using the same binary cache)13:44
zygajdstrand: unlike apparmor the cache would be our responsibilty to maintain13:44
jdstrandzyga: how slow are we talking?13:45
jdstrandzyga: but even without answering that, I think the biggest bang for the buck is only compiling once per set of interface connections. like what I maintain is the best thing to do with apparmor13:46
zygaI measured quarter second compilation for nearly every profile on coffee lake i9, interestingly apparmor parser was significantly faster even when a profile was compiled13:46
zygaI agree with that, I started some early prototyping but put it on hold now13:46
jdstrandzyga: that's a great improvement with or without caching13:46
zygabut I'd love to get to that13:46
zygathough caching seems like an order of magnitude easier to implement for _some_ improvement13:46
Chipacazyga: how reliable is the release-agent protocol?13:46
zygaChipaca: the protocol is that the kernel clones a userspace task with an argument and... that's that13:47
zyga(nothing else happens)13:47
jdstrandquarter second is not terrible, but if you have 100 profiles, that's 25 seconds. but, if you have 10 profiles with 10 interfaces (eg a typical desktop app), that is also 100 seconds13:48
zygajdstrand: I believe seccomp is likely to have cache hits13:49
zygasince unlike apparmor it has no paths to spoil the cache13:49
jdstrandzyga: this isn't an either/or13:49
Chipacazyga: it looks like we'll need a lock, either global or per /run/snapd/runctl/snap.$SNAP_INSTANCE_NAME13:49
jdstrandyes, I think caching could benefit13:49
jdstrandeven would benefit13:49
zygaChipaca: we have locks at every level, can you be specific when you think a lock should be acquired13:49
Chipacazyga: there's one step which is "After populating the freezer cgroup write /run/snapd/runctl/snap.$SNAP_INSTANCE_NAME.running"13:50
zygaah13:50
zygayes, we hold a lock at that phase13:50
Chipacazyga: there's one step which is "if /run/snapd/runctl/snap.$SNAP_INSTANCE_NAME.running is present, postpones the [refresh]"13:50
zygathe per-instance lock13:50
Chipacazyga: if the second one is run while the first one is populating the freezer, things might be interesting13:50
zygaI see, so you are after looking for the refresh racing13:51
zygathat's a good pioint13:51
zygayes, we should grab the lock before manipulating such files13:51
jdstrandbut if you took that delayed compilation off the back burner onto the front, you should be able to get two birds with one stone (seccomp *and* apparmor) and likely help the common case faster (ie, you could work on caching second). really, for caching I think you want this, otherwise you are going to be maintaining a forest of caches for all the intermediate steps of going from template to 10 interface13:51
jdstrandconnections13:51
zygajdstrand: I don't disagree about that13:52
zygajdstrand: I would like to work on that after the refresh work13:53
zygalikely january13:53
zygajdstrand: I wrote a prototype showing how significant the improvements were13:53
zygajdstrand: I also came to a realisation that we made a mistake in interface design13:53
jdstrandthe problem with caching is increased complexity. there is an opportunity to load the wrong cache. those would be fun and confusing bugs for people13:53
zygajdstrand: that we can rectify to have cleaner and faster code still13:53
zygajdstrand: yes, though I'm a fan of content-based caches13:54
zygajdstrand: which are easier to work with13:54
zygaand it would especially be suitable to reuse that we are likely to see with seccomp13:54
zygajdstrand: as for that mistake in interfaces, I will make a PR if I can today, definitely something in the next few days because it's bugging me more and more, seeing the amount of code we devote to working around it13:55
jdstrandzyga: so, the bottom line for me is that I'm not opposed to caching but I'm way more in favor of adding delayed compilation that would help both apparmor and seccomp. I worry that if we add caches, we'll put of the delayed compilation further and further (we've known about this a long time)13:57
jdstrandoff*13:57
jdstrandthat's why I'm harping on it. while I believe we'll have bigger overall gains with delayed compilation (which then caching could be added in the fullness of time) that isn't my decision though.13:58
jdstrandzyga: while it isn't strictly required for the caching work, one thing that has been on the non-official roadmap is organizing seccomp calls by frequency of use, since that will speed up snaps at runtime13:59
jdstrandzyga: if we grouped (even some of) that into this work, we could avoid a potentially painful recompilation flag day down the line14:00
zygajdstrand: right, I'm happy to get the general perf improvements in place at the earliest opportunity14:01
jdstrandzyga: eg, open, read, write are all *highly* used, but an alphabetical sorting puts tham after, say, capget14:01
zyga(standup time)14:02
jdstrandzyga: I don't think this has to be terribly accurate. eg, strace like 10 popular snaps (5 desktop and server/iot) and get some stats and put the top 5 first (sorted to each other), the next top 20 perhaps alphabetically relative to each other and then the rest alphabetical14:04
jdstrandzyga: this is within the binary cache, not the src of course14:04
jdstrandzyga: something like that. we can fine tune more later, but just something like that would give nice perf gains14:04
jdstrandzyga: if you were to do the caching work and incorporate that, I would probably stop harping on delayed compilation14:05
jdstrandzyga: well, I won't promise that... I won't do it as much ;)14:06
jdstrandzyga: of course, if we are 'good enough' with this (eg, include postgres, nginx/apache, mysql, spotify, chromium, etc) then there may be no point to revisit down the line14:07
jdstrandzyga: it would be interesting to profile snap-seccomp to understand where the cost is. perhaps there are gains simply in making the code more efficient14:12
zygayeah, that's true14:12
zygawe should measure that14:12
jdstrandzyga: overt the years we (and be we I mean jj) have cut apparmor profile times by something like 80%+14:13
jdstrandover*14:13
jdstrandmaybe even more14:13
=== ricab|lunch is now known as ricab
mborzeckicachio: can you rebuild centos images with selinux set to permissive mode?14:19
cachiomborzecki, sure14:20
mborzeckicachio: thanks!14:21
cachiomborzecki, test-centos-114:35
cachioit is ready14:35
mborzeckicachio: thanks, checking now14:37
cachiomborzecki, should we use this one instead of the current one?14:41
greyback@zyga on no seccomp profile for multipass - I'll work on it. But I've a question - is there a way multipassd can create a child process with a different seccomp to itself?14:42
zygagreyback: only a subset (more restrictive profile)14:42
zygagreyback: my point is that I'd be happier with a really rich profile over a profile that is 100% open14:42
zygagreyback: I doubt running kvm requires that much14:42
zyga(that is, unbound set)14:43
greybackzyga: have we an example of that subset profile anywhere? I'm happy to give it a go14:43
zygaI mean14:43
zygayou can confine it more than it was before14:44
zygajust apply another seccomp profiles as usual14:44
zygathey stack in the kernel14:44
zyga(all profiles will run, most restrictive outcome is selected)14:44
greybackoh ok. This example seccomp for qemu looked pretty big to me: https://github.com/qemu/qemu/blob/cf9dc9e4807464a9d0b3d7368b818323e14921eb/qemu-seccomp.c#L34 but true, it still does limit it14:45
mborzeckicachio: the image looks ok to me, can you replace the current one?14:46
cachiomborzecki, sure, I'll make a run first14:47
mborzeckicachio: ta14:48
jdstrandgreyback: yes, what zyga said. I suggest comparing the above link to what is in the default template, then add the missing calls to the multipass-support interface. then we can go from there in the PR review14:50
greybackjdstrand: ack, thanks14:50
jdstrandgreyback: btw, do I still owe you an email?14:51
greybackjdstrand: nope, I've figured out qn 1 myself and implemented it in that PR. Qn 2, I think I also know the answer (but might run it by you as a sanity check, when the time comes)14:53
greybackmostly hoping not to be too security paranoid14:53
jdstrandgreyback: feel free to run stuff by me, yes. with the holidays and sprints, etc, if I haven't answered you, feel free to ping me :)14:58
greybackjdstrand: thanks14:58
mborzeckimvo: zyga: funny failure in restoring google:ubuntu-18.04-64:tests/main/degraded https://paste.ubuntu.com/p/ypgPkCp4P6/ probably related to KillMode=process15:05
mvomborzecki: hm, I thought we now do KillMode=process, so fc-cache should survive this now :/15:06
zygammm15:07
zygayes15:07
zygaI have the same feeling]15:07
mborzeckimvo: zyga: hm i merged master to this branch earlier today15:09
ackkSaviq, is there a way to debug why snapcraft is failing to use multipass? All I get is "launch failed: Connect Failed" but I acn't see why it is failing15:11
mborzeckizyga: mvo: and I can see it in the source code15:13
Saviqackk: we're now trying to improve the error messaging around it15:13
Saviqackk: `ls -l /run/multipass_socket`?15:13
zygabrb for dinner15:13
ackkSaviq, ah, it's back to root:sudo15:14
ackkSaviq, I have ExecStartPost=chgrp multipass /run/multipass_socket in the override file but it doesn't seem to be working15:14
Saviqackk: you can check in journal if that command results in an error15:17
ackkSaviq, I don't see anything related15:18
Saviqackk: `systemctl status snap.multipass.multipassd` would also show whether it ran that command - maybe it did too early?15:18
ackkSaviq, https://paste.ubuntu.com/p/xv5trtZpZX/15:19
jdstrandgreyback: ok, well, you coaxed an email out of me :)15:20
Saviqackk: might be it ran too early15:20
Saviqackk: http://paste.ubuntu.com/p/hn78NJw7CW/ worked for me15:20
ackkSaviq, ok I'll try that15:21
ackkthanks15:21
jdstrandgreyback: it was very cunning how you said you didn't need it and then got me to do it. well played ;)15:21
jdstrandgreyback: seriously though, hopefully it helps some15:22
greybackjdstrand: hah! reverse physchology works ever time :)15:22
jdstrand:)15:22
mupPR snapcraft#2424 opened: nodejs plugin: fail gracefully when a package.json is missing <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/2424>15:22
ackkSaviq, sigh, set to sleep 5, group is it still sudo15:25
Saviqackk: did you restart?15:25
ackkyes15:25
Saviqackk: if you apply my change verbatim, does it work?15:25
ackk(snap restart multipass)15:25
ackkSaviq, yes15:26
Saviqackk: then something's wrong with your chgrp15:27
mupPR core18#96 opened: run-snapd-from-core: fix race when restarting snapd.socket <Created by mvo5> <https://github.com/snapcore/core18/pull/96>15:27
ackkSaviq, https://paste.ubuntu.com/p/gx66QysThT/15:27
Saviqackk: in `systemctl status ...` there's a "Process: …" line that says what command was executed for ExecStartPost and its success state15:27
ackkSaviq, I don't see that15:28
mvocachio: https://github.com/snapcore/core18/pull/96 <- this fixed it for me15:29
mupPR core18#96: run-snapd-from-core: fix race when restarting snapd.socket <Created by mvo5> <https://github.com/snapcore/core18/pull/96>15:29
mvomborzecki: still slightly strange15:29
ackkSaviq, ah, foudn the issue. I didn't have the ExecStartPost in a [Service] section15:32
cachionice15:32
cachiomborzecki, centos-7 image ready15:32
cachiomvo, is it any way to test it?15:33
cachioare you creating a new beta core?15:33
* cachio lunch15:37
ackkSaviq, sorry, one more question. how does multipass pick the VM network?15:38
ackk(and how do I know which one it is)15:39
Saviqackk: it's a random subnet from the private space, checked for conflicts15:39
ackkSaviq, is there a command to get which one it is?15:40
mvocachio: you can "sudo snapcraft" from this branch - this will create a custom core18. then you can run "ubuntu-image ubuntu-core-18-amd64.model --channel=edge --extra-snaps /path/to/core18_....snap"15:40
mvocachio: thats what I did - if it works for you, please comment in the bug15:41
Saviqackk: there's a file in /var/snap/multipass/common - it has "subnet" in its name15:42
ackkSaviq, thanks15:42
ackkSaviq, ah, so the proxy set in multuipass is not pushed to VMs, is it?15:44
Saviqackk: hmm indeed we're not15:47
ackkSaviq, any way I can inject it?15:47
Saviqackk: can you please file an issue in https://github.com/CanonicalLtd/multipass/issues/new15:47
Saviqsergiusens: is there a way to pass a cloud-init file to multipass on launch?15:47
mborzeckicachio: thanks, i've restarted the affected PRs15:49
ackkSaviq, https://github.com/CanonicalLtd/multipass/issues/52215:50
Saviqackk: thanks, the only thing I can think of is if you monkey-patch snapcraft/internal/build_providers/_base_provider.py to include proxy settings15:54
ackkSaviq, yeah but I can't do it in the snap, can I?15:54
Saviqackk: right, you can't, TBH I think this is also a snapcraft issue - that's what should ensure that proxy settings are passed into the build environment15:55
Saviqlike, you shouldn't even need to know multipass is in the mix15:56
ackkright. ideally if snapd has a proxy set (or knows of one from /etc/environment) , all snaps should use it without extra needs of configs for each one15:56
Saviqyeah probably15:58
ackksergiusens, is there currently a way to do that in snapcraft ? ^ should I file a bug about it?16:02
sergiusensackk: a bug would be fine16:08
* zyga sees jdstrand typing on the forum and cannot wait to see what's coming 16:08
mupPR snapd#6266 closed: tests: make security-device-cgroups-{devmode,jailmode} work on arm devices <Created by sergiocazzolato> <Merged by sergiocazzolato> <https://github.com/snapcore/snapd/pull/6266>16:10
mvoChipaca: the CLA checker is acting up: https://api.travis-ci.org/v3/job/466575606/log.txt16:10
mvoChipaca: KeyError: 'canonical'16:10
Chipaca?16:11
* Chipaca looks16:11
zygamvo: I saw that and I wonder if the issue is related to travis-side caching16:11
zygaif it asked and never bothered to ask again16:11
mvoChipaca: this is in https://github.com/snapcore/snapd/pull/625216:11
mvozyga: no worries16:11
mupPR #6252: userd: handle help urls which requires prepending XDG_DATA_DIRS <Created by kenvandine> <https://github.com/snapcore/snapd/pull/6252>16:11
mvoChipaca: ideas welcome :)16:11
Chipacamvo: https://launchpad.net/~canonical16:13
Chipacamvo: that's a private team16:13
pedronisalways has been16:13
Chipacaso that check won't work ever16:13
zygaah16:13
zygamy bad16:13
pedronishow was it working before?16:14
Chipacakenvandine: what have you done :-)16:14
zygaI merge the PR adding that feature16:14
zygaI understand now, it works if you are a member16:14
zygaso works locally for testing16:14
kenvandineit passed in CI though16:14
Chipacapedronis: it wasn't: https://github.com/snapcore/snapd/pull/625316:14
mupPR #6253: Members of canonical LP group should pass CLA check <Created by kenvandine> <Merged by zyga> <https://github.com/snapcore/snapd/pull/6253>16:14
kenvandinei thought it did anyway16:14
* Chipaca looks16:14
Chipacakenvandine: https://travis-ci.org/snapcore/snapd/jobs/461925801 agrees with you16:15
Chipacastrange16:15
ChipacaI don't think it should work, with it being private, but now i don't know16:16
Chipacai can confirm it returns a 404 here16:17
Chipacamaybe there was a bug or sth16:18
Chipacain any case16:19
Chipacakenvandine: mvo: if this is for 6252, merging master should let it pass16:19
Chipacaactually, it should already work16:19
* Chipaca looks16:19
mvoChipaca: I thought I just did merge master into the PR from ken16:19
* Chipaca debugs16:20
ijohnsondo we have a table/webpage somewhere that lists across distros snapd security confinement supported? I.e. Ubuntu supports everything, Arch supports apparmor, Debian doesn't support apparmor, XYZ supports seccomp, etc.?16:21
zygaijohnson: we have snap debug sandbox-features16:25
zygawe don't have what you are asking for but I can tell you that only the ubuntu kernel has all the apparmor features16:26
zygawe're close but not there yet16:26
ijohnsonok, so is the story still basically "only ubuntu (classic and core)" support _all_ security confinement features?16:27
mupPR snapd#6290 closed: cmd/snap-confine: fix typo "a pipe" <Simple 😃> <Created by zyga> <Merged by zyga> <https://github.com/snapcore/snapd/pull/6290>16:28
zygaijohnson: correct16:32
ijohnsonzyga: ack, thanks16:32
zygajdstrand: apologies for the edited responses, the UX on the forum is not great for some of those interactions.16:40
zygaI'm still editing the post to complete my replies16:40
zygajdstrand: some of your response has broken formatting16:40
* Chipaca takes a break16:46
mupPR snapd#6291 opened: Revert "Members of canonical LP group should pass CLA check" <Created by chipaca> <https://github.com/snapcore/snapd/pull/6291>16:46
zygajdstrand: I believe I've answered your questions now, I will go and amend the post fix the inaccuracy with regards to refresh-pending hook and refresh-pending attribute16:49
Chipacamvo: i know why the cla check is failing; i need to fix it16:51
Chipacabut first i need to take a break, will bbl16:51
cachiomvo, at least firt attempt I could not reproduce it16:51
zygajdstrand: done, thank you for contributing to that thread16:52
zygajdstrand: note that this will be an experimental feature and it will not be on by default when first shipping16:53
zygajdstrand: we may even consider enabling it per-snap16:53
=== pstolowski is now known as pstolowski|afk
mupPR snapd#6283 closed: osutil: do not import dirs <Simple 😃> <Created by bboozzoo> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/6283>16:57
cachiowith the image which I build on edge I dont have lack of entropy17:09
cachiomvo, ~17:09
zygaChipaca: small go test woe with locale and snapshots https://www.irccloud.com/pastebin/GPrTt5Sg/17:37
zygapedronis: pushed some changes to 619017:38
zygaI'll push some more tests but I think this is capturing most of what was discussed now17:39
pedroniszyga: will probably look at it later today or early tomorrow17:40
mvocachio: oh, interessting - I wonder if the kernel fixes this17:40
zygasuper, thank you17:40
mvocachio: did you had a chance to test my core18 fix?17:40
* pedronis breaks for dinner but will work a bit more after17:41
blackboxswSaviq: sorry for the response out of left field it it's not helpful, but multipass accepts cloud-init #cloud-config per something like Josh Powers wrote up https://powersj.github.io/post/cloud-init-multipass/17:43
blackboxsw^ if needed17:43
* blackboxsw highlights on cloud-init :/17:43
Saviqblackboxsw: yeah, I know, we wrote it ;)17:43
Saviqthe question is whether snapcraft allows passing it through to multipass, which it doesn't17:44
blackboxswheh :/ sorry reading out of context  without the coffee to start up my brain17:44
mvocachio: aha, thanks - I see you commented in the PR17:45
mupPR core18#96 closed: run-snapd-from-core: fix race when restarting snapd.socket <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/core18/pull/96>17:45
mvocachio: I triggered a new core18 build17:45
mvocachio: so soon we should have a new core18 snap in beta17:46
cwayneplars: ^ ready for some core18 runs? :)17:49
plarscwayne: definitely - our core18 runs are all happening on remote with dragonboard, rpi3, and cm317:50
cwayne:D17:50
cwayneThe rpi3 b right17:51
cwaynei.e. not +17:51
plarscwayne: I think so - it's the one you brought, which I believe was a regular b17:52
plarsv1.2 or 1.3 probably17:52
cwayneCool beans17:52
cachiomvo, nice17:59
mvocwayne, plars \o/ thanks!18:00
Chipacamvo: kenvandine wrt #6252 I fuxed a pish18:08
mupPR #6252: userd: handle help urls which requires prepending XDG_DATA_DIRS <Created by kenvandine> <https://github.com/snapcore/snapd/pull/6252>18:08
Chipacabut at some point we might need to add a whitelist feature18:09
Chipacaor, maybe, add creds so the cla check isn't anonymous18:09
mvoChipaca: \o/18:09
Chipacait works for ken because he's already got things on master (just, not in the last 50 commits)18:10
kyrofazyga, jdstrand how does confinement affect connection to abstract unix sockets? If you have the network plug, can you connect to any?18:13
jdstrandkyrofa: af_unix is mediated, yes. abstract sockets need to match a certain path18:17
jdstrandkyrofa: by default, snaps are allowed to use a snap-specific abstract socket: @snap.@{SNAP_INSTANCE_NAME}.**18:18
jdstrandkyrofa: beyond that, it is interface specifc (look for 'unix' in interfaces/builtin/*.go18:19
jdstrand)18:19
Chipacajdstrand: this reminds me that in deeplin (a debian derivative) confined x11 apps don't work18:21
Chipacajdstrand: the socket there is different but i don't know enough to know why/how/wat18:21
Chipacajdstrand: Deepin*18:21
jdstrandChipaca: it is probably a named socket in /tmp18:21
jdstrandChipaca: as opposed to an abstract socket. therefore the mount namespace is the issue18:22
=== ricab is now known as ricab|leaving
jdstrandChipaca: I'm guessing18:22
Chipacajdstrand: i need to go make dinner, etc18:22
Chipacajdstrand: but i've got a deepin image i can test with later, if you have the time to handhold :-)18:22
Chipacaotherwise i'll just do the old "here's a nickel, kid" thing18:23
jdstrandChipaca: well, there is either an apparmor denial  if deepin supports strict mode snaps, or the mount namespace is getting in the way18:23
jdstrandbut feel free to circle back18:23
Chipacaok18:24
Chipacai wonder if you can bind mount sockets18:24
Chipaca:-)18:24
* Chipaca runs off to make dinner18:24
jdstrandChipaca: you can18:25
kyrofajdstrand, ah ha, very good thanks18:26
kyrofajdstrand, so for snaps to connect to another snap's socket, it can't be abstract18:26
kyrofaAnd then content sharing can be used18:26
jdstrandkyrofa: or an interface can be created for the slot side18:34
jdstrandkyrofa: there are plenty of examples of slot side abstract sockets in the interfaces. with a named socket, it is (currently) just grouped in with file rules, so the content interface works there18:35
jdstrand(there are also plenty of examples of slot policy for named sockets in the interfaces too, but I digress)18:36
kyrofaAh interesting, okay18:38
mupPR snapd#6291 closed: Revert "Members of canonical LP group should pass CLA check" <Created by chipaca> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/6291>19:28
* pedronis calls it a day19:57
* zyga returns to see PRs20:02
zygacachio: snap command not found :/ https://www.irccloud.com/pastebin/U9QtFWAV/20:03

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