=== joc|away is now known as joc_ [08:57] kyrofa, hmm, did you see the softpedia article about your blog post ? [09:00] ..."Now, the good news we want to share with you today is that the guys over at Canonical managed to implement support for the I2C communications protocol and General-purpose input/output (GPIO) on the Raspberry Pi 2 device for Ubuntu Core. [09:00] Therefore, the Snappy Scope has now extra functionality, such as support for listing installed and stored snaps (.snap packages), as well as support for installing and uninstalling snaps."... [09:01] * ogra_ wonders why the scope needs GPIO when reading these lines ... :P [09:02] experts! [09:12] http://news.softpedia.com/news/ubuntu-core-receives-support-for-gpio-and-i2c-on-the-raspberry-pi-2-video-489854.shtml for reference btw [09:38] hey, I was using snapcraft run to test my snap [09:39] but it failed to install in a way I don't understand: [09:39] 2015/08/24 09:28:44 Signature check failed, but installing anyway as requested [09:39] no config found for this snap [09:39] the "no config found for this snap" is the last thing I get before the install command fails (snappy install on the device) [09:39] any ideas what that means? [09:46] zyga: strange, can you pastebin the whole thing from the command you use to install on? [09:47] Chipaca: yep [09:47] Chipaca: http://pastebin.ubuntu.com/12182344/ [09:48] Chipaca: it's not the full log but it's pretty boring at the top [09:48] Chipaca: I can give you the snap if you want [09:49] zyga: please [09:49] zyga: anything special in the snap, i.e. does it actually have a config handler [09:49] hey Chipaca good morning [09:49] mvo: not that I can think [09:49] I'll show you the snapcraft yaml [09:49] zyga: do you have any other *.snap other than the one you were expecting to have? [09:49] http://paste.ubuntu.com/12182360/ [09:49] ohh [09:50] * Chipaca grumbles about snapcraft doing "scp *.snap" [09:50] yes [09:50] yes [09:50] thanks [09:50] Chipaca: I fixed a lot of bugs in snapcraft but I realized this is still using *.snap there [09:50] mvo: good morning sah! [09:50] Chipaca: so is this more like an update issue? [09:50] or is it related to the new snap [09:51] zyga: I don't know. Can you put the actual generated snap somewhere? [09:51] Chipaca: yep, copying to chinstrap, to ~zyga [09:51] Chipaca: it's a private snap so please don't share it [09:51] Chipaca: ETA ~2m [09:52] zyga: ok, ta [09:57] Chipaca: done, can you get it from chinstrap? [09:57] a ver...? [09:58] zyga: yep [09:58] done [09:59] aha [09:59] zyga: it works here [09:59] Chipaca: weird [09:59] zyga: can you check whether it's installing and then trying to run config on it? [09:59] zyga: e.g., install it by hand [10:00] zyga: because what it looks like is that the install is succeeding, and then snapcraft tries to do "snappy config", which fails [10:00] but the command that is in the traceback does not support that [10:00] Chipaca: please refresh my memory, what is snappy config? [10:00] so a possibility is that there's a broken try/except that's masking the proper command [10:00] zyga: a way for snaps to be configured [10:00] zyga: but it's separate from installation [10:01] zyga: you'd run 'sudo snappy config package < configfile' and the config file would be passed to a config hook in your package [10:01] zyga: (idea is to at some point have a schema so a config interface can be created automagically) [10:02] Chipaca: I don't have any hooks myself, where are hooks specified? are they per par or on the whole snap? [10:02] zyga: i could answer that question, but i believe you are misunderstanding what i think the problem is [10:03] zyga: your snap has no config [10:03] zyga: no config hook [10:03] zyga: so running "snappy config" will fail, with exactly the error you print [10:03] zyga: "snappy install" does not run "snappy config" [10:03] zyga: so it's possible snapcraft is running config after install itself [10:04] hmm, odd, is it? [10:04] zyga: you could confirm this if you did "snappy install" yourself, manually instead of through snapcraft [10:04] Chipaca: I read the code just now, it's not doing snappy config [10:04] Chipaca: it's only doing sudo snappy install *.snap [10:05] oooooooooohhhhhh [10:05] it's the *.snap thing! [10:05] snappy [OPTIONS] install [install-OPTIONS] [package name] [config file] [10:06] Chipaca: I have a patch for that section but I did not change the meaning really [10:06] ah [10:06] heheheh [10:06] nice! [10:06] Chipaca: I'll fix that localyl [10:06] Chipaca: and send you MRs [10:06] zyga: i hope that was a plural you :) 'cause i'm not on snapcraft right now [10:06] ah [10:06] I didn't know that [10:06] I'll just send it to lp:snapcraft, I'm sure someone can be poked into reviewing and landing them [10:08] zyga: thanks :) [10:24] ogra_: how is the uboot.env stuff is looking? any issues so far? or did we finally kill the corruption issues? [10:24] * mvo is catching up on the last weeks [10:24] mvo, all fine and stable [10:24] yay! [10:24] \o/ [10:24] no issues so far [10:24] (at least i havent heard anything in that direction) [10:24] documentation updates are missing ... for the porting doc [10:26] ogra_: thanks, that sounds like (hopefully) something straightforward [10:27] kind of, yeah :) === Laney is now known as Guest65212 === ubott2 is now known as ubottu === Guest65212 is now known as Laney [11:12] * Chipaca ~> the search of the lost lunch [11:13] * ogra_ hands Chipaca a faded map with a dotted line and cross on it [11:22] Chipaca: the map is a lie, it's to pirate treasure, you'll starve before you get there and ogra_ will eat your food cause he's like that ;) [11:23] omnomnomnom [11:36] Chipaca: could you please set the prereq branch to schmideload in the service-endisable branch? so that the diff is easier to read :) [11:57] mvo, wrt bug 1479711 ... do you think we should backport it to 15.04 ? [11:57] bug 1479711 in initramfs-tools-ubuntu-core (Ubuntu) "snappy should not mount with "discard" option" [Undecided,New] https://launchpad.net/bugs/1479711 [11:57] * ogra_ just uploaded the change to wily [11:59] ogra_: probably yes [11:59] ok, i'll shelve it until i hear back from ricmm_ about the resize tests on 15.04 [12:00] (dont want to taint the testing right now) [12:09] hmm, we have 132 open bugs ... and only 33 of them are triaged at all, the rest is in undecided state [12:11] pitti, do you happen to have any hint for bug 1485683 ? smells like an ordering prob of the units or some such [12:11] bug 1485683 in Snappy "/etc/sysctl.d is not applied on boot" [Undecided,New] https://launchpad.net/bugs/1485683 [12:24] ogra_, eh? No! [12:24] heh [12:43] ogra_: replied [12:45] ogra_, haha, read the article. Thanks for the reference! Indeed, not sure how informed the author was, but it's good press anyway :) [12:47] ogra_, and they were obviously thrilled with your work! [12:48] pitti, ah, cool ... though i wonder if we should perhaps move the sysctl stuff out of systemd in this case ... we might want values to be set before mounting for example [12:48] i guess there is a reason why it usually runs early [12:48] yeah, but it make one wonder why the snap scope needs I2C to work :) [12:48] *makes [12:48] heh [12:49] ogra_, yeah, my fault for writing about both in the same article :P [12:49] yeah, two topics in the same article is to much for some :) [12:53] ogra_, haha, I'll keep that in mind [13:41] wow, searching for snapcraft gets me a ton of minecraft posts on google [13:41] the actual howto is the pre-last hit [13:43] GRRR [13:44] * ogra_ curses finger memory [13:44] ogra@anubis:~$ sudo snappy install snapcraft [13:44] Installing snapcraft [13:44] snapcraft failed to install: snappy package not found [13:44] :P === davidcalle_ is now known as davidcalle [13:57] Chipaca: do you have an opinion on bug #1484641 - does one need to implement restart logic in the snap or should that be done automatically? I am also wondering on when/if the config hook is run on installation. [13:57] Bug #1484641: snappy config command does not restart service after setting the configuration [13:57] bug 1484641 in Snappy "snappy config command does not restart service after setting the configuration" [Undecided,New] https://launchpad.net/bugs/1484641 [13:57] longsleep: the config hook is run on install if you give it a config argument [13:57] bah [13:58] snapcraft downloading is unbelivable noisy [13:58] Chipaca: config argument like snappy install mysnap --config ? [13:58] longsleep: i don't have an opinion as to whether a service should be restarted on config; wouldn't the config hook know whether it needs to do this or not? [13:58] Chipaca: yes it would, though the docs say that the systemd service is restarted [13:59] Chipaca: and that is the usual thing to do, and i think that cannot be done from the config hook can it? [13:59] longsleep: [13:59] snappy [OPTIONS] install [install-OPTIONS] [package name] [config file] [13:59] longsleep: (from snappy install --help) [14:00] interestingly, that does not appear in the manpage that's generated from the same information [14:00] silly go-flags [14:01] Chipaca: ok thats one way to do it, what about the configuration specified in the oem snap, do you know then this is applied. I mean if my oem snap provides config for a snap, does this get applied when the snap is installed later? [14:02] longsleep: i don't remember offhand, but i can look [14:02] give me a sec [14:02] cool thanks [14:03] longsleep: it looks like it's applied on first boot [14:05] Chipaca: ok, well i think that is good enough for my purpose then. Where i pre populate various snap configs. [14:06] o/ [14:06] can anyone tell me what I am doing wrong here? [14:06] (BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy update [14:06] another snappy is running, try again later [14:07] wow [14:07] * rickspencer3 braces [14:07] ogra_, I assume I did something very silly? [14:07] no idea, i have never seen that :) [14:07] rickspencer3: nothing wrong, there is probably (90% confidence) just snappy autopilot running in the background and updating you [14:08] oh [14:08] rickspencer3: its doing that automatically every couple of hours [14:08] mvo, so, I just plugged it in for the first time in weeks, I guess it triggered then? [14:08] yeah [14:08] so, I just wait? [14:08] I guess we need to improve the error message or (even nicer) "attach" to the running snappy so that you can see what its doing [14:09] I guess I will get kicked out of my ssh session when it is done and reboots? [14:09] rickspencer3: yeah, just wait and/or check /var/log/syslog, iirc it prints some progress there [14:09] try something like `ps ax|grep snappy` [14:09] mvo, would you like me to log a bug? [14:09] rickspencer3: it will inform you about the reboot and give you a chance to cancel it [14:09] rickspencer3: yeah, please do [14:11] mvo, we should make the message more clear [14:11] yep [14:13] whoohoo mvo is processing all my bugs /cheer !! [14:13] mvo, enjoy bug #1488114 [14:13] Bug #1488114: Confusing message while manually updating during an automatic update [14:13] * rickspencer3 is going to try to make an led light up with snappy :) [14:14] rickspencer3, whee, like edison !!! [14:15] mvo, oh nice, I see it gives me 10 minutes before the automatic reboot [14:18] rickspencer3: yeah and it should also tell you how to cancel it [14:19] yeah, it's all very clear and nice [14:19] great [14:23] ogra_, does this diagram mean that P8_8 is a digital write pin? https://www.safaribooksonline.com/library/view/programming-the-beaglebone/9780071832120/images/figc-1.jpg [14:24] i.e. if I want to send 5v to a breadboard, I use a jumper from one of those pins? [14:24] uh, no idea, sorry ... and that diagram doesnt really say anything [14:24] (apart from telling you where P8_8 sits) [14:24] oh weird, it made the led glow slightly! [14:25] ogra_, maybe this one is better? [14:25] http://www.element14.com/community/servlet/JiveServlet/showImage/38-17874-209857/bbb-pinout.jpg [14:25] looks like it is GPIO_67 ? [14:26] rickspencer3, yeah, looks like you should be able to switch it by using GPIO_67 [14:26] rickspencer3, http://beagleboard.org/static/images/cape-headers-digital.png [14:26] I use that [14:26] * rickspencer3 looks [14:26] well, pretty much the same [14:26] I guess it's the same, but has the nice colors to distinguish [14:27] yeah [14:27] but you get red for electrical stuff! [14:27] so, weird that it completed the circuit before I wrote any code! [14:28] I guess when the GPIO pin is unitialized, it sends it electricity ;) [14:28] now it's time to get control ;) [14:30] anyone using Snappy in OdroidC1?? [14:31] imuguruza, longsleep does [14:32] great, I just realized I have downloaded his img [14:32] longsleep: any chance of using I2C? [14:33] I have installed i2c-tools but can't open it [15:02] imuguruza: you might have to load some modules [15:02] imuguruza: i am using SPI with no problems, did not try I2C for a while [15:02] ok [15:03] I'm interested on SPI also [15:03] well for spi you just load spicc and spidev module [15:03] modprobe spicc [15:03] modprobe spidev [15:04] then you have /dev/spi.. and can use the examples from the linux kernel [15:05] imuguruza: also the snappy image kernel has the same gear as the hardkernel kernel, so anything you try on normal Ubuntu should work on Snappy as well. [15:05] ah yes [15:05] modprobe aml_i2c [15:05] should give you the i2c bus [15:06] longsleep: yes! [15:06] great, thanks! [15:07] imuguruza: you are welcome [15:24] ogra_: when you sy boottest, do you mean something like this? http://bazaar.launchpad.net/~canonical-ci-engineering/ubuntu-touch-boottest/trunk/view/head:/tests/boottest/debian/tests/boottest [15:25] elopio, well, boot a VM with a new initrd and see if it comes up at all would be my first test [15:26] then as a next step go through the initrd code and look what it does ... wherever applicable add a test to check that it did what it was supposed to do for each individual bit [15:26] ogra_: we already kind of have that. If the vm doesn't get an ip, the integration tests would fail. [15:27] well, in the specific case of the resize script you would check if after first boot there is more then 10% unpatitioned spasce on the disk your writable partition lives on [15:27] that would indicate that it failed to run [15:28] that we can easily add, sure. Let me start there. [15:28] where we can test such stuff from the normal initrd bits we should do that as well [15:29] many bits are hidden sadly ... like mounting ... since usually the last step is to move-mount the bits and pieces [15:29] so the running system wouldnt see the initial mount or if there were failures ... [15:29] such bits we cant really test [15:31] ogra_: there must be a way, but probably we will have to build it. Something that listens to the events that happen during that script, and record them. [15:31] well, that would mean you test a hacked version of the initrd [15:31] if it's too hard, it might not be worth it to automate and we can just crowd test it. [15:31] not sure how reliable we consider that [15:32] we could add more logging all over the place though ... and you could at least parse that log from /dev/initramfs/ [15:34] ogra_: as with everything we test, the idea is to catch some of the possible bugs, not all of them. Ideally the most important ones. And if we consider the impact of those bugs to be more expensive than to write the tests, then we automate the tests even if parts are faked. [15:34] ogra_: I think you could add at least one log message so we can easily check that the script ran. [15:35] if you add many more messages, that would affect the boot time, right? [15:35] nah [15:36] it would just be some echos and redirects [15:36] shouldnt impact the boot time much [15:36] if something seriously went wrong with the default script you most likely wont finish booting anyway [15:37] the log would just be a finer grained view of what the general boot process did [15:37] ogra_: ok. So for testing, we need only one log message per branch. If you don't have any ifs, it's the same to have one log at the end or many logs. [15:37] but for debugging, more logs will help. [15:37] indeed === Michaela is now known as Mikaela [15:48] elopio: ogra_: we might also be able to mock some of the core pieces of the initrd code, and test that when building the package [15:49] besides checking for logs after the system booted [15:49] but yeah, as elopio said, need to check for the complexity [15:49] and I insist that running the script standalone in an already booted system gives some value. [15:49] yep [15:49] not a lot, but it will discover some obvious problems. [15:49] righy [15:49] *right [15:50] so during the boot, we can ignore those obvious problems and test for other things. [16:21] Are there any resources/guides detailing best practice, caveats and gotchas for snappificating an existing package? I was wondering whether it would be helpful to have a cohort of "case studies" of existing packages to highlight these. Perhaps it would be useful for both package builders and snappy devs? [16:26] mcphail: Take a look at https://developer.ubuntu.com/en/snappy/snapcraft/ [16:29] longsleep: that's not quite what I meant. I'm thinking more of focusing on the thing snappy doesn't handle well/easily such as man pages, bash completion etc === sarnold_ is now known as sarnold