/srv/irclogs.ubuntu.com/2019/06/25/#snappy.txt

df00zHm, would it be an abuse of snap to try to package up libvirtd + qemu + virt-manager with snappy?  It can register services with systemctl and run as root, right?01:43
mborzeckimorning05:34
df00zmorning05:44
zygaGood morning06:01
zygaI will be around in a hour, need to get breakfast and take the dog out06:01
mborzeckizyga: so the dog is travelling with you too? :)06:13
morphis93417zyga, mborzecki: do you guys know if `snap save` is intended to show me all snapshots? I can see way more in /var/lib/snapd/snapshots than in `snap save`06:19
mborzeckimorphis93417: snap saved?06:19
morphis93417ah06:20
morphis93417the output looks quite similar06:20
=== morphis93417 is now known as morphis
morphisjust run into the issue that our CI system ran out of space because of the automatic snapshot creation on remove06:21
morphis100GB of snapshots ...06:21
mborzeckimorphis: i think you want snap remove --purge06:21
mborzeckimorphis: though it's probably for 2.4006:21
morphisis there another way to purge or avoid the automatic snapshot?06:22
mborzeckimorphis: i don't think so, but pstolowski|afk or Chipaca will know more06:22
morphishm, that is unfortunate06:24
mborzeckimorphis: looked throught the forum, you can set `snap set system snapshots.automatic.retention=no` that should stop snapshots from being created06:25
morphismborzecki: looks like it doesn't for the creation on snap removal06:25
mborzeckimorphis: https://forum.snapcraft.io/t/snapshots/9468 states 'Disabling automatic snapshots will not affect pre-existing automatically generated snapshots, only those generated by the removal of subsequent snaps.'06:26
morphisyeah read that06:27
mborzeckimorphis: looks like you need to drop the old ones manually, but new ones should not be created06:27
morphismborzecki: yeah, looks like that's it06:29
df00zOh jeeze.   I get to the end of my package compile and it says linker version 2.3.3 isn't compatible with files in this app.06:29
df00zI dont want to\cant build this in an ubuntu 16.04 env06:29
df00zNot possible to move past that, right?06:30
mborzeckidf00z: can you use a core18 base instead? that should be like 18.04 env06:30
df00zUgh maybe but probably not.   Building something that needs up to date libs(qemu, libvirt)06:31
df00zThe whole point of me trying to use this was to avoid managing /usr/local or something awful for a custom build06:32
jameshdf00z: it sounds like you've got snapcraft running in legacy mode.  Make sure you've got a "base:" key at the top level, set to "core" or "core18"06:32
df00zlet me try it06:32
jameshthat will switch snapcraft over to building in a VM (for which you'll need to install Multipass) with appropriate libraries to match the base06:33
df00zweird I put base: core18, it worked, didnt try to start any kind of VM that I can see06:34
df00zI'm on 19.0406:34
df00zUnless it only does that with cleanbuild06:35
zygaBreakfast time06:37
zygaI will be back around 9-10. Once we pack and hit the road again06:37
df00zi gotta head to sleep.  i think it worked?  maybe coincidentally because 19.04 isn't using an incompatible linker?06:37
mborzeckidf00z: afaik it's built in a clean environment, so perhaps you already have multipass, or it just spun up a lxd container06:38
df00zlong term im probably going to have to build parts for the entire dependency chain...theres gotta be like 50 libs though06:39
df00zfor now i only built gnutls as a part which ubuntu doesnt have an up to date release that is compatible in it's repo06:40
zygaI will be around shortly07:08
=== pstolowski|afk is now known as pstolowski
pstolowskimorning07:20
mborzeckipstolowski: hey07:22
pstolowskimorphis: hi, all clarified re automatic snapshots afaict? old ones need to be removed manually with snap forget07:22
ackkhi, anyone familiar with non-root users in snap?08:24
mborzeckiackk: non root users in snaps with services?08:26
ackkmborzecki, I mean the work for being able to use system users in the snap08:27
mborzeckiackk: there was a PR from jdstrand but I don't know where it stands at this point08:28
ackkmborzecki, right, I'm testing with a snapd built from there08:28
zygare08:28
zygafinally all packed and on the road08:29
ackkmborzecki, I'm having a weird issue. I pass in the "daemon" user and I have a dir under $SNAP_COMMON that's owned by it (daemon:daemon). If I try to delete it from the app, it gets permission denied. that's understandable if I run it as root, but it happens also if I drop privileges to daemon:daemon08:29
ackkmborzecki, so I'm not sure how to handle that08:29
zygait's hard to pack three kids and a dog08:29
zygamborzecki: yeah, so there was a selinux denial08:29
zygamborzecki: question: should a program that is selinux aware actively set the context of a file it creates?08:30
ackkzyga, is that like the wolf sheep cabbage problem? :)08:30
mborzeckiackk: maybe soemthing inside is now owned by daemon?08:30
zygamborzecki: or should this be done from the policy side?08:30
zygaackk: it's a OMG why did we agree to do this problem :)08:30
zygaackk: driving across europe with our family, including a small baby08:30
mborzeckizyga: labels are inherited from parent, unless there's an automatic transition defined08:30
zygamhm08:30
ackkmborzecki, not that I can see it, it's all daemon:daemon08:31
zygamborzecki: I didn't look yet but I don't quite get it why the new .info file is any different from the exisiting .fstab or .mnt files08:31
zygamborzecki: so I'll get to selinux shortly, I'll read your review first08:31
Chipacazyga: also to spain?08:37
zygaChipaca: yeah, we are approaching the coast now, south of france08:37
zygafrom there just a short ride to Palamsos08:37
zygaPalamos08:37
Chipacazyga: Palimpsest08:38
zygaChipaca: looking at the car nav, seeing the destination being 4 hours away is surreal08:39
zygaChipaca: normally I would say that is far away08:39
zygaChipaca: but after the last few days that's nearly nothing and 4 hour trip is short and easy in comparison08:40
Chipacazyga: I know that feeling08:41
ChipacaI remember getting up one morning, thinking "yeah, this morning we'll go get fuel, that's just … 3 hours south of here, we should make it back in time for tea, easy08:41
Chipaca"08:41
zyga*fuel*?08:42
zygaas in gasoline?08:42
Chipacazyga: yes08:43
Chipacazyga: we were in San Antonio Oeste, and the fuel on the other side of parallel 42 was 50% cheaper08:44
Chipacaor maybe more? don't remember exactly. Cheap enough to make it a no-brainer.08:44
Chipacathen the next day we did the trip again, this time to see seals and penguins and whales and stuff08:44
zygawow, that's quite the story08:44
Chipacazyga: patagonia resets your near/far scale in less than 24 hours :)08:45
Chipacait's humbling and fantastic and awesome and stuff08:45
Chipaca(to be clear: argentine patagonia, which is mostly an arid peneplain of nothing but stout shrubs08:46
Chipaca)08:46
zygapassing some nuclear plant in france now08:46
zygakids watched chernobyl a little08:46
zygaat first they way "is it real"08:47
zygabut now they just watch08:47
Chipacazyga: is that the one where radiation sickness is contagious?08:47
zygaa-choo08:48
zygalavender fields08:49
Chipaca#7028 and #7027 are simple enough and need a second review08:50
Chipaca(and if you've looked at the user agent pr you've already looked at these)08:50
zygaI'll look08:51
zygaah great08:51
zygathat split out is nice and simple08:51
Chipacayeah08:52
Chipacakudos to james08:52
Chipacapstolowski: one for you: https://forum.snapcraft.io/t/does-snap-refresh-trigger-the-disconnect-connect-hooks/11997?u=chipaca09:03
pstolowskiChipaca: ok09:04
ackkmborzecki, I have a minimal python script+snap which reproduces the issue. it seems it happens if I have subdirs of that dir, also owned by daemon:daemon09:05
ackkmborzecki, https://paste.ubuntu.com/p/kw8swvZS2m/09:06
ackkmborzecki, both that and with the last commented line in place of the plain os.rmtree fail09:06
zygaChipaca: I left a review on the systemd PR that is more complex than my initial reaction09:07
zygahttps://github.com/snapcore/snapd/pull/7028#pullrequestreview-25386582409:07
zygaIMO it is okay to merge but perhaps it'd be worth to look09:07
zygaok, next one09:07
zygaChipaca: do you know why we do this: https://github.com/snapcore/snapd/pull/7027/files#diff-98811fc63f73eed00da99c36c7326aabR72 ?09:09
Chipacazyga: why would we pass true?09:10
zygaI don't understand why we'd pass either09:11
zygado we need those after?09:11
zygawhy is it relevant to not unset those variables?09:11
Chipacazyga: the API call needs one or the other09:11
ChipacaI mean, it takes a boolean09:11
Chipacachoose one09:11
Chipacait's a silly thing, just calls Unsetenv on the appropriate environment variables if it's true09:12
Chipacawhich means you can't grab the sockets again09:12
zygaaha09:12
zygaand we want to have them again?09:12
Chipacain tests, sure09:12
Chipacaoutside of tests, no -- but we don't09:13
zygaok09:13
Chipacazyga: otoh if the environ leaks to anything we exec we might want to clear it09:15
Chipacazyga: nothing is breaking today :-)09:15
zygaChipaca: how about this? https://github.com/snapcore/snapd/pull/7027/files#diff-98811fc63f73eed00da99c36c7326aabR5609:16
zygawhy 111?09:16
Chipacazyga: given that 7028 is green, can we land it without the --no-block in the panic?09:17
zygayep09:17
zygahttps://github.com/snapcore/snapd/pull/7027#pullrequestreview-253874672 is +109:17
zygaso both can land09:18
mborzeckiackk: maybe apparmor blocking this? nothing apparmor related in dmesg?09:19
Chipacazyga: because we want the socket to be 066609:19
Chipacazyga: without having to chmod it after the fact09:20
Chipacaat some point we're going to have to use dynamic loading or something, to keep the snap command in check :-)09:23
Chipacaa bit like git foo → git-foo09:23
Chipacaespecially for the long-running versions of things09:23
zygawhy?09:23
zygato keep them small?09:24
Chipacazyga: yeah09:25
Chipacazyga: having along-running snap command that has all the libs the snap command itself has seems strange09:26
zygaI wish go had a dynamlically linked "libc-of-go"09:26
zygaso that hello world was small09:26
zygaeh09:26
ackkmborzecki, I only get this error: https://paste.ubuntu.com/p/yX5N6xxRrj/09:27
Chipacazyga: that should be doable, but i doubt it'd gain traction with the devs09:27
zygaackk: looks like regular permissions are the problem09:27
Chipacaeven simple dynamic loading is under-supported09:27
ackkzyga, wdym?09:28
zygaackk: you get a denial for cap override09:28
zygaer09:28
zygadac override09:28
ackkzyga, should I add that plug?09:28
ackkseems weird09:29
mborzeckiackk: that happens when acting as root on stuff that you wouldn't have access to given its permission bits & owner09:29
zygaackk: I doubt so09:30
zyga(I would not add that plug)09:30
zygaackk: what mborzecki said09:30
ackkone sec, trying now to remove as daemon user09:30
zygathe only reason root can access stuff it normally cannot access is because it has DAC override capability09:30
zygabut the profiles take that away09:30
ackkzyga, mborzecki I get the same error if I try to remove as daemon user09:31
ackk(iow after dropping privileges)09:31
zygafeeling a bit sick from looking at the screen09:34
zygamborzecki: you were right09:34
zygabuth, only three hours left09:34
zygaso close now09:35
mborzeckizyga: hm?09:35
zygamborzecki: looking down while moving09:35
mborzeckizyga: ah yeah ;)09:35
mborzeckiso the image tool is using sfdisk now, though the script syntax is kind of ugly09:37
mborzeckiackk: apparmor denial this time too?09:41
ackkmborzecki, same09:41
Chipacazyga: if it makes you sick, then STOP DOING IT09:47
* Chipaca whacks zyga over the head with some large mythological fish09:47
zygaChipaca: yeah, I try to look outside the window as much as I can09:48
zygaChipaca: 3 hours 14 minutes left09:49
Chipacapopey: you around?09:49
zygawe'll break after passing montpellier but now lucy is sleeping so as much as we can push it09:49
ackkmborzecki, ah, it only works if the directory containing the one to delete is 077709:49
popeyChipaca: for you, always09:49
ackkmborzecki, which poses a problem because I can't really change $SNAP_COMMON to be 77709:49
Chipacapopey: Wimpress: any way i should tag https://forum.snapcraft.io/t/getting-taskade-linux-app-featured/12005?u=chipaca so you guys are sure to notice it?09:49
Chipacapopey: <309:49
popeyi have seen it :)09:50
Chipacapopey: right, but if you hadn't?09:50
Chipaca(thanks for confirming)09:50
Chipacawe don't have an advocacy-requests category :-)09:51
mborzeckiackk: it shouldn't happen for test-dir/sub though09:53
ackkmborzecki, wdym?09:53
ackkmborzecki, if I os.chmod('test-dir', 0o777), then test-dir/sub can be removed, but to remove test-dir I'd need to chmod $SNAP_COMMON09:53
mborzeckiackk: i see you're using shutil.rmtree(test_dir), if you do shutil.rmtree(sub_dir) it should work09:53
popeyi thought we had a snap-advocacy group09:53
ackkmborzecki, well, yes and no. in the real case that's a large tree of files/dir, I'd have to recursively chmod everything09:54
mborzeckiackk: ah, ok09:54
popeyoh, we do @advocacy is us09:54
ackkmborzecki, also I'd have to remove everything inside the dir manually if I can't remove the whole dir09:54
Chipacapopey: so i should just say "yo @advocacy"?09:54
ackkmborzecki, in general, that's a problem, if you can create dirs and you can't remove them :)09:55
popeyChipaca: ya, i think that would work10:04
Chipacapopey: k10:04
zygaless than 3 hours left10:11
zygaBreak time10:28
Chipacazyga: https://www.youtube.com/watch?v=otCpCn0l4Wo10:28
Chipacaand it's ubuntu one all over again10:29
* Chipaca takes a break also10:29
* Chipaca lied10:31
Chipacanow yes, i'm off for a bit11:02
petanhello I would like to create a script that will release all stable versions of my software for all platforms (eg. set them to current head / latest build)11:17
petanhow would I do that?11:17
petanif I know specific number I can do something like snapcraft release huggle 2146 stable11:17
petanbut can I substitute the number 2146 with "whatever is latest"?11:18
mborzeckipetan: i have a vague recollection of version script that can do that11:18
mborzeckipetan: this is how snapd does that https://github.com/snapcore/snapd/blob/master/snapcraft.yaml#L11-L1211:19
mborzeckifun review if anyone's interested: https://github.com/snapcore/snapd/pull/703011:26
mborzeckizyga: do you want me to look into the selinux denials you got?11:27
zygamborzecki: if you know how to fix that quickly, sure, it will help a lot11:28
zygaBreak is over, back to work11:28
* zyga melts in the sun11:36
mborzeckipstolowski: what was the problem that triggered https://github.com/snapcore/snapd/pull/7029 ?11:43
GargoyleHow come this exists: https://snapcraft.io/sublime-text-bartixxx ? It makes the store confusing.11:45
zygaGargoyle: indeed, I think it should be removed, perhaps popey has an opinion?11:53
pstolowskimborzecki: some kind of udev event is too big, i haven't seen this myself, i asked abeato for udevadm monitor output when this happens11:54
mborzeckipstolowski: was there a forum topic perhaps?11:54
pstolowskimborzecki: no, it was all discussed here and the bug report is the record of it11:56
pstolowskimborzecki: fwtw, $ getconf PAGE_SIZE11:57
pstolowski409611:57
pstolowskithat's the value we effectively used11:57
mborzeckipstolowski: right, but it was increased in the loop with MSG_PEEK until the messag would fit11:58
pstolowskimborzecki: but the logic was bogus imho11:58
pstolowskimborzecki: mborzecki MSG_PEEK - This flag causes the receive operation to return data from the beginning of the receive queue without removing that data from the queue.  Thus, a subsequent receive call will return the same data.11:59
abeatopstolowski, mborzecki I've seen this happening on boot, when a lot of udev events accumulate11:59
zygamborzecki: question11:59
zygamborzecki: should I switch to error handler (as opposed to die)11:59
zygamborzecki: so that I can write tests that don't have to fork to work?12:00
zygamborzecki: gtest is pretty frustrating when you have to test code that die's at all errors12:00
pstolowskimborzecki: there is no mention for using it to probe buffer size; to my understanding it simply leaves the data in the queue but still errors out if buffer is too small, no?12:00
mborzeckipstolowski: yes, that's the point of MSG_PEEK :)12:00
abeatopstolowski, one interesting thing to note is that what systemd does is increasing the socket RECV size to 128MB - in general that is fine as you are only reseving a range virtual addresses in the end. Usually you do not use all12:00
mborzeckipstolowski: abeato: fwiw their actual buffer to which they receive stuff is 8k only12:03
abeatomborzecki, right, as long as they have buffer space in the kernel side, that's fine - probably there is not a single event thas is 8K12:04
mborzeckiabeato: yup, so they use super careful 128MB on the kernel side, where events get buffered (althouhg never reach this size), while the usespace reads 8k at a time12:05
abeatomborzecki, that seems to be the case, yes12:06
popeyzyga: sounds like a store question12:06
=== ricab is now known as ricab|lunch
jdstrandackk: I'm here if you want to talk about the daemon user. note there are a bunch of things at play here for file access: apparmor, seccomp, capabilities, traditional permissions12:17
ackkjdstrand, hi, so did you see the discussion from this morning?12:17
ackkjdstrand, basically for now I've worked it around by removing everything in the dir manually12:18
jdstrandackk: so, if you create a directory, and chown it to daemon:daemon then the daemon user can use it, etc. *but* it can't delete the directory if the parent dir is say, 755 root:root and root can't delete the dir because it lacks dac_override12:18
jdstrandackk: I intentionally left out dac_override since it grants way too much and the snap can be written to not need it12:19
ackkjdstrand, mhm so is there a way to go around it without having to manually clean dirs?12:20
jdstrandackk: you probably want to create the directory 775 root:daemon12:20
ackkjdstrand, ah, interesting12:20
ackkjdstrand, we have some dirs that are the other way, daemon:root 77512:20
jdstrandackk: that may work too. the files should be 664 as well if you want root to be able to clean them out12:21
ackkjdstrand, mhm, the problem is that we're talking about the postgres DATA_DIR, so I only create the root, then postgres (which runs as daemon.daemon) does the rest12:22
zygamborzecki: did you see my question earlier12:22
zygamborzecki: I'm unsure how to test this, I'm eager to proceed with error return and easy tests12:22
zygamborzecki: and die in the caller12:22
mborzeckizyga: sounds ok to me12:23
zygak12:23
jdstrandackk: well, set it up however. I'm just saying you'll have the same issues with files if they are daemon:daemon and root tries to delete them because of how apparmor works12:27
ackkjdstrand, sigh also even if I set the dir to 775 postgres changes it back to 700 :(12:27
jdstrandackk: ok, you should be able to work through the without patching anything12:37
jdstrandackk: you create $SNAP_DATA/stuff root:daemon 770. then you create $SNAP_DATA/stuff/postgresdb 700 daemon:daemon12:38
jdstrandackk: then postgres, running as 'daemon' can do whatever it wants in $SNAP_DATA/stuff/postgresdb12:39
jdstrandackk: if for some reason you want to clean things out, daemon is able to delete $SNAP_DATA/stuff/postgresdb and below, and root can delete $SNAP_DATA/stuff12:39
ackkjdstrand, ah I see12:44
jdstrandackk: with a bit of care, dac_override can pretty much always be avoided and when it is avoided, you know that the code got its priv separation right. in your case, postgres is doing fine and you're just wrapping it so it works, but I recall dhcpd having trouble getting this right in their code12:49
jdstrandackk: where we have a profile for it. the deb packaging set up the dirs wrong assuming dhcpd would just clean things up when it started as root before it dropped12:50
jdstrandackk: but then it didn't do that correctly for several releases (and it was funny cause you could see them trying because the behavior changed with each release), until finally they did12:51
jdstrandeverything aligned and dac_override wasn't needed any more12:52
jdstrand(the same generally goes for dac_read_search)12:54
jdstrandackk: thanks for bringing this up btw. I've added a todo to document this when documenting the feature (it is in the policy, but who reads that? ;)12:56
ackkjdstrand, thank you for the help12:56
jdstrandackk: np12:59
Chipacacachio: standup?13:01
ackkjdstrand, so it seems the only caveat is that if you create directories that are owned by a non root user directly under SNAP_DATA/SNAP_COMMON/etc you can't ever remove them anymore13:11
jdstrandackk: that is possible, yes, but snap remove always can13:12
jdstrandwhich is why I want to document it13:13
jdstrandone could also plugs log-observe, but when people ask for auto-connection, it'll come up and we can direct them ("why does postgres need access to the system logs?")13:14
ackkjdstrand, yeah I meant from the point of view of a snap13:14
ackkjdstrand, log-observe doesn't make it work though13:15
ackkat least, in my test this morning13:15
ackkor, uhm13:15
ackkmaybe I didn't test it right13:15
ackkjdstrand, btw, I filed a few bugs related to the confined snap work, any chance they could get fixed soon: https://bugs.launchpad.net/snapd/+bugs?field.tag=maas ?13:16
jdstrandthe first two are known. I can look at the last two. I have a PR up that I can fold those into13:17
ackkjdstrand, awesome, thanks!13:19
Chipacazyga: when you arrive somewhere stable, there are weird things in the forum i'd like you to look at13:21
zygaOk13:22
Chipacazyga: i've flagged you in them so i/you/we don't forget :-)13:22
zygaPerfect, thank you13:23
* pstolowski lunch13:26
=== ricab|lunch is now known as ricab
mborzeckizyga: ok, so figured out some of the tmpfs stuff, i don't think we can plug it nicely now, but otoh it's probably ok to allow s-c readlink there13:29
mborzeckizyga: still don't see how the changes trigger this behavior13:30
Chipacacachio: how's validation of 2.39.3 going?13:39
zygamborzecki: right?13:39
zygamborzecki: it's another file13:39
zygamborzecki: we have a few of those already13:39
zygamborzecki: maybe it is because when snap-confine calls snap-update-ns some things magically change?13:40
zygamborzecki: snap-confine no longer writes to that tmpfs, apart from making an empty file13:40
zygamborzecki: once we have snap-bootstrap-ns this can move there (to go)13:40
mborzeckizyga: something funny is going on behind the scenes, tmpfs gets a tmpfs_t label, unless there's some transition, what happens is that a bunch of directories is labeled as tmpfs_t and maybe that's a problem13:40
mborzeckizyga: take a look at this: https://paste.ubuntu.com/p/Hmkrs3Yhxp/13:42
mborzeckizyga: see how /etc and /run are tmpfs_t in mount ns of the snap?13:42
zygamborzecki: what should that directory type be?13:42
zygamborzecki: the hierarchy in /run/snapd/ns is managed by snap-confine13:42
cachioChipaca, I am reviewing the last log for i38613:43
Chipacacachio: cool cool13:43
cachioand it should go to candidate13:43
mborzeckizyga: etc_t or var_run_t for /run13:43
mborzeckietc_t for /etc ofc13:43
Chipacacachio: let me know when/if it's done so I can poke people about it please13:43
cachioChipaca, sure13:43
cachioI am trying to reproduce an issue13:43
mborzeckizyga: i think it's an artifact of us setting up the mount ns, perhaps we should restore the labels (?) the auto transition doesn't work bc it's named or otherwise13:44
zygamborzecki: so we don't mount a tmpfs ourselves there13:44
zygamborzecki: but we do make a bind mount in /run/snapd/ns13:44
zygamborzecki: and change the propagation mode of that mount13:45
zygamborzecki: once I'm at home I will boot fedora and explore13:45
zygamborzecki: I only have ubuntu on the go13:45
mborzeckizyga: we already allow s-u-n to poke tmpfs_t, so I'll push a patch that allows s-c to your branch13:46
zygathanks!13:46
zygaI'm adding tests now13:46
mborzeckizyga: and we can investigate later, as i suspect it'll take more work13:46
zygayeah, I think so13:47
Chipacapopey: do we know any kde devs that hang around the forum? https://forum.snapcraft.io/t/bug-on-web-page-https-forum-snapcraft-io/12013?u=chipaca13:53
popeyChipaca:  sitter is on the forum.13:55
Chipacapopey: ta13:56
* Chipaca tagged them in the post13:57
* Chipaca goes to get a cuppa tea, and maybe some cake13:57
mborzeckizyga: this is what ends up with tmpfs_t label https://paste.ubuntu.com/p/fvnh98t27k/13:58
mborzeckizyga: oh and pushed a patch to your branch, please fetch before pushing13:59
zygamborzecki: looking13:59
zygamborzecki: sure, no force push!13:59
ijohnsonhey folks, I'm trying to seed a classic image with a gadget snap and not use a brand store, but on boot/seeding snapd seems to think it needs to get a serial from the public store: https://pastebin.canonical.com/p/fCpRXvDcbV/13:59
ijohnsonsnapd seems to work fine otherwise, I can install snaps and such and even login with `snap login`, but I'm just wondering if there's a way to turn off this behavior where it tries to get a serial14:00
zygaijohnson: I think that is unsupported14:01
zygayou must use a vault to use a custom gadget14:01
zygaijohnson: it will go to the store to get a serial14:02
ijohnsonzyga: hmm that's not great14:02
zygaijohnson: but the public store only gives serials to canonical models14:02
zygaijohnson: it is part of the design, it is unreasonable for one brand to sign serials of another14:03
ijohnsonzyga: the use case here is building a local gadget snap that exposes slots so that we can use a strictly defined snap with gpio pins and such14:03
ijohnsonright that's fine I don't want it to get a serial14:03
Chipacaijohnson: everybody gets a serial tho14:03
zygaijohnson: that's a separate concern14:03
zygaijohnson: serial assertion is a part of the flow14:03
zygayou will hit other issues this way14:03
ijohnsonhmm so what would your recommendation be for getting slots and auto-connection rules via a gadget on a classic image that is not connected to a brand store?14:04
ijohnsonhow necessary is it that everyone gets a serial?14:04
zygaijohnson: don't do that?14:04
zygaijohnson: very14:04
ijohnson:-(14:04
zygaijohnson: what is the motivation for slots and gadgets on classic?14:04
zygaijohnson: can you tell us more about that14:04
ograi must admit that i have never seen any issues caused by missing serials on my dev images14:05
* cachio afk14:05
ijohnsonto use a strictly confined snap that needs to use gpio ports14:05
zygaijohnson: can we make gpio hot-pluggable14:05
zygaso that you don't need classic gadgets at all14:05
ograzyga, gpio, i2c, spi all come from the gadget, not core14:05
zygaogra: I know, but now we have a better method for at least some of those14:05
ijohnsonwe convince folks to make their device snaps strict, then we don't provide a way to use those snaps on classic without a gadget14:05
ograif hotplug works for that that would indeed be awesome14:06
zygaogra: the basics work, it is now per-interface to expand them14:06
Chipacamborzecki: 'basename', one word, is already a unix command14:06
Chipacamborzecki: we have things that are bases14:06
Chipacamborzecki: 'base name', therefore, would be the name of the base14:06
Chipaca--base-name=core1814:06
Chipacamborzecki: probably not what we want14:06
ijohnsonzyga: I think hotplug gpio is orthogonal to this14:07
ijohnsonzyga: my larger concern is about how we can get folks to use these strict device specific snaps without telling they always need to be on core or have a brand store14:07
zygaijohnson: I disagree,14:07
zygaijohnson: classic gadgets are well defined14:07
mborzeckiChipaca: right, sounds fishy when you put it like this, Basename like you had it is probably ok then14:07
zygaijohnson: use of gadgets for slots is a special case14:07
zygabecause we lacked hotplug support14:07
ijohnsonbut gpio ports aren't fundamentally "hotpluggable" so it seems confusing to me14:08
Chipacamborzecki: to be fair I'd already written a comment agreeing with you when it struck me :-)14:08
mborzeckiChipaca: hahah ;)14:08
* zyga just crossed the border14:09
zygafinally not roaming anymore :)14:09
zygawooot14:09
zygaijohnson: sorry, lost some messages14:09
zygaijohnson: hotplug is the confusing word14:09
zygaijohnson: the real meaning is dynamically discovered vs statically declared14:09
zygaijohnson: we got away with many slots being statically declared because they were not representing specific hardware but certain concepts14:10
jdstrandroadmr: hi! can you pull 20190625-1410UTC ?14:10
roadmrjdstrand: hello :) sure14:10
zygaijohnson: GPIO pins are not like that, they are hardware and you can actually discover them (even by reading dbts)14:10
zygaijohnson: so now that snapd has a method of dynamically adding and removing slots that represent hardware14:11
zygaijohnson: we should strive to make more hardware compatible with that system14:11
ijohnsonzyga: hmm so that all makes sense is the plan to make all device interfaces (i2c, gpio, etc.) dynamically discoverable then?14:11
zygaijohnson: I think so14:11
zygaijohnson: to the extent that is feasable14:11
zygaijohnson: primarily because linux already handles that14:12
zygaijohnson: it handles the custom ways to convey what the hardware is14:12
zygaijohnson: so that userspace doesn't have to worry and do it again14:12
ijohnsonright that's great but what to do in the meantime until that's done?14:13
zygaijohnson: fix it, walk towards the solution14:13
ograwhistle and pretend it is already there ?14:13
zygaijohnson: would be worth checking how hard it is to handle gpio's this way14:13
ijohnson... so on a sacle from my device will start on fire to some failed changes in `snap changes` for the first 2 weeks that a device is running, just how bad of an idea is it to not have a serial14:14
zygaijohnson: pstolowski can offer suggestions I'm sure14:14
ijohnsons/sacle/scale/14:15
zygaijohnson: I suspect pretty low, but that will change over time14:15
zygaijohnson: so while it might work now14:15
zygaijohnson: I would not recommend that as a general solution14:15
ograwell, currently it is the nly solution to achieve what he wants14:15
ogra*only14:15
ijohnsonokay so that handles my first concern which was connection of slots14:15
ijohnsonthere still remains the question of auto-connection to certain snaps14:15
zygaijohnson: yeah, that will require a gadget14:16
ijohnsonauto-connection of slots to certain snaps14:16
zygaijohnson: and a brand and a vault14:16
zygaijohnson: I would love if we could host a vault for experimenters14:16
zygaijohnson: with self-provisioning14:16
* ijohnson thinks that there should be a way for someone building their own image to support this14:16
zygabut we're not there yet14:16
zygayeah14:16
zygait's just not done yet14:17
ogradoes connections: in gadget.yaml not work ?14:17
ijohnsonogra that's what I want to do14:17
zygayeah, that should work14:17
ograright14:17
ijohnson(and am currently doing in a "sideloaded" gadget)14:17
zygahmmm14:17
zygathat may not work14:17
ograi guess you eventually need to use ubuntu-image then14:18
zygabut double check the source please14:18
ijohnsonany pointers to where I should check?14:18
ograto have all the bits and pieces correctly set up14:18
ograabeato, did you have a howto for ubuntu-image for classic images ?14:18
ijohnsonogra: I have KyleN's doc14:18
ograthat might be derived from his14:19
zygaijohnson: look at snapd's gadget code, grep for "connections" in overlord14:19
abeatoogra, yeah, that is the one - there is an older one from Gary too14:19
ijohnsonzyga: thanks14:19
zygaijohnson: in my argument I was trying to not be against useful features but against making temporary workarounds for missing features, actual features14:21
zygaijohnson: I realize there are holes in our device bring-up story14:22
ograheh14:22
ogracanyons ...14:22
ijohnsonyeah no problem I understand there's missing things14:23
zygaI'll break until we arrive14:29
roadmrjdstrand: hey so... there's no such tag in the current review-tools repo ;( did you forget to push maybe?15:13
jdstrandroadmr: oh, I did. sorry15:13
roadmr:)15:13
jdstrandroadmr: done15:14
roadmrthanks! trying again15:14
jdstrandroadmr: I pushed the code days ago and not the tag15:14
jdstrand(I created the tag today)15:14
roadmrtags are like that :)15:16
popeyogra: i was mistaken! Your qemu-virgil snap doesn't work with kvm either!15:31
popeyhttps://www.irccloud.com/pastebin/n71Ch7Yu/15:31
Chipacapopey: it's all lies! all of it!15:32
Chipacapopey: even the turtles!15:32
ondraChipaca ping15:37
Chipacaondra: poit15:41
ondraChipaca just checking if it's known that on core18 bash completion is not working. Did we drop support for bash completion on core18?15:41
Chipacaondra: we did not15:41
Chipacaondra: when you say 'on core18', what do you mean?15:41
ondraChipaca when you boot core18 device and shh into it, there is no bash completion for snap command15:42
Chipacahm15:42
Chipacaah, for snap itself? hm15:42
Chipacaondra: and for snapped apps?15:42
ondraChipaca it's not biggie, yeah for snap itself15:42
ondraChipaca I did not test actual snap apps15:42
Chipacaondra: the 'http' snap is a little snap that has minimal bash completion15:42
Chipacaondra: http --<tab> should give you useful options15:43
ograpopey, hmm,  does sudo'ing work ?15:44
ondraChipaca yeah I think it's broken also for snap apps15:44
popeyno15:44
popeyI will come back to this another day, don't worry15:45
Chipacaondra: and if you install the 'core' snap, does it fix itself?15:45
ondraChipaca core is also installed there15:45
Chipacaah15:45
Chipacahm15:45
ondraChipaca and does not work without core either15:46
Chipacaondra: I'll make a note, and discuss with m vo next week (or maybe on thursday if it's not crazy hectic)15:46
Chipacaas it's not clear to me who's forgotten to do which bit of integration :-)15:46
ondraChipaca sure, it's state for some time, so I can't image it's supper critical15:46
ograpopey, works here ...15:46
Chipacaondra: but, quick checks: is /usr/share/bash-completion/bash_completion there in core18?15:46
ograogra@acheron:~$ qemu-virgil --enable-kvm15:46
ograGtk-Message: Failed to load module "unity-gtk-module"15:46
ograGtk-Message: Failed to load module "canberra-gtk-module"15:46
ograGtk-Message: Failed to load module "canberra-gtk-module"15:46
ograat that point i have a window up probing bios stuff15:47
ondraChipaca it was probably forgotten in core18 rush for the door days15:47
ondraChipaca no but there is /usr/share/bash-completion/completions/15:47
Chipacaondra: yeah those are useless without the main thing15:48
Chipaca:-/15:48
Chipacasil2100: OHAI15:48
Chipacasil2100: are bugs in core18 a 'you' thing?15:48
ograsil2100, run !15:48
ackkondra, maybe related to https://github.com/snapcore/core18/issues/89 ?15:48
Chipacaheh, indeed, that's not fixed yet is it15:49
Chipaca:-(15:49
Chipacaondra: https://bugs.launchpad.net/snappy/+bug/182525415:49
popeyogra: are you in the kvm group?15:49
Chipacaondra: I thought that one was fixed, I should have started there15:50
ograpopey, yep and i'm on 16.0415:50
popeyhm15:50
ogranot sure if tat makes a difference15:50
ogra*that15:50
popeyi am not, and if i add myself it doesn't show in groups15:50
ograre-logged in ?15:50
ograshows defiitely in "groups" output for me on 16.0415:50
popeyno, avoiding re-logging in, but tried starting a new bash and newgrp15:51
popeyI'll reboot15:51
ograperhaps 18.04 has a new way of managing access to kvm ... not sure15:52
ogra(udev-acl or whatnot)15:52
ograin 16.04 the group stuff works if you have qemu-system-common installed (that ships the udev rule enabling the kvm group access to /dev/kvm)15:53
* ogra reads mail and humps Wimpress' leg !15:54
ogra*woof*15:54
* Chipaca steps away from ogra 15:54
ogralol15:55
ondraChipaca yeah this seems like same bug16:05
Chipacaondra: yeap16:05
* Chipaca ⇝ afk (fetching car from the mechanic)16:05
ackkondra, fwiw it works for me when I also have "core" installed. but my case is a --classic snap, so maybe it's different16:05
ondraackk yeah I'm UC18 system16:06
=== pstolowski is now known as pstolowski|afk
popeyogra: rebooted, still doesn't work on 18.0416:11
ogravery weird16:11
* popey uninstalls things and starts again :)16:12
ograi'm pretty sure my virgil even defaults to usekvm16:12
popey\o/ success16:12
ograoh ??16:12
ograhow that ?16:13
zygare16:16
zygasoooo happy to not be in a car now16:16
zygaI'll do my best to get back to speed16:17
Chipacazyga: welcome to the world of people that aren't in cars!16:49
Chipacazyga: i thought i had two forum topics for you but the guy in the first one hasn't responded yet (probably in a different tz), so it's just the one16:50
Chipacazyga: no the other one16:50
Chipaca:-p16:50
zygaI started looking at the kail linux one now16:50
Chipacazyga: right, guy didn't respond but sure :-)16:51
Chipacazyga: the one linked from there, sil's one, is the one i meant had a bit more info16:51
Chipacazyga: but ¯\_(ツ)_/¯16:51
Chipacaanyway, i should go see a barber about dinner16:51
Chipacaor maybe separately, see a barber, and see about dinner16:52
zygaI'm enjoying the non-moving landscape17:07
zygamy head is dizzy as if I just got off a carousel17:08
zygaI’ll look for some food17:27
zygaThen catch up with PRs17:27
jdstrandfnordahl: hey, I finally responded to the fuse question. sorry it took so long. It came in before the snapcraft summit then slipped of my radar for a bit17:39
* Wimpress wipes leg clean18:04
WimpressYou're welcome ogra 😁18:04
jdstrandogra: fyi, https://github.com/snapcore/snapd/pull/7019/commits/62d5e064fbd3b62445f03b953b37a0518886d5ad18:13
zygaZzzz18:19
diddledanpopey: to acquire new group assignments without re-logging-in or rebooting there is a command you can run in the terminal `newgrp` which will set that terminal session with the new assignment18:42
diddledanyou run it e.g. `newgrp kvm`18:42
diddledanor just `newgrp` by the looks18:42
ograjdstrand, awesome !19:09
popeydiddledan: that didnt work, i had to reboot21:18
popeyogra: ok, I get qemu launching, but with the various gl options, it segfaults with apparmor failing to get to /home/alan/.cache/mesa_shader_cache/index21:54
popeyI guess that's a hard-wired path somewhere21:54
popeyi reckon I can coerce that with MESA_GLSL_CACHE_DIR21:58
=== harrisj_ is now known as harrisj
* diddledan wonders what popey is cooking-up with qemu and opengl23:25
ograpopey, hmm, with qemu-virgil or with your implementation ?23:37
popeycurrently with mine23:37
popeybut I ported yours to core1823:38
ograoh, neat23:38
popeygot it working, had to remove -soundhw ac97 as that was segfaulting23:38
ograyeah, sound is still on my list to look at23:38
ograthere is some env var magic to make pulseaudio work23:38

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