~mvo/snapd/+git/snapd-mvo:c20-snap-recovery-encrypt-20.04

Last commit made on 2020-01-22
Get this branch:
git clone -b c20-snap-recovery-encrypt-20.04 https://git.launchpad.net/~mvo/snapd/+git/snapd-mvo

Branch merges

Branch information

Name:
c20-snap-recovery-encrypt-20.04
Repository:
lp:~mvo/snapd/+git/snapd-mvo

Recent commits

793e9ca... by Claudio Matsuoka

tests: reuse existing mounts and fix key test error

We're now mounting newly created filesystems in snap-bootstrap, so
use these instead of remounting to check content deploy. Also unmount
the filesystem before closing the encrypted device.

Signed-off-by: Claudio Matsuoka <email address hidden>

1f3eeea... by Michael Vogt

tests: ummount /dev/mapper/{ubuntu-data,test-udata}

7d3674c... by Michael Vogt

tests: run `uc20-snap-recovery-encrypt` test on 20.04-64 as well

This commit makes the uc20-snap-recovery-encrypt test run on
20.04-64 as well. It still is run on 19.10-64 because we have
no 20.04-64 in spread yet. This is useful to test if the kernel
crashes or works correctly.

It also modifies how the snap-bootstrap create-partitions is run
to match how it's run from snapd.

e7f2ed3... by Michael Vogt

Merge pull request #7998 from mvo5/slow-tests-workarounds

httputil: use shorter timeout in TestRetryRequestTimeoutHandling

dfb1b03... by Michael Vogt

Merge pull request #7986 from chipaca/default-track

store, o/snapstate: send default-tracks header, use RedirectChannel

9c20f60... by Michael Vogt

Merge pull request #8000 from mvo5/release-2.43.1

release: 2.43.1

e491196... by Michael Vogt

Merge remote-tracking branch 'upstream/master' into release-2.43.1

443a2de... by Michael Vogt

releasing package snapd version 2.43.1

acfd1b8... by Michael Vogt

devicestate: use httputil.ShouldRetryError() in prepareSerialRequest

We got a bugreport that the detection of temporary vs permanent
network errors is not reliable when requesting serials. This
commit changes the code to use the more elaborate code from
httputil to detect the failure condition.

08cb7d0... by Maciej Borzecki

overlord/standby: fix possible deadlock in standby test

A deadlock was observed in the tests, and a timeout was eventually hit.

Relevant backtrace:

```
=== RUN Test
SIGQUIT: quit
PC=0x45be81 m=0 sigcode=0

...

goroutine 5 [chan receive]:
github.com/snapcore/snapd/vendor/gopkg.in/check%2ev1.(*suiteRunner).runTest(0xc4200ac200, 0xc4200a3e30, 0xc4200c4960)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/check.v1/check.go:819 +0x55
github.com/snapcore/snapd/vendor/gopkg.in/check%2ev1.(*suiteRunner).run(0xc4200ac200, 0xc420024730)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/check.v1/check.go:624 +0xf2
github.com/snapcore/snapd/vendor/gopkg.in/check%2ev1.Run(0x5e8660, 0xc420024730, 0xc420066c00, 0x0)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/check.v1/run.go:92 +0x4d
github.com/snapcore/snapd/vendor/gopkg.in/check%2ev1.RunAll(0xc420066c00, 0x0)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/check.v1/run.go:84 +0xa1
github.com/snapcore/snapd/vendor/gopkg.in/check%2ev1.TestingT(0xc4200c40f0)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/check.v1/run.go:72 +0x368
github.com/snapcore/snapd/overlord/standby_test.Test(0xc4200c40f0)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/overlord/standby/standby_test.go:31 +0x2b
testing.tRunner(0xc4200c40f0, 0x611748)
 /usr/lib/go-1.10/src/testing/testing.go:777 +0xd0
created by testing.(*T).Run
 /usr/lib/go-1.10/src/testing/testing.go:824 +0x2e0

goroutine 18 [chan receive]:
github.com/snapcore/snapd/overlord/standby.(*StandbyOpinions).Stop(0xc42007e910)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/overlord/standby/standby.go:115 +0x11a
github.com/snapcore/snapd/overlord/standby_test.(*standbySuite).TestStartChecks(0xc420024730, 0xc4200c4b40)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/overlord/standby/standby_test.go:149 +0x451
reflect.Value.call(0x5e8660, 0xc420024730, 0x1e13, 0x6054e8, 0x4, 0xc42004df70, 0x1, 0x1, 0x741740, 0x5ff7c0, ...)
 /usr/lib/go-1.10/src/reflect/value.go:447 +0x969
reflect.Value.Call(0x5e8660, 0xc420024730, 0x1e13, 0xc420037770, 0x1, 0x1, 0xc4200c4c30, 0xc420037707, 0x1)
 /usr/lib/go-1.10/src/reflect/value.go:308 +0xa4
github.com/snapcore/snapd/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1(0xc4200c4b40)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/check.v1/check.go:781 +0x575
github.com/snapcore/snapd/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1(0xc4200ac200, 0xc4200c4b40, 0xc42000ca00)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/check.v1/check.go:675 +0x7c
created by github.com/snapcore/snapd/vendor/gopkg.in/check%2ev1.(*suiteRunner).forkCall
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/check.v1/check.go:672 +0x20c

goroutine 20 [chan receive]:
github.com/snapcore/snapd/overlord/standby_test.(*standbySuite).TestStartChecks.func2(0x0)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/overlord/standby/standby_test.go:135 +0x39
github.com/snapcore/snapd/overlord/standby_test.opine.CanStandby(0xc4200249d0, 0x740800)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/overlord/standby/standby_test.go:118 +0x27
github.com/snapcore/snapd/overlord/standby.(*StandbyOpinions).CanStandby(0xc42007e910, 0xf42400)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/overlord/standby/standby.go:67 +0x213
github.com/snapcore/snapd/overlord/standby.(*StandbyOpinions).Start.func1(0xc42007e910)
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/overlord/standby/standby.go:88 +0x88
created by github.com/snapcore/snapd/overlord/standby.(*StandbyOpinions).Start
 /<<BUILDDIR>>/snapd-2.43+git1625.7e2fbf5~ubuntu19.04.1/_build/src/github.com/snapcore/snapd/overlord/standby/standby.go:84 +0x3f

...

*** Test killed with quit: ran too long (10m0s).
FAIL github.com/snapcore/snapd/overlord/standby 600.026s
```

The test code was stuck in StandbyOpinions.Stop(), but the actual standby loop
was blocked receiving from a channel in mocked opine() code.

Tweak the test to improve synchronization.

Signed-off-by: Maciej Borzecki <email address hidden>