Skip to content

Enhance vagrant and dind provisioning and testing - #5443

Merged
openshift-bot merged 24 commits into
openshift:masterfrom
marun:dind-systemd
Nov 19, 2015
Merged

openshift-bot merged 24 commits into
openshift:masterfrom
marun:dind-systemd

Conversation

@marun

@marun marun commented Oct 27, 2015

Copy link
Copy Markdown
Contributor

This change switches docker-in-docker (dind) clusters from using supervisord to systemd for init, eliminating the major difference between vagrant and dind provisioning. This allowed the provisioning infrastructure to be substantially streamlined. Work included

  • refactored vagrant provisioning scripts for reuse by dind
  • added deployment of sdn node (with scheduling disabled) on master to ensure master connectivity to pod networks
  • added support for parallel deployment of a vm cluster (to speed up testing of vagrant provisioning)

@marun

marun commented Oct 27, 2015

Copy link
Copy Markdown
Contributor Author

Note that c7c0c9c is the first commit in this PR. The previous commits are from #4707 which will have to merge first.

Comment thread hack/test-net-e2e.sh Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be an extended test, in test/extended/network.sh and follow the patterns there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We already have a script (test/extended/networking.sh) that manages network test execution, including cluster deployment. This script is intended to allow tests to be run against a deployment that is not controlled by the test script, so that an arbitrary cluster can be targeted during development. If you insist that test/extended is where it belongs, fair enough, but I don't think it should have to 'follow the patterns there' since its purpose is different from what those patterns intend. Given that, what would you suggest?

@smarterclayton

Copy link
Copy Markdown
Contributor

Changes to vendored packages need to be in their own commit with subject line UPSTREAM: <PR #>: <description>

@marun

marun commented Oct 28, 2015

Copy link
Copy Markdown
Contributor Author

@smarterclayton Understood re: vendored packages. I intended 17b829d to be preliminary, pending merge of #4707, since there may be other code that needs to be synced from openshift-sdn beyond the dind compat fix.

@smarterclayton

Copy link
Copy Markdown
Contributor

That's what test/extended/networking.sh should allow (test/extended/core.sh
for example lets you run the e2e against any server). The extended tests
should set up a default environment but they should not require you have
one started.

On Tue, Oct 27, 2015 at 9:52 PM, Maru Newby [email protected]
wrote:

@smarterclayton https://github.com/smarterclayton Understood re:
vendored packages. I intended 17b829d
17b829d
to be preliminary, pending merge of #4707
#4707, since there may be other
code that needs to be synced from openshift-sdn beyond the dind compat fix.

—
Reply to this email directly or view it on GitHub
#5443 (comment).

@smarterclayton

Copy link
Copy Markdown
Contributor
  • not require you use the one the test script starts

On Tue, Oct 27, 2015 at 10:24 PM, Clayton Coleman [email protected]
wrote:

That's what test/extended/networking.sh should allow
(test/extended/core.sh for example lets you run the e2e against any
server). The extended tests should set up a default environment but they
should not require you have one started.

On Tue, Oct 27, 2015 at 9:52 PM, Maru Newby [email protected]
wrote:

@smarterclayton https://github.com/smarterclayton Understood re:
vendored packages. I intended 17b829d
17b829d
to be preliminary, pending merge of #4707
#4707, since there may be
other code that needs to be synced from openshift-sdn beyond the dind
compat fix.

—
Reply to this email directly or view it on GitHub
#5443 (comment).

@marun marun changed the title Enhance vagrant and dind provisioning and testing Enhance vagrant and dind provisioning Oct 28, 2015
@marun

marun commented Oct 28, 2015

Copy link
Copy Markdown
Contributor Author

@derekwaynecarr I'm guessing you might be interested in the refactoring of the vagrant provisioning.

Comment thread Vagrantfile Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if we're getting rid of differences between dind and non-dind, you should unify this as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@marun

marun commented Oct 29, 2015

Copy link
Copy Markdown
Contributor Author

@danwinship Would you please clarify what you were asking in your comment about --no-parallel?

@marun

marun commented Oct 29, 2015

Copy link
Copy Markdown
Contributor Author

The latest patchset is a rebase and adds commits to:

  • remove stale config before vm provisioning to eliminate the possibility of races
  • optionally skip go builds during cluster provisioning to speed up validation of dind provisioning changes

@danwinship

Copy link
Copy Markdown
Contributor

@marun: on the --no-parallel thing, I was just commenting that you seemed to be just declaring that parallel deploy worked without actually having done anything to make it work. But then I got to the last commit, which makes it work, so it's all good.

@marun marun changed the title Enhance vagrant and dind provisioning Enhance vagrant and dind provisioning and testing Oct 29, 2015
Comment thread contrib/vagrant/provision-util.sh Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So my earlier comment got eaten up in wherever old github review comments go to die. Anyway, I'd said you should "yum -y install deltarpm" first, and you said "but isn't it already installed?"

==> dind-host: Total download size: 295 M
==> dind-host: Downloading packages:
==> dind-host: Delta RPMs disabled because /usr/bin/applydeltarpm not installed.

I know the non-dind deployment also hits this. Anyway, it doesn't hurt to try to just always try to install it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@knobunc

knobunc commented Nov 6, 2015

Copy link
Copy Markdown
Contributor

LGTM, nice work.

@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 12, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The OPENSHIFT_SKIP_BUILD stuff seems like it would be easier to use if it was a command-line option to dind-cluster.sh instead of an environment variable. You could also have separate flags for skipping the image build and skipping the binary build.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree it would be better ux, but dind-cluster.sh follows the convention of not accepting optional arguments and I'd rather not change that in this PR.

Note that origin will always be built if the oc binary is not found, so rm'ing oc will ensure a build even if SKIP=true. Similarly, images can be built directly via dind-cluster.sh build-images

@danwinship

Copy link
Copy Markdown
Contributor

The commit "Fix off-by-one dind deployment bug" has a bunch of stuff in it that isn't related to the off-by-one bug. Likewise the commit message on "Fix off-by-one dind deployment bug" no longer matches the contents of the commit very well.

@danwinship

Copy link
Copy Markdown
Contributor

The first commit in the series is pretty impossible to actually review, but in testing the branch, everything seems to work, both in the VM-based and docker-in-docker-based vagrant deployments, with the extended networking tests passing in both configurations

@danwinship

Copy link
Copy Markdown
Contributor

so, lgtm

@smarterclayton

Copy link
Copy Markdown
Contributor

@jwforres does this overlap / conflict / equal the stuff you mentioned to me earlier?

@jwforres

Copy link
Copy Markdown
Member

@benjaminapetersen does this overlap with the work you did

marun added 17 commits November 16, 2015 06:50
It turns out that single square brackets treat <  and > as redirection
instead of comparison. Double square brackets ftw.  Also, prefer -lt,
-gt, etc.
The openshift-sdn debug script relies on ssh access to nodes.
Update the networking test script to follow the convention of the
core.sh script:

 - pass all script arguments to the test invocation
   - non-default behavior is controlled by env vars
 - use go test instead of the ginkgo wrapper script
Rename to OPENSHIFT_NETWORK_PLUGIN so it can be reused to indicate
non-openshift sdn plugins.
The network plugin name was being literally quoted (e.g. "'plugin'")
when passed to the provisioning scripts, resulting in the default always
being used.  This change removes the unnecessary quotes.
An sdn node (an openshift node running on the master to ensure master to
pod network connectivity) is a precondition for the kube intra pod test,
but that test doesn't work with origin at present and the method to
disable scheduling of the sdn node has proven unreliable.  This change
makes deployment of an sdn node optional via the OPENSHIFT_SDN_NODE
flag.
The test passes locally but consistently fails in CI.
Previously the test suite had copied the core suite in trying to pass
the report dir.  This change switches to passing the suite name as the
core suite is already doing.
'redeploy' rebuilds the golang binaries and deploys them to an existing
cluster to reduce the cost of exploratory testing.
A dind node needs to be configured with 3072mb of memory to be able to
build the extended networking tests.
Previously the extended networking tests would be run as soon as dind
cluster creation script returned.  There could be a delay, though, until
nodes in the cluster had registered themselves with the master and were
ready for testing, and if the tests ran before this happened they could
fail due to insufficient nodes being available.  This change ensures
that the tests wait for node availability.
Kubelet's oom cgroup modifications are not compatible with dind at this
time.  Use the fake oom adjuster if running in a dind container.
@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin testonlyextended up to 2aa9ff8

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/testonlyextended FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/7165/) (Extended Tests: networking)

@marun

marun commented Nov 19, 2015

Copy link
Copy Markdown
Contributor Author

[test]

@knobunc

knobunc commented Nov 19, 2015

Copy link
Copy Markdown
Contributor

LGTM

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4062/) (Image: devenv-rhel7_2745)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 2aa9ff8

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 2aa9ff8

@dcbw

dcbw commented Nov 19, 2015

Copy link
Copy Markdown
Contributor

I was also able to test it yesterday and Maru solved the issues I had raised. The e2e tests also completed successfully in DIND, and a normal non-DIND vagrant cluster worked as well. LGTM

openshift-bot pushed a commit that referenced this pull request Nov 19, 2015
@openshift-bot
openshift-bot merged commit 106821c into openshift:master Nov 19, 2015
@openshift-bot

Copy link
Copy Markdown
Contributor

@marun
marun deleted the dind-systemd branch February 17, 2016 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants