diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 272843cb33..17d96e32c7 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -988,14 +988,11 @@ class Containerize(): for svcName in services: # head -n -1 suppresses the final "X exited with status code Y" filename = f'{svcName}-{HTML.testCase_id}.log' - #mySSH.command(f'docker-compose -f ci-docker-compose.yml logs --no-log-prefix -- {svcName} | head -n -1 &> {lSourcePath}/cmake_targets/log/{filename}', '\$', 30) mySSH.command(f'docker-compose -f ci-docker-compose.yml logs --no-log-prefix -- {svcName} &> {lSourcePath}/cmake_targets/log/{filename}', '\$', 120) - mySSH.command('docker-compose -f ci-docker-compose.yml down', '\$', 5) - # Cleaning any created tmp volume - mySSH.command('docker volume prune --force', '\$', 20) - + mySSH.command('docker-compose -f ci-docker-compose.yml down -v', '\$', 5) mySSH.close() + # Analyzing log file! files = ','.join([f'{s}-{HTML.testCase_id}' for s in services]) if len(services) > 1: @@ -1298,7 +1295,7 @@ class Containerize(): logging.debug('\u001B[1m Undeploying \u001B[0m') logging.debug(f'Working dir is back {self.yamlPath[0]}') - cmd = 'docker-compose -f docker-compose-ci.yml down' + cmd = 'docker-compose -f docker-compose-ci.yml down -v' deployStatus = myCmd.run(cmd, timeout=100) if deployStatus.returncode != 0: myCmd.close() @@ -1309,9 +1306,6 @@ class Containerize(): return self.deployedContainers = [] - # Cleaning any created tmp volume - cmd = 'docker volume prune --force' - deployStatus = myCmd.run(cmd, timeout=100, reportNonZero=False) myCmd.close() if fullStatus: diff --git a/ci-scripts/epc.py b/ci-scripts/epc.py index af4699688d..33c8ae0e25 100644 --- a/ci-scripts/epc.py +++ b/ci-scripts/epc.py @@ -679,7 +679,7 @@ class EPCManagement(): mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme.conf', self.SourceCodePath + '/scripts') mySSH.command('chmod 775 entrypoint.sh', '\$', 60) mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30) - mySSH.command('docker-compose down', '\$', 60) + mySSH.command('docker-compose down -v', '\$', 60) mySSH.command('docker-compose up -d db_init', '\$', 60) # databases take time... time.sleep(10) @@ -831,8 +831,7 @@ class EPCManagement(): listOfContainers += ' prod-trf-gen' nbContainers += 1 - mySSH.command('docker-compose down', '\$', 60) - mySSH.command('docker volume prune --force || true', '\$', 60) + mySSH.command('docker-compose down -v', '\$', 60) mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + listOfContainers, '\$', 10) noMoreContainerNb = mySSH.getBefore().count('No such object') mySSH.command('docker inspect --format=\'{{.Name}}\' prod-oai-public-net prod-oai-private-net', '\$', 10) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 613b6238f5..8770224393 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -750,7 +750,6 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'WaitEndBuild_eNB': RAN.WaitBuildeNBisFinished(HTML) elif action == 'Custom_Command': - logging.info(f"Executing custom command") RAN.CustomCommand(HTML) if RAN.prematureExit: CiTestObj.AutoTerminateeNB(HTML,RAN,EPC,CONTAINERS) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index ba618d3b01..fc6bf1b42f 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -260,6 +260,7 @@ class RANManagement(): self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.backgroundBuildTestId[int(self.eNB_instance)], HTML) def CustomCommand(self, HTML): + logging.info(f"Executing custom command on {self.node}") cmd = cls_cmd.getConnection(self.node) ret = cmd.run(self.command) cmd.close() diff --git a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml index 1ad3158d20..37525357fa 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml @@ -28,6 +28,7 @@ 111111 100011 + 004000 000010 000011 020011 @@ -45,6 +46,13 @@ oai-gnb oai-nr-ue + + Custom_Command + Clean-Up any residual volume + localhost + docker volume rm 5g_rfsimulator_fdd_phytest_rrc.config + + DeployGenObject Deploy OAI 5G gNB RF sim SA diff --git a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest_down.xml b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest_down.xml index 69d44911b1..9036fbc677 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest_down.xml @@ -26,6 +26,7 @@ trash 100012 + 004000 222222 @@ -36,6 +37,13 @@ yaml_files/5g_rfsimulator_fdd_phytest + + Custom_Command + Clean-Up any residual volume + localhost + docker volume rm 5g_rfsimulator_fdd_phytest_rrc.config + + Clean_Test_Server_Images Clean Test Images on Test Server diff --git a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml index 19bb89518a..17c2c9f8b7 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml @@ -28,6 +28,7 @@ 111111 100001 + 004000 000000 000001 020001 @@ -43,6 +44,13 @@ oai-gnb oai-nr-ue + + Custom_Command + Clean-Up any residual volume + localhost + docker volume rm 5g_rfsimulator_fr2_32prb_rrc.config + + DeployGenObject Deploy OAI gNB diff --git a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb_down.xml b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb_down.xml index 6dd65eaa85..efd7340b41 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb_down.xml @@ -26,6 +26,7 @@ trash 100002 + 004000 222222 @@ -36,6 +37,13 @@ yaml_files/5g_rfsimulator_fr2_32prb + + Custom_Command + Clean-Up any residual volume + localhost + docker volume rm 5g_rfsimulator_fr2_32prb_rrc.config + + Clean_Test_Server_Images Clean Test Images on Test Server diff --git a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml index e7b0e7903d..c520a82046 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml @@ -28,6 +28,7 @@ 111111 100001 + 004000 000000 000001 020001 @@ -43,6 +44,13 @@ oai-gnb oai-nr-ue + + Custom_Command + Clean-Up any residual volume + localhost + docker volume rm 5g_rfsimulator_tdd_dora_rrc.config + + DeployGenObject Deploy OAI gNB diff --git a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora_down.xml b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora_down.xml index e0e6119ca2..7042e8885a 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora_down.xml @@ -26,6 +26,7 @@ trash 100002 + 004000 222222 @@ -36,6 +37,13 @@ yaml_files/5g_rfsimulator_tdd_dora + + Custom_Command + Clean-Up any residual volume + localhost + docker volume rm 5g_rfsimulator_tdd_dora_rrc.config + + Clean_Test_Server_Images Clean Test Images on Test Server