blob: 6574492de00191463d1063d94899f21809452a30 [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
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080043 INFRA_NS="infra"
44
45 // configurable options
46 WITH_EAPOL="${withEapol}"
47 WITH_DHCP="${withDhcp}"
48 WITH_IGMP="${withIgmp}"
49 VOLTHA_LOG_LEVEL="${logLevel}"
50 NUM_OF_BBSIM="${olts}"
51 NUM_OF_OPENONU="${openonuAdapterReplicas}"
52 NUM_OF_ONOS="${onosReplicas}"
53 NUM_OF_ATOMIX="${atomixReplicas}"
54 NUM_OF_KAFKA="${kafkaReplicas}"
55 NUM_OF_ETCD="${etcdReplicas}"
56 WITH_PPROF="${withProfiling}"
57 EXTRA_HELM_FLAGS="${extraHelmFlags} " // note that the trailing space is required to separate the parameters from appends done later
58 VOLTHA_CHART="${volthaChart}"
59 VOLTHA_BBSIM_CHART="${bbsimChart}"
60 VOLTHA_ADAPTER_OPEN_OLT_CHART="${openoltAdapterChart}"
61 VOLTHA_ADAPTER_OPEN_ONU_CHART="${openonuAdapterChart}"
62 ONOS_CLASSIC_CHART="${onosChart}"
63 RADIUS_CHART="${radiusChart}"
64
Matteo Scandolo7c803cb2020-12-15 11:33:32 -100065 APPS_TO_LOG="etcd kafka onos-onos-classic adapter-open-onu adapter-open-olt rw-core ofagent bbsim radius bbsim-sadis-server"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080066 LOG_FOLDER="$WORKSPACE/logs"
67
68 GERRIT_PROJECT="${GERRIT_PROJECT}"
69 }
70
71 stages {
72 stage ('Cleanup') {
73 steps {
74 timeout(time: 11, unit: 'MINUTES') {
75 sh returnStdout: false, script: """
Matteo Scandolobe823242020-11-20 13:48:13 -080076 helm repo add stable https://charts.helm.sh/stable
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080077 helm repo add onf https://charts.opencord.org
78 helm repo add cord https://charts.opencord.org
79 helm repo add onos https://charts.onosproject.org
80 helm repo add atomix https://charts.atomix.io
81 helm repo add bbsim-sadis https://ciena.github.io/bbsim-sadis-server/charts
82 helm repo update
83
84 # removing ETCD port forward
85 P_ID="\$(ps e -ww -A | grep "_TAG=etcd-port-forward" | grep -v grep | awk '{print \$1}')"
86 if [ -n "\$P_ID" ]; then
87 kill -9 \$P_ID
88 fi
89
Matteo Scandolo9fe8cad2020-11-13 12:54:19 -080090 NAMESPACES="voltha1 voltha2 infra default"
91 for NS in \$NAMESPACES
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080092 do
Matteo Scandolo9fe8cad2020-11-13 12:54:19 -080093 for hchart in \$(helm list -n \$NS -q | grep -E -v 'docker-registry|kafkacat');
94 do
95 echo "Purging chart: \${hchart}"
96 helm delete -n \$NS "\${hchart}"
97 done
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080098 done
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080099
100 test -e $WORKSPACE/kind-voltha/voltha && cd $WORKSPACE/kind-voltha && ./voltha down
101
102 cd $WORKSPACE
103 rm -rf $WORKSPACE/*
Matteo Scandolo557cd8b2021-02-25 10:42:45 -0800104
105 # remove orphaned port-forward from different namespaces
106 ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800107 """
108 }
109 }
110 }
111 stage('Clone kind-voltha') {
112 steps {
113 checkout([
114 $class: 'GitSCM',
115 userRemoteConfigs: [[
116 url: "https://gerrit.opencord.org/kind-voltha",
117 refspec: "${kindVolthaChange}"
118 ]],
119 branches: [[ name: "master", ]],
120 extensions: [
121 [$class: 'WipeWorkspace'],
122 [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
123 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
124 ],
125 ])
126 script {
127 sh(script:"""
128 if [ '${kindVolthaChange}' != '' ] ; then
129 cd $WORKSPACE/kind-voltha;
130 git fetch https://gerrit.opencord.org/kind-voltha ${kindVolthaChange} && git checkout FETCH_HEAD
131 fi
132 """)
133 }
134 }
135 }
136 stage('Clone voltha-system-tests') {
137 steps {
138 checkout([
139 $class: 'GitSCM',
140 userRemoteConfigs: [[
141 url: "https://gerrit.opencord.org/voltha-system-tests",
142 refspec: "${volthaSystemTestsChange}"
143 ]],
144 branches: [[ name: "${release}", ]],
145 extensions: [
146 [$class: 'WipeWorkspace'],
147 [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
148 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
149 ],
150 ])
151 script {
152 sh(script:"""
153 if [ '${volthaSystemTestsChange}' != '' ] ; then
154 cd $WORKSPACE/voltha-system-tests;
155 git fetch https://gerrit.opencord.org/voltha-system-tests ${volthaSystemTestsChange} && git checkout FETCH_HEAD
156 fi
157 """)
158 }
159 }
160 }
161 stage('Build patch') {
162 when {
163 expression {
164 return params.GERRIT_PROJECT
165 }
166 }
167 steps {
168 sh """
169 git clone https://\$GERRIT_HOST/\$GERRIT_PROJECT
170 cd \$GERRIT_PROJECT
171 git fetch https://\$GERRIT_HOST/\$GERRIT_PROJECT \$GERRIT_REFSPEC && git checkout FETCH_HEAD
172
173 DOCKER_REGISTRY=${dockerRegistry}/ DOCKER_REPOSITORY=voltha/ DOCKER_TAG=voltha-scale make docker-build
174 DOCKER_REGISTRY=${dockerRegistry}/ DOCKER_REPOSITORY=voltha/ DOCKER_TAG=voltha-scale make docker-push
175 """
176 }
177 }
178 stage('Deploy common infrastructure') {
179 // includes monitoring, kafka, etcd
180 steps {
181 sh '''
182 if [ ${withMonitoring} = true ] ; then
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800183 helm install -n $INFRA_NS nem-monitoring cord/nem-monitoring \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800184 -f $HOME/voltha-scale/grafana.yaml \
185 --set prometheus.alertmanager.enabled=false,prometheus.pushgateway.enabled=false \
186 --set kpi_exporter.enabled=false,dashboards.xos=false,dashboards.onos=false,dashboards.aaa=false,dashboards.voltha=false
187 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800188 '''
189 }
190 }
191 stage('Deploy VOLTHA infrastructure') {
192 steps {
193 sh returnStdout: false, script: '''
Matteo Scandolo128ee7a2020-12-03 14:16:54 -0800194
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800195 cd $WORKSPACE/kind-voltha/
196
Matteo Scandolof6656562020-11-16 14:45:44 -0800197 export ETCD_CHART=$HOME/teone/helm-charts/etcd
198 export KAFKA_CHART=$HOME/teone/helm-charts/kafka
Matteo Scandolob28a97b2020-11-13 10:58:32 -0800199
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800200 # KAFKA config
Matteo Scandolof6656562020-11-16 14:45:44 -0800201 export NUM_OF_KAFKA=${kafkaReplicas}
202 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 -0800203
204 # ETCD config
Matteo Scandolof6656562020-11-16 14:45:44 -0800205 export EXTRA_HELM_FLAGS+=" --set memoryMode=${inMemoryEtcdStorage} "
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800206
207 NAME=infra JUST_INFRA=y ./voltha up
208
209 # Forward the ETCD port onto $VOLTHA_ETCD_PORT
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800210 _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 -0800211 '''
212 }
213 }
214 stage('Deploy Voltha') {
215 steps {
216 deploy_voltha_stacks(params.volthaStacks)
217 }
218 }
219 stage('Start logging') {
220 steps {
221 sh returnStdout: false, script: '''
222 # start logging with kail
223
224 mkdir -p $LOG_FOLDER
225
226 list=($APPS_TO_LOG)
227 for app in "${list[@]}"
228 do
229 echo "Starting logs for: ${app}"
230 _TAG=kail-$app kail -l app=$app --since 1h > $LOG_FOLDER/$app.log&
231 done
232 '''
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800233 }
234 }
235 stage('Configuration') {
236 steps {
237 script {
238 sh returnStdout: false, script: """
Matteo Scandolo68978752020-12-02 12:23:42 -0800239
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800240 # TODO this needs to be repeated per stack
241 # kubectl exec \$(kubectl get pods | grep -E "bbsim[0-9]" | awk 'NR==1{print \$1}') -- bbsimctl log ${logLevel.toLowerCase()} false
242
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800243 #Setting link discovery
244 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 -0800245 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
246 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 -0800247 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 -0800248 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
249
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800250 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg log:set ${logLevel} org.onosproject
251 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 -0800252
253 # Set Flows/Ports/Meters poll frequency
254 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}
255 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}
256
257 if [ ${withFlows} = false ]; then
258 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.olt
259 fi
260
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800261 if [ ${withPcap} = true ] && [ ${volthaStacks} -eq 1 ] ; then
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800262 # Start the tcp-dump in ofagent
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800263 export OF_AGENT=\$(kubectl -n \$INFRA_NS get pods -l app=ofagent -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800264 kubectl exec \$OF_AGENT -- apk update
265 kubectl exec \$OF_AGENT -- apk add tcpdump
266 kubectl exec \$OF_AGENT -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800267 _TAG=ofagent-tcpdump kubectl -n \$INFRA_NS exec \$OF_AGENT -- tcpdump -nei eth0 -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800268
269 # Start the tcp-dump in radius
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800270 export RADIUS=\$(kubectl -n \$INFRA_NS get pods -l app=radius -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800271 kubectl exec \$RADIUS -- apt-get update
272 kubectl exec \$RADIUS -- apt-get install -y tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800273 _TAG=radius-tcpdump kubectl -n \$INFRA_NS exec \$RADIUS -- tcpdump -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800274
275 # Start the tcp-dump in ONOS
276 for i in \$(seq 0 \$ONOSES); do
277 INSTANCE="onos-onos-classic-\$i"
278 kubectl exec \$INSTANCE -- apt-get update
279 kubectl exec \$INSTANCE -- apt-get install -y tcpdump
280 kubectl exec \$INSTANCE -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800281 _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 -0800282 done
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800283 else
284 echo "PCAP not supported for multiple VOLTHA stacks"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800285 fi
286 """
287 }
288 }
289 }
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800290 stage('Setup Test') {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800291 steps {
292 sh '''
293 mkdir -p $WORKSPACE/RobotLogs
294 cd $WORKSPACE/voltha-system-tests
295 make vst_venv
296 '''
297 sh '''
Matteo Scandolod1430a72020-12-04 15:14:44 -0800298 if [ ${withProfiling} = true ] && [ ${volthaStacks} -eq 1 ]; then
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800299 mkdir -p $LOG_FOLDER/pprof
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800300 cat << EOF > $WORKSPACE/pprof.sh
301timestamp() {
302 date +"%T"
303}
304
305i=0
306while [[ true ]]; do
307 ((i++))
308 ts=$(timestamp)
309 go tool pprof -png http://127.0.0.1:6060/debug/pprof/heap > $LOG_FOLDER/pprof/rw-core-heap-\\$i-\\$ts.png
310 go tool pprof -png http://127.0.0.1:6060/debug/pprof/goroutine > $LOG_FOLDER/pprof/rw-core-goroutine-\\$i-\\$ts.png
311 curl -o $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=10
312 go tool pprof -png $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.png
313
314 go tool pprof -png http://127.0.0.1:6061/debug/pprof/heap > $LOG_FOLDER/pprof/openolt-heap-\\$i-\\$ts.png
315 go tool pprof -png http://127.0.0.1:6061/debug/pprof/goroutine > $LOG_FOLDER/pprof/openolt-goroutine-\\$i-\\$ts.png
316 curl -o $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof http://127.0.0.1:6061/debug/pprof/profile?seconds=10
317 go tool pprof -png $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.png
318
319 go tool pprof -png http://127.0.0.1:6062/debug/pprof/heap > $LOG_FOLDER/pprof/ofagent-heap-\\$i-\\$ts.png
320 go tool pprof -png http://127.0.0.1:6062/debug/pprof/goroutine > $LOG_FOLDER/pprof/ofagent-goroutine-\\$i-\\$ts.png
321 curl -o $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof http://127.0.0.1:6062/debug/pprof/profile?seconds=10
322 go tool pprof -png $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.png
323
324 sleep 10
325done
326EOF
327
328 _TAG="pprof"
329 _TAG=$_TAG bash $WORKSPACE/pprof.sh &
Matteo Scandolod1430a72020-12-04 15:14:44 -0800330 else
331 echo "Profiling not supported for multiple VOLTHA stacks"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800332 fi
333 '''
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800334 }
335 }
336 stage('Run Test') {
337 steps {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800338 test_voltha_stacks(params.volthaStacks)
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800339 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800340 }
341 }
342 post {
343 always {
344 // collect result, done in the "post" step so it's executed even in the
345 // event of a timeout in the tests
346 sh '''
347
348 # stop the kail processes
349 list=($APPS_TO_LOG)
350 for app in "${list[@]}"
351 do
352 echo "Stopping logs for: ${app}"
353 _TAG="kail-$app"
354 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
355 if [ -n "$P_IDS" ]; then
356 echo $P_IDS
357 for P_ID in $P_IDS; do
358 kill -9 $P_ID
359 done
360 fi
361 done
362
Matteo Scandolod1430a72020-12-04 15:14:44 -0800363 if [ ${withPcap} = true ] && [ ${volthaStacks} -eq 1 ]; then
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800364 # stop ofAgent tcpdump
365 P_ID="\$(ps e -ww -A | grep "_TAG=ofagent-tcpdump" | grep -v grep | awk '{print \$1}')"
366 if [ -n "\$P_ID" ]; then
367 kill -9 \$P_ID
368 fi
369
370 # stop radius tcpdump
371 P_ID="\$(ps e -ww -A | grep "_TAG=radius-tcpdump" | grep -v grep | awk '{print \$1}')"
372 if [ -n "\$P_ID" ]; then
373 kill -9 \$P_ID
374 fi
375
376 # stop onos tcpdump
377 LIMIT=$(($NUM_OF_ONOS - 1))
378 for i in $(seq 0 $LIMIT); do
379 INSTANCE="onos-onos-classic-$i"
380 P_ID="\$(ps e -ww -A | grep "_TAG=$INSTANCE" | grep -v grep | awk '{print \$1}')"
381 if [ -n "\$P_ID" ]; then
382 kill -9 \$P_ID
383 fi
384 done
385
386 # copy the file
387 export OF_AGENT=$(kubectl get pods -l app=ofagent | awk 'NR==2{print $1}') || true
388 kubectl cp $OF_AGENT:out.pcap $LOG_FOLDER/ofagent.pcap || true
389
390 export RADIUS=$(kubectl get pods -l app=radius | awk 'NR==2{print $1}') || true
391 kubectl cp $RADIUS:out.pcap $LOG_FOLDER/radius.pcap || true
392
393 LIMIT=$(($NUM_OF_ONOS - 1))
394 for i in $(seq 0 $LIMIT); do
395 INSTANCE="onos-onos-classic-$i"
396 kubectl cp $INSTANCE:out.pcap $LOG_FOLDER/$INSTANCE.pcap || true
397 done
398 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800399 '''
400 sh '''
Matteo Scandolod1430a72020-12-04 15:14:44 -0800401 if [ ${withProfiling} = true ] && [ ${volthaStacks} -eq 1 ]; then
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800402 _TAG="pprof"
403 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
404 if [ -n "$P_IDS" ]; then
405 echo $P_IDS
406 for P_ID in $P_IDS; do
407 kill -9 $P_ID
408 done
409 fi
410 fi
411 '''
412 plot([
413 csvFileName: 'scale-test.csv',
414 csvSeries: [
415 [file: 'plots/plot-voltha-onus.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
416 [file: 'plots/plot-onos-ports.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
417 [file: 'plots/plot-voltha-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
418 [file: 'plots/plot-voltha-openolt-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
419 [file: 'plots/plot-onos-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
420 [file: 'plots/plot-onos-auth.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
421 [file: 'plots/plot-voltha-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
422 [file: 'plots/plot-voltha-openolt-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
423 [file: 'plots/plot-onos-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
424 [file: 'plots/plot-onos-dhcp.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
425 ],
Matteo Scandolod1430a72020-12-04 15:14:44 -0800426 group: 'Voltha-Scale-Numbers', numBuilds: '20', style: 'line', title: "Scale Test (Stacks: ${params.volthaStacks}, OLTs: ${olts}, PONs: ${pons}, ONUs: ${onus})", yaxis: 'Time (s)', useDescr: true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800427 ])
428 step([$class: 'RobotPublisher',
429 disableArchiveOutput: false,
Matteo Scandolod4064492020-11-13 10:48:30 -0800430 logFileName: 'RobotLogs/**/log.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800431 otherFiles: '',
Matteo Scandolod4064492020-11-13 10:48:30 -0800432 outputFileName: 'RobotLogs/**/output.xml',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800433 outputPath: '.',
434 passThreshold: 100,
Matteo Scandolod4064492020-11-13 10:48:30 -0800435 reportFileName: 'RobotLogs/**/report.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800436 unstableThreshold: 0]);
437 // get all the logs from kubernetes PODs
438 sh returnStdout: false, script: '''
439
440 # store information on running charts
Matteo Scandolod4064492020-11-13 10:48:30 -0800441 helm ls --all-namespaces > $LOG_FOLDER/helm-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800442
443 # store information on the running pods
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800444 kubectl get pods --all-namespaces -o wide > $LOG_FOLDER/pods.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800445 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-images.txt || true
446 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-imagesId.txt || true
447
448 # copy the ONOS logs directly from the container to avoid the color codes
Matteo Scandolobe823242020-11-20 13:48:13 -0800449 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 -0800450
451 # get radius logs out of the container
Matteo Scandolod4064492020-11-13 10:48:30 -0800452 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 -0800453 '''
454 // dump all the BBSim(s) ONU information
Matteo Scandolod4064492020-11-13 10:48:30 -0800455 script {
456 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
457 stack_ns="voltha"+i
458 sh """
459 BBSIM_IDS=\$(kubectl -n ${stack_ns} get pods | grep bbsim | grep -v server | awk '{print \$1}')
460 IDS=(\$BBSIM_IDS)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800461
Matteo Scandolod4064492020-11-13 10:48:30 -0800462 for bbsim in "\${IDS[@]}"
463 do
Matteo Scandolod1430a72020-12-04 15:14:44 -0800464 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl onu list > $LOG_FOLDER/${stack_ns}/\$bbsim-device-list.txt || true
465 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl service list > $LOG_FOLDER/${stack_ns}/\$bbsim-service-list.txt || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800466 done
467 """
468 }
469 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800470 // get ONOS debug infos
471 sh '''
472
473 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
474 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
475 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
476 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
477
478 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
479 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
480
481 if [ ${withFlows} = true ] ; then
482 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
483 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
484 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
485 fi
486
487 if [ ${provisionSubscribers} = true ]; then
488 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
489 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
490 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
491 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
492 fi
493
494 if [ ${withEapol} = true ] ; then
495 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
496 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
497 fi
498
499 if [ ${withDhcp} = true ] ; then
500 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
501 fi
502 '''
503 // collect etcd metrics
504 sh '''
505 mkdir -p $WORKSPACE/etcd-metrics
506 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
507 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
508 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
509 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
510 '''
511 // get VOLTHA debug infos
512 script {
Matteo Scandolod4064492020-11-13 10:48:30 -0800513 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
514 stack_ns="voltha"+i
515 voltcfg="~/.volt/config-voltha"+i
Matteo Scandolod4064492020-11-13 10:48:30 -0800516 try {
517 sh """
Matteo Scandolod1430a72020-12-04 15:14:44 -0800518 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list -o json > $LOG_FOLDER/${stack_ns}/device-list.json || true
519 python -m json.tool $LOG_FOLDER/${stack_ns}/device-list.json > $LOG_FOLDER/${stack_ns}/voltha-devices-list.json || true
520 rm $LOG_FOLDER/${stack_ns}/device-list.json || true
521 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list > $LOG_FOLDER/${stack_ns}/voltha-devices-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800522
Matteo Scandolod4064492020-11-13 10:48:30 -0800523 DEVICE_LIST=
Matteo Scandolod1430a72020-12-04 15:14:44 -0800524 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/${stack_ns}/voltha-device-flows-#.txt" || true
525 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/${stack_ns}/voltha-device-ports-#.txt" || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800526
Matteo Scandolod1430a72020-12-04 15:14:44 -0800527 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/${stack_ns}/voltha-logicaldevice-flows-#.txt" || true
528 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/${stack_ns}/voltha-logicaldevice-ports-#.txt" || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800529 """
530 } catch(e) {
531 sh '''
532 echo "Can't get device list from voltclt"
533 '''
534 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800535 }
536 }
537 // get cpu usage by container
538 sh '''
539 if [ ${withMonitoring} = true ] ; then
540 cd $WORKSPACE/voltha-system-tests
541 source ./vst_venv/bin/activate
542 sleep 60 # we have to wait for prometheus to collect all the information
543 python tests/scale/sizing.py -o $WORKSPACE/plots || true
544 fi
545 '''
Matteo Scandolo89311a12020-12-05 14:43:58 -0800546 archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time-*.txt,logs/**/*,RobotLogs/**/*,plots/*,etcd-metrics/*'
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800547 }
548 }
549}
550
551def deploy_voltha_stacks(numberOfStacks) {
552 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
553 stage("Deploy VOLTHA stack " + i) {
554 sh returnStdout: false, script: """
Matteo Scandolo77501cc2020-12-11 09:49:07 -0800555
556 # unset voltha-api port so that the port is forwarded on a new one
557 unset VOLTHA_API_PORT
558
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800559 cd $WORKSPACE/kind-voltha/
560
561 export NAME=voltha${i}
562 export VOLTHA_NS=voltha${i}
563 export ADAPTER_NS=voltha${i}
564 export BBSIM_NS=voltha${i}
565 export BBSIM_BASE_INDEX=${i}
566 export WITH_ETCD=etcd.\$INFRA_NS.svc:2379
567 export WITH_KAFKA=kafka.\$INFRA_NS.svc:9092
568 export WITH_ONOS=onos-onos-classic-hs.\$INFRA_NS.svc:6653
569
570 export EXTRA_HELM_FLAGS+=' '
571
572 # Load the release defaults
573 if [ '${release.trim()}' != 'master' ]; then
574 source $WORKSPACE/kind-voltha/releases/${release}
575 EXTRA_HELM_FLAGS+=" ${extraHelmFlags} "
576 fi
577
578 # BBSim custom image handling
579 if [ '${bbsimImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'bbsim' ]; then
580 IFS=: read -r bbsimRepo bbsimTag <<< '${bbsimImg.trim()}'
581 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=\$bbsimRepo,images.bbsim.tag=\$bbsimTag "
582 fi
583
584 # VOLTHA and ofAgent custom image handling
585 # NOTE to override the rw-core image in a released version you must set the ofAgent image too
586 # TODO split ofAgent and voltha-go
587 if [ '${rwCoreImg.trim()}' != '' ] && [ '${ofAgentImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-go' ]; then
588 IFS=: read -r rwCoreRepo rwCoreTag <<< '${rwCoreImg.trim()}'
589 IFS=: read -r ofAgentRepo ofAgentTag <<< '${ofAgentImg.trim()}'
590 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=\$rwCoreRepo,images.rw_core.tag=\$rwCoreTag,images.ofagent.repository=\$ofAgentRepo,images.ofagent.tag=\$ofAgentTag "
591 fi
592
593 # OpenOLT custom image handling
594 if [ '${openoltAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openolt-adapter' ]; then
595 IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< '${openoltAdapterImg.trim()}'
596 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=\$openoltAdapterRepo,images.adapter_open_olt.tag=\$openoltAdapterTag "
597 fi
598
599 # OpenONU custom image handling
600 if [ '${openonuAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter' ]; then
601 IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< '${openonuAdapterImg.trim()}'
602 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=\$openonuAdapterRepo,images.adapter_open_onu.tag=\$openonuAdapterTag "
603 fi
604
Andrea Campanella28763082020-11-18 10:55:31 +0100605 # OpenONU Go custom image handling
606 if [ '${openonuAdapterGoImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter-go' ]; then
607 IFS=: read -r openonuAdapterGoRepo openonuAdapterGoTag <<< '${openonuAdapterGoImg.trim()}'
Andrea Campanellaed026982020-11-20 10:06:42 +0100608 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 +0100609 fi
610
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800611 # ONOS custom image handling
612 if [ '${onosImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-onos' ]; then
613 IFS=: read -r onosRepo onosTag <<< '${onosImg.trim()}'
614 EXTRA_HELM_FLAGS+="--set images.onos.repository=\$onosRepo,images.onos.tag=\$onosTag "
615 fi
616
617 # set BBSim parameters
618 EXTRA_HELM_FLAGS+='--set enablePerf=true,pon=${pons},onu=${onus} '
619
620 # disable the securityContext, this is a development cluster
621 EXTRA_HELM_FLAGS+='--set securityContext.enabled=false '
622
623 # No persistent-volume-claims in Atomix
624 EXTRA_HELM_FLAGS+="--set atomix.persistence.enabled=false "
625
626 echo "Installing with the following extra arguments:"
627 echo $EXTRA_HELM_FLAGS
628
629 # if it's newer than voltha-2.4 set the correct BBSIM_CFG
630 if [ '${release.trim()}' != 'voltha-2.4' ]; then
631 export BBSIM_CFG="$WORKSPACE/kind-voltha/configs/bbsim-sadis-${workflow}.yaml"
632 fi
633
634 # Use custom built images
635
636 if [ '\$GERRIT_PROJECT' == 'voltha-go' ]; then
637 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=${dockerRegistry}/voltha/voltha-rw-core,images.rw_core.tag=voltha-scale "
638 fi
639
640 if [ '\$GERRIT_PROJECT' == 'voltha-openolt-adapter' ]; then
641 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=${dockerRegistry}/voltha/voltha-openolt-adapter,images.adapter_open_olt.tag=voltha-scale "
642 fi
643
644 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter' ]; then
645 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=${dockerRegistry}/voltha/voltha-openonu-adapter,images.adapter_open_onu.tag=voltha-scale "
646 fi
647
Andrea Campanellaed026982020-11-20 10:06:42 +0100648 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter-go' ]; then
649 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu_go.repository=${dockerRegistry}/voltha/voltha-openonu-adapter-go,images.adapter_open_onu_go.tag=voltha-scale "
650 fi
651
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800652 if [ '\$GERRIT_PROJECT' == 'ofagent-go' ]; then
653 EXTRA_HELM_FLAGS+="--set images.ofagent.repository=${dockerRegistry}/voltha/voltha-ofagent-go,images.ofagent.tag=voltha-scale "
654 fi
655
656 if [ '\$GERRIT_PROJECT' == 'voltha-onos' ]; then
657 EXTRA_HELM_FLAGS+="--set images.onos.repository=${dockerRegistry}/voltha/voltha-onos,images.onos.tag=voltha-scale "
658 fi
659
660 if [ '\$GERRIT_PROJECT' == 'bbsim' ]; then
661 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=${dockerRegistry}/voltha/bbsim,images.bbsim.tag=voltha-scale "
662 fi
663
664 ./voltha up
665 """
666 }
667 }
668}
669
670def test_voltha_stacks(numberOfStacks) {
671 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
672 stage("Test VOLTHA stack " + i) {
673 timeout(time: 15, unit: 'MINUTES') {
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800674 sh """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800675 export VOLTCONFIG="$HOME/.volt/config-voltha${i}"
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800676 ROBOT_PARAMS="-v stackId:${i} \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800677 -v olt:${olts} \
678 -v pon:${pons} \
679 -v onu:${onus} \
680 -v workflow:${workflow} \
681 -v withEapol:${withEapol} \
682 -v withDhcp:${withDhcp} \
683 -v withIgmp:${withIgmp} \
684 --noncritical non-critical \
685 -e teardown "
686
687 if [ ${withEapol} = false ] ; then
688 ROBOT_PARAMS+="-e authentication "
689 fi
690
691 if [ ${withDhcp} = false ] ; then
692 ROBOT_PARAMS+="-e dhcp "
693 fi
694
695 if [ ${provisionSubscribers} = false ] ; then
696 # if we're not considering subscribers then we don't care about authentication and dhcp
697 ROBOT_PARAMS+="-e authentication -e provision -e flow-after -e dhcp "
698 fi
699
700 if [ ${withFlows} = false ] ; then
701 ROBOT_PARAMS+="-i setup -i activation "
702 fi
703
704 cd $WORKSPACE/voltha-system-tests
705 source ./vst_venv/bin/activate
Matteo Scandolo5f6c5492020-11-12 17:37:25 -0800706 robot -d $WORKSPACE/RobotLogs/voltha${i} \
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800707 \$ROBOT_PARAMS tests/scale/Voltha_Scale_Tests.robot
Matteo Scandolof7ca6312020-11-16 15:57:15 -0800708
709 # collect results
710 python tests/scale/collect-result.py -r $WORKSPACE/RobotLogs/voltha${i}/output.xml -p $WORKSPACE/plots > $WORKSPACE/execution-time-voltha${i}.txt || true
711 cat $WORKSPACE/execution-time-voltha${i}.txt
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800712 """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800713 }
714 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800715 }
716}