Skip to content

Commit

Permalink
Merge pull request #763 from Mirantis/ivan4th/reenable-ceph-e2e
Browse files Browse the repository at this point in the history
Fix and reenable Ceph e2e
  • Loading branch information
pigmej authored Sep 10, 2018
2 parents 0008256 + 592dacc commit 8d0ea61
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,13 @@ e2e: &e2e
- run:
name: Run e2e tests
# Ceph RBD tests are disabled for now because ceph/demo image is gone
command: |
build/portforward.sh 8080&
mkdir -p ~/junit
skip="-ginkgo.skip=\[Heavy\]|\[MultiCNI\]|\[Disruptive\]|RBD volumes"
skip="-ginkgo.skip=\[Heavy\]|\[MultiCNI\]|\[Disruptive\]"
if [[ ${CIRCLE_JOB} = e2e_multi_cni ]]; then
# per-node config test requires an additional worker node
skip="-ginkgo.skip=\[Heavy\]|\[Disruptive\]|Per-node configuration|RBD volumes"
skip="-ginkgo.skip=\[Heavy\]|\[Disruptive\]|Per-node configuration"
fi
_output/virtlet-e2e-tests -test.v "${skip}" -junitOutput ~/junit/junit.xml -include-unsafe-tests=true
Expand Down
25 changes: 16 additions & 9 deletions tests/e2e/ceph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,18 @@ func setupCeph() (string, string) {
Expect(err).NotTo(HaveOccurred())

container.Delete()
Expect(container.PullImage("docker.io/ceph/demo:tag-stable-3.0-jewel-ubuntu-16.04")).To(Succeed())
Expect(container.Run("docker.io/ceph/demo:tag-stable-3.0-jewel-ubuntu-16.04",
map[string]string{"MON_IP": monIP, "CEPH_PUBLIC_NETWORK": cephPublicNetwork},
"host", nil, false)).To(Succeed())
Expect(container.PullImage("docker.io/ceph/daemon:v3.1.0-stable-3.1-mimic-centos-7")).To(Succeed())
Expect(container.Run("docker.io/ceph/daemon:v3.1.0-stable-3.1-mimic-centos-7",
map[string]string{
"MON_IP": monIP,
"CEPH_PUBLIC_NETWORK": cephPublicNetwork,
"CEPH_DEMO_UID": "foo",
"CEPH_DEMO_ACCESS_KEY": "foo",
"CEPH_DEMO_SECRET_KEY": "foo",
"CEPH_DEMO_BUCKET": "foo",
"DEMO_DAEMONS": "osd mds",
},
"host", nil, false, "demo")).To(Succeed())

cephContainerExecutor := container.Executor(false, "")
By("Waiting for ceph cluster")
Expand All @@ -211,14 +219,13 @@ func setupCeph() (string, string) {

// Add rbd pool and volume
`ceph osd pool create libvirt-pool 8 8`,
`apt-get update && apt-get install -y qemu-utils 2> /dev/null`,
`qemu-img create -f rbd rbd:libvirt-pool/rbd-test-image1 10M`,
`qemu-img create -f rbd rbd:libvirt-pool/rbd-test-image2 10M`,
`qemu-img create -f rbd rbd:libvirt-pool/rbd-test-image-pv 10M`,
`rbd create rbd-test-image1 --size 10M --pool libvirt-pool --image-feature layering`,
`rbd create rbd-test-image2 --size 10M --pool libvirt-pool --image-feature layering`,
`rbd create rbd-test-image-pv --size 10M --pool libvirt-pool --image-feature layering`,

// Add user for virtlet
`ceph auth get-or-create client.libvirt`,
`ceph auth caps client.libvirt mon "allow *" osd "allow *" msd "allow *"`,
`ceph auth caps client.libvirt mon "allow *" osd "allow *"`,
`ceph auth get-key client.libvirt`,
}
for _, cmd := range commands {
Expand Down

0 comments on commit 8d0ea61

Please sign in to comment.