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

sil2100Fingers crossed that this time we're good!00:01
cachiosil2100, +100:50
sil2100\o/00:53
pedronisgood01:06
cachiosil2100, pedronis double checked01:06
cachiogood night for you :)01:07
sil2100cachio: goodnight!01:07
sil2100I'll still stick around to see the builds finishing and then handing over the images further01:07
pedronissil2100: thanks01:08
cachiosil2100, me too, just ping me in case01:08
cachioyou need something01:08
pedronissil2100: please do send a quick mail with the state of things01:11
sil2100pedronis: sure thing01:12
* sil2100 EODs01:26
sil2100o/01:26
mupPR snapcraft#2429 opened: cli: fix usage string in help command <Created by felicianotech> <https://github.com/snapcore/snapcraft/pull/2429>02:41
=== epod is now known as luk3yx
* cachio EOD02:58
zygao/07:36
=== pstolowski|afk is now known as pstolowski
pstolowskimornings08:04
pstolowskihey zyga08:04
zygaI’m going to pick up the car now :-)08:08
pstolowskipedronis: heh, locomote ceasing operations (see the announcement email)08:08
pstolowskizyga: wooah, the new car?08:08
zygaAre you working today?08:08
zygaYes08:08
pstolowskizyga: yes, last day before holidays08:08
pstolowskizyga: awesome :)08:08
zygaWhat is locomotoe?08:08
pstolowskizyga: the tool we were supposed to use to book travel08:08
zygaWhaaaat08:09
pstolowskizyga: so now it's email/phone booking, until something new is set uo08:09
pstolowski*up08:09
zygaLol08:09
pstolowskiwhich is fine08:09
zygaWhat a joke08:10
zygaTook forever to se up08:10
pstolowskiyeah..08:10
zygaWell fun days08:10
zygaI will work a little after picking up the car08:10
zygaSome rpm things to finish08:11
zygaThen some more rpm08:11
pedronispstolowski: morning, I saw that (the irony), I ended up making larger changes to #6306 promted by your request for more tests08:23
mupPR #6306: release: use locking around lazy intialized state <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6306>08:24
pstolowskipedronis: k, thanks08:24
pstolowskiyes, it's irony indeed08:24
pedronispstolowski: please take a look at it when you can, there is more structures on the other end the Mock* methods are easier to follow I think08:25
pstolowskiyes08:34
pstolowskipedronis: i'm playing with a potential fix for the retry slowness on remove; it's very fast now, although i need to think a bit still if not's looping too often now or something08:37
pedronispstolowski: I'm looking a bit at your other PRs, otoh I was up working until quite late, so bit of a slow day I expect08:38
pstolowskipedronis: sure, i'm not ready to discuss the fix just yet, just sharing the observation :), i think it looks very promising08:39
pedronispstolowski: does getInterfaceSetting  (it's in ctlcmd.go) has the same bug about not merging as the get config code?  the code look similar09:02
pedronissorry, ctlcmd/get.go09:03
pstolowskipedronis: hmm good question, i didn't think of it, will need to check09:03
pstolowskipedronis: probably not becausause it doesn't use transactions, there is just one map in play, but i need to double check09:04
pedronispstolowski: I left some notes in the hotplug ones,  one seems to be missing tests09:07
pstolowskiok, thanks09:07
pedronispstolowski: I looked at #6322, the change is simple enough, but it seems the unit test situation is complicated, because we lose unit test coverage of GetFromChange09:23
mupPR #6322: overlord/hookstate: apply pending transaction changes onto temporary configuration for snapctl get <Complex> <Created by stolowski> <https://github.com/snapcore/snapd/pull/6322>09:23
pstolowskipedronis: hmm i see, fair point. that method is now only used by interfaces i think. and btw getFromChange / getFromPristine names are probably not very accurate anymore09:24
pedronisyea09:25
pedronisalso not sure what's the exact difference09:25
pedronispstolowski: anyway it's good to have test elsewhere but we also need a unit test about the change itself09:25
pedronisthe behavior is quite different09:26
pedronisthere should be something that failed/was different before, works now even at that level09:26
jameshzyga: hi.  If you've got time, do you have any thoughts about https://github.com/snapcore/snapd/pull/6258#issuecomment-448490796 ?09:42
mupPR #6258: interfaces: support D-Bus activation <Created by jhenstridge> <https://github.com/snapcore/snapd/pull/6258>09:43
jameshI've got things working on 14.04, but only by using different paths for the system service files compared to other distros09:43
zygajamesh: hey, I'm on holidays for the next many days10:31
zygabut I will look anyway :)10:31
pedronisjamesh: hi, I should also very likely review your open PRs, unlikely to happen before the break at this point tough10:33
zygajdstrand: interesting10:34
zygaer10:34
zygajamesh: interesting problem10:34
jameshzyga: fair enough.  Have fun!10:35
* pstolowski lunch11:30
mupPR snapd#6323 opened: snap: give Epoch an Equal method <Created by chipaca> <https://github.com/snapcore/snapd/pull/6323>11:45
pstolowskipedronis: another question to 630612:49
pedronispstolowski: I don't understand the question, the equivalent now is appArmorProbe or mockAppArmorProbe kernelError12:53
pedronispstolowski: whis is returned here:  https://github.com/snapcore/snapd/pull/6306/files#diff-a807fe2d471c632368aaab69caa1d77aR26112:54
mupPR #6306: release: use locking around lazy intialized state <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6306>12:54
=== ricab is now known as ricab|lunch
pedronispstolowski: anyway I tried to answer also in the PR12:57
pstolowskipedronis: thanks, i misunderstood the code12:58
pedronispstolowski: tbh all those globals were a bit confusing, I suppose the struct are confusing in a different way :)12:59
pstolowskipedronis: yeah12:59
pedronispstolowski: :) about Simple, it was false already with the previous iteration by maciej, maybe the first iteration witht he lock was simple13:10
pedronisChipaca: hi,  could you look at #6306 as well?13:12
mupPR #6306: release: use locking around lazy intialized state <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/6306>13:12
pstolowskiheh, sure13:12
pstolowskipedronis: slow snap removal scenario - with a tentative fix - down to <40seconds from a few minutes13:17
Chipacapedronis: 's nice13:17
pstolowskipedronis: and there's just 1 or 2 retries in that period, so it's basically down individual connects/disconnects now (there are lots of them due to number of interfaces)13:18
mupPR snapd#6306 closed: release: use locking around lazy intialized state <Created by bboozzoo> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/6306>13:48
pedronisChipaca: pstolowski: thanks, merged13:48
mupPR snapcraft#2429 closed: cli: fix usage string in help command <Created by felicianotech> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2429>13:58
om26erHi! I have a snap that runs a background service `daemon: simple` my process also starts a subprocess but seems that subprocess gets killed instantly14:07
om26erSo systemd doing that or is there something missing inside snapd ?14:08
om26errelevant config here: https://github.com/om26er/screen-brightness-server/blob/master/snap/snapcraft.yaml#L3514:09
=== ricab|lunch is now known as ricab
om26erzyga, ^^14:13
zygaom26er: hey14:14
zygaom26er: when you say it gets killed instantly14:14
zygahow do you know, what do you measure?14:14
zygaom26er: snapd is not doing that for sure14:14
zygaI suspect it may be systemd14:14
zygado you have any apparmor or seccomp denials?14:14
om26erzyga, I see journalctl logs14:14
zygaom26er: (disclaimer: I'm on holidays, but  you know how things are sometimes :)14:15
om26erzyga, its currently in devmode so I assume apparmor isn't doing something bad14:15
zygathat's correct14:15
zygacan you reproduce that outside of snapd context?14:15
zygawith a service file and your code as is14:15
om26erzyga, I haven't tried that, I should probably do that.14:15
om26er...and enjoy your holidays, its not urgent, I'll eventually find a solution14:16
zygaPing me with the logs if you have them14:16
zygaI’ll be back in 15 minutes14:16
zygaDoing some house work now14:16
zygaom26er: looking at your yaml14:28
zygaom26er: what is the current working directory?14:28
zyganot sure if run is running as subprocess14:29
zygabut perhaps it cannot find "start" on path/14:29
om26erzyga, here is the log https://paste.ubuntu.com/p/WRBDSDGg5t/14:31
zygaDec 20 19:26:19 X1C6 screen-brightness-server[9149]: 2018-12-20T19:26:19+0500 [Guest        9193] RuntimeError: Event loop stopped before Future completed.14:31
zyga 14:31
zygaDec 20 19:26:19 X1C6 screen-brightness-server[9149]: 2018-12-20T19:26:19+0500 [Router       9184] Native worker received SIGTERM - shutting down ..14:32
om26erits correctly started line 103 and 104 indicate that14:32
zygaso, is your main process exiting?14:32
om26eryes that exists as well14:32
zygaexits or exists?14:32
om26er*exits, sorry14:32
zygamy question is this: if you fork, do something in child and exit in the parent14:32
zygathen you cannot do this with daemon: simple14:32
zygaread on systemd units and service types in particular14:33
zygamy recommendation:14:33
zygasimplify your code, don't fork14:33
zygajust run in the main process14:33
om26erfrom here https://docs.snapcraft.io/snapcraft-app-and-service-metadata/833514:33
om26erI tried simple it gives me above error14:33
zygaI don't know your code but I don't believe your issue to be related to snaps in any way14:33
om26erI tried forking and notify seems the snap keeps on starting the service14:33
zygaI suspect you misuse systemd service units14:33
zygayou cannot use notify easily14:34
zygaI would recommend to see how your code runs with systemd services first14:34
zygasimplify it, as most of the time forking is a legacy concept14:34
zyga(forking daemons)14:34
zygamay I ask why your code forks?14:34
zygais it for python multiprocessing?14:35
zyga(note that multiprocessing, AFAIK, requires a small tweak to work with snap confinement, I believe there's a forum thread about this)14:35
om26ergenerally the crossbar router is run on a different machine and its "clients" run on different. In this case the router and one of the client is running on the same machine.14:35
zygaok14:35
om26erso I configured my router to start that client, so hence its forking14:35
zygaif the router keeps running14:35
zygathen systemd will be happy14:36
zygathe main point is that the process that is started must not exit14:36
zygaor systemd will consider the unit to have failed and will "restart" it14:36
om26erthe router indeed keeps running its maybe a bug somewhere inside the router that isn't able to communicate that to crossbar14:36
zygaperhaps14:36
om26er*communicate that to systemd14:36
zygadid you get any interesting stuff in journald?14:36
zygawell, systemd just observes the process14:36
zygaI don't believe you can fool it this way14:37
om26ernothing interesting in journald, I'll the crossbar team regarding that14:37
om26er*ask (freaking typos)14:37
om26eror may need to re-architect my app14:38
om26ercreating two different services may also work14:38
zygaom26er: nothing at all in journald or nothing just in the service unit of your snap?14:39
om26erone starts the router, the other starts the client.14:39
zygadenials would go to a different place (just curious if you hit any)14:39
zygaom26er: how do the apps communicate?14:39
om26erthat above paste.ubuntu was from journalctl14:40
om26erzyga, over localhost (I may consider using a sock file though)14:40
zygaover network sockets?14:40
zygathat would work, yeah14:40
om26eryeah14:40
om26erthe client-router in this case talk through websocket btw14:40
om26erso ultimately my chrome extension which is also another "client" connects to the router and makes a RPC to increase laptop's screen brightness when Netflix.com goes fullscreen14:42
zyga  lol14:42
zygathat's some elaborate software :D14:42
zyganice14:42
om26erI was initially doing that over http ( was much simpler and worked as well ) but that was too boring and had limits, because I will ultimately enhance this daemon just do a lot more than just increase screen brightness.14:44
om26ermove laptop cursor using Android app: Check14:45
om26erincrease/decrease laptop screen brightness using Android app (requested a snapd interface for that already), lock laptop screen (snapd actually have an interface for that) using Android app.14:46
om26erYou'd say most of those things are done by KDE Connect already, that's true but we (Crossbar.io) wanted to experiment those things using our technology stack.14:48
* cachio lunch14:49
popeyChipaca: where is the source for https://snapcraft.io/test-snapd-complexion ?15:11
Chipacapopey: right here15:11
Chipacapopey: https://github.com/snapcore/snapd/tree/master/tests/lib/snaps/test-snapd-complexion15:11
zygathis is an internal test snap for snapd15:12
popeyi see no snapcraft.yaml15:12
zygait's not built with one15:12
zygajust "snap pack"15:12
popeyok, the reason I am asking is because an external developer is asking about completion15:12
zygapopey: most of our test snapd are built without snapcraft15:12
popeyhttps://forum.snapcraft.io/t/tab-completion-for-snaps/226115:12
zygaChipaca: ^ ?15:12
Chipacapopey: on it15:12
popeythis documentation refers to it but it's opaque15:12
zygaohai15:12
Chipacaoh that's not the developer15:12
popeyimpossible to find the way you as a developer would create a yaml15:12
popeywhat the developer wants is some docs for how to setup completion15:13
popeyand that doc gives half a story15:13
Chipacapopey: you point the 'completer' attribute of the app to the completer15:13
zyga(we should merge snapd and snapcraft teams)15:13
Chipacapopey: i'm not sure what rest-of-the-story there is15:13
popey(I'm after online docs, not answers to questions in irc) :)15:14
Chipacapopey: i was quoting from the docs you linked15:14
popeyright, but people want a whole example15:14
popeyand that doc links to something that doesnt use the way we usually recommend building snaps (snapcraft.yaml)15:14
popeyso it's a bit fuzzy to pick up15:14
Chipacapopey: if it helps, snapcraft  uses snapcraft to build snapcraft and it has completion15:19
Chipacadoes http_proxy=http://:8080 work?!?15:23
Chipacalooks like yes15:24
Chipacawow15:24
popeyhttps://github.com/digitalocean/doctl/blob/hholz/fix-snap-build/snap/snapcraft.yaml15:24
popeyThat's what they're currently doing (line 27/28) does that look sane?15:24
zygaI'm intrigued15:29
zygaI will add completion support to my app15:29
zygaand snap it15:29
Chipacapopey: looks like it15:35
Chipacapopey: but i don't know enough snapcraft to offer you certainty15:35
zygareinforcing my desire to merge the teams15:35
zyganobody outside of our team looks at snapcradt and snapd as separate things15:35
Chipacazyga: ?15:36
zygathat we don't know snapcraft like the back of our hand15:37
zyga(is that the right phrase?)15:37
Chipacazyga: how would merging the teams make me use snapcraft to the degree that I'd be able to know if something works just by inspecting the yaml?15:37
zygawe'd certainly know it more over time15:38
Chipacazyga: keeping in mind that I'm reviewing snapcraft pull requests every week15:38
zygaand we'd ship features in sync more?15:38
zyga(woot, that's great)15:38
zyga(I'm not)15:38
Chipacapopey: is it not working for them?15:38
popeyno15:38
pedroniszyga: I think it would make sense to have somebody that does a bit of both (depends which bits in snapd), merging the teams overall doesn't sound a great idea to me15:40
Chipacapopey: why?15:41
popeytab does nothing15:41
popeyi need to debug it further after this meeting15:41
Chipacapopey: https://forum.snapcraft.io/t/debugging-tab-completion/4198 fwiw15:41
Chipacapopey: is the snap in the store?15:42
popeyno, we're fixing a bunch of things15:42
popeyooh, thats neat, thank you15:42
Chipacapopey: I could take a quick look for the usual suspects if you have access to it15:42
Chipacapopey: if you do follow the debugging doc, feedback much appreciated15:42
popeypassed that on, really great thanks15:43
om26erHow can a snap "wait" for an interface to connect ?16:40
om26erI have daemon in my snap, which is useless if a specific interface is not connected, how can I make my daemon wait for that interface to connect ?16:41
om26erdoes snapd provide some sort of helpers for that or is that something I should take care of with my code16:41
pstolowskipedronis: pushed missing tests to #611316:49
mupPR #6113: overlord/ifacestate: handler for hotplug-connect task <Hotplug 🔌> <Created by stolowski> <https://github.com/snapcore/snapd/pull/6113>16:49
pedronispstolowski: thx16:50
Chipacapstolowski: do you have any insight for om26er ^?16:55
om26ercurrently I am toying with this idea: i.e. retrying every 5 seconds to check if that specific interface was connected. https://paste.ubuntu.com/p/7VP2DZdjM9/16:59
pstolowskiom26er: you can use interface hooks to notify you deamon about interface getting connected17:01
pstolowskiom26er: https://docs.snapcraft.io/interface-hooks/821417:02
om26erreading into that17:03
pstolowskiom26er: i hope that helps17:05
om26erpstolowski, thanks for the link :-)17:08
pstolowskiroadmr: hey, u there?17:08
roadmrhi pstolowski17:08
pstolowskiroadmr: hey, i've completely missed your email from a few days ago, sorry about that!17:08
roadmrpstolowski: oh! hey, not a problem17:09
roadmrpstolowski: I did some experimentation yesterday and have responded to the customer. Things do work and auto-connect the moment the two snaps are in the system; i.e. installation order doesn't matter17:10
pstolowskiroadmr: now, i don't know all the answers, some of that is not possible for sure, some stuff i need to check/discuss internally. can this wait till after holidays?17:10
roadmrpstolowski: yes, not a problem, we can check again once back from EOY17:10
pstolowskiroadmr: ok, great, thanks, i'll get back to you on that17:11
roadmrthanks pstolowski.17:12
pstolowskiroadmr: np, and sorry i didn't respond earlier17:12
roadmrpstolowski: hehe no worries, we all get tons of e-mail,it does happen17:12
pstolowskiok, with that i'm gonna wrap up this year, all the best to everyone and have great holidays!17:15
pstolowskio/17:17
=== pstolowski is now known as pstolowski|eoy
cachiozyga, hey17:43
cachiohttps://travis-ci.org/snapcore/spread-cron/builds/468916546#L328317:43
cachioI am updating the opensuse images and still see errors17:43
cachiopreviously updated and refreshed using zypper17:44
cachioany idea if something is missing?17:44
Chipacapedronis: I'll be working a little bit tomorrow morning to try to get this into a PR, it's that close :-)17:59
ChipacaEODing now, ttfn17:59
=== King_InuYasha is now known as Conan_Kudo
=== Conan_Kudo is now known as King_InuYasha
cachiozyga, found the problem19:00
* cachio afk19:45
* cachio EOD22:26

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