/srv/irclogs.ubuntu.com/2020/11/11/#snappy.txt

mupPR snapcraft#3366 opened: tools: split local environment setup from environment-setup.sh <Created by cjp256> <https://github.com/snapcore/snapcraft/pull/3366>00:00
mupPR snapcraft#3367 opened: requirements: pin pip to 20.1.1 for devel <Created by cjp256> <https://github.com/snapcore/snapcraft/pull/3367>00:00
mupPR snapd#9621 opened: many: address degraded recover mode feedback, cleanups <Simple πŸ˜ƒ> <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/9621>02:43
kinghatanyone know of a snap permission for chromium that one can enable to make PWAs/website shortcuts function properly?03:53
jameshkinghat: not at present.  The current method Chrome uses is to try and install .desktop files in a place where the shell will try and launch them.  Without any intermediation, that represents a pretty trivial sandbox escape.04:15
kinghati was fine with it the way it was before the snap. how do you revert?04:47
jameshYou may be able to get some of the shortcuts working by copying desktop files from ~/snap/chromium/current/.local/share/applications (I think) to ~/.local/share/applications.  I'm not sure if you'd need to fix up the Exec= line or not05:02
mupPR snapd#9540 closed: snap: add new `snap recovery --show-keys` option <Needs Samuele review> <Run nested> <Squash-merge> <UC20> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/9540>05:14
mupPR snapd#9619 closed: cmd/snap-bootstrap,o/devicestate: use a secret to pair data and save <Run nested> <UC20> <Created by pedronis> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/9619>05:19
mupPR snapd#9620 closed: spread.yaml: increase number of workers on 20.10 <Simple πŸ˜ƒ> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/9620>05:19
mupPR snapd#9622 opened: vendor: update to current secboot <Run nested> <Simple πŸ˜ƒ> <Created by mvo5> <https://github.com/snapcore/snapd/pull/9622>08:10
mupPR snapcraft#3361 closed: extensions: use SNAP_COMMON instead of SNAP_DATA for fonts <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/3361>09:27
mupPR snapcraft#3366 closed: tools: split local environment setup from environment-setup.sh <Created by cjp256> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/3366>09:27
mupPR snapd#9622 closed: vendor: update to current secboot <Run nested> <Simple πŸ˜ƒ> <UC20> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/9622>11:10
pedronismvo: I reviewed #9621, there's a small consistency problem afaict11:13
mupPR #9621: many: address degraded recover mode feedback, cleanups <Simple πŸ˜ƒ> <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/9621>11:13
pedronismvo: I can look into it after lunch11:16
dot-tobiasDoes the order inside a uc20 model definition's snaps header define the installation order? (I have multiple snaps that plug network-manager, and judging from the serial console output, nm is installed last if declared last in the array. That is not mentioned in the docs)11:21
mvopedronis: thank you11:31
ogradot-tobias, the order used to rule it in UC16-18 so i'd expect the same in UC20, put NM before the snaps using it in the list11:32
ogradot-tobias, if the app snaps are fully under your control and are services you can also follow what i just wrote here: https://forum.snapcraft.io/t/how-to-set-the-boot-order-for-snaps-after-reboot/13837/911:34
ogra(simply make them come up with disabled services and use hooks and "snapctl is-connected" to start the service when the interface is connected)11:34
ogras/is/is getting/11:35
pedronisdot-tobias: yes, for app snaps, the required-snaps/snaps order is the installation order11:50
dot-tobiasogra, pedronis: Thanks, booting an image with modified model atm, will see if that resolves the issue. Weird that there was no error during seed, was watching the serial console output and all hooks ran, or at least I didn't see an error … afterwards I was dropped to a login prompt (disabled console-conf), but the system-user assertion doesn't seem to be picked up.12:04
ograwell i generally use the hooks solution, that way you simply are not depending on the seed ordering and even if seeding of one snap fails it wont cause an avalanche of failure πŸ˜‰12:06
mupPR snapd#9623 opened: tests: set the opensuse tumbleweed system as manual in spread.yaml <Simple πŸ˜ƒ> <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/9623>12:11
dot-tobiasogra: It's less a service startup problem than it is an interface/install hook issue – and I can't defer those afaik πŸ˜… In my snap, these hooks attempt to create network-manager connections, so I guess the nm snap needs to be … installed? πŸ˜„ I've added a similar solution with `snapctl is-connected` to work around the issue that interface hooks run before the install hook when booting a custom image, but I can't really check either12:12
dot-tobias since my attempts to create a local user all fail πŸ™ˆ12:12
ograyou can always have a while/dπŸ‘‹sleep loop in your interface hooks ... for debugging your last resort is always cloud-init ... that should work for creating a user, even in UC2012:15
ogra(silly emoji plugin) ... "while,do,sleep"12:15
mupPR snapd#9624 opened: secboot: call BlockPCRProtectionPolicies even if the TPM is disabled <Created by chrisccoulson> <https://github.com/snapcore/snapd/pull/9624>12:16
ogradot-tobias, a cloud-init.conf i have used before (note the ssh key is moot) https://paste.ubuntu.com/p/jMVGrg5Cfm/12:17
ogra(i guess for UC20 the console-conf hack at the bottom wont work, rip that out)12:20
dot-tobiasogra: I meant that such a loop wouldn't let the hook finish, as they're run sequentially – so the β€œthing to wait for” would never happen if the respective snap wasn't installed before? Or am I missing something and things are run in parallel?12:20
ograoh, right12:20
ograno, you are correct, that would just hang the hook forever12:20
dot-tobiasogra: Phew πŸ˜„12:21
ograhttps://forum.snapcraft.io/t/remote-logging-on-ubuntu-core/14621 might also be an option (just seeding logsync-james, define the config in your gadget and receive the logs on a central machine running logsync-receiver), that way you'D get the logs but dont need a user12:23
ograit is definitely more effort than just using cloud-init and a user though12:23
ograand indeed it requires a working network ...12:24
dot-tobiasogra: Nice to know this setup, thanks! But the user account is intended for users to be able to SSH on their device (the resulting, pre-booted image is intended as a download to flash to your own device)12:25
ograsure, i didnt mean to use it permanently but for debugging12:26
dot-tobiasogra: That cloud.conf looks almost identical to mine, except you use β€œplain_text_passwd” whereas I pass an encrypted PW. Which was working fine in a core18 model, but then again that cloud.conf was passed directly to ubuntu-image … Ian suggested that this is most likely due to a seed failure (then cloud-init won't run at all) - btw huge thanks ijohnson, very much appreciated!12:26
dot-tobiasogra: Ah, gotcha.12:27
dot-tobiasit's like 99% working but I can't figure out the last % πŸ™ƒ12:27
ograheh ... well, the ordering should surely help12:30
dot-tobiasogra: To be sure: To get a system-user via USB stick, I'd put the `auto-import.assert` from make-system-user on a thumb drive (FAT formatted?), plug that into the RasPi and then start up the freshly flashed image? When would snapd (?) pick up the assertion?12:31
ograuh, i dont know when exactly it does that ... also, the USB key doesnt need to be plugged in before boot, there is a udev rule that will handle it at any point in time when you plug it in12:34
ograit should tell you about importing the assertion in the logs though12:35
dot-tobiasogra: Re-plugging worked! I was able to log in, just to find out that all non-auto-connected interfaces weren't connected at all πŸ™ƒ So something must be wrong with my gadget, but I don't understand why … especially since the serial console showed me β€œconnecting snap:xyz to slot-snap:xyz` …12:44
ograsnap changes ...12:46
ograshould have details12:47
dot-tobias… checked that, only shows β€œinitialize deviceβ€œ errors.12:47
dot-tobias(which is expected since I don't have a serial vault yet)12:47
dot-tobiascorrection: gadget connections for wpe-webkit-mir-kiosk *are* applied, so it's only for one snap where the gadget connections are not applied12:48
ograwrong snap id or typo ?12:48
ograyou can work around the initialize device errors btw12:48
dot-tobiasI sense a very dumb error on my side … to check if Ian's suggestion with is-connected in the install/interface hook works (to enable connection creation for both scenarios, manual snap install and gadget seed), I modified the downloaded snap to save some time + passed it via --snap. Which is of course not signed, so the defaults aren't applied as they pertain to the snap's store ID …12:50
ogra"serial-authority": [ "generic" ],12:50
ograadd that to your model ...12:50
ograthen the initialize device errors go away12:51
dot-tobiasogra: Cool! Is that documented anywhere πŸ˜„12:51
ogranot sure πŸ™‚12:51
ogra(probably not though)12:53
pedronismvo: we have a real issue with snap-bootstrap, that was hidden because the tests were mocking too much12:54
ogradegville, "serial-authority": [ "generic" ] should probably documented in the model assertion documentation somewhere (makes the device receive a generic assertion so it does not fail the "initialize device" setp)12:56
degvilleogra: thanks for letting me know. I'll make sure it's added.12:57
ograthanks !12:57
dot-tobiasdegville: On that point, I opened a PR for the core20 docs https://github.com/canonical-web-and-design/ubuntu-core-docs/pull/126 β†’ not sure if somebody was notified 😊12:59
mupPR canonical-web-and-design/ubuntu-core-docs#126: Correct error in `snaps` header docs for uc20 <Created by tobias-grasse> <https://github.com/canonical-web-and-design/ubuntu-core-docs/pull/126>12:59
dot-tobias(or feel free to close if I misunderstood the docs)12:59
degvilledot-tobias: thanks for letting me know. I must have missed it, but that's definitely the right place. I'll merge and rebuild.13:00
dot-tobiasdegville: Thanks! Please do review if the change makes sense 😊 Discovered that by trial and error during my model assertion upgrade.13:06
degvilledot-tobias: will do - thank you!13:08
mvopedronis: oh no, do you have more details? why did we not notice during the spread tests?13:39
pedronismvo: it's about the fallback paths13:39
pedroniswe don't have spread tests for those13:40
pedronismvo: I don't know if you want to chat before the standup?13:40
mvopedronis: oh, ok13:40
mvopedronis: yeah, let me make a cup of tea, then I can join13:40
pedronisbit of a mess13:42
pedronismvo: I'm in the SU13:48
ijohnsonpedronis: should I join too ?13:48
* ijohnson just got here13:48
pedronisijohnson: yes13:49
ijohnsonk13:49
ijohnsonpedronis: do you want to just push up the change you were making somewhere for me to look over?14:24
pedronisijohnson: yes, but probably once I have all the tests changed14:25
ijohnsonok14:25
pedronisatm I have 2 failing tests and new failing test (no data at all)14:25
ijohnsonright14:25
pedroniswe might need one or more tests14:25
pedronisthat I are not a blocker for me to push though14:25
mupPR snapcraft#3368 opened: ci: use github actions for cla check <Created by cjp256> <https://github.com/snapcore/snapcraft/pull/3368>14:27
dot-tobiasCan someone confirm https://bugs.launchpad.net/snapcraft/+bug/1898877 , or am I just β€œholding things wrong”?14:28
mupBug #1898877: [remote-build] source-type 'zip' aborts with KeyError <remote-build> <Snapcraft:New> <https://launchpad.net/bugs/1898877>14:28
ijohnsoncjp256: ^14:30
mupPR snapd#9625 opened: snap: add new "fde-setup" hooktype <Simple πŸ˜ƒ> <Created by mvo5> <https://github.com/snapcore/snapd/pull/9625>14:41
pedronisijohnson: https://github.com/pedronis/snappy/commit/18012b6ad1c035611b7a2833090daab5b882f97c there I get 3 failures in cmd/snap-bootstrap14:43
ijohnsonpedronis: thanks let me have a look14:43
pedronisijohnson: taking a break, we can chat afterward if needed14:45
ijohnsonsounds good14:45
cjp256dot-tobias: confirmed, we'd need to enable zip support for osx which shouldn't be a problem14:55
cjp256i can put up a PR if you'll give it a test :D14:55
* cachio lunch14:56
dot-tobiascjp256: Thanks! 😊15:01
mupPR snapd#9626 opened: snap-bootstrap,secboot: call BlockPCRProtectionPolicies in all boot modes <Created by chrisccoulson> <https://github.com/snapcore/snapd/pull/9626>15:02
pedronisijohnson: I'm back15:03
ijohnsonpedronis: ok, I'm working on adjusting secboot to have a DecryptedDevice and using it from initramfs-mounts15:03
pedronisijohnson: mvo: we have also Chris' PRs to take into account15:10
ijohnsonpedronis: yes I think that should be fairly easy to accomodate though, at least the one I saw this morning15:10
ijohnsonit is fairly orthogonal to this work I think15:10
pedronisijohnson: #9626 touches secboot quite a bit15:11
mupPR #9626: snap-bootstrap,secboot: call BlockPCRProtectionPolicies in all boot modes <Run nested> <UC20> <Created by chrisccoulson> <https://github.com/snapcore/snapd/pull/9626>15:11
pedronisanyway I need to review them next15:11
ijohnsonoh I didn't see that one, I only saw 962415:11
ijohnsonmmm that one is going to be a bit difficult to work with :-/15:12
mupPR snapcraft#3369 opened: sources: enable 7z, bzr, hg, svn, zip for non-linux <Created by cjp256> <https://github.com/snapcore/snapcraft/pull/3369>15:13
cjp256dot-toabis: https://github.com/snapcore/snapcraft/pull/3369  given the speed of travis lately, maybe we'll have a build to test by tomorrow :D15:13
mupPR snapcraft#3369: sources: enable 7z, bzr, hg, svn, zip for non-linux <Created by cjp256> <https://github.com/snapcore/snapcraft/pull/3369>15:13
ijohnsonpedronis: the issue with at least one of the tests (TestInitramfsMountsRecoverModeEncryptedDegradedNoDataFoundSaveHappy) is that the wrong disk setup is being mocked, the disk we get from the ubuntu-seed mountpoint still has data in it15:21
pedronisijohnson: that test is not complete, it will still fail15:22
ijohnsonyes I know15:22
ijohnsonjust thought I would share that in case you hadn't already figured that bit out15:22
ijohnsonanyways I'm fixing it all now15:22
=== King_InuYasha is now known as Conan_Kudo
=== Conan_Kudo is now known as King_InuYasha
* ijohnson is very grateful for writing all the consistency checks on the unlockRes :-)15:39
pedronismvo: I updated 962615:44
ijohnsonpedronis: do you have opinions on storing the decrypted device as "decrypted-device" inside degraded.json partitions15:46
ijohnson?15:46
ijohnsonthat's what I've code and is working well I think15:46
pedronisijohnson: I'm not sure, we should discuss15:46
ijohnsonpedronis: SU ?15:46
pedronisyes15:46
ijohnsonpedronis: ok, actually give me a minute I can push my changes up to a branch and we can review together15:47
mvopedronis: thanks, I have a look15:47
ijohnsonpedronis: https://github.com/anonymouse64/snapd/tree/bugfix/uc20-consistent-unlock-result-and-consequences-215:48
ijohnsonpedronis: joining SU now15:48
abeato@ijohnson, hey, do you know if there has been any recent change in UC20 for auto imports? I use to drop a system-user assertion in the ubuntu-seed partition to get a user after first boot (so I could run tests automtaically), but it looks like it is not working anymore16:11
ijohnsonabeato: yes support for that was dropped16:12
abeatoijohnson, ouch... what would be the alternative?16:12
mupPR snapd#9624 closed: secboot: call BlockPCRProtectionPolicies even if the TPM is disabled <UC20> <Created by chrisccoulson> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/9624>16:17
ijohnsonabeato: use console-conf in your gadget snap16:17
ijohnsonsorry cloud-init16:18
abeatoijohnson, ok, is there any example around?16:20
* cachio -> kinesiologist16:30
ijohnsonabeato: so you put a file in the root of your gadget snap called cloud.conf, and put content like this in it:16:41
ijohnsonhttps://pastebin.ubuntu.com/p/mNCz53qjQr/16:42
abeatoijohnson, I see, thanks a lot!16:43
ijohnsonnp16:43
=== asottile is now known as albertosottile
abeatoijohnson, "# #cloud-config", is that right?16:43
ijohnsonabeato: haha no it's not sorry16:43
ijohnsonit should be just16:43
abeato:)16:44
ijohnson```16:44
ijohnson# cloud-config16:44
ijohnson```16:44
abeatook16:44
ijohnsonactually I don't remember how intelligent the cloud-init parser is in reading the first line and comment for that file16:44
ijohnsonmaybe it still works with the space there or without the space there16:44
abeatoI think it prefers without the space, but not 100% sure16:45
* ogra wonders if ijohnson has heard of the "plain_text_passwd:" key of cloud-init ... πŸ™‚16:52
ijohnsonthat would be too easy16:52
ograsaves all the crypting16:52
ijohnsonyeah that seems way easier!16:53
pedronismvo: ijohnson: #9626 needs reviews (I fixed it and added more tests)17:05
mupPR #9626: snap-bootstrap,secboot: call BlockPCRProtectionPolicies in all boot modes <Run nested> <UC20> <Created by chrisccoulson> <https://github.com/snapcore/snapd/pull/9626>17:05
ijohnsonpedronis: ack, I'm still fixing up the branch from this morning with the new degraded state things17:05
ijohnsonpedronis: it's going ok, a bit fiddly and tedious but no complications thus far17:05
mvopedronis: will do after dinner17:07
pedronisijohnson: hopefully, not too fiddly, let me know if it's getting too messy17:12
ijohnsonyeah I think it's ok, hopefully will be done with the right code soonish and then just need to update all the tests17:13
pedronisijohnson: the tests shouldn't need much updating I think17:13
pedronisijohnson: just the helpers17:13
ijohnsonyes hopefully17:13
mupPR snapd#9627 opened: interfaces/raw_usb: allow read access to /proc/tty/drivers (LP: #1890365) <Created by oSoMoN> <https://github.com/snapcore/snapd/pull/9627>17:47
ijohnsonpedronis: ok, I've got basically what I think is needed, one thing I didn't realize while implementing but I now remember is that you mentioned you wanted the internal "raw decrypted device" to be unset if we found the encrypted device but couldn't unlock it, is that correct ?18:06
ijohnsonpedronis: because what I accidentally ended up implementing is that the raw decrypted device setting is now the block device if we can't unlock it18:07
ijohnsonI can fix it to be what we agreed upon, just wanted to make sure that I should fix it that way18:07
pedronisijohnson: yea, that sounds not we agreed18:10
ijohnsonsorry, I'll fix it then18:10
pedronisnot what we agreed18:10
pedronisijohnson: but maybe it's easier to push what you have18:10
ijohnsonpedronis: sure, should I open a PR or just send you the branch ?18:11
pedronisijohnson: it shouldn't make a big difference, it still seems the right thing18:11
pedronisijohnson: I'm also confused because I'm not sure why you are calling it "raw"18:11
ijohnsoneh just the var name I used in the code since it's not the "exported" one18:11
ijohnsonI have no personal attachment to the word "raw" here18:11
pedronismmh18:11
pedronisijohnson: well if it's almost PR ready, let's make a PR, you mark it draft18:12
ijohnsonjust didn't want to spend brain cycles on a better word yet18:12
ijohnsonit is PR ready I have added the new tests we discussed and updated all the tests18:12
ijohnsonI'll mark it as a draft then18:12
ijohnsonone moment18:12
mupPR snapd#9628 opened: secboot,cmd/snap-bootstrap: fix degraded mode cases with better device handling <Needs Samuele review> <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/9628>18:18
ijohnsonpedronis: ^18:18
ijohnsonwhoops had a gofmt typo, just force pushed18:21
=== ijohnson is now known as ijohnson|lunch
mupPR snapcraft#3370 opened: repo: address issue with fix_symlink() when pointed at directory <Created by cjp256> <https://github.com/snapcore/snapcraft/pull/3370>18:23
mvopedronis: I updated the fde hooks gdoc fwiw18:42
mvoijohnson|lunch: thanks for 9628!18:42
pedronisijohnson|lunch: a bunch of comments in #9628, sadly it looks messier than the old code :/ so it's quite hard to review18:53
mupPR #9628: secboot,cmd/snap-bootstrap: fix degraded mode cases with better device handling <Needs Samuele review> <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/9628>18:53
=== ijohnson|lunch is now known as ijohnson
ijohnsonpedronis: well that's unfortunate19:12
pedronisijohnson: please look at my comment, and let me know if you have questions, I can be around a bit more19:17
ijohnsonyes I'm reading through them now19:17
pedronisijohnson: ah, there is something off in secboot itself, that's why maybe things are confusing for me19:31
ijohnsonwhat's off in secboot ?19:31
pedronisijohnson: tbh this is probably simpler with chris PR19:32
pedronisijohnson: if you have a purely uncrypted device you don't set DecryptedDevice19:32
ijohnson... does that not make sense though ?19:32
pedronisijohnson: that's what we dicussed19:33
ijohnsonsorry I guess I missed that then19:33
pedroniswell, it simplifies code quite a bit19:33
pedronisbut as I said it's probably easier with chris PR then now19:33
ijohnsonit just doesn't make sense to me to be setting DecryptedDevice for something that erm well isn't a decrypted device ?19:33
ijohnsonif that's what is desired I think we should rename it from DecryptedDevice to something more generic like ActivatedDevice or TargetDevice or something19:34
pedronisijohnson: sorry, I thought I explained this, we can argue on the name (it's internal anyway)19:36
ijohnsonI guess I only understood you to mean to set the block device on the degraded state and not on the secboot return result19:37
ijohnsonanyways I'm looking at 9626 now19:37
pedronisijohnson: my point is that it's always correct to mount DecryptedDevice if set19:37
ijohnsonsure I guess in this case we should just rename it to something else then19:38
ijohnsonI wonder if we should also rename Device to BlockDevice19:39
pedronisijohnson: maybe FsDevice or FilesystemDevice19:40
ijohnsonthose seem fine to me19:41
ijohnsonyeah I see why this is simpler with Chris' PR19:42
ijohnsonpedronis: shall I finish a review of that so we can merge that first then I'll rebase my PR as we just discussed on top of that ?19:42
* ijohnson just does a review anyways19:43
mupPR snapd#9606 closed: tests: Use systemd-run on tests part2 <Created by sergiocazzolato> <Merged by sergiocazzolato> <https://github.com/snapcore/snapd/pull/9606>19:43
mupPR snapd#9623 closed: tests: set the opensuse tumbleweed system as manual in spread.yaml <Simple πŸ˜ƒ> <Created by sergiocazzolato> <Merged by sergiocazzolato> <https://github.com/snapcore/snapd/pull/9623>19:43
pedronisijohnson: we should also land #962119:43
mupPR #9621: many: address degraded recover mode feedback, cleanups <UC20> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/9621>19:43
ijohnsonI guess 9621 isn't more wrong than the current state of things19:43
pedronisijohnson: yea, my bit your new PR contains addresses my comment there19:44
pedronisijohnson: I'm landing it19:44
ijohnsonok19:44
pedronisijohnson: I wonder how mvo plans to backport these though19:45
ijohnsonperhaps we should squash merge then19:45
pedronisor maybe he needs to just merge master back, not sure19:46
pedronisI fear it's going to be messy either way19:46
ijohnsonhmm does my pr conflict with 9626 ?19:46
pedronisI suspect so19:46
ijohnsonerr sorry19:47
ijohnsondoes 9621 conflict with 9626 ?19:47
pedronismaybe, not massively though19:48
pedronisijohnson: I can deal with that19:49
ijohnsonI'm just wondering if we could land chris' pr first, maybe squash maybe not, then I could force-push a rebase of my pr on top of master so it is not conflicting19:49
pedronisI mean, landing 962619:49
ijohnsonI'm almost done with a review, it looks good to me, I think it needs more tests, but probably fine to do in a follow-up19:50
pedronisijohnson: mmh, I added quite a few tests19:50
ijohnsonI guess not so much new tests, I just think the specific tests added are a little weird, I think other tests would make more sense19:51
ijohnsonanyways just a minute and I will submit my review19:51
pedronisijohnson: maybe19:51
mupPR snapd#9621 closed: many: address degraded recover mode feedback, cleanups <UC20> <Created by anonymouse64> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/9621>19:53
pedronisijohnson: anyway it does conflict so I'll have to sort that19:59
ijohnsonpedronis: mmm, well I submitted my review now20:00
ijohnsonI will rebase my newer pr on top of chris' pr locally then and wait to push anything more until that has landed20:01
pedronisijohnson: TestInitramfsMountsRunModeHappy still exists afaik20:02
ijohnsonit does ?20:02
ijohnsonwhere ?20:02
pedronisah20:02
pedronisno20:02
pedronisit became TestInitramfsMountsRunModeHappy20:03
pedronisyou are right20:03
ijohnsonI was almost doubly confused about it disappearing and then reappearing right before my eyes!20:04
pedronisheh, anyway I probably can fix your 2nd point20:07
pedronisfirst I need deal with the conflicts20:08
pedronisijohnson: actually 9626 is a bit buggy20:16
ijohnsonpedronis: how so?20:16
ijohnsonin the secboot code ?20:17
pedronisit sets res.Device too eagerly20:17
pedronisat least it's a change of behavior20:17
ijohnsonyeah I noticed that but I think it's fine though given that we will be rewriting that code immediately after in my PR to use i.e. FsDevice or whatever20:18
pedroniswell, it's a change of behavior20:19
pedronisit's more likely to confuse you than anything20:19
ijohnsonwell to be fair I am easily confused so that's not saying much :-)20:19
pedronissorry, that was a generic you20:20
pedronisit's also interesting that no test fails :/20:20
pedroniseither way20:21
ijohnsonI'm starting to get highly suspicious of the tests around UnlockVolumeUsingSealedKeyIfEncrypted20:21
ijohnsonI don't think the tests around that are really testing all the cases20:21
ijohnsonit's testing a lot of cases, but I don't think it's testing the right things20:22
pedronisI added something to tests that would have failed20:24
pedronisijohnson: pushed20:28
ijohnsonack I'll have a look20:28
pedronisijohnson: the diff of the merge is readable20:29
pedronisI forgot to add the extra tests though20:31
ijohnsonwhich extra tests ?20:31
ijohnsonthe install/recover ones? I don't think those are needed for htis pr, they can be followsup imho20:32
ijohnsonfollowups20:32
pedronisijohnson: actually all the NoModel tests share code, so it's very easy to add20:34
ijohnsonnice20:34
pedronispushed20:35
pedronisijohnson: anything more that I can help with?20:38
ijohnsonpedronis: if you have thoughts on what to name the *Device things on secboot.UnlockResult so that it's not quite so confusing I would appreciate input on that20:39
pedronisijohnson: Part(ion)Device and FsDevice ?20:41
ijohnsonso PartDevice will always be the partuuid one, and FsDevice will be the one that's always safe to mount?20:42
pedronisyes20:42
ijohnsongot it, that sounds fine then20:42
ijohnsonIt will probably be an hour or two before I can finish that and push it up20:43
pedronisso for the encrypted case they are the same20:43
ijohnsonyou mean the unencrypted case they are the same ?20:43
pedronissorry, unencrypted case20:43
ijohnsonright20:43
dot-tobiasShould a uc20 device (RasPi) have internet access via ethernet during initial boot, or is this entirely optional? (Assuming no snap attempts to do something that require internet access)20:47
ijohnsondot-tobias: during uc20 install mode, internet access is not required, afaik snapd shouldn't try to talk to the store during install mode at all really20:48
ijohnsonpedronis: one final question on the pr, there is a line commented out, not sure if that should be commented out or not20:48
ijohnsonpedronis: question on 9626 that is20:48
dot-tobiasijohnson: Ok thanks for clarifying, there was one point during the firstboot log on serial about failure to connect to api.snapcraft.io, but I guess that's optional.20:49
ijohnsondot-tobias: can you share that bit of the log?20:50
pedronisijohnson: that is from the original code, I need to check20:51
dot-tobiasijohnson: sure, as soon as I flash and boot up the next image I'll look out for that πŸ˜„ (fear I'll be doing that at least a few more times tonight …)20:51
ijohnsondot-tobias: because we did somewhat recently disable refreshing the catalog in install mode, so maybe that disabling was ineffective of you just haven't gotten it in your version of snapd yet20:54
dot-tobiasijohnson: Good to know. Using revison 9731 (armhf) of snapd, will check the log later. Doesn't seem to have an impact on the init process, that's still stuck way later on …20:56
pedronisijohnson: the secboot changes should be something like this I suppose: https://paste.ubuntu.com/p/4QKgVZ7FQM/21:01
ijohnsonpedronis: yes that looks about exactly like I was going to do21:02
pedronisijohnson: as fas as I can tell you can drop that //err line in your PR, I'm not quite sure how that code behaved on master but it seems right as it is there21:14
ijohnsonpedronis: ok sounds good I will drop it from my pr then21:15
pedronisijohnson: feel free to use bits of that pastebin, I actually mostly wrote that because of the secboot_tpm_test.go part of it. Those tests are a bit non-obvious in how the check things21:16
pedronisas I said before my last push to the other PR they weren't even check some .Device related behavior21:17
ijohnsonyes I will, it doesn't cleanly apply to my branch after I rebased it on top of Chris's branch, but I can see the relevant changes to make there21:17
dot-tobiasijohnson: Is there a saner way to debug/test uc20 custom images for armhf arches other than flashing them to a microSD and waiting patiently until it errs? πŸ™ƒ21:43
ijohnsondot-tobias: it depends on what you need to debug, are you debugging failure installing ?21:44
dot-tobiasijohnson: Yes, I have a hunch that the modified install hook somehow fails (though the added commands work inside a snap shell), but the serial console doesn't give me anything. Side note, does UC keep logs from the init run, and where would I find them?21:46
pedronisijohnson: I suppose, it's implict, but the unexported fields now are going to be partDevice and fsDevice too?21:51
=== mup is now known as 7JTABK1M1
ijohnsonpedronis: yes that's what I named them now22:25
ijohnsondot-tobias: sorry seems the netsplit lost some things22:25
ijohnsondot-tobias: I was going to say that we don't have logs from the specific install mode boot because the rootfs is really a tmpfs there, but there should be logs from the failed seeding in the standard journald location on the pi's SD card to read22:25
ijohnsondot-tobias: additionally, you could try extracting the system-data/var/lib/snapd/state.json file from the ubuntu-data partition and run `snap debug state <that-file>` on it to see `snap changes` like output, or specify `--change=1` to see `snap tasks` like output on another system22:26
ijohnsonhopefully that helps a bit, but we are aware that we are bit lacking in this story of debugging first boot failures on uc20, it's a bit in conflict with some of our security goals around uc20 so things have gotten a bit more complicated22:27
ijohnsonpedronis: also I guess this is obvious but I pushed up the update to 9628 now22:27
ijohnsonthat should be good to go I think22:27
dot-tobiasijohnson: I just realized I should add network-manager to the install hook's plugs in case the n-m operations are fired from there (instead of from the interface hook) … sometimes late night debugging helps πŸ˜„ So maybe found the cause … will rebuild and check, noting errors on the console for you.22:29
dot-tobiasThanks for the logging info, really invaluable at this point!22:29
ijohnsondot-tobias: ah yes that is the case that the install hook will need all the interfaces22:30
ijohnsonhappy to help, sorry this has been such a journey for you, but know that your struggles now will make it easier for folks in the future I think!22:30
ijohnsoncachio_: around ?22:30
ijohnsoncachio_: I see some nested tests with master failing like this:22:30
ijohnson /home/gopath/src/github.com/snapcore/snapd/tests/lib/nested.sh: line 1114: systemd_stop_and_destroy_unit: command not found22:30
ijohnsonsee https://github.com/snapcore/snapd/pull/9626/checks?check_run_id=1387265367 for example22:32
mupPR #9626: snap-bootstrap,secboot: call BlockPCRProtectionPolicies in all boot modes <Run nested> <UC20> <Created by chrisccoulson> <https://github.com/snapcore/snapd/pull/9626>22:32
dot-tobiasijohnson: Would've helped if the hook threw an error in some way I could see on the console, but in most cases OSI layer 8 strikes again πŸ™ˆ and yes, I try to contribute docs or at least naive questions along the way πŸ˜„22:33
ijohnsonyes I think we need to be better about surfacing errors to the console22:33
ijohnsonwell I _know_ we need to be better about that :-)22:34
pedroniscachio_: did you land something related to systemd that broke nested.sh ?22:39
pedroniscachio_: we are getting:  /home/gopath/src/github.com/snapcore/snapd/tests/lib/nested.sh: line 1114: systemd_stop_and_destroy_unit: command not found22:40
pedronisijohnson: ^22:43
ijohnsonpedronis to be fair it is just on restoring22:43
pedronisijohnson: ?22:43
ijohnsonBut yes I also asked cachio_ about that a few minutes before you does22:43
ijohnsonpedronis I just mean that failure doesn't mean we don't have test results22:44
pedronisif you fail to restore22:44
pedronisspread will skip over things22:44
pedronis2020-11-11 21:22:25 Aborted tasks: 1222:45
ijohnsonah22:45
ijohnsonfair22:45
pedronisso we don't know what passed or not22:45
pedronisso this is fairly annoying22:45
pedronisat this juncture22:45
ijohnsonok, let me look at this quickly22:45
ijohnsonmaybe it's a simple thing22:45
ijohnsonseems https://github.com/snapcore/snapd/pull/9606 is what broke it22:47
mupPR #9606: tests: Use systemd-run on tests part2 <Created by sergiocazzolato> <Merged by sergiocazzolato> <https://github.com/snapcore/snapd/pull/9606>22:47
ijohnsonpedronis: can I push to chris' branch what I think fixes this nested problem we are seeing?22:50
pedronisijohnson: yes22:51
ijohnsonk, one second22:51
pedronisthx22:51
ijohnsonpedronis: done, pushed to 9626, I didn't have time to test it manually, but it should be good I think22:54
ijohnsonI also pushed the commit to 962822:55
ijohnsonthe commit was directly cherry-picked so it shouldn't pose a problem for conflicts when getting it back onto 2.48, however folks decide to do that22:56
ijohnsonI need to EOD now, but will check back in a couple hours on the tests to see if there is any real nested issues here or if any silly tests fail22:56
ijohnsonhopefully everything is green when mvo gets up22:56
pedronisijohnson: I left some comments in 9628, I can take care of them in the morning I suppose, I need to give it a fresh look anyway23:01
ijohnsonpedronis ok I can try to look quickly but probably can't address anything right now maybe later tonight23:03

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