[Fullstack] Shutdown tcpdump process gracefully
In fullstack test for dscp marking packets tcpdump is used to capture packets send from one namespace (Fake VM) to another one. When tcpdump is closed quickly with SIGKILL signal it may not displays all packets and that might cause an issue with failed dscp marking test. Now tcpdump will be kill with SIGINT signal so it should display all captured packets to the stdout. Also it should now return to stderr summary of all captured/dropped packets which can be helpful in future debugging of issue with those tests if that will not solve the problem. Change-Id: Ib2d588d081a48f4f2b6e98a943bca95b9955a149 Related-Bug: #1733649
This commit is contained in:
parent
78ce63c1bb
commit
b841a7f5d9
|
@ -14,6 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
import re
|
||||
import signal
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
|
@ -110,7 +111,7 @@ def wait_for_dscp_marked_packet(sender_vm, receiver_vm, dscp_mark):
|
|||
tcpdump_async.start()
|
||||
sender_vm.block_until_ping(receiver_vm.ip)
|
||||
try:
|
||||
tcpdump_async.stop()
|
||||
tcpdump_async.stop(kill_signal=signal.SIGINT)
|
||||
except async_process.AsyncProcessException:
|
||||
# If it was already stopped than we don't care about it
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue