Fix issue with system_ready_for_rapid file 06/73806/2
authorLuc Provoost <luc.provoost@gmail.com>
Mon, 16 Jan 2023 15:21:50 +0000 (16:21 +0100)
committerLuc Provoost <luc.provoost@gmail.com>
Tue, 17 Jan 2023 16:02:00 +0000 (16:02 +0000)
In the /opt/rapid directory, we used to check for the existance of the
file system_ready_for_rapid. This file was created when all the
initialization is done properly. This check was however broken and always
resulted succesfully, even if the file did not exist. When executing
runrapid.py, the system will now wait to connect to PROX, till this file
exists. The file is created when running start.sh

Signed-off-by: Luc Provoost <luc.provoost@gmail.com>
Change-Id: Idca52549aae40070a0b6ea1d7ccbf6c322dc631d

VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py
VNFs/DPPD-PROX/helper-scripts/rapid/rapid_defaults.py

index 0288ce9..8754ebc 100644 (file)
@@ -47,8 +47,10 @@ class prox_ctrl(object):
                 on %s, attempt: %d" % (self._ip, attempts))
         while True:
             try:
-                self.run_cmd('test -e /opt/rapid/system_ready_for_rapid')
-                break
+                if (self.run_cmd('test -e /opt/rapid/system_ready_for_rapid \
+                        && echo exists')):
+                    break
+                time.sleep(2)
             except RuntimeWarning as ex:
                 RapidLog.debug("RuntimeWarning %d:\n%s"
                     % (ex.returncode, ex.output.strip()))
index 6fe8684..27d2430 100644 (file)
@@ -21,7 +21,7 @@ class RapidDefaults(object):
     Class to define the test defaults
     """
     test_params = {
-        'version' : '2023.01.09', # Please do NOT change, used for debugging
+        'version' : '2023.01.16', # Please do NOT change, used for debugging
         'environment_file' : 'rapid.env', #Default string for environment
         'test_file' : 'tests/basicrapid.test', #Default string for test
         'machine_map_file' : 'machine.map', #Default string for machine map file