X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;h=6703e6a91038900829e9d75b016374a8e709fd86;hp=e474e296315783d899286970a47be4ec6099e193;hb=9e86d195050fcd75c20d59f78d6f5a5e379a6a86;hpb=75eb3abbac136bd6e9fb47f595b4f7b8a8294038 diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index e474e29631..6703e6a910 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -1258,8 +1258,19 @@ class InterfaceUtil: txq_size=txq_size ) err_msg = f"Failed to create AVF interface on host {node[u'host']}" - with PapiSocketExecutor(node) as papi_exec: - sw_if_index = papi_exec.add(cmd, **args).get_sw_if_index(err_msg) + + # FIXME: Remove once the fw/driver is upgraded. + for _ in range(10): + with PapiSocketExecutor(node) as papi_exec: + try: + sw_if_index = papi_exec.add(cmd, **args).get_sw_if_index( + err_msg + ) + break + except AssertionError: + logger.error(err_msg) + else: + raise AssertionError(err_msg) InterfaceUtil.add_eth_interface( node, sw_if_index=sw_if_index, ifc_pfx=u"eth_avf",