blob: 4db984303f058527b002db05cb81d0cc758b099f [file] [log] [blame]
Matteo Scandolo4b006ae2020-11-09 16:14:40 -08001// Copyright 2019-present Open Networking Foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// deploy VOLTHA using kind-voltha and performs a scale test
16
17pipeline {
18
19 /* no label, executor is determined by JJB */
20 agent {
21 label "${params.buildNode}"
22 }
23 options {
Matteo Scandolof7ca6312020-11-16 15:57:15 -080024 timeout(time: 120, unit: 'MINUTES')
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080025 }
26 environment {
27 JENKINS_NODE_COOKIE="dontKillMe" // do not kill processes after the build is done
28 KUBECONFIG="$HOME/.kube/config"
29 SSHPASS="karaf"
30 PATH="$PATH:$WORKSPACE/kind-voltha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
31 SCHEDULE_ON_CONTROL_NODES="yes"
32 FANCY=0
33 WAIT_ON_DOWN="yes"
34 WITH_SIM_ADAPTERS="no"
35 WITH_RADIUS="${withRadius}"
36 WITH_BBSIM="yes"
37 LEGACY_BBSIM_INDEX="no"
38 DEPLOY_K8S="no"
39 CONFIG_SADIS="external"
40 WITH_KAFKA="yes"
41 WITH_ETCD="yes"
42 VOLTHA_ETCD_PORT=9999
43
44 // VOLTHA namespaces are defined at runtime depending on the stack we're installing
45 // VOLTHA_NS="default"
46 // ADAPTER_NS="default"
47 // BBSIM_NS="default"
48 INFRA_NS="infra"
49
50 // configurable options
51 WITH_EAPOL="${withEapol}"
52 WITH_DHCP="${withDhcp}"
53 WITH_IGMP="${withIgmp}"
54 VOLTHA_LOG_LEVEL="${logLevel}"
55 NUM_OF_BBSIM="${olts}"
56 NUM_OF_OPENONU="${openonuAdapterReplicas}"
57 NUM_OF_ONOS="${onosReplicas}"
58 NUM_OF_ATOMIX="${atomixReplicas}"
59 NUM_OF_KAFKA="${kafkaReplicas}"
60 NUM_OF_ETCD="${etcdReplicas}"
61 WITH_PPROF="${withProfiling}"
62 EXTRA_HELM_FLAGS="${extraHelmFlags} " // note that the trailing space is required to separate the parameters from appends done later
63 VOLTHA_CHART="${volthaChart}"
64 VOLTHA_BBSIM_CHART="${bbsimChart}"
65 VOLTHA_ADAPTER_OPEN_OLT_CHART="${openoltAdapterChart}"
66 VOLTHA_ADAPTER_OPEN_ONU_CHART="${openonuAdapterChart}"
67 ONOS_CLASSIC_CHART="${onosChart}"
68 RADIUS_CHART="${radiusChart}"
69
70 APPS_TO_LOG="etcd kafka onos-onos-classic adapter-open-onu adapter-open-olt rw-core ofagent bbsim radius"
71 LOG_FOLDER="$WORKSPACE/logs"
72
73 GERRIT_PROJECT="${GERRIT_PROJECT}"
74 }
75
76 stages {
77 stage ('Cleanup') {
78 steps {
79 timeout(time: 11, unit: 'MINUTES') {
80 sh returnStdout: false, script: """
Matteo Scandolobe823242020-11-20 13:48:13 -080081 helm repo add stable https://charts.helm.sh/stable
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080082 helm repo add onf https://charts.opencord.org
83 helm repo add cord https://charts.opencord.org
84 helm repo add onos https://charts.onosproject.org
85 helm repo add atomix https://charts.atomix.io
86 helm repo add bbsim-sadis https://ciena.github.io/bbsim-sadis-server/charts
87 helm repo update
88
Matteo Scandolo3111f2b2020-12-02 15:33:26 -080089 # NOTE this is temporary, for now the bbsim-sadis-server service will be overridden and ONOS will use the new server
90 kubectl delete -n infra -f $HOME/bbsim-sadis-server/deployments/bbsim-sadis-server.yaml
91
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080092 # removing ETCD port forward
93 P_ID="\$(ps e -ww -A | grep "_TAG=etcd-port-forward" | grep -v grep | awk '{print \$1}')"
94 if [ -n "\$P_ID" ]; then
95 kill -9 \$P_ID
96 fi
97
Matteo Scandolo9fe8cad2020-11-13 12:54:19 -080098 NAMESPACES="voltha1 voltha2 infra default"
99 for NS in \$NAMESPACES
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800100 do
Matteo Scandolo9fe8cad2020-11-13 12:54:19 -0800101 for hchart in \$(helm list -n \$NS -q | grep -E -v 'docker-registry|kafkacat');
102 do
103 echo "Purging chart: \${hchart}"
104 helm delete -n \$NS "\${hchart}"
105 done
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800106 done
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800107
108 test -e $WORKSPACE/kind-voltha/voltha && cd $WORKSPACE/kind-voltha && ./voltha down
109
Matteo Scandolobe823242020-11-20 13:48:13 -0800110 ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800111
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800112 cd $WORKSPACE
113 rm -rf $WORKSPACE/*
114 """
115 }
116 }
117 }
118 stage('Clone kind-voltha') {
119 steps {
120 checkout([
121 $class: 'GitSCM',
122 userRemoteConfigs: [[
123 url: "https://gerrit.opencord.org/kind-voltha",
124 refspec: "${kindVolthaChange}"
125 ]],
126 branches: [[ name: "master", ]],
127 extensions: [
128 [$class: 'WipeWorkspace'],
129 [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
130 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
131 ],
132 ])
133 script {
134 sh(script:"""
135 if [ '${kindVolthaChange}' != '' ] ; then
136 cd $WORKSPACE/kind-voltha;
137 git fetch https://gerrit.opencord.org/kind-voltha ${kindVolthaChange} && git checkout FETCH_HEAD
138 fi
139 """)
140 }
141 }
142 }
143 stage('Clone voltha-system-tests') {
144 steps {
145 checkout([
146 $class: 'GitSCM',
147 userRemoteConfigs: [[
148 url: "https://gerrit.opencord.org/voltha-system-tests",
149 refspec: "${volthaSystemTestsChange}"
150 ]],
151 branches: [[ name: "${release}", ]],
152 extensions: [
153 [$class: 'WipeWorkspace'],
154 [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
155 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
156 ],
157 ])
158 script {
159 sh(script:"""
160 if [ '${volthaSystemTestsChange}' != '' ] ; then
161 cd $WORKSPACE/voltha-system-tests;
162 git fetch https://gerrit.opencord.org/voltha-system-tests ${volthaSystemTestsChange} && git checkout FETCH_HEAD
163 fi
164 """)
165 }
166 }
167 }
168 stage('Build patch') {
169 when {
170 expression {
171 return params.GERRIT_PROJECT
172 }
173 }
174 steps {
175 sh """
176 git clone https://\$GERRIT_HOST/\$GERRIT_PROJECT
177 cd \$GERRIT_PROJECT
178 git fetch https://\$GERRIT_HOST/\$GERRIT_PROJECT \$GERRIT_REFSPEC && git checkout FETCH_HEAD
179
180 DOCKER_REGISTRY=${dockerRegistry}/ DOCKER_REPOSITORY=voltha/ DOCKER_TAG=voltha-scale make docker-build
181 DOCKER_REGISTRY=${dockerRegistry}/ DOCKER_REPOSITORY=voltha/ DOCKER_TAG=voltha-scale make docker-push
182 """
183 }
184 }
185 stage('Deploy common infrastructure') {
186 // includes monitoring, kafka, etcd
187 steps {
188 sh '''
189 if [ ${withMonitoring} = true ] ; then
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800190 helm install -n $INFRA_NS nem-monitoring cord/nem-monitoring \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800191 -f $HOME/voltha-scale/grafana.yaml \
192 --set prometheus.alertmanager.enabled=false,prometheus.pushgateway.enabled=false \
193 --set kpi_exporter.enabled=false,dashboards.xos=false,dashboards.onos=false,dashboards.aaa=false,dashboards.voltha=false
194 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800195 '''
196 }
197 }
198 stage('Deploy VOLTHA infrastructure') {
199 steps {
200 sh returnStdout: false, script: '''
201 cd $WORKSPACE/kind-voltha/
202
Matteo Scandolof6656562020-11-16 14:45:44 -0800203 export ETCD_CHART=$HOME/teone/helm-charts/etcd
204 export KAFKA_CHART=$HOME/teone/helm-charts/kafka
Matteo Scandolob28a97b2020-11-13 10:58:32 -0800205
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800206 # KAFKA config
Matteo Scandolof6656562020-11-16 14:45:44 -0800207 export NUM_OF_KAFKA=${kafkaReplicas}
208 export EXTRA_HELM_FLAGS+=' --set prometheus.kafka.enabled=true,prometheus.operator.enabled=true,prometheus.jmx.enabled=true,prometheus.operator.serviceMonitor.namespace=default '
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800209
210 # ETCD config
Matteo Scandolof6656562020-11-16 14:45:44 -0800211 export EXTRA_HELM_FLAGS+=" --set memoryMode=${inMemoryEtcdStorage} "
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800212
213 NAME=infra JUST_INFRA=y ./voltha up
214
215 # Forward the ETCD port onto $VOLTHA_ETCD_PORT
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800216 _TAG=etcd-port-forward kubectl -n \$INFRA_NS port-forward --address 0.0.0.0 -n default service/etcd $VOLTHA_ETCD_PORT:2379&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800217 '''
218 }
219 }
220 stage('Deploy Voltha') {
221 steps {
222 deploy_voltha_stacks(params.volthaStacks)
223 }
224 }
225 stage('Start logging') {
226 steps {
227 sh returnStdout: false, script: '''
228 # start logging with kail
229
230 mkdir -p $LOG_FOLDER
231
232 list=($APPS_TO_LOG)
233 for app in "${list[@]}"
234 do
235 echo "Starting logs for: ${app}"
236 _TAG=kail-$app kail -l app=$app --since 1h > $LOG_FOLDER/$app.log&
237 done
238 '''
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800239 }
240 }
241 stage('Configuration') {
242 steps {
243 script {
244 sh returnStdout: false, script: """
Matteo Scandolo68978752020-12-02 12:23:42 -0800245
246 # NOTE this is temporary, for now the bbsim-sadis-server service will be overridden and ONOS will use the new server
247 helm del -n infra bbsim-sadis-server
248 kubectl apply -n infra -f $HOME/bbsim-sadis-server/deployments/bbsim-sadis-server.yaml
249
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800250 # TODO this needs to be repeated per stack
251 # kubectl exec \$(kubectl get pods | grep -E "bbsim[0-9]" | awk 'NR==1{print \$1}') -- bbsimctl log ${logLevel.toLowerCase()} false
252
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800253 #Setting link discovery
254 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.provider.lldp.impl.LldpLinkProvider enabled ${withLLDP}
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800255 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.net.flow.impl.FlowRuleManager allowExtraneousRules true
256 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.net.flow.impl.FlowRuleManager importExtraneousRules true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800257 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.net.flowobjective.impl.InOrderFlowObjectiveManager accumulatorMaxBatchMillis 1000
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800258 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.net.flowobjective.impl.InOrderFlowObjectiveManager accumulatorMaxIdleMillis 500
259
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800260 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg log:set ${logLevel} org.onosproject
261 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg log:set ${logLevel} org.opencord
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800262
263 # Set Flows/Ports/Meters poll frequency
264 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.provider.of.flow.impl.OpenFlowRuleProvider flowPollFrequency ${onosStatInterval}
265 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.provider.of.device.impl.OpenFlowDeviceProvider portStatsPollFrequency ${onosStatInterval}
266
267 if [ ${withFlows} = false ]; then
268 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.olt
269 fi
270
271 if [ ${withMibTemplate} = true ] ; then
272 rm -f BBSM-12345123451234512345-00000000000001-v1.json
273 wget https://raw.githubusercontent.com/opencord/voltha-openonu-adapter/master/templates/BBSM-12345123451234512345-00000000000001-v1.json
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800274 cat BBSM-12345123451234512345-00000000000001-v1.json | kubectl -n \$INFRA_NS exec -it \$(kubectl -n \$INFRA_NS get pods -l app=etcd | awk 'NR==2{print \$1}') -- etcdctl put service/voltha/omci_mibs/templates/BBSM/12345123451234512345/00000000000001
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800275 fi
276
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800277 if [ ${withPcap} = true ] && [ ${volthaStacks} -eq 1 ] ; then
278 # FIXME ofagent pcap has to be replicated per stack
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800279 # Start the tcp-dump in ofagent
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800280 export OF_AGENT=\$(kubectl -n \$INFRA_NS get pods -l app=ofagent -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800281 kubectl exec \$OF_AGENT -- apk update
282 kubectl exec \$OF_AGENT -- apk add tcpdump
283 kubectl exec \$OF_AGENT -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800284 _TAG=ofagent-tcpdump kubectl -n \$INFRA_NS exec \$OF_AGENT -- tcpdump -nei eth0 -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800285
286 # Start the tcp-dump in radius
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800287 export RADIUS=\$(kubectl -n \$INFRA_NS get pods -l app=radius -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800288 kubectl exec \$RADIUS -- apt-get update
289 kubectl exec \$RADIUS -- apt-get install -y tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800290 _TAG=radius-tcpdump kubectl -n \$INFRA_NS exec \$RADIUS -- tcpdump -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800291
292 # Start the tcp-dump in ONOS
293 for i in \$(seq 0 \$ONOSES); do
294 INSTANCE="onos-onos-classic-\$i"
295 kubectl exec \$INSTANCE -- apt-get update
296 kubectl exec \$INSTANCE -- apt-get install -y tcpdump
297 kubectl exec \$INSTANCE -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800298 _TAG=\$INSTANCE kubectl -n \$INFRA_NS exec \$INSTANCE -- /usr/bin/tcpdump -nei eth0 port 1812 -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800299 done
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800300 else
301 echo "PCAP not supported for multiple VOLTHA stacks"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800302 fi
303 """
304 }
305 }
306 }
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800307 stage('Setup Test') {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800308 steps {
309 sh '''
310 mkdir -p $WORKSPACE/RobotLogs
311 cd $WORKSPACE/voltha-system-tests
312 make vst_venv
313 '''
314 sh '''
315 if [ ${withProfiling} = true ] ; then
316 mkdir -p $LOG_FOLDER/pprof
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800317 cat << EOF > $WORKSPACE/pprof.sh
318timestamp() {
319 date +"%T"
320}
321
322i=0
323while [[ true ]]; do
324 ((i++))
325 ts=$(timestamp)
326 go tool pprof -png http://127.0.0.1:6060/debug/pprof/heap > $LOG_FOLDER/pprof/rw-core-heap-\\$i-\\$ts.png
327 go tool pprof -png http://127.0.0.1:6060/debug/pprof/goroutine > $LOG_FOLDER/pprof/rw-core-goroutine-\\$i-\\$ts.png
328 curl -o $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=10
329 go tool pprof -png $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.png
330
331 go tool pprof -png http://127.0.0.1:6061/debug/pprof/heap > $LOG_FOLDER/pprof/openolt-heap-\\$i-\\$ts.png
332 go tool pprof -png http://127.0.0.1:6061/debug/pprof/goroutine > $LOG_FOLDER/pprof/openolt-goroutine-\\$i-\\$ts.png
333 curl -o $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof http://127.0.0.1:6061/debug/pprof/profile?seconds=10
334 go tool pprof -png $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.png
335
336 go tool pprof -png http://127.0.0.1:6062/debug/pprof/heap > $LOG_FOLDER/pprof/ofagent-heap-\\$i-\\$ts.png
337 go tool pprof -png http://127.0.0.1:6062/debug/pprof/goroutine > $LOG_FOLDER/pprof/ofagent-goroutine-\\$i-\\$ts.png
338 curl -o $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof http://127.0.0.1:6062/debug/pprof/profile?seconds=10
339 go tool pprof -png $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.png
340
341 sleep 10
342done
343EOF
344
345 _TAG="pprof"
346 _TAG=$_TAG bash $WORKSPACE/pprof.sh &
347 fi
348 '''
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800349 // bbsim-sadis server takes a while to cache the subscriber entries
350 // wait for that before starting the tests
351 sleep(60)
352 }
353 }
354 stage('Run Test') {
355 steps {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800356 test_voltha_stacks(params.volthaStacks)
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800357 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800358 }
359 }
360 post {
361 always {
362 // collect result, done in the "post" step so it's executed even in the
363 // event of a timeout in the tests
364 sh '''
365
366 # stop the kail processes
367 list=($APPS_TO_LOG)
368 for app in "${list[@]}"
369 do
370 echo "Stopping logs for: ${app}"
371 _TAG="kail-$app"
372 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
373 if [ -n "$P_IDS" ]; then
374 echo $P_IDS
375 for P_ID in $P_IDS; do
376 kill -9 $P_ID
377 done
378 fi
379 done
380
381 if [ ${withPcap} = true ] ; then
382 # stop ofAgent tcpdump
383 P_ID="\$(ps e -ww -A | grep "_TAG=ofagent-tcpdump" | grep -v grep | awk '{print \$1}')"
384 if [ -n "\$P_ID" ]; then
385 kill -9 \$P_ID
386 fi
387
388 # stop radius tcpdump
389 P_ID="\$(ps e -ww -A | grep "_TAG=radius-tcpdump" | grep -v grep | awk '{print \$1}')"
390 if [ -n "\$P_ID" ]; then
391 kill -9 \$P_ID
392 fi
393
394 # stop onos tcpdump
395 LIMIT=$(($NUM_OF_ONOS - 1))
396 for i in $(seq 0 $LIMIT); do
397 INSTANCE="onos-onos-classic-$i"
398 P_ID="\$(ps e -ww -A | grep "_TAG=$INSTANCE" | grep -v grep | awk '{print \$1}')"
399 if [ -n "\$P_ID" ]; then
400 kill -9 \$P_ID
401 fi
402 done
403
404 # copy the file
405 export OF_AGENT=$(kubectl get pods -l app=ofagent | awk 'NR==2{print $1}') || true
406 kubectl cp $OF_AGENT:out.pcap $LOG_FOLDER/ofagent.pcap || true
407
408 export RADIUS=$(kubectl get pods -l app=radius | awk 'NR==2{print $1}') || true
409 kubectl cp $RADIUS:out.pcap $LOG_FOLDER/radius.pcap || true
410
411 LIMIT=$(($NUM_OF_ONOS - 1))
412 for i in $(seq 0 $LIMIT); do
413 INSTANCE="onos-onos-classic-$i"
414 kubectl cp $INSTANCE:out.pcap $LOG_FOLDER/$INSTANCE.pcap || true
415 done
416 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800417 '''
418 sh '''
419 if [ ${withProfiling} = true ] ; then
420 _TAG="pprof"
421 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
422 if [ -n "$P_IDS" ]; then
423 echo $P_IDS
424 for P_ID in $P_IDS; do
425 kill -9 $P_ID
426 done
427 fi
428 fi
429 '''
430 plot([
431 csvFileName: 'scale-test.csv',
432 csvSeries: [
433 [file: 'plots/plot-voltha-onus.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
434 [file: 'plots/plot-onos-ports.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
435 [file: 'plots/plot-voltha-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
436 [file: 'plots/plot-voltha-openolt-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
437 [file: 'plots/plot-onos-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
438 [file: 'plots/plot-onos-auth.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
439 [file: 'plots/plot-voltha-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
440 [file: 'plots/plot-voltha-openolt-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
441 [file: 'plots/plot-onos-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
442 [file: 'plots/plot-onos-dhcp.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
443 ],
444 group: 'Voltha-Scale-Numbers', numBuilds: '20', style: 'line', title: "Scale Test (OLTs: ${olts}, PONs: ${pons}, ONUs: ${onus})", yaxis: 'Time (s)', useDescr: true
445 ])
446 step([$class: 'RobotPublisher',
447 disableArchiveOutput: false,
Matteo Scandolod4064492020-11-13 10:48:30 -0800448 logFileName: 'RobotLogs/**/log.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800449 otherFiles: '',
Matteo Scandolod4064492020-11-13 10:48:30 -0800450 outputFileName: 'RobotLogs/**/output.xml',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800451 outputPath: '.',
452 passThreshold: 100,
Matteo Scandolod4064492020-11-13 10:48:30 -0800453 reportFileName: 'RobotLogs/**/report.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800454 unstableThreshold: 0]);
455 // get all the logs from kubernetes PODs
456 sh returnStdout: false, script: '''
457
458 # store information on running charts
Matteo Scandolod4064492020-11-13 10:48:30 -0800459 helm ls --all-namespaces > $LOG_FOLDER/helm-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800460
461 # store information on the running pods
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800462 kubectl get pods --all-namespaces -o wide > $LOG_FOLDER/pods.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800463 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-images.txt || true
464 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-imagesId.txt || true
465
466 # copy the ONOS logs directly from the container to avoid the color codes
Matteo Scandolobe823242020-11-20 13:48:13 -0800467 printf '%s\n' $(kubectl -n \$INFRA_NS get pods -l app=onos-onos-classic -o=jsonpath="{.items[*]['metadata.name']}") | xargs --no-run-if-empty -I# bash -c "kubectl -n \$INFRA_NS cp #:${karafHome}/data/log/karaf.log $LOG_FOLDER/#.log" || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800468
469 # get radius logs out of the container
Matteo Scandolod4064492020-11-13 10:48:30 -0800470 kubectl -n \$INFRA_NS cp $(kubectl -n \$INFRA_NS get pods -l app=radius --no-headers | awk '{print $1}'):/var/log/freeradius/radius.log $LOG_FOLDER//radius.log || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800471 '''
472 // dump all the BBSim(s) ONU information
Matteo Scandolod4064492020-11-13 10:48:30 -0800473 script {
474 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
475 stack_ns="voltha"+i
476 sh """
477 BBSIM_IDS=\$(kubectl -n ${stack_ns} get pods | grep bbsim | grep -v server | awk '{print \$1}')
478 IDS=(\$BBSIM_IDS)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800479
Matteo Scandolod4064492020-11-13 10:48:30 -0800480 for bbsim in "\${IDS[@]}"
481 do
Matteo Scandolof6656562020-11-16 14:45:44 -0800482 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl onu list > $LOG_FOLDER/\$bbsim-device-list.txt || true
483 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl service list > $LOG_FOLDER/\$bbsim-service-list.txt || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800484 done
485 """
486 }
487 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800488 // get ONOS debug infos
489 sh '''
490
491 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 apps -a -s > $LOG_FOLDER/onos-apps.txt || true
492 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 nodes > $LOG_FOLDER/onos-nodes.txt || true
493 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 masters > $LOG_FOLDER/onos-masters.txt || true
494 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 roles > $LOG_FOLDER/onos-roles.txt || true
495
496 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 ports > $LOG_FOLDER/onos-ports-list.txt || true
497 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 hosts > $LOG_FOLDER/onos-hosts-list.txt || true
498
499 if [ ${withFlows} = true ] ; then
500 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-olts > $LOG_FOLDER/onos-olt-list.txt || true
501 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 flows -s > $LOG_FOLDER/onos-flows-list.txt || true
502 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 meters > $LOG_FOLDER/onos-meters-list.txt || true
503 fi
504
505 if [ ${provisionSubscribers} = true ]; then
506 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-programmed-subscribers > $LOG_FOLDER/onos-programmed-subscribers.txt || true
507 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-programmed-meters > $LOG_FOLDER/onos-programmed-meters.txt || true
508 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-bpmeter-mappings > $LOG_FOLDER/onos-bpmeter-mappings.txt || true
509 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-failed-subscribers > $LOG_FOLDER/onos-failed-subscribers.txt || true
510 fi
511
512 if [ ${withEapol} = true ] ; then
513 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 aaa-users > $LOG_FOLDER/onos-aaa-users.txt || true
514 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 aaa-statistics > $LOG_FOLDER/onos-aaa-statistics.txt || true
515 fi
516
517 if [ ${withDhcp} = true ] ; then
518 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 dhcpl2relay-allocations > $LOG_FOLDER/onos-dhcp-allocations.txt || true
519 fi
520 '''
521 // collect etcd metrics
522 sh '''
523 mkdir -p $WORKSPACE/etcd-metrics
524 curl -s -X GET -G http://10.90.0.101:31301/api/v1/query --data-urlencode 'query=etcd_debugging_mvcc_keys_total' | jq '.data' > $WORKSPACE/etcd-metrics/etcd-key-count.json || true
525 curl -s -X GET -G http://10.90.0.101:31301/api/v1/query --data-urlencode 'query=grpc_server_handled_total{grpc_service="etcdserverpb.KV"}' | jq '.data' > $WORKSPACE/etcd-metrics/etcd-rpc-count.json || true
526 curl -s -X GET -G http://10.90.0.101:31301/api/v1/query --data-urlencode 'query=etcd_debugging_mvcc_db_total_size_in_bytes' | jq '.data' > $WORKSPACE/etcd-metrics/etcd-db-size.json || true
527 curl -s -X GET -G http://10.90.0.101:31301/api/v1/query --data-urlencode 'query=etcd_disk_backend_commit_duration_seconds_sum' | jq '.data' > $WORKSPACE/etcd-metrics/etcd-backend-write-time.json || true
528 '''
529 // get VOLTHA debug infos
530 script {
Matteo Scandolod4064492020-11-13 10:48:30 -0800531 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
532 stack_ns="voltha"+i
533 voltcfg="~/.volt/config-voltha"+i
534 println stack_ns
535 try {
536 sh """
537 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list -o json > $LOG_FOLDER/device-list.json || true
538 python -m json.tool $LOG_FOLDER/device-list.json > $LOG_FOLDER/voltha-devices-list.json || true
539 rm $LOG_FOLDER/device-list.json || true
540 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list > $LOG_FOLDER/voltha-devices-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800541
Matteo Scandolod4064492020-11-13 10:48:30 -0800542 DEVICE_LIST=
Matteo Scandolobe823242020-11-20 13:48:13 -0800543 printf '%s\n' \$(voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl -c $HOME/.volt/config-${stack_ns}-m 8MB device flows # > $LOG_FOLDER/voltha-device-flows-#.txt" || true
544 printf '%s\n' \$(voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device port list --format 'table{{.PortNo}}\t{{.Label}}\t{{.Type}}\t{{.AdminState}}\t{{.OperStatus}}' # > $LOG_FOLDER/voltha-device-ports-#.txt" || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800545
Matteo Scandolobe823242020-11-20 13:48:13 -0800546 printf '%s\n' \$(voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB logicaldevice list -q) | xargs --no-run-if-empty -I# bash -c "voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB logicaldevice flows # > $LOG_FOLDER/voltha-logicaldevice-flows-#.txt" || true
547 printf '%s\n' \$(voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB logicaldevice list -q) | xargs --no-run-if-empty -I# bash -c "voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB logicaldevice port list # > $LOG_FOLDER/voltha-logicaldevice-ports-#.txt" || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800548 """
549 } catch(e) {
550 sh '''
551 echo "Can't get device list from voltclt"
552 '''
553 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800554 }
555 }
556 // get cpu usage by container
557 sh '''
558 if [ ${withMonitoring} = true ] ; then
559 cd $WORKSPACE/voltha-system-tests
560 source ./vst_venv/bin/activate
561 sleep 60 # we have to wait for prometheus to collect all the information
562 python tests/scale/sizing.py -o $WORKSPACE/plots || true
563 fi
564 '''
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800565 archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time.txt,logs/*,logs/pprof/*,RobotLogs/**/*,plots/*,etcd-metrics/*'
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800566 }
567 }
568}
569
570def deploy_voltha_stacks(numberOfStacks) {
571 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
572 stage("Deploy VOLTHA stack " + i) {
573 sh returnStdout: false, script: """
574 cd $WORKSPACE/kind-voltha/
575
576 export NAME=voltha${i}
577 export VOLTHA_NS=voltha${i}
578 export ADAPTER_NS=voltha${i}
579 export BBSIM_NS=voltha${i}
580 export BBSIM_BASE_INDEX=${i}
581 export WITH_ETCD=etcd.\$INFRA_NS.svc:2379
582 export WITH_KAFKA=kafka.\$INFRA_NS.svc:9092
583 export WITH_ONOS=onos-onos-classic-hs.\$INFRA_NS.svc:6653
584
585 export EXTRA_HELM_FLAGS+=' '
586
587 # Load the release defaults
588 if [ '${release.trim()}' != 'master' ]; then
589 source $WORKSPACE/kind-voltha/releases/${release}
590 EXTRA_HELM_FLAGS+=" ${extraHelmFlags} "
591 fi
592
593 # BBSim custom image handling
594 if [ '${bbsimImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'bbsim' ]; then
595 IFS=: read -r bbsimRepo bbsimTag <<< '${bbsimImg.trim()}'
596 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=\$bbsimRepo,images.bbsim.tag=\$bbsimTag "
597 fi
598
599 # VOLTHA and ofAgent custom image handling
600 # NOTE to override the rw-core image in a released version you must set the ofAgent image too
601 # TODO split ofAgent and voltha-go
602 if [ '${rwCoreImg.trim()}' != '' ] && [ '${ofAgentImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-go' ]; then
603 IFS=: read -r rwCoreRepo rwCoreTag <<< '${rwCoreImg.trim()}'
604 IFS=: read -r ofAgentRepo ofAgentTag <<< '${ofAgentImg.trim()}'
605 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=\$rwCoreRepo,images.rw_core.tag=\$rwCoreTag,images.ofagent.repository=\$ofAgentRepo,images.ofagent.tag=\$ofAgentTag "
606 fi
607
608 # OpenOLT custom image handling
609 if [ '${openoltAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openolt-adapter' ]; then
610 IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< '${openoltAdapterImg.trim()}'
611 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=\$openoltAdapterRepo,images.adapter_open_olt.tag=\$openoltAdapterTag "
612 fi
613
614 # OpenONU custom image handling
615 if [ '${openonuAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter' ]; then
616 IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< '${openonuAdapterImg.trim()}'
617 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=\$openonuAdapterRepo,images.adapter_open_onu.tag=\$openonuAdapterTag "
618 fi
619
Andrea Campanella28763082020-11-18 10:55:31 +0100620 # OpenONU Go custom image handling
621 if [ '${openonuAdapterGoImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter-go' ]; then
622 IFS=: read -r openonuAdapterGoRepo openonuAdapterGoTag <<< '${openonuAdapterGoImg.trim()}'
Andrea Campanellaed026982020-11-20 10:06:42 +0100623 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu_go.repository=\$openonuAdapterGoRepo,images.adapter_open_onu_go.tag=\$openonuAdapterGoTag "
Andrea Campanella28763082020-11-18 10:55:31 +0100624 fi
625
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800626 # ONOS custom image handling
627 if [ '${onosImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-onos' ]; then
628 IFS=: read -r onosRepo onosTag <<< '${onosImg.trim()}'
629 EXTRA_HELM_FLAGS+="--set images.onos.repository=\$onosRepo,images.onos.tag=\$onosTag "
630 fi
631
632 # set BBSim parameters
633 EXTRA_HELM_FLAGS+='--set enablePerf=true,pon=${pons},onu=${onus} '
634
635 # disable the securityContext, this is a development cluster
636 EXTRA_HELM_FLAGS+='--set securityContext.enabled=false '
637
638 # No persistent-volume-claims in Atomix
639 EXTRA_HELM_FLAGS+="--set atomix.persistence.enabled=false "
640
641 echo "Installing with the following extra arguments:"
642 echo $EXTRA_HELM_FLAGS
643
644 # if it's newer than voltha-2.4 set the correct BBSIM_CFG
645 if [ '${release.trim()}' != 'voltha-2.4' ]; then
646 export BBSIM_CFG="$WORKSPACE/kind-voltha/configs/bbsim-sadis-${workflow}.yaml"
647 fi
648
649 # Use custom built images
650
651 if [ '\$GERRIT_PROJECT' == 'voltha-go' ]; then
652 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=${dockerRegistry}/voltha/voltha-rw-core,images.rw_core.tag=voltha-scale "
653 fi
654
655 if [ '\$GERRIT_PROJECT' == 'voltha-openolt-adapter' ]; then
656 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=${dockerRegistry}/voltha/voltha-openolt-adapter,images.adapter_open_olt.tag=voltha-scale "
657 fi
658
659 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter' ]; then
660 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=${dockerRegistry}/voltha/voltha-openonu-adapter,images.adapter_open_onu.tag=voltha-scale "
661 fi
662
Andrea Campanellaed026982020-11-20 10:06:42 +0100663 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter-go' ]; then
664 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu_go.repository=${dockerRegistry}/voltha/voltha-openonu-adapter-go,images.adapter_open_onu_go.tag=voltha-scale "
665 fi
666
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800667 if [ '\$GERRIT_PROJECT' == 'ofagent-go' ]; then
668 EXTRA_HELM_FLAGS+="--set images.ofagent.repository=${dockerRegistry}/voltha/voltha-ofagent-go,images.ofagent.tag=voltha-scale "
669 fi
670
671 if [ '\$GERRIT_PROJECT' == 'voltha-onos' ]; then
672 EXTRA_HELM_FLAGS+="--set images.onos.repository=${dockerRegistry}/voltha/voltha-onos,images.onos.tag=voltha-scale "
673 fi
674
675 if [ '\$GERRIT_PROJECT' == 'bbsim' ]; then
676 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=${dockerRegistry}/voltha/bbsim,images.bbsim.tag=voltha-scale "
677 fi
678
679 ./voltha up
680 """
681 }
682 }
683}
684
685def test_voltha_stacks(numberOfStacks) {
686 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
687 stage("Test VOLTHA stack " + i) {
688 timeout(time: 15, unit: 'MINUTES') {
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800689 sh """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800690 export VOLTCONFIG="$HOME/.volt/config-voltha${i}"
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800691 ROBOT_PARAMS="-v stackId:${i} \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800692 -v olt:${olts} \
693 -v pon:${pons} \
694 -v onu:${onus} \
695 -v workflow:${workflow} \
696 -v withEapol:${withEapol} \
697 -v withDhcp:${withDhcp} \
698 -v withIgmp:${withIgmp} \
699 --noncritical non-critical \
700 -e teardown "
701
702 if [ ${withEapol} = false ] ; then
703 ROBOT_PARAMS+="-e authentication "
704 fi
705
706 if [ ${withDhcp} = false ] ; then
707 ROBOT_PARAMS+="-e dhcp "
708 fi
709
710 if [ ${provisionSubscribers} = false ] ; then
711 # if we're not considering subscribers then we don't care about authentication and dhcp
712 ROBOT_PARAMS+="-e authentication -e provision -e flow-after -e dhcp "
713 fi
714
715 if [ ${withFlows} = false ] ; then
716 ROBOT_PARAMS+="-i setup -i activation "
717 fi
718
719 cd $WORKSPACE/voltha-system-tests
720 source ./vst_venv/bin/activate
Matteo Scandolo5f6c5492020-11-12 17:37:25 -0800721 robot -d $WORKSPACE/RobotLogs/voltha${i} \
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800722 \$ROBOT_PARAMS tests/scale/Voltha_Scale_Tests.robot
Matteo Scandolof7ca6312020-11-16 15:57:15 -0800723
724 # collect results
725 python tests/scale/collect-result.py -r $WORKSPACE/RobotLogs/voltha${i}/output.xml -p $WORKSPACE/plots > $WORKSPACE/execution-time-voltha${i}.txt || true
726 cat $WORKSPACE/execution-time-voltha${i}.txt
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800727 """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800728 }
729 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800730 }
731}