Edward Haas has uploaded a new change for review.

Change subject: net test: Debug test_local_auto_with_dynamic_address_from_ra
......................................................................

net test: Debug test_local_auto_with_dynamic_address_from_ra

test_local_auto_with_dynamic_address_from_ra is randomly failing on CI
due to lack of response from the dnsmasq server.

This patch reorders the link setup of the test and adds netlink event
log dump in case of ipv6 address acqusition timeout.

Change-Id: I7cf0cd6e41574cf366dd778cf38eb7bc98c24054
Signed-off-by: Edward Haas <edwa...@redhat.com>
---
M tests/network/netinfo_test.py
M tests/network/nettestlib.py
2 files changed, 8 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/63334/1

diff --git a/tests/network/netinfo_test.py b/tests/network/netinfo_test.py
index b0b9641..9e6683e 100644
--- a/tests/network/netinfo_test.py
+++ b/tests/network/netinfo_test.py
@@ -409,12 +409,12 @@
         IPV6_NETADDRESS = '2001:1:1:1'
         IPV6_NETPREFIX_LEN = '64'
         with veth_pair() as (server, client):
+            ipwrapper.addrAdd(server, IPV6_NETADDRESS + '::1',
+                              IPV6_NETPREFIX_LEN, family=6)
+            ipwrapper.linkSet(server, ['up'])
             with dnsmasq_run(server, ipv6_slaac_prefix=IPV6_NETADDRESS + '::'):
                 with wait_for_ipv6(client):
                     ipwrapper.linkSet(client, ['up'])
-                    ipwrapper.linkSet(server, ['up'])
-                    ipwrapper.addrAdd(server, IPV6_NETADDRESS + '::1',
-                                      IPV6_NETPREFIX_LEN, family=6)
 
                 # Expecting link and global addresses on client iface
                 # The addresses are given randomly, so we sort them
diff --git a/tests/network/nettestlib.py b/tests/network/nettestlib.py
index f762125..df66d53 100644
--- a/tests/network/nettestlib.py
+++ b/tests/network/nettestlib.py
@@ -436,12 +436,14 @@
 @contextmanager
 def wait_for_ipv6(iface, wait_for_scopes=None):
     """Wait for iface to get their IPv6 addresses with netlink Monitor"""
+    logevents = []
     if not wait_for_scopes:
         wait_for_scopes = ['global', 'link']
     try:
         with monitor.Monitor(groups=('ipv6-ifaddr',), timeout=20) as mon:
             yield
             for event in mon:
+                logevents.append(event)
                 dev_name = event.get('label')
                 if (dev_name == iface and
                         event.get('event') == 'new_addr' and
@@ -453,8 +455,9 @@
 
     except monitor.MonitorError as e:
         if e[0] == monitor.E_TIMEOUT:
-            raise Exception('IPv6 addresses has not been caught within the '
-                            'given timeout.\n')
+            raise Exception(
+                'IPv6 addresses has not been caught within 20sec.\n'
+                'Event log: {}\n'.format(logevents))
         else:
             raise
 


-- 
To view, visit https://gerrit.ovirt.org/63334
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cf0cd6e41574cf366dd778cf38eb7bc98c24054
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwa...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org

Reply via email to