Get tests working again

* Don't try to install etcd. work with the one from devstack
* Remove taint so the node is schedulable
* Update list of failing tests

Change-Id: I2719fa2a3cadd57a62dfe9102b939edef2b36fd9
This commit is contained in:
Davanum Srinivas 2017-06-07 08:13:58 -04:00
parent 0e8182393f
commit 965e34806d
3 changed files with 17 additions and 12 deletions

View File

@ -30,11 +30,13 @@ FLAKY_TESTS_LIST=(
# https://github.com/kubernetes/kubernetes/issues/44226
'Downward API volume [It] should update labels on modification [Conformance] [Volume]'
'Downward API volume [It] should update annotations on modification [Conformance] [Volume]'
'Projected [It] should update labels on modification [Conformance] [Volume]'
'Secrets [It] should be consumable from pods in volume with mappings [Conformance] [Volume]'
)
FAILING_TESTS_LIST=(
# https://github.com/kubernetes/kubernetes/pull/45203
'Services [It] should create endpoints for unready pods'
'Services [It] should be able to create a functioning NodePort service'
'Services [It] should serve multiport endpoints from pods [Conformance]'
)
function escape_test_name() {
@ -126,6 +128,11 @@ echo "Dump Kubernetes Objects..."
./kubectl get serviceaccounts
./kubectl get services
echo "Clear the taint to make sure we can schedule jobs to the master node"
./kubectl taint nodes --all node.cloudprovider.kubernetes.io/uninitialized-
./kubectl get node -o json
echo "Create a default StorageClass since we do not have a cloud provider"
./kubectl create -f - <<EOF || true
kind: StorageClass
@ -149,6 +156,7 @@ export KUBE_MASTER=local
export KUBERNETES_PROVIDER=skeleton
export KUBERNETES_CONFORMANCE_TEST=y
export GINKGO_PARALLEL=y
export GINKGO_PARALLELISM=5
export GINKGO_NO_COLOR=y
export KUBE_MASTER_IP=https://127.0.0.1:6443/
@ -162,6 +170,7 @@ export HOST_INTERFACE=$(ip -f inet route | awk '/default/ {print $5}')
sudo iptables -t nat -A POSTROUTING -o $HOST_INTERFACE -s 10.0.0.0/24 -j MASQUERADE
sudo iptables -t nat -A POSTROUTING -o $HOST_INTERFACE -s 172.17.0.0/24 -j MASQUERADE
sudo -E PATH=$GOPATH/bin:$PATH make all WHAT=test/e2e/e2e.test
sudo -E PATH=$GOPATH/bin:$PATH go run hack/e2e.go -- -v --test --test_args="--ginkgo.trace=true --ginkgo.seed=1378936983 --logtostderr --v 4 --provider=local --report-dir=/opt/stack/logs/ --ginkgo.v --ginkgo.skip=$(test_names)"
popd >/dev/null

View File

@ -19,7 +19,6 @@ export GOPATH=${BASE_DIR}/go
CONFORMANCE_REPO=${CONFORMANCE_REPO:-github.com/kubernetes/kubernetes}
K8S_SRC=${GOPATH}/src/k8s.io/kubernetes
ETCD_VERSION=v3.1.4
function install_prereqs {
# Install pre-reqs
@ -84,12 +83,9 @@ function install_k8s_cloud_provider {
# Run the script that builds kubernetes from source and starts the processes
pushd ${K8S_SRC} >/dev/null
# We need etcd for local-up-cluster to work
hack/install-etcd.sh
# local-up-cluster needs the etcd path and the GOPATH bin as cf-ssl
# and go-bindata are located there
export PATH=${K8S_SRC}/third_party/etcd:$GOPATH/bin:${PATH}
export PATH=$DEST/bin:$GOPATH/bin:${PATH}
# Seed the log files so devstack-gate can capture the logs
export LOG_DIR=${SCREEN_LOGDIR:-/opt/stack/logs}
@ -130,6 +126,9 @@ function install_k8s_cloud_provider {
# Use the docker0's ip address for kubedns to work
export API_HOST_IP="172.17.0.1"
# kill etcd and let local-up-cluster start it up
$SYSTEMCTL stop $ETCD_SYSTEMD_SERVICE
# local-up-cluster.sh compiles everything from source and starts the services.
sudo -E PATH=$PATH ./hack/local-up-cluster.sh
@ -140,8 +139,8 @@ function install_k8s_cloud_provider {
# runs that a clean run would need to clean up
function cleanup_k8s_cloud_provider {
echo_summary "Cleaning up Devstack Plugin for k8s-cloud-provider"
# Kill etcd and the k8s processes
ps -ef | grep -e etcd -e hyperkube | grep -v grep | awk '{print $2}' | xargs sudo kill -9
# Kill the k8s processes
ps -ef | grep -e hyperkube | grep -v grep | awk '{print $2}' | xargs sudo kill -9
# Cleanup docker images and containers
sudo docker rm -f $(docker ps -a -q) || true
@ -150,13 +149,11 @@ function cleanup_k8s_cloud_provider {
# Stop docker
sudo systemctl stop docker.service
sudo rm -rf "$K8S_SRC"
sudo rm -rf "$DEST/etcd"
}
function stop_k8s_cloud_provider {
echo_summary "Stop Devstack Plugin for k8s-cloud-provider"
stop_process kubernetes
stop_process etcd-server
}
# check for service enabled

View File

@ -1,5 +1,4 @@
# settings file for devstack plugin
enable_service k8s-cloud-provider
enable_service etcd-server
enable_service kubernetes