aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/utils.py
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-08-16 11:05:41 -0400
committerTim Rozet <trozet@redhat.com>2017-09-29 05:10:14 +0000
commit54c108b5a90d80e22c00775916651975e0231998 (patch)
treef380da79865664fdcfd487e834322b0728ce9c7f /os_net_config/utils.py
parent9ecc15f0edf2460c2eb2cac8e9ccca8cbb8d3808 (diff)
Add timeout to VPP service restart
VPP needs a few seconds to stablize when service is restarted for all the interfaces to initialize and show up. Change-Id: Ie6aee86eaccad5fc98820a28f10adc7475cc5e33 Signed-off-by: Feng Pan <fpan@redhat.com> (cherry picked from commit 17ab27148353b8d53b8db01244e1368468e9e70f)
Diffstat (limited to 'os_net_config/utils.py')
-rw-r--r--os_net_config/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/os_net_config/utils.py b/os_net_config/utils.py
index a406a13..3d21488 100644
--- a/os_net_config/utils.py
+++ b/os_net_config/utils.py
@@ -20,6 +20,7 @@ import os
import re
import yaml
import json
+import time
from oslo_concurrency import processutils
@@ -336,6 +337,7 @@ def restart_vpp(vpp_interfaces):
processutils.execute('modprobe', 'vfio-pci')
logger.info('Restarting VPP')
processutils.execute('systemctl', 'restart', 'vpp')
+ time.sleep(10)
def _get_vpp_interface_name(pci_addr):