/srv/irclogs.ubuntu.com/2019/08/16/#snappy.txt

mupPR snapd#7010 closed: interfaces/docker-support: declare controls-device-cgroup <Created by anonymouse64> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/7010>06:30
mupPR snapd#7131 closed: overlord/devicestate: detect clashing concurrent (ongoing, just finished) remodels or changes <Remodel :train:> <Created by pedronis> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/7131>07:01
mvopedronis: hey, good morning! I'm about uneasy about the missing return code checks (the exec.ExitError), I will look into this and push something unless you are already on it or thing its not needed07:20
pedronismvo: it's needed I think but also there are open questions there07:20
pedronisso we can push a couple of things to it07:20
pedronisbut we'll need jamie around before landing07:20
pedronismvo: anyway, I'm not working on that PR atm07:21
pedronisI'm trying to address jamie comments in zygmunt's one07:21
mvopedronis: ok, according to gettenv exit 2 means "not found in db" so I will make a very targeted change just for this07:21
mvopedronis: cool, thanks! zyga is probably around today (right zyga?)07:22
* mvo actually looks in the right place to be sure07:22
mvopedronis: I was also wondering if we should have "osutil.FindUid(name, flags)" and flags something like "LocalOnly,Getenv" (better names) instead of two functions, wdyt?07:25
pedronismvo: does it ever make sense not to do both?07:45
pedronisanyway as I wrote in the PR, I'm a bit confused because snap-seccomp itself uses those functions07:45
pedronisbut was not changed07:45
pedronisso not sure how things work at all atm07:45
pedronis:)07:45
mvopedronis: aha, ok. I'm not that far yet I think :) I will not touch these then07:46
mvopedronis: I pushed two trivial changes and will now add a test for malformated entries in getent()07:46
mvopedronis: and then continue, I'm at below 10% of the PR so far :(07:46
mvopedronis: but I think regardless of what happens we will need the tweaks I added/will add :)07:47
pedronismvo: I pushed something to 7254, in the end I decided that having both CurrentBase and CurrentCleanBase was just confusing08:13
mvopedronis: thanks, I have a look08:16
pedronisChipaca: hi, given you looked 7124, I think we shouldn't have separate FindU/Gid and FindU/GidGetent ?08:37
Chipacapedronis: but we don't08:38
Chipacapedronis: that pr drops FindUid (makes it private)08:38
pedronisdid mvo change that just now08:38
Chipacaoh wait08:39
Chipacapedronis: it exports them via a var08:39
Chipaca:-|08:39
Chipacahmm08:39
pedronisthat is weird btw08:39
pedronisnot nice docs for you08:39
pedronisanyway I don't think we should have both08:40
pedronisunless you think we should08:40
pedronisyou are time that spent most thinking in that area08:40
mvopedronis: I don't think I did, let me double check08:40
pedroniss/time/the one/08:40
Chipacamvo: no, no, i just missed the exporting var08:41
mvoChipaca, pedronis I posted my initial set of comments if you guys are looking anyway you can check and tell me what makes sense and what does not08:42
Chipacapedronis: not reaching out over the network to look up a user that is either local or non-existent has value i think08:42
pedronisChipaca: but we were missing extrausers with the previous code anyway08:45
pedronisso essentially unless we are looking up root08:45
pedroniswe have to try08:45
pedronisalso we are looking at passwd, not netgroup08:46
mvoChipaca: when you did the review, did you double checked my commits? just curious as I would love to have someone double checking those08:47
Chipacamvo: I think I did, let me double check I didn't miss anything08:49
mvoChipaca: ta!08:49
pedronisah, snap-seccomp works because anyway is built with cgo08:50
pedronisblargh08:50
pedronisI don't really like how confusing the state is with the functions as thy are08:51
pedronisChipaca: do I understand correctly that if built with cgo we get the right behavior even from user.Lookup* but if not built with cgo we don't get extrausers support?08:54
pedronisout of the box08:54
pedronisbut snapd itself is built without cgo usually08:54
Chipacapedronis: well, no-ish08:57
Chipacapedronis: snapd is not built without cgo08:57
Chipacapedronis: godbus and seccomp both require it afaik08:58
mvoChipaca: but those are not imported into the snapd binary or am I misremembering?08:59
jameshsnapd definitely links with godbus08:59
jameshthat's how it does polkit checks08:59
Chipacaas jamesh says09:00
mvoaha, of course09:00
mvosilly me09:00
pedronisChipaca: so we don't need getent stuff?09:00
mvoChipaca:more silly questions - godbus/dbus is a native dbus, so why is it using cgo?09:01
Chipacaactually maybe it isn't, in linux09:01
pedronisanyway until I'm deconfused that PR cannot land09:01
Chipacajust noticed that the ones that import C in there are freebsd and dragonfly09:01
Chipacapedronis: thank you for stepping back like this, I got carried away with it :)09:02
jameshhmm.  It looks like godbus will build without os/user for static_build09:02
pedronisChipaca: I was suprised you gave it a +1 without any comments btw09:02
jameshso it won't necessarily force cgo09:03
Chipacapedronis: i didn't think it was nitpicking time and i didn't spot anything major09:03
pedronisbut FindGid FindGidGetent is not a sane state of things09:03
jameshsee vendor/github.com/godbus/dbus/homedir_dynamic.go and homedir_static.go09:03
pedronisalso we have the issue that we have functions that behave very differently09:03
pedronisdepending how they are compiled09:03
pedronisme don't like09:03
ChipacaI can confirm we don't require CGO for snapd today09:04
jameshgodbus wants to know the home directory for the DBUS_COOKIE_SHA1 auth scheme noone uses09:05
Chipaca(we've even got a test that checks for this)09:05
Chipacaalso, snapctl and snap-exec both are forced cgo-less09:05
pedronisChipaca: mvo: how painful would be to write unit tests that involve extrausers for reals?09:13
Chipacapedronis: _unit_ tests?09:17
pedronisyes, unit tests (ideally)09:17
Chipacapedronis: 'for reals' as in via nss?09:18
Chipacanot doable09:18
Chipacaunless we added a known user to all our extrausers09:19
Chipacaincluding in spread09:19
Chipacapedronis: should be doable in spread though09:25
pedronisChipaca: we could have tests that are skipped if libnss-extrausers is not there?09:28
pedronisand install it in some cases also in spread09:28
Chipacapedronis: what would the unit tests test?09:31
jameshyou could unshare the mount namespace, and put a socket at /var/run/nscd/socket09:38
jameshhave that feed user info into libc09:39
pedronisChipaca: had a chat with mvo, we have  a plan I think09:50
Chipacapedronis: … tell me more :)09:55
mvopedronis: I hope to have a PR up in ~30min or so, it will be only about osutil.Find{Uid,Gid} and then we can merge it back into 712410:01
mvoChipaca: -^10:01
mvoChipaca: the idea is to have only a single FindUid() that detect if cgo or not10:01
=== pedronis_ is now known as pedronis
mupPR snapd#7263 opened: snap: cleanup some tests, clarify some errors <Created by pedronis> <https://github.com/snapcore/snapd/pull/7263>10:33
pedronissmall follow up to what was already laded for system usernames ^10:35
mvopedronis, Chipaca https://github.com/snapcore/snapd/compare/master...mvo5:find-uid-getent?expand=1 here is the refactor for osutil.Find{Uid,Gid} we talked about, I'm adding more tests now (spread and some more unit tests). let me know if thats not what we captured10:47
=== pedronis_ is now known as pedronis
pedronismvo: seems in the right direction and what we discussed11:08
mvopedronis: cool, I hope I have more tests and spread ready in a bit11:09
cachioChipaca, hey11:29
cachioChipaca, about the error: catalog: got unexpected HTTP status code 42911:29
Chipacacachio: yes11:30
cachiodo you know how to make the catalog refresh just while we prepare the suite right?11:30
Chipacacachio: say again?11:31
cachioChipaca, does  it work if we saved the catalog in the snapd state11:31
mupPR snapd#7264 opened: packaging/fedora: build on RHEL8 (2.40) <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/7264>11:31
cachioand then we restore it?11:31
Chipacacachio: it should, yes; then just touch the files11:31
Chipacacachio: restore, and touch the files11:31
Chipacaso the timestamp is fresh11:31
cachioChipaca, which files?11:31
Chipacacachio: /var/cache/snapd/*11:32
Chipacacachio: there's a "sections" file and a "names" file, as well as a commands.db11:33
Chipacacachio: just touching sections would be enough, but * makes it more future-proof :)11:33
Chipacacachio: OTOH, if you explicitly touch sections, then even if it's not in the saved state it might still work (i'd have to check)11:34
cachioChipaca, ok, I'll implement that11:35
cachioChipaca, I'll ping you in case it doesn't work :)11:35
cachiothanks!!11:35
Chipacacachio: there is a spread test for the catalog thing though11:35
Chipacacachio: which will fail if the catalog refresh doesn't actually work11:35
cachioChipaca, perfect11:40
* mvo has finished the spread test for findUid and will continue after lunch11:44
mupPR snapd#7265 opened: osutil: add osutil.Find{Uid,Gid} <Created by mvo5> <https://github.com/snapcore/snapd/pull/7265>11:46
jdstrandpedronis, mvo: hey, I'm here and ready to work on the 3rd snap_daemon PR. perhaps we could have a quick chat (5 minutes)?12:06
jdstrandpedronis, mvo: I could also attend your standup if the timing works better12:07
mvojdstrand: I'm at lunch, I pushed 7265 with some small tweaks to the osutil.Find{Uid,Gid}. to chat standup or 10min before the standup (or right after) would work best12:14
jdstrandmvo: that is one of the things I wanted to discuss (whether we need the fallback at all)12:15
jdstrandmvo: I'll plan on 10 minutes before. care to invite me?12:15
jdstrandmvo: reading 7265, I like it and is inline with what I was thinking but implemented better than I was thinking :)12:25
pedronisjdstrand: I made some changes to #7254 after your comments there12:41
mupPR #7254: cmd/snap-update-ns: fix pair of bugs affecting refresh of snap with layouts <Created by zyga> <https://github.com/snapcore/snapd/pull/7254>12:41
jdstrandpedronis: ack thanks. can you invite me to the standup today?12:51
mvojdstrand: we are in the standup channel12:52
jdstrandcoming12:52
=== Girtablulu|Away is now known as Girtablulu
pedronisjdstrand: I added some more comments to the PR14:00
jdstrandpedronis: ack14:02
mvojdstrand: I pushed some tweaks to the 7265 osutil.FindUid pr, thanks for your feedback! the spread test should also pass now14:11
cachiomvo, Chipaca coudl you please take a look to #726214:20
jdstrandmvo: \o/14:20
jdstrandmvo: it's getting close! :)14:20
jdstrandthis has been a looooooonnngggg time coming :)14:21
mvocachio: merged - and we should totally look into using this for our default sources.list :)14:29
mvojdstrand: yeah, thanks for all your hard work on this one, we are getting close (did it merge without conflicts?)14:29
cachiomvo, sure, I'll try that today14:29
mvocachio: thanks! no rush, but it feels like a cool improvement14:30
mvocachio: (what I want to say is that I'm a bit excited about this I guess :)14:30
cachiomvo, nice :)14:31
cachioI want to go step by step with this14:32
cachioif go-build test doesn't fail today14:32
cachiowe can go with the bigger change14:32
mvocachio: sounds good14:32
cachiobut I would like to make sure first this archive works well14:32
cachioin the meantime I'll create a pr to see how it works14:33
cachiomvo, thanks for the support14:33
pedronismvo: let me know when I should do a proper review pass on 762514:33
pedronisheh, 726514:33
mvopedronis: yes please I think its ready14:34
pedronisok14:34
mvoChipaca: if you could have a quick look at 7257 that would be great, hopefully easy14:35
Chipacamvo: LGTM14:37
niemeyermup: Hi14:40
mupniemeyer: In-com-pre-hen-si-ble-ness.14:40
niemeyerBrilliant..14:40
niemeyerAlright folks, mup can now self-identify and even steal-back its own nick through nickserv14:41
niemeyerSo this should be the end of its regular silenece14:41
niemeyersilence14:41
* cachio lunch14:42
mvoniemeyer: \o/14:42
mvoniemeyer: thank you!14:43
niemeyernp, sorry for how long it took14:44
niemeyerPlease do let me know if it gets stuck from now on..14:45
jdstrandmvo: the initial one did not, no, but I massaged it14:45
pedronismvo: +1 with some comments14:47
jdstrandmvo: re tests: fix user-libnss test> hehe14:51
mvojdstrand: that was "fun" (not!)14:53
mvopedronis: thanks, working through them now14:53
jdstrandmvo: :)14:53
pedronismvo: sorry, I nitpicked a bit on the spread tests comments14:59
mvopedronis: thanks, appreciated the careful review15:03
* ijohnson takes a break15:13
mvojdstrand: sorry, one more commit to the spread test for user-libnss15:18
mvojdstrand: with that it should really pass now15:18
jdstrandhehe, np15:18
jdstrandI know how spread testing goes :)15:20
jdstrand(merged)15:20
mvojdstrand: meh, its still not always passing, I think there is some kind of race, I'm looking15:34
mupPR snapcraft#2665 closed: Plugin catkin: disable parallel option <Created by artivis> <Closed by artivis> <https://github.com/snapcore/snapcraft/pull/2665>15:39
mupPR snapcraft#2669 opened: Plugin catkin: forward parallel build count <Created by artivis> <https://github.com/snapcore/snapcraft/pull/2669>15:39
* Chipaca sets spread on fire and walks away15:45
roadmr🔥15:45
cachioChipaca, question15:47
cachiowe restart snapd during reset for each test15:47
cachiois that triggering a catalog refresh?15:48
cachioright?15:48
* cachio afk16:22
=== pedronis_ is now known as pedronis
pedronisjdstrand: not sure we understand yet the failures of that new test, it seems something is not picking up the new configuration18:30
jdstrandpedronis: I theorized in the 7265 PR it might be the systemd entry in nsswitch.conf18:32
pedronisthe failure right now is silly though18:35
* jdstrand takes a closer look18:36
pedronisanyway we should try to make it work with getent itself18:36
pedronisbefore trying with our lib18:36
jdstrandoh heh18:36
jdstrandpedronis: well, the if ./findid uid extratest can never pass cause we didn't go build anything, no?18:38
mupPR snapd#7267 opened: many: simpler access to snap-seccomp version-info <Created by pedronis> <https://github.com/snapcore/snapd/pull/7267>18:38
pedroniswe are just trying though18:38
pedronisthe code right now is silly18:39
pedronisnot sure what it did before the current hackish state18:39
pedronisthough18:39
diddledanhacky code > nocode :-p18:47
diddledanfor a proper hacky code you want some epletive-ridden comments18:47
diddledanexpletive*18:48
diddledanand a few comments of the form "I have no idea why this works" and "what was this supposed to do anyway?"18:48
pedronisjdstrand: so playing in the debug shell after it fails things work19:02
mupPR snapcraft#2670 opened: Plugin colcon: forward parallel build count <Created by artivis> <https://github.com/snapcore/snapcraft/pull/2670>19:03
pedronisjdstrand: I think the failure is just silly19:08
pedronisit's because of println I think19:09
pedronistesting the fix19:12
pedronisjdstrand: pushed the fix I think19:20
mupPR snapd#7268 opened: tests: add /var/cache/snapd to the snapd state to prevent error on the store <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/7268>19:25
jdstrandpedronis: I also see that the println was problematic and fixed that here and it passed19:26
jdstrandpedronis: note, restore is not cleaning up extratest. it should: userdel --extrausers extratest19:29
jdstrandpedronis: I added two comments to the PR and merged/pushed to 721419:35
jdstrandpedronis: thanks for looking at that. println to stderr... indeed, silly bug :)19:36
* cachio afk19:48
mupPR snapd#7269 opened: tests: add test for services disabled during refresh hook <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/7269>23:33
mupPR snapd#7270 opened: [RFC] overlord: save disabled snap svcs on unlink snap tasks <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/7270>23:43

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