remove skip restart option and other small fixes
diff --git a/.gitignore b/.gitignore
index db581da..8016a81 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@
logger/*
voltha-debug-dump-minimal*
voltha-system-tests
+voltha-debug-dump-*
diff --git a/README.md b/README.md
index 39be5c4..e9103ba 100644
--- a/README.md
+++ b/README.md
@@ -72,7 +72,6 @@
| `WITH_CHAOS` | no | Starts kube-monkey to introduce chaos |
| `CONFIG_SADIS` | no | Configure SADIS entries into ONOS, if WITH_ONOS set (see SADIS Configuration |
| `INSTALL_ONOS_APPS` | no | Replaces/installs ONOS OAR files in onos-files/onos-apps |
-| `SKIP_RESTART_API` | no | Should the VOLTHA API service be restarted after install to avoid known bug? |
| `INSTALL_KUBECTL` | yes | Should a copy of `kubectl` be installed locally? |
| `INSTALL_HELM` | yes | Should a copy of `helm` be installed locallly? |
| `VOLTHA_LOG_LEVEL` | WARN | Log level to set for VOLTHA core processes |
diff --git a/scripts/e2e-repeat.sh b/scripts/e2e-repeat.sh
index f34120b..be9a8f6 100755
--- a/scripts/e2e-repeat.sh
+++ b/scripts/e2e-repeat.sh
@@ -78,13 +78,19 @@
KEY_DIFFS=()
SIZE_DIFFS=()
LOG=$(mktemp)
+FIRST=1
while true; do
RUN_TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
echo "START RUN $RUN @ $RUN_TS" | tee -a $LOG
- DEPLOY_K8S=y WITH_BBSIM=y WITH_SADIS=y WITH_RADIUS=y ./voltha up
+ if [ $FIRST -eq 1 ]; then
+ DEPLOY_K8S=y WITH_BBSIM=y WITH_SADIS=y WITH_RADIUS=y CONFIG_SADIS=y ./voltha up
+ FIRST=0
+ else
+ helm install --wait -f full-values.yaml --set defaults.log_level=WARN --namespace voltha --name bbsim onf/bbsim
+ fi
# because BBSIM needs time
sleep 60
- ETCD=$(kubectl -n voltha get pods | grep etcd-cluster | awk '{print $1}')
+ ETCD=$(kubectl -n voltha get pods | grep etcd-cluster | awk '{print $1}' | head -1)
BEFORE_KEY_COUNT=$(kubectl -n voltha exec -ti $ETCD \
-- sh -c 'ETCDCTL_API=3 etcdctl get --command-timeout=60s --from-key=true --keys-only . | sed -e "/^$/d" | wc -l | tr -d "\r\n"')
BEFORE_SIZE=$(numfmt --to=iec \
diff --git a/scripts/etcd-db-size.sh b/scripts/etcd-db-size.sh
index 2c16966..befb6a8 100755
--- a/scripts/etcd-db-size.sh
+++ b/scripts/etcd-db-size.sh
@@ -17,7 +17,7 @@
set -o pipefail
-ETCD=$(kubectl -n voltha get pods 2>&1 | grep etcd-cluster | awk '{print $1}')
+ETCD=$(kubectl -n voltha get pods 2>&1 | grep etcd-cluster | awk '{print $1}' | head -1)
if [ -z "$ETCD" ]; then
echo "N/A"
else
diff --git a/scripts/monitor.sh b/scripts/monitor.sh
index 84a8cae..0a2bf47 100755
--- a/scripts/monitor.sh
+++ b/scripts/monitor.sh
@@ -16,7 +16,7 @@
# This script sets up a watch with information that is valuable when
# developing voltha with k8s
-watch '$HOME/kind-voltha/bin/kubectl get --all-namespaces pods,svc && echo "" \
+$HOME/kind-voltha/bin/kubectl get --all-namespaces pods,svc && echo "" \
&& kubectl describe --all-namespaces pods | grep Image: | grep voltha | sed -e "s/^ *//g" -e "s/: */: /g" && echo "" \
&& echo "DB SIZE: $(./scripts/etcd-db-size.sh)" && echo "" \
- && echo "RSS SIZE: $(ps -eo rss,pid,cmd | grep /usr/local/bin/etcd | grep -v grep | cut -d\ -f1 | numfmt --to=iec)"'
+ && echo "RSS SIZE: $(ps -eo rss,pid,cmd | grep /usr/local/bin/etcd | grep -v grep | cut -d\ -f1 | numfmt --to=iec | tr '\n' ' ' )"
diff --git a/voltha b/voltha
index eaec4e2..7fd5b18 100755
--- a/voltha
+++ b/voltha
@@ -79,7 +79,6 @@
INSTALL_ONOS_APPS=${INSTALL_ONOS_APPS:-no}
JUST_K8S=${JUST_K8S:-no}
DEPLOY_K8S=${DEPLOY_K8S:-yes}
-SKIP_RESTART_API=${SKIP_RESTART_API:-yes}
INSTALL_KUBECTL=${INSTALL_KUBECTL:-yes}
INSTALL_HELM=${INSTALL_HELM:-yes}
UPDATE_HELM_REPOS=${UPDATE_HELM_REPOS:-yes}
@@ -141,7 +140,6 @@
JUST_K8S \
DEPLOY_K8S \
INSTALL_ONOS_APPS \
- SKIP_RESTART_API \
INSTALL_KUBECTL \
INSTALL_HELM \
UPDATE_HELM_REPOS \
@@ -1107,15 +1105,6 @@
fi
STIME=$(date +%s)
-if [ $SKIP_RESTART_API == "no" ]; then
- echo -e "Restart VOLTHA API $RESTART"
- API="voltha-api-server-.* voltha-ofagent-.*"
- (set -x; kubectl scale --replicas=0 deployment -n voltha voltha-api-server voltha-ofagent >>$LOG 2>&1) >>$LOG 2>&1
- wait_for_pods - "voltha" 0 "includes" -1 "Wait for API to stop $STOP" $API
- (set -x; kubectl scale --replicas=1 deployment -n voltha voltha-api-server voltha-ofagent >>$LOG 2>&1) >>$LOG 2>&1
- wait_for_pods - "voltha" 2 "includes" -1 "Wait for API to re-start $GO" $API
-fi
-
bspin - "Forward VOLTHA API port $FORWARD"
for i in $(screen -ls | grep voltha-api-$NAME | awk '{print $1}'); do
(set -x; screen -X -S $i quit >>$LOG 2>&1) >>$LOG 2>&1