SGL test doesn't retrieve all pings logged
In test_only_accepted_traffic_logged, after using the check_remote_connectivity function, a small lapse of time needs to be left in order for the last ping to get to the host. This sleep is already present in other validations like "check_east_west_icmp_flow". Furthermore, using ovn_pinctrl0 will get all the ovn logs, as opposed to using acl_logs in the grep to the log file that happens in _get_logs_and_counts. Change-Id: I337c964a9f39b97d4d66600321a7a9c468336e9d
This commit is contained in:
parent
78d6530f0e
commit
98b5177a87
@ -206,7 +206,7 @@ class BaseSecGroupLoggingTest(
|
||||
if start_track:
|
||||
# tracks A value, before test traffic sent to be logged
|
||||
_track_value = int(hypervisor_ssh.exec_command(
|
||||
"sudo grep acl_log {} | tail -n1 | cut -d '|' -f 2"
|
||||
"sudo grep ovn_pinctrl0 {} | tail -n1 | cut -d '|' -f 2"
|
||||
.format(self.SG_LOG_FILE), timeout=120))
|
||||
self._hypervisors_counts[hypervisor_ssh.host]['A'] = _track_value
|
||||
LOG.debug("Start log count value A on '%s' is %d",
|
||||
@ -215,7 +215,7 @@ class BaseSecGroupLoggingTest(
|
||||
# tracks B value, after test traffic sent to be logged
|
||||
# (extracts logs from file right away, to avoid race conditions).
|
||||
cmd_outputs = hypervisor_ssh.exec_command(
|
||||
"sudo grep acl_log {0}".format(self.SG_LOG_FILE),
|
||||
"sudo grep ovn_pinctrl0 {0}".format(self.SG_LOG_FILE),
|
||||
timeout=120).splitlines()
|
||||
b = self._hypervisors_counts[hypervisor_ssh.host]['B'] = int(
|
||||
cmd_outputs[-1].split("|")[1])
|
||||
@ -674,6 +674,7 @@ class BaseSecGroupLoggingTest(
|
||||
ping_amount = 10
|
||||
self.check_remote_connectivity(
|
||||
vm_a['ssh_client'], vm_b_internal_ip, ping_count=ping_amount)
|
||||
time.sleep(5)
|
||||
self.retrieve_tracked_log(vm_a['hv_ssh_client'])
|
||||
if not same_compute:
|
||||
self.retrieve_tracked_log(vm_b['hv_ssh_client'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user