Skip to content

Reenable make test targets in GH Actions CI#4719

Merged
fuweid merged 4 commits intocontainerd:masterfrom
estesp:fix-shm-relabel-test
Nov 23, 2020
Merged

Reenable make test targets in GH Actions CI#4719
fuweid merged 4 commits intocontainerd:masterfrom
estesp:fix-shm-relabel-test

Conversation

@estesp
Copy link
Copy Markdown
Member

@estesp estesp commented Nov 10, 2020

Related to #4705: re-enable tests hidden by removal of "coverage" targets

I will drop the first commit and rebase when #4705 is merged but want to verify we can get passing tests

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 10, 2020

Build succeeded.

@estesp estesp force-pushed the fix-shm-relabel-test branch from f3c7e05 to 44263b7 Compare November 10, 2020 15:16
Comment thread .github/workflows/ci.yml Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the GOPATH=$GOPATH GOPROXY=$GOPROXY needed? I think they should be preserved by -E (only PATH is a special case)

Suggested change
sudo -E PATH=$PATH GOPATH=$GOPATH GOPROXY=$GOPROXY make root-test
sudo -E PATH=$PATH make root-test

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be honest I was just copying from integration section below. :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, good one. Looks like those don't use sudo -E (not sure why that was not used), so they would only get the env-vars that are explicitly set 🤔

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 10, 2020

Build succeeded.

@estesp
Copy link
Copy Markdown
Member Author

estesp commented Nov 10, 2020

Hmm, don't get this locally:

--- FAIL: TestSetNegativeOomScoreAdjustmentWhenUnprivilegedHasNoEffect (0.00s)
Error:     oom_unix_test.go:66: assertion failed: 500 (adjustment int) != 0 (int)

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 10, 2020

Build succeeded.

@estesp
Copy link
Copy Markdown
Member Author

estesp commented Nov 10, 2020

Windows tests now re-added and working

Linux working fine for make test after fixing OOM in GH Actions env.
Linux failing for make root-test with a unsafe pointer check in btrfs.SubvolCreate:

fatal error: checkptr: converted pointer straddles multiple allocations

If anyone has any history with this Golang unsafe pointer checking error and wants to dig in.. :)

@fuweid
Copy link
Copy Markdown
Member

fuweid commented Nov 11, 2020

Windows tests now re-added and working

Linux working fine for make test after fixing OOM in GH Actions env.
Linux failing for make root-test with a unsafe pointer check in btrfs.SubvolCreate:

fatal error: checkptr: converted pointer straddles multiple allocations

If anyone has any history with this Golang unsafe pointer checking error and wants to dig in.. :)

Try to fix it https://github.com/containerd/btrfs/pull/27/files

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 11, 2020

Build succeeded.

@estesp estesp force-pushed the fix-shm-relabel-test branch from 4c9bdd9 to 94a7d96 Compare November 17, 2020 02:28
@estesp estesp changed the title Fix shm relabel test Reenable make test targets in GH Actions CI Nov 17, 2020
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 17, 2020

Build succeeded.

@estesp
Copy link
Copy Markdown
Member Author

estesp commented Nov 17, 2020

Hmm. devmapper snapshotter suite tests are hanging; running locally I see that 2 pools ending in snap-1 are stuck in dmsetup remove --retry loops; trying that manually gets:

$ sudo dmsetup remove --retry /dev/mapper/containerd-snapshotter-suite-pool-35024991-snap-1
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy
device-mapper: remove ioctl on containerd-snapshotter-suite-pool-35024991-snap-1  failed: Device or resource busy

I see a mount matching that ID:

/dev/mapper/containerd-snapshotter-suite-pool-35024991-snap-1 on /tmp/snapshot-suite-devmapper-761964118/work/base type ext4 (rw,relatime,stripe=16)

If I manually unmount (as well as the other stuck dmsetup remove target) the tests complete, but are unsuccessful. I'm not sure who has the ability to poke at this a bit more, but maybe @mxpv or anyone else well versed in devmapper?

@mxpv
Copy link
Copy Markdown
Member

mxpv commented Nov 18, 2020

ohh.. These are my "favorite".. Will take a look.

@estesp
Copy link
Copy Markdown
Member Author

estesp commented Nov 18, 2020

@mxpv one more data point; reverting 63b7587 and c383436 take away the hang (although on Ubuntu 20.04 I still get test failures); since the tests were not enabled during these PR cycles, I wonder if there are test changes that are required to align with the changes to device lifecycle in these PRs?

@mxpv
Copy link
Copy Markdown
Member

mxpv commented Nov 18, 2020

@estesp How do you feel about disabling devmapper unit tests (until we figure out a proper fix, I don't want to rollback those changes) and have this PR in ? Having CI without unit tests feels like a disaster 🥇

@estesp
Copy link
Copy Markdown
Member Author

estesp commented Nov 18, 2020

@mxpv yes, I think disabling just devmapper to move on with re-enabling tests is good. I don't think we want to revert those fixes, I just thought it might be a clue that the tests need an update based on those PRs and since tests weren't running then, it wasn't caught.

Disable devmapper for now until test issues are fixed.

Signed-off-by: Phil Estes <[email protected]>
GitHub Actions process wrapper sets score adj to 500 for any process;
the OOM score adj test expected default adj to be 0 during test.

Signed-off-by: Phil Estes <[email protected]>
@estesp estesp force-pushed the fix-shm-relabel-test branch from 94a7d96 to d2d3e13 Compare November 19, 2020 13:43
Fixes runtime panic for testing snapshotters

Signed-off-by: Phil Estes <[email protected]>
@estesp estesp force-pushed the fix-shm-relabel-test branch from d2d3e13 to 027ee56 Compare November 19, 2020 13:50
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 19, 2020

Build succeeded.

@thaJeztah
Copy link
Copy Markdown
Member

Interesting; is that depending on host configuration, or was index=off added as a default?

        --- FAIL: TestOverlay/no_opt/TestOverlayOverlayMount (0.01s)
Error:             overlay_test.go:182: expected "workdir=/tmp/overlay433793594/snapshots/2/work" but received "index=off"
Error:             overlay_test.go:182: expected "upperdir=/tmp/overlay433793594/snapshots/2/fs" but received "workdir=/tmp/overlay433793594/snapshots/2/work"
Error:             overlay_test.go:182: expected "lowerdir=/tmp/overlay433793594/snapshots/1/fs" but received "upperdir=/tmp/overlay433793594/snapshots/2/fs"

@estesp
Copy link
Copy Markdown
Member Author

estesp commented Nov 19, 2020

change was made while tests were not enabled in CI, so wasn't caught: d36810d#diff-22eed5233aae9c9baa1749e3ca948da07c6e2de607dbbbb00e17de3627fbcca7

Hopefully this is the last fix to get tests re-enabled, although devmapper is turned off for now

When running tests on any modern distro, this assumption will work. If
we need to make it work with kernels where we don't append this option
it will require some more involved changes.

Signed-off-by: Phil Estes <[email protected]>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 19, 2020

Build succeeded.

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fuweid fuweid merged commit 625da6b into containerd:master Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.4.x PR commits are cherry picked into the release/1.4 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants