[04:09] <elopio> sergiusens: I didn't look for a way to remove the leftover messages. I just filed a bug for zyga: https://bugs.launchpad.net/plainbox/+bug/1484596
[04:20] <sergiusens> elopio: bummer, it is so annoying :)
[04:23] <sergiusens> elopio: here's another one https://code.launchpad.net/~sergiusens/snapcraft/testing-fixes/+merge/269146
[04:23] <sergiusens> 3rd and last
[04:23]  * sergiusens goes for some zzzzz
[07:28] <zyga> mvo: hey
[07:28] <zyga> mvo: around?
[07:33] <mvo> hey zyga, good morning
[07:34] <zyga> mvo: hey, I'm trying to understand how a part of snapcraft you wrote works
[07:34] <zyga> mvo: I'm thinking of the python3-project plugin
[07:35] <zyga> mvo: specifically it seems to be a bit broken IMHO, but perhaps I'm missing something
[07:35] <mvo> zyga: ok, what part is unclear? or everything :) ?
[07:35] <zyga> mvo: could you please show me how to use two python3-project parts where A depends on B?
[07:35] <zyga> mvo: how it's supposed to work, I already read the code and patched a few things
[07:36] <zyga> mvo: but before I patch more, I want to see if I'm doing something sane
[07:36] <zyga> mvo: I was trying to structure the plugin after virtualenv, so that each subseqeuent part, after it's staged, can be imported by the rest of the snapcraft assembly process
[07:36] <zyga> mvo: (I wasn't thinking of using virtualenv, just to follow the same principle)
[07:37] <zyga> mvo: also, from what I see, setuptools depenencies are not followed at all, so the developer has to put everything together manually, right?
[07:38] <mvo> zyga: yeah, so dependencies are not resolved (yet) thats something that must be done manually right now
[07:38] <zyga> right, thanks for confirming that
[07:39] <mvo> zyga: we haven't used it in the scenario you describe, it may well be broken for that, how do you patches look right now? and in what way does it break exactly? code crashes or files not copied ?
[07:39] <zyga> mvo: ok, thanks, so currently it just crashes trying to run the setup of the 2nd part as it cannot import the 1st part
[07:39] <zyga> mvo: what I'm doing now, is to change how setup is invoked
[07:40] <zyga> mvo: I'm using --root relative to installdir and a fixed prefix
[07:40] <zyga> mvo: and I'll be probably using a different layout, but I need to see how to control the environment first
[07:40] <zyga> mvo: I found plugin.env() but it's not being called, I saw it's something related to handler.code but I've yet to connect the dots
[07:41] <zyga> mvo: I want to write an env function there that uses PYTHON* viariables to set everything up
[07:41] <mvo> zyga: aha, I see. there is a env() method that is available to add e.g. PYTHONPATH, there is also the after= directive to ensure on part is build before another
[07:41] <zyga> mvo: it also may be a factor that I'm working from a virtualenv in the first place (snapcraft itself is in a virtualenv)
[07:41] <zyga> mvo: and I want to make sure it's working regardless of that fact
[07:42] <zyga> mvo: I added env() but it's not getting called yet
[07:42] <zyga> as in ...
[07:42] <mvo> zyga: right
[07:43] <zyga> ttp://paste.ubuntu.com/12197674/
[07:43] <zyga> mvo: I'll dig through this and improve it anyway I can
[07:44] <zyga> mvo: I need the plugin to work with roughly anything I can throw at it for an active project we're doing in cert so I'll probably ask you for a few reviews as I go
[07:45] <mvo> zyga: sure, thanks. sergio will also be around later to help with that, once I finish my current snappy branch I can take a deeper look to see why env() is not doing what you expect
[07:45] <zyga> mvo: thanks
[07:46] <zyga> ah
[07:46] <zyga> small fix is to use /usr/bin/python3 instead of python3
[07:46] <zyga> that addresses the virtualenv factor
[07:47] <zyga> mvo: are you using virtualenv for development?
[07:52] <mvo> zyga:  I don't use virtualenv
[07:58] <zyga> mvo: how do you develop snapcraft then?
[07:59] <mvo> zyga: in my normal wily env
[07:59] <zyga> mvo: just running it straight from the tree?
[07:59] <zyga> mvo: ok, thanks for the tip
[07:59] <zyga> mvo: is python 3.5 default there?
[07:59] <zyga> mvo: I'm on vivid
[08:04] <mvo> zyga: its available but not default (yet)
[08:04] <mvo> zyga: not sure what the plans of the distro team are, I assume they want to make it default but its a rc at this point aiui
[08:13] <ogra_> mvo, i see you closed bug 1479711 ... do we consider bugs "fix released" if the fix is only in wily ?
[08:13] <ogra_> (just a general question)
[08:13] <zyga> ogra_: o/
[08:14] <ogra_> hey zyga
[08:14] <mvo> ogra_: I would say yes unless there is a 15.04 task, feel free to add one though
[08:15] <ogra_> k, thanks
[08:15] <mvo> ogra_: I wonder if we should maybe do a 15.10 "release" and move current trunk to 15.04, nothing radical in there AFAICS and mostly useful and stable for 15.04 people. but this of course needs wider discussion
[08:16] <ogra_> well, would that work ? given the potential differences in both releases (newer go version, gcc5 etc)
[08:17] <ogra_> if that doesnt get in our way, yeah sure
[08:17] <mvo> ogra_: that we need to explore, but it might be good enough to just build trunk on 15.04 and some specific packages (like the initramfs improvements)
[08:18] <zyga> ha
[08:18] <zyga> small bug in logging in snapcraft :)
[08:19] <ogra_> yeah, it definitely makes sense for stabilizing the stable image
[08:19] <ogra_> to keep the focus there ...
[08:19] <ogra_> (and it will make everyone more cautious sbout landing his changes as a nice sideefect :) )
[08:19] <zyga> and perhaps some more in various places, logging is broken wrt all arguments
[08:20] <mvo> yeah, thats my goal, optimize our time and spend less time porting, either via developing for 15.04 and merging from that into trunk or by moving trunk closer to 15.04
[08:20]  * zyga starts proposing fixes
[08:27] <zyga> https://code.launchpad.net/~zyga/snapcraft/fix-logging-setup/+merge/269163
[08:28] <zyga> mvo: who's the lead reviewer for snapcraft?
[08:28] <mvo> zyga: sergio right now, but let me have a look, I can cover TZ wise
[08:29] <zyga> mvo: cool, you can expect a lot of patches from me soon :)
[08:29] <mvo> zyga: cool :)
[08:29] <zyga> mvo: btw, do you want to use git with snapcraft (I am)
[08:29] <zyga> mvo: it's pretty cool :)
[08:29] <zyga> helps sorting through patches a lot
[08:30] <mvo> is the tarmac problem solved? that was the only thing holding us back
[08:30] <zyga> mvo: bzr on the server
[08:30] <zyga> mvo: git locally
[08:30] <zyga> mvo: I'm using git-lp that I wrote (and I'm using all the time for the past three years)
[08:33] <mvo> zyga: nice, where can I find it?
[08:34] <zyga> mvo: https://github.com/zyga/git-lp
[08:34] <zyga> https://github.com/zyga/git-lp/wiki
[08:35] <zyga> mvo: if you have any issues just ping me
[08:35]  * mvo looks
[08:35] <zyga> mvo: it's just a single file, drop it in $PATH somewhere
[08:35] <zyga> mvo: apply the damn patch to bzr and you're all set
[08:36] <zyga> (instructions on the wiki might be a bit stale, I wrote them at around 12.04 time frame)
[08:36] <mvo> uh, I vaguely remember the patch
[08:36] <zyga> :D
[08:49] <zyga> mvo: how often does snapcraft merge processor (tarmac?) runs?
[08:49] <mvo> zyga: should be every 10min, but I think there was a commit message missing, I set one now
[08:51] <zyga> mvo: ah, sorry, I'm used to autogenerated commit messages
[08:51] <zyga> thanks
[08:51] <mvo> no worries
[08:51] <mvo> and yes, that is (much) nicer
[08:53] <zyga> ok, the other half of the change is now pushed
[08:53] <zyga> mvo: https://code.launchpad.net/~zyga/snapcraft/fix-logging-calls/+merge/269167
[08:58] <mvo> meh, its still updating the diff
[08:58]  * mvo waits (im)patiently
[08:58] <zyga> mvo: yeah, is is oddly slow
[08:59] <zyga> mvo: I have another branch to sweeten the wait
[08:59]  * zyga cannot wait till he gets to the part of improving plainbox-based tests
[09:00] <zyga> mvo: https://code.launchpad.net/~zyga/snapcraft/fix-process-leak/+merge/269172
[09:00] <zyga> it's pretty odd because all the delta shows up fine http://bazaar.launchpad.net/~zyga/snapcraft/fix-logging-calls/revision/136
[09:01] <zyga> and the one on the 2nd branch is already generated
[09:06] <zyga> mvo: both branches are reviewable now
[09:06] <mvo> zyga: and are reviewed :P
[09:06] <zyga> oh, sorry :)
[09:06] <mvo> thanks again zyga, much appreciated!
[09:06] <zyga> thank you :)
[09:06] <zyga> mvo: I have plenty more :-)
[09:06] <mvo> thats good
[09:07] <mvo> keep them coming and we will name the next release after you :)
[09:07] <zyga> hahaha :-0
[09:07] <zyga> :-)
[09:07] <zyga> when I'll run out of ideas I'll start fixing pep-8 issues and adding docstrings everywhere
[09:08] <mvo> lol
[09:09] <ogra_> ricmm, any luck with the sfdisk hacking ?
[09:11] <ogra_> mvo, so i guess we can create a raspberry subtree on snappy-hub to push the RPi setup to  ?
[09:11] <mvo> ogra_: its seems to be, yes
[09:11] <mvo> ogra_: thats what I heard yesterday :)
[10:20] <imuguruza> longsleep: just one rapid question: device tree needs to recompile for exposin /dev/spidev0.0 right??
[10:20] <imuguruza> Thanks in advance!
[10:21] <imuguruza> (Talking about your OdroidC1 Snappy image)
[10:21] <imuguruza> I meant /dev/spidev0.1
[10:28] <zyga> mvo: I have a bigger one now
[10:28] <mvo> zyga: nice
[10:29] <zyga> mvo: https://code.launchpad.net/~zyga/snapcraft/fix-1486659/+merge/269190
[10:29] <zyga> mvo: have look, I tested it obviously but there are no tests for that yet
[10:30] <zyga> mvo: I'll get to add tests but I'm not familiar with how to do it yet and I still think it's important to merge fixes for real issues, even if they are not tested automatically
[10:32] <zyga> mvo: there's one more issue that i didn't know how to fix, if the selected key is encrypted and there's no agent around, it will propmt the user, I wanted to prevent that somehow but I'm not sure how yet
[10:33] <zyga> mvo: also, if you want me to split this branch into separate branches & file bugs for various sub-issues, I can do that easily
[10:37] <mvo> zyga: thanks, I think its fine and I agree with the reasoning , I have a look now (or maybe after lunch if I don't finish in time :)
[10:40] <zyga> mvo: thanks
[10:44] <zyga> sergiusens: ping
[10:44] <zyga> sergiusens: around? :-)
[10:46] <sergiusens> zyga: yeah, but need to get some coffee, so start typing and I'll get back to you ;-)
[10:46] <zyga> sergiusens: thanks, I have a few ideas I want to discuss with you
[11:34] <plars> zyga: hey
[11:35] <zyga> plars: hey
[11:35] <ricmm> ogra_: nothing yet ;) working on that this afternoon
[11:35] <zyga> plars: in a meeting
[11:35] <zyga> plars: I got your message
[11:35] <plars> zyga: I'm still not having much luck getting chainloading to work with inception in kvm, and still issues with mountpoints
[11:35] <plars> zyga: sure, np... just sometime today, maybe we can walk through it
[11:35] <zyga> plars: I will fix that today
[11:36] <ogra_> ricmm, so should we start in parallel on two approaches (me going the parted route) ? just to be safe ?
[11:36] <zyga> plars: I'm working on some improvements though they also intersect with other parts of the stack
[11:36] <zyga> plars: I'll tell you more later today
[11:36] <plars> zyga: I also have some other stuff I was changing in my local branch, but wasn't sure where to push it to. There's no project that I could find
[11:36] <zyga> plars: I'll make one shortly
[11:36] <zyga> plars: right now you can just push it to any git repo
[11:37] <zyga> plars: I can work with that
[11:38] <ricmm> ogra_: yea take a look at doing it with parted
[11:38] <ogra_> great ...
[11:38] <ricmm> if I get something for this we can change to it due to size improvements I guess
[11:38] <ricmm> but you already know how to do it with parted, so best to move forward
[11:38] <ogra_> it also seems like you cant really resize GPT partitions at all ...
[11:38] <ogra_> all docs i can find delete the old one and create a new one with all tools
[11:39] <ogra_> i have to test what resize in parted actually does ... if we need to delete and re-add that means even more math and scripting :/
[11:40] <ogra_> silly GPT !
[11:51] <ogra_> ppisati, btw, i dont think a watchdog will help with the 0byte kernel and dtb files ... we should have checks in the bootloaders and do the auto-fallback there
[11:52] <ogra_> (not sure how hard that is to do in grub ... in uboot it is surely possible to check the size and file existence)
[11:53] <emilebosch> hi guys, can someone tell me a little bit how to create a snappy package with postgreql and rails in it., are there any examples online somewhere?
[11:53] <zyga> sergiusens, mvo: I would appreciate feedback on this mr, I have more things in the pipe and I (_crazy_ schedule) need to know I can land things effectively https://code.launchpad.net/~zyga/snapcraft/fix-1486659/+merge/269190
[11:53] <zyga> if you are blocked/cannot review things/disagree with the changes, i'd like this feeback sooner rather than later
[11:54] <ogra_> emilebosch, take a look at snapcraft https://developer.ubuntu.com/en/snappy/snapcraft/your-first-snap/
[11:54] <ogra_> (it is still very young and rough on the edges, please file bugs if you find issues)
[11:55] <emilebosch> ogra_: thanks, i just want to know a bit on the internals in order to understand how the services work. are they converted to systemd targets?
[11:56] <ogra_> if you define a service in the package.yaml a systemd unit is created for it, yes
[11:57] <emilebosch> ogra, ok so are snaps than basically lxd containers?
[11:57] <emilebosch> with a systemd as init?
[11:57] <ogra_> no, there are no containers ...
[11:58] <ogra_> a snap runs natively on your system but wrapped by a launcher and confined by apparmor
[11:58] <emilebosch> huh.  now i am confused. ok i need to read about the internals instead of annoying you guys, where can i find it
[11:58] <emilebosch> aaah
[11:58] <emilebosch> feels a bit weird now since ubuntu is moving to lxd/lxd
[11:59] <ogra_> there is an lxc/lxd framework in the works and there is also a docker framework in the snap store ... but you would have to explicitly depend on them and have them installed for contsainer use
[11:59] <ogra_> but by default snaps are just jailed on the system without containers around them
[12:02] <emilebosch> ogra what would be the upgrade scenario’s for snaps? in the sense lets say i have an app that runs a database then in release a new version how would it be upgraded?
[12:03] <ogra_> your snap has a data dir where it stores such stuff ... that data dir is migrated (copied for now) durinng upgrades
[12:03] <emilebosch> thanks
[12:04] <ogra_> it is reflected in the $SNAP_APP_DATA_DIR env var that is exported to your snaps environment when things start
[12:05] <emilebosch> ok awesome. is ther emore in-depth documentation avialable?
[12:05] <ogra_> https://developer.ubuntu.com/en/snappy/guides/security-policy/
[12:06] <ogra_> that should list all the vars ...
[12:06] <ogra_> and indeed there are https://developer.ubuntu.com/en/snappy/guides/package-metadata/ and https://developer.ubuntu.com/en/snappy/guides/packaging-format-apps/
[12:07] <ogra_> and a very basic tutorial at https://developer.ubuntu.com/en/snappy/tutorials/build-snaps/
[12:10] <emilebosch> awesome thanks ogra_
[12:12] <ogra_> mvo, looking at http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk/revision/1196 ... doesnt the build also create an initrd.img that should be deleted ?
[12:17] <mvo> ogra_: that is moved earlier unless I miss something
[12:22] <ogra_> ok
[12:22] <ogra_> i did only see the patch ... slightly out of context indeed
[12:23] <mvo> zyga: sorry for the delay, all approved now
[12:23] <zyga> mvo: thanks a lot, no need to worry :-)
[12:24] <zyga> mvo: a related question, where should *.snap files go?
[12:24] <zyga> are they expected to build to current working directory?
[12:33] <mvo> zyga: I think that was the plan, mterry was working on this part, I need to check the source/spec to be certain
[12:33] <zyga> mvo: if you have a link handy I'd like to see as well
[12:34] <zyga> joc_: https://code.launchpad.net/~zyga/snapcraft/extra-run-features have a look at this please
[12:34] <zyga> joc_: get this branch somwehere on the side and tell me if that lets you run snapcraft run to play with real wifi
[12:35] <zyga> the corresponding MR is https://code.launchpad.net/~zyga/snapcraft/extra-run-features/+merge/269202
[12:37] <mvo> zyga: I look at this now
[12:37] <zyga> mvo: thanks
[12:37] <zyga> mvo: the use case is this
[12:37] <zyga> mvo: well, it's all explained there :)
[12:38] <zyga> mvo: but it makes development faster as you can just assemble/run
[12:38] <zyga> mvo: and often you don't need to involve real hardware
[12:39] <zyga> my usb wifi dongle stopped working
[12:39] <zyga> or maybe not?
[12:39]  * zyga tries
[12:41] <cwayne> i havent been able to get mine working on rpi2 with the newer image
[12:41] <cwayne> zyga: ^ not sure if thats related at all, but fyi  :)
[12:41] <ogra_> cwayne, oh, ?
[12:41] <zyga> cwayne: I don't have a rpi2
[12:42] <cwayne> ogra_: yeah, it keeps saying that it failed to associate with the driver and there's auth failures, even though i've looked over the psk 10,000 times and its correct
[12:42] <ogra_> cwayne, if the driver is in the kernel/modules it should just work by adding the necessary data to /etc/network/interfaces
[12:42] <zyga> sigh
[12:42] <zyga> yes it's dead
[12:42] <cwayne> ogra_: i've even copied the /etc/network/interfaces from my rpi1 with raspbian with the same dongle and it works there
[12:43]  * zyga needs to buy another wifi eh
[12:43] <ogra_> smells like a driver issue then ... i know others use wlan dongles just fine ... do you know what driver it usually uuses ?
[12:43] <cwayne> i'd had it working on an older image, but i've also physcially moved it, maybe its not getting a strong enough signal..
[12:43] <zyga> ogra_: which dongle are you using?
[12:44] <zyga> ogra_: amazon links appreciated
[12:44] <ogra_> zyga, i dont :P
[12:44]  * ogra_ has wires 
[12:44] <zyga> why do we always have to be on the front lines ;-)
[12:44] <ogra_> zyga, iirc rickspencer3 uses one on his BBB
[12:44] <rickspencer3> hi ogra_
[12:45] <ogra_> hey rickspencer3
[12:45]  * rickspencer3 looks for context
[12:45] <ogra_> rickspencer3, you use a wlan dongle on your BBB, dont you ?
[12:45] <rickspencer3> ogra_, no, I could not get either of mine to work
[12:45] <ogra_> zyga, looks for recommendations for buying one that works
[12:45] <ogra_> oh
[12:45] <zyga> ogra_: see
[12:45] <rickspencer3> zyga, if you get one that definitively works, can you let me know?
[12:45] <ogra_> yeah :(
[12:45] <rickspencer3> :)
[12:46] <zyga> ogra_: I'll buy you one
[12:46] <zyga> rickspencer3: absolutely rick
[12:46] <cwayne> i got this one: http://www.amazon.com/gp/product/B00FWMEFES?psc=1&redirect=true&ref_=oh_aui_detailpage_o03_s00
[12:46] <zyga> rickspencer3: I'll get a few and try what works
[12:46] <cwayne> and it did work before
[12:46] <cwayne> maybe i just need to move it or something.. who knows
[12:46] <zyga> cwayne: looks like http://www.amazon.es/TP-LINK-TL-WN725N--Nano-Adaptador-garant%C3%ADa/dp/B008IFXQFU/ref=sr_1_1?ie=UTF8&qid=1440593083&sr=8-1&keywords=wifi+usb
[12:46] <zyga> cwayne: I wonder what's the chipset inside
[12:46] <zyga> anyway, cha-ching, let's get an see
[12:47] <ogra_> zyga, hmm, i havent seen one of these NANO adapters tht had a linux supported chipset (though that was like 1.5y ago when i looked at them last)
[12:48] <zyga> ogra_: there's just one rpi2 now, right?
[12:48] <zyga> anyone that I get is good
[12:49] <zyga> joc_: any luck?
[12:49] <zyga> joc_: does it work for you
[12:49] <ppisati> ogra_: yeah
[12:50] <ppisati> ogra_: my point there was that
[12:50] <ppisati> ogra_: the hack that i implemented in uboot
[12:50] <ppisati> ogra_: is that, either you boot the kernel
[12:50] <ppisati> ogra_: or it forcefully reboots the board
[12:50] <ppisati> ogra_: so the a/b logic has another chance to run or whatever we put there
[12:51] <ppisati> ogra_: and once the kernel takes over
[12:51] <ppisati> ogra_: uboot can't do anything
[12:51]  * zyga looks for a master bug to get python3-project projects to see each other 
[12:52] <mvo> ppisati: hi, I hope I don't get on your nerves yet but did you had a chance to check https://bugs.launchpad.net/snappy/+bug/1471868 - its a bit confusing, looks like the kernel is doing funny stuff if init is broken (and it seems to be different depending on architecture)
[12:53] <ppisati> well, the kernel can't do anything
[12:53] <ogra_> ppisati, well, just blindly resetting wont make the ab switch ... you need to actively set snappy_ab to the opposite value too ... else you just create a loop
[12:53] <ppisati> if there's no init
[12:53] <ppisati> it doesn't know what to do
[12:54] <ppisati> iirc it even looks in a couple of places
[12:54] <ppisati> for alternate inits
[12:54] <ogra_> yeah
[12:54] <ppisati> but if the fs is corrupted
[12:54] <ogra_> 4 or 5 even
[12:54] <ppisati> and it cannot exec any of time
[12:54] <ppisati> you are screwed
[12:54] <ppisati> it can probably panics and reboot
[12:54] <ppisati> but i've to check
[12:54] <mvo> ppisati: so this is a test when its broken and I think its doing the right thing on arm (panics) but not on amd64
[12:54] <ogra_> it should panic
[12:55] <mvo> ppisati: we broke init deliberately for the test of course
[12:55] <mvo> ppisati: feel free to downgrade/comment if there is nothng that the kernel can do of course, its all part of the robustness dance :)
[12:56] <ppisati> ogra_: well, the watchdog sets a timer in hw
[12:56] <ppisati> ogra_: and if it expires, it restes the board
[12:56] <ppisati> ogra_: i mean, i cant change a var in the exec
[12:57] <ppisati> ogra_: because the reset is done in hw, i can't run a trigger for example
[12:57] <ppisati> mvo: that's weird, i've to test it
[12:58] <mvo> ppisati: thanks! no real rush, I'm mostly curious about it
[12:59] <mvo> (well, we should fix it eventually but its not omg-now priority or anything)
[12:59] <ppisati> mvo: can you make a list of all these 'robustness thing' bugs?
[12:59] <mvo> ppisati: sure, I think I subscribed you to all of them, but I'm happy to add a tag, is "failover-robustness" good?
[12:59] <mvo> (as tagname?)
[13:00] <ppisati> mvo: snappy robustness or something like that?
[13:01] <mvo> ppisati: works for me, so snappy-robustness as tag in LP and I send you the url that shows all such bugs?
[13:01] <ppisati> mvo: that would be perfect
[13:01] <ogra_> ppisati, right, thats why i mean a watchdog is the wrong approach, since we need to switch over from a to b (or the opposite)
[13:02] <ppisati> ogra_: once mvo is done collecting all the robustenss bugs, we can discuss about it
[13:02] <ogra_> yeah
[13:12] <rickspencer3> arg, I can't remember how to hw-assing to the gpio pins
[13:12] <rickspencer3> (BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy hw-assign bike-and-bus-sensor.sideload '/sys/class/gpio/'
[13:12] <rickspencer3> invalid hardware device
[13:12] <rickspencer3> ?
[13:12] <ogra_> didnt you open a bug about it yesterday ?
[13:13] <zyga> joc_: ha, the option is already very seful
[13:13] <zyga> useful
[13:13] <rickspencer3> ogra_, differnet bug
[13:13] <zyga> joc_: SNAPCRAFT_RUN_QEMU_ARGS="-smp 2" snapcraft run
[13:13] <zyga> joc_: and you can write a simple "amd I SMP" test case
[13:13] <zyga> joc_: go for it!
[13:13] <rickspencer3> ogra_, yesterday I figured out how to do hw-assign for the pins, but now I forget :/
[13:14] <joc_> zyga: just trying the wifi thing - bit of pain cos think need root to access the wifi dev
[13:15] <zyga> joc_: oh
[13:15] <zyga> joc_: hmm
[13:15] <zyga> joc_: patch snapcraft to use sudo there
[13:15] <zyga> joc_: or
[13:15] <zyga> joc_: add yourself to the appropriate group
[13:15] <zyga> joc_: (2nd thing should be better but requires you to login again)
[13:16] <ogra_> rickspencer3, https://bugs.launchpad.net/bugs/1488618
[13:16] <ogra_> (there is a workaround)
[13:16] <rickspencer3> ogra_, yeah, that's a different bug, actually
[13:16] <joc_> zyga: the device is root:root
[13:17] <zyga> joc_: ah, I see
[13:17] <zyga> joc_: that's crap
[13:17] <rickspencer3> and I've applied the work around :)
[13:17] <zyga> joc_: you an try an udev rule to change permissions
[13:17] <zyga> joc_: but I think running it via rut is easier
[13:17] <zyga> joc_: just patch cmd.py to have sudo there
[13:17] <joc_> k
[13:17] <ogra_> rickspencer3, hmm, looks to me like the worakaround should give you full access
[13:17] <zyga> joc_: I'll add an option to make that a possible choice on command line
[13:17] <ogra_> without even needing to call hw-assin again
[13:18] <rickspencer3> ogra_, the work around gives me access only to export
[13:18] <rickspencer3> so it provides access to the program that creates gpio files
[13:18] <rickspencer3> but hten I need access to those files once created
[13:18] <rickspencer3> which, I think, worked yesterday
[13:18] <rickspencer3> but today I can't figure out that I did
[13:18] <ogra_> rickspencer3, well, just add more lines for the other nodes in there
[13:18] <ogra_> whatever you need
[13:19] <rickspencer3> yeah, I can hack around it, but I swear I could just use hw-assign yesterday, so I think I am doing something silly
[13:20] <ogra_> well, the bug says /sys/class is generally denied ... so i would be surpised if you got it working yesterday without hacksd
[13:20] <ogra_> *hacks
[13:21] <ogra_> probably jdstrand can clearify
[13:22] <rickspencer3> well, all I can say is, I had it working with a different snap yesterday
[13:22] <joc_> zyga: seemed to work ok with a sudo added to the kvm call
[13:22] <rickspencer3> it could have been a fluke, i.e. something else I didn't do wrong yesterday that I did wrong today :)
[13:22] <ogra_> func validDevice(device string) bool {
[13:22] <ogra_>  return strings.HasPrefix(device, "/dev") || strings.HasPrefix(device, "/sys/devices")
[13:22] <ogra_> }
[13:23] <ogra_> these are the only two allowed paths when using hw-assign
[13:25] <zyga> joc_: cool, thanks for confirming this
[13:29] <cwayne> ogra_: so i moved my rpi2 physically closer to the AP and now it connects, so there's that :)
[13:30] <ogra_> cwayne, yay
[13:30] <cwayne> zyga: ^
[13:30] <zyga> cwayne: coool
[13:35] <jdstrand> rickspencer3, ogra_: currently we should allow access to the devices that are exported. the problem was that we blocked export/unexport
[13:36] <rickspencer3> jdstrand, well, today I am getting blocked on the exported device :(
[13:36] <jdstrand> rickspencer3: so once you exported, hw-assign should work as expected (hw-assign foo /sys/devices/...)
[13:36] <jdstrand> rickspencer3: what is the denial?
[13:36] <ogra_> jdstrand, /sys/class ...
[13:36] <ogra_> not /sys/devices :)
[13:37] <rickspencer3> jdstrand, I have 2
[13:37] <rickspencer3>  audit: type=1400 audit(1440595711.301:11): apparmor="DENIED" operation="open" profile="bus-and-bike-sensor.sideload_bus-and-bike-sensor_0.1" name="/sys/devices/platform/ocp/481ac000.gpio/gpio/gpio68/direction" pid=726 comm="bus-and-bike-se" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[13:37] <jdstrand> ok, that one should work with hw-assign
[13:38] <rickspencer3> jdstrand, can you give me the command for hw-assign, I couldn't make it work
[13:40] <jdstrand> sudo hs-assign bus-and-bike-sensor.sideload '/sys/devices/platform/ocp/481ac000.gpio/**'
[13:40] <jdstrand> err
[13:40] <rickspencer3> ug
[13:40] <jdstrand> sudo snappy hw-assign bus-and-bike-sensor.sideload '/sys/devices/platform/ocp/481ac000.gpio/**'
[13:40] <jdstrand> now, the /sys/devices/... could be just /sys/devices/platform/ocp/481ac000.gpio/gpio/gpio68/direction
[13:40] <rickspencer3> wow, taking a while :)
[13:41] <emilebosch> is there anywhere a git repo wiht sample snaps?
[13:41] <emilebosch> or just some apps snappyfied?
[13:41] <jdstrand> but with the glob you shouldn't have to do extra stuff
[13:41] <rickspencer3> let me try rebooting and see what happened
[13:41] <jdstrand> rickspencer3: don't reboot
[13:41] <rickspencer3> too late
[13:41] <rickspencer3> sorry
[13:41] <jdstrand> did the command complete?
[13:41] <rickspencer3> jdstrand, yes
[13:41] <jdstrand> ok that's fine
[13:41] <rickspencer3> I waited for the command to complete :)
[13:41] <rickspencer3> for once I was not too impatient
[13:41] <jdstrand> hehe
[13:43] <jdstrand> rickspencer3: did it work?
[13:43] <rickspencer3> so, here I am again
[13:43] <rickspencer3> : type=1400 audit(1440596552.734:17): apparmor="DENIED" operation="open" profile="bus-and-bike-sensor.sideload_bus-and-bike-sensor_0.1" name="/sys/class/gpio/export" pid=1142 comm="bus-and-bike-se" requested_mask="w" denied_mask="w" fsuid=0 ouid=0
[13:43] <rickspencer3> I thought I fixed that in the apparmour file
[13:43] <jdstrand> ok, yes, that is what requires the workaround rule
[13:43] <jdstrand> oh, I know what happened
[13:44] <ogra_> emilebosch, bzr branch lp:~snappy-dev/snappy-hub/snappy-examples
[13:44] <jdstrand> you added the workaround rule to the profile, then used hw-assign which rewrote the profile
[13:44] <ogra_> (no git ... but bzr :) )
[13:44] <emilebosch> aarg
[13:44] <jdstrand> rickspencer3: ^
[13:44] <emilebosch> ok berw install bzr
[13:44] <rickspencer3> oh
[13:44] <rickspencer3> jdstrand, I did, but, looks like the apparmor profile got regenerated
[13:44] <jdstrand> the good news is, it sounds like mvo was going to hop on this so the workaround rule won't be needed
[13:45] <jdstrand> rickspencer3: yes. the hw-assign blew it away
[13:45]  * jdstrand adds comment to the bug
[13:45] <rickspencer3> ok, I fixed the file and reran the parser
[13:45]  * rickspencer3 reboots
[13:47] <rickspencer3> \o/
[13:47] <rickspencer3> thanks jdstrand that got it working again
[13:48] <jdstrand> that reboot shouldn't be required if you are restarting the correct service. if you feel compelled to try to chase that down, please file a bug and we can chase it down
[13:48] <jdstrand> rickspencer3: sure, np. sorry I forget to mention/didn't think about the fact that hw-assign regenerates the profile yesterday
[13:48] <rickspencer3> meh
[13:48] <rickspencer3> I would have gotten there since the same app armor denial came back
[13:49] <rickspencer3> now I have a happily blinking led again :)
[13:49] <jdstrand> yeah!
[13:49]  * rickspencer3 moves on to controlling it from a web api :)
[13:58] <ogra_> rickspencer3, next step, phone webapp ?
[13:59] <rickspencer3> hehe
[13:59] <ogra_> (though that might be tricky without avahi )
[13:59] <rickspencer3> ogra_, I am going to get the next bus prediction from my local transport companies api
[14:00] <rickspencer3> and first blink a light depending on when the next bus is coming
[14:00] <rickspencer3> then do something similar for the city bikes near me
[14:00] <rickspencer3> then I will add some info the lcd screen
[14:00] <ogra_> ah
[14:00] <ogra_> so you dont want a webapp but integration with the phone notifications !
[14:01] <rickspencer3> yeah, phone notifications could be next
[14:01] <rickspencer3> but, I was just thinking it would be like ambient information
[14:01] <rickspencer3> "oh, bikes are running low, maybe I should leave now instead"
[14:01] <rickspencer3> "hmmm looks like we can take our time, it will be a while before the next bus"
[14:01] <rickspencer3> that kind of thing\
[14:01] <ogra_> yeah
[14:02] <rickspencer3> I'm thinking that if I get really tricky, I can make a web config UI, then other people in DC can make their own, just add their stop and bike station ids :)
[14:07] <mvo> ppisati: https://bugs.launchpad.net/snappy/+bugs?field.tag=snappy-robustness <- the list we talked about earlier
[14:09] <ppisati> ogra_: ^
[14:16] <mvo> pitti: silly question, how can I see if m systemd "ubuntu-snappy.boot-ok.service" was executed before or after the "rc.local" script? and if it was run before, is there a way to ensure that ubuntu-snappy.boot-ok.service is run last (ideally very last :) ?
[14:16] <pitti> hey mvo
[14:17] <pitti> mvo: there is no "very last" concept in any recent init system, I'm afraid (not even in SysV with insserv)
[14:17] <mvo> pitti: hm, do you have a idea what might be the closest approximation?
[14:17] <pitti> mvo: you can check systemctl show -p ExecMainStartTimestampMonotonic ubuntu-snappy.boot-ok.service
[14:17] <mvo> pitti: after getty is run or something?
[14:17] <pitti> (that gives you subsecond precision)
[14:18] <pitti> mvo: and compare that to the time stamp in rc-local.service
[14:18] <pitti> mvo: or just check the journal which one was starting/started after which
[14:18] <mvo> pitti: yeah, thats helpful
[14:18] <pitti> mvo: After=multi-user.target is fairly late
[14:19] <mvo> pitti: I think thats the culprit, our book-ok script runs before rc.local
[14:19] <mvo> pitti: cool, let me try this
[14:19] <pitti> mvo: I've heard of several people wanting their unit to be the "very last", they can't *all* be that :)
[14:19] <mvo> pitti: ahah, if its late enough thats ok
[14:19] <pitti> mvo: but most stuff runs < multi-user.target, at that point you can definitively call the boot a "success"
[14:19] <mvo> pitti: I just want to be sure that it made it to the prompt
[14:19] <mvo> pitti: thanks (as always!) for you great and prompt help :)
[14:19] <pitti> mvo: soif that's the intention ("is my boot okay?), then After=multi-user.target sounds about right
[14:20] <mvo> great
[14:20]  * mvo will add it
[14:20]  * pitti hugs mvo
[14:20]  * mvo hugs pitti
[14:20] <mvo> and one more bug down
[14:20] <mvo> .)
[14:20] <pitti> mvo: FTR, I saw LP #1457491, still in my queue; sorry for the delay
[14:21] <mvo> pitti: aha, yeah, thats another one where I would prefer if it could go to auto-reboot if a certain kernel cmdline is set
[14:21] <mvo> pitti: i.e. I guess I just need something like a custom preexec script or something
[14:21] <pitti> mvo: probably just OnFailure=reboot.target
[14:22] <pitti> (or something such; I haven't checked the details yet)
[14:22] <mvo> aha, cool
[14:22] <mvo> thats pretty amazing if its that simple
[14:22] <pitti> and I'm not very familiar with the OnFailure= bit yet, need to test this
[14:22]  * pitti tries hard to catch up with mail/bug/IRC queue
[14:23] <mvo> pitti: no worries, not urgent really :) I can dig with the new OnFailure info a bit more myself
[14:41] <ogra_> ppisati, gigantic :P
[16:38] <elopio> mvo: I don't get why snappy-from-branch is not working for your branch. When I pring $(which snappy) it shows /tmp/adt-run.wnFI56/tree/_integration-tests/bin/snappy
[16:44] <elopio> ah, sudo which snappy prints /usr/bin/snappy
[17:50] <mvo> elopio: ohhh, of course, thanks!
[17:51] <mvo> elopio: I fix tomorrow then, have you commented in the mp already? if not, please do so that I don't forget about it agian :)
[17:51] <elopio> mvo: I can't preserve the user path. An alias doesn't work, because ExecCommand adds the full path to the binary. And go doesn't seem to like passing PATH=$PATH in the command args.
[17:57] <sergiusens> elopio: tell sudo not to wipe the env
[17:58] <elopio> sergiusens: -E doesn't work. -i doesn't work.
[18:04] <rickspencer3> I seem to recall that there was some kind of cli command that I could issue that would let systemd tell me what messages my app wrote out
[18:05] <rickspencer3> does anyone remember what I mean?
[18:22] <elopio> sergiusens: https://code.launchpad.net/~elopio/snappy/sudo_path/+merge/269252
[18:22] <elopio> that's the only way I could make it work.
[18:29] <rickspencer3> jdstrand, if I am seeing this:
[18:29] <rickspencer3> Aug 26 18:26:45 localhost kernel: [   74.556368] audit: type=1400 audit(1440613605.338:11): apparmor="DENIED" operation="capable" profile="bus-and-bike-sensor.sideload_bus-and-bike-sensor_0.1" pid=1561 comm="bus-and-bike-se" capability=12  capname="net_admin"
[18:29] <rickspencer3> can I just add net_admin to my caps or something?
[18:29] <jdstrand> this is that bug from before
[18:29] <rickspencer3> this is being hit when I write Go code that accesses an https resource
[18:29]  * jdstrand finds it
[18:30] <jdstrand> https://bugs.launchpad.net/snappy/+bug/1465724
[18:30] <rickspencer3> jdstrand, so, this seems like a common thing to do, no?
[18:31] <rickspencer3> use Go to access an https resource?
[18:31]  * rickspencer3 thought this was fixed a while ago
[18:31] <jdstrand> yes, but the denial should be harmless. is it keeping your app from running?
[18:31] <jdstrand> we reviewed it and it is just an out of order check in the kernel
[18:32] <jjohansen> jdstrand: no cap net_admin should not be handed out like candy
[18:32] <rickspencer3> jdstrand, yes, it keeps my app from running
[18:32] <jjohansen> it allows modifying routing tables, interface config, masquerading
[18:32] <rickspencer3> so far as I can tell, anyway
[18:32] <jdstrand> jjohansen: no one is proposing that
[18:33] <jjohansen> jdstrand: give it out to every go app is handing it out like candy
[18:33] <jdstrand> jjohansen: no one is proposing doing that :)
[18:33] <jdstrand> jjohansen: it is a kernel bug
[18:33] <jdstrand> jjohansen: see https://bugs.launchpad.net/snappy/+bug/1465724/comments/9
[18:34] <rickspencer3> jdstrand, maybe it isn't keeping my app from running, hard to say
[18:34] <jdstrand> rickspencer3: ok, for now you have to modify the profile to add 'capability net_admin,' to unblock you. the bug was deprioritized because we thought it was a harmless denial. we'll up the priority
[18:34] <elopio> rickspencer3: fwiw, we have this card: https://trello.com/c/V5pmALwm/197-document-the-files-and-logs-that-help-to-diagnose-problems-in-a-snap
[18:35] <rickspencer3> jdstrand, I just add that to the end of the app armor profile?
[18:35] <rickspencer3> I can try it, and see if it fixes my app
[18:35] <jdstrand> rickspencer3: ah, well, if you add that rule and it starts working, then it likely is the cause, but if it still doesn't work, then it probably isn't
[18:35] <jdstrand> rickspencer3: yes, before the trailing '}', like before
[18:36] <sergiusens> elopio: here you go: https://code.launchpad.net/~sergiusens/snapcraft/validation/+merge/269120
[18:36] <sergiusens> elopio: I'll trade ;-)
[18:37] <rickspencer3> elopio, right, so I am printing debug information from my code, but I forget how to read it
[18:37] <rickspencer3> I recall there is some trick to telling journalctl how to look at your debug output
[18:37] <elopio> sergiusens: wait on mine, because it stopped working :/
[18:38] <elopio> sergiusens: and you probably owe me like 400 lines. This is not fair trade ;)
[18:38] <jdstrand> sudo journalctl --unit <name of file in /etc/systemd/system>
[18:39] <rickspencer3> jdstrand, for what it is worth, adding the cap didn't fix my app ;)
[18:41] <tyhicks> rickspencer3: that's good to know - I was fairly sure that the AppArmor denial wouldn't affect go apps but I wasn't 100% sure
[18:41] <rickspencer3> right
[18:42] <jdstrand> rickspencer3: ok, thank you for the feedback
[18:42] <sergiusens> elopio: it's mostly tests ;-)
[18:42] <elopio> sergiusens: ready now. I forgot to make it writable.
[18:42] <jdstrand> tyhicks: we might want to reconsider the current priority of that bug because it is confusing to the developer
[18:43] <tyhicks> jdstrand: I agree that it is confusing
[18:54] <elopio> sergiusens: tests are also code!
[18:54] <elopio> If you prick them, do they not bleed?
[18:56] <sergiusens> elopio: not in production ;-)
[18:56] <sergiusens> :-P
[19:27] <elopio> sergiusens: I don't understand why you have to quote the version.
[19:32] <sergiusens> elopio: because if not, it is not a string according to the yaml spec
[19:33] <sergiusens> elopio: and python assigns an int to it for things like '1', '2'
[19:33] <elopio> sergiusens: but isn't the vendor a string? And it has no quotes.
[19:33] <sergiusens> elopio: if it can detect it is a string, it will be a string
[19:33] <sergiusens> elopio: there are no letters in 1
[19:34] <elopio> I find it confusing. Can't we overwrite the parsing to make the version always a string?
[19:34] <sergiusens> elopio: notice that if it were 1.1 it would also be an int, but maybe 1.1.1 would be a string
[19:34] <elopio> yeah, I understand now.
[19:34] <sergiusens> elopio: maybe, I need to look into the engine a bit more
[19:35] <elopio> but I wonder if this is a common practice in yamls. Or just something that's forced on us because of python being too smart.
[19:35] <sergiusens> elopio: well I know how to fix this in go :-)
[19:36] <sergiusens> elopio: I bet there is a way in python and I have it somewhere to check; in any case, version is deprecated
[19:43] <elopio> sergiusens: we are not going to have versions?
[19:48] <elopio> that's enough for my back this morning, I'll have lunch and take a break. bbl.
[20:41] <sergiusens> elopio: is python 3.4 available for trusty?
[20:42] <sergiusens> elopio: and yeah, versions are meaningless, at least manual ones; just look at all our packages ;-)