/srv/irclogs.ubuntu.com/2020/04/16/#snappy.txt

mborzeckimorning05:47
mborzeckimvo: hey06:16
mvohey mborzecki06:17
mborzeckimvo: idk if you've seen https://github.com/snapcore/snapd/pull/8325#issuecomment-61422344806:17
mupPR #8325: snap-bootstrap: copy auth data from real ubuntu-data in recovery mode <UC20> <Created by mvo5> <https://github.com/snapcore/snapd/pull/8325>06:17
mvomborzecki: how are the tests today?06:17
mvomborzecki: not seen yet, looking06:17
mvomborzecki: oh no :(06:17
mvomborzecki: I wonder if the initrd really "reads" what we ask it to mount or if it has it's own list of things to mount06:18
mborzeckion a side note, i tried some tricks with snap-store and zoom-client snaps, sice one only renders boxes and theother just segfaults on arch (backtrace points to something fonts related)06:20
mborzeckimounting a clean tmpfs over /etc/fonts so that it dones't pick up anything from the host does not change anyting so still no luck :(06:20
mvomborzecki: hrm, hrm, this is strange, does mounting tmpfs over the fontcache dirs also yield no results?06:22
mborzeckimvo: first thing i tried ;)06:23
mvomborzecki: heh - I suspected that. sad :(06:27
mvomborzecki: also strange what is bleeding into the namespace06:27
mupPR snapd#8506 closed: Add libnvidia-opticalflow as Nvidia library <Created by joedborg> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/8506>06:32
mupPR snapd#8497 closed: boot/bootstate20: re-factor kernel methods to use new interface for state <UC20> <Created by anonymouse64> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/8497>06:46
zygahey06:57
zygawhat's up guys?06:57
* zyga is feeling terrible 06:58
mborzeckizyga: hey06:58
zygasince 5AM I'm awake and blowing my nose every 20-40 seconds06:58
zygasomething I'm allergic to is blooming06:58
zygamborzecki: jamie asked us to review the base permissions PR06:59
mborzeckimhm, added myself there06:59
pstolowskihi07:01
mborzeckipstolowski: hey07:01
zygahey pawel07:12
zygaI will start late07:12
zygasorry07:12
mborzeckijamesh: any idea whether the cache namespace is still per job when a matrix setup is used?07:16
jameshmborzecki: I'd assume it is shared.  Or is the real question whether matrixed jobs have their own github.job value?07:18
mborzeckijamesh: that or whether a different combination of matrix elements is a new job, thus a new namespace(?) or still the same job, so a shared namespace07:20
jameshmborzecki: a job is a unit of work deployed to a single runner, so the matrix expands to multiple jobs07:21
mborzeckijamesh: can check that by pushing code but wanted to ask you first, since i seems you've been on that road already :P07:21
mupPR core18#150 closed: static: make /etc/dbus-1/session.d writable <Created by jhenstridge> <Merged by mvo5> <https://github.com/snapcore/core18/pull/150>08:05
* zyga is unable to work for some time08:09
* zyga loves summer but sometimes hates the spring08:15
mborzeckiquitk errand, back in 3008:27
mupPR snapd#8507 opened: packaging: fix build on Centos8 to support BUILDTAGS <Created by mvo5> <https://github.com/snapcore/snapd/pull/8507>09:07
mborzeckire09:17
pstolowskimvo: hey, i've found out some more about my yesterday's problem (and also recreated the image from the spread test locally). i think that for some reason the extra user defined by cloud init data is not copied to extra-users (but sshd actually works) - as if messing with /etc wrt early config somehow affected cloud init (?)09:21
mvopstolowski: meh, sorry, I did not really managed to look at this yet, can ypu please paste the link again? so sorry09:22
pstolowskimvo: system-data/var/lib/cloud/seed/nocloud-net/ on the image looks ok to me, afaict09:23
pstolowskimvo: no worries, i know it was late yesterday09:23
pstolowskimvo: https://github.com/stolowski/snapd/tree/core18-early-config09:23
mvopstolowski: aha, that is interessting, can you share the image via gdrive or something? if you boot it with "systemd.debug-shell=1" do you see anything interessting in the cloud-init logs that may indicate what went wrong?09:30
pstolowskimvo: let me try; sure i can upload it09:32
* zyga found some anti-allegric meds 09:33
mvopstolowski: maybe first poke a bit with the debug shell but if you don't find anything I can poke a bit too09:34
pstolowskimvo: yes, looking, thanks09:34
mvopstolowski: the general rule is that if there is a "clash" of files/dirs in /snap/core18/current/... with the dir in the image and writable-path then there is aproblem09:34
mvopstolowski: i.e. if there is /var/lib/cloud in writable-path and there is such a dir in core18 with relevant data and the image also creates it09:35
mvopstolowski: does that explaination make sense? if not, we can have a quick HO09:35
pstolowskimvo: yes, makes sense09:42
* zyga gets to work09:42
pstolowskimvo: passing systemd.debug-shell=1 to kernel commandline has no effect (no extra tty created for it), is it expected to work with core?10:03
zygatry _10:03
zygapstolowski: it changed across versions10:03
zygapedronis: systemd.debug_shell=110:03
zygaer10:03
zygapstolowski: ^10:03
zygasorry pedronis, bad tab complete10:03
mvopstolowski: it should work, this is core or core18 ? but in either case it should work :(10:04
pstolowskimvo: core1810:04
* mvo quickly double checks10:04
zygamvo: ^^^^10:04
zygamvo: systemd.debug_shell=110:04
pstolowskiah underscore?10:05
zygacat /snap/core18/current/lib/systemd/system/debug-shell.service and man systemd-debug-generator10:06
zygayes10:06
zygait used to be -10:06
zyganow it is _10:06
mvopstolowski: fwiw on uc18 https://photos.app.goo.gl/UfrQFWkfRhAaEqNC6 works for me10:06
zygamvo: https://github.com/systemd/systemd/blob/master/src/debug-generator/debug-generator.c#L6210:07
mvozyga: sure, just saying this works on uc1810:08
zygasure :)10:08
zygashame old value doesn't work10:08
mvozyga: yeah, it seems strange to break backwards compat10:08
mvozyga: oh well10:08
mvozyga: otoh, it's just a debug value10:08
pstolowskimvo: and you're getting a tty9 with a debug shell?10:15
mvopstolowski: yes10:16
mvopstolowski: not sure which one, I just use alt-arrow to cycle through them10:17
pstolowskimhmm10:17
pstolowskimvo: yes, it works, thank you! i had to run qemu with its ui; for some reason with -nographic it wouldn't work (i was using sendkey .. from the monitor)10:34
mvopstolowski: ok10:36
mupPR snapcraft#3045 opened: grammar: pick from properties if attributes not in the plugin <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/3045>10:55
pstolowskimvo: so it appears that cloud-init is not executed at all (no logs in /var/log/). only when i start cloud-init service manually it creates extra-users. i could see that /var/lib/cloud was mounted at boot time10:58
pedronispstolowski: anything interesting in /etc/cloud ?11:01
mupPR snapd#8508 opened: github: run all spread systems in a single go with cached results <Skip spread> <⛔ Blocked> <Created by mvo5> <https://github.com/snapcore/snapd/pull/8508>11:06
mvopstolowski: what does /etc/cloud look like? any "nocloud" files anywhere?11:08
pedronismvo: I am a bit confused by the caching branches, shouldn't the test be re-run if there were more commits to the PR?11:18
pstolowskipedronis, mvo : cloud.cfg, ds-identity.cfg, templates and cloud.cfg.d11:19
mvopedronis: they will be11:21
mvopedronis: it's all a bit mood right now anyway because there is a bug11:21
pedronispstolowski: is there anything in /run/cloud-init ?11:21
pstolowskipedronis: yes, cloud.cfg, enabled, and two .log files. fwtw i run cloud-init service manually, should i check this directory  right after boot of my pristine image?11:24
=== alan_g is now known as alan_g_
pedronispstolowski: yes11:25
pstolowskipedronis: it looks the same11:43
pedronispstolowski: look at the log files then, something cloud-init run11:45
pstolowskipedronis: there are no logs from cloud-init until i manually systemctl restart cloud-init (as if it wasn't run during the boot)11:47
pedronispstolowski: sorry, then didn't look the same11:48
pedronispstolowski: there's only an empty directory for /run/cloud-init? no directory? only ds-indentify stuff?11:48
pstolowskipedronis: /run/cloud-init & /etc/cloud look the same (and run/cloud-init has two .log files). but there are no logs under /var/log unless i start cloud-init manually11:50
pedronispstolowski: sorry, I mean to look at the logs in run/cloud-init11:50
pedronisI know you said there are no /var/logs11:51
pstolowski"Found single datasource: NoCloud"  in ds-identify.log; relevant?11:54
pedronisyes, but that's just expected11:55
pedronisit means it will look at user-data etc in the usual places11:55
pedronispstolowski: mvo: also our early does debug-shell run?12:07
pedronisit might just be normally too early?12:08
pedronisfrom the description it sounds like it's meant ot run very12:09
pedronisearly12:09
pstolowskipedronis: fwtw i see 'Cloud-init target reached' as one of the last messages on tty1; the other tty has console-conf waiting12:10
mupPR snapd#8502 closed: github: try caching test results <Skip spread> <Created by bboozzoo> <Closed by mvo5> <https://github.com/snapcore/snapd/pull/8502>12:10
mborzeckiehh bummer12:10
mvomborzecki: well, it's not all lost, once the github cache thing is fixed we will land this!12:11
mborzeckimvo: thanks for trying! subscribed to https://github.com/actions/cache/issues/20812:14
emitorinogood morning all12:18
pedronispstolowski: can you remind me? we are trying to debug why ssh doesn't work right?12:28
pstolowskipedronis: yes. but sshd works, just user doesn't get created12:28
pedronispstolowski: ok, maybe we can do a HO sharing a screen and I can help more?12:30
pstolowskipedronis: and it seems the be happening when i add defaults: to gadget. although i probably need to re-try without defaults again12:30
zygaI made good progress today12:32
zygaI'm writing actually useful dbus tests now12:32
zygaI'll split this off this effort and propose separately after the standup12:32
pstolowskipedronis: sure, appreciate it12:33
pstolowskipedronis: is after standup fine?12:36
pedronispstolowski: might after a short break after the standup12:37
pstolowskiok12:37
cmatsuokaijohnson: does this look like the same snap upgrade problem you investigated? https://bugs.launchpad.net/snapd/+bug/187326012:46
mupBug #1873260: All installed snaps are broken after upgrading to Focal <snapd:New> <https://launchpad.net/bugs/1873260>12:46
ijohnsoncmatsuoka: no that looks slightly different on the surface12:53
ijohnsoncmatsuoka: I'll respond though12:53
cmatsuokaijohnson: thanks12:54
mupPR snapcraft#3045 closed: grammar: pick from properties if attributes not in the plugin <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/3045>13:05
zygaijohnson: there's a bug for this issue but I cannot find it now13:13
ijohnsonzyga: you mean the stale snapd tools in the mount ns ?13:13
zygayes13:13
ijohnsonk, let me know if you find it but if not I'll just file a new one sometime today13:13
zygaok13:13
zygait's just a pretty old bug as we went to core18 with it13:13
mupPR snapcraft#3044 closed: build providers: use ubuntu-ports mirrors for non-x86 platforms <Created by cjp256> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/3044>13:14
zygaijohnson: let's open a new one13:20
zygaijohnson: perhaps it is reported on the forum, not in the tracker13:20
zygaor may have been reported in github while we still had issues13:20
zygaI think it must be the forum13:20
zygabecause we discussed ideas there13:20
zygahttps://forum.snapcraft.io/t/injecting-snapd-tools-into-base-snaps-and-keeping-them-up-to-date/1213913:20
zygaijohnson: ^^^^13:20
zygaand you commented on it as the last person :)13:21
ijohnsonright I remember your forum topic13:21
ijohnson:-)13:21
zygaplease link it to the bug13:21
zygaand we should really make some progress and fix it13:21
zygait will affect all core18 and core20 systems13:21
ackkhi, is this somehow intentional or should I file a bug about it: https://paste.ubuntu.com/p/5pxZwTYgx3/ ?13:34
ackk(inside a snap run --shell for a strictly confined snap)13:35
ijohnsonackk: yes because `test -r` will use the `stat`syscall which we always allow13:37
ackkijohnson, won't that break stuff as if you test that you can read something and then try to read it, it fails?13:39
ijohnsonackk: I'll defer to jdstrand and/or zyga on why stat is always allowed, I don't recall the why, I just recall that it is13:39
zygaackk: stat is always allowed by apparmor13:39
zygaackk: it's not mediated IIRC13:40
zygaackk: (by apparmor)13:40
ackkzyga, so it ends up lying because the policy is actually only enforced on open() ?13:40
zygaackk: and you are correct, there is even a comment somewhere in the LSM stack about this13:40
zygayes13:40
ackkI see13:40
ijohnsonzyga: you mean stat is always allowed by seccomp13:40
ackkzyga, side, note, why is /etc/issue not readable? :)13:41
zygaackk: as in, not allowed by the policy?13:41
zygabecause anything that was allowed by the policy would be something we have to keep13:41
zygaso it was used as a way to limit what we need to keep across core revisions13:41
zygaso if you cannot read it, it's not "ABI"13:42
zygaas to issue specifically13:42
zygajust nobody asked?13:42
zygaijohnson: seccomp separately13:42
zygaijohnson: but apparmor just says "yes" to stat13:42
ijohnsonright that's what I meant sorry we are in agreement13:42
zygaijohnson: right13:42
ackkzyga, out of curiosity is that something that apparmor plans to fix (returning the truth in stat) or is that not possible?13:45
zygaI don't know13:46
zygaperhaps jjohansen or jdstrand can respond13:46
zygait's possible, it's just code13:46
ackkSMOP :)13:46
zygasmop?13:46
ackksmall matter of programming13:46
zygahaha13:46
zygaand upstreaming13:46
zygaSmall matter of sending it to the LKML and getting it merged ;)13:47
ackkzyga, I meant more, not doable as filtering stat() might heavily affect performance or something13:47
zygaIIRC selinux does this13:47
ackkI guess it'd have to do a bunch of extra checks13:47
ackkoh, I see13:47
jdstrandackk: we used to mediate it but found that basically everything needed it and required large-scale policy changes13:49
jdstrandthere is a bug on it. let me see if we can find it13:50
jdstrandhttps://bugs.launchpad.net/apparmor/+bug/165543513:50
mupBug #1655435: stat() unconditionally allowed via apparmor_inode_getattr() <AppArmor:Triaged> <https://launchpad.net/bugs/1655435>13:50
ackkjdstrand, thanks13:51
jdstrandit's possible to fix with a number of changes13:51
zygaackk: are you using stat or access?13:52
ackkzyga, I saw the issue in a bash script that was doing pretty much the same thing as my paste13:56
ackkit seems test uses stat()13:56
mupBug #1873276 opened: Deliberate use of 'partial confinement' in order to mean 'unconfined' <selinux> <Snappy:New> <https://launchpad.net/bugs/1873276>13:57
zygaI'm off for lunch13:57
mupBug #1873276 changed: Deliberate use of 'partial confinement' in order to mean 'unconfined' <selinux> <Snappy:Invalid> <https://launchpad.net/bugs/1873276>14:09
pstolowskipedronis: do you have a moment now?14:51
pedronispstolowski: yes, sorry the after standup was long and needed a break14:52
pedronispstolowski: I'm in the standup HO14:54
pstolowski1 sec14:54
ijohnsonmvo: lxd latest/candidate snap is unbroken so I think we can merge #8505, the only unfailed test there is from an unstable system14:58
mupPR #8505: spread.yaml: switch back to latest/candidate for lxd snap <Test Robustness> <⛔ Blocked> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/8505>14:59
mvoijohnson: cool, looking15:00
mupPR snapd#8505 closed: spread.yaml: switch back to latest/candidate for lxd snap <Test Robustness> <Created by anonymouse64> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/8505>15:01
ijohnsonthanks mvo15:01
mupPR snapd#8356 closed: cmd/snap: Implement a "snap routine file-access" command <Created by jhenstridge> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/8356>15:35
mupPR snapcraft#3043 closed: package-repositories: initial schema and meta read/write support <Created by cjp256> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/3043>15:50
jjohansenzyga, ackk: we would love to fix the whole stat issue, doing so however requires us to get a patch upstream that some people are fundamentally opposed to15:55
jjohansenwe haven't tried recently, it is something we should circle around to and try again15:56
zygaI solved the dbus signature issue16:00
zygamaking more progress now16:00
zygaijohnson: not for me, but perhaps ackk has some priority there16:00
ijohnsonzyga: sorry missed the context, what's up?16:01
zygaer, jjohansen ^16:01
zygasorry I'm bad at tab completion apparently:)16:01
zygaor perhaps my body tells me to make coffee16:01
zygaor both16:01
jjohansenzyga: ?16:06
jjohansenI was responding to "(06:45:48 AM) ackk: zyga, out of curiosity is that something that apparmor plans to fix (returning the truth in stat) or is that not possible?16:07
jjohansen(06:46:03 AM) zyga: I don't know16:07
jjohansen(06:46:15 AM) zyga: perhaps jjohansen or jdstrand can respond"16:07
* cachio lunch16:07
jjohansenyes it is just code, yes we would love to fix it, no it isn't happen soon because there are people upstream who are opposed to it16:07
jjohansenit is one of the abilities we lost when upstreaming16:08
jjohansenso 12 years ago apparmor actually did mediate stat and access16:08
pstolowskipedronis: i've created a clean core18 with cloudinit data and diff'ed system-data before and after first boot; and the problematic image is missing those https://pastebin.ubuntu.com/p/CgdTHzTXkz/16:31
pstolowskipedronis: now need to find: why :/16:31
* pstolowski afk16:33
jdstrandthanks jjohansen :)16:43
pedronismvo: ^ what Pawel mentioned seems writable path related17:20
mvopedronis: totally, let me have a HO with him in the morning17:24
mvopedronis: setup a meeting with him for this17:25
pedronismvo: we created something in /etc/systemd/system in the image and /etc/systemd is one of the things handled by writable-paths17:30
pedroniswe do the same with /etc/cloud but that has a strange comment in in the writable-path config17:30
mvopedronis: yes, that is exactly my suspicion17:32
mvopedronis: if mode is not "synced" dirs that exist will be ignored17:32
pedronismvo: but if I understand the issue is kind of the reverse, the problem is that /etc/systemd/system is not empty in core1817:37
pedronis(not that we can fix that easily)17:37
mvopedronis: so we create a /dev/null link in /etc/systemd/system/rsyslog.service in the image already, right? that's what pawel is doing in this test?17:43
pedronismvo: yes17:43
pedronisis not the test code to be clear, it's actual configcore code run early17:44
mvopedronis: then it all makes sense, sorry, I should have had this conversation with him earlier :( https://paste.ubuntu.com/p/CwkSnnGgqB/17:44
mvo 17:44
mvopedronis: this would fix it but the price is high17:44
mvopedronis: I think we need to ponder what to do17:45
pedronismvo: I think, yes, that's what we need17:45
pedronisanyway the commetn about /etc/cloud is also obsolete17:45
pedronisI think your code17:45
pedronisalso need /etc/cloud synced17:45
pedronisthat one is already mark as synced though17:45
mvopedronis: let's talk tomorrow, I need to get dinner but I really want to explore what we can do, setting syned has it's own issues17:47
pedronismvo: yes, just making clear that we have the same kind of issues both for /etc/systemd and /etc/cloud17:47
pedronisit's not just pawel new code17:48
pedronismvo: I mean this code https://github.com/snapcore/snapd/blob/master/overlord/devicestate/handlers_install.go#L105 and the same kind of code in bootstrap17:49
pedronismvo: both the base and potentially writable have files to put there17:50
mupPR snapcraft#3041 closed: V2 python plugin <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/3041>18:05
* zyga -> dinner18:27
mupPR snapcraft#3046 opened: plugins: introduce v2.GoPlugin <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/3046>18:48
sergiusenszyga: stgraber lately I daily experience "Error: websocket: close 1006 (abnormal closure): unexpected EOF" which kicks me out of my "lxc exec"... is this new behavior expected?19:07
stgrabersergiusens: this isn't a new behavior, it happens when LXD reloads, usually because of a refresh19:08
stgraberif this didn't happen because of an auto-refresh, then there may be an associated LXD crash we'd want to look at19:09
sergiusensstgraber: container itself is not killed, right? If I were ssh'ed in I wouldn't see it19:09
stgrabersergiusens: correct19:09
stgraberwe never restart containers on refresh even during upgrades, but anything connected to the daemon over the REST API does get disconnected which includes exec sessions19:09
stgraberwe've considered some options around that but they all kinda suck19:10
sergiusensstgraber: refresh happened 10 minutes ago, coincides with this event, so no worries and carry on19:10
stgraberwe could have a grace period and have the daemon tell you you're about to disconnect due to refresh19:10
stgraberbut we have no idea how to tell you that without injecting stuff in your terminal19:10
stgraberwhich is a very bad idea on its own :)19:10
sergiusensthat would be nice, if only to save my bash history19:10
stgraberas people redirect "lxc exec" to various things, including netcat, files, disk, ... so having it ever write something other than what you expect or an error would be a big issue19:11
sergiusensyeah, this would need some snapd/desktop intergration that you could hook into (for the local scenario)19:11
stgraberyeah, if the user who's logged in on a desktop happens to be in the lxd group, then we could in theory hold on the restart, notify them that they have 10min to disconnect all pending exec sessions, then continue19:13
stgraberwe do have the API in place to list all ongoing exec sessions (lxc operation list) so it's pretty much just packaging at that stage19:13
ijohnsonstgraber: well also if there was refresh app awareness, then you wouldn't get refreshed automatically if there's an `lxc exec` process running19:13
stgraberijohnson: oh no, we definitely do want to kill those eventually19:14
stgraberijohnson: a security fix in a service running as root and listening to the network, definitely trumps the inconvenience of having to re-connect to an exec session :)19:14
ijohnsonsure, but you could at least defer a refresh for some amount of time while there are things running19:14
sergiusenswith refresh app awareness, snapd would not trigger the refresh at all, so not sure you have a say in that if someone enables it19:15
ijohnsonsergiusens: there will also be an api for a snap to be notified or query if there is a pending refresh19:15
zygalxc is capable of escaping all tracking19:15
* zyga is afk19:15
ijohnsonwell true, lxc is it's own special snowflake when it comes to snapd features I guess19:16
stgraberthe `lxc` command doesn't do any bypass that I'm aware of (other than apparmor) so yeah, that'd work, unless your LXD is clustered in which case as soon as any of the cluster nodes detects a new revision, they all self-refresh whether you like it or not19:16
stgraberbut yeah, some kind of grace period on LXD shutdown when we have ongoing operations is probably fair19:17
* stgraber adds to ideas list19:17
pedronisyes, there will be ways to be aware, though I think we need to redefine our thinking there, because there is some assumptions about a user being present19:17
pedronisthe design of that feature which is still wip, was driven more by desktop apps19:18
mupPR snapd#8509 opened: boot/bootstate20: small changes to markSuccessful <Simple 😃> <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/8509>19:19
ijohnsonpedronis: I opened ^ because it's a simple thing, but could be considered a behavior change so I wanted to make it easy to review19:19
pedronisijohnson: it doesn't read as simple at all, also how can it be a behavior change if no tests changed19:24
ijohnsonpedronis: it's not a behavior19:25
ijohnsonchange19:25
ijohnsonsorry maybe I should not move the comment in this PR19:25
pedronisijohnson: also remember that Marksucceful is called on all kind of boths19:26
pedroniseven non successful ones19:26
pedronisit has kind of a bad name19:26
pedroniss/boths/boots/19:27
ijohnsonpedronis: but is there any situation where MarkSuccessful shouldn't result in having DefaultStatus at the end of it?19:27
ijohnsonpedronis: because that's the current behavior, I'm just making that decision to always set DefaultStatus more obvious by not making that decision in commit() and instead making that decision in markSuccessful() proper19:28
pedronisijohnson: I'm just saying that you are adding a large commit that sounds like mark successful19:28
pedronisis there only for successful boots19:28
pedroniss/commit/comment19:28
pedronisthat is not true19:29
ijohnsonmmm, I guess in my mind, a "successful" boot is one where we get to userspace with some boot snap combo19:29
ijohnsonand thus we get to call MarkSuccessful19:29
ijohnsoneven if the overall operation of upgrading a boot snap failed, we still eventually successfully booted something19:30
pedronisyes, but as I said the terminogy is confusing here19:31
pedronisit's very old19:31
pedroniswe need to be careful not to give the wrong impression19:31
ijohnsonokay, so instead of renaming all markSuccessful ish things here how about I just adjust the comment that says "always set the commit status on the bks on the bootStateUpdate we return to be empty"19:31
ijohnsonto say something like:19:32
pedronisbasically I'm not sure this PR is an improvement19:32
pedronisit adds even more action at a distance19:32
ijohnson"set the kernel status to be default again because we booted some kernel snap"19:32
pedronisbut I'm probably missign the simplification that comes with it19:32
ijohnsonpedronis: the simplification is that right now, the decision to always set kernel_status to default after calling MarkSuccessful is done in commit()19:33
ijohnsonpedronis: I thought that was confusing because if you just read markSuccessful you won't get that impression19:33
ijohnsonpedronis: so instead I thought let's make that more obvious and explicit by doing it in the markSuccessful function instead of commit()19:33
ijohnsonas I said there isn't an actual behavior change, in my mind this is just making it more obvious what we are doing19:34
ijohnsonif we are doing the wrong thing right now, then perhaps that's justification enough that we should never have made that decision to do that in commit() in the first place19:35
ijohnson(because it wasn't obvious)19:35
pedronisijohnson: I think the issue is more that markSuccefulKernel is strange19:35
pedronisI probably didn't notice it yesterday19:36
ijohnsonpedronis: well right now that function is just markSuccessful19:36
pedronisbut remember that my plan was not to attach commitKernelStatus to that level19:36
pedronisso it's a bit different from my original idea19:36
ijohnsonmm I guess it is19:37
pedronisit's not a problem, but reading it again in the new context, it's clear that some bits are confusing19:37
ijohnsonafter looking at it more I conclude that it's clear that it's unclear19:37
ijohnsonwell anyways I don't really need this PR, it was just going to make things a bit nicer19:38
ijohnsonI think if this PR is going to cause us to rathole on what it means to mark something successful it's probably not worth the time right now19:38
pedronisbasically this if is odd:  bks.commitKernelStatus != bks.currentKernelStatus19:39
pedronisgiven that then we pick a constant inside it19:39
pedronisI don't think setting commitKernelStatus helps though19:39
ijohnsonpedronis: well in the PR I just opened that if looks much more sane19:40
pedronisyes in some way, no in others19:40
ijohnsonif bks.commitKernelStatus != bks.currentKernelStatus { ... use bks.commitKernelStatus19:40
ijohnsonwe're not using a constant there anymore19:40
pedronisI know19:41
ijohnsonokay how about this, should I just get rid of commitKernelStatus on extractedRunKernelImageBootloaderKernelState and instead carry that on bootState20Kernel instead ?19:41
ijohnsonthen markSuccessfulKernel() takes in the status to set as an arg like you originally watned?19:41
ijohnson*wanted19:41
pedronisijohnson: well, it's always going to be DefaultStatus, as far as we understand, right?19:42
pedronisso we don't need to pass it to it I suppose19:42
pedronisbut we do need to pass it in to the other method19:42
ijohnsonpedronis: what I don't want is to have the constant inside markSuccessfulKernel19:42
ijohnsonbecause that function is only called from commit()19:42
ijohnsonit feels weird to me that commit() is essentially making that decision to always use DefaultStatus19:42
pedronisit's a commit of a given operation, is not a general commit19:43
pedronisone can see it both ways19:43
ijohnsonmmm again it seems we have something that is clearly unclear19:44
pedronisijohnson: the issue really, is this, the idea of commit comes from the bootstate16 work19:44
pedronisthere commit is fairly generic19:44
ijohnsonyes19:44
pedroniswe lost that property in bootstate2019:45
pedronisso in obvious (constants) and non obvious ways19:45
pedronisthere are some assumptions and semantics encoded in the commits19:45
pedronisthat are operation related19:45
pedronisso as long at ther is this hybridity I'm just not seeing a big win moving things before or later than the commit19:46
pedronisas long as the behavior is correct and explained19:47
pedronisbut that might just be me19:47
ijohnsonyes this hybridness does make things a bit weird19:47
ijohnsonI'm not sure, but let me frame the question this way, do you want me to refactor the setNextKernel to take in the status ?19:48
pedronisyes19:48
ijohnsonokay, so then let me make a symmetry argument and let's just make markSuccessfulKernel take in a status too?19:49
pedronisI'm ok with that, is not strictly necessary but that's ok19:49
ijohnsonok19:50
pedronisijohnson: notice that we don't this for the base either, the state is hard coded in commit19:53
ijohnsonyes I'd say that's just as wrong as kernel tbh19:54
pedronisas I said, given how we organized is not wrong or not wrong19:54
pedroniscommit is not generic19:54
pedroniswe have 3 of them19:54
ijohnsonI mean looking at the doc-comment for commit() it says "bootStateUpdate carries the state for an on-going boot state update. At the end it can be used to commit it"19:55
ijohnsonit doesn't feel like the commit() method on bootStateUpdate should really be making decisions, it should just take the state that's already in bootStateUpdate and then commit it19:55
pedronisijohnson: if we followed the spirit of that, we would have one commit implementation19:56
pedroniswe don't19:56
pedronisas I said, is not wrong or not wrong19:56
ijohnsonwell I'd say the reason we don't have one commit implementation is for robustness reasons19:56
ijohnsonwe can't commit everything in the same order and always be robust19:57
pedronisI say, it's more for readability19:57
pedroniswe could have one commit19:57
pedronisit would be not very readable19:57
ijohnsonfair19:57
ijohnsonanyways 8509 now passes in status and I unmarked "Simple" :-)19:58
pedronisijohnson: I commented, I still don't think that the comment on the interface method trumps the realities of the actual implementations' code, also less state manipulation is almost always a win in my book20:42
mupPR snapd#8509 closed: boot/bootstate20: small changes to markSuccessful <UC20> <Created by anonymouse64> <Closed by anonymouse64> <https://github.com/snapcore/snapd/pull/8509>20:51
ijohnsonpedronis: I don't think it's productive for either of us to pursue this more right now, I will have another PR which just makes the comment move change I wanted20:52
pedronisijohnson: I think the changes to the interface where fine and improved things (less places carrying state)20:53
ijohnsonsure I will just do that change then20:53
mupPR snapcraft#3047 opened: repos: fix returned strings for install_stage_packages() <Created by cjp256> <https://github.com/snapcore/snapcraft/pull/3047>21:03
mupBug #1873363 opened: openvswitch interface support for ovs-appctl <Snappy:New> <https://launchpad.net/bugs/1873363>22:12
mwhudsonhow can i see the base for an installed snap?22:19
mwhudsonif i say snap info <snap> it's talking to the store22:19
mwhudsonah meta/snap.yaml22:20
mupPR snapd#8510 opened: boot/bootstate20: small changes to bootloaderKernelState20 <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/8510>22:37
pedronisijohnson: thanks ^22:41
ijohnsonpedronis: np, I am close to opening up the next PR which is a big refactor of the tests to enable easy writing of the new tests for the uc16 style bootloader22:42
pedronisijohnson: great, I should really go to rest here though22:45
ijohnsonof course, have a good night, talk to you tomorrow22:46
=== msalvatore_ is now known as msalvatore
mwhudsonis there a way to see the base of a snap from a non-default channel?23:02
mwhudsoni.e. something like snap info --channel, but that doesn't exist23:02
ijohnsonmwhudson: do you mean for a snap that's not installed?23:19
mupPR snapd#8511 opened: tests/boot: refactor to make it easier for new bootloaderKernelState20 impl <Test Robustness> <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/8511>23:21
mupPR snapd#8512 opened: boot/bootstate20: add pure bootenv bootloader implementation <Test Robustness> <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/8512>23:24
mwhudsonijohnson: yes23:31
mwhudsonijohnson: found a workaround though, download the snap and point info at that23:31
ijohnsonmwhudson: I don't think you can do that through any snap cmd, but you can get it through the store's json23:32
ijohnsonI just EOD'd so I don't have an example in front of me unfortunately23:32
mwhudsonijohnson: it's ok we thing :)23:32
mwhudson*think23:32

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