/srv/irclogs.ubuntu.com/2015/05/21/#snappy.txt

tgm4883So if I'm suppose to put binaries inside this snappy package, does that mean I need multiple packages to be able to support multiple arches?02:27
=== erkules_ is now known as erkules
davidcalleGood morning07:25
ogra_tgm4883, you can put all arches into one (in subdirs) at the cost of size ... and have a wrapper script select the right binaries07:48
willcookeThinking out loud here; on Desktop with Snappy, once all the apps are moved out of the image and in to Snaps, lets assume that there is a security update required in a particular "thing" in the image.08:26
ogra_you will get an image upgrade08:26
willcookeAt the moment we can update individual libraries, within reason08:26
willcookeand so we could be pushing out an update a week on U7/.deb08:27
willcookeand that might be a few hundred K08:27
willcookeIn the Snappy world, does this mean we would push out a whole new image?08:27
ogra_on snappy it will be less08:27
willcookeAnd if so, it's likely to be large08:27
ogra_since we provide deltas ...08:27
willcookeahh, nice08:27
willcookeyes08:27
willcookedeltas FTW08:27
willcookethanks ogra_08:28
ogra_so you only recieve the changes, not a full new package08:28
ogra_they will be bundled in an image upgarde though, that is indeed right08:28
willcookebut that upgrade could be tiny08:28
ogra_it is likely big because we'll collect a bunch of issues in an upgrade ... but the single fix is smaller overall08:29
ogra_(and for security issues there might be hotfix images with only that one change perhaps)08:29
willcookeSo are you saying it would be upgraded less frequently?08:29
ogra_on the phone we currently manage 4-6 week cycles08:29
willcookeoki08:30
willcookethat's impressive :)08:30
ogra_but that is with all QA resources used already08:30
ogra_i suspect we need to get better here as we spread the spectrum of images08:30
willcooke+108:31
* willcooke speaks to QA08:31
willcookeseb128, fyi (but I expect you already knew all this) ^^08:31
* willcooke -> meeting08:31
willcookecheers ogra_08:31
willcookealways a pleasure08:31
ogra_:)08:31
seb128willcooke, yeah, but thanks for the ping anyway ;-)08:32
JamesTaitGood morning all; happy I Need A Patch For That Day! 😃08:33
Chipacamvo: you around?09:49
Chipacamvo: ullo?10:19
mvoChipaca: hey10:19
Chipacamvo: hiya10:19
Chipacamvo: was looking at https://code.launchpad.net/~mvo/snappy/selftest-docker-robustness/+merge/259734 and wondering why you don't use systemctl's pattern instead of passing it through grep?10:19
mvoChipaca: I don't know, I guess using systemctl makes way more sense :)10:20
Chipacamvo: it's a glob, not a regex, but other than that10:20
mvoChipaca: cool, I will update, thanks a bunch10:21
Chipacamvo: on the other hand10:21
Chipacamvo: systemctl does not fail on no matches10:21
Chipacamvo: so you either still need to grep (in which case, meh), or do something like10:22
Chipacasystemctl show whatever*.service --property 'Id'10:22
Chipacaand check for empty string10:22
Chipacamvo: and at this point i think i'm bikeshedding :)10:22
Chipacamvo: sorry. will +1 as is.10:23
Chipacathere10:24
mvoChipaca: :)10:24
mvoChipaca: all good, thank you very much10:24
Chipacamvo: sergiusens: did you guys see my email wrt tmpreaper?10:25
mvoChipaca: yes, I think its a good idea I need to reply properly10:27
Chipacaah, ok10:27
mvoChipaca: had a bit of a single-minded-hacking morning with the upgrade tests10:27
Chipacai'm not impatient about the response, it's that i so rarely shoot off emails like that i wondered if it was still an effective means of communication :)10:27
sergiusensChipaca: it is effective at getting to people, not sure about getting back a proper response :P10:37
Chipaca:)10:41
asacanyone understands the "Can we make renames work?11:21
asac"11:21
asacthread?11:21
asacis that an issue at all for snappy?11:21
asacor just phone?11:22
asacmvo: ?11:22
ogra_asac, it is an issue with processes trying to create a backup file or some such when you have no writable dir (but only made the file writable via a bind mount)11:23
ogra_i suppose it affects snappy too if bind mounts are used for wriability11:24
ogra_*writability11:24
mvowell, we generally know what wants to write11:25
ogra_well, for creating a new file we have no concepts with the bind mounts11:25
ogra_imagine my daemon creates /etc/foo.conf-bak every time it writes to /etc/foo ... if /etc/foo.conf-bak doesnt exist as a bind mounted empty file and /etc isnt writable the daemon will fail to make the backup file11:27
* Laney was summoned11:27
ogra_so you either need to know in advance how that backup file (or worse, temp file) is called and have an existing bind mount ... or /etc is writable11:28
Laneyrenaming a mount point doesn't work11:28
ogra_right11:28
Laneythat's why we have to have the directory11:28
ChipacaI think xnox'es “conig-less” efforts line up with this quite nicely, me11:28
ogra_the directory Laney refers to is /etc/writable ...11:28
Chipacaconfig-less*11:28
ogra_so the hack we currently use is to put /etc files into that dir and add an additional bind mount on top11:29
Laneykind of, but you still want to have atomic renaming work11:29
ogra_that way the process finds a writable dir to do its atomic changes and temp file creation etc11:29
sergiusensogra_: mvo asac it shouldn't affect snappy core, we have mostly nothing in there11:31
ogra_asac, effectively it boils down to "we should use overlayfs, but if we cant it would be nice to find something more elegant than bind mounts to allow atomic writes"11:31
ogra_sergiusens, my mount command disagrees11:31
ogra_(and my fstab too)11:31
sergiusensogra_: your daemon can't create /etc/foo.conf-bak though, that would never be accepted11:32
ogra_heh, someone tries IRC on his phone :)11:32
mvowell, I think the end goal is what pitti wrote, move stuff out of etc. and like sergiusens said, not a biggie for us on core yet11:32
ogra_sergiusens, it can ... if we use the /etc/writable hack11:32
ogra_that is why we have it :)11:33
ogra_(amd64)ubuntu@localhost:~$ ls /etc/writable/11:33
ogra_hostname  localtime  timezone11:33
ogra_and we even use it on snappy11:33
sergiusensogra_: I don't like /etc/writable though11:35
ogra_sergiusens, nobody does, that is what the discussion is about :)11:36
sergiusensogra_: I thought it was more general though, random libraries wanting to do things on read only locations11:37
ogra_i'd keep /etc writable and put an apparmor profile on top making everything readonly with a whitelist of exceptions ... done11:37
sergiusensogra_: the problem of making global locations writable is that you would need to maintain compat, we also need to be able to rollback (for the a/b model)11:38
ogra_sergiusens, it surely is a wider thing long term ... currently the only big wart we have is /etc/writable ... in the future we would probably end up with /usr/lib/writable, /var/writable and so on11:38
ogra_before we have to do the latter we should have found a better mechanism ;)11:38
asacLaney: thanks. i was confused what this rename thing means for snappy11:41
asacbut i think others understand it so i will have them explain it to my small brain :)11:41
Laneyoh yes I think it's a well known problem11:42
Laneyjust came up once again so I thought we better think about it systematically :)11:42
=== rickspencer3_ is now known as rickspencer3
jgdxquestion, why the xz format for snappy images?12:58
ogra_size12:59
mvojgdx: my guess is best compression ratio, do you see a issue with that or are you just curious?12:59
ogra_(it comes originally from the size limitation the /cache partition puts upon us on phones)13:00
jgdxmvo, just curious, but a friend of a friend has an issue with image downloads not being consistent in format13:00
jgdxdevice tarballs, ubuntu desktop isos, snappy xz :p13:00
mvoheh :) fair point13:03
sergiusensjgdx: well snappy is a deb though ;-)13:08
seb128sergiusens, mvo, hey, is there any documentation somewhere on installing snappy on a amd64 laptop config (if that's even possible, or if it's not is anyone working on that)?13:09
mvoseb128: you can just dd the image to a usb stick or hdd and boot from that13:12
sergiusensseb128: we have nothing yet that can lay it out on your internal disk in an easy way and no docs specifically mentioning laptops but running from a usb drive is possible13:12
seb128mvo, does that support secure boot/uefi?13:12
sergiusensit should support uefi (the published images don't yet)13:13
seb128my test laptop doesn't boot from unsigned device I think13:13
mvoaha, nice, so u-d-f images can now do uefi? thats cool13:13
seb128I once tried to boot a i386 desktop iso and the system was not even seeing the key as a boot device13:13
seb128sergiusens, so I need to use an "unpublished image"? where do I find those?13:14
sergiusensmvo: yes, slangasek added support for uefi to u-d-f13:14
sergiusensseb128: you need to create one13:14
elopiogood morning.13:15
seb128sergiusens, any documentation on how to do that? ;-)13:15
elopiomvo: want to talk about the tests now? Should we just chat here?13:15
ogra_sergiusens, i think there is currently a bug with UEFI ... i saw slangasek and tbr discuss it recently13:15
sergiusensoh13:16
ogra_bug 142537013:16
ubottubug 1425370 in goget-ubuntu-touch (Ubuntu) ""ubuntu-device-flash core" images can't boot with UEFI" [Undecided,Fix released] https://launchpad.net/bugs/142537013:16
sergiusensseb128: in theory just running 'u-d-f core 15.04 --output amd64.img' should do the trick13:16
seb128sergiusens, thanks (let's see if practice matches theory ;-)13:16
sergiusensseb128: there is documentation but I don't recall where it is, but the bug ogra_ mentions might impact you13:17
seb128ogra_, that's fix released13:17
mvoelopio: yes please! we can use whatever medium works best for you, irc, hangouts, mumble13:17
sergiusensogra_: yeah, slangasek wrote code to fix that bug ;-)13:17
ogra_seb128, yeah, 13h ago ... i'm a little behind :P13:17
seb128ogra_, :-)13:18
ogra_sergiusens, it was re-opened after that ... but turned out to be the qemu UEFI firmware13:18
sergiusensogra_: I wonder who marked it as u-d-f fails to build (snappy changed)13:18
elopiolets just start here, because I might have to leave for a meeting. Not sure what's the schedule for the sprint today.13:18
ogra_so it was closed last night again13:18
* sergiusens needs to catch up on the snappy changes for webdm and u-d-f13:19
elopioI'll just list some things I would like to see. We should probably choose only the ones that allow us to go faster and safer.13:19
rickspencer3sergiusens, lool, I just set up my rpi2 with sergiusens's latest image, seems to be working perfectly13:19
elopiothe tests should be independent. You should be able to run them in any order, or select only one and get a good result.13:19
loolrickspencer3: cool13:20
loolsergiusens: what had you changed? you just included webdm? did you also add fixrtc?13:20
rickspencer3sadly, it does not respond to ssh ubuntu@webdb.local, but perhaps that is a user error ;)13:20
sergiusenslool: your image was created a day before release, that same day, mvo made oem package types non forkable removing the .origin from them13:21
elopiowe need a better framework for setups, assertions, and test case definition. Moving to go would solve this, of course. There are also some bash frameworks, but (...)13:21
loolsergiusens: ah yes, I have to push the renamed oem snap too13:21
sergiusenslool: webdm was built out of the latest snappy so it rejected that package completely (if the layout is wrong I call it a broken system)13:21
elopiowe need a better report of the results. subunit would be awesome, but junit or anything like that would do.13:21
elopiothe tests should define their own environment as much as possible. Asserting for regular expressions because we don't fully control the versions we are installing or the messages we are getting back is not so good.13:22
elopioand I would like the tests to be more readable, at least the ones that are end-to-end from the point of view to the user.13:24
elopiolike have every statement in the test be an action, and that would make the test look more like what you get with behaviour-dd.13:25
sergiusens@reviewlist13:26
nothalhttps://code.launchpad.net/~chipaca/ubuntu-core-launcher/unshare/+merge/258367 | Approve: 2 (14 days old)13:26
elopiofinally (for now), we need to start thinking about tests that need actions both from the host and the testbed, like making sure that you can open webdm from your PC.13:26
nothalhttps://code.launchpad.net/~sergiusens/webdm/queryPackageNames/+merge/258640 | No reviews (12 days old)13:26
nothalhttps://code.launchpad.net/~sergiusens/snappy/ubootNoUnnecessaryRewrites/+merge/259739 | Approve: 1 (less than a day old)13:26
nothalhttps://code.launchpad.net/~mvo/snappy/snappy-merge-integration-tests/+merge/259592 | Needs Information: 1, Approve: 1 (less than a day old)13:26
nothalhttps://code.launchpad.net/~mvo/snappy/snappy-fix-ftbfs-sbuild/+merge/259479 | Approve: 1 (1 day old)13:26
sergiusensrsalveti: ^13:26
sergiusensnothal: help me help you13:26
rsalvetiyeah, that's cool13:26
* Chipaca hugs nothal 13:26
* nothal hugs Chipaca 13:26
Chipacawas it @help, or was it @list?13:27
Chipaca@help13:27
nothal"list" To see the available commands ; "help cmd" for specific command help13:27
Chipaca@list13:27
nothalThe available commands are: ['bug', 'critical', 'help', 'last', 'list', 'more', 'ping', 'reviewlist', 'seen']13:27
elopiomaybe it's enough to make sure that it works in localhost, and that you can access the board's ip from outside. Or maybe we need an end-to-end test also for that.13:27
Chipaca@help critical13:27
nothalshow the crtical bugs for self.project (could be a meta project)13:27
Chipaca@critical13:27
Chipaca@seen mvo13:27
nothalChipaca: [05/21/15 13:17:29] elopio: yes please! we can use whatever medium works best for you, irc, hangouts, mumble13:27
elopiomvo: do you have any items you would like to see in the tests?13:27
Chipaca@help last13:27
nothalMuestra que fue lo Ășltimo que dijo un usuario.13:27
sergiusenslol13:28
Chipaca@last sergiusens13:28
nothalChipaca: [05/21/15 13:28:02] lol13:28
sergiusenstranslations :-)13:28
Chipacahal, dance for us13:28
Chipacanothal, dance for us13:28
Chipacaduurn13:28
Chipacanot all plugins are there :)13:28
Chipacaanyway, things like bug #1449032 work13:28
nothalBug #1449032: delay when upgrading <Snappy:Triaged> <http://launchpad.net/bugs/1449032>13:28
ubottubug 1449032 in Snappy "delay when upgrading" [High,Triaged] https://launchpad.net/bugs/144903213:28
Chipacanow now bots, no fighting13:29
elopiomvo: http://paste.ubuntu.com/11264293/ so you don't have to dig on the backlog.13:30
rsalvetimvo: do we have any sort of brain dump somewhere that describes our goal for self-tests and so on?13:30
rsalvetibut it seems you're working with elopio already, which is great13:30
rsalvetijust trying to understand the missing pieces :-)13:31
mvoelopio: thanks a lot, that helps indeed :)13:31
mvoelopio: and sorry for the delay, was just reading some exciting code from sergiusens and forgot the world around me13:31
mvorsalveti: >< thats my brain right now :P but seriously, I don't think we do have something written down, let me add that to the README and I point you it once thats done(?)13:32
elopiomvo: :) no problem. And feel free to disagree.13:32
* elopio goes to find the exciting code.13:32
mvoelopio: http://snappy.asac.ws:9001/p/snappy-better-test and I do not disagree at all13:34
sergiusensmvo: thanks for the review, will fix when i get back13:37
mvosergiusens: yeah, no worries, nice to see this branch really13:38
rsalvetimvo: yeah, nothing formal, most important now would be the stuff we don't yet have for it, so we keep track while elopio gets up to speed13:56
rsalvetibut love what you got already13:56
mvohas anyone seen "May 21 13:42:07 localhost.localdomain kernel: FAT-fs (mmcblk0p1): IO charset iso8859-1 not found  " before?14:01
mvolooks like my BBB is broken14:01
ogra_thats a vfat complaint14:01
ogra_ppisati, ^^^ do we have the right nls codepages builtin ?14:02
mvoogra_, ppisati: I created https://bugs.launchpad.net/snappy/+bug/1457491 to track this14:13
ubottuUbuntu bug 1457491 in Snappy "Upgrade from r41 to r55 on BBB failed to boot and also to failover" [Undecided,New]14:13
ogra_mvo, well, your bootloader partition seems to be unreadable now ... how would it recover from that ?14:22
ogra_(givcen the logic for the roll back is actually inside the file it cant read)14:23
mvoogra_: it did recover, i.e. it booted back into r41 after I power-cycled14:23
ogra_well, one vfat is corrupt here14:24
ogra_i thought jodh added fsck's all over the place for this in initrd14:24
mvoright, it seems like it fixed it correctly though14:24
mvoit == fsck14:24
mvoI can access /boot/uboot/snappy-system.txt and it looks valid14:25
mvoand it booted14:25
ogra_yeah, but that it cant rollback seems pretty normal to me if it cant read the file ... we perhaps need to add hardcoded logic that forces a reboot when that happens14:25
mvoelopio, rsalveti: http://snappy.asac.ws:9001/p/snappy-better-test is a draft to get some background for why and what for the selftest. I (of course) agree that its not ideal and we want to make it better14:26
mvoif that looks good I will move it into the snappy-selftest branch14:27
ppisatimvo: do you hve the modules installed?14:27
mvoppisati: I don't know, let me look. this is on snappy14:27
elopiomvo: what you wrote about running on each MP is gooood.14:28
mvoelopio: its partly done in https://code.launchpad.net/~mvo/snappy/snappy-merge-integration-tests but probably a bit clumsy, I need to wrap my head around adt harder :)14:28
mvoelopio: but yeah, I absolutely want this, we had regression before the release that the selftest would have caught if it was run more often (daily is not enough for us, we are a quick bunch :)14:29
mvoppisati: eh, I think I have not because the modules are on /boot/uboot and that is the vfat partition that it tries to mount to find the modules 
14:29
elopioI think I would split the suite in two. One for cli conformance, just making sure that the commands can be called and return a sensible message. (now I understand why the regexes are there)14:30
elopioand one that's end-to-end testing stories, or journeys, or however you want to call them.14:30
elopiomaking a note of this.14:31
elopiomvo: I saw your branch, and loved it.14:31
elopioStill trying to find some time here to focus and give it a try.14:31
mvoelopio: I like the idea of splitting this up, thats cool14:31
ppisatimvo: ???14:39
ppisatimvo: how can the kernel modules be located on the vfat partition?14:39
=== vrruiz is now known as rvr
ppisatimvo: they are in /lib/modules/$(uname -m)/kernel/...14:39
mvoppisati: meh, nervermind, I am talking nosense14:40
ogra_no, they should be in the initrd14:40
ogra_but i think this is rather filesystem corruption, the codepage complaint is just fallout14:40
mvoppisati: its availalbe on both partitions AFAICT (the nls_iso8859-1.ko module), let me dig deeper14:42
OerHeksIs there a snappy core build for this? http://www.nasa.gov/image-feature/ten-engine-electric-plane-prototype-takes-off17:18
ogra_OerHeks, just send the hardware over to me, i'll port it :)17:19
OerHeksjust asking before i buy one ogra_17:20
OerHeksBut it looks like doable17:20
ogra_it doesnt really talk about what kind of HW is inside17:21
rickspencer3is there an easy way I can ssh into two snappy images running at the same time on my laptop?18:32
rickspencer3I want to develop the client and server bits simultaneously, and test them interacting, etc...18:32
asacrickspencer3: sure18:50
rickspencer3hi asac18:50
asacrickspencer3: you start kvm?18:50
asachow?18:50
rickspencer3yes it is running18:50
rickspencer3I used the command on the web site18:50
asacright18:50
asacso18:50
rickspencer3 kvm -m 512 -redir :8090::80 -redir :8022::22 ubuntu-15.04-snappy-amd64-generic.img18:50
asacstart the second one18:50
rickspencer3I built the go web server example and snappy remoted to it18:50
asacwith -redir :8091::80 -redir :8023::2218:50
rickspencer3but I don't know how to find it18:50
asacthen they will listen on different ports18:51
rickspencer3in my browser, I mean18:51
asacso your ssh on the second one will be on 802318:51
rickspencer3ok, that's cool18:51
asacand the webser of the second one on 809118:51
asacrickspencer3: see how you map those ports to the ports in the VM :)18:51
asacto :8018:51
asacand :2218:51
asac:P18:51
asac80 is http18:51
asacand 22 ssh18:51
rickspencer3right18:51
rickspencer3but I don't understand what hte url would be18:52
asacrickspencer3: what is your current url?18:52
rickspencer3I woudl have expected that I get the ip address and then just go there18:52
rickspencer3the ip address of the instance, I mean18:52
asacohhhh18:52
asacyou want the client to call the server?18:52
asacthats trickier18:52
asaclet me check something18:53
rickspencer3asac, first, I want to call the server from a browser on my desktop so I can confirm my web server is working in teh snappy instance18:53
rickspencer3then I want to write a program in the second instance that uploads data to the web server in the first instance18:53
rickspencer3so I can write the code for the device and cloud at the same time :)18:53
asacshould still work18:54
asacon the first instance you can just then access the second instance through the IP of your host18:54
asacwith the port of the second instance18:54
rickspencer3ok, for the browser part to confirm the web server is working, I call local host at the mapped port?18:55
rickspencer3localhost:8090?18:55
asacyep[... just http://localhost:8091/18:55
asacright18:55
asacor your local ip18:55
asactry witjh your local ip too ... in case the kvm only maps to localhost18:55
asacthen you would have a problem calling from first to second instance like above18:56
rickspencer3hmmm18:57
rickspencer3asac, according to snappy list, the web server is installed, do I need to do somehting to start it running?18:57
rickspencer3I assumed snappy install started it18:57
asacit should18:58
asacwhich one did you install?18:58
asacthe go-example one?18:58
rickspencer3yes18:58
rickspencer3I just built it and installed it18:58
asacrickspencer3: that thing is not listening on :8018:58
asaclet me check18:58
rickspencer3oh fudge18:58
rickspencer3it says 808118:58
asacrickspencer3: yeah just change the kvm cli18:58
asacand it will work18:58
asacso :80 -> :808118:59
rickspencer3ok18:59
rickspencer3asac, sorry, do you mean I should just delete the -redir stanza?19:00
rickspencer3i.e. not redirect it19:00
asacrickspencer3: you need to redirect... just to a different port19:00
asaccurrently you redirecting to port 8019:00
asace.g. :8091::80 -> :8091::808119:00
rickspencer3but why redirect at all19:01
asacrickspencer3: because kvm doesnt export ports at all19:01
rickspencer3couldn't I just delete it and do localhost:8081 ?19:01
asacto your host19:01
rickspencer3ok19:01
rickspencer3good reason19:01
asacrickspencer3: you would need to setup bridge networking19:01
asacthen your kvm would get its own ip etc.19:01
asacdont ask me how :)19:01
rickspencer3so this should make localhost:8091 work if the web server is working?19:02
rickspencer3kvm -m 512 -redir :8091::8081 -redir :8022::22 ubuntu-15.04-snappy-amd64-generic.img19:02
asacrickspencer3: if the webserver listens on port 8081 then yes19:03
* asac installs19:03
asacrickspencer3: for me it listens to 808119:05
rickspencer3asac, not sure what you mean19:05
rickspencer3are you saying that it jsut works for you?19:06
asackvm -m 768 -redir :8080::8081 -redir :8022::22 snappy-amd64.img19:06
asacbrowser: http://localhost:808019:06
asac-> "Hello World"19:06
rickspencer3you installed it from the store?19:08
asacyeah19:08
asacsudo snappy install go-example-webserver19:08
asaclet me start with a fresh image :)19:08
rickspencer3ok, I built it and installed it with snappy-remote19:08
asacrickspencer3: ok lets first check that your system is sane19:09
asacrickspencer3: stop all KVMs19:09
rickspencer3done19:09
asacrickspencer3: netstat -an | grep 809019:09
asacshould give you zero hits19:09
asacsame for19:09
asacrickspencer3: netstat -an | grep 809119:09
asacthen start KVM19:10
asacand check that19:10
rickspencer3wqhoops19:10
rickspencer3rick@rick-dell-11:~/snappy-images$ netstat -an | grep 809119:10
rickspencer3unix  2      [ ]         DGRAM                    18091    /var/run/wpa_supplicant/wlan019:10
asacright19:10
asachmm19:10
asacthats fine19:10
asacthats a bad hit :)19:10
asacbut doesnt hurt19:10
rickspencer3right19:10
asacso start kvm19:10
asacthe one with 809019:10
rickspencer3ima start it with kvm -m 768 -redir :8080::8081 -redir :8022::2219:10
asacafter up check that you see  netstat -an | grep 809019:10
asachaving a LISTEN19:10
asacrickspencer3: ok then you should check that 8080 isnt used19:11
asacbefore starting19:11
asaclike above19:11
asaccould be something on it and kvm wont complain19:11
asacnetstat -an | grep 808019:11
rickspencer3shucks19:11
rickspencer3ok, I'll start with with kvm -m 768 -redir :8090::8081 -redir :8022::2219:11
asac:)19:12
asacok19:12
asaccheck that its listening after its up19:12
asacnetstat -an | grep 809019:12
rickspencer3looks right19:12
rickspencer3rick@rick-dell-11:~/Projects/snappy-examples/go-example-webserver$ netstat -an | grep 809019:12
rickspencer3tcp        0      0 0.0.0.0:8090            0.0.0.0:*               LISTEN19:12
asacgood19:13
asacnow ssh into it19:13
asaccheck that webserver is running at all :)19:13
asacor first check that its listening same way there19:13
asacjust with 808119:13
asacbut pretty sure its not running :/19:13
rickspencer3k, in19:14
rickspencer3oh, I did shh -p8022 ubuntu@localhost19:14
asacyeah thats fine19:14
asacif you started with :8022::2219:14
asacnetstat -an | grep 808119:15
asacif you are in19:15
rickspencer3nada19:15
asacyeah19:15
rickspencer3so, something went wrong somewhere between when I built it and when I snappy-remote installed it, I guess19:16
asacnot sure19:16
asacrickspencer3: ps -eaf | grep go-ex19:16
rickspencer3let me uninstall it, install ist from the store, and see what happens19:16
asacno hit?19:16
asacyeah you can try that first19:16
rickspencer3just grep ;)19:16
asaci think i know what is the problem for ou though19:17
asacbut lets finish19:17
asaci guess from store it will work19:17
rickspencer3asac, nope19:18
rickspencer3http://localhost:8080/ should work?19:18
asacrickspencer3: how did you start kvm?19:18
rickspencer3oh fudge19:19
asac:8090::8081 ? then its :8090 :)19:19
rickspencer3right, forgot19:19
rickspencer3works now19:19
asacright19:19
asacok lets check quickly if i am righht :)19:19
rickspencer3cool19:19
rickspencer3I am ready19:19
asacrickspencer3: on yhour host you ahve the go-example-... binary19:19
asacright?19:19
rickspencer3I do because I built it, yes19:19
asacright19:19
asacrun ldd go-exampl*19:20
asacon it19:20
rickspencer3I did not bother building the arm one, though19:20
asacand post19:20
asacyeah thats fine19:20
rickspencer3rick@rick-dell-11:~/Projects/snappy-examples/go-example-webserver$  ldd go-exampl*19:20
rickspencer3go-example-webserver:19:20
rickspencer3linux-vdso.so.1 =>  (0x00007ffdbd3dc000)19:20
rickspencer3libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3265651000)19:20
rickspencer3libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3265287000)19:20
rickspencer3/lib64/ld-linux-x86-64.so.2 (0x00007f326589c000)19:20
rickspencer3go-example-webserver_1.0.7_multi.snap:19:20
rickspencer3not a dynamic executable19:20
asachmm19:21
asacrickspencer3: did you put it into the magic-bin/... directory?19:21
rickspencer3nope19:21
asac # change to the x86_64 directory and build the binary...19:21
asac 1. cd magic-bin/x86_64-linux-gnu19:21
asac 2. go build ../../19:21
asacthats in README :)19:21
rickspencer3I followed the readme19:21
rickspencer3let me delete the executable and try again19:21
asacrickspencer3: check that its in that magic-bin directory19:22
rickspencer3I am going to folow the directions again19:22
rickspencer3hmm, I think I didnt quite follow the directions19:22
asacack19:23
asacmagic-bin/go-example-webserver19:23
asacmagic-bin/x86_64-linux-gnu19:23
asacmagic-bin/x86_64-linux-gnu/go-example-webserver19:23
asacthats what you need19:23
asacthe first one is a script19:23
asacthe second one is the real binary19:23
rickspencer3asac, I do snappy build in the go-example-web-server dir, right?19:23
asacthe first one is just figuring what architecture you are on and starts the right one19:23
asacrickspencer3: yeah... thats step 3 in the README19:23
rickspencer3oh19:23
asaclast step is at top level dir19:23
rickspencer3let me rebranch and start from scratch :)19:24
asacrickspencer3: the last step is wrong i think ... cd ../.. it should be19:25
rickspencer3right19:26
rickspencer3I'm just rereading, trying to grock19:26
rickspencer3asac, I don't get what go build ../../ does19:26
rickspencer3how does that put the binary into magic-bin/x86_64-linux-gnu/go-example-webserver19:27
rickspencer3?19:27
asacit puts the binary in the current directory19:27
rickspencer3oh19:27
asacand it uses the name of the directory of the main.go file19:27
asacits kind of magic :)19:27
rickspencer3so it's just a feature of go build19:27
asacbut its also very basic19:28
asacyeah19:28
asaci think so :)19:28
rickspencer3ok, let me try snappy-remote again19:28
asacfor anything more complex you would do it different19:28
asacwe need to makea  goo dtutorial for that19:28
rickspencer3asac, this should work?19:29
rickspencer3well, there are multiple new concepts that I need to learn19:29
rickspencer3some are well known to linux engineers19:29
rickspencer3some are go19:29
rickspencer3and a few are snappy19:29
rickspencer3:)19:29
rickspencer3asac, like this?19:29
rickspencer3snappy-remote --url:ubuntu@localhost:8022 go-example-webserver_1.0.7_multi.snap19:29
asacno19:29
rickspencer3d'oh, forgot a command19:30
asac--url ssh://localhost:802219:30
asactruy that19:30
asac$ snappy-remote --url=ssh://localhost:8022 install ./hello-world_1.0.5_all.snap19:30
asacis the one the main tutorial19:30
rickspencer3snappy-remote --url=ssh://localhost:8022 install go-example-webserver_1.0.7_multi.snap19:30
asachttps://developer.ubuntu.com/en/snappy/tutorials/build-snaps/19:30
rickspencer3yeah, I get it19:30
asacright19:30
asacif you are lucky it starts afterwards19:31
rickspencer3was just a bunch of cruft I built up :)19:31
asac:)19:31
rickspencer3it says it is installing19:31
asacright19:31
asacyou can be brave and just try the browser19:31
asacor first check that on the KVM you see now something listening on 808119:31
rickspencer3I'll wait until it is done19:31
asacwith the well known netstat grep from above :)19:31
rickspencer3well, I didn't take down the image19:31
asacthats fine19:31
rickspencer3I just uninstalled and then sideloaded19:31
asacright19:32
asacshould work19:32
asacbut you can check INSIDE the VM19:32
rickspencer3taking a while to install, thoguh19:32
asacif  something is listening on 808119:32
rickspencer3well, it worked before :)19:32
asachehe19:32
asacyeah19:32
asacso if you want to do a bit more sophisticaed stuff then just having a main.go (like including external go dependencies)19:33
asaci highly recommend to read https://golang.org/doc/code.html19:33
rickspencer3yeah, it's not running :,(19:34
rickspencer3I'll have to try following the instructions again, though I can't think what I did wrong19:35
asac:(((19:35
asacrickspencer3: are you on the system?19:36
rickspencer3yeah19:36
rickspencer3I checked netstat, and it's nothing is on port 808119:36
rickspencer3snappy list shows it is there, though19:36
asacrickspencer3: can you directly run:19:36
asac/apps/go-exampl*/current/magic-bin/x86*/go-example-webserver ?19:37
rickspencer3sure19:37
asacwhat happens?19:37
rickspencer3works!19:37
rickspencer3asac, hmmm, I see that there is still a dir for the store version that I installed19:38
rickspencer3even though I removed it19:38
asacthats ok19:38
asacrickspencer3: is your sideloadewd one there?19:38
asactoo?19:38
rickspencer3yes, and that is what I ran19:38
asacand what happens?19:39
rickspencer3it worked19:39
asacoha19:39
asacrickspencer3: please see what you get with sudo systemctl status go-example-webserver_webserver_1.0.7.service19:39
rickspencer3asac, while the server is running?19:39
rickspencer3this looks not promising19:40
rickspencer3  Process: 1080 ExecStart=/usr/bin/ubuntu-core-launcher go-example-webserver.sideload go-example-webserver.sideload_webserver_1.0.7 /apps/go-example-webserver.sideload/1.0.7/magic-bin/go-example-webserver (code=exited, status=1/FAILURE)19:40
rickspencer3 Main PID: 1080 (code=exited, status=1/FAILURE)19:40
rickspencer3here's the whole thing19:41
rickspencer3http://pastebin.ubuntu.com/11269852/19:41
asacrickspencer3: can you make your terminal wider? the last lines are super short19:43
rickspencer3here ya go19:44
rickspencer3http://pastebin.ubuntu.com/11269898/19:44
asacrickspencer3: please add the -l after status19:45
asacthen we get the full lines19:45
asaci tjhink19:45
rickspencer3http://pastebin.ubuntu.com/11269916/19:45
rickspencer3looks the same, but *shrug*19:45
* asac tries himself19:47
Chipaca/apps/go-example-webserver.sideload/1.0.7/magic-bin/go-example-webserver: line 47: cannot create temp file for here-document: Permission denied19:47
Chipacarickspencer3: asac ^19:47
asacyeah i see that19:48
asacwhast that?19:48
Chipacalet me look at the code19:48
asacok19:48
asaci have it19:48
Chipacais this the regular go-example-wbserver?19:48
asacmvo broke our example :(19:48
asacrickspencer3: bzr pull please19:49
rickspencer3leave it to me make every mistake, hit every bug19:49
asacand then sanppy build19:49
asacand then its done19:49
rickspencer3I really need to be in QA19:49
rickspencer3kk19:49
rickspencer3asac, do I need to snappy remove it first?19:49
rickspencer3on the target, I mean?19:49
* rickspencer3 removes to be sage19:50
rickspencer3saf19:50
rickspencer3e19:50
rickspencer3lol19:51
Chipacawhy is that here document being done at all?19:51
rickspencer3I removed it, but it is still running19:51
* rickspencer3 reboots19:51
Chipacarickspencer3: still running? it wasn't running before19:51
Chipacaor was it?19:52
rickspencer3Chipaca, it was running because asac had me start it by running hte binary directly19:52
* Chipaca might be misunderstanding the nature of the problem19:52
Chipacaahhh19:52
rickspencer3it did not start on install19:52
Chipacaright19:52
asacChipaca: look at latest commit i did in examples19:52
Chipacaasac: how "directly"?19:53
Chipacaasac: i mean, running it without confinement would not have hit that issue19:53
asacChipaca: mvo added code that tells users not to start the magic-bin script through CLI directly19:53
asacthat code just exploded19:53
asacin real case19:53
Chipacaright19:53
asacguess testing code before committing is good :)19:54
asachehe19:54
Chipacathat makes no sense though19:54
asacguess EOF isnt working that nicely with confinement19:54
Chipacaif it's directly, it's not confined, tho19:54
asacChipaca: EOF seems to create a tmp doc19:54
Chipacaif it's confined, it should have that env var19:54
rickspencer3asac, whatever you did fixed it19:55
asacyeah19:55
rickspencer3and now I have been through the dev work flow like 10 times :)19:55
asacthe code was wrong also19:55
rickspencer3and got a lesson in port forwarding19:55
rickspencer3with kvm at least19:55
asacrickspencer3: good to see the good side of this. sorry and thanks19:56
rickspencer3so, now I am too tired to figure out how to communicate from one running kvm instance to another19:56
rickspencer3will chip at it this weekend19:56
asaci can imagine19:56
* asac too19:56
asaccu around19:56
rickspencer3thanks a lot asac19:56
rickspencer3it's all good, it takes dopes like me trying this stuff out to make it bullet proof :)19:56
* asac should have tried himself earlier19:56
rickspencer3I appreciate your patience19:56
asaci guess you hopefully remember now how to use netstat :)19:57
asachehe19:57
asacChipaca: so to wrap up ... mvo commited code that wanted to prevent it from running directly, but it was buggy in that it prevented it from running in confinement19:58
asacand that hit the bail bug19:58
asacso guess we could bring it back with -n19:58
asacbut not today19:58
rickspencer3netstat ftw :)19:59
Chipacasergiusens: https://code.launchpad.net/~chipaca/webdm/m1777/+merge/25986422:28
Chipacabecause it's truly a single line22:28
Chipacaand now yes, to bed for me22:28

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