/srv/irclogs.ubuntu.com/2020/05/19/#snappy.txt

mborzeckimorning05:25
mupPR snapd#8695 opened: data/completion, packaging: cherry-pick zsh completion (2.45) <Simple πŸ˜ƒ> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/8695>05:31
mupPR snapd#8696 opened: packaging/arch: update PKGBUILD to match one in AUR <Simple πŸ˜ƒ> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/8696>06:08
mborzeckimvo: hey06:26
mborzeckimvo: opened a cherry-pick of zsh completion: https://github.com/snapcore/snapd/pull/869506:27
mupPR #8695: data/completion, packaging: cherry-pick zsh completion (2.45) <Simple πŸ˜ƒ> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/8695>06:27
mborzeckimvo: looks like we need the mount-ns fixes in 2.45 branch06:27
mborzeckimvo: i believe the fixes are: https://github.com/snapcore/snapd/pull/8666 and https://github.com/snapcore/snapd/pull/866906:29
mupPR #8666: tests/mount-ns: update to reflect new UEFI boot mode <Created by zyga> <Merged by anonymouse64> <https://github.com/snapcore/snapd/pull/8666>06:29
mupPR #8669: tests/mount-ns: stop binfmt_misc mount unit <Test Robustness> <Created by zyga> <Merged by zyga> <https://github.com/snapcore/snapd/pull/8669>06:29
zygao/07:00
pstolowskimorning07:02
mborzeckizyga: pstolowski: hey07:05
mvohey zyga, pstolowski and mborzecki07:08
mupPR snapd#8688 closed: state: log task errors in the journal too <Needs Samuele review> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/8688>07:12
mvo8604 needs a second review please :)07:13
mupPR snapd#8695 closed: data/completion, packaging: cherry-pick zsh completion (2.45) <Simple πŸ˜ƒ> <Created by bboozzoo> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/8695>07:14
zyga+107:20
mborzeckipstolowski: https://github.com/snapcore/snapd/pull/8692#discussion_r42710122808:05
mupPR #8692: configcore: add nomanagers buildtag for conditional build <Created by stolowski> <https://github.com/snapcore/snapd/pull/8692>08:05
pstolowskimborzecki: thank you08:06
mborzeckipstolowski: maybe we could siplify that even further08:06
pstolowskimborzecki: what do you mean by whitelist and not using tags?08:20
mborzeckipstolowski: instead of building snap command with -tags nomanagers, you could check which overlord packages are imported, we know that overlord/state and overlord/auth are needed (for debug state and macaroons iirc) so those are the whitelist, everything else should throw an error08:23
pstolowskimborzecki: but how? we need to import configcore, it just needs conditional build to exclude certain parts08:23
pstolowskimborzecki: this dependency is introduced in my other PR08:24
mborzeckiaaah ok08:24
pstolowskimborzecki: for that reason the simple dependency check will not work either08:24
mborzeckipstolowski: which is the other pr?08:25
pstolowskimborzecki: the spread test will be updated to check if packaging was done right (in followup(s))08:30
pstolowskimborzecki: #8533. the conditional build will fix selinux denials there08:30
mupPR #8533: image, tests: core18 early config <Created by stolowski> <https://github.com/snapcore/snapd/pull/8533>08:30
pstolowskimborzecki: this is where we pull configcore from snap prepare-image: https://github.com/snapcore/snapd/blob/055397eb7bb37699ebe4ab885b378d3160771392/image/image_linux.go#L43608:30
mborzeckipstolowski: btw. have you checked the size of snap binary with that branch?08:30
mborzeckipstolowski: uhh, looks like it's importing every package found in overlord now? https://paste.centos.org/view/9964d6af08:32
pstolowskimborzecki: i haven't check the size, will do in a moment, going to do packaging changes08:34
pstolowskimborzecki: these imports are from current master, or from #8533?08:34
mupPR #8533: image, tests: core18 early config <Created by stolowski> <https://github.com/snapcore/snapd/pull/8533>08:34
pstolowskimborzecki: nb snap bootstrap will benefit too08:35
mborzeckipstolowski: isn't this import problem happening only because of devicestate.CanManageRefreshes() in configcore/refresh.go?08:42
pstolowskimborzecki: i'm not sure, i haven't tracked it down precisely. nonetheless we want to eradicate all managers (i think snap bootstrap size is one of the main concerns)08:45
mborzeckifwiw snapd package is full of bit fat binaries already, tried to fixed that via symlinking of snap to snapd (also the imports would not be a concern in such setup)08:47
mborzeckipstolowski: snap is 20MB, with 8533 it's 21MB, snapd is 25MB, s-b is 16MB08:48
pstolowskimborzecki: mhm, interesting numbers08:53
mborzeckipstolowski: commented out devicestate.CanManageRefreshes() and the devicestate import in configcore, then proxy.go imports assertstate, but that's no fs-only-option either08:55
mborzeckipstolowski: maybe it'd make sense to make the split with a tag in configcore rather than individual managers?08:57
mborzeckipff nvm08:59
mborzeckipstolowski: it's what you have in your latest change ;)09:00
mborzeckiapparently i need a coffee09:01
pstolowskimborzecki: ok, good, i got very confused by this last remark ;)09:01
pstolowskihaving fun with debian packaging now ;)09:03
zygapedronis: hi, IIRC you hinted at dbusutil package, did you mean a new top level or something else?09:08
pstolowskimborzecki: thanks for the review!09:08
mborzeckizyga: found some scripts that cachio is using: https://github.com/snapcore/snapd/pull/8693#issuecomment-63069228009:10
mupPR #8693: tests: add fedora 32 to spread.yaml <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/8693>09:10
pedroniszyga: would it contain only testing stuff atm09:24
pedronis?09:24
zygaNot only, looking at the current code I would put isSessionBusLikelyPresent and the associated mocking code09:30
pedroniszyga: then yes, a top-level dbusutil (I want to move all *util under some package at some point but not immediately)09:38
zygaOk, will do09:39
zygaShould I also move the relevant test code from testutil to something like dbusutil/dbustest?09:39
zygaIt would be the non trivial dbus call testing stack09:40
pedronisyes09:40
zygaGreat, on it09:41
pedronismborzecki: mvo: #8675 needs a 2nd review09:46
mupPR #8675: osutil: add disks pkg for associating mountpoints with disks/partitions <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/8675>09:46
mborzeckii'll take a look, already got it opened in a tab since yday09:48
pedronismborzecki: thx, I did a pass on 8686 btw, there's a question there09:55
zygaI need to do a small errand. Back in 4510:23
zygaIt’s such a sleepy day that some air will help10:23
* mvo is in a meeting10:24
mupPR core20#60 opened: Copy-in launchpad's build-archive <Created by xnox> <https://github.com/snapcore/core20/pull/60>10:29
mupPR snapd#8678 closed: tests: port interfaces-contacts-service to session-tool <Test Robustness> <Created by zyga> <Merged by stolowski> <https://github.com/snapcore/snapd/pull/8678>10:34
zygaThanks guys11:14
zygaMaking progress on tests for dbus bits11:14
zygaAnd perhaps pressure is better as I’m not so sleepy anymore11:15
mupPR snapd#8679 closed: tests: port interfaces-location-control to session-tool <Test Robustness> <Created by zyga> <Merged by stolowski> <https://github.com/snapcore/snapd/pull/8679>11:15
zygaAlso, it must be spring because look at those green tests :-)11:19
* mvo hugs zyga 11:20
mupPR snapd#8697 opened: [RFC] packaging: build cmd/snap with nomanagers tag <Created by stolowski> <https://github.com/snapcore/snapd/pull/8697>11:48
=== msalvatore_ is now known as msalvatore
=== verterok` is now known as verterok
ograxnox, sil2100, we have some serious probs with customers not being able to diable console-conf anymore ... when you guys removed the --disable-console-conf option in ubuntu-image you only did that for core20 builds, didnt you ?13:06
xnoxogra: that is correct. What is customer building? UC20 or 18/16?13:08
ogra18 ... but on a 20.04 host machine it seems13:08
xnoxogra: what is the snap revision of ubuntu-image the customer is using?13:08
xnoxOr are they using the deb?13:08
ograxnox, apparently the deb (for whatever insane reason)13:10
mupPR snapd#8696 closed: packaging/arch: update PKGBUILD to match one in AUR <Simple πŸ˜ƒ> <Created by bboozzoo> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/8696>13:11
ogra(they are using 1.9-20.04 ... but i think we need to ask them to not use the deb anyway ... why is that still in the archive ? it will cause the same problems we have since yeats with the snapcraft db)13:15
ogra*deb13:15
ogra*since years13:15
xnoxogra: because we still use it to build production images.13:16
xnoxAnd we have snap haters too.13:16
ografix that and make them use the snap ;)13:16
ograthere cant be snap haters n canonical :P13:17
roadmr🀭13:19
xnoxogra:  so13:19
xnoxogra:  https://paste.ubuntu.com/p/zFMWpCqd2D/13:19
pstolowskimvo: these 3 checks: https://github.com/snapcore/snapd/blob/80c895a0216cee4116826be5ceda8fa2791d7f97/packaging/ubuntu-16.04/rules#L17913:19
xnoxogra:  ubuntu-image snap has --disable-console-conf option; the deb does not yet have it. As we update the snap more often.13:19
xnoxogra:  but it might depend on channels too, I'm running latest/edge13:19
xnoxogra:  let me check if stable has that option at all13:20
ograxnox, yeah .. they tried the snap before and switched to the deb because the stable snap was lacking the option ... heh13:20
ograprobably time for a release to stable :)13:20
xnoxogra:  but deb doesn't have it either.... so..... ?13:20
ograright, then they started to use a script to modify the image on the fly during build ... and then hell broke loose :)13:21
xnoxsil2100:  when will new ubuntu-image get released?13:21
ogranow pointing them to the edge snap should fix them ...13:21
xnoxogra:  beta has it too13:21
ograyeah13:21
xnoxstable|candidate do not13:21
xnoxdeb does not13:21
ograyup ...13:21
xnox1.9+snap3 is the one they want for now13:22
xnoxogra:  please test & ask for version numbers, before escalating next time =)13:22
ograi was only asking ... not "escalating" ... :)13:22
sil2100xnox: yes13:32
sil2100;)13:32
sil2100(I know that is not the answer to the question)13:33
sil2100Seriously speaking, I talked with Samuele and Michael and I will be releasing the beta UI to stable soon, probably after my +1 maintenance shift13:34
mupPR snapd#8674 closed: tests: fix nested tests  <Created by sergiocazzolato> <Merged by sergiocazzolato> <https://github.com/snapcore/snapd/pull/8674>13:40
mborzeckidoes github work for you guys?13:54
mborzeckii can't fetch or push anything13:54
ijohnsonmborzecki: seems fine to me13:58
ograworks fine for me .... tried to re-connect the caonical VPN ?13:58
ograthat hangs at times for me13:58
cachioijohnson, hey, which is the other step I need to do after re-sign the kernel?14:05
ijohnsoncachio: you need to re-build the gadget snap, signing shim with the snakeoil keys14:06
ijohnsoncachio: to do that, you need the snakeoil dir from this git repo: https://github.com/snapcore/pc-amd64-gadget/14:06
ijohnsonthen unpack the pc gadget snap and run this:14:06
ijohnsonhttps://www.irccloud.com/pastebin/IgmkHoBY/14:07
cachioijohnson, I am using sbsign --key /etc/ssl/private/ssl-cert-snakeoil.key --cert /etc/ssl/certs/ssl-cert-snakeoil.pem14:08
cachiocurrently to sign the kernel14:08
ijohnsoncachio: ok, I think the snakeoil keys from /etc/ssl are the same as from the gadget14:08
cachioijohnson, should I use the cert and key provided by the gadget?14:08
ijohnsonlet me double check that they are the same14:08
cachioijohnson, thanks14:09
* zyga -> lunch14:09
ijohnsoncachio: hmm no the snakeoil key is different it seems, so I think you need to sign shim with the keys from the gadget dir14:11
ijohnsoncachio: when you sign the kernel, are you signing the kernel.efi ?14:12
cachioijohnson, yes14:12
cachiowhich key and cert should I use?14:12
ijohnsoncachio: are you using the ubuntu-core-initramfs package to create the efi?14:12
ijohnsoni.e. are you running `ubuntu-core-initramfs create-efi` ?14:12
cachioyes14:12
ijohnsoncachio: ok, so that is doing the same thing I am doing so you should be okay14:13
cachioijohnson, nice, thanks, I'll try that and re-test14:14
ijohnsoncachio: as long as you are not doing anything different from `ubuntu-core-initramfs create-efi` you should be good14:14
cachiothanks for the help14:14
ijohnsonyeah np, let me know if you run into any more issues14:14
cachioijohnson, sure14:14
ijohnsonzyga: any idea why this check was "skipped" ? https://github.com/snapcore/snapd/pull/8683/checks?check_run_id=68893673314:15
mupPR #8683: osutil/disks: support IsDecryptedDevice for mountpoints which are dm devices <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/8683>14:15
zygayeah, I clicked twice14:28
zygaand I cancelled a run14:28
zygathat's a stale marker of some kind14:29
zyganote that actual tests did run14:29
ackksergiusens, hi, I'm seeing a strange behavior wrt the rbac snap on core20. it works fine when installed on focal, but I get  https://paste.ubuntu.com/p/zNNJPdpSh5/ in a bionic container14:37
ackksergiusens, both on snapd 2.44.314:39
zygaackk: any python native code?14:42
ackkzyga, possibly, why?14:42
zygaackk: classic confinement?14:43
ackkzyga, it's a fully confined snap, FTR14:43
zygaackk: different so versions, won't import14:43
zygajust guessing14:43
ackkzyga, "snaphelpers" doesn't use native code14:46
ackkzyga, I just tried in a snap run --shell, trying to import that from python cli also fails14:46
zygaStrace it perhaps14:49
cjp256ackk: can you share the yaml?14:50
cjp256i'm guessing you'll need to set PYTHONPATH for your runtime environment14:50
cjp256ackk: e.g. https://github.com/snapcore/snapcraft/blob/master/tests/spread/plugins/v2/snaps/python-hello-with-stage-package-dep/snap/snapcraft.yaml#L1514:51
ackkcjp256, I updated https://bugs.launchpad.net/snapcraft/+bug/187637014:52
mupBug #1876370: Python libraries installed by python path are not found in sys.path <Snapcraft:New> <https://launchpad.net/bugs/1876370>14:52
roadmrhey folks, - what happens if I install a snap that has an auto-alias that conflicts with an existing command on the system? does the snap's take precedence? does the deb-installed one? does snapd refuse to configure the conflicting alias?14:53
=== lool- is now known as lool
cjp256ackk: out of curiosity, if you don't filter out files, do you get the same result? the bionic vs focal is interesting14:58
ackkcjp256, haven't tried, let me14:58
cjp256ackk: also consider staging all of python and see if that changes things: https://github.com/snapcore/snapcraft/blob/master/tests/spread/plugins/v2/snaps/python-hello-staged-python/snap/snapcraft.yaml14:59
ackkcjp256, well that's what we did before, but it'd be nice not to have now that snapcraft supports using the builtin one14:59
cjp256ackk: this is a strict snap, right?15:00
ackkcjp256, correct15:00
pedronisroadmr: it's the same as what happens with snap that have a name that matches a system command, snapd will install the snap. The precedence depends on PATH, as set by default snaps are searched after system commands.15:01
roadmrthanks pedronis15:01
cjp256ackk: i'll see if can repro on 18.0415:02
pedronisroadmr: we check for conflicts among snaps, but not with the system commands15:02
roadmrpedronis: right, I knew about inter-snap checking but was unsure about existing command behavior15:02
roadmrasking for a friend :)15:02
ackkcjp256, it's unfortunaly not a public snap, so I can't share the code here15:03
cjp256with my own attempt at a reproducer anyhow15:03
ackkcjp256, same issue without filtering files15:07
cjp256ackk: i cannot reproduce on bionic.  if you want, you can gmail me the full yaml and i can give it a shot15:15
mvomaybe one system is not marked as mandatory, let's see what spread says to this PR15:34
pedronisah15:36
witquickedI'm struggling to get snapd to run inside an Ubuntu 18.04 docker container without having run that container in "privileged" mode. I've succeeded when the Docker host is Arch Linux, but am having issues when the host is also Ubuntu. The error is "main.go:123: system does not fully support snapd: cannot mount squashfs image using "fuse.squashfuse": fuse: mount failed: Permission denied"15:38
cachiopedronis, mvo I tested that with "secureboot: true" and workerd15:39
witquickedactually, scratch that, it's not working on Arch Linux anymore either...15:41
zygawitquicked: hey15:41
zygawitquicked: docker is not a supported snapd host IIRC15:41
zygawitquicked: if you need a container and can use lxd instead, that should work15:41
cachiomvo, do you have a link to the change where secure boot is not wortking?15:42
pedroniscachio: I misunderstood the conversation claudio had with Gustavo15:42
pedronisI thought the change landed in spread with the preferred syntax15:42
pedronisbut seems not15:42
pedronismvo: for your benefit, this is the spread part: https://github.com/snapcore/spread/pull/104/files15:43
mupPR spread#104: Adding option for systems created on google to start with secure boot enabled <Created by sergiocazzolato> <Merged by niemeyer> <https://github.com/snapcore/spread/pull/104>15:43
pedronisthere's a comment about the syntax by Gustavo15:43
witquickedzyga, I know it's not officially supported, and that I'm fighting an uphill battle. I have successfully gotten it working several times, using various mount points...15:43
zygawitquicked: I think it's a waste of your time, unless you have absolutely no other choice15:44
mvopedronis, cachio aha, htanks15:44
witquickedI have a reasonable use-case for it...15:44
mupPR snapd#8698 closed: spread.yaml: secureboot is really secure-boot <Created by mvo5> <Closed by mvo5> <https://github.com/snapcore/snapd/pull/8698>15:44
zygawitquicked: can you use lxd instead? that's a really easy way out15:44
pedronismvo: anyway it means something else failed15:44
pedroniswhich isn't great either15:45
zygawitquicked: if you absoulutely must use docker you are on your own as we don't support that and there will be random things you need to do each time that may or may not work15:45
zygawitquicked: you need systemd and ability to mount squashfs (probably via fuse)15:45
cachiopedronis, good, thanks15:45
witquickedzyga, yep...15:45
witquickedlike I said, I can get it to work using the "privileged" command, so I know it's within the realm of possible15:46
zygawitquicked: I don't know what that does in docker15:46
witquickedand yes, I've done the work needed to get systemd to run inside Docker15:46
zygaand if doing so is not messing up your system15:47
witquickedthat switch essentially allows the container to run as root.15:47
zygawitquicked: out of all containers we only support lxd because it does apparmor nesting15:47
zygawitquicked: it seems you are saying this is not a container anymore15:47
pedronismvo: anyway indeed store problems15:47
zygawitquicked: if you do this it may appear to work but may actually break something on your host15:47
pedronismvo: making the PR red atm15:47
pedronisPRs15:47
zygawitquicked: and it may totally break if you run more than one "container" like that at the same time15:47
mupPR snapd#8699 opened: interfaces/desktop-launch: support confined snaps launching other snaps <Created by AlanGriffiths> <https://github.com/snapcore/snapd/pull/8699>15:49
witquickedzyga, I have multiple use-cases for running systemd in a container. The one that sidesteps the religious discussion is that I use the container for testing ansible playbooks...15:49
zygawitquicked: systemd is probably not the problem15:50
zygawitquicked: I'm specifically talking about snapd15:50
zygawitquicked: (where "probably" is more of a I don't know)15:50
witquickedzyga, agreed, it's not systemd. Fair enough. :)15:50
zygawitquicked: but snapd will for sure misbehave and, given the chance, change the host, not the container15:50
zygaI think we are talking in circles now, I can only wish you good luck15:50
zygawitquicked: I'm sorry but we cannot support docker without docker growing more features15:51
witquickedActually, what you said about snapd changing the host is very helpful...15:51
zygawitquicked: or someone writing a docker helper that lets you run more complex things15:51
witquickedAre the changes you're referring to in "/sys/fs/fuse/connections", or "/sys/fs/cgroups", or the socket?15:53
zygawitquicked: snapd loads apparmor profiles15:54
zygawitquicked: apparmor is not namespaced15:54
zygawitquicked: without special setup that is clobbering the host apparmor configuration15:54
witquickedaha, but it can run without apparmor, yes?15:54
zygawitquicked: snapd?15:54
witquickedyes15:54
zygawitquicked: yes but all security promises are gone then15:54
zygawitquicked: at which point the question of what the docker container brings is questionable15:55
witquickedyes, I'm aware - and apparmor is shipped to not start in a container...15:55
zygawitquicked: if you entirely trust the payload that might work to some extent15:55
zygawitquicked: it's not just the container, if your kernel has apparmor snapd will sue it15:55
zyga*use it15:55
witquickedYeah, it's definitely pushing the boundaries of what it means to be a container...15:56
* zyga wonders what's the requirement15:56
witquickedoh rilly?15:56
zygabuilding in "docker"15:56
zygawhere it means that docker is the entry point and that's all15:56
zyga?15:56
witquickedthe requirement is to be able to test ansible playbooks in a "somewhat" isolated and repeatable environment15:57
zygaI see15:57
zygaand how does that interact with snapd? ansible setting up snaps?15:57
witquickedit's also used to support a build environment, where the setup of that environment uses snap to install tools15:57
zygaI know it's a big shift but lxd actually properly support sthat15:58
zygaespecially if you want to test something that feels more like a real system15:58
zygaalternatively a vm as running in a container and out of a container does matter for both snapd and lxd15:59
witquickedThat's true15:59
witquickedI know and love lxd, and it would be my first choice... however I need for this to support Linux, Mac and Windows hosts.16:01
zygaI understand16:01
zygamy only comment is that it's not testing something that looks like a normal system16:03
zygaso the test may say "great, it works"16:03
zygabut reality will be different16:03
witquickedI see your point.16:03
witquickedAnd it's absolutely valid... you're basically saying that any test that works without apparmor turned on isn't really a valid test.16:03
zygait depends16:03
zygafor some snaps it might be okay16:03
zygait's just not something that I would say is a good test16:03
zygait's like a test that says "echo ok" is both fast and portable16:03
zygaand it passes too16:03
zygabut that's not the goal16:04
cachiocmatsuoka, I see, I'll fix it16:24
cmatsuokacachio: thanks16:25
=== ijohnson|lunch is now known as ijohnson
ograjdstrand, hmm, i'm playing with the account-control interface ... is there a chance we could get permission to "mkdir /home/$USER" ? it is kind f hard to create a valid user account with the interface the way it is atm21:24
ogra(indeed it works if i tel useradd to not create/use a homedir, but thats kind of crippled in the end)21:25
jdstrandogra: I'll look into it as part of my 2.45 policy updates work. I think there is context I need to dig up22:25
ograthx !22:25

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