aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VppConfigGenerator.py
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-07-01 06:13:54 +0000
committerPeter Mikus <pmikus@cisco.com>2018-07-02 09:10:09 +0000
commita28f1efe6803b70c3e2d2bdb74d55c88ffa8f9e1 (patch)
treecc87a4d85f4f5312ceba68724d2e752666233df0 /resources/libraries/python/VppConfigGenerator.py
parent8a5ef28ce07926ea81337ef7a997a2cf19e3cb4a (diff)
Compatibility fixes with Ubuntu 18.04
Currently we are using ip:port socket to for VPP to listen for incoming connections. There is only one place in code this socket is used for detection if VPP is responding after restart. This patch is supposed to change ip:port to sock:file which is default preffered way in VPP. This way we can start using vppctl. netcat on the other side with ip:port remains hanged in console for infinite time not returning back. There is also need to check whether uio_module is loaded and eventually load it. As uio_pci_generic is not working there, we will fallback to main igb_uio (uio_pci_generic being only lightweight subset of igb_uio). This patch also add additional verbose output to console during setup to better understand if failure happens during copy/extract/setup. Change-Id: I0b8a3b76dce3316496a3ad928f58718b6e73057d Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python/VppConfigGenerator.py')
-rw-r--r--resources/libraries/python/VppConfigGenerator.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index e9933f2a18..4e1ec74c63 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -160,7 +160,7 @@ class VppConfigGenerator(object):
value = self._vpp_logfile
self.add_config_item(self._nodeconfig, value, path)
- def add_unix_cli_listen(self, value='localhost:5002'):
+ def add_unix_cli_listen(self, value='/run/vpp/cli.sock'):
"""Add UNIX cli-listen configuration.
:param value: CLI listen address and port or path to CLI socket.
@@ -590,9 +590,8 @@ class VppConfigGenerator(object):
for _ in range(retries):
time.sleep(1)
ret, stdout, _ = \
- ssh.exec_command('echo show pci | nc 0 5002 || '
- 'echo "VPP not yet running"')
- if ret == 0 and 'VPP not yet running' not in stdout:
+ ssh.exec_command_sudo('vppctl show pci')
+ if ret == 0 and 'Connection refused' not in stdout:
break
else:
raise RuntimeError('VPP failed to restart on node {name}'.