/srv/irclogs.ubuntu.com/2015/10/04/#snappy.txt

hadeskaim trying to add a physical network interface to a lxd container on ubuntu core but it doesnt seem to work , anyone could help ?00:35
=== chihchun_afk is now known as chihchun
=== shuduo_ is now known as shuduo
shuduoanyone has run Victor Palau's glowapi on RPi2? I always got 404 error with the REST api link (replaced with real IP).11:04
yashi_Chipaca: thank you for merging my change13:29
yashi_Chipaca: however, merge seems to be done only for python3.13:29
yashi_Chipaca: http://bazaar.launchpad.net/~yashi/snapcraft/snapcraft/revision/210 has both 2 and 3, though.13:30
Chipacayashi_: i merged sergio's branch, which was a branch of yours13:30
DexterFhi13:30
Chipacayashi_: not sure if that answers it13:30
ChipacaDexterF: hi13:30
Chipacashuduo: i haven't, but, what rest api link?13:31
DexterFI'd like to run the snappy kernel on Ubuntu Mate for Raspi2. My idea was get the snappy kernel source and just dpkg-buildpackage it, but I cannot find the src. help?13:32
ChipacaDexterF: there aren't snappy kernels13:32
ChipacaDexterF: just kernels13:33
ChipacaDexterF: that are used by snappy13:33
DexterFhttps://developer.ubuntu.com/en/snappy/ <- what would you call the kernel that the pi2 image here contains?13:35
DexterFor rather this one http://people.canonical.com/~platform/snappy/raspberrypi2/ubuntu-15.04-snappy-armhf-rpi2.img.xz13:36
DexterFeither way, the kernel that that image boots, I'd like to port that to ubuntu-mate/pi2. pointers appreciated.13:37
ChipacaDexterF: i presume ubuntu-mate/pi2 is ubuntu?13:37
* Chipaca downloads ogra_'s rpi2 image to take a look13:39
DexterFno, it's slackware with a ported GNU/Herd kernel running on a Sun.13:39
DexterFthat's why it is called ubuntu-something13:39
ChipacaDexterF: in that case, the kernel it uses is an ubuntu package, from an ubuntu archive13:40
DexterFChipaca: I had a look at the ubuntu git tree but could not find it.13:41
ChipacaDexterF: couldn't find what?13:41
Chipacathe kernel used in ubuntu-mate/rpi2, or the kernel used in snappy ubuntu core for rpi2?13:41
DexterFthe ubuntu package for that kernel.13:42
Chipacathe kernel used in ubuntu-mate/rpi2, or the kernel used in snappy ubuntu core for rpi2?13:42
DexterFthe one used in snappy13:42
DexterFor snappy ubuntu core if you prefer13:42
ChipacaDexterF: did you find the other one, then?13:43
DexterFChipaca: is the plain linux-source package that comes with the distro, so yes. but that's a 3.18 kernel so making a config from that is a bit tedious, plus I don't know if I could just like that port it to a vanilla 4.2 src13:44
ChipacaDexterF: can you point me at where that package comes from?13:45
ChipacaDexterF: apt-get --print-uri would probably help13:45
DexterFapt-get install linux-source. wherever it gets those.13:45
DexterFsec13:45
DexterFE: Command line option --print-uri is not understood13:46
Chipaca--print-uris13:46
DexterFneither13:46
Chipacatab is your friend13:46
DexterFapt-get --print-uris linux-source13:47
DexterFE: Command line option --print-uris is not understood13:47
Chipacaapt-get install --print-uris linux-source13:47
DexterFlinux-source is already the newest version. :) I try and force, sec13:48
Chipaca--reinstall13:48
DexterFdid that, does not become any more verbose either. I'll uninstall, if that don't help...13:49
DexterFill wireshark...13:49
DexterFno, not even now. let me check sources..13:51
Chipacahold on13:51
Chipacawhat are you doing, exactly13:51
DexterFtrying to get apt to tell me where it gets the linux-source package, since you asked for that13:51
ChipacaDexterF: show me the command you are entering13:52
DexterFapt-get install --print-uris linux-source13:52
DexterFafter purging the package13:52
Chipacaand what is the output? pastebin it please13:53
DexterFhttp://pastebin.com/ThshALLL13:54
Chipacathis is what you *should* be getting:13:57
Chipacaapt-get -qq install --print-uris  --reinstall linux-source13:57
Chipaca'http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-source-4.2.0_4.2.0-12.14_all.deb' linux-source-4.2.0_4.2.0-12.14_all.deb 107776972 MD5Sum:fa90f64d3f1132715605b64e146ff99213:57
Chipaca'http://archive.ubuntu.com/ubuntu/pool/main/l/linux-meta/linux-source_4.2.0.12.12_all.deb' linux-source_4.2.0.12.12_all.deb 2184 MD5Sum:68331205b67b02230581fe26a54ffd5213:57
Chipacano purging necessary13:57
Chipacathis is for an amd64 box, but it shouldn't make a difference13:57
Chipacacan you, in fact, install that package?13:57
DexterFChipaca: the package installs fine13:58
Chipacastrange13:58
ChipacaDexterF: the reason i'm asking is because until very recently we didn't have an ubuntu kernel that worked properly on the raspberry pi 214:01
ChipacaDexterF: so I don't know where ubuntu-mate/rpi2 is getting its kernel14:01
ChipacaDexterF: but it's not an ubuntu kernel14:01
DexterFChipaca: who is "we"?14:01
ChipacaDexterF: humanity14:02
DexterF...14:02
ChipacaDexterF: so that's probably a linux kernel from e.g. raspbian14:02
DexterFI'll ask them. what you say is a bit strange, though, a gernem IT newspage (still one of the better ones) announced that snappy ubuntu core now has a spanking new 4.2 kernel with full raspi2 support. hence my question who "we" was, assuming you are a snappy developer14:05
ChipacaI am14:06
Chipacaogra_ will know more about the kernel without having to dig -- sorry i wasn't able to help you dig further14:07
Chipacahowever he is off today14:07
ChipacaDexterF: i don't see why you say it's strange14:08
ChipacaDexterF: what I'm saying is completely compatible with what you say that newspage says14:09
DexterFChipaca: maybe I get somethign wrong here: for a moment assume I know linux for a bit and then tell me, what is snappy and what is ubuntu core?14:11
ChipacaDexterF: ubuntu core is a minimal ubuntu flavour, aimed mostly at people building appliances or single-purpose servers14:12
Chipacamore or less :)14:12
DexterFok. and snappy?14:12
ChipacaDexterF: snappy is a new way of packaging a distribution that uses transactional updates on a mostly readonly system14:12
DexterFtransactional mainly means: there are rather images than packages that get mounted over an existing tree?14:13
ChipacaDexterF: evolved from the tech we (ubuntu) developed for the phone14:13
ChipacaDexterF: transactional meaning the system updates as a whole, or fails to update as a whole14:13
DexterFmmmmmhnope, don't get it14:13
ChipacaDexterF: what don't you get?14:15
DexterFthe "updates or fials as a whole" thing.14:16
DexterFat tech level, how are snappy... "packages" different from say deb packages14:17
Chipacaah14:17
ChipacaDexterF: snaps have a much simplified dependency structure; no libaries, no conflicts, just a dependency on frameworks can be expressed. Snaps are not extracted into a common directory, but into their own little place, and when the services and binaries in them are run, they do so in their own little jail14:22
DexterFChipaca: how is that different from Docker or LXC?14:22
ChipacaDexterF: how is that the same?14:22
DexterFwell, put everything required to run the package in a sandbox that does not depend on much14:23
ChipacaDexterF: aren't those entire systems? don't you actually boot those?14:25
DexterFbut anyway, maybe I'm not doing this right: all I need is a minimalistic distro that brings me the comfort of central package management like apt, zypper, yum or whatever and a kernel running on a raspi2 including i2c and all, which would be 4.2 and higher.14:26
DexterFChipaca: uh, no, those are container concepts, these run against the same kernel as the host system14:27
ChipacaDexterF: but you boot the container14:27
ChipacaDexterF: with its own init and all14:28
DexterFso maybe I should rather look at ubuntu core? but 4.2 is a must, hence that news item got my attention14:28
DexterFChipaca: good question, I actually only read up on docker and lxc but never implemented a setup14:28
ChipacaDexterF: https://lists.ubuntu.com/archives/snappy-devel/2015-September/001058.html14:31
ChipacaDexterF: that answers several of your questions, i think14:32
Chipacaincluding the name of the source of the kernel package14:32
giminnihello I have a problem to execute "docker exec -ti <progname> bash the message output is "type=1400 audit(1443969471.682:30): apparmor="DENIED" operation="open" profile="docker_docker-daemon_1.6.2.003" name="/" pid=<pid-#> comm="docker.x86_64" requested_mask="r" denied_mask="r" fsuid=0 ouid=0  How can I exec into a running container? even docker attach is hanging arount, appreciate any hints on that14:51
giminniI am running the latest snappy & updates14:52
giminni(amd64)ubuntu@localhost:~$ docker info14:53
giminniContainers: 214:53
giminniImages: 4314:53
giminniStorage Driver: aufs14:53
giminni Root Dir: /var/lib/apps/docker/1.6.2.003/aufs14:53
giminni Backing Filesystem: extfs14:53
giminni Dirs: 4714:53
giminni Dirperm1 Supported: true14:53
giminniExecution Driver: native-0.214:53
giminniKernel Version: 3.19.0-28-generic14:53
giminniOperating System: <unknown>14:53
giminniCPUs: 114:53
giminniTotal Memory: 741.1 MiB14:53
giminniName: localhost.localdomain14:53
giminniID: 7M25:QCMT:AQJM:X5HZ:PVLW:CK7A:4VYA:7CIP:GLOK:HXA7:UGV5:L2EI14:53
giminniWARNING: No swap limit support14:53
giminni(amd64)ubuntu@localhost:~$ docker version14:53
giminniClient version: 1.6.214:53
giminniClient API version: 1.1814:53
giminniGo version (client): go1.4.214:53
giminniGit commit (client): 8f2d6e514:53
giminniOS/Arch (client): linux/amd6414:53
giminniServer version: 1.6.214:53
giminniServer API version: 1.1814:53
giminniGo version (server): go1.4.214:53
giminniGit commit (server): 8f2d6e514:53
Chipacagiminni: suggest you ask again tomorrow; most people are off today15:23
giminnithx I'll do that tomorrow16:01
shuduoChipaca, http://victorpalau.net/2015/10/02/piglow-api-one-small-snap-for-humanity/16:14
Chipacashuduo: has the service started successfully?16:15
Chipacashuduo: "snappy service status" should tell you16:15
shuduoChipaca, i can see glowapi status is "enabled; loaded; active (running)"16:22
Chipacashuduo: ok. And can you connect to port 8000 from the board itself?16:23
Chipacae.g. by doing "telnet localhost 8000"16:24
shuduoChipaca, there is no telnet in snappy image. should i install it?16:25
Chipacaah, that's true16:25
Chipacanetcat (nc)16:25
Chipacashuduo: i mean: nc localhost 800016:27
shuduoChipaca, yes, it stuck now and no output16:27
Chipacashuduo: write "GET /" and hit enter twice16:27
shuduoChipaca, it outputs "HTTP/1.1 400 Bad Request"16:28
shuduoChipaca, btw, i just hit once then it exit with above output16:28
Chipacashuduo: so, piglow is listening to port 800016:28
Chipacashuduo: and if you use your external address instead of localhost?16:29
shuduoChipaca, yes, i just tried again and it returns "404 page not found"16:30
Chipacashuduo: where did you try that from?16:31
Chipacabecause 404 is not 40016:31
Chipacait's a different response16:31
Chipacaand it shouldn't be16:31
shuduoi paste victor's link to my browser and replace localhost with its real ip address16:31
Chipacashuduo: ok, backpedal a bit16:33
Chipacashuduo: first, none of those urls are browser-friendly16:33
Chipacashuduo: because they all need to be POST16:33
Chipacaand if you're just writing the url in your browser it won't work16:34
Chipacagive me a bit16:35
Chipacashuduo: are you ssh'ing in to the board, or are you typing at it manually?16:36
shuduoChipaca, i tried to copy an example code of using nc to send POST to localhost but it returns 400 error. i guess my command is not correct.16:36
shuduoChipaca, i'm sshing16:36
Chipacashuduo: try this: python3 -c 'from urllib.request import urlopen; print(urlopen("http://localhost:8000/v1/on", data=b""))'16:37
shuduoChipaca, cool. it works now. piglow be turned on for 1 sec. thanks16:38
Chipacaah, missing a .read() there16:38
Chipacashuduo: try this: python3 -c 'from urllib.request import urlopen; print(urlopen("http://localhost:8000/v1/on", data=b"").read())'16:38
Chipacashuduo: now, that's still localhost16:38
Chipacashuduo: try it remotely, does that work now? (change "localhost" to the right ip)16:39
shuduoChipaca, with read(), it looks same. led turned on for 1 sec and exit.16:39
Chipacathat's ok. It's just that if the piglow returned anything, without the read() you wouldn't see it16:39
Chipacashuduo: try it remotely; if that works, you're set, but i suspect there's something else going on as well16:40
shuduoChipaca, yes, remote accessing works good too.16:40
Chipacaah, neat16:40
Chipacai wonder why the browser was saying 404 instead of 40016:40
Chipacaanyway, never mind, it works \o/16:40
Chipacashuduo: if you want to make it work with a browser, you need to write some html16:41
Chipacashuduo: and probably some javascript in the html unless you just want to hit one endpoint :)16:41
Chipacae.g. <form action="http://the.ip:8000/v1/on"><input type=submit value=on></form>16:43
shuduoChipaca, got it. i see someone can control piglow by an app from ubuntu phone on a video.16:43
=== shuduo is now known as shuduo-afk
=== chihchun_afk is now known as chihchun
=== Tristit1a is now known as Tristitia
=== popey_ is now known as popey

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