VOL-5155 - triage failure in periodic-voltha-test-bbsim-2.12
vars/pgrep_proc.groovy
vars/pkill_proc.groovy
----------------------
o Pass arg --full to expand command matching to arguments.
o Include --uid to limit process consideration.
o Accept optional (Map args) parameter, will need more later.
jjb/pipeline/voltha/master/bbsim-tests.groovy
jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
--------------------------------------------------
o pgrep/pkill cleanup -- kubectl is the command to target for cleanup.
o port-forward is a command parameter and was used to filter tasks.
o pattern to display/terminate is 'kubectl.*port-forward'
Change-Id: I34b473a4e1c7fcd488910be62f458319d1499254
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 46cb252..af5c554 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -130,10 +130,12 @@
script {
enter('Cleanup')
// remove orphaned port-forward from different namespaces
- String proc = 'port-forw'
+ String proc = 'kubectl .*port-forward' // was 'port-forw'
pgrep_proc(proc)
pkill_proc(proc)
- pgrep_proc(proc) // proc count == 0
+
+ // todo: fatal unless (proc count==0)
+ pgrep_proc(proc)
enter('Cleanup')
} // script
} // timeout
@@ -300,6 +302,7 @@
// ---------------------------------
script {
enter('port-forward check')
+ // String proc = 'kubectl.*port-forward' // was 'port-forward'
String proc = 'port-forward'
println("Display spawned ${proc}")
pgrep_proc(proc)