Even with the changes from commit fd4141f2015d25f1b009d7cf2ebdd2907cd8e81a
our tests have intermittent failures where nc listen process terminates as
soon as the shell that spawns it closes. By (1) breaking the cmd script to
have an extra line, (2) adding a 0.1 sec delay and (3) setting stdin of
process the proposed changes ensures that this termination no longer
takes place.
In order to reproduce this issue, follow these set of steps as a reference:
From a separate shell session in the cirros vm, watch out for nc processes
$ watch -n1 -d "ps -elf | grep nc"
Then, start a python session to interact with that vm via ssh session:
Reviewed: https:/ /review. opendev. org/738916 /git.openstack. org/cgit/ openstack/ neutron- tempest- plugin/ commit/ ?id=b056ac25c90 b4cd8459291f1eb 12081b7ace304d
Committed: https:/
Submitter: Zuul
Branch: master
commit b056ac25c90b4cd 8459291f1eb1208 1b7ace304d
Author: Flavio Fernandes <email address hidden>
Date: Wed Jul 1 14:57:13 2020 -0400
test_ port_forwarding _to_2_servers: netcat listen stops too soon
This change is a continuation of https:/ /review. opendev. org/#/c/ 713208/
Even with the changes from commit fd4141f2015d25f 1b009d7cf2ebdd2 907cd8e81a
our tests have intermittent failures where nc listen process terminates as
soon as the shell that spawns it closes. By (1) breaking the cmd script to
have an extra line, (2) adding a 0.1 sec delay and (3) setting stdin of
process the proposed changes ensures that this termination no longer
takes place.
In order to reproduce this issue, follow these set of steps as a reference:
From a separate shell session in the cirros vm, watch out for nc processes
$ watch -n1 -d "ps -elf | grep nc"
Then, start a python session to interact with that vm via ssh session:
$ python3
from neutron_ tempest_ plugin. common import ssh vm_ip=' 10.0.0. 10' Client( cirros_ vm_ip, 'cirros', 'gocubsgo', port=22) script( 'nc udp -p 12346 &')
cirros_
c=ssh.
c.execute_
If you are lucky (or unlucky), you will see that there are no nc
processes running, unless you use a variation to that command that
looks like this:
c.execute_ script( 'nc udp -p 12349 &\nsleep 0')
Than then in the watch session you will see something that look like:
_<PID>_ cirros nc udp -p 12349
And that will remain running even after the python session closes.
Closes-Bug: #1868100 f9e486805374f71 0444e770ea4
Change-Id: I8192391d6f2e86