Skip to content

integration: simplify parallel run destination#39802

Merged
tiborvass merged 1 commit intomoby:masterfrom
thaJeztah:integration_parallel_simplify
Sep 11, 2019
Merged

integration: simplify parallel run destination#39802
tiborvass merged 1 commit intomoby:masterfrom
thaJeztah:integration_parallel_simplify

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Aug 27, 2019

splitting this one from #39724 as well, hopefully to make the other PR easier to review

'Namespace' parallel runs by bind-mounting a different directory
in the container, instead of making the tests running inside
the container aware of the namespaced location.

This makes it transparent to the tests, and slightly reduces
complexity.

This change fixes the problem I ran into in #39724 (comment):


Hm; looks like there's still an issue (at least with the uploaded bundles); with debug enabled, I see that these tests are run. Which means that we should have in total 18 go-test-report.json files, and 18 junit-report.xml files.

test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-build-go-test-report.json              --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-build-junit-report.xml              --raw-command -- go tool test2json -p amd64.integration.build              -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-config-go-test-report.json             --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-config-junit-report.xml             --raw-command -- go tool test2json -p amd64.integration.config             -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-container-go-test-report.json          --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-container-junit-report.xml          --raw-command -- go tool test2json -p amd64.integration.container          -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-image-go-test-report.json              --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-image-junit-report.xml              --raw-command -- go tool test2json -p amd64.integration.image              -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-network-go-test-report.json            --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-network-junit-report.xml            --raw-command -- go tool test2json -p amd64.integration.network            -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-network-ipvlan-go-test-report.json     --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-network-ipvlan-junit-report.xml     --raw-command -- go tool test2json -p amd64.integration.network.ipvlan     -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-network-macvlan-go-test-report.json    --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-network-macvlan-junit-report.xml    --raw-command -- go tool test2json -p amd64.integration.network.macvlan    -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-go-test-report.json             --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-junit-report.xml             --raw-command -- go tool test2json -p amd64.integration.plugin             -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-authz-go-test-report.json       --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-authz-junit-report.xml       --raw-command -- go tool test2json -p amd64.integration.plugin.authz       -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-common-go-test-report.json      --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-common-junit-report.xml      --raw-command -- go tool test2json -p amd64.integration.plugin.common      -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-graphdriver-go-test-report.json --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-graphdriver-junit-report.xml --raw-command -- go tool test2json -p amd64.integration.plugin.graphdriver -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-logging-go-test-report.json     --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-logging-junit-report.xml     --raw-command -- go tool test2json -p amd64.integration.plugin.logging     -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-volumes-go-test-report.json     --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-plugin-volumes-junit-report.xml     --raw-command -- go tool test2json -p amd64.integration.plugin.volumes     -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-secret-go-test-report.json             --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-secret-junit-report.xml             --raw-command -- go tool test2json -p amd64.integration.secret             -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-service-go-test-report.json            --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-service-junit-report.xml            --raw-command -- go tool test2json -p amd64.integration.service            -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-session-go-test-report.json            --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-session-junit-report.xml            --raw-command -- go tool test2json -p amd64.integration.session            -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-system-go-test-report.json             --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-system-junit-report.xml             --raw-command -- go tool test2json -p amd64.integration.system             -t ./test.main -test.v -test.timeout=120m
test_env gotestsum --format=standard-verbose --jsonfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-volume-go-test-report.json             --junitfile=/go/src/github.com/docker/docker/bundles/test-integration/amd64-integration-volume-junit-report.xml             --raw-command -- go tool test2json -p amd64.integration.volume             -t ./test.main -test.v -test.timeout=120m

However, in the "janky" bundle, I only see; 8 JSON files, and 6 XML files, so either the find is incorrect, or somewhere we purge files, or files are stored somewhere nested and therefore not found?

amd64-integration-config-go-test-report.json
amd64-integration-container-go-test-report.json
amd64-integration-network-ipvlan-go-test-report.json
amd64-integration-network-macvlan-go-test-report.json
amd64-integration-plugin-authz-go-test-report.json
amd64-integration-plugin-go-test-report.json
amd64-integration-plugin-logging-go-test-report.json
amd64-integration-service-go-test-report.json
amd64-integration-build-junit-report.xml
amd64-integration-plugin-graphdriver-junit-report.xml
amd64-integration-plugin-logging-junit-report.xml
amd64-integration-plugin-volumes-junit-report.xml
amd64-integration-service-junit-report.xml
amd64-integration-session-junit-report.xml

All files are present in the PowerPC and s390x bundles, so I suspect that it's either because the path is different for the Janky run (they use the 1/, 2/, 3/` subdirectories, or perhaps there's an issue because of the test-flags (it's weird though, because for some tests the XML is there, but the JSON is missing, and vice-versa)

@thaJeztah
Copy link
Member Author

@kolyshkin @tiborvass PTAL

Copy link
Contributor

@tiborvass tiborvass Aug 28, 2019

Choose a reason for hiding this comment

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

I'm not even sure removing this is supposed to work.

Copy link
Member Author

@thaJeztah thaJeztah Aug 28, 2019

Choose a reason for hiding this comment

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

it wasn't there before e554fb2 (#39682), so looked like I could remove it to be back to what was there before

Copy link
Member Author

Choose a reason for hiding this comment

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

Wondering if the problem I ran into is somehow caused by 13df617

root=$(dirname "$pidFile")/root
umount "$root" || true

Copy link
Member Author

Choose a reason for hiding this comment

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

hm, or multiple containers mounting the same path, could unmounting (when the container is stopped) cause issues for another container mounting the same path?

@thaJeztah thaJeztah force-pushed the integration_parallel_simplify branch 2 times, most recently from 39aaba2 to e065fd9 Compare September 3, 2019 08:29
'Namespace' parallel runs by bind-mounting a different directory
in the container, instead of making the tests running inside
the container aware of the namespaced location.

This makes it transparent to the tests, and slightly reduces
complexity.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@andrewhsu
Copy link
Contributor

I talked with @thaJeztah about this and I think this should help to simplify the isolation. cc @tiborvass

Copy link
Contributor

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

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

LGTM on green

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants