/srv/irclogs.ubuntu.com/2017/05/19/#snappy.txt

niemeyerForum update coming...01:16
niemeyerIt's back up01:24
=== chihchun_afk is now known as chihchun
=== JanC is now known as Guest104
=== JanC_ is now known as JanC
elfgohogra_: any idea if the i2c interface is enabled on the Raspberry Pi?05:51
zygagood morning06:13
abeatozyga, hey, regarding https://github.com/snapcore/snapd/pull/3324 , if you strongly think that the file vars should be ordered, I can do that... tbh not that I agree, but I do not want to block on that. There is another PR that I need to push on top of this one.06:49
mupPR snapd#3324: partition,snap: add support for android boot <Created by alfonsosanchezbeato> <https://github.com/snapcore/snapd/pull/3324>06:49
zygaabeato: hey07:23
abeatozyga, o/07:24
zygaabeato: it's just my preference for deterministic behavior but I can merge it right away07:24
* zyga looks07:24
abeatozyga, yes, I understand that but also I think that some times not being completely deterministic is good, so programs that read the file are not tempted to rely on deterministic content, which would be bad if, say, a new var is added07:31
abeatozyga, and if that comes at the price of a (slightly) more complex code, then it is something I would usually not do07:31
abeatozyga, but anyway, not that I mind changing it, just different POVs imo :)07:31
zygaabeato: done07:31
mupPR snapd#3324 closed: partition,snap: add support for android boot <Created by alfonsosanchezbeato> <Merged by zyga> <https://github.com/snapcore/snapd/pull/3324>07:31
abeatozyga, thanks!07:31
zygaabeato: I agree07:32
zygaabeato: so what's the next step?07:32
abeatozyga, gimme a minute and you'll see it :)07:32
mupPR snapd#3352 closed: interfaces/log-observe: allow using journalctl from hostfs for classic distro <Created by jdstrand> <Merged by zyga> <https://github.com/snapcore/snapd/pull/3352>07:33
* zyga looks at https://github.com/snapcore/snapd/pull/334907:35
mupPR snapd#3349: many: model and expose interface meta-data <Created by zyga> <https://github.com/snapcore/snapd/pull/3349>07:35
zygahmm07:37
zygaactually, not at that one07:37
zygaat https://github.com/snapcore/snapd/pull/3222/files07:37
mupPR snapd#3222: many: fix test cases to work with different DistroLibExecDir <Created by morphis> <https://github.com/snapcore/snapd/pull/3222>07:37
=== chihchun is now known as chihchun_afk
abeatozyga, hmm, I see compile errors in current master: http://paste.ubuntu.com/24603514/07:40
pedronisabeato: you need to update deps07:40
abeatopedronis, ah, thanks07:41
pedronisget-deps.sh07:41
abeatozyga, this: https://github.com/snapcore/snapd/pull/335307:46
mupPR snapd#3353: Add support for reboot parameter <Created by alfonsosanchezbeato> <https://github.com/snapcore/snapd/pull/3353>07:46
mupPR snapd#3353 opened: Add support for reboot parameter <Created by alfonsosanchezbeato> <https://github.com/snapcore/snapd/pull/3353>07:47
zygaabeato: thanks!07:54
abeatonp07:54
abeatoDoes anybody know why run-checks could be producing these errors: http://paste.ubuntu.com/24603574/ ?08:03
abeatoin a clean master checkout, I mean08:03
zygaabeato: maybe more recent shellcheck08:04
zygaChipaca: ^^08:04
zygaabeato: what kind of reboot parameters are we going to see typically?08:05
zygaabeato: I'm not too fond of the C parts, I may choose to rewrite that a little08:05
zygaChipaca: good morning :)08:06
Chipacaabeato: that's shellcheck from zesty08:06
abeatozyga, "recovery". It could be "bootloader" too. they are typical android partitions/modes08:06
elfgohDoes anyone know if the i2c interface works in Ubuntu core on the Raspberry Pi3?08:06
zygaabeato: I'd much rather see an enum to be honest08:06
zygaelfgoh: hey08:06
zygaelfgoh: I know for a fact that it may work :)08:06
Chipacaabeato: if it's blocking you i can fix08:07
zygaelfgoh: but I didn't update my snap in a while08:07
zygaelfgoh: I made a snap that used i2c to talk to some LED controller08:07
elfgohGreat. Do you have your snap on github?08:07
abeatozyga, note that the way the parameter is passed is the one used by systemd, not something I worked out08:07
zygaelfgoh: and tested it on pi2 and pi308:07
abeatoChipaca, nw, just found it surprising08:07
zygaabeato: can you document that please?08:07
zygaelfgoh: yes08:07
elfgohI would like to refer to the snapcraft.yml08:07
abeatozyga, sure08:07
zygaelfgoh: https://github.com/zyga/snappy-pi2-piglow08:07
zygaelfgoh: note that this is very old (it talks about skills, not interfaces)08:08
abeatozyga, it is coded so systemd command "reboot recovery" works as expected too08:08
zygaelfgoh: you can update it and I'll happily take pull requests08:08
elfgohOops. I have never heard about skills :o08:08
zygaelfgoh: those are "interfaces" now08:08
zygaelfgoh: just when snappy was very young :)08:09
elfgohActually, I am trying to get a humidity sensor working via i2c08:09
zygaelfgoh: do you have the datasheet for that?08:09
elfgohHang on a min08:09
elfgohBut I do know for a fact that the program works outside of a snap08:10
elfgohzyga: this is the datasheet http://www.silabs.com/documents/public/data-sheets/Si7021-A20.pdf08:10
elfgohBut one thing for sure, when we booted Ubuntu Core, i2c is in the list when running "$ snap interfaces"08:11
zygaelfgoh: nice,08:11
elfgohIs that expected?08:11
zygaelfgoh: yes, i2c is supported now08:11
zygaelfgoh: on a given device, it's not universal08:11
elfgohsorry correction. i2c isnt in the list08:12
zygaelfgoh: can you pastebin "snap interfaces" on your device?08:12
zygaelfgoh: and snap version08:12
elfgohSo i2c is supported, but not necessarily on the rpi?08:12
elfgohOk hang on08:12
zygaelfgoh: it depends on gadget08:13
zygaelfgoh: ppisati and ogra_ can fix that if needed08:13
ogra_i think we dont have tegh interface in the gadget ...08:13
zygaogra_: can we add one quickly?08:13
ogra_elfgoh, can you access i2c from the cmdline without having the app in a snap ?08:14
ogra_(i.e. install the classic env to get apt support and access it from there)08:14
elfgohzyga: this is the output of interfaces08:14
ogra_zyga, if we know the kernel has all bits we can indeed enable it quickly in edge08:15
elfgohsnap version08:15
elfgohsnap    2.26.3+201705181256.git.035e139~ubuntu16.04.108:15
elfgohsnapd   2.26.3+201705181256.git.035e139~ubuntu16.04.108:15
elfgohseries  1608:15
elfgohkernel  4.4.0-1051-raspi208:15
zygaogra_: well, that's a question for you and ppisati :)08:15
zygaogra_: but I think it does08:15
ogra_zyga, well, thats a question i was just asking elfgoh :)08:15
zygaelfgoh: ok, you are on the latest edge08:15
ogra_if the kernel provides all he needs we can just turn it on08:16
zygaogra_: we should test and enable it, it's a ref platform and the snapd part is in place08:16
ogra_zyga, yes08:16
elfgohogra: yes we can access i2c from cmdline in classical snap08:16
zygaogra_: sounds like a yes :)08:16
ogra_zyga, obviouslly elfgoh has a usecase to test :)08:16
elfgohYup most certainly!08:16
ogra_great08:17
elfgohActual hardware here08:17
elfgohWorking outside of snap, giving humidity and temperature readings08:17
Chipacaabeato: so in androidboot reboot is always equivalent to 'systemctl reboot recovery'?08:20
abeatoChipaca, correct. But unfortunately "shutdown +time recovery" does not work the same, the parameter is ignored08:21
elfgohogra_: quick question I have a colleague who created a snap that execs a command and is able to run ps command08:21
elfgohIs this expected?08:21
abeatoChipaca, systemd bug I'd say08:22
abeatoChipaca, https://github.com/systemd/systemd/blob/master/src/systemctl/systemctl.c#L826208:22
Chipacashutdown isn't documented as taking 'recovery' as an arg08:22
elfgohogra_: fwiw this colleague is using docker as a reference point08:22
abeatoChipaca, it is not "recovery", it is a generic argument that the syscall accepts08:22
Chipacashutdown isn't documented as taking any argument beyond time or 'now'08:23
abeatowell, yes, but "reboot" command takes it08:23
ogra_zyga, https://github.com/snapcore/pi3-gadget/pull/708:23
mupPR pi3-gadget#7: add i2c interfaces <Created by ogra1> <https://github.com/snapcore/pi3-gadget/pull/7>08:23
Chipacaabeato: "systemctl reboot" does08:24
Chipacaabeato: reboot on its own does as well?08:24
ogra_elfgoh, yes, but ps will only show the processes realted to the snap AFAIK08:24
zygaogra_: approved :)08:24
Chipacaabeato: anyway, my quesiton is, in androidboot, all reboots are reboots into recovery?08:24
Chipacathat seems wrong to me, which is why i ask08:24
abeatoChipaca, yep, it is just a symlink to systemctl08:24
zygaChipaca: it's the design08:24
zygaabeato: I think it should be documented there08:24
zygaabeato: it's not obvious08:24
abeatoChipaca, no, only when we are updating kernel/core08:25
zygaabeato: I only know this because I paid attention to some internal traffic08:25
Chipacaabeato: the PR you have up always does recovery reboot in androidboot08:25
Chipacain fact, it always does 'reboot recovery' no matter how you tell systemd to shut down08:25
abeatoChipaca, so maybe the code is wrong there :) How can I know when I want to reboot because of a kernel/core update? I thought that was the only case in daemon.go call08:25
Chipacaah!08:26
Chipacamight be getting confused because of that08:26
Chipacaheh08:26
abeatozyga, sure will add that to the PR08:26
abeatoChipaca, maybe I couls change the name from Reboot() to RebootAndUpdate() or something like that08:27
elfgohzyga: ogra_ woot! Thanks! when will the pi3 gadget snap be update with the merge?08:27
Chipacaabeato: or RebootForCoreUpdate or whatever08:27
elfgohogra_: let me get additional details about the implementation08:27
Chipacai'm bad at names, but yes, Reboot misguided me there08:27
ogra_elfgoh, https://code.launchpad.net/%7Ecanonical-foundations/+snap/pi3 should start building in a minute08:27
abeatoChipaca, ok, will change it :)08:27
zygaelfgoh: yes, soon08:27
elfgoh\o/08:27
morphiszyga, mvo: can we get https://github.com/snapcore/snapd/pull/3307 merged?08:28
mupPR snapd#3307: tests: abstract common dirs which differ on distributions <Created by morphis> <https://github.com/snapcore/snapd/pull/3307>08:28
morphisogra_: would the i2c slots make sense for the pi2 gadget too?08:28
ogra_morphis, as soon as i know everything works for elfgoh i'll add them there too08:29
morphisogra_: great!08:29
ogra_the dragonboard will really need that stuff too ... its rather lacking ...08:29
* zyga needs to go to the bank08:29
ogra_Chipaca, abeato yes, in androidboot all reboots should be recovery reboots ... (recovery will hold the rollback and upgrade mechanisms, all reboots shoudl go through that)08:31
ogra_abeato, i was about to ask, why you not just hardcode it :)08:31
abeatoogra_, well, if the systemd mechanism is already there, better to use it, so we additionally have "reboot bootloader" working too, for instance ;)08:32
ogra_there is no need too make a difference ... recovery serves the same purpose as the uboot shell (scripting and recovery mode)08:32
=== chihchun_afk is now known as chihchun
ogra_so any reboot should be a recovery reboot ...08:33
Chipacaogra_: hold on08:33
Chipacaogra_: there's two parts to it08:33
ogra_i wonder if we cant do that on a systemd level instead and leave out snapd completely08:33
Chipacaogra_: one is the part in snapd that triggers a reboot because of core/kernel/gadget change08:33
ogra_Chipaca, right, there is no need to make any difference here08:34
Chipacaogra_: the other is shutdown-helper, which is called unconditionally by systemd on any shutdown/reboot/halt/kexec08:34
ogra_it could be a hardcoded thinng on systemd level instead08:34
abeatoogra_, we need to modify system-shutdown command for sure08:34
Chipacaogra_: shutdown-helper cannot be hardcoded in the way you describe08:34
Chipacaogra_: but snapd can (and is)08:34
ogra_Chipaca, doesnt it just call reboot08:34
ogra_?08:34
ogra_and hand off to systemd08:35
Chipacaogra_: no, systemd execve's into it08:35
Chipacaogra_: it runs as pid 108:35
Chipacaogra_: there is no systemd08:35
ogra_ah08:35
abeatoogra_, writes "recovery" to "/run/systemd/reboot-param", then calls sysnted reboot08:35
ogra_yes, i see the code08:35
ogra_my point is ... there is no need to make a difference08:35
ogra_every reboot should go through recovery08:35
Chipacaogra_: on androidboot08:36
ogra_Chipaca, yes08:36
Chipacaogra_: but not on uboot08:36
abeatowel, I think we are better modifying snapd instead of systemd, which would mean a patch08:36
Chipacaogra_: (system-shutdown doesn't know what bootloader you're on; snapd does)08:36
ogra_Chipaca, right ... but our gadget knows that ... so it could ship a systemd config that always makes it "reboot recovery"08:36
abeatoalso, I would prefer reboot command to work in a normal way too08:37
ogra_uh08:37
ogra_but that means you will be able to reboot without the safety new08:37
ogra_*net08:37
Chipacaogra_: is it really just a systemd config?08:37
ogra_Chipaca, in my imagination it is :P i dont know ... but it should08:37
Chipaca:-)08:38
Chipacait's possible it is, but i don't know08:38
Chipaca(there is a unit for reboot)08:38
ogra_right08:38
abeatoogra_, not sure what you mean... if we are upgrading, then yes, go to recovery. But we want plain reboot or "reboot booloader" commands to work08:38
abeatofrom command line08:38
ogra_abeato, why ?08:38
ogra_and what cmdline08:38
abeatowell, for developers08:38
abeatoshell08:39
fgimenezgood morning zyga, i've just updated the revert test in snapd#3348, if you could have a look when you have some time that would be great, there are some refactors in there, the test itself is https://github.com/snapcore/snapd/pull/3348/files#diff-4825fd024a235e7895b109ad37072e6808:39
mupPR snapd#3348: tests: add core revert test <Created by fgimenez> <https://github.com/snapcore/snapd/pull/3348>08:39
ogra_the shell is the recovery env08:39
ogra_like you have a uboot chell on uboot installs or a grub shell in grub installs08:39
ogra_the only moment you boot without recovery is a cold boot08:40
abeatodisagreed, I would like to reboot to bootloader to flash a new kernel image using fastboot as a developer08:41
abeatofor instance08:41
ogra_the only moment you need the bootloader is when you flash08:41
ogra_i.e. the initial flashing08:41
ogra_abeato, if you want to manually replace the kernel you dd it from the recovery shell08:41
morphisogra_, abeato: btw do we have the full process documented somewhere?08:42
elfgohGot the edge pi3 snap. Giving it a go08:42
ogra_i donmt really want fastboot to work on production devices by default so that random people passing by could replace your image08:42
ogra_morphis, we have that forum thread08:43
morphis..08:43
morphisI mean a structured document which covers the latest agreed process08:43
morphiscould easily go on docs.ubuntu.com08:43
abeatoogra_, honestly I do not think we should ardcor reboot to recovery in systemd08:43
ogra_thats all we have atm ...08:43
abeato*hardcore08:44
abeato*hardcode08:44
ogra_abeato, well, how else do we want to make sure that every boot goes through the rollback mechanism ?08:44
ogra_we want the same behaviour as in any other snap install ...08:45
pstolowskizyga, hey, commented on the upgrade-all-dependencies PR08:45
pstolowskizyga, also, +1 on iface metadata, so it has two reviews and can land; not sure if you want Gustavo to review this change08:46
ogra_pedronis, i just refreshed my gadget snap on the pi3 ... shouldnt i get an auto-reboot ?08:46
pedronisogra_: no08:46
abeatoogra_, when there is a panic, we go to recovery, that is hard-coded in the kernel08:46
pedronisogra_: we don't reboot on gadget changes so far08:46
pedroniswe will need to do if we change assets I suppose08:47
ogra_abeato, and when we upgrade ... and when someone tinkers for development ... and ... and ...08:47
pedronisogra_: so far only core and kernel trigger restart/reboots08:47
ogra_pedronis, oh, i see ... interface changes get applied without reboot!08:47
ogra_thats sweet!08:47
pedronisif it works it is :)08:48
ogra_ogra@pi3:~$ snap interfaces|grep i2c08:48
ogra_pi3:i2c-0                 -08:48
ogra_pi3:i2c-1                 -08:48
ogra_pi3:i2c-2                 -08:48
ogra_pi3:i2c-2                 -.d08:48
ogra_oops08:48
ogra_:D08:48
elfgoh@ogra_ zyga : glad to report that the new pi3 gadget works well with i2c :D08:50
nothalelfgoh: No such command!08:50
ogra_elfgoh, \0/08:50
elfgohogra_ zyga : glad to report that the new pi3 gadget works well with i2c :D08:50
ogra_awesome08:50
* ogra_ prepares the same change for pi208:50
elfgohQuick question: my humidity snap currently needs sudo in order to get my snap reading humidity via i2c. What is the way to remedy that?08:51
abeatoogra_, you cannot forsee all cases, one of the things that was clear in the thread is that this solution would not be 100% safe until we had devices with 2 boot partitions. What about the case of somebody powering off the device after something bad happened instead of rebooting? In next boot, things would go wrong08:51
ogra_abeato, well, how would you overcome that case ?08:52
ogra_(without access to the bootloader)08:52
ogra_even two boot partitions wont help there08:52
abeatoogra_, you can't, the point is that anyway this solution is limited08:52
abeatoogra_, 2 partitions would help as you would actually boot using the old one, as you would not hae switched yet the main partition if something went wrong... but you cannot do that if there is only one08:54
ogra_zyga, https://github.com/snapcore/pi2-gadget/pull/708:54
mupPR pi2-gadget#7: add i2c interfaces <Created by ogra1> <https://github.com/snapcore/pi2-gadget/pull/7>08:54
ogra_abeato, i dont get that ... how would you switch without having support for that in the bootloader ?08:54
abeatoogra_, I understand that if you get 2 boot partitions you also get that sort of support from the bootloader, would not make much sense otherwise (maybe ondra knows about this?)08:55
ogra_well, if the bootloader is designed for such a setup08:56
* ogra_ hasnt seen that before ... 08:56
ogra_typically you can only toggle between recoovery and normal boot08:56
elfgohogra_: I believe it may be a similar issue for serial port interface, since it didnt come out on the list of interfaces08:56
ogra_and there you want to go through recovery if any possible in our setup ... rercovery replaces the bootloader shell and scriptery in this case08:57
abeatoogra_, yes, but one thing that ondra mention is that newer devices with android 7 have two boot partitions for safer upgrades, and in that case you need a way to tell the bootloader to use one or another when powering on the device08:58
abeato(can have)08:58
ogra_abeato, so we dont support anything with a base older than android 7 ?08:58
abeatoogra_, we do, but we assume that the solution is not 100% sage08:58
abeato*safe08:58
ogra_(also ... how would we integrate that bootloader behaviour with our setup)08:59
ogra_(this seems very bootloader internal, how wuld we manage the rollback and such ?)08:59
abeatowe will tackle that when we get to it, usual bussiness ;)09:00
ogra_right, and until then i'D like to have the safest mechanism through recovery ...09:00
ogra_which holds exactly that part of the logic09:00
elfgohWith regards to process isolation, this is what my colleague tried and it seems like one snap can view another snap's processes https://gist.github.com/choonkeat/a398244e3ce406ad1ee27448f383c7aa09:01
ogra_elfgoh, i think you can view them but not get any additional data about them09:02
ogra_elfgoh, hmm, also ... sudo ?09:03
ondraogra_ I assume there is some higher level api which will unify all bootloader implementations09:03
ogra_ondra, yes, in a not yet existing version :)09:04
ondraogra_ as this should be inherited feature of android 7 onwards and it's controlled by OS09:04
ogra_ondra, we need to deal with the existing one ;)09:04
ondraogra_ in already existing09:04
ogra_well you knwo what i mean09:04
ondraogra_ there are already phones with this setup09:04
ogra_fine for these phones ... are there customers with boards that use it ?09:05
ondraogra_ that's different topic :)09:05
ogra_and are you sure there will only be boards with 7 onwards ?09:05
ogra_ondra, well, the current topic is the current setup ... what android based boards do we have right now ?09:05
ogra_(what version)09:05
ondraogra_ I just mentioned this feature, to make sure we do not choose solution which we will need to re-engineer once we start seeing those boards :)09:06
ogra_ondra, well, we need to see how we can blen in our setup with that bootloader then ... if at all ...09:06
ogra_*blend09:06
ogra_but for now we dont have that and need an implementation that deals with the existing situation09:07
elfgohogra_: is it possible to evaluate if being able to view other processes is really necessary? This "feature" causes discomfort09:07
ogra_wasnt there actually a way to set the boot reason on cmdline ?09:07
Chipacaabeato: “It is defined by snapd:” <- i think you meant systemd09:07
abeatoChipaca, yep, lust corrected :)09:08
ondraogra_ there is way09:08
abeato*just09:08
ondraogra_ but it's not persistent09:08
Chipaca:-) ok09:08
ondraogra_ so does not do for cold boot09:08
ogra_elfgoh, thats a jdstrand question i fear ... you might need to wait til he gets up (US timezone)09:08
ondraogra_ therefore I suggested to use recovery as test path09:08
ogra_ondra, why not ? if it is in boot.img does it get re-written there ?09:09
elfgohogra_: Ok got it will nudge jdstrand when he is awake09:09
ondraogra_ you prepare update files, reboot to recovery with cmd line boot reason, and if it boots, you move that image to boot partition09:09
ondraogra_ no it's just in memory09:09
ogra_ondra, after modifying it09:09
ondraogra_ it sets flag which bootloader can read09:10
ogra_ondra, recovery will modify the cmdline befiore flashing boot,img09:10
ogra_ondra, right and we could just have that in every boot.img09:10
ogra_that would make sure we always go through recovery09:10
ogra_ondra, if we update core the cmdline needs to carry the new snap_core ... if we need to modify it anyway we can also always  add the bootreason09:11
ogra_that is why i want it to go through recovery with any reboot ...09:12
ondraogra_ but boot reason is not in cmdline09:13
ondraogra_ that is too late09:13
ogra_that was my initial question ;)09:13
ogra_thanks :)09:14
ondraogra_ boot reason is read by bootloader, to determine from which partition to load next boot step09:14
ogra_right09:14
ondraogra_ boot/ recovery09:14
elfgohogra_ zyga: sorry to nudge you again. Was wondering if the serial-port interface is ready to be supported on the pi3?09:15
elfgohI have a use case for it too :)09:15
ondraogra_ therefore I suggested, using boot reason for test boot, will always put us back to working (boot partition) case by nature of it, as for next/cold/crash reboot we have no boot reason -> boot partition09:15
ogra_elfgoh, what kind of serial ... on the pi3 ttyAMA0 is already taken by the BT interface09:15
ogra_elfgoh, would that be any additional serial device =09:15
ogra_?09:15
ogra_ondra, what if the boot partition holds a broken version09:16
ogra_ondra, i want to always go to recovery first09:16
elfgohogra_: it would be under /dev/serial09:16
ogra_elfgoh, thats taken by the console by default09:16
elfgohhttps://www.irccloud.com/pastebin/qXSDL82F/09:16
ogra_(or will soon be, ondra suggested some cvhanges there that i didnt add yet)09:17
ogra_elfgoh, i fear that wouldnt work ... since we have console=ttyS,... (or later console=serial,...) on the kernel cmdline ... so that device is occupied in our default setup ...09:18
ogra_elfgoh, you would need your own gadget that drops console=(serial,ttyS0) and add your own serial interface to snapcraft.yaml09:19
ogra_we cant really drop that console in our developer images09:19
ogra_oh, i should have looked at your paste first ...09:20
ogra_so you use a USB dongle there09:20
elfgohyup yup :)09:21
elfgohOh sorry. didnt know how irccloud snippet is showing up in other clients09:21
ondraogra_ no that is the point, boot will hold verified version, you test in recovery partition new update, only if recovery version boots fine, it will be moved to boot partition09:21
ogra_well, thats also something you will need your own gadget for ... iirc the USB serial interface wants vendor ID and product ID09:21
ondraogra_ so version in boot partition is always good verified one09:21
ogra_ondra, but we only verify by having a successfully finished boot09:22
ogra_ondra, to boot the new img you first need to flash it into the boot partition and then reboot without recovery ... and only if the boot succeeds the boot img is deemed good09:23
elfgohogra_: pardon if i have any wrong assumptions, but would it be sensible to have the pi3 gadget have an interface that opens up /dev/serial?09:23
ogra_ondra, now ... if you have a broken reboot and dont finish because core was broken or your kernel paniced you neerd to go back to recovery and re-flash the former version09:23
ogra_ondra, there will be a point where the boot partition holds a broken boot.img and the only way to auto-fix that is to go through recovery and re-flash09:24
ogra_elfgoh, yes, for tewh internal serial device *if* that isnt used as console09:25
ondraogra_ no, not this way. you get new image, you flash it to recovery, and do test boot, you do not touch boot partition, only of you have sucessfull boot through recovery then you move it to boot partition09:25
ondraogra_ so at any time boot partition is always verified boot option09:25
ogra_ondra, thats notr what we discusssed09:25
ogra_ondra, something needs to have the scriptery for rollback of core and kernel09:25
ogra_thwe only way to have that is recovery09:25
pedronisChipaca: hi, how it's going with your PR ?09:25
ondraogra_ if you invent some different way to do it, then do not ask me, why it's not working :)09:26
ogra_and if you assume that the only thing that can actually boot otherwiose is the boot partition, it is the oone that always holds the running kernel09:26
ogra_ondra, we have a long thread on the forum where that was discussed09:26
ogra_ondra, recovery needs to always hold our logic ...09:26
Chipacapedronis: need moar coffee09:26
ondraogra_ I thought logic is in snapd09:27
ogra_if you just dump a boot.img into the recovery partition, where would you put the rollback logic (that needs to run *before boot*09:27
ogra_ondra, half of it09:27
ogra_ondra, the oother half is "before booting"09:27
ondraogra_ boot/recovery is just kernel + initrd09:27
ondraogra_ so you gonna add logic to initrd?09:27
ondraogra_ and bootloader will load kernel from that partition, no logic there09:28
ogra_ondra, righ, buit recovery has the original kernel the board was initially flashed with and additional scripts (translated from the grubn/uboot ones)09:28
ogra_ondra, exactly ... the recovery initrd has the script logic we usually have in uboot/grub09:28
ondraogra_ where do you have those additional scripts? in initrd?09:28
ogra_ondra, and will never be touched so we have a guarantee you can always boot into that mode ... like you can always intercept autoboot in uboot or grub09:29
ondraogra_ ok then we if we are adding logic to initrd, I'd suggest to unify and use that inird logic for all platforms09:29
ogra_ondra, we do ... in the uboot hush shell or in the grub shell scripts09:29
ondraogra_ something I mentioned before I don't see reason why u-boot should be handling versions for core snap09:29
ogra_ondra, because it needs to be able to roll back when a boot failed09:30
ogra_*before* booting09:30
ondraogra_ and initrd would not be able to do roollback?09:30
ondraogra_ or you are assuming update of core + kernel in one go?09:30
ogra_it would but you would have to re-design the whole process from the groound up09:30
elfgohogra_: we are a bit confused. Are we talking about the same console? The one at /dev/ttyS0? Are you saying that there will be plans to change it to use /dev/serial?09:31
ogra_and have twop different implementations for kernel vs core09:31
ondraogra_ that's only case I can think of when you don't reach even to initrd09:31
ogra_ondra, there are a muillion cases where you cant reach initrd ... your kernel panics ... your initrd is messed up etc etc09:31
ondraogra_ yes some rework, but then you have one implementation for all u-boot/grub/android, core revisions will be always handled in one place09:32
ogra_ondra, also dont forget that one day our initrd comes from core09:32
ogra_(if i ever find the time for the split initrd)09:32
ondraogra_ and you leave kernel revision handling to bootloader09:32
ondraogra_ ha?09:32
ondraogra_ initrd from core?09:32
ogra_ondra, seriously ... that isnt really relevant for the stuff here09:32
ogra_you can propose to move the core handling to initrd ... but that wont change the kernel initrd side09:33
ogra_it will just add additional code and logic in the end ...09:33
ondraogra_ ogra again, if you made up your mind how to implement it, there is no way somebody will convince you otherwise, but then don't ask me why it's not working :D09:33
ogra_but wont fix the probelm we are currently trying to solve09:33
pedronisChipaca: :)  ( still need a review for snapd#3322  :) )09:33
mupPR snapd#3322: overlord: make config defaults from gadget work also at first boot <Created by pedronis> <https://github.com/snapcore/snapd/pull/3322>09:33
elfgohogra_: let me try again. the "serial-port" interface is supported, but not enabled on pi3 gadget. Correct?09:33
ogra_elfgoh, right09:34
Chipacapedronis: on it!09:34
pedronisChipaca: it's big but mostly the tests09:34
ogra_elfgoh, and console= occupies the device on a booted system09:34
elfgohogra_: doesnt console=/dev/ttyS0 on pi3 on Ubuntu Core?09:35
ogra_elfgoh, yes09:36
ogra_elfgoh, so the internal serial is taken ... for your usb serial you need to add anothert interface to snapcraft.yaml09:36
ogra_ondra, i dont get how the initrd is relevant here ... it wouldnt fix the problem09:37
elfgohogra_: i am assuming that you are referring to the snapcraft.yml of a gadget snap?09:37
ogra_elfgoh, exactly09:38
ogra_to enable the interface you need your own gadget snap09:38
ondraogra_ it would not fix it, it will make various bootloader support easier, as we will only worry about kernel revision, but as you said initrd will be coming from core, so I guess this is off the table anyway09:38
ogra_ondra, well, half of the initrd :)09:40
ogra_(the relevant half though)09:41
elfgohogra_: based on our understanding devices populated /dev/serial/, eg eg $ ls /dev/serial/*09:41
elfgoh/dev/serial/by-id: usb-FTDI_FT230X_Basic_UART_DM007FNY-if00-port0  usb-FTDI_FT230X_Basic_UART_DM007X1O-if00-port0, can change their device names unpredictably. Therefore it seems unfeasible to hardcode the interface path in snapcraft.yml. Or is there another way to handle such dynamic interfaces?09:41
ogra_elfgoh, well ... dio you have a /dev/ttyUSB* ?09:41
ogra_assuming you only ever have one USB dongle attached you should be able to use a rather simple interface definition09:42
ogra_(same as bt-serial in https://github.com/snapcore/pi3-gadget/blob/master/snapcraft.yaml but with your own name and pointing to /dev/ttyUSB0 (or whatever number your sevide gets))09:43
elfgohogra_: we have multiple usb serial devices. The device enumeration gets randomised unfortunately. So that's why we used /dev/serial/by-id it09:44
ogra_elfgoh, ok, that gets more tricky then ...09:45
elfgohYup. We dont have a scalable interface definition09:45
ogra_elfgoh, line 157ff has the other way ... using udev vendor and product id's https://github.com/snapcore/snapd/blob/master/interfaces/builtin/serial_port_test.go#L16209:45
ogra_with that you should also be able to use by-id i think09:46
elfgohogra_: have clarity we have multiple of the same USB serial devices, ie having the same vendor and product id :( We are not kidding09:47
ogra_elfgoh, well, i fear thats a limitation of the serial interface ... mind starting a forum thread about it ? i guess we could extend the path /dev/serial/by-id/<identifier>09:49
ogra_but thats not in my hands :)09:49
ogra_*extend the path to09:50
elfgohogra_: fair enough. Will do that09:50
ogra_thx09:50
ogra_lets see what gustavo and the security guys say :)09:50
Saviqshould I (and collaborators) be able to install a private snap from the store?09:53
elfgohogra_: but nevertheless, thank you for hearing our complicated use case out :D09:53
ogra_elfgoh, heh, no problem :)09:53
mupPR snapd#3322 closed: overlord: make config defaults from gadget work also at first boot <Created by pedronis> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/3322>10:01
pedronisChipaca: thanks10:04
mupPR snapd#3355 opened: tests/main/snap-info: don't use named parameter for print statement <Created by morphis> <https://github.com/snapcore/snapd/pull/3355>10:06
mupPR snapd#3356 opened: tests/lib: allow SRU validation only on ubuntu type systems <Created by morphis> <https://github.com/snapcore/snapd/pull/3356>10:08
elfgohogra_: started the conversation here https://forum.snapcraft.io/t/usb-serial-port-access-for-snap-apps/69310:11
ogra_elfgoh, perfect,. thanks10:11
mupPR snapd#3357 opened: tests/lib: abstract build dependency installation a bit more <Created by morphis> <https://github.com/snapcore/snapd/pull/3357>10:12
mupPR snapd#3358 opened: tests/main/snap-info: use proper pkgdb functions to install distro packages <Created by morphis> <https://github.com/snapcore/snapd/pull/3358>10:14
morphisfgimenez, zyga: submitted many tiny PRs for our test setup, would be nice if you can have a look10:15
fgimenezmorphis: sure thanks, already reviewed one of them10:16
morphisnice!10:16
mupPR snapd#3359 opened: tests/lib: use mktemp instead of tempfile to work cross-distro <Created by morphis> <https://github.com/snapcore/snapd/pull/3359>10:16
mupPR snapd#3360 opened: tests/libs: add distro_auto_remove_packages function <Created by morphis> <https://github.com/snapcore/snapd/pull/3360>10:16
pedronisoh, no, more than 25 PRs , :)10:26
mupPR core#45 opened: allow rsyslog disabling <Created by ogra1> <https://github.com/snapcore/core/pull/45>10:34
zygare10:50
zygaogra_: approved pi2 i2c interfaces10:51
* ogra_ hugs zyga 10:51
ogra_merged10:52
* zyga hates doing tax paperwork but ... well10:52
zygapstolowski: thank you!10:59
mupPR snapd#3349 closed: many: model and expose interface meta-data <Created by zyga> <Merged by zyga> <https://github.com/snapcore/snapd/pull/3349>10:59
zygapstolowski: I was thinking about the problem of security setup for core/kernel revision change11:00
zygapstolowski: are you familiar with that discussion11:00
zygapstolowski: I wanted to know your view, especially since we're about to have hook attributes that, I think, complicate the prblem11:00
pstolowskizyga, i wasn't following that discussion, do you have a link?11:01
zygapstolowski: yes I was actually looking for it :)11:01
zygapstolowski: so part of it is in https://forum.snapcraft.io/t/providing-system-settings-to-snap-confine/665/1311:02
zygapstolowski: but the real problem is separate, there's no thread yet11:02
zygapstolowski: I want to open one but I wanted to chat with you to get the full picture11:02
zygapstolowski: the problem is that on kernel/core change, just after reboot, the services start with security profiles written by old snapd based on old kernel11:02
zygapstolowski: CE hit this problem, I can share a link to a private bug11:02
ogra_pedronis, do we have any docs for that gadget config option ? (is it the old way we used to have in 15.04 ?) i'd actually like to default our images to have rsyslog off11:32
pedronisogra_:  is still in the wiki:  https://github.com/snapcore/snapd/wiki/Gadget-snap#gadgetyaml   notice the key is the snap-id , not the name11:34
ogra_pedronis, i.e. http://paste.ubuntu.com/24604351/11:34
ogra_ah11:35
ogra_so close ... but different to 15.04 :)11:35
pedronisogra_: I plan to do a quick branch soon to show that in snap info11:35
pedronis(that == snap-id)11:35
pedronisbecause of this among other reasons11:36
ogra_does the prepare-device hook accept snap names btw ?11:37
pedronis?11:37
pedronisI don't understand the question11:37
pedronisaccept where/how ?11:37
ogra_loking at the bottom of https://github.com/snapcore/snapd/wiki/Gadget-snap#gadgetyaml at the example ...11:37
ogra_could that call "snapctl set foo bar.baz=true"  ... for the preinstalled foo snap ?11:38
pedronisah11:38
ogra_or is it only applying to some generic defaults11:38
pedronisno11:38
ogra_k11:38
pedronissomething to discuss if needed11:38
pedronissnapctl set/get are about the snap of the hooks11:38
pedronisin general11:38
pedronisyou need snapd-control to set other snaps config11:39
ogra_well, it just struck me as a way to get around the snap-id if it had worked :)11:39
ogra_<- cheating ;)11:39
pedronisogra_: there is some argument to be made that we should support names at least for things listed in the model assertion, otoh there were vague discussion about allowing snap-ids in the model as well11:43
pedronisanyway nothing that will happen soon, high prio11:44
=== koza is now known as koza|away
ogra_well, as long as the id is predictable and known ...11:44
ogra_(and doesnt change randomly)11:45
ogra_it makes it a bit harder for devs ... but nothing that would block the feature11:45
ogra_(we should publish the id's for the core snaps though ... until the snap info bit is there)11:46
ogra_(an external developer wont easily get the id unless he builds a test image and looks at the snap-declarations first)11:48
zygagee, some code reviews are tedious12:01
* Chipaca slinks off12:03
abeatozyga, are you suggesting to add "sc_" prefix to all function declarations in system-shutdown-utils.h?12:05
abeatozyga, also, why "sc_"?12:05
ogra_abeato, stands for supercool ... makes the functions more special ;)12:10
abeatoogra_, that is definetely a +1 to adding it :p12:11
ogra_:D12:11
morphiszyga: so, LXD works on suse12:13
morphiszyga: however you have to run $ lxc config set next-snipe raw.lxc "lxc.aa_allow_incomplete = 1" for every container12:13
morphiszyga: need to file a bug on lxd for that12:14
zygamorphis: what is next-snipe?12:14
morphiszyga: the container name12:15
zygaabeato: it's just a prefix from all the snap-confine function but I sometimes think of it as 'snapd-c-code'12:15
niemeyerMoin moin12:15
morphisniemeyer: moin!12:15
abeatozyga, I guess we can apply the second :p12:15
zygamorphis: I commented on https://github.com/snapcore/snapd/pull/3222 - I'm inclined to LGTM but my head is dizzy from all the indirection12:15
mupPR snapd#3222: many: fix test cases to work with different DistroLibExecDir <Created by morphis> <https://github.com/snapcore/snapd/pull/3222>12:15
abeatozyga, in all funtxions in the header?12:16
morphiszyga: :-)12:16
zygaabeato: just the new ones,12:16
zygaabeato: we can do the rest separately, no need to cloud what is going on in this PR12:16
Son_Gokumorphis, you packaged lxd for suse?12:16
abeatozyga, ok, fine for me12:16
morphisSon_Goku: no, its the snap :-)12:16
Son_Gokubah12:17
morphisSon_Goku: ?12:17
Son_GokuI thought you had done something cool :)12:17
morphisSon_Goku: :-D12:17
zygamorphis: what are the three iota constants in content.go?12:17
Son_Gokuzyga: that distrolibexecdir PR makes my brain hurt12:17
morphiszyga: ?12:17
zygahttps://github.com/snapcore/snapd/pull/3222/files/9b771dd09d80ef950160a1fffcd1d4b8a7ce7c80#r11746708612:18
mupPR snapd#3222: many: fix test cases to work with different DistroLibExecDir <Created by morphis> <https://github.com/snapcore/snapd/pull/3222>12:18
Son_GokuI'm not used to Go as it is, and it's really complicated to follow for me :(12:18
zygaSon_Goku: yes, I feel the same; it's not morphis fault in any way, it's just the variables do make it hard to guess what is going on sometimes12:18
Son_GokuI don't like saying this, but all the tests pass, can we please just merge it12:18
morphisSon_Goku: +112:19
morphiszyga: let me drop these12:19
lazyPowerIs there a reason i'm nothinking of as to why the root user doesn't have /snap/bin added to $PATH by default on ubuntu-server/desktop distributions? Because to me it just seems like a papercut.12:28
Croephai know i have asked this before, but i cant find my notes, and its not readily available via google, how can I know what version of a package was used to make the core snap?  i remember that there was some kind of manifest on launchpad but i cant find it?12:29
lazyPowerCroepha: https://launchpadlibrarian.net/283317939/buildlog_snap_ubuntu_xenial_arm64_ubuntu-core_BUILDING.txt.gz - does something like that help?12:30
CroephalazyPower, yes thanks, i can make that work12:31
lazyPowernot the most straight forward way but you should be able to grep that build log for what went into it.12:31
lazyPower*note, thats for the arm64 core snap. you may need to swap projects respectively12:31
Croephaso, where is the link to that link?12:31
Croephalike, how can I find more links like that?12:32
lazyPoweraha Croepha https://launchpadlibrarian.net/316771673/core_16-2_amd64.manifest12:32
lazyPowerthere IS a manifest file12:32
lazyPowercited: https://forum.snapcraft.io/t/inspecting-package-differences-across-core-base-snaps/37812:32
cjwatsonStart from https://code.launchpad.net/~snappy-dev/+snap/core - each build has a link to the manifest12:34
cjwatsonUnfortunately it's hard to find older builds there, but it can be done through the LP API12:35
Croephathanks cjwatson12:37
ogra_lazyPower, http://people.canonical.com/~ogra/core-builds/ is an overview but only logs the automatically built daily snaps ... not the manual triggered builds12:37
Croephaany ideas on how to translate revision number (like 1689) into build id?12:37
Croephaoh!12:38
lazyPower:) sorry jsut trying to be helpful. I actually have very little insight into how the core snaps are built so i was grepping around google searches/forums.12:38
Croephathat ogra link is gold12:38
ogra_(i need to update the code to handle the new version strings ... but you cn just click on the "Launchpad (...)" thing to get to the menifest)12:38
lazyPowerhaha typical day for ogra_ ;)12:38
cjwatsonthe store revision is available over the LP API so it would be possible to correlate that way12:38
cjwatsonstore_upload_revision12:39
cjwatsonwould involve walking back over the full list though12:39
cjwatsonogra's link is easier :)12:39
morphiszyga: ok, updated the PR12:39
ogra_but also incomplete ...12:39
ogra_(it parses the clogfile for auto-builds ... pretty hackish)12:39
ogra_*logfile12:39
cjwatsonlp-shell production devel12:40
cjwatsonIn [1]: for build in lp.load('/~snappy-dev/+snap/core').builds:12:40
cjwatson   ...:     if build.store_upload_revision == 1689:12:40
cjwatson   ...:         print(build.web_link)12:40
cjwatson   ...:         break12:40
cjwatson   ...:12:40
cjwatsonhttps://launchpad.net/~snappy-dev/+snap/core/+build/3241012:40
ogra_yeah ... one day i'll find the time to make it based on proper lp-lib12:41
cjwatsonleads to https://launchpadlibrarian.net/315255992/core_16-2_amd64.manifest12:41
Croephacjwatson++ thanks!12:45
Croephabuild.getFileUrls() will give the manifest12:46
cjwatsonyep12:48
zygaChipaca: https://forum.snapcraft.io/t/anomalous-snap-list-devmode-flag/69912:55
morphiszyga: there we go, docker works now too13:15
morphiszyga: time to give the packages from https://build.opensuse.org/package/show/home:mrmorph:branches:system:snappy/snapd a try?13:16
abeatozyga, pedronis,  Chipaca, morphis https://github.com/snapcore/snapd/pull/3353 ready again13:17
mupPR snapd#3353: Add support for reboot parameter <Created by alfonsosanchezbeato> <https://github.com/snapcore/snapd/pull/3353>13:17
morphiszyga: otherwise: https://build.opensuse.org/request/show/49676913:17
morphisSon_Goku: btw. you may want to add https://build.opensuse.org/package/view_file/home:mrmorph:branches:system:snappy/snapd/0003-cmd-snap-confine-do-not-share-etc-ssl-with-the-host.patch?expand=1 to the snapd packages on Fedora until 2.27 is out13:18
morphisSon_Goku: also I will look onto the bodhi requests on monday13:18
Son_Gokuwhy would I do that?13:18
Son_Gokuthe Ubuntu Core snap expects /etc/ssl/certs, right?13:19
Son_Gokuwell, in Fedora, /etc/ssl/certs is a valid location13:20
Son_Gokuit's a symlink to /etc/pki/tls/certs13:20
Son_Gokuoh, lemme guess13:21
* zyga hugs morphis :-)13:21
Son_Gokuyou don't pull in /etc/pki, right?13:21
zygamorphis: I'll definitely try today13:21
* Son_Goku grumbles13:21
morphisSon_Goku: this is a tricky and not easy to solve situation we're in13:22
morphisthe best we can do today is to rely on the core snap13:22
Son_Goku:(13:22
morphisin a next step we will merge this somehow with what the host provides13:22
morphisSon_Goku: why does that make you sad?13:22
Son_Gokubecause for example, I can't access things that I have imported my certs into13:23
morphisright but that is a problem we will solve13:23
Son_GokuI have a number of private CA certs imported into my computer, so this would break13:23
Son_Gokuthen again, it wasn't working before, was it?13:23
Son_Gokuthankfully Fedora infra no longer requires it13:23
Son_Gokuit used to be one of those I needed13:24
Son_Gokuthey moved to Krb auth13:24
=== chihchun is now known as chihchun_afk
morphisSon_Goku: it was horrible broken until we did this small fix13:25
morphisthere will be work to make /etc sharing better13:26
morphisincluding CA stuff13:26
morphisin one or another way13:26
zygaChipaca: given that devmode is now just a flag (not confinement type) can we just do this: http://paste.ubuntu.com/24604770/13:27
morphisSon_Goku: btw. I will need you on Monday to have a look at a PR which introduces the rpm build stuff for our spread setup13:28
Son_Gokuokay13:29
Chipacazyga: yes. And there's code for determining jailMode based on devmode that also needs to go13:29
zygaChipaca: right13:29
Chipacazyga: as our metadata gets richer our black magic can be more relaxed13:31
zygayes, I was thinking that the transformations in snap list are unfortunate and it'd be nicer if we could just give simple facts from the daemon13:31
zyga(perhaps even the notes)13:31
morphiszyga: can you merge https://github.com/snapcore/snapd/pull/3307 ?13:46
mupPR snapd#3307: tests: abstract common dirs which differ on distributions <Created by morphis> <https://github.com/snapcore/snapd/pull/3307>13:46
zygamorphis: in a sec13:46
morphisaye13:46
mupPR snapd#3361 opened: cmd/snap: correct devmode note for anomalous state <Created by zyga> <https://github.com/snapcore/snapd/pull/3361>13:47
zygaChipaca: check out https://github.com/snapcore/snapd/pull/3361 please13:49
mupPR snapd#3361: cmd/snap: correct devmode note for anomalous state <Created by zyga> <https://github.com/snapcore/snapd/pull/3361>13:49
Chipacazyga: yep, was already reviewing13:50
Chipaca+113:50
Chipacaand now, friday school run13:50
Chipacattyl!13:50
fgimenezzyga, if you could have a look at snapd#3348 when you have some time that would be great, there are some refactors in there, the test itself is https://github.com/snapcore/snapd/pull/3348/files#diff-4825fd024a235e7895b109ad37072e68 probably i'm missing something but it seems to work fine (ie, the network connection is up after reverting)13:52
mupPR snapd#3348: tests: add core revert test <Created by fgimenez> <https://github.com/snapcore/snapd/pull/3348>13:52
zygafgimenez: sure, gladly14:17
elopioahoneybun: do you know if that bug is already reported?14:17
fgimenezzyga: thanks!14:17
zygamorphis: done14:18
mupPR snapd#3307 closed: tests: abstract common dirs which differ on distributions <Created by morphis> <Merged by zyga> <https://github.com/snapcore/snapd/pull/3307>14:18
morphiszyga: thanks14:18
morphiszyga: can you look at https://github.com/snapcore/snapd/pull/3358 too?14:19
mupPR snapd#3358: tests/main/snap-info: use proper pkgdb functions to install distro packages <Created by morphis> <https://github.com/snapcore/snapd/pull/3358>14:19
morphiszyga: and https://github.com/snapcore/snapd/pull/335914:19
mupPR snapd#3359: tests/lib: use mktemp instead of tempfile to work cross-distro <Created by morphis> <https://github.com/snapcore/snapd/pull/3359>14:19
zygamorphis: yes14:25
mupPR snapd#3359 closed: tests/lib: use mktemp instead of tempfile to work cross-distro <Created by morphis> <Merged by zyga> <https://github.com/snapcore/snapd/pull/3359>14:25
zygamorphis: done14:26
mupPR snapd#3358 closed: tests/main/snap-info: use proper pkgdb functions to install distro packages <Created by morphis> <Merged by zyga> <https://github.com/snapcore/snapd/pull/3358>14:26
morphisgreat!14:26
morphiszyga: https://github.com/snapcore/snapd/pull/3360 too?14:34
mupPR snapd#3360: tests/libs: add distro_auto_remove_packages function <Created by morphis> <https://github.com/snapcore/snapd/pull/3360>14:34
morphisand https://github.com/snapcore/snapd/pull/3357 would be nice too14:34
mupPR snapd#3357: tests/lib: abstract build dependency installation a bit more <Created by morphis> <https://github.com/snapcore/snapd/pull/3357>14:34
morphison the last one just a review14:34
mupPR snapcraft#1307 closed: cli: new UI and internal refactor <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1307>14:35
ahoneybunelopio: I don't know tbh14:37
elopioahoneybun: I can't find it. This sounds like a good topic for the forum, would you mind making a post in forum.snapcraft.io?14:41
ahoneybunelopio: I'll see if this wifi lets me14:42
ahoneybunhttps://forum.snapcraft.io/t/snaps-list-as-loop-devices-in-file-manager/70114:45
ahoneybunelopio: ^14:45
elopioahoneybun: thanks!14:45
Croephai made a little toy script, to grab all debug symbols for a core snap: https://gist.github.com/croepha/0185fa264a1fb3b454469cd3c7419a0915:04
Croephait still chokes on ones that have been updated since core came out15:05
Croephanot sure how to fix that15:05
niemeyerLunch, back in a bit..15:05
Croephaalso, for some reason there are man pages and doc stuff in the debug files15:05
ogra_Croepha, note that the manifest doesnt reflect what was removed du4ring the core snap build ... there is a lot less in it than the manifest lists after all15:10
ogra_(we can only generate the manifest file before we remove things like apt and dpkg)15:10
Croephawell, with everything (well at least with the packages I can get the right versions for) its all only 323MB so if I have too much then its not that big of a deal15:11
Croephamy main concern is that I can guarantee  that i can read backtraces for cores after deployment15:12
Croephabecause it hard to find the debug symbols later15:12
ogra_Croepha, if you want to debug on a device, i'd rather recommend using the classic snap and then install the symbols there ... the classic snap re-creates the env with apt, dpkg and all other bits that have been removed15:12
ogra_snap install classic --devmode --edge; sudo classic15:13
elfgohjdstrand: ogra_ : I have raised the issue with regards to the visibility of processes in external snaps here https://forum.snapcraft.io/t/visibility-of-processes-originating-from-other-snaps/70315:13
ogra_(obn any core device)15:13
ogra_elfgoh, yes, and i pinged niemeyer and jdstrand in the thread ... they will answer eventually :)15:13
ogra_elfgoh, oops, sorry ... that was the other thread15:14
Croephaogra_, well im thinking about the longterm, being able to get support info for the older binaries... like im thinking that I'll just tar up all the debug info for a specific release, so i can have it for later if i need to figure out what happened from core dump pulled from a customer down the road....  For my normal day to day development cycle im just using ubuntu desktop, and I can test and debug the snap there15:17
ogra_Croepha, right, just dont be surprised if half the libs and binaries you expect ate actually not really there15:18
ogra_the manifest is only a snapshot mid-build15:18
Croephaogra_ ahh ok15:19
ogra_we only use debs for the initial rootfs but then mangle it a lot15:19
ogra_(to cut down size ...)15:20
* ogra_ shakes fist towards people that base new product u-boot on upstream branches from 201315:21
ogra_*new products15:21
ogra_such a pain15:21
mupPR snapd#3361 closed: cmd/snap: correct devmode note for anomalous state <Created by zyga> <Merged by chipaca> <https://github.com/snapcore/snapd/pull/3361>15:24
fgimenezniemeyer: i've verified the scenario i mentioned in the standup and it seems that it can refresh after the revert to the previous version, so after reverting it seems that when autorefresh kicks in you would be back to the previous state15:31
fgimenezniemeyer: to give you more context, start from stable, "snap refresh --candidate core", "snap revert", now "snap list" shows the revision at stable but snap info shows "tracking: candidate" and, indeed, "snap refresh core" installs the latest revision in candidate15:33
=== sergiusens_ is now known as sergiusens
pedronisfgimenez: manual refresh and auto refresh don't work the same in that scenario15:36
pedronisfgimenez: with auto-refresh we send blocked revisions, we a manual refresh we don't15:36
pedronisfgimenez: this is the relevant code:  https://github.com/snapcore/snapd/blob/master/overlord/snapstate/snapstate.go#L49115:37
zygamorphis: hey, can you tell me more about why you are making this change https://github.com/snapcore/snapd/pull/3355/files15:38
mupPR snapd#3355: tests/main/snap-info: don't use named parameter for print statement <Created by morphis> <https://github.com/snapcore/snapd/pull/3355>15:38
zygamorphis: is this a 2-vs-3 thing?15:38
zygamorphis: note that print adds implicit newline so this actually changes semantics soo15:38
zygatoo15:38
morphiszyga: AFAIK fedory python3 couldn't deal with the file= argument15:40
fgimenezpedronis: aha, thanks a lot, looking15:41
zygamorphis: that is very unlikely, can you give me a backtrace?15:41
pedronisfgimenez: to be precise what is different is auto-refresh and "snap refresh"   VS   "snap refresh NAMES"15:42
morphiszyga: yes, let me check that again once my fedora system is free15:42
zygamorphis: thank you15:42
fgimenezpedronis: autorefresh doesn't use names, right?15:42
pedronisright15:42
* zyga does last round of reviews15:50
elfgohPerhaps not the right place to ask, but relative to Docker, I am guessing that there have been less people trying to break snap security. So where is Snap with regards to security compared to Docker? (perhaps not most elegantly articulated, but it is my best effort)15:55
naccelfgoh: iirc, there is a white paper on the website15:55
zygaelfgoh: hey15:55
nacchttps://developer.ubuntu.com/en/snappy/guides/security-whitepaper/ ?15:56
zygaelfgoh: we have a security whitepaper15:56
zyganacc: thanks!15:56
nacczyga: np :)15:56
zygaelfgoh: it's a complex questions as it is an apples-to-oranges comparison in many ways15:56
zygaelfgoh: there are many things that have nice properties but I'm about to join a hangout on air so I cannot tell you about them15:56
zygaelfgoh: I can tell you keywords to look up or discuss later15:57
zygaelfgoh: assertions, core snap shared by everything, separate updates, automatic confinement15:57
morphiszyga: if I have an reported oops id from snapd, where can I see that reported error?16:00
ogra_pfft ... apples ... oranges ....16:00
ogra_take pears !!!16:00
pedronismorphis: an error tracker one? or a store oops?16:09
morphispedronis: error trackker16:09
zygamorphis: I'm in a call16:10
pedronismorphis: https://errors.ubuntu.com/oops/ID if you have access16:12
morphispedronis: doesn't look like16:12
niemeyerfgimenez: Yeah, that looks sane16:29
fgimenezniemeyer: pedronis yep, i've just tried "snap refresh" and it gives first an error about network-manager's aliases http://paste.ubuntu.com/24605592/ (not sure if it's related to network-manager itself) after, removing network-manager returns "All snaps up to date" (core is not updated to the tip of candidate)16:33
pedronisfgimenez: what version is this?16:35
pedronisof snapd16:35
pedronis(me has lost rack)16:36
pedronisfgimenez: ah, you reverted core ?16:36
fgimenezpedronis: yes, now it is at the current stable, 2.2416:37
pedronisyea, aliases and reverting core will not be happy16:37
mupPR snapcraft#1324 opened: Revert "tests: remove the reusable parts tour test (#1321)" <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/1324>16:38
fgimenezok thanks pedronis16:39
pedronisI mean that errors comes fromr 2.2416:39
pedronisI think16:39
mupPR snapcraft#1325 opened: cli: proper error for failed snap command <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/1325>16:56
Chipacasigns I should probably take a break: in two lines of code, type a variable name three different ways17:16
davhouogra_ Hi, a followup question related to "snap run hello" error I was getting yesterday17:28
davhouogra_, https://paste.ubuntu.com/24605885/17:28
davhouogra_, Any suggestions?17:28
davhouogra_, or debugging techniques to help solve the problem...17:28
ogra_davhou, "snap version" ?17:28
ogra_(just paste it here ... only 4 lines)17:29
ogra_(or 5)17:29
davhoudavid@david-VirtualBox:~⟫ snap --version17:29
davhousnap    2.2517:29
davhousnapd   2.2517:29
davhouseries  1617:29
davhouubuntu  16.0417:29
davhoukernel  4.4.0-75-generic17:29
ogra_looks all fine17:29
davhouodd thing is, I am pretty certain I was once able to run that snap w/out an error17:30
davhouat least once17:30
davhouwhen I initially tried it out17:30
ogra_if you just type "hello" and hit enter ... does it behave the same  ?17:30
davhoui installed simplenote to try it and that's when I saw it the first time17:30
davhouthat works!17:31
Chipacapedronis: any idea why PlaceInfo has e.g. DataHomeDir but not UserDataDir?17:31
davhoudavid@david-VirtualBox:~⟫ hello17:31
davhou hello, world17:31
ogra_yeah, looks fine17:31
davhouwhat's that mean?17:31
davhouis that how i should run all the snaps?17:32
naccdavhou: you don't use `snap run` to run a snap, normally17:32
pedronisChipaca: it's not used a lot, so new things might have not be added to it17:32
ogra_both should work17:32
davhouok17:32
Chipacapedronis: ah ok17:32
ogra_(they do here)17:32
davhouwas just following the docs from online17:32
naccdavhou: /snap/bin is in your PATH and then the app provided by the snap is available17:32
ogra_normally ... like nacc said ... you run the binary directly ... snap apps get added to your path17:32
naccdavhou: (on ubuntu, iirc)17:32
ogra_but the snap run command should still work nontheless17:33
pedronisChipaca: anything that can be derived just by name and revision should be ok for it, if you need it17:33
ogra_it indicates that theer is some issue with that specific code path17:33
naccfwiw, on 17.04, i don't have a /run/snapd :) and those permissions look weird17:33
Chipacapedronis: i don't need it, but was looking at adding tests while i'm in the neighborhood17:34
davhouyou mean the root:david permissions on /run/snapd look weird?17:34
naccdavhou: yeah, it's a strange combination -- i'd have to spin up a 16.04 to compare though17:34
davhoui'll try installing another snap and run it directly17:35
naccdavhou: well, the ownership in combination with the actual permissions17:35
davhouoh, ok17:35
pedronisChipaca: it's mostly  undo and remove stuff that uses it, to be sure they don't depend too much on having a fully sane snap17:35
naccdavhou: i'm not sure why /run/snapd would be owned by a user's group17:35
pedronis(because they migh well not)17:35
naccdavhou: as it's a system directory (it seems like)17:35
ogra_nacc, it is here as well ...17:35
naccogra_: interesting17:36
ogra_so i guess thats fine ...17:36
naccogra_: same permissions?17:36
davhouHmm, simplenote does not work as well as hello does....17:36
davhoudavid@david-VirtualBox:~⟫ sudo snap install simplenote17:36
davhousimplenote 1.0.8 from 'flexiondotorg' installed17:36
davhoudavid@david-VirtualBox:~⟫ simplenote17:36
davhoucannot create lock directory /run/snapd/lock: Permission denied17:36
Chipacasigh. our user home layout is so simplistic i'm surprised it isn't biting people more17:36
Chipaca(i guess everybody has homes in the same place :-) )17:36
naccogra_: it seems like /run/snapd/lock would be created by snapd, not by `snap`?17:37
ogra_nacc, yeah, sorry, the permissions of the lock files are root:ogra17:37
ogra_not the dirs17:37
naccogra_: ah ok17:37
zygadavhou: hey17:37
zyganacc: that directory is made by snap-confine and snapd alike17:38
davhouogra_, so what is are your owners x:X on /run/snapd ?17:38
zygadavhou: can you tell me more about your environment17:38
nacczyga: ah i see, but i assume files in it are created by snapd?17:38
zygadavhou: when this error happens17:38
zyganacc: nope, unless you are using edge17:38
davhouzyga, what would you like to know?17:38
ogra_davhou, better go with zyga than me ... he is deeper into snapd stuff17:38
zygadavhou: also, can you share 'dmesg | grep DENIED'17:38
nacczyga: ok, just funny to see a directory called /run/snapd not contain files ... from snapd? :)17:39
zyganacc: snapd and snap-confine are both from the same project, different programs though17:39
nacczyga: ah i see17:39
Chipacazyga: can I kill NoneSecurityTag? nothing uses it17:39
zyganacc: (there are more)17:39
zygaChipaca: are you sure? I bet it is used by udev)17:39
davhoulast two lines...17:39
davhou[105316.495420] audit: type=1400 audit(1495213933.488:79): apparmor="DENIED" operation="mkdir" profile="/usr/lib/snapd/snap-confine" name="/run/snapd/lock/" pid=76593 comm="snap-confine" requested_mask="c" denied_mask="c" fsuid=0 ouid=017:39
davhou[106747.330295] audit: type=1400 audit(1495215368.207:84): apparmor="DENIED" operation="mkdir" profile="/usr/lib/snapd/snap-confine" name="/run/snapd/lock/" pid=96954 comm="snap-confine" requested_mask="c" denied_mask="c" fsuid=0 ouid=017:39
zygaChipaca: it was made for udev17:39
ogra_nacc, and you have any snaps installed ??17:39
zygadavhou: ok, can you tell me which distribution are you using17:40
zygadavhou: or better17:40
zygadavhou: share "snap version" please17:40
Chipacazyga: grep says no17:40
Chipaca$ grep -r NoneSecurityTag17:40
Chipacasnap/info.go:// NoneSecurityTag returns the security tag for interfaces that17:40
Chipacasnap/info.go:func NoneSecurityTag(snapName, uniqueName string) string {17:40
naccogra_: hrm, `snap list` says core is installed but not sure that counts17:40
zygaChipaca: very odd, please keep it, we had uses for it (real uses)17:40
ogra_nacc, core should have a lock file i guess17:40
Chipacazyga: it's untested >:-(17:40
ogra_it does here17:40
Chipacazyga: :-)17:40
davhouzyga, Check above at 13:29:17 for 'snap --version'17:41
zygadavhou: can you also check what does ls /etc/apparmor.d/usr.lib.snapd.snap-confine.real*  return?17:41
naccogra_: yeah, it seems oddly inconsistent. Not a big deal to debug right now, as I think davhou's issue is presumably more pressing :)17:41
zygadavhou: thanks, looking17:41
zygaaha, I see17:41
ogra_everything pretty recent and sane there17:41
zygadavhou: give me a sec, checking something17:42
davhoudavid@david-VirtualBox:~⟫ ls /etc/apparmor.d/usr.lib.snapd.snap-confine.real*17:42
davhousorry, trying again17:42
davhoudavid@david-VirtualBox:~⟫ ls /etc/apparmor.d/usr.lib.snapd.snap-confine.real*17:42
davhou /etc/apparmor.d/usr.lib.snapd.snap-confine.real  /etc/apparmor.d/usr.lib.snapd.snap-confine.real.dpkg-new17:43
zygaaha!!!17:44
zygadavhou: can you diff -u those two files17:44
zygadavhou: and pastebin this17:44
zygadavhou: this is the reason it failed17:45
zygadavhou: but I must ask, did you edit the file before?17:45
davhouwhich file?17:45
zygadavhou: or perhaps, did you run an upgrade that failed/did not complete?17:45
zygadavhou: /etc/apparmor.d/usr.lib.snapd.snap-confine.real17:45
zygadavhou: if you run: sudo dpkg --configure -a17:45
davhoui did an upgrade recently to 16.0.217:45
zygadavhou: what does that do?17:45
davhou16.04.217:45
zygadavhou: that file looks like a partial update occured17:45
davhouok, so you want a diff of those 2 files you asked me to ls ?17:46
zygayes, please!17:46
davhouok17:46
zygaand then do the dpkg --configure -a17:46
davhoucoming up in pastebin, one sec17:46
zygaI suspect it will finish configuring snap-confine17:46
davhouok17:46
zygaand the issue will go away17:46
zygaor you had a prompt during upgrade17:46
zygaand it asked you what to do17:46
zyga(which is terrible)17:46
nacczyga: nice catch17:46
zygathen you got a default reply 'keep the locally installed file'17:46
davhouI suspect you are right17:46
zygawhich is equal to "break snapd"17:47
davhounice17:47
davhouthose are not easy ?s to answer...17:47
zygayep17:47
zygawe should move this file out out etc17:47
zygait's a constant pain17:47
zygajdstrand: ^^ FYI17:47
davhouhttps://paste.ubuntu.com/24606043/17:48
zygalooking17:48
zygaha17:48
zyga:)17:48
zygaso17:48
zygato fix your immediate issue17:48
zygasudo dpkg --configure -a17:49
zygaand see if that does anything17:49
davhouit's setting up and processing a bunch of things...17:49
zygayour upgrade was interrupted somewhere17:49
davhouok17:49
zygadavhou: it can cause your system not to boot in extreme cases17:50
zygadavhou: once that is done17:50
zygadavhou: follow up with "sudo apt-get dist-upgrade"17:50
zygadavhou: as more packages are bound to be updated17:50
zygadavhou: this is just finishing what was started, updated partially, and not finished17:50
davhoui was experiencing some odd video scaling that i could not explain17:50
davhouhopefully this will help that also17:50
zygaI bet it will17:50
davhouok, will follow up as asked when this is done17:51
zygadavhou: good luck :)17:51
davhouthanks for all your help zyga and ogra_17:51
zygao/ :-)17:52
adfad666pardon the interruption, can someone point me towards a device repo that also builds u-boot, i'm used to bringing up android devices but ubuntu snappy is a whole new world for me, looking for something to study17:52
zygaadfad666: I think you want to talk to ogra_ ::)17:52
zygaadfad666: look at github.com/snapcore/pi2-gadget17:53
zygaadfad666: but that is not building it from source _I think_17:53
zygaanyway, ogra is the man to talk to17:53
adfad666thanks, i'll take a look at that17:54
davhounoticed this during --configure -a17:54
davhouInstalling new version of config file /etc/apparmor.d/usr.lib.snapd.snap-confine.real ...17:54
zygadavhou: see :")17:54
zygadavhou: that will fix your snapd17:54
davhouawesome17:55
zygadavhou: this is essentially telling you that the file that was unpacked is now moved to the place where it was supposed to be17:55
davhouok17:55
zygadavhou: but because the binaries were done earlier it was all broken17:55
davhoumakes sense17:55
zygadavhou: dpkg cannot handle that better unfortunately17:55
davhounot sure why I didn't realize the upgrade was interrupted somehow17:56
davhouguess the hammer was too small : - )17:56
* zyga needs to help with the kids, ttyl17:56
davhouif there was one17:56
davhouk17:56
davhouzyga, I had success with running 'snap run simplenote' after 'dpkg --configure -a' & 'sudo apt-get dist-upgrade' !18:12
davhouzyga, Again, thanks for all your help in helping me to resolve the issue18:13
mcphailIs there a plugin for a repo with a "debian" directory to automatically resolve dependencies etc in snapcraft, or does it always have to be done by hand?18:27
Chipacadavhou: FWIW if you can train yourself to use "apt" instead of "apt-get", things are much better (plus it's nicer in a lot of other ways)18:27
Chipacakyrofa: ^ mcphail's is for you :-D (I think?)18:28
Chipacaas for me, I'm EOW'ing18:28
mcphailChipaca: have a good weekend18:29
Chipacamcphail: you too!18:30
ChipacaI've got a new guitar to play with, so the weekend is looking good18:30
Chipaca:-D18:30
mcphailWhat did you get?18:30
Chipacamy first electric!18:31
mcphailHa! You'll find it so much more fun than acoustic, and much easier to play. Enjoy!18:32
Chipacaan ibañez S52118:32
Chipacawent in looking at a fender telcaster thinline, but ended liking this one better18:33
mcphailOne of my mates used to swear by ibanez. He could make it make ridiculous sounds. Have a lot of fun and turn it up to 1118:34
kyrofamcphail, Chipaca sorry I missed your ping! Busy day!18:36
kyrofamcphail, you mean if the snapcraft.yaml is in the same tree as the debian dir?18:37
mcphailkyrofa: yes. is it possible to cheat and use the debian dir?18:39
kyrofamcphail, not by default, but you can probably write something really simple that uses python-debian to do it18:40
mcphailkyrofa: ok. Cheers18:40
mcphailkyrofa: i'm really just being lazy ;)18:41
kyrofamcphail, snapcraft depends on python3-debian, so it should always be there18:41
kyrofamcphail, well, who wants to maintain that list in two places? I hear ya18:41
mcphailI thought there was chat about a tool to automagically snappify debian packages, but I may be misremembering18:43
kyrofamcphail, I think that was taking an already-built deb, which is easy18:44
mcphailaah. ok.18:44
niemeyerNeed to step out for an errand and school run.. will be back later today18:51
mupPR snapcraft#1325 closed: cli: proper error for failed snap command <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1325>18:59
mupPR snapcraft#1324 closed: Revert "tests: remove the reusable parts tour test (#1321)" <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1324>19:50
mupPR snapcraft#1326 opened: Release changelog for 2.30 <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/1326>20:47
mupPR snapd#3362 opened: Timedatectl <Created by tyhicks> <https://github.com/snapcore/snapd/pull/3362>22:04
mupPR snapd#3363 opened: cmd: test everything (100% coverage \o/) <Created by chipaca> <https://github.com/snapcore/snapd/pull/3363>22:28
mupPR snapd#3362 closed: Allow snaps to use the timedatectl utility <Created by tyhicks> <Closed by tyhicks> <https://github.com/snapcore/snapd/pull/3362>23:13
mupPR snapd#3364 opened:  Allow snaps to use the timedatectl utility <Created by tyhicks> <https://github.com/snapcore/snapd/pull/3364>23:20

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