Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2: Add e2e tests for NFS and Gluster #7435

Merged
merged 1 commit into from
May 27, 2015

Conversation

jsafrane
Copy link
Member

Based on PR #6755 and #7223

  • there is some common scaffolding to write additional volume tests easily
  • there are no services for NFS/Gluster servers, the test mounts directly IP address of the server pod
  • now with Makefiles and Dockerfiles in /contrib/for-tests/volumes/*
    • the images are based on Ubuntu 14.04, like several /cluster/addons and number of examples
    • can someone please push the images to gcr.io/google_containers/?

The test must be run with --allow_privileged=True everywhere, the server pods won't work without that. Should it be made default for e2e tests?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@a-robinson
Copy link
Contributor

@thockin @vishh

@roberthbailey
Copy link
Contributor

@thockin if you won't have time to review this yourself, can you please find someone to take a look at it?

var err error
c, err = loadClient()
Expect(err).NotTo(HaveOccurred())
namespace = "e2e-ns-" + randomSuffix()
Copy link
Member

Choose a reason for hiding this comment

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

You'll want to use namespace lifecycle as we do in networking.go....

In BeforeEach

By("Building a namespace api object")
namespace, err = createTestingNS("nettest", c)
Expect(err).NotTo(HaveOccurred())

And in AfterEach

if err := c.Namespaces().Delete(namespace.Name); err != nil {
Failf("Couldn't delete ns %s", err)
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@timothysc
Copy link
Member

@thockin, @zmerlynn, @roberthbailey, @quinton-hoole, - reping.

I know everyone is busy, but this is pretty important from our side, can we delegate here?

@ghost
Copy link

ghost commented May 14, 2015

I can take a look at this today.

@ghost ghost assigned ghost and unassigned thockin May 14, 2015
@ghost
Copy link

ghost commented May 14, 2015

Build failed on both Travis and Shippable for the same reaon:

./hack/verify-boilerplate.sh
Boilerplate header is wrong for: ./test/e2e/volumes.go

@jayunit100
Copy link
Member

Fyi it's easy to fix just copy the new header over From any current files the owner changed to kubernetes from google. This happens on prs which predate the owner change

@@ -0,0 +1,11 @@
FROM ubuntu:14.04
Copy link

Choose a reason for hiding this comment

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

  1. You're going to need to include the standard copyright and license blurb at the head of every new file that you add.
  2. Given that every other directory under for-tests/ follows the naming convention of xxx-tester, is there any reason not to follow that convention here?

Copy link

Choose a reason for hiding this comment

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

As per previous comment, can we not get by with a smaller base container image here. This one includes "ubuntu universe" which seems excessive.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copyright header added to all Dockerfiles.

@jsafrane
Copy link
Member Author

It's hard to believe that both NFS and Gluster are each twice the size of a whole operating system base image? But if that is really the case, I guess switching to Debian as the base OS is the best we can do. But you can defer that to a separate PR if you like. Consider it a nit, given that the difference in size between Ubuntu and Debian base is only about 50MB, less than 10% of the total, assuming that your numbers are correct. If you decide to do that, please open a separate issue and cross-reference this one.

Ok, I'll re-base the images to Debian in separate PR when this one is merged.

I don't really understand why you cannot run an NFS or Gluster server in a non-privileged container? If you can get the servers to run in non-privileged containers, then we can enable these tests by default.

NFS container needs to mount /proc/fs/nfsd. I don't know exactly what Gluster container needs, but it does not work in unprivileged mode.

@jsafrane
Copy link
Member Author

Shippable — Builds failed on Shippable

Any idea what's wrong? Shippable.com shows me endless "Waiting for build information...".

@timothysc
Copy link
Member

@jsafrane - Shippable is a false positive.

@ghost
Copy link

ghost commented May 22, 2015

Please squash into a single commit, and then this is LGTM to merge.

@timothysc
Copy link
Member

/cc @eparis

# See the License for the specific language governing permissions and
# limitations under the License.

FROM ubuntu:14.04
Copy link
Member

Choose a reason for hiding this comment

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

Centos please.

- add appropriate server containers into contrib/for-tests/volumes-tester
- the tests are off by default (they need kubelet --allow_privileged=True)
  - enable by 'go run hack/e2e.go ... --ginkgo.focus=Volume'
- add glusterfs tools to list of installed packages on each node
@jsafrane jsafrane force-pushed the devel/volume-tests branch from 6dc23f9 to 20004e0 Compare May 25, 2015 10:04
@jsafrane
Copy link
Member Author

Squashed. I'll look into squeezing the size of test images in a separate PR.

@timothysc
Copy link
Member

@jsafrane great!
@quinton-hoole PTAL por favor.

@ghost
Copy link

ghost commented May 26, 2015

LGTM. @saad-ali will merge as soon as is practical. There is a significant PR backlog, so it might take a few hours.

@ghost ghost added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 26, 2015
@timothysc
Copy link
Member

ack, thx.

saad-ali added a commit that referenced this pull request May 27, 2015
V2: Add e2e tests for NFS and Gluster
@saad-ali saad-ali merged commit bed9f82 into kubernetes:master May 27, 2015
@timothysc
Copy link
Member

@saad-ali @brendanburns - could we get an image upload for the tests to gcr.io/google_containers loc?

@saad-ali
Copy link
Member

@timothysc I'll take a crack at pushing the gluster and nfs images to gcr.io

@timothysc
Copy link
Member

@saad-ali many thanks.

@saad-ali
Copy link
Member

Pushed volume-gluster and volume-nfs to gcr.io/google_containers.
The following commands should work now:

gcloud preview docker pull gcr.io/google_containers/volume-gluster:0.1
gcloud preview docker pull gcr.io/google_containers/volume-nfs:0.1

config := VolumeTestConfig{
namespace: namespace.Name,
prefix: "nfs",
serverImage: "gcr.io/google_containers/volume-nfs",
Copy link
Member

Choose a reason for hiding this comment

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

@saad-ali, @jsafrane, @childsb
So both the nfs and gluster tests still fail b/c tag is missing.

docker pull gcr.io/google_containers/volume-nfs

Pulling repository gcr.io/google_containers/volume-nfs
FATA[0001] Tag latest not found in repository gcr.io/google_containers/volume-nfs

docker pull gcr.io/google_containers/volume-nfs:0.1

Pulling repository gcr.io/google_containers/volume-nfs
7faef5ba165a: Download complete
e9e06b06e14c: Download complete
a82efea989f9: Download complete
37bea4ee0c81: Download complete
07f8e8c5e660: Download complete
a61fbd375433: Download complete
36ed446fd761: Download complete
5c06e7e161bd: Download complete
087a9dde26b9: Download complete
56da8d2b187a: Download complete
8cb003e95f03: Download complete
9570a95e2d95: Download complete
Status: Downloaded newer image for gcr.io/google_containers/volume-nfs:0.1

@saad-ali
Copy link
Member

@timothysc Yep, the tagging is screwed up, Since the nfs and gluster Makefiles manually sets a version, docker doesn't automatically attach the latest tag. I'll take a crack at fixing this today.

@saad-ali
Copy link
Member

Ok, the following commands should all work now. I'll send out a PR with the updated Makefiles

gcloud preview docker pull gcr.io/google_containers/volume-gluster:0.1
gcloud preview docker pull gcr.io/google_containers/volume-nfs:0.1
gcloud preview docker pull gcr.io/google_containers/volume-gluster:latest
gcloud preview docker pull gcr.io/google_containers/volume-nfs:latest
gcloud preview docker pull gcr.io/google_containers/volume-gluster
gcloud preview docker pull gcr.io/google_containers/volume-nfs

(Note for the last two, they default to :latest)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-infra lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants