From ea123a2ac06e7c63e0e8207ea2faac3ed8d4a12f Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Fri, 28 Jun 2024 15:20:50 +0200 Subject: [PATCH 01/15] Use new SSH class for Deploy_Object --- ci-scripts/cls_containerize.py | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 94d7526813..302254ff3a 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -67,7 +67,7 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge sshSession.command(f'rm -rf {sourcePath}', '\$', 10) sshSession.command('mkdir -p ' + sourcePath, '\$', 5) - sshSession.command('cd ' + sourcePath, '\$', 5) + (sshSession.cd(sourcePath) if isinstance(sshSession, cls_cmd.Cmd) else sshSession.command('cd ' + sourcePath, '\$', 5)) # Recent version of git (>2.20?) should handle missing .git extension # without problems if ranTargetBranch == 'null': ranTargetBranch = 'develop' @@ -884,26 +884,23 @@ class Containerize(): logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m') self.deployKind[self.eNB_instance] = True - mySSH = SSH.SSHConnection() - mySSH.open(lIpAddr, lUserName, lPassWord) - + mySSH = cls_cmd.getConnection(lIpAddr) CreateWorkspace(mySSH, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) - mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5) - mySSH.command('cp docker-compose.y*ml ci-docker-compose.yml', '\$', 5) + mySSH.cd(lSourcePath + '/' + self.yamlPath[self.eNB_instance]) + mySSH.run('cp docker-compose.y*ml ci-docker-compose.yml', 5) for image in IMAGES: imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) - mySSH.command(f'sed -i -e "s#image: {image}:latest#image: oai-ci/{imageTag}#" ci-docker-compose.yml', '\$', 2) + mySSH.run(f'sed -i -e "s#image: {image}:latest#image: oai-ci/{imageTag}#" ci-docker-compose.yml', 2) # Currently support only one svcName = self.services[self.eNB_instance] if svcName == '': - logging.warning('no service name given: starting all services in ci-docker-compose.yml!') - - mySSH.command(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', '\$', 30) + logging.warning('no service name giv en: starting all services in ci-docker-compose.yml!') + mySSH.run(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', 30) # Checking Status - mySSH.command(f'docker compose --file ci-docker-compose.yml config {svcName}', '\$', 5) + mySSH.run(f'docker compose --file ci-docker-compose.yml config {svcName}') result = re.search('container_name: (?P[a-zA-Z0-9\-\_]+)', mySSH.getBefore()) unhealthyNb = 0 healthyNb = 0 @@ -916,7 +913,7 @@ class Containerize(): time.sleep(5) cnt = 0 while (cnt < 3): - mySSH.command('docker inspect --format="{{.State.Health.Status}}" ' + containerName, '\$', 5) + mySSH.run('docker inspect --format="{{.State.Health.Status}}" ' + containerName, 5) unhealthyNb = mySSH.getBefore().count('unhealthy') healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb startingNb = mySSH.getBefore().count('starting') @@ -926,13 +923,13 @@ class Containerize(): time.sleep(10) cnt += 1 - mySSH.command('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName, '\$', 5) + mySSH.run('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName) for stdoutLine in mySSH.getBefore().split('\n'): if stdoutLine.count('ImageUsed: oai-ci'): usedImage = stdoutLine.replace('ImageUsed: oai-ci', 'oai-ci').strip() logging.debug('Used image is ' + usedImage) if usedImage != '': - mySSH.command('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage, '\$', 5, silent=True) + mySSH.run('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage, 5, silent=True) for stdoutLine in mySSH.getBefore().split('\n'): if re.search('Size = [0-9]', stdoutLine) is not None: imageInfo += stdoutLine.strip() + '\n' @@ -951,7 +948,7 @@ class Containerize(): if healthyNb == 1: cnt = 0 while (cnt < 20): - mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting|ready"', '\$', 30) + mySSH.run(f'docker logs {containerName} | egrep --text --color=never -i "wait|sync|Starting|ready"') result = re.search('got sync|Starting E1AP at CU UP|Starting F1AP at CU|Got sync|Waiting for RUs to be configured|cuPHYController initialized|Received CONFIG.response, gNB is ready', mySSH.getBefore()) if result is None: time.sleep(6) @@ -964,8 +961,9 @@ class Containerize(): # containers are unhealthy, so we won't start. However, logs are stored at the end # in UndeployObject so we here store the logs of the unhealthy container to report it logfilename = f'{lSourcePath}/cmake_targets/log/{self.eNB_logFile[self.eNB_instance]}' - mySSH.command(f'docker logs {containerName} > {logfilename}', '\$', 30) - mySSH.copyin(lIpAddr, lUserName, lPassWord, logfilename, '.') + mySSH.run(f'docker logs {containerName} > {logfilename}', 30) + mySSH.copyin(logfilename, '.',True) + mySSH.close() message = '' From 5a49dd9afa7d4a4544c61e897596e4b18376a711 Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Mon, 1 Jul 2024 11:31:24 +0200 Subject: [PATCH 02/15] aligning all test docker-compose files for image tagging --- ci-scripts/cls_containerize.py | 3 ++- ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml | 8 ++++---- .../4g_rfsimulator_fdd_05MHz/docker-compose.yml | 8 ++++---- .../4g_rfsimulator_fdd_10MHz/docker-compose.yml | 8 ++++---- .../4g_rfsimulator_fdd_20MHz/docker-compose.yml | 8 ++++---- .../4g_rfsimulator_tdd_05MHz/docker-compose.yml | 8 ++++---- .../yaml_files/5g_sa_n310_2x2_100MHz/docker-compose.yml | 2 +- .../yaml_files/5g_sa_n310_2x2_60MHz/docker-compose.yml | 2 +- ci-scripts/yaml_files/5g_sa_n310_gnb/docker-compose.yml | 2 +- ci-scripts/yaml_files/5g_sa_n310_nrue/docker-compose.yml | 2 +- .../yaml_files/fr1_enb_mono_fdd_tim/docker-compose.yml | 2 +- .../lte_b200_fdd_05Mhz_if4.5/docker-compose.yml | 4 ++-- .../yaml_files/lte_b200_fdd_05Mhz_tm1/docker-compose.yml | 2 +- .../docker-compose.yml | 2 +- .../lte_b200_fdd_10Mhz_oai_ue_magma/docker-compose.yml | 2 +- .../yaml_files/lte_b200_fdd_10Mhz_tm1/docker-compose.yml | 2 +- .../lte_b200_fdd_10Mhz_tm1_cdrx/docker-compose.yml | 2 +- .../lte_b200_fdd_10Mhz_tm1_magma/docker-compose.yml | 2 +- .../yaml_files/lte_b200_fdd_20Mhz_tm1/docker-compose.yml | 2 +- .../lte_b200_tdd_05Mhz_if4.5/docker-compose.yml | 4 ++-- .../yaml_files/lte_b200_tdd_05Mhz_tm1/docker-compose.yml | 2 +- .../yaml_files/lte_b200_tdd_05Mhz_tm2/docker-compose.yml | 2 +- .../yaml_files/lte_b200_tdd_10Mhz_tm1/docker-compose.yml | 2 +- .../yaml_files/lte_b200_tdd_20Mhz_tm1/docker-compose.yml | 2 +- .../docker-compose.yml | 2 +- .../yaml_files/lte_n3xx_tdd_2x2_tm1/docker-compose.yml | 2 +- .../yaml_files/lte_n3xx_tdd_2x2_tm2/docker-compose.yml | 2 +- ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml | 2 +- ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml | 2 +- ci-scripts/yaml_files/sa_aw2s_gnb/docker-compose.yml | 2 +- ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml | 2 +- ci-scripts/yaml_files/sa_e1_b200_gnb/docker-compose.yml | 6 +++--- ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml | 4 ++-- .../sa_fhi_7.2_benetel550_gnb/docker-compose.yml | 2 +- .../yaml_files/sa_fhi_7.2_vvdn_gnb/docker-compose.yml | 2 +- ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml | 2 +- ci-scripts/yaml_files/sa_sc_b200_gnb/docker-compose.yml | 2 +- 37 files changed, 58 insertions(+), 57 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 302254ff3a..958c511fe2 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -891,7 +891,8 @@ class Containerize(): mySSH.run('cp docker-compose.y*ml ci-docker-compose.yml', 5) for image in IMAGES: imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) - mySSH.run(f'sed -i -e "s#image: {image}:latest#image: oai-ci/{imageTag}#" ci-docker-compose.yml', 2) + mySSH.run(f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) + mySSH.run(f'sed -i -e "s@{image}:latest@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) # temporary solution for not using the new branch # Currently support only one svcName = self.services[self.eNB_instance] diff --git a/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml b/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml index 45d366be28..0595a180cd 100644 --- a/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml @@ -30,7 +30,7 @@ services: entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'" oai_hss: - image: oai-hss:latest + image: oaisoftwarealliance/oai-hss:latest container_name: l2sim4g-oai-hss privileged: true depends_on: [cassandra] @@ -73,7 +73,7 @@ services: retries: 5 magma_mme: - image: magma-mme:latest + image: oaisoftwarealliance/magma-mme:latest container_name: l2sim4g-magma-mme hostname: mme privileged: true @@ -102,7 +102,7 @@ services: retries: 5 oai_spgwc: - image: oai-spgwc:latest + image: oaisoftwarealliance/oai-spgwc:latest privileged: true depends_on: [magma_mme] container_name: l2sim4g-oai-spgwc @@ -134,7 +134,7 @@ services: retries: 5 oai_spgwu: - image: oai-spgwu-tiny:latest + image: oaisoftwarealliance/oai-spgwu-tiny:latest privileged: true container_name: l2sim4g-oai-spgwu-tiny depends_on: [oai_spgwc] diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml index b13032d5f3..d1f3d439ac 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml @@ -30,7 +30,7 @@ services: entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'" oai_hss: - image: oai-hss:latest + image: oaisoftwarealliance/oai-hss:latest container_name: rfsim4g-oai-hss privileged: true depends_on: [cassandra] @@ -73,7 +73,7 @@ services: retries: 5 magma_mme: - image: magma-mme:latest + image: oaisoftwarealliance/magma-mme:latest container_name: rfsim4g-magma-mme hostname: mme privileged: true @@ -102,7 +102,7 @@ services: retries: 5 oai_spgwc: - image: oai-spgwc:latest + image: oaisoftwarealliance/oai-spgwc:latest privileged: true depends_on: [magma_mme] container_name: rfsim4g-oai-spgwc @@ -134,7 +134,7 @@ services: retries: 5 oai_spgwu: - image: oai-spgwu-tiny:latest + image: oaisoftwarealliance/oai-spgwu-tiny:latest privileged: true container_name: rfsim4g-oai-spgwu-tiny depends_on: [oai_spgwc] diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml index cf27ea52f0..65f2431f4c 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml @@ -30,7 +30,7 @@ services: entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'" oai_hss: - image: oai-hss:latest + image: oaisoftwarealliance/oai-hss:latest container_name: rfsim4g-oai-hss privileged: true depends_on: [cassandra] @@ -73,7 +73,7 @@ services: retries: 5 magma_mme: - image: magma-mme:latest + image: oaisoftwarealliance/magma-mme:latest container_name: rfsim4g-magma-mme hostname: mme privileged: true @@ -102,7 +102,7 @@ services: retries: 5 oai_spgwc: - image: oai-spgwc:latest + image: oaisoftwarealliance/oai-spgwc:latest privileged: true depends_on: [magma_mme] container_name: rfsim4g-oai-spgwc @@ -134,7 +134,7 @@ services: retries: 5 oai_spgwu: - image: oai-spgwu-tiny:latest + image: oaisoftwarealliance/oai-spgwu-tiny:latest privileged: true container_name: rfsim4g-oai-spgwu-tiny depends_on: [oai_spgwc] diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml index 1d6a9aa594..778700ee3b 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml @@ -30,7 +30,7 @@ services: entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'" oai_hss: - image: oai-hss:latest + image: oaisoftwarealliance/oai-hss:latest container_name: rfsim4g-oai-hss privileged: true depends_on: [cassandra] @@ -73,7 +73,7 @@ services: retries: 5 magma_mme: - image: magma-mme:latest + image: oaisoftwarealliance/magma-mme:latest container_name: rfsim4g-magma-mme hostname: mme privileged: true @@ -102,7 +102,7 @@ services: retries: 5 oai_spgwc: - image: oai-spgwc:latest + image: oaisoftwarealliance/oai-spgwc:latest privileged: true depends_on: [magma_mme] container_name: rfsim4g-oai-spgwc @@ -134,7 +134,7 @@ services: retries: 5 oai_spgwu: - image: oai-spgwu-tiny:latest + image: oaisoftwarealliance/oai-spgwu-tiny:latest privileged: true container_name: rfsim4g-oai-spgwu-tiny depends_on: [oai_spgwc] diff --git a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml index aea003b742..789caffb99 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml @@ -30,7 +30,7 @@ services: entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'" oai_hss: - image: oai-hss:latest + image: oaisoftwarealliance/oai-hss:latest container_name: rfsim4g-oai-hss privileged: true depends_on: [cassandra] @@ -73,7 +73,7 @@ services: retries: 5 magma_mme: - image: magma-mme:latest + image: oaisoftwarealliance/magma-mme:latest container_name: rfsim4g-magma-mme hostname: mme privileged: true @@ -102,7 +102,7 @@ services: retries: 5 oai_spgwc: - image: oai-spgwc:latest + image: oaisoftwarealliance/oai-spgwc:latest privileged: true depends_on: [magma_mme] container_name: rfsim4g-oai-spgwc @@ -134,7 +134,7 @@ services: retries: 5 oai_spgwu: - image: oai-spgwu-tiny:latest + image: oaisoftwarealliance/oai-spgwu-tiny:latest privileged: true container_name: rfsim4g-oai-spgwu-tiny depends_on: [oai_spgwc] diff --git a/ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz/docker-compose.yml b/ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz/docker-compose.yml index 9368957b03..decdf813e9 100644 --- a/ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/5g_sa_n310_2x2_100MHz/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-gnb: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop network_mode: "host" container_name: oai-gnb cap_drop: diff --git a/ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz/docker-compose.yml b/ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz/docker-compose.yml index efe9f03c36..f827b83cad 100644 --- a/ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-gnb: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop network_mode: "host" container_name: oai-gnb cap_drop: diff --git a/ci-scripts/yaml_files/5g_sa_n310_gnb/docker-compose.yml b/ci-scripts/yaml_files/5g_sa_n310_gnb/docker-compose.yml index 31a0532d2e..cf2ea3742c 100644 --- a/ci-scripts/yaml_files/5g_sa_n310_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/5g_sa_n310_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-gnb: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop network_mode: "host" container_name: oai-gnb cap_drop: diff --git a/ci-scripts/yaml_files/5g_sa_n310_nrue/docker-compose.yml b/ci-scripts/yaml_files/5g_sa_n310_nrue/docker-compose.yml index c427a5ef4c..5c4c005fdb 100644 --- a/ci-scripts/yaml_files/5g_sa_n310_nrue/docker-compose.yml +++ b/ci-scripts/yaml_files/5g_sa_n310_nrue/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-nr-ue: - image: oai-nr-ue:latest + image: oaisoftwarealliance/oai-nr-ue:develop network_mode: host container_name: oai-nr-ue cap_drop: diff --git a/ci-scripts/yaml_files/fr1_enb_mono_fdd_tim/docker-compose.yml b/ci-scripts/yaml_files/fr1_enb_mono_fdd_tim/docker-compose.yml index 934c0fe555..e0ae4d3472 100644 --- a/ci-scripts/yaml_files/fr1_enb_mono_fdd_tim/docker-compose.yml +++ b/ci-scripts/yaml_files/fr1_enb_mono_fdd_tim/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: prod-enb-mono-fdd environment: diff --git a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml index 538c3f5c13..f611e8b37c 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_if4.5/docker-compose.yml @@ -1,6 +1,6 @@ services: rru_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-rru-fdd-05Mhz-tm1 network_mode: "host" @@ -17,7 +17,7 @@ services: timeout: 5s retries: 5 rcc_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-rcc-fdd-05Mhz-tm1 network_mode: "host" diff --git a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1/docker-compose.yml index 6a9edcc2ab..e411f6403d 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-fdd-05Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1_no_rrc_activity/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1_no_rrc_activity/docker-compose.yml index 22077b3846..3545c60579 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1_no_rrc_activity/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1_no_rrc_activity/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-fdd-05Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_oai_ue_magma/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_oai_ue_magma/docker-compose.yml index ed8a14a1ef..074d331f65 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_oai_ue_magma/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_oai_ue_magma/docker-compose.yml @@ -1,6 +1,6 @@ services: lte_ue0: - image: oai-lte-ue:latest + image: oaisoftwarealliance/oai-lte-ue:develop privileged: true container_name: lte-b200-ue-fdd-10Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1/docker-compose.yml index fbe4cda92c..2d57d8f089 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-fdd-10Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_cdrx/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_cdrx/docker-compose.yml index e8d6e337f2..8ba616aea3 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_cdrx/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_cdrx/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-fdd-10Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_magma/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_magma/docker-compose.yml index 358c7c461d..3c7d511b77 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_magma/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_magma/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-fdd-10Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_fdd_20Mhz_tm1/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_20Mhz_tm1/docker-compose.yml index c95a3f6333..d98b9670de 100644 --- a/ci-scripts/yaml_files/lte_b200_fdd_20Mhz_tm1/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_fdd_20Mhz_tm1/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-fdd-20Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml index ff32c34d0c..67d97f6b80 100644 --- a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_if4.5/docker-compose.yml @@ -1,6 +1,6 @@ services: rru_tdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-rru-tdd-05Mhz-tm1 network_mode: "host" @@ -17,7 +17,7 @@ services: timeout: 5s retries: 5 rcc_tdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-rcc-tdd-05Mhz-tm1 network_mode: "host" diff --git a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm1/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm1/docker-compose.yml index 26a56f39fb..edb6f34f70 100644 --- a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm1/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm1/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_tdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-tdd-05Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm2/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm2/docker-compose.yml index 29dadfcc25..6a6523969a 100644 --- a/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm2/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm2/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_tdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-tdd-05Mhz-tm2 environment: diff --git a/ci-scripts/yaml_files/lte_b200_tdd_10Mhz_tm1/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_tdd_10Mhz_tm1/docker-compose.yml index 46dc4e0a3d..8144caeea2 100644 --- a/ci-scripts/yaml_files/lte_b200_tdd_10Mhz_tm1/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_tdd_10Mhz_tm1/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_tdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-tdd-10Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1/docker-compose.yml index 5552d558b7..5c8827bfe8 100644 --- a/ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_tdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-tdd-20Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1_default_scheduler/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1_default_scheduler/docker-compose.yml index fdf7475ddc..bae9a753f4 100644 --- a/ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1_default_scheduler/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_b200_tdd_20Mhz_tm1_default_scheduler/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_tdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: lte-b200-enb-tdd-20Mhz-tm1 environment: diff --git a/ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm1/docker-compose.yml b/ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm1/docker-compose.yml index eb8e908897..cd66a7be7a 100644 --- a/ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm1/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm1/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-enb: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: oai-enb environment: diff --git a/ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm2/docker-compose.yml b/ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm2/docker-compose.yml index 056fc85403..07f9e00b5c 100644 --- a/ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm2/docker-compose.yml +++ b/ci-scripts/yaml_files/lte_n3xx_tdd_2x2_tm2/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-enb: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: oai-enb environment: diff --git a/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml b/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml index 794eecc3e3..fac36481bc 100644 --- a/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml +++ b/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml @@ -1,6 +1,6 @@ services: enb_mono_fdd: - image: oai-enb:latest + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: nsa-b200-enb ulimits: diff --git a/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml index 290ba46280..6945d33cd3 100644 --- a/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: gnb_mono_tdd: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop container_name: nsa-b200-gnb cap_drop: - ALL diff --git a/ci-scripts/yaml_files/sa_aw2s_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_aw2s_gnb/docker-compose.yml index 9e0fcce062..05499f0678 100644 --- a/ci-scripts/yaml_files/sa_aw2s_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_aw2s_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-gnb: - image: oai-gnb-aw2s:latest + image: oaisoftwarealliance/oai-gnb-aw2s:develop network_mode: "host" container_name: oai-gnb-aw2s cap_drop: diff --git a/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml index d97daf49d1..3f884ff809 100644 --- a/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: gnb_mono_tdd: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop container_name: sa-b200-gnb cap_drop: - ALL diff --git a/ci-scripts/yaml_files/sa_e1_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_e1_b200_gnb/docker-compose.yml index 4c2d0b7cc9..83bbbdc7c4 100644 --- a/ci-scripts/yaml_files/sa_e1_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_e1_b200_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: gnb_cucp: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop container_name: sa-cucp-gnb cap_drop: - ALL @@ -25,7 +25,7 @@ services: retries: 5 gnb_cuup: - image: oai-nr-cuup:latest + image: oaisoftwarealliance/oai-nr-cuup:develop container_name: sa-cuup-gnb cap_drop: - ALL @@ -52,7 +52,7 @@ services: retries: 5 gnb_du_tdd: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop container_name: sa-du-b200-gnb cap_drop: - ALL diff --git a/ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml index 8f026245ac..0f4b12fbb6 100644 --- a/ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: gnb_cu: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop container_name: sa-cu-gnb cap_drop: - ALL @@ -26,7 +26,7 @@ services: retries: 5 gnb_du_fdd: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop container_name: sa-du-b200-gnb cap_drop: - ALL diff --git a/ci-scripts/yaml_files/sa_fhi_7.2_benetel550_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_fhi_7.2_benetel550_gnb/docker-compose.yml index 5783964bbe..5eda4688c3 100644 --- a/ci-scripts/yaml_files/sa_fhi_7.2_benetel550_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_fhi_7.2_benetel550_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-gnb: - image: oai-gnb-fhi72:latest + image: oaisoftwarealliance/oai-gnb-fhi72:develop cap_add: - SYS_ADMIN - IPC_LOCK diff --git a/ci-scripts/yaml_files/sa_fhi_7.2_vvdn_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_fhi_7.2_vvdn_gnb/docker-compose.yml index 2798a8e8fc..7adac57359 100644 --- a/ci-scripts/yaml_files/sa_fhi_7.2_vvdn_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_fhi_7.2_vvdn_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: oai-gnb: - image: oai-gnb-fhi72:latest + image: oaisoftwarealliance/oai-gnb-fhi72:develop cap_add: - SYS_ADMIN - IPC_LOCK diff --git a/ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml b/ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml index d8f98ebc55..f8fb0726a4 100644 --- a/ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml +++ b/ci-scripts/yaml_files/sa_gnb_aerial/docker-compose.yaml @@ -34,7 +34,7 @@ services: retries: 5 oai-gnb-aerial: cpuset: "13-20" - image: oai-gnb-aerial:latest + image: oaisoftwarealliance/oai-gnb-aerial:develop depends_on: nv-cubb: condition: service_healthy diff --git a/ci-scripts/yaml_files/sa_sc_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_sc_b200_gnb/docker-compose.yml index 4ec5900521..a036a1ad29 100644 --- a/ci-scripts/yaml_files/sa_sc_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_sc_b200_gnb/docker-compose.yml @@ -1,6 +1,6 @@ services: gnb_mono_tdd: - image: oai-gnb:latest + image: oaisoftwarealliance/oai-gnb:develop container_name: sa-b200-gnb cap_drop: - ALL From 150a00bd2355e3124d195f0a339f58bcddd05898 Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Mon, 1 Jul 2024 12:00:08 +0200 Subject: [PATCH 03/15] support for %%currenthost%% host names for modules in ci_infra It can be set using nodes and svr_node tags in xml files --- ci-scripts/ci_infra.yaml | 42 +++++++++---------- ci-scripts/cls_module.py | 8 +++- ci-scripts/cls_oaicitest.py | 26 ++++++++---- ci-scripts/main.py | 8 ++++ .../xml_files/container_4g_l2sim_tdd.xml | 7 ++++ .../container_4g_rfsim_fdd_05MHz.xml | 7 ++++ .../container_4g_rfsim_fdd_05MHz_noS1.xml | 6 +++ .../container_4g_rfsim_fdd_10MHz.xml | 7 ++++ .../container_4g_rfsim_fdd_20MHz.xml | 7 ++++ .../xml_files/container_4g_rfsim_fembms.xml | 2 + .../xml_files/container_4g_rfsim_mbms.xml | 2 + .../container_4g_rfsim_tdd_05MHz.xml | 6 +++ .../xml_files/container_5g_e1_rfsim.xml | 2 + .../xml_files/container_5g_f1_rfsim.xml | 6 +++ .../xml_files/container_5g_fdd_rfsim.xml | 7 ++++ .../xml_files/container_5g_l2sim_tdd.xml | 3 ++ ci-scripts/xml_files/container_5g_rfsim.xml | 15 +++++++ .../xml_files/container_5g_rfsim_24prb.xml | 7 ++++ .../xml_files/container_5g_rfsim_2x2.xml | 7 ++++ .../container_5g_rfsim_f1_accelleran.xml | 2 + .../container_5g_rfsim_fdd_phytest.xml | 6 +++ .../container_5g_rfsim_fr2_32prb.xml | 2 + .../xml_files/container_5g_rfsim_tdd_dora.xml | 2 + .../xml_files/container_5g_rfsim_u0_25prb.xml | 7 ++++ 24 files changed, 164 insertions(+), 30 deletions(-) diff --git a/ci-scripts/ci_infra.yaml b/ci-scripts/ci_infra.yaml index 8ffb1c2083..31706446f6 100644 --- a/ci-scripts/ci_infra.yaml +++ b/ci-scripts/ci_infra.yaml @@ -249,13 +249,13 @@ lte_oai_ue_carabe: MTU: 1500 rfsim5g_gnb_nos1: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-gnb ip a show dev oaitun_enb1 CmdPrefix: docker exec rfsim5g-oai-gnb IF: oaitun_enb1 rfsim5g_ue: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue IF: oaitun_ue1 @@ -264,7 +264,7 @@ rfsim5g_ue: MTU: 1500 rfsim5g_ue2: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue2 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue2 IF: oaitun_ue1 @@ -273,7 +273,7 @@ rfsim5g_ue2: MTU: 1500 rfsim5g_ue3: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue3 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue3 IF: oaitun_ue1 @@ -282,7 +282,7 @@ rfsim5g_ue3: MTU: 1500 rfsim5g_ue4: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue4 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue4 IF: oaitun_ue1 @@ -291,7 +291,7 @@ rfsim5g_ue4: MTU: 1500 rfsim5g_ue5: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue5 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue5 IF: oaitun_ue1 @@ -300,7 +300,7 @@ rfsim5g_ue5: MTU: 1500 rfsim5g_ue6: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue6 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue6 IF: oaitun_ue1 @@ -309,7 +309,7 @@ rfsim5g_ue6: MTU: 1500 rfsim5g_ue7: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue7 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue7 IF: oaitun_ue1 @@ -318,7 +318,7 @@ rfsim5g_ue7: MTU: 1500 rfsim5g_ue8: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue8 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue8 IF: oaitun_ue1 @@ -327,7 +327,7 @@ rfsim5g_ue8: MTU: 1500 rfsim5g_ue9: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue9 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue9 IF: oaitun_ue1 @@ -336,7 +336,7 @@ rfsim5g_ue9: MTU: 1500 rfsim5g_ue10: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-nr-ue10 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim5g-oai-nr-ue10 IF: oaitun_ue1 @@ -345,12 +345,12 @@ rfsim5g_ue10: MTU: 1500 rfsim5g_ext_dn: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim5g-oai-ext-dn ip a show dev eth0 CmdPrefix: docker exec rfsim5g-oai-ext-dn rfsim4g_ue: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_ue1 CmdPrefix: docker exec rfsim4g-oai-lte-ue0 IF: oaitun_ue1 @@ -359,30 +359,30 @@ rfsim4g_ue: MTU: 1500 rfsim4g_ext_dn: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim4g-trf-gen ip a show dev eth0 CmdPrefix: docker exec rfsim4g-trf-gen rfsim4g_enb_nos1: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim4g-oai-enb ip a show dev oaitun_enb1 CmdPrefix: docker exec rfsim4g-oai-enb IF: oaitun_enb1 rfsim4g_enb_fembms: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim4g-oai-enb ip a show dev oaitun_enm1 CmdPrefix: docker exec rfsim4g-oai-enb IF: oaitun_enm1 rfsim4g_ue_fembms: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_uem1 CmdPrefix: docker exec rfsim4g-oai-lte-ue0 IF: oaitun_uem1 l2sim5g_ue: - Host: localhost + Host: "%%current_host%%" AttachScript: docker start l2sim-oai-nr-ue0 DetachScript: docker stop l2sim-oai-nr-ue0 NetworkScript: docker exec l2sim-oai-nr-ue0 ip a show dev oaitun_ue1 @@ -391,12 +391,12 @@ l2sim5g_ue: MTU: 1500 l2sim5g_ext_dn: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec l2sim-oai-ext-dn ip a show dev eth0 CmdPrefix: docker exec l2sim-oai-ext-dn l2sim4g_ue: - Host: localhost + Host: "%%current_host%%" AttachScript: docker start l2sim4g-oai-lte-ue1 DetachScript: docker stop l2sim4g-oai-lte-ue1 NetworkScript: docker exec l2sim4g-oai-lte-ue1 ip a show dev oaitun_ue1 @@ -405,6 +405,6 @@ l2sim4g_ue: MTU: 1500 l2sim4g_ext_dn: - Host: localhost + Host: "%%current_host%%" NetworkScript: docker exec l2sim4g-trf-gen ip a show dev eth0 CmdPrefix: docker exec l2sim4g-trf-gen diff --git a/ci-scripts/cls_module.py b/ci-scripts/cls_module.py index ef758a2933..c56638777c 100644 --- a/ci-scripts/cls_module.py +++ b/ci-scripts/cls_module.py @@ -41,14 +41,18 @@ import cls_cmd class Module_UE: - def __init__(self, module_name, filename="ci_infra.yaml"): + def __init__(self, module_name, node=None, filename="ci_infra.yaml"): with open(filename, 'r') as f: all_ues = yaml.load(f, Loader=yaml.FullLoader) m = all_ues.get(module_name) if m is None: raise Exception(f'no such module name "{module_name}" in "{filename}"') self.module_name = module_name - self.host = m['Host'] + self.host = m['Host'] if m['Host'] != "%%current_host%%" else None + if node is None and self.host is None: + raise Exception(f'node not provided when needed') + elif node is not None and self.host is None: + self.host = node self.cmd_dict = { "attach": m.get('AttachScript'), "detach": m.get('DetachScript'), diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 53a9aefda6..be9d6c12d8 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -280,6 +280,8 @@ class OaiCiTest(): self.clean_repository = True self.air_interface='' self.ue_ids = [] + self.nodes = [] + self.svr_node = None self.svr_id = None self.cmd_prefix = '' # prefix before {lte,nr}-uesoftmodem @@ -606,7 +608,10 @@ class OaiCiTest(): self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS) def AttachUE(self, HTML, RAN, EPC, CONTAINERS): - ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] + if len(self.ue_ids) == len(self.nodes): + ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] + else: + ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] with concurrent.futures.ThreadPoolExecutor() as executor: futures = [executor.submit(ue.attach) for ue in ues] attached = [f.result() for f in futures] @@ -621,7 +626,10 @@ class OaiCiTest(): self.AutoTerminateUEandeNB(HTML, RAN, EPC, CONTAINERS) def DetachUE(self, HTML): - ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] + if len(self.ue_ids) == len(self.nodes): + ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] + else: + ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] with concurrent.futures.ThreadPoolExecutor() as executor: futures = [executor.submit(ue.detach) for ue in ues] [f.result() for f in futures] @@ -757,8 +765,10 @@ class OaiCiTest(): if self.ue_ids == []: raise Exception("no module names in self.ue_ids provided") - - ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] + if len(self.ue_ids) == len(self.nodes): + ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] + else: + ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] logging.debug(ues) pingLock = Lock() with concurrent.futures.ThreadPoolExecutor() as executor: @@ -845,9 +855,11 @@ class OaiCiTest(): if self.ue_ids == [] or self.svr_id == None: raise Exception("no module names in self.ue_ids or/and self.svr_id provided") - - ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] - svr = cls_module.Module_UE(self.svr_id) + if len(self.ue_ids) == len(self.nodes): + ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] + else: + ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] + svr = cls_module.Module_UE(self.svr_id,self.svr_node) logging.debug(ues) with concurrent.futures.ThreadPoolExecutor() as executor: futures = [executor.submit(self.Iperf_Module, EPC, ue, svr, RAN, i, len(ues), CONTAINERS) for i, ue in enumerate(ues)] diff --git a/ci-scripts/main.py b/ci-scripts/main.py index ed002c1fa2..bc526072d5 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -217,6 +217,8 @@ def GetParametersFromXML(action): elif action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Terminate_UE' or action == 'CheckStatusUE' or action == 'DataEnable_UE' or action == 'DataDisable_UE': CiTestObj.ue_ids = test.findtext('id').split(' ') + if test.findtext('nodes'): + CiTestObj.nodes = test.findtext('nodes').split(' ') elif action == 'Build_OAI_UE': CiTestObj.Build_OAI_UE_args = test.findtext('Build_OAI_UE_args') @@ -263,12 +265,18 @@ def GetParametersFromXML(action): CiTestObj.ping_args = test.findtext('ping_args') CiTestObj.ping_packetloss_threshold = test.findtext('ping_packetloss_threshold') CiTestObj.ue_ids = test.findtext('id').split(' ') + if test.findtext('nodes'): + CiTestObj.nodes = test.findtext('nodes').split(' ') ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or '' elif action == 'Iperf': CiTestObj.iperf_args = test.findtext('iperf_args') CiTestObj.ue_ids = test.findtext('id').split(' ') CiTestObj.svr_id = test.findtext('svr_id') or None + if test.findtext('nodes'): + CiTestObj.nodes = test.findtext('nodes').split(' ') + if test.findtext('svr_node'): + CiTestObj.svr_node = test.findtext('svr_node') CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold') CiTestObj.iperf_bitrate_threshold = test.findtext('iperf_bitrate_threshold') or '90' CiTestObj.iperf_profile = test.findtext('iperf_profile') or 'balanced' diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml index de7baff19b..a57d2d9d5a 100644 --- a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml +++ b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml @@ -86,12 +86,14 @@ Attach_UE Attach OAI UE l2sim4g_ue + localhost Ping Ping trf-gen from LTE-UE 1 l2sim4g_ue + localhost -c 20 192.168.61.11 0 @@ -100,6 +102,7 @@ Ping Ping LTE-UE 1 from trf-gen l2sim4g_ext_dn + localhost -c 20 12.0.0.2 0 @@ -108,7 +111,9 @@ Iperf Iperf UDP Downlink l2sim4g_ue + localhost l2sim4g_ext_dn + localhost -u -t 30 -b 1M -R 25 80 @@ -118,7 +123,9 @@ Iperf Iperf UDP Uplink l2sim4g_ue + localhost l2sim4g_ext_dn + localhost -u -t 30 -b 3M 25 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml index 36b67a70b4..b21d5ed2ed 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml @@ -98,12 +98,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim4g_ue + localhost Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue + localhost -c 20 192.168.61.11 5 @@ -113,6 +115,7 @@ Ping LTE-UE from Traffic-Gen rfsim4g_ext_dn -c 20 12.0.0.2 + localhost 5 @@ -124,6 +127,8 @@ -u -t 30 -b 2M -R 25 80 + localhost + localhost @@ -134,6 +139,8 @@ -u -t 30 -b 1M 25 80 + localhost + localhost diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml index 655cbf0d82..f721573341 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml @@ -78,6 +78,7 @@ Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue + localhost -c 20 10.0.1.1 5 @@ -86,6 +87,7 @@ Ping Ping LTE-UE from eNB rfsim4g_enb_nos1 + localhost -c 20 10.0.1.2 5 @@ -94,7 +96,9 @@ Iperf Iperf UDP DL rfsim4g_ue + localhost rfsim4g_enb_nos1 + localhost -u -t 30 -b 2M -R 25 80 @@ -104,7 +108,9 @@ Iperf Iperf UDP UL rfsim4g_ue + localhost rfsim4g_enb_nos1 + localhost -u -t 30 -b 1M 25 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml index f37812ecb2..4472728380 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml @@ -98,12 +98,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim4g_ue + localhost Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue + localhost -c 20 192.168.61.11 5 @@ -112,6 +114,7 @@ Ping Ping LTE-UE from Traffic-Gen rfsim4g_ext_dn + localhost -c 20 12.0.0.2 5 @@ -120,7 +123,9 @@ Iperf Iperf UDP DL rfsim4g_ue + localhost rfsim4g_ext_dn + localhost -u -t 30 -b 2M -R 25 80 @@ -130,7 +135,9 @@ Iperf Iperf UDP UL rfsim4g_ue + localhost rfsim4g_ext_dn + localhost -u -t 30 -b 1M 25 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml index db157a5138..923ed2fee0 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml @@ -98,12 +98,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim4g_ue + localhost Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue + localhost -c 20 192.168.61.11 5 @@ -112,6 +114,7 @@ Ping Ping LTE-UE from Traffic-Gen rfsim4g_ext_dn + localhost -c 20 12.0.0.2 5 @@ -120,7 +123,9 @@ Iperf Iperf UDP DL rfsim4g_ue + localhost rfsim4g_ext_dn + localhost -u -t 30 -b 2M -R 25 80 @@ -130,7 +135,9 @@ Iperf Iperf UDP UL rfsim4g_ue + localhost rfsim4g_ext_dn + localhost -u -t 30 -b 1M 25 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml index bd15657c23..b2e312d22b 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml @@ -75,7 +75,9 @@ Iperf2_Unidir Iperf2 UDP DL rfsim4g_ue_fembms + localhost rfsim4g_enb_fembms + localhost -u -t 30 -b 2M 25 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml index 3dc26454a1..1269cfe07f 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml @@ -75,7 +75,9 @@ Iperf Iperf UDP DL rfsim4g_ue + localhost rfsim4g_enb_nos1 + localhost -u -t 30 -b 2M -R 25 80 diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml index a5501f2879..fd57190378 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml @@ -99,6 +99,7 @@ Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue + localhost -c 20 192.168.61.11 5 @@ -107,6 +108,7 @@ Ping Ping LTE-UE from Traffic-Gen rfsim4g_ext_dn + localhost -c 20 12.0.0.2 5 @@ -115,7 +117,9 @@ Iperf Iperf UDP DL rfsim4g_ue + localhost rfsim4g_ext_dn + localhost -u -t 30 -b 2M -R 25 80 @@ -125,7 +129,9 @@ Iperf Iperf UDP UL rfsim4g_ue + localhost rfsim4g_ext_dn + localhost -u -t 30 -b 1M 25 80 diff --git a/ci-scripts/xml_files/container_5g_e1_rfsim.xml b/ci-scripts/xml_files/container_5g_e1_rfsim.xml index 3d9bec6b9d..2cdc9c96d2 100644 --- a/ci-scripts/xml_files/container_5g_e1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_e1_rfsim.xml @@ -71,12 +71,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 + localhost localhost localhost Ping Ping ext-dn from all NR-UEs rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 + localhost localhost localhost -c 20 12.1.1.1 -i0.25 5 diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index be31c6202a..5ad5d20983 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -65,12 +65,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue + localhost Ping Ping ext-dn from all NR-UEs rfsim5g_ue + localhost -c 20 192.168.72.135 -i0.25 5 @@ -88,7 +90,9 @@ Iperf (DL/5Mbps/UDP)(30 sec) -u -b 5M -t 20 -R rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 @@ -98,7 +102,9 @@ Iperf (UL/3Mbps/UDP)(30 sec) -u -b 3M -t 20 rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml index 92629a4700..2c105853c0 100644 --- a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml @@ -66,12 +66,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue + localhost Ping Ping ext-dn from NR-UE rfsim5g_ue + localhost -c 20 -i 0.25 192.168.72.135 5 @@ -80,6 +82,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn + localhost -c 20 -i 0.25 12.1.1.2 5 @@ -89,7 +92,9 @@ Iperf (DL/3Mbps/UDP)(30 sec) -u -b 3M -t 30 -R rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 @@ -99,7 +104,9 @@ Iperf (UL/3Mbps/UDP)(30 sec) -u -b 3M -t 30 rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 diff --git a/ci-scripts/xml_files/container_5g_l2sim_tdd.xml b/ci-scripts/xml_files/container_5g_l2sim_tdd.xml index 8fcdcd6cb0..1e8a4e8981 100644 --- a/ci-scripts/xml_files/container_5g_l2sim_tdd.xml +++ b/ci-scripts/xml_files/container_5g_l2sim_tdd.xml @@ -84,12 +84,14 @@ Attach_UE Attach OAI UE l2sim5g_ue + localhost Ping Ping ext-dn from NR-UE l2sim5g_ue + localhost -c 20 192.168.72.135 5 @@ -98,6 +100,7 @@ Ping Ping NR-UE from ext-dn l2sim5g_ext_dn + localhost -c 20 12.1.1.2 5 diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml index 3751b256f2..893b527afe 100644 --- a/ci-scripts/xml_files/container_5g_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_rfsim.xml @@ -121,12 +121,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10 + localhost localhost localhost localhost localhost localhost localhost localhost localhost localhost Ping Ping ext-dn from NR-UE rfsim5g_ue + localhost -c 20 -i 0.25 192.168.72.135 5 @@ -135,6 +137,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn + localhost -c 20 -i 0.25 12.1.1.2 5 @@ -143,6 +146,7 @@ Ping Ping ext-dn from Second NR-UE rfsim5g_ue + localhost -c 20 -i 0.25 192.168.72.135 5 @@ -151,6 +155,7 @@ Ping Ping Second NR-UE from ext-dn rfsim5g_ext_dn + localhost -c 20 -i 0.25 12.1.1.3 5 @@ -159,6 +164,7 @@ Ping Ping ext-dn from both UEs rfsim5g_ue rfsim5g_ue2 + localhost localhost -c 20 -i 0.25 192.168.72.135 5 @@ -167,6 +173,7 @@ Ping Ping ext-dn from both UEs rfsim5g_ue rfsim5g_ue2 + localhost localhost -c 20 -i 0.25 192.168.72.135 5 @@ -175,6 +182,7 @@ Ping Ping ext-dn from all UEs rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10 + localhost localhost localhost localhost localhost localhost localhost localhost localhost localhost -c 20 192.168.72.135 -i 0.25 -s 1016 5 @@ -184,7 +192,9 @@ Iperf (DL/3Mbps/UDP)(30 sec) -u -b 3M -t 20 -R rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 @@ -194,7 +204,9 @@ Iperf (UL/1Mbps/UDP)(30 sec) -u -b 1M -t 20 rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 @@ -203,18 +215,21 @@ Attach_UE Attach OAI UE 1 and 2 rfsim5g_ue rfsim5g_ue2 + localhost localhost Detach_UE Detach OAI UE 1 and 2 rfsim5g_ue rfsim5g_ue2 + localhost localhost Detach_UE Detach OAI UE 2 to 10 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10 + localhost localhost localhost localhost localhost localhost localhost localhost diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml index e970c7ae3f..8bc5d08a8d 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml @@ -66,12 +66,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue + localhost Ping Ping ext-dn from NR-UE rfsim5g_ue + localhost -c 20 -i0.2 192.168.72.135 5 @@ -80,6 +82,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn + localhost -c 20 12.1.1.2 -i0.2 5 @@ -89,7 +92,9 @@ Iperf (DL/3Mbps/UDP)(30 sec) -u -b 3M -t 20 -R rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 @@ -99,7 +104,9 @@ Iperf (UL/1Mbps/UDP)(30 sec) -u -b 1M -t 20 rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 diff --git a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml index 1cd9314e1b..f14ac4bc60 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml @@ -66,12 +66,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue + localhost Ping Ping ext-dn from NR-UE rfsim5g_ue + localhost -c 20 -i 0.25 192.168.72.135 5 @@ -80,6 +82,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn + localhost -c 20 -i 0.25 12.1.1.2 5 @@ -89,7 +92,9 @@ Iperf (DL/10Mbps/UDP)(30 sec) -u -b 10M -t 20 -R rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 @@ -99,7 +104,9 @@ Iperf (UL/4Mbps/UDP)(30 sec) -u -b 4M -t 20 rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 diff --git a/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran.xml b/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran.xml index fe02da00a0..002d10467e 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran.xml @@ -53,12 +53,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue + localhost Ping Test Connectivity (ping) rfsim5g_ue + localhost -c 20 12.1.1.1 0 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 7c50eb7fea..be506d86f2 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml @@ -73,6 +73,7 @@ Ping Ping gNB from NR-UE rfsim5g_ue + localhost -c20 -i0.2 10.0.1.1 0 @@ -81,6 +82,7 @@ Ping Ping NR-UE from gNB rfsim5g_gnb_nos1 + localhost -c20 -i0.2 10.0.1.2 0 @@ -90,7 +92,9 @@ Iperf (DL/30kbps/UDP)(30 sec) -u -b 0.03M -t 20 -R -c 10.0.1.1 rfsim5g_ue + localhost rfsim5g_gnb_nos1 + localhost 5 90 @@ -100,7 +104,9 @@ Iperf (UL/30kbps/UDP)(30 sec) -u -b 0.03M -t 20 -c 10.0.1.1 rfsim5g_ue + localhost rfsim5g_gnb_nos1 + localhost 5 90 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 e6127a766e..4c266b7353 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml @@ -63,6 +63,7 @@ Ping Ping ext-dn from NR-UE rfsim5g_ue + localhost -c 20 -i0.2 192.168.72.135 0 @@ -71,6 +72,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn + localhost -c 20 12.1.1.2 -i0.2 0 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 306b8e4e05..4949380523 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml @@ -71,6 +71,7 @@ Ping Ping gNB from NR-UE rfsim5g_ue + localhost -c20 -i0.2 10.0.1.1 0 @@ -79,6 +80,7 @@ Ping Ping NR-UE from gNB rfsim5g_gnb_nos1 + localhost -c20 -i0.2 10.0.1.2 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml index 64f19e1314..01a658c18f 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml @@ -66,12 +66,14 @@ Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue + localhost Ping Ping ext-dn from NR-UE rfsim5g_ue + localhost -c 20 -i 0.25 192.168.72.135 5 @@ -80,6 +82,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn + localhost -c 20 -i 0.25 12.1.1.2 5 @@ -89,7 +92,9 @@ Iperf (DL/3Mbps/UDP)(30 sec) -u -b 3M -t 20 -R rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 @@ -99,7 +104,9 @@ Iperf (UL/1Mbps/UDP)(30 sec) -u -b 1M -t 20 rfsim5g_ue + localhost rfsim5g_ext_dn + localhost 5 90 From 44d0c888630dc9ff55c131cd4edf7e867bef5f69 Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Mon, 1 Jul 2024 13:09:22 +0200 Subject: [PATCH 04/15] Seperated Create_Workspace as a seperate XML task Create_Workspace is used used in XML files instead of directly being executed in DeployObject(). This can be problematic if we deploy multiple services on the same host, since a previous workspace will be deleted. Also, it removes futile git clones. There are other XML steps (CppCheckAnalysis, LicenceAndFormattingCheck, BuildImage, BuildProxy, BuildClusterImage) that implicitly called Create_Workspace. Those calls have been removed and care has been taken to insert the corresponding Create_Workspace steps in the XML. --- ci-scripts/cls_cluster.py | 5 +-- ci-scripts/cls_containerize.py | 40 ++++++++++++++----- ci-scripts/cls_static_code_analysis.py | 3 +- ci-scripts/main.py | 4 +- ci-scripts/xml_class_list.yml | 1 + ci-scripts/xml_files/cluster_image_build.xml | 10 ++++- .../xml_files/container_4g_l2sim_proxy.xml | 8 +++- .../xml_files/container_image_build.xml | 7 ++++ .../xml_files/container_image_build_cross.xml | 8 +++- .../xml_files/container_l2sim_proxy.xml | 7 ++++ .../container_lte_b200_fdd_05Mhz_tm1.xml | 8 +++- ...container_lte_b200_fdd_05Mhz_tm1_if4_5.xml | 19 +++++++-- ...lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml | 8 +++- .../container_lte_b200_fdd_10Mhz_tm1.xml | 8 +++- .../container_lte_b200_fdd_10Mhz_tm1_cdrx.xml | 8 +++- ...container_lte_b200_fdd_10Mhz_tm1_oaiue.xml | 16 +++++++- .../container_lte_b200_fdd_20Mhz_tm1.xml | 8 +++- .../container_lte_b200_tdd_05Mhz_tm1.xml | 8 +++- ...container_lte_b200_tdd_05Mhz_tm1_if4_5.xml | 19 +++++++-- .../container_lte_b200_tdd_05Mhz_tm2.xml | 7 ++++ .../container_lte_b200_tdd_10Mhz_tm1.xml | 7 ++++ .../container_lte_b200_tdd_20Mhz_tm1.xml | 7 ++++ ...e_b200_tdd_20Mhz_tm1_default_scheduler.xml | 8 +++- .../container_lte_n3xx_tdd_2x2_tm1.xml | 8 +++- .../container_lte_n3xx_tdd_2x2_tm2.xml | 8 +++- .../xml_files/container_nsa_b200_quectel.xml | 16 +++++++- .../xml_files/container_sa_aerial_quectel.xml | 16 +++++++- .../xml_files/container_sa_aw2s_asue.xml | 8 +++- .../xml_files/container_sa_b200_quectel.xml | 8 +++- .../container_sa_e1_b200_quectel.xml | 8 +++- .../container_sa_f1_b200_quectel.xml | 9 ++++- .../container_sa_n310_2X2_100MHz_quectel.xml | 8 +++- .../container_sa_n310_2X2_60MHz_quectel.xml | 8 +++- .../xml_files/container_sa_n310_nrue.xml | 19 +++++++-- .../container_sa_sc_b200_quectel.xml | 8 +++- ci-scripts/xml_files/cppcheck.xml | 6 ++- 36 files changed, 300 insertions(+), 54 deletions(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 16bec1389c..5ddf3872b2 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -301,10 +301,7 @@ class Cluster: self.testCase_id = HTML.testCase_id # Workaround for some servers, we need to erase completely the workspace - if self.forcedWorkspaceCleanup: - self.cmd.run(f'rm -Rf {lSourcePath}') - cls_containerize.CreateWorkspace(self.cmd, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) - + self.cmd.cd(lSourcePath) # to reduce the amount of data send to OpenShift, we # manually delete all generated files in the workspace self.cmd.run(f'rm -rf {lSourcePath}/cmake_targets/ran_build'); diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 958c511fe2..0cd382ac26 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -83,7 +83,9 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge sshSession.command(f'git checkout -f {ranCommitID}', '\$', 30) if sshSession.getBefore().count(f'HEAD is now at {ranCommitID[:6]}') != 1: sshSession.command('git log --oneline | head -n5', '\$', 5) - logging.warning(f'problems during checkout, is at: {sshSession.getBefore()}') + logging.error(f'problems during checkout, is at: {sshSession.getBefore()}') + self.exitStatus = 1 + HTML.CreateHtmlTestRowQueue('N/A', 'KO', "could not checkout correctly") else: logging.debug('successful checkout') # if the branch is not develop, then it is a merge request and we need to do @@ -325,14 +327,8 @@ class Containerize(): if result is not None: self.dockerfileprefix = '.ubuntu22.cross-arm64' - # Workaround for some servers, we need to erase completely the workspace - if self.forcedWorkspaceCleanup: - cmd.run(f'sudo -S rm -Rf {lSourcePath}') - self.testCase_id = HTML.testCase_id - - CreateWorkspace(cmd, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) - + cmd.cd(lSourcePath) # if asterix, copy the entitlement and subscription manager configurations if self.host == 'Red Hat': cmd.run('mkdir -p ./etc-pki-entitlement ./rhsm-conf ./rhsm-ca') @@ -532,7 +528,7 @@ class Containerize(): self.ranRepository = 'https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy.git' self.ranAllowMerge = False self.ranTargetBranch = 'master' - CreateWorkspace(mySSH, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) + mySSH.command('cd ' +lSourcePath, '\$', 3) # to prevent accidentally overwriting data that might be used later self.ranCommitID = oldRanCommidID self.ranRepository = oldRanRepository @@ -862,6 +858,31 @@ class Containerize(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) return True + def Create_Workspace(self): + if self.eNB_serverId[self.eNB_instance] == '0': + lIpAddr = self.eNBIPAddress + lUserName = self.eNBUserName + lPassWord = self.eNBPassword + lSourcePath = self.eNBSourceCodePath + elif self.eNB_serverId[self.eNB_instance] == '1': + lIpAddr = self.eNB1IPAddress + lUserName = self.eNB1UserName + lPassWord = self.eNB1Password + lSourcePath = self.eNB1SourceCodePath + elif self.eNB_serverId[self.eNB_instance] == '2': + lIpAddr = self.eNB2IPAddress + lUserName = self.eNB2UserName + lPassWord = self.eNB2Password + lSourcePath = self.eNB2SourceCodePath + if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '': + HELP.GenericHelp(CONST.Version) + sys.exit('Insufficient Parameter') + + logging.info(f"Running on server {lIpAddr}") + sshSession = cls_cmd.getConnection(lIpAddr) + + CreateWorkspace(sshSession, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) + def DeployObject(self, HTML, EPC): if self.eNB_serverId[self.eNB_instance] == '0': lIpAddr = self.eNBIPAddress @@ -885,7 +906,6 @@ class Containerize(): self.deployKind[self.eNB_instance] = True mySSH = cls_cmd.getConnection(lIpAddr) - CreateWorkspace(mySSH, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) mySSH.cd(lSourcePath + '/' + self.yamlPath[self.eNB_instance]) mySSH.run('cp docker-compose.y*ml ci-docker-compose.yml', 5) diff --git a/ci-scripts/cls_static_code_analysis.py b/ci-scripts/cls_static_code_analysis.py index cf1cb04597..55c479c16a 100644 --- a/ci-scripts/cls_static_code_analysis.py +++ b/ci-scripts/cls_static_code_analysis.py @@ -105,8 +105,7 @@ class StaticCodeAnalysis(): else: full_ran_repo_name = self.ranRepository + '.git' - CreateWorkspace(cmd, lSourcePath, full_ran_repo_name, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) - + cmd.cd(lSourcePath) logDir = f'{lSourcePath}/cmake_targets/build_log_{self.testCase_id}' cmd.run(f'mkdir -p {logDir}') cmd.run('docker image rm oai-cppcheck:bionic oai-cppcheck:focal') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index bc526072d5..499d003acf 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -353,7 +353,7 @@ def GetParametersFromXML(action): EPC.cfgUnDeploy = string_field EPC.cnID = test.findtext('cn_id') - elif action == 'Deploy_Object' or action == 'Undeploy_Object': + elif action == 'Deploy_Object' or action == 'Undeploy_Object' or action == "Create_Workspace": eNB_instance=test.findtext('eNB_instance') if (eNB_instance is None): CONTAINERS.eNB_instance=0 @@ -860,6 +860,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re success = CONTAINERS.Clean_Test_Server_Images(HTML) if not success: RAN.prematureExit = True + elif action == 'Create_Workspace': + CONTAINERS.Create_Workspace() elif action == 'Deploy_Object': CONTAINERS.DeployObject(HTML, EPC) if CONTAINERS.exitStatus==1: diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml index 6a3908004d..18c2c4632d 100755 --- a/ci-scripts/xml_class_list.yml +++ b/ci-scripts/xml_class_list.yml @@ -48,3 +48,4 @@ - Pull_Local_Registry - Clean_Test_Server_Images - Custom_Command + - Create_Workspace diff --git a/ci-scripts/xml_files/cluster_image_build.xml b/ci-scripts/xml_files/cluster_image_build.xml index 057d49da86..769320e9d4 100644 --- a/ci-scripts/xml_files/cluster_image_build.xml +++ b/ci-scripts/xml_files/cluster_image_build.xml @@ -24,9 +24,15 @@ build-tab Build Images on Cluster wrench - 000001 + + 000002 + 000001 + - + + Create_Workspace + Creating new Workspace + Build_Cluster_Image Build Images on OpenShift Cluster diff --git a/ci-scripts/xml_files/container_4g_l2sim_proxy.xml b/ci-scripts/xml_files/container_4g_l2sim_proxy.xml index 795bce6bef..1d59868855 100644 --- a/ci-scripts/xml_files/container_4g_l2sim_proxy.xml +++ b/ci-scripts/xml_files/container_4g_l2sim_proxy.xml @@ -26,10 +26,16 @@ wrench 1 + 100001 000001 - + + Create_Workspace + Creating new Workspace + 1 + 1 + Build_Proxy Build L2sim Proxy Image diff --git a/ci-scripts/xml_files/container_image_build.xml b/ci-scripts/xml_files/container_image_build.xml index 7684e0f997..7ee075544f 100644 --- a/ci-scripts/xml_files/container_image_build.xml +++ b/ci-scripts/xml_files/container_image_build.xml @@ -25,11 +25,18 @@ Build Container Images wrench + 800813 000001 000010 + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Build_Image Build all Images diff --git a/ci-scripts/xml_files/container_image_build_cross.xml b/ci-scripts/xml_files/container_image_build_cross.xml index 2cc12f5a15..9fc2ab68b3 100644 --- a/ci-scripts/xml_files/container_image_build_cross.xml +++ b/ci-scripts/xml_files/container_image_build_cross.xml @@ -25,10 +25,16 @@ Build Container Images wrench + 100001 000001 - + + Create_Workspace + Creating new Workspace + 0 + 0 + Build_Image Cross-Compile for ARM64 diff --git a/ci-scripts/xml_files/container_l2sim_proxy.xml b/ci-scripts/xml_files/container_l2sim_proxy.xml index 81ee7c1bfa..2f938ab8e5 100644 --- a/ci-scripts/xml_files/container_l2sim_proxy.xml +++ b/ci-scripts/xml_files/container_l2sim_proxy.xml @@ -26,10 +26,17 @@ wrench 1 + 100001 000001 + + Create_Workspace + Creating new Workspace + 1 + 1 + Build_Proxy Build L2sim Proxy Image diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml index ffdf7317f1..268be0974c 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml @@ -31,6 +31,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml 111110 300000 040101 +800813 030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201 @@ -63,7 +64,12 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml hutch sudo -S b2xx_fx3_utils --reset-device - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (FDD/Band7/5MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml index 711d685bad..e40cc6f80a 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml @@ -29,7 +29,10 @@ 111110 300000 040101 -030131 030132 +800813 +030131 +800814 +030132 040301 040531 040633 040634 040636 040671 040672 040673 040401 040201 030231 200000 @@ -61,7 +64,12 @@ hutch sudo -S b2xx_fx3_utils --reset-device - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy RRU (FDD/Band7/5MHz/B200) in a container @@ -70,7 +78,12 @@ 0 0 - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy RCC (FDD/Band7/5MHz) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml index b305f56a2f..673bf65609 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml @@ -30,6 +30,7 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm 100000 111110 040101 +800813 030102 000010 040301 040502 000011 040302 000001 000012 040303 000002 000013 040503 040401 040201 030202 @@ -55,7 +56,12 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm hutch sudo cpupower idle-set -E - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (FDD/Band7/5MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml index 5d9eb0c13f..472122d2e4 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml @@ -31,6 +31,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 100000 111110 040101 +800813 030111 000001 040301 040511 040613 040614 040615 040651 040652 040653 040654 040401 040201 @@ -57,7 +58,12 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml hutch sudo cpupower idle-set -E - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (FDD/Band7/10MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml index 358eeb20cc..1534150b01 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml @@ -30,6 +30,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 100000 111110 040101 +800813 030112 040301 040302 040512 040612 040650 040401 040201 @@ -56,7 +57,12 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml hutch sudo cpupower idle-set -E - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (FDD/Band7/10MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml index 7b8a06e51c..0e58e6b6ed 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml @@ -29,8 +29,10 @@ 100001 111110 111111 +800813 030111 000001 +800814 030311 000002 040511 040613 040616 040651 @@ -78,7 +80,12 @@ carabe sudo cpupower idle-set -E - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (FDD/Band7/10MHz/B200) in a container @@ -86,7 +93,12 @@ 0 0 - + + Create_Workspace + Creating new Workspace for server 1 + 1 + 1 + Deploy_Object Deploy LTE-UE (FDD/Band7/10MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml index c526cd9786..48aa606fa4 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml @@ -30,6 +30,7 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml 100000 111110 040101 +800813 030121 000001 040301 040521 040623 040624 040625 040662 040401 040201 @@ -56,7 +57,12 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml hutch sudo cpupower idle-set -E - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (FDD/Band7/20MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml index 7928cccbe1..0cd2d8335a 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml @@ -31,6 +31,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml 100000 111110 040101 +800813 030104 040301 040501 040602 040601 040603 040604 040605 040642 040641 040643 040644 040645 040401 040201 030204 @@ -64,7 +65,12 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml starsky sudo -S b2xx_fx3_utils --reset-device - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (TDD/Band40/5MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml index ce4ce3346c..8d67c23efd 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml @@ -28,7 +28,10 @@ 300000 100000 111110 -030134 030135 +800813 +030134 +800814 +030135 040301 040532 040631 040632 040634 040635 040681 040682 040684 040685 040401 040201 030231 040101 @@ -62,7 +65,12 @@ starsky sudo -S b2xx_fx3_utils --reset-device - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy RRU (TDD/Band40/5MHz/B200) in a container @@ -71,7 +79,12 @@ 0 0 - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy RCC (TDD/Band40/5MHz) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml index d79c668b58..77a13d9407 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml @@ -30,6 +30,7 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm2.xml 100000 111110 040101 +800813 030105 040301 040502 040606 040608 040646 040648 040401 040201 030205 @@ -55,6 +56,12 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm2.xml starsky sudo cpupower idle-set -E + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (TDD/Band40/5MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml index 2487163e20..ed37d24eae 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml @@ -30,6 +30,7 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml 100000 111110 040101 +800813 030114 040301 040511 040612 040611 040613 040614 040615 040652 040651 040653 040654 040655 040401 040201 030214 @@ -55,6 +56,12 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml starsky sudo cpupower idle-set -E + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (TDD/Band40/10MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml index 476f159ea2..1a9983e67e 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml @@ -30,6 +30,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml 100000 111110 040101 +800813 030124 040301 040521 040622 040621 040623 040662 040401 040201 030224 @@ -55,6 +56,12 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml starsky sudo cpupower idle-set -E + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (TDD/Band40/20MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml index b8c6d2c09f..e3f0f49140 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml @@ -30,6 +30,7 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml 100000 111110 040101 +800813 030125 040301 040522 040627 040626 040628 040629 040630 040667 040666 040668 040669 040670 040401 040201 030225 @@ -56,7 +57,12 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml starsky sudo cpupower idle-set -E - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy eNB (TDD/Band40/20MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml index 8334ca49d1..eccb2ce64d 100644 --- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml +++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml @@ -31,6 +31,7 @@ 111111 100000 010010 +800833 030101 010001 000001 @@ -64,7 +65,12 @@ obelix sudo cpupower idle-set -E - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy eNB (TDD/Band38/2.6Ghz/N3XX) in a container diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml index b518f98bdb..b9b86cb297 100644 --- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml +++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml @@ -31,6 +31,7 @@ 111111 100000 010010 +800833 031101 010001 000001 @@ -64,7 +65,12 @@ obelix sudo cpupower idle-set -E - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy eNB (TDD/Band38/2.6Ghz/N3XX) in a container diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml index 98eb70a808..1336b3c74d 100644 --- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml @@ -32,7 +32,9 @@ 111110 111111 010000 + 800833 030101 + 800834 030102 010001 050000 @@ -117,7 +119,12 @@ Detach UE idefix - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy eNB (FDD/Band7/5MHz/B200) in a container @@ -125,7 +132,12 @@ 0 0 - + + Create_Workspace + Creating new Workspace + 1 + 1 + Deploy_Object Deploy gNB (TDD/Band78/40MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_sa_aerial_quectel.xml b/ci-scripts/xml_files/container_sa_aerial_quectel.xml index 66df677b13..49f09ed669 100644 --- a/ci-scripts/xml_files/container_sa_aerial_quectel.xml +++ b/ci-scripts/xml_files/container_sa_aerial_quectel.xml @@ -29,7 +29,9 @@ 111111 000222 001111 + 800813 002222 + 800814 002223 000111 100000 @@ -54,7 +56,12 @@ Initialize Quectel sphex_quectel - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy PNF/Nvidia CUBB in a container @@ -63,7 +70,12 @@ 0 0 - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy VNF in a container diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue.xml b/ci-scripts/xml_files/container_sa_aw2s_asue.xml index 820e414ffb..b77645385e 100644 --- a/ci-scripts/xml_files/container_sa_aw2s_asue.xml +++ b/ci-scripts/xml_files/container_sa_aw2s_asue.xml @@ -28,6 +28,7 @@ 010000 001000 + 800813 020000 002000 002001 @@ -65,7 +66,12 @@ oaicicd-ran oai-gnb-aw2s - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB (TDD/Band78/20MHz/aw2s) in a container diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index db4c9d1d67..dfa38c90a7 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -29,6 +29,7 @@ 100000 111111 010000 + 800813 030101 010001 050000 @@ -95,7 +96,12 @@ Detach UE idefix - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy gNB (TDD/Band78/40MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml index 92577c3abc..afa27629a4 100644 --- a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml @@ -29,6 +29,7 @@ 333333 300000 310000 + 800813 330101 330102 330103 @@ -77,7 +78,12 @@ Detach Quectel idefix - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB-CU-CP in a container diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml index 6989c8fc26..821367cd3f 100644 --- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml @@ -28,6 +28,7 @@ 100000 110002 + 800813 130101 130102 100001 @@ -79,7 +80,12 @@ Detach Quectel idefix - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB-CU in a container @@ -88,7 +94,6 @@ 0 gnb_cu - Deploy_Object Deploy gNB-DU (FDD/Band1/10MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml index 6c39802bc9..9a6ce659de 100644 --- a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml +++ b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml @@ -29,6 +29,7 @@ 100000 111111 010010 + 800813 040101 010001 051001 @@ -74,7 +75,12 @@ Detach UE up2 - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB (TDD/Band77/100MHz/N310) in a container diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml index 607e17f05b..9d6dcec899 100644 --- a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml +++ b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml @@ -29,6 +29,7 @@ 100000 111111 010010 + 800813 030101 010001 050001 @@ -74,7 +75,12 @@ Detach UE up2 - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB (TDD/Band77/60MHz/N310) in a container diff --git a/ci-scripts/xml_files/container_sa_n310_nrue.xml b/ci-scripts/xml_files/container_sa_n310_nrue.xml index c4dbb83410..a414dc1143 100644 --- a/ci-scripts/xml_files/container_sa_n310_nrue.xml +++ b/ci-scripts/xml_files/container_sa_n310_nrue.xml @@ -27,7 +27,10 @@ 1 010000 010001 - 020000 020001 + 800813 + 020000 + 800814 + 020001 000001 001000 002000 @@ -64,7 +67,12 @@ caracal ssh root@192.168.20.2 reboot ; sleep 45 - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB (TDD/Band78/40MHz/N310) in a container @@ -72,7 +80,12 @@ 0 0 - + + Create_Workspace + Creating new Workspace + 1 + 1 + Deploy_Object Deploy nrUE (TDD/Band78/40MHz/N310) in a container diff --git a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml index 09720f422a..a08e938268 100644 --- a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml @@ -29,6 +29,7 @@ 300000 311111 210000 + 800813 230101 210001 250000 @@ -89,7 +90,12 @@ Detach UE idefix - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB (TDD/Band78/40MHz/B200) with SC-FDMA in a container diff --git a/ci-scripts/xml_files/cppcheck.xml b/ci-scripts/xml_files/cppcheck.xml index dd90d88f7e..6ec7a58e55 100644 --- a/ci-scripts/xml_files/cppcheck.xml +++ b/ci-scripts/xml_files/cppcheck.xml @@ -25,10 +25,14 @@ CPPCHECK Analysis wrench + 000002 000001 - + + Create_Workspace + Creating new Workspace + Cppcheck_Analysis Static Code Analysis with cppcheck From f99552419eabf23cd7d7c5c839907f65c63f40dc Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Tue, 2 Jul 2024 13:59:51 +0200 Subject: [PATCH 05/15] Use DeployObject/UndeployObject for pipelines using DeployGenObject/UndeployGenObject XML file changed accordingly --- ci-scripts/cls_containerize.py | 186 ++++++++++-------- ci-scripts/cls_oaicitest.py | 4 +- ci-scripts/main.py | 6 +- .../xml_files/container_4g_l2sim_tdd.xml | 69 +++---- .../xml_files/container_4g_l2sim_tdd_down.xml | 6 +- .../container_4g_rfsim_fdd_05MHz.xml | 57 +++--- .../container_4g_rfsim_fdd_05MHz_down.xml | 6 +- .../container_4g_rfsim_fdd_05MHz_noS1.xml | 41 ++-- ...container_4g_rfsim_fdd_05MHz_noS1_down.xml | 6 +- .../container_4g_rfsim_fdd_10MHz.xml | 57 +++--- .../container_4g_rfsim_fdd_10MHz_down.xml | 6 +- .../container_4g_rfsim_fdd_20MHz.xml | 57 +++--- .../container_4g_rfsim_fdd_20MHz_down.xml | 6 +- .../xml_files/container_4g_rfsim_fembms.xml | 33 ++-- .../container_4g_rfsim_fembms_down.xml | 6 +- .../xml_files/container_4g_rfsim_mbms.xml | 33 ++-- .../container_4g_rfsim_mbms_down.xml | 6 +- .../container_4g_rfsim_tdd_05MHz.xml | 55 +++--- .../container_4g_rfsim_tdd_05MHz_down.xml | 6 +- .../xml_files/container_5g_e1_rfsim.xml | 40 ++-- .../xml_files/container_5g_e1_rfsim_down.xml | 6 +- .../xml_files/container_5g_f1_rfsim.xml | 51 +++-- .../xml_files/container_5g_f1_rfsim_down.xml | 6 +- .../xml_files/container_5g_fdd_rfsim.xml | 43 ++-- .../xml_files/container_5g_fdd_rfsim_down.xml | 6 +- .../xml_files/container_5g_l2sim_tdd.xml | 57 +++--- .../xml_files/container_5g_l2sim_tdd_down.xml | 6 +- ci-scripts/xml_files/container_5g_rfsim.xml | 94 +++++---- .../xml_files/container_5g_rfsim_24prb.xml | 43 ++-- .../container_5g_rfsim_24prb_down.xml | 6 +- .../xml_files/container_5g_rfsim_2x2.xml | 43 ++-- .../xml_files/container_5g_rfsim_2x2_down.xml | 6 +- .../xml_files/container_5g_rfsim_down.xml | 6 +- .../container_5g_rfsim_f1_accelleran.xml | 25 ++- .../container_5g_rfsim_f1_accelleran_down.xml | 6 +- .../container_5g_rfsim_fdd_phytest.xml | 43 ++-- .../container_5g_rfsim_fdd_phytest_down.xml | 8 +- .../container_5g_rfsim_fr2_32prb.xml | 33 ++-- .../container_5g_rfsim_fr2_32prb_down.xml | 6 +- .../xml_files/container_5g_rfsim_tdd_dora.xml | 35 ++-- .../container_5g_rfsim_tdd_dora_down.xml | 8 +- .../xml_files/container_5g_rfsim_u0_25prb.xml | 43 ++-- .../container_5g_rfsim_u0_25prb_down.xml | 6 +- .../container_sa_e1_b200_quectel.xml | 16 +- .../container_sa_f1_b200_quectel.xml | 7 + 45 files changed, 777 insertions(+), 518 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 0cd382ac26..95efd53f6a 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -911,79 +911,101 @@ class Containerize(): mySSH.run('cp docker-compose.y*ml ci-docker-compose.yml', 5) for image in IMAGES: imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) + if image == 'oai-gnb' or image == 'oai-nr-ue' or image == 'oai-nr-cuup': + ret = mySSH.run(f'docker image inspect oai-ci/{imageTag}', reportNonZero=False, silent=self.displayedNewTags) + if ret.returncode != 0: + imageTag = imageTag.replace('oai-gnb', 'oai-gnb-asan') + imageTag = imageTag.replace('oai-nr-ue', 'oai-nr-ue-asan') + imageTag = imageTag.replace('oai-nr-cuup', 'oai-nr-cuup-asan') + if not self.displayedNewTags: + logging.debug(f'\u001B[1m Using sanitized version of {image} with {imageTag}\u001B[0m') mySSH.run(f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) mySSH.run(f'sed -i -e "s@{image}:latest@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) # temporary solution for not using the new branch - # Currently support only one svcName = self.services[self.eNB_instance] if svcName == '': logging.warning('no service name giv en: starting all services in ci-docker-compose.yml!') - mySSH.run(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', 30) + ret = mySSH.run(f'docker compose -f {lSourcePath}/{self.yamlPath[self.eNB_instance]}/ci-docker-compose.yml config --services') + if ret.returncode != 0: + HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', "cannot enumerate running services") + self.exitStatus = 1 + return + allServices = ret.stdout.splitlines() + deployStatus = mySSH.run(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', 50) + if deployStatus.returncode != 0: + mySSH.close() + self.exitStatus = 1 + logging.error('Could not deploy') + HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK) + return # Checking Status - mySSH.run(f'docker compose --file ci-docker-compose.yml config {svcName}') - result = re.search('container_name: (?P[a-zA-Z0-9\-\_]+)', mySSH.getBefore()) - unhealthyNb = 0 - healthyNb = 0 - startingNb = 0 - containerName = '' - usedImage = '' - imageInfo = '' - if result is not None: - containerName = result.group('container_name') - time.sleep(5) - cnt = 0 - while (cnt < 3): - mySSH.run('docker inspect --format="{{.State.Health.Status}}" ' + containerName, 5) - unhealthyNb = mySSH.getBefore().count('unhealthy') - healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb - startingNb = mySSH.getBefore().count('starting') - if healthyNb == 1: - cnt = 10 - else: - time.sleep(10) - cnt += 1 - - mySSH.run('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName) - for stdoutLine in mySSH.getBefore().split('\n'): - if stdoutLine.count('ImageUsed: oai-ci'): - usedImage = stdoutLine.replace('ImageUsed: oai-ci', 'oai-ci').strip() - logging.debug('Used image is ' + usedImage) - if usedImage != '': - mySSH.run('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage, 5, silent=True) + services_list = self.services[self.eNB_instance].split() + if services_list == []: services_list=allServices #handing empty services + for svcName in services_list: + logging.debug('current service in the service list: \033[4m%s\033[0m', svcName) + mySSH.run(f'docker compose --file ci-docker-compose.yml config {svcName}') + result = re.search('container_name: (?P[a-zA-Z0-9\-\_]+)', mySSH.getBefore()) + unhealthyNb = 0 + healthyNb = 0 + startingNb = 0 + containerName = '' + usedImage = '' + imageInfo = '' + if result is not None: + containerName = result.group('container_name') + time.sleep(5) + cnt = 0 + while (cnt < 3): + if svcName != 'db_init': + mySSH.run('docker inspect --format="{{.State.Health.Status}}" ' + containerName, 5) + unhealthyNb = mySSH.getBefore().count('unhealthy') + healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb + startingNb = mySSH.getBefore().count('starting') + if healthyNb == 1: + cnt = 10 + else: + time.sleep(10) + cnt += 1 + else: + # faking health of db_init + unhealthyNb = 0 + healthyNb = 1 + startingNb = 0 + break + mySSH.run('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName) for stdoutLine in mySSH.getBefore().split('\n'): - if re.search('Size = [0-9]', stdoutLine) is not None: - imageInfo += stdoutLine.strip() + '\n' - if re.search('Creation = [0-9]', stdoutLine) is not None: - imageInfo += stdoutLine.strip() + '\n' - if re.search('Id = sha256', stdoutLine) is not None: - imageInfo += stdoutLine.strip() + '\n' - logging.debug(' -- ' + str(healthyNb) + ' healthy container(s)') - logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)') - logging.debug(' -- ' + str(startingNb) + ' still starting container(s)') + if stdoutLine.count('ImageUsed: oai-ci'): + usedImage = stdoutLine.replace('ImageUsed: oai-ci', 'oai-ci').strip() + logging.debug('Used image is ' + usedImage) + if usedImage != '': + mySSH.run('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage, 5, silent=True) + for stdoutLine in mySSH.getBefore().split('\n'): + if re.search('Size = [0-9]', stdoutLine) is not None: + imageInfo += stdoutLine.strip() + '\n' + if re.search('Creation = [0-9]', stdoutLine) is not None: + imageInfo += stdoutLine.strip() + '\n' + if re.search('Id = sha256', stdoutLine) is not None: + imageInfo += stdoutLine.strip() + '\n' + logging.debug(' -- ' + str(healthyNb) + ' healthy container(s) for service' + svcName) + logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s) for service' + svcName) + logging.debug(' -- ' + str(startingNb) + ' still starting container(s) for service' + svcName) - self.testCase_id = HTML.testCase_id - self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log' + self.testCase_id = HTML.testCase_id + self.eNB_logFile[self.eNB_instance] = f'{svcName}-{self.testCase_id}.log' - status = False - if healthyNb == 1: - cnt = 0 - while (cnt < 20): - mySSH.run(f'docker logs {containerName} | egrep --text --color=never -i "wait|sync|Starting|ready"') - result = re.search('got sync|Starting E1AP at CU UP|Starting F1AP at CU|Got sync|Waiting for RUs to be configured|cuPHYController initialized|Received CONFIG.response, gNB is ready', mySSH.getBefore()) - if result is None: - time.sleep(6) - cnt += 1 - else: - cnt = 100 - status = True - logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m') - else: - # containers are unhealthy, so we won't start. However, logs are stored at the end - # in UndeployObject so we here store the logs of the unhealthy container to report it - logfilename = f'{lSourcePath}/cmake_targets/log/{self.eNB_logFile[self.eNB_instance]}' - mySSH.run(f'docker logs {containerName} > {logfilename}', 30) - mySSH.copyin(logfilename, '.',True) + status = False + if healthyNb == 1: + status = True + logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m') + else: + # containers are unhealthy, so we won't start. However, logs are stored at the end + # in UndeployObject so we here store the logs of the unhealthy container to report it + logfilename = f'{lSourcePath}/cmake_targets/log/{self.eNB_logFile[self.eNB_instance]}' + mySSH.run(f'docker logs {containerName} > {logfilename}', 30) + cwd = os.getcwd() + logging.debug(f'Deployment Failed, trying to copy the log from {logfilename} at {cwd}') + mySSH.copyin(logfilename,cwd,True) mySSH.close() @@ -1026,7 +1048,6 @@ class Containerize(): logging.debug(f'\u001B[1m Undeploying OAI Object from server: {lIpAddr}\u001B[0m') mySSH = cls_cmd.getConnection(lIpAddr) yamlDir = f'{lSourcePath}/{self.yamlPath[self.eNB_instance]}' - mySSH.run(f'cd {yamlDir}') svcName = self.services[self.eNB_instance] forceDown = False if svcName != '': @@ -1051,12 +1072,13 @@ class Containerize(): logging.info(f'stopping services {[s for s, _ in services]}') mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml stop -t3') + cwd = os.getcwd() copyin_res = True for service_name, container_id in services: # head -n -1 suppresses the final "X exited with status code Y" filename = f'{service_name}-{HTML.testCase_id}.log' - mySSH.run(f'docker logs {container_id} &> {lSourcePath}/cmake_targets/log/{filename}') - copyin_res = mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', f'{filename}') and copyin_res + mySSH.run(f'docker logs {container_id} > {lSourcePath}/cmake_targets/log/{filename} 2>&1') + copyin_res = mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', os.path.join(cwd, filename)) and copyin_res mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml down -v') @@ -1066,32 +1088,34 @@ class Containerize(): HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE) self.exitStatus = 1 # use function for UE log analysis, when oai-nr-ue container is used - elif any(service_name == 'oai-nr-ue' or service_name == 'lte_ue0' for service_name, _ in services): - self.exitStatus == 0 - logging.debug(f'Analyzing UE logfile {filename}') - logStatus = cls_oaicitest.OaiCiTest().AnalyzeLogFile_UE(f'{filename}', HTML, RAN) - if (logStatus < 0): - HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) - self.exitStatus = 1 - else: - HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) else: for service_name, _ in services: - if service_name == 'nv-cubb': - msg = 'Undeploy PNF/Nvidia CUBB' - HTML.CreateHtmlTestRow(msg, 'OK', CONST.ALL_PROCESSES_OK) - else: - filename = f'{service_name}-{HTML.testCase_id}.log' - logging.debug(f'\u001B[1m Analyzing logfile {filename}\u001B[0m') + self.exitStatus == 0 + filename = f'{service_name}-{HTML.testCase_id}.log' + if (any(sub in service_name for sub in ['oai_ue','oai-nr-ue','lte_ue'])): + logging.debug(f'Analyzing UE logfile {filename}') + logStatus = cls_oaicitest.OaiCiTest().AnalyzeLogFile_UE(filename, HTML, RAN) + if (logStatus < 0): + HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) + self.exitStatus = 1 + else: + HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) + elif (any(sub in service_name for sub in ['oai_enb','oai-cu','oai-du','oai-gnb'])): + logging.debug(f'\u001B[1m Analyzing XnB logfile {filename}\u001B[0m') logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers) if (logStatus < 0): HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus) self.exitStatus = 1 else: HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) + elif service_name == 'nv-cubb': + msg = 'Undeploy PNF/Nvidia CUBB' + HTML.CreateHtmlTestRow(msg, 'OK', CONST.ALL_PROCESSES_OK) + else: + logging.info(f'Skipping to analysize log for service name {service_name}') # all the xNB run logs shall be on the server 0 for logCollecting if self.eNB_serverId[self.eNB_instance] != '0': - mySSH.copyout(f'./*.log', f'{lSourcePath}/cmake_targets/', recursive=True) + mySSH.copyout(f"{cwd}/*.log", f'{lSourcePath}/cmake_targets/', recursive=True) if self.exitStatus == 0: logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m') else: diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index be9d6c12d8..6519e68d7d 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -798,7 +798,9 @@ class OaiCiTest(): bidirIperf = re.search('--bidir', iperf_opt) is not None client_filename = f'iperf_client_{self.testCase_id}_{ue.getName()}.log' ymlPath = CONTAINERS.yamlPath[0].split('/') - logPath = f'../cmake_targets/log/{ymlPath[1]}' + logPath = f'../cmake_targets/log/{ymlPath[2]}' + # Creating destination log folder if needed on the python executor workspace + os.system(f'mkdir -p {logPath}') if udpIperf: target_bitrate, iperf_opt = Iperf_ComputeModifiedBW(idx, ue_num, self.iperf_profile, self.iperf_args) # note: for UDP testing we don't want to use json report - reports 0 Mbps received bitrate diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 499d003acf..96558d997d 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -557,7 +557,11 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE): if RAN.eNBIPAddress == 'none': cmd = 'zip -r enb.log.' + RAN.BuildId + '.zip cmake_targets/log' logging.info(cmd) - zipStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=60) + try: + zipStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=60) + except subprocess.CalledProcessError as e: + logging.error("Command '{}' returned non-zero exit status {}.".format(e.cmd, e.returncode)) + logging.error("Error output:\n{}".format(e.output)) sys.exit(0) RAN.LogCollecteNB() elif re.match('^LogCollectHSS$', mode, re.IGNORECASE): diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml index a57d2d9d5a..1a0e2e89e3 100644 --- a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml +++ b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml @@ -27,18 +27,16 @@ 1 111111 - 100001 + 800813 000000 000001 000002 000003 000004 - 200000 020001 020002 030011 030012 - 200001 100001 @@ -49,51 +47,60 @@ 0 oai-enb oai-lte-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy Cassandra Database - yaml_files/4g_l2sim_fdd + ci-scripts/yaml_files/4g_l2sim_fdd cassandra db_init - 1 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G CoreNetwork - yaml_files/4g_l2sim_fdd + ci-scripts/yaml_files/4g_l2sim_fdd oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen - 7 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G eNB L2 sim - yaml_files/4g_l2sim_fdd + ci-scripts/yaml_files/4g_l2sim_fdd oai_enb - 8 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI L2 sim 4G LTE-UE 1 and Proxy - yaml_files/4g_l2sim_fdd + ci-scripts/yaml_files/4g_l2sim_fdd proxy oai_ue1 - 10 + 0 + 0 Attach_UE Attach OAI UE l2sim4g_ue - localhost + obelix Ping Ping trf-gen from LTE-UE 1 l2sim4g_ue - localhost + obelix -c 20 192.168.61.11 0 @@ -102,7 +109,7 @@ Ping Ping LTE-UE 1 from trf-gen l2sim4g_ext_dn - localhost + obelix -c 20 12.0.0.2 0 @@ -111,9 +118,9 @@ Iperf Iperf UDP Downlink l2sim4g_ue - localhost + obelix l2sim4g_ext_dn - localhost + obelix -u -t 30 -b 1M -R 25 80 @@ -123,30 +130,18 @@ Iperf Iperf UDP Uplink l2sim4g_ue - localhost + obelix l2sim4g_ext_dn - localhost + obelix -u -t 30 -b 3M 25 80 - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_l2sim_fdd - - - - StatsFromGenObject - Statistics before Traffic Test - yaml_files/4g_l2sim_fdd - - - - StatsFromGenObject - Statistics after Traffic Test - yaml_files/4g_l2sim_fdd + ci-scripts/yaml_files/4g_l2sim_fdd diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd_down.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd_down.xml index 011c3dbf6a..8ac78f544d 100644 --- a/ci-scripts/xml_files/container_4g_l2sim_tdd_down.xml +++ b/ci-scripts/xml_files/container_4g_l2sim_tdd_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_l2sim_fdd + ci-scripts/yaml_files/4g_l2sim_fdd + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml index b21d5ed2ed..a637d79cba 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml @@ -26,7 +26,7 @@ wrench 111111 - 100011 + 800813 000011 000001 000012 @@ -42,7 +42,12 @@ 100011 - + + Create_Workspace + Creating new Workspace + 0 + 0 + Pull_Local_Registry Pull Images from Local Registry @@ -51,11 +56,12 @@ - DeployGenObject + Deploy_Object Deploy Cassandra Database - yaml_files/4g_rfsimulator_fdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz cassandra db_init - 1 + 0 + 0 @@ -71,41 +77,44 @@ - DeployGenObject + Deploy_Object Deploy OAI 4G CoreNetwork - yaml_files/4g_rfsimulator_fdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen - 7 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G eNB RF sim (FDD 05MHz) - yaml_files/4g_rfsimulator_fdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz oai_enb0 - 8 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G LTE-UE RF sim (FDD 05MHz) - yaml_files/4g_rfsimulator_fdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz oai_ue0 - 9 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim4g_ue - localhost + obelix Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue - localhost + obelix -c 20 192.168.61.11 5 @@ -115,7 +124,7 @@ Ping LTE-UE from Traffic-Gen rfsim4g_ext_dn -c 20 12.0.0.2 - localhost + obelix 5 @@ -127,8 +136,8 @@ -u -t 30 -b 2M -R 25 80 - localhost - localhost + obelix + obelix @@ -139,14 +148,16 @@ -u -t 30 -b 1M 25 80 - localhost - localhost + obelix + obelix - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml index 068a4063f4..f7ac0a00d6 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml index f721573341..642342e7b8 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml @@ -26,7 +26,7 @@ wrench 111111 - 100011 +800813 000013 000002 000014 @@ -45,7 +45,12 @@ 0 oai-enb oai-lte-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + IdleSleep Sleep @@ -59,26 +64,28 @@ - DeployGenObject + Deploy_Object Deploy OAI 4G eNB RF sim (FDD 05MHz) - yaml_files/4g_rfsimulator_fdd_05MHz_noS1 + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1 oai_enb0 - 1 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G LTE-UE RF sim (FDD 05MHz) - yaml_files/4g_rfsimulator_fdd_05MHz_noS1 + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1 oai_ue0 - 2 + 0 + 0 Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue - localhost + obelix -c 20 10.0.1.1 5 @@ -87,7 +94,7 @@ Ping Ping LTE-UE from eNB rfsim4g_enb_nos1 - localhost + obelix -c 20 10.0.1.2 5 @@ -96,9 +103,9 @@ Iperf Iperf UDP DL rfsim4g_ue - localhost + obelix rfsim4g_enb_nos1 - localhost + obelix -u -t 30 -b 2M -R 25 80 @@ -108,18 +115,20 @@ Iperf Iperf UDP UL rfsim4g_ue - localhost + obelix rfsim4g_enb_nos1 - localhost + obelix -u -t 30 -b 1M 25 80 - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fdd_05MHz_noS1 + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1 + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml index f528ae0c21..d1b6d6ab93 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fdd_05MHz_noS1 + ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1 + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml index 4472728380..cddecd09d0 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml @@ -26,7 +26,7 @@ wrench 111111 - 100011 + 800813 000011 000001 000012 @@ -49,13 +49,19 @@ 0 oai-enb oai-lte-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy Cassandra Database - yaml_files/4g_rfsimulator_fdd_10MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz cassandra db_init - 1 + 0 + 0 @@ -71,41 +77,44 @@ - DeployGenObject + Deploy_Object Deploy OAI 4G CoreNetwork - yaml_files/4g_rfsimulator_fdd_10MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen - 7 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G eNB RF sim (FDD 10MHz) - yaml_files/4g_rfsimulator_fdd_10MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz oai_enb0 - 8 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G LTE-UE RF sim (FDD 10MHz) - yaml_files/4g_rfsimulator_fdd_10MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz oai_ue0 - 9 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim4g_ue - localhost + obelix Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue - localhost + obelix -c 20 192.168.61.11 5 @@ -114,7 +123,7 @@ Ping Ping LTE-UE from Traffic-Gen rfsim4g_ext_dn - localhost + obelix -c 20 12.0.0.2 5 @@ -123,9 +132,9 @@ Iperf Iperf UDP DL rfsim4g_ue - localhost + obelix rfsim4g_ext_dn - localhost + obelix -u -t 30 -b 2M -R 25 80 @@ -135,18 +144,20 @@ Iperf Iperf UDP UL rfsim4g_ue - localhost + obelix rfsim4g_ext_dn - localhost + obelix -u -t 30 -b 1M 25 80 - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fdd_10MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml index 37295911a5..2cb868e17a 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fdd_10MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml index 923ed2fee0..619257cbc1 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml @@ -26,7 +26,7 @@ wrench 111111 - 100011 + 800813 000011 000001 000012 @@ -49,13 +49,19 @@ 0 oai-enb oai-lte-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy Cassandra Database - yaml_files/4g_rfsimulator_fdd_20MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz cassandra db_init - 1 + 0 + 0 @@ -71,41 +77,44 @@ - DeployGenObject + Deploy_Object Deploy OAI 4G CoreNetwork - yaml_files/4g_rfsimulator_fdd_20MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen - 7 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G eNB RF sim (FDD 20MHz) - yaml_files/4g_rfsimulator_fdd_20MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz oai_enb0 - 8 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G LTE-UE RF sim (FDD 20MHz) - yaml_files/4g_rfsimulator_fdd_20MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz oai_ue0 - 9 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim4g_ue - localhost + obelix Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue - localhost + obelix -c 20 192.168.61.11 5 @@ -114,7 +123,7 @@ Ping Ping LTE-UE from Traffic-Gen rfsim4g_ext_dn - localhost + obelix -c 20 12.0.0.2 5 @@ -123,9 +132,9 @@ Iperf Iperf UDP DL rfsim4g_ue - localhost + obelix rfsim4g_ext_dn - localhost + obelix -u -t 30 -b 2M -R 25 80 @@ -135,18 +144,20 @@ Iperf Iperf UDP UL rfsim4g_ue - localhost + obelix rfsim4g_ext_dn - localhost + obelix -u -t 30 -b 1M 25 80 - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fdd_20MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml index 2017aec636..0582267082 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fdd_20MHz + ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml index b2e312d22b..d33832d3c2 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fembms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fembms.xml @@ -26,7 +26,7 @@ wrench 111111 - 100011 + 800813 000013 000002 000014 @@ -42,7 +42,12 @@ 0 oai-enb oai-lte-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + IdleSleep Sleep @@ -56,37 +61,41 @@ - DeployGenObject + Deploy_Object Deploy OAI 4G eNB RF sim (FeMBMS) - yaml_files/4g_rfsimulator_fembms + ci-scripts/yaml_files/4g_rfsimulator_fembms oai_enb0 - 1 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G LTE-UE RF sim (FeMBMS) - yaml_files/4g_rfsimulator_fembms + ci-scripts/yaml_files/4g_rfsimulator_fembms oai_ue0 - 2 + 0 + 0 Iperf2_Unidir Iperf2 UDP DL rfsim4g_ue_fembms - localhost + obelix rfsim4g_enb_fembms - localhost + obelix -u -t 30 -b 2M 25 80 - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fembms + ci-scripts/yaml_files/4g_rfsimulator_fembms + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_fembms_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fembms_down.xml index b127aee300..d78e9794e0 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_fembms_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_fembms_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_fembms + ci-scripts/yaml_files/4g_rfsimulator_fembms + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml index 1269cfe07f..04ec93ebf5 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_mbms.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_mbms.xml @@ -26,7 +26,7 @@ wrench 111111 - 100011 + 800813 000013 000002 000014 @@ -42,7 +42,12 @@ 0 oai-enb oai-lte-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + IdleSleep Sleep @@ -56,37 +61,41 @@ - DeployGenObject + Deploy_Object Deploy OAI 4G eNB RF sim (MBMS) - yaml_files/4g_rfsimulator_mbms + ci-scripts/yaml_files/4g_rfsimulator_mbms oai_enb0 - 1 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G LTE-UE RF sim (MBMS) - yaml_files/4g_rfsimulator_mbms + ci-scripts/yaml_files/4g_rfsimulator_mbms oai_ue0 - 2 + 0 + 0 Iperf Iperf UDP DL rfsim4g_ue - localhost + obelix rfsim4g_enb_nos1 - localhost + obelix -u -t 30 -b 2M -R 25 80 - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_mbms + ci-scripts/yaml_files/4g_rfsimulator_mbms + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_mbms_down.xml b/ci-scripts/xml_files/container_4g_rfsim_mbms_down.xml index 25b4909a88..3ad172be93 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_mbms_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_mbms_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_mbms + ci-scripts/yaml_files/4g_rfsimulator_mbms + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml index fd57190378..94bc18dc5a 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml @@ -27,7 +27,7 @@ 1 111111 - 100011 + 800813 000011 000001 000012 @@ -50,13 +50,19 @@ 0 oai-enb oai-lte-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy Cassandra Database - yaml_files/4g_rfsimulator_tdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz cassandra db_init - 1 + 0 + 0 @@ -72,34 +78,37 @@ - DeployGenObject + Deploy_Object Deploy OAI 4G CoreNetwork - yaml_files/4g_rfsimulator_tdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz oai_hss oai_mme oai_spgwc oai_spgwu trf_gen - 6 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G eNB RF sim (TDD 05MHz) - yaml_files/4g_rfsimulator_tdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz oai_enb0 - 7 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 4G LTE-UE RF sim (TDD 05MHz) - yaml_files/4g_rfsimulator_tdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz oai_ue0 - 8 + 0 + 0 Ping Ping Traffic-Gen from LTE-UE rfsim4g_ue - localhost + obelix -c 20 192.168.61.11 5 @@ -108,7 +117,7 @@ Ping Ping LTE-UE from Traffic-Gen rfsim4g_ext_dn - localhost + obelix -c 20 12.0.0.2 5 @@ -117,9 +126,9 @@ Iperf Iperf UDP DL rfsim4g_ue - localhost + obelix rfsim4g_ext_dn - localhost + obelix -u -t 30 -b 2M -R 25 80 @@ -129,18 +138,20 @@ Iperf Iperf UDP UL rfsim4g_ue - localhost + obelix rfsim4g_ext_dn - localhost + obelix -u -t 30 -b 1M 25 80 - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_tdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml index 7e526d4f48..0a6d6bb890 100644 --- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml +++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 4G stack - yaml_files/4g_rfsimulator_tdd_05MHz + ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_e1_rfsim.xml b/ci-scripts/xml_files/container_5g_e1_rfsim.xml index 2cdc9c96d2..87827cbdf7 100644 --- a/ci-scripts/xml_files/container_5g_e1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_e1_rfsim.xml @@ -26,7 +26,7 @@ wrench 111111 - 100021 + 800813 000021 000022 000023 @@ -42,53 +42,63 @@ 0 oai-gnb oai-nr-cuup oai-nr-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_rfsimulator_e1 + ci-scripts/yaml_files/5g_rfsimulator_e1 mysql oai-amf oai-smf oai-upf - 4 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G RAN RF sim SA (1 CU-CP, 3 CU-UPs, 3 DUs) - yaml_files/5g_rfsimulator_e1 + ci-scripts/yaml_files/5g_rfsimulator_e1 oai-cucp oai-cuup oai-cuup2 oai-cuup3 oai-du oai-du2 oai-du3 - 11 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G NR-UE RF sim SA - yaml_files/5g_rfsimulator_e1 + ci-scripts/yaml_files/5g_rfsimulator_e1 oai-nr-ue oai-nr-ue2 oai-nr-ue3 - 14 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 - localhost localhost localhost + cacofonix cacofonix cacofonix Ping Ping ext-dn from all NR-UEs rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 - localhost localhost localhost + cacofonix cacofonix cacofonix -c 20 12.1.1.1 -i0.25 5 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_e1 + ci-scripts/yaml_files/5g_rfsimulator_e1 1,0,0,0 1,0,0,0 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_e1_rfsim_down.xml b/ci-scripts/xml_files/container_5g_e1_rfsim_down.xml index 4ccf180fd0..3f10e0e32c 100644 --- a/ci-scripts/xml_files/container_5g_e1_rfsim_down.xml +++ b/ci-scripts/xml_files/container_5g_e1_rfsim_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_e1 + ci-scripts/yaml_files/5g_rfsimulator_e1 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index 5ad5d20983..56071f4b1b 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -26,7 +26,7 @@ wrench 111111 - 100021 + 800813 000021 000022 000023 @@ -44,35 +44,42 @@ 0 oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_f1_rfsimulator + ci-scripts/yaml_files/5g_f1_rfsimulator mysql oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G CU+DU+UE RF sim SA - yaml_files/5g_f1_rfsimulator + ci-scripts/yaml_files/5g_f1_rfsimulator oai-cu oai-du oai-nr-ue - 8 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue - localhost + cacofonix Ping Ping ext-dn from all NR-UEs rfsim5g_ue - localhost + cacofonix -c 20 192.168.72.135 -i0.25 5 @@ -80,7 +87,7 @@ Custom_Command Simulate a DL radio channel with noise (3 dB) - localhost + cacofonix echo channelmod modify 0 noise_power_dB 3 | nc --send-only 192.168.71.181 8091 yes @@ -90,9 +97,9 @@ Iperf (DL/5Mbps/UDP)(30 sec) -u -b 5M -t 20 -R rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 @@ -102,9 +109,9 @@ Iperf (UL/3Mbps/UDP)(30 sec) -u -b 3M -t 20 rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 @@ -112,7 +119,7 @@ Custom_Command Simulate a disruption of DL radio channel (ploss 55)(5 sec) - localhost + cacofonix echo channelmod modify 0 ploss 55 | nc -N 192.168.71.181 8091 && sleep 5 yes @@ -120,7 +127,7 @@ Custom_Command Get UE sync state (UE ID 0) - localhost + cacofonix echo ciUE sync_state 0 | nc -N 192.168.71.181 8091 | grep -E UE_NOT_SYNC yes @@ -128,7 +135,7 @@ Custom_Command Restoration of the original DL channel conditions (ploss 0)(5 sec) - localhost + cacofonix echo channelmod modify 0 ploss 0 | nc -N 192.168.71.181 8091 && sleep 5 yes @@ -136,17 +143,19 @@ Custom_Command Get UE sync state (UE ID 0) - localhost + cacofonix echo ciUE sync_state 0 | nc -N 192.168.71.181 8091 | grep -E UE_CONNECTED && sleep 10 yes - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_f1_rfsimulator + ci-scripts/yaml_files/5g_f1_rfsimulator 30,30,100,100 30,30,100,100 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml b/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml index e083286a09..18b917697c 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_f1_rfsimulator + ci-scripts/yaml_files/5g_f1_rfsimulator + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml index 2c105853c0..4a677ee41f 100644 --- a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml @@ -27,7 +27,7 @@ 1 111111 - 100011 + 800813 000011 000012 000013 @@ -45,35 +45,42 @@ 0 oai-gnb-asan oai-nr-ue-asan - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_fdd_rfsimulator + ci-scripts/yaml_files/5g_fdd_rfsimulator mysql oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G gNB+UE RF sim SA - yaml_files/5g_fdd_rfsimulator + ci-scripts/yaml_files/5g_fdd_rfsimulator oai-gnb oai-nr-ue - 7 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue - localhost + cacofonix Ping Ping ext-dn from NR-UE rfsim5g_ue - localhost + cacofonix -c 20 -i 0.25 192.168.72.135 5 @@ -82,7 +89,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn - localhost + cacofonix -c 20 -i 0.25 12.1.1.2 5 @@ -92,9 +99,9 @@ Iperf (DL/3Mbps/UDP)(30 sec) -u -b 3M -t 30 -R rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 @@ -104,19 +111,21 @@ Iperf (UL/3Mbps/UDP)(30 sec) -u -b 3M -t 30 rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_fdd_rfsimulator + ci-scripts/yaml_files/5g_fdd_rfsimulator 1,0,0,0 1,0,0,0 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim_down.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim_down.xml index a2cae33f4c..85421f7b6d 100644 --- a/ci-scripts/xml_files/container_5g_fdd_rfsim_down.xml +++ b/ci-scripts/xml_files/container_5g_fdd_rfsim_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_fdd_rfsimulator + ci-scripts/yaml_files/5g_fdd_rfsimulator + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_l2sim_tdd.xml b/ci-scripts/xml_files/container_5g_l2sim_tdd.xml index 1e8a4e8981..d53e2a4932 100644 --- a/ci-scripts/xml_files/container_5g_l2sim_tdd.xml +++ b/ci-scripts/xml_files/container_5g_l2sim_tdd.xml @@ -27,16 +27,14 @@ 1 111111 - 100001 + 800813 000000 000001 000002 000003 000004 - 200000 020001 020002 - 200001 100001 @@ -47,37 +45,46 @@ 0 oai-gnb-asan oai-nr-ue-asan - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy MySql Database - yaml_files/5g_l2sim_tdd + ci-scripts/yaml_files/5g_l2sim_tdd mysql - 1 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_l2sim_tdd + ci-scripts/yaml_files/5g_l2sim_tdd oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G gNB L2 sim SA - yaml_files/5g_l2sim_tdd + ci-scripts/yaml_files/5g_l2sim_tdd oai-gnb - 6 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G NR-UE L2 sim SA and Proxy - yaml_files/5g_l2sim_tdd + ci-scripts/yaml_files/5g_l2sim_tdd proxy oai-nr-ue0 - 8 + 0 + 0 @@ -106,23 +113,13 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_l2sim_tdd + ci-scripts/yaml_files/5g_l2sim_tdd 20,50,100,100 0,0,0,0 - - - - StatsFromGenObject - Statistics before Traffic Test - yaml_files/5g_l2sim_tdd - - - - StatsFromGenObject - Statistics after Traffic Test - yaml_files/5g_l2sim_tdd + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_l2sim_tdd_down.xml b/ci-scripts/xml_files/container_5g_l2sim_tdd_down.xml index 906ce7aa81..36ce7c71f6 100644 --- a/ci-scripts/xml_files/container_5g_l2sim_tdd_down.xml +++ b/ci-scripts/xml_files/container_5g_l2sim_tdd_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_l2sim_tdd + ci-scripts/yaml_files/5g_l2sim_tdd + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml index 893b527afe..2145207318 100644 --- a/ci-scripts/xml_files/container_5g_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_rfsim.xml @@ -27,7 +27,7 @@ 1 111111 - 100001 + 800813 000001 000002 000003 @@ -60,75 +60,87 @@ 0 oai-gnb-asan oai-nr-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator mysql oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G gNB RF sim SA - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator oai-gnb - 6 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G NR-UE RF sim SA - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue - 7 + 0 + 0 - DeployGenObject + Deploy_Object Deploy Second OAI 5G NR-UE RF sim SA - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue2 - 8 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G NR-UEs (#3, #4, #5) RF sim SA - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue3 oai-nr-ue4 oai-nr-ue5 - 11 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G NR-UEs (#6, #7, #8) RF sim SA - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue6 oai-nr-ue7 oai-nr-ue8 - 14 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G NR-UEs (#9, #10) RF sim SA - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator oai-nr-ue9 oai-nr-ue10 - 16 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10 - localhost localhost localhost localhost localhost localhost localhost localhost localhost localhost + cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix Ping Ping ext-dn from NR-UE rfsim5g_ue - localhost + cacofonix -c 20 -i 0.25 192.168.72.135 5 @@ -137,7 +149,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn - localhost + cacofonix -c 20 -i 0.25 12.1.1.2 5 @@ -146,7 +158,7 @@ Ping Ping ext-dn from Second NR-UE rfsim5g_ue - localhost + cacofonix -c 20 -i 0.25 192.168.72.135 5 @@ -155,7 +167,7 @@ Ping Ping Second NR-UE from ext-dn rfsim5g_ext_dn - localhost + cacofonix -c 20 -i 0.25 12.1.1.3 5 @@ -164,7 +176,7 @@ Ping Ping ext-dn from both UEs rfsim5g_ue rfsim5g_ue2 - localhost localhost + cacofonix cacofonix -c 20 -i 0.25 192.168.72.135 5 @@ -173,7 +185,7 @@ Ping Ping ext-dn from both UEs rfsim5g_ue rfsim5g_ue2 - localhost localhost + cacofonix cacofonix -c 20 -i 0.25 192.168.72.135 5 @@ -182,7 +194,7 @@ Ping Ping ext-dn from all UEs rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10 - localhost localhost localhost localhost localhost localhost localhost localhost localhost localhost + cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix -c 20 192.168.72.135 -i 0.25 -s 1016 5 @@ -192,9 +204,9 @@ Iperf (DL/3Mbps/UDP)(30 sec) -u -b 3M -t 20 -R rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 @@ -204,9 +216,9 @@ Iperf (UL/1Mbps/UDP)(30 sec) -u -b 1M -t 20 rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 @@ -215,29 +227,31 @@ Attach_UE Attach OAI UE 1 and 2 rfsim5g_ue rfsim5g_ue2 - localhost localhost + cacofonix cacofonix Detach_UE Detach OAI UE 1 and 2 rfsim5g_ue rfsim5g_ue2 - localhost localhost + cacofonix cacofonix Detach_UE Detach OAI UE 2 to 10 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10 - localhost localhost localhost localhost localhost localhost localhost localhost + cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator 1,0,0,0 1,0,0,0 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml index 8bc5d08a8d..6f4d800d4d 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml @@ -27,7 +27,7 @@ 1 111111 - 100001 + 800813 000001 000002 000003 @@ -45,35 +45,42 @@ 0 oai-gnb-asan oai-nr-ue-asan - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_rfsimulator_24prb + ci-scripts/yaml_files/5g_rfsimulator_24prb mysql oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G gNB+UE RFsim SA - yaml_files/5g_rfsimulator_24prb + ci-scripts/yaml_files/5g_rfsimulator_24prb oai-gnb oai-nr-ue - 7 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue - localhost + cacofonix Ping Ping ext-dn from NR-UE rfsim5g_ue - localhost + cacofonix -c 20 -i0.2 192.168.72.135 5 @@ -82,7 +89,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn - localhost + cacofonix -c 20 12.1.1.2 -i0.2 5 @@ -92,9 +99,9 @@ Iperf (DL/3Mbps/UDP)(30 sec) -u -b 3M -t 20 -R rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 @@ -104,19 +111,21 @@ Iperf (UL/1Mbps/UDP)(30 sec) -u -b 1M -t 20 rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_24prb + ci-scripts/yaml_files/5g_rfsimulator_24prb 1,0,0,0 1,0,0,0 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb_down.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb_down.xml index 9a16ed2723..09084b0503 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_24prb_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_24prb_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_24prb + ci-scripts/yaml_files/5g_rfsimulator_24prb + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml index f14ac4bc60..6e1dbef31d 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml @@ -27,7 +27,7 @@ 1 111111 - 100001 + 800813 000001 000002 000003 @@ -45,35 +45,42 @@ 0 oai-gnb-asan oai-nr-ue-asan - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_rfsimulator_2x2 + ci-scripts/yaml_files/5g_rfsimulator_2x2 mysql oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G gNB+UE RF sim SA - yaml_files/5g_rfsimulator_2x2 + ci-scripts/yaml_files/5g_rfsimulator_2x2 oai-gnb oai-nr-ue - 7 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue - localhost + cacofonix Ping Ping ext-dn from NR-UE rfsim5g_ue - localhost + cacofonix -c 20 -i 0.25 192.168.72.135 5 @@ -82,7 +89,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn - localhost + cacofonix -c 20 -i 0.25 12.1.1.2 5 @@ -92,9 +99,9 @@ Iperf (DL/10Mbps/UDP)(30 sec) -u -b 10M -t 20 -R rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 @@ -104,17 +111,19 @@ Iperf (UL/4Mbps/UDP)(30 sec) -u -b 4M -t 20 rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_2x2 + ci-scripts/yaml_files/5g_rfsimulator_2x2 + 0 + 0 1,0,0,0 1,0,0,0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_2x2_down.xml b/ci-scripts/xml_files/container_5g_rfsim_2x2_down.xml index 62ed318782..5d92987c5b 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_2x2_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_2x2_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_2x2 + ci-scripts/yaml_files/5g_rfsimulator_2x2 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_down.xml b/ci-scripts/xml_files/container_5g_rfsim_down.xml index d1cfc340d4..0c9348e8d6 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator + ci-scripts/yaml_files/5g_rfsimulator + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran.xml b/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran.xml index 002d10467e..31d9a04790 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran.xml @@ -26,6 +26,7 @@ wrench 111111 + 800813 000020 000021 020021 @@ -40,35 +41,43 @@ 0 oai-gnb oai-nr-ue - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI-DU+nrUE - yaml_files/5g_rfsimulator_accelleran + ci-scripts/yaml_files/5g_rfsimulator_accelleran oai-du oai-nr-ue - 2 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue - localhost + ofqot Ping Test Connectivity (ping) rfsim5g_ue - localhost + ofqot -c 20 12.1.1.1 0 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_accelleran + ci-scripts/yaml_files/5g_rfsimulator_accelleran + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran_down.xml b/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran_down.xml index 0a4f9fcbfa..c8960ccae8 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_f1_accelleran_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_accelleran + ci-scripts/yaml_files/5g_rfsimulator_accelleran + 0 + 0 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 be506d86f2..464197ef7a 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml @@ -27,7 +27,7 @@ 1 111111 - 100011 + 800813 004000 000010 000011 @@ -49,31 +49,38 @@ Custom_Command Clean-Up any residual volume - localhost + cacofonix docker volume rm 5g_rfsimulator_fdd_phytest_rrc.config -f - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G gNB RF sim SA - yaml_files/5g_rfsimulator_fdd_phytest + ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest oai-gnb - 1 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G NR-UE RF sim SA - yaml_files/5g_rfsimulator_fdd_phytest + ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest oai-nr-ue - 2 + 0 + 0 Ping Ping gNB from NR-UE rfsim5g_ue - localhost + cacofonix -c20 -i0.2 10.0.1.1 0 @@ -82,7 +89,7 @@ Ping Ping NR-UE from gNB rfsim5g_gnb_nos1 - localhost + cacofonix -c20 -i0.2 10.0.1.2 0 @@ -92,9 +99,9 @@ Iperf (DL/30kbps/UDP)(30 sec) -u -b 0.03M -t 20 -R -c 10.0.1.1 rfsim5g_ue - localhost + cacofonix rfsim5g_gnb_nos1 - localhost + cacofonix 5 90 @@ -104,19 +111,21 @@ Iperf (UL/30kbps/UDP)(30 sec) -u -b 0.03M -t 20 -c 10.0.1.1 rfsim5g_ue - localhost + cacofonix rfsim5g_gnb_nos1 - localhost + cacofonix 5 90 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_fdd_phytest + ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest 10,100,100,100 10,100,100,100 + 0 + 0 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 9036fbc677..14c3f0f32a 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 @@ -32,15 +32,17 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_fdd_phytest + ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest + 0 + 0 Custom_Command Clean-Up any residual volume - localhost + cacofonix docker volume rm 5g_rfsimulator_fdd_phytest_rrc.config 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 4c266b7353..9d1253b31f 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml @@ -27,7 +27,7 @@ 1 111111 - 100001 + 800813 000000 000001 020001 @@ -43,27 +43,36 @@ oai-gnb-asan oai-nr-ue-asan + + Create_Workspace + Creating new Workspace + 0 + 0 + + - DeployGenObject + Deploy_Object Deploy OAI gNB - yaml_files/5g_rfsimulator_fr2_32prb + ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb mysql oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI NR-UE - yaml_files/5g_rfsimulator_fr2_32prb + ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb oai-gnb oai-nr-ue - 7 + 0 + 0 Ping Ping ext-dn from NR-UE rfsim5g_ue - localhost + cacofonix -c 20 -i0.2 192.168.72.135 0 @@ -72,17 +81,19 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn - localhost + cacofonix -c 20 12.1.1.2 -i0.2 0 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_fr2_32prb + ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb 10,0,0,0 10,0,0,0 + 0 + 0 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..9537b0d5bb 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 @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_fr2_32prb + ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb + 0 + 0 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 4949380523..a6b754dacb 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml @@ -27,7 +27,7 @@ 1 111111 - 100001 + 800813 004000 000000 000001 @@ -47,31 +47,38 @@ Custom_Command Clean-Up any residual volume - localhost + cacofonix docker volume rm 5g_rfsimulator_tdd_dora_rrc.config -f - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI gNB - yaml_files/5g_rfsimulator_tdd_dora + ci-scripts/yaml_files/5g_rfsimulator_tdd_dora oai-gnb - 1 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI NR-UE - yaml_files/5g_rfsimulator_tdd_dora + ci-scripts/yaml_files/5g_rfsimulator_tdd_dora oai-nr-ue - 2 + 0 + 0 Ping Ping gNB from NR-UE rfsim5g_ue - localhost + cacofonix -c20 -i0.2 10.0.1.1 0 @@ -80,17 +87,19 @@ Ping Ping NR-UE from gNB rfsim5g_gnb_nos1 - localhost + cacofonix -c20 -i0.2 10.0.1.2 0 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_tdd_dora + ci-scripts/yaml_files/5g_rfsimulator_tdd_dora 0,0,0,0 0,0,0,0 + 0 + 0 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 7042e8885a..35ebe2314a 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 @@ -32,15 +32,17 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_tdd_dora + ci-scripts/yaml_files/5g_rfsimulator_tdd_dora + 0 + 0 Custom_Command Clean-Up any residual volume - localhost + cacofonix docker volume rm 5g_rfsimulator_tdd_dora_rrc.config diff --git a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml index 01a658c18f..6d5d99f595 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml @@ -27,7 +27,7 @@ 1 111111 - 100001 + 800813 000001 000002 000003 @@ -45,35 +45,42 @@ 0 oai-gnb-asan oai-nr-ue-asan - + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_rfsimulator_u0_25prb + ci-scripts/yaml_files/5g_rfsimulator_u0_25prb mysql oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G gNB+nrUE RF sim SA - yaml_files/5g_rfsimulator_u0_25prb + ci-scripts/yaml_files/5g_rfsimulator_u0_25prb oai-gnb oai-nr-ue - 7 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue - localhost + cacofonix Ping Ping ext-dn from NR-UE rfsim5g_ue - localhost + cacofonix -c 20 -i 0.25 192.168.72.135 5 @@ -82,7 +89,7 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn - localhost + cacofonix -c 20 -i 0.25 12.1.1.2 5 @@ -92,9 +99,9 @@ Iperf (DL/3Mbps/UDP)(30 sec) -u -b 3M -t 20 -R rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 @@ -104,19 +111,21 @@ Iperf (UL/1Mbps/UDP)(30 sec) -u -b 1M -t 20 rfsim5g_ue - localhost + cacofonix rfsim5g_ext_dn - localhost + cacofonix 5 90 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_u0_25prb + ci-scripts/yaml_files/5g_rfsimulator_u0_25prb 1,0,0,0 1,0,0,0 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb_down.xml b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb_down.xml index 7cd4bb4f1e..78b9aacc95 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_u0_25prb + ci-scripts/yaml_files/5g_rfsimulator_u0_25prb + 0 + 0 diff --git a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml index afa27629a4..96067b5592 100644 --- a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml @@ -31,7 +31,9 @@ 310000 800813 330101 + 800814 330102 + 800815 330103 310001 350000 @@ -92,7 +94,12 @@ 0 gnb_cucp - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB-CU-UP in a container @@ -101,7 +108,12 @@ 0 gnb_cuup - + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml index 821367cd3f..2c5ae10dba 100644 --- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml @@ -30,6 +30,7 @@ 110002 800813 130101 + 800814 130102 100001 110000 @@ -94,6 +95,12 @@ 0 gnb_cu + + Create_Workspace + Creating new Workspace + 0 + 0 + Deploy_Object Deploy gNB-DU (FDD/Band1/10MHz/B200) in a container From ab1564aa1c0cdedb58686c50b15a5dbe6d110f59 Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Wed, 10 Jul 2024 16:47:19 +0200 Subject: [PATCH 06/15] All log files are now stored in scenario-specific folders in python executor --- ci-scripts/cls_containerize.py | 43 +++++++++++++--------------------- ci-scripts/cls_oaicitest.py | 14 +++++++---- ci-scripts/main.py | 2 +- 3 files changed, 26 insertions(+), 33 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 95efd53f6a..fc5e2424da 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -944,11 +944,10 @@ class Containerize(): if services_list == []: services_list=allServices #handing empty services for svcName in services_list: logging.debug('current service in the service list: \033[4m%s\033[0m', svcName) - mySSH.run(f'docker compose --file ci-docker-compose.yml config {svcName}') - result = re.search('container_name: (?P[a-zA-Z0-9\-\_]+)', mySSH.getBefore()) + mySSH.run(f"docker compose -f docker-compose.yaml config --format json {svcName} | jq -r '.services.\"{svcName}\".container_name'") + result = mySSH.getBefore() unhealthyNb = 0 healthyNb = 0 - startingNb = 0 containerName = '' usedImage = '' imageInfo = '' @@ -961,7 +960,6 @@ class Containerize(): mySSH.run('docker inspect --format="{{.State.Health.Status}}" ' + containerName, 5) unhealthyNb = mySSH.getBefore().count('unhealthy') healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb - startingNb = mySSH.getBefore().count('starting') if healthyNb == 1: cnt = 10 else: @@ -971,7 +969,6 @@ class Containerize(): # faking health of db_init unhealthyNb = 0 healthyNb = 1 - startingNb = 0 break mySSH.run('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName) for stdoutLine in mySSH.getBefore().split('\n'): @@ -979,17 +976,9 @@ class Containerize(): usedImage = stdoutLine.replace('ImageUsed: oai-ci', 'oai-ci').strip() logging.debug('Used image is ' + usedImage) if usedImage != '': - mySSH.run('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage, 5, silent=True) - for stdoutLine in mySSH.getBefore().split('\n'): - if re.search('Size = [0-9]', stdoutLine) is not None: - imageInfo += stdoutLine.strip() + '\n' - if re.search('Creation = [0-9]', stdoutLine) is not None: - imageInfo += stdoutLine.strip() + '\n' - if re.search('Id = sha256', stdoutLine) is not None: - imageInfo += stdoutLine.strip() + '\n' - logging.debug(' -- ' + str(healthyNb) + ' healthy container(s) for service' + svcName) - logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s) for service' + svcName) - logging.debug(' -- ' + str(startingNb) + ' still starting container(s) for service' + svcName) + ret = mySSH.run('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage) + imageInfo = ret.stdout + logging.debug(f' -- for service {svcName} containers: {str(healthyNb)} healthy, {str(healthyNb)} unhealthy') self.testCase_id = HTML.testCase_id self.eNB_logFile[self.eNB_instance] = f'{svcName}-{self.testCase_id}.log' @@ -1004,7 +993,7 @@ class Containerize(): logfilename = f'{lSourcePath}/cmake_targets/log/{self.eNB_logFile[self.eNB_instance]}' mySSH.run(f'docker logs {containerName} > {logfilename}', 30) cwd = os.getcwd() - logging.debug(f'Deployment Failed, trying to copy the log from {logfilename} at {cwd}') + logging.warning(f'Deployment Failed, trying to copy the log from {logfilename} at {cwd}') mySSH.copyin(logfilename,cwd,True) mySSH.close() @@ -1074,11 +1063,15 @@ class Containerize(): mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml stop -t3') cwd = os.getcwd() copyin_res = True + ymlPath = self.yamlPath[0].split('/') + logPath = f'{cwd}/../cmake_targets/log/{ymlPath[2]}' + # Creating destination log folder if needed on the python executor workspace + os.system(f'mkdir -p {logPath}') for service_name, container_id in services: # head -n -1 suppresses the final "X exited with status code Y" filename = f'{service_name}-{HTML.testCase_id}.log' mySSH.run(f'docker logs {container_id} > {lSourcePath}/cmake_targets/log/{filename} 2>&1') - copyin_res = mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', os.path.join(cwd, filename)) and copyin_res + copyin_res = mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', os.path.join(logPath, filename)) and copyin_res mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml down -v') @@ -1087,20 +1080,19 @@ class Containerize(): HTML.htmleNBFailureMsg='Could not copy logfile(s) to analyze it!' HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE) self.exitStatus = 1 - # use function for UE log analysis, when oai-nr-ue container is used else: for service_name, _ in services: self.exitStatus == 0 - filename = f'{service_name}-{HTML.testCase_id}.log' + filename = f'{logPath}/{service_name}-{HTML.testCase_id}.log' if (any(sub in service_name for sub in ['oai_ue','oai-nr-ue','lte_ue'])): - logging.debug(f'Analyzing UE logfile {filename}') + logging.debug(f'\u001B[1m Analyzing UE logfile {filename} \u001B[0m') logStatus = cls_oaicitest.OaiCiTest().AnalyzeLogFile_UE(filename, HTML, RAN) if (logStatus < 0): HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) self.exitStatus = 1 else: HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) - elif (any(sub in service_name for sub in ['oai_enb','oai-cu','oai-du','oai-gnb'])): + elif (any(sub in service_name for sub in ['enb','rru','rcc','cu','du','gnb'])): logging.debug(f'\u001B[1m Analyzing XnB logfile {filename}\u001B[0m') logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers) if (logStatus < 0): @@ -1112,10 +1104,7 @@ class Containerize(): msg = 'Undeploy PNF/Nvidia CUBB' HTML.CreateHtmlTestRow(msg, 'OK', CONST.ALL_PROCESSES_OK) else: - logging.info(f'Skipping to analysize log for service name {service_name}') - # all the xNB run logs shall be on the server 0 for logCollecting - if self.eNB_serverId[self.eNB_instance] != '0': - mySSH.copyout(f"{cwd}/*.log", f'{lSourcePath}/cmake_targets/', recursive=True) + logging.info(f'Skipping to analyze log for service name {service_name}') if self.exitStatus == 0: logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m') else: @@ -1356,7 +1345,7 @@ class Containerize(): filenames = str(lsStatus.stdout).strip() for filename in filenames.split('\n'): - logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m') + logging.debug(f'\u001B[1m Analyzing UE logfile {filename} \u001B[0m') logStatus = UE.AnalyzeLogFile_UE(f'{logPath}/{filename}', HTML, RAN) if (logStatus < 0): fullStatus = False diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 6519e68d7d..3d65a37c53 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -670,7 +670,7 @@ class OaiCiTest(): messages = [f.result() for f in futures] HTML.CreateHtmlTestRowQueue('NA', 'OK', messages) - def Ping_common(self, EPC, ue, RAN, printLock): + def Ping_common(self, EPC, ue, RAN, CONTAINERS, printLock): # Launch ping on the EPC side (true for ltebox and old open-air-cn) ping_status = 0 ueIP = ue.getIP() @@ -678,7 +678,11 @@ class OaiCiTest(): return (False, f"UE {ue.getName()} has no IP address") ping_log_file = f'ping_{self.testCase_id}_{ue.getName()}.log' ping_time = re.findall("-c *(\d+)",str(self.ping_args)) - local_ping_log_file = f'{os.getcwd()}/{ping_log_file}' + # Creating destination log folder if needed on the python executor workspace + ymlPath = CONTAINERS.yamlPath[0].split('/') + logPath = f'../cmake_targets/log/{ymlPath[2]}' + os.system(f'mkdir -p {logPath}') + local_ping_log_file = f'{logPath}/{ping_log_file}' # if has pattern %cn_ip%, replace with core IP address, else we assume the IP is present if re.search('%cn_ip%', self.ping_args): #target address is different depending on EPC type @@ -772,7 +776,7 @@ class OaiCiTest(): logging.debug(ues) pingLock = Lock() with concurrent.futures.ThreadPoolExecutor() as executor: - futures = [executor.submit(self.Ping_common, EPC, ue, RAN, pingLock) for ue in ues] + futures = [executor.submit(self.Ping_common, EPC, ue, RAN, CONTAINERS, pingLock) for ue in ues] results = [f.result() for f in futures] # each result in results is a tuple, first member goes to successes, second to messages successes, messages = map(list, zip(*results)) @@ -915,9 +919,9 @@ class OaiCiTest(): self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS) def AnalyzeLogFile_UE(self, UElogFile,HTML,RAN): - if (not os.path.isfile(f'./{UElogFile}')): + if (not os.path.isfile(f'{UElogFile}')): return -1 - ue_log_file = open(f'./{UElogFile}', 'r') + ue_log_file = open(f'{UElogFile}', 'r') exitSignalReceived = False foundAssertion = False msgAssertion = '' diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 96558d997d..c1ac4f9ef7 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -554,7 +554,7 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE): if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') - if RAN.eNBIPAddress == 'none': + if os.path.isdir('cmake_targets/log'): cmd = 'zip -r enb.log.' + RAN.BuildId + '.zip cmake_targets/log' logging.info(cmd) try: From bc950aaaec9670d047f1db149408959bb23b0d83 Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Tue, 16 Jul 2024 11:35:19 +0200 Subject: [PATCH 07/15] Improved DeployObject cohesion - Introduced helper functions: GetCredentials, GetContainerName, GetImageInfo, GetContainerHealth, ReTagImages, DeployServices. --- ci-scripts/cls_containerize.py | 447 +++++++-------------------------- 1 file changed, 95 insertions(+), 352 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index fc5e2424da..50b4ae603d 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -171,6 +171,86 @@ def AnalyzeBuildLogs(buildRoot, images, globalStatus): collectInfo[image] = files return collectInfo +def GetCredentials(instance): + server_id = instance.eNB_serverId[instance.eNB_instance] + if server_id == '0': + return (instance.eNBIPAddress, instance.eNBUserName, instance.eNBPassword, instance.eNBSourceCodePath) + elif server_id == '1': + return (instance.eNB1IPAddress, instance.eNB1UserName, instance.eNB1Password, instance.eNB1SourceCodePath) + elif server_id == '2': + return (instance.eNB2IPAddress, instance.eNB2UserName, instance.eNB2Password, instance.eNB2SourceCodePath) + else: + raise Exception ("Only supports maximum of 3 servers") + +def GetContainerName(mySSH, svcName): + ret = mySSH.run(f"docker compose -f docker-compose.y*ml config --format json {svcName} | jq -r '.services.\"{svcName}\".container_name'") + containerName = ret.stdout + return containerName + +def GetImageInfo(mySSH, containerName): + usedImage = '' + ret = mySSH.run('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName) + if ret.stdout.count('ImageUsed: oai-ci'): + usedImage = ret.stdout.replace('ImageUsed: oai-ci', 'oai-ci').strip() + logging.debug('Used image is ' + usedImage) + if usedImage != '': + ret = mySSH.run('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage) + imageInfo = f"Used image is {usedImage}\n{ret.stdout}" + return imageInfo + else: + return "Could not retrieve used image info!\n" + +def GetContainerHealth(mySSH, containerName): + if containerName is None: + return 0, 0 + unhealthyNb = 0 + healthyNb = 0 + time.sleep(5) + for _ in range(3): + if containerName != 'db_init': + result = mySSH.run(f'docker inspect --format="{{{{.State.Health.Status}}}}" {containerName}') + unhealthyNb = result.stdout.count('unhealthy') + healthyNb = result.stdout.count('healthy') - unhealthyNb + if healthyNb == 1: + break + else: + time.sleep(10) + else: + unhealthyNb = 0 + healthyNb = 1 + break + return healthyNb, unhealthyNb + +def ReTagImages(mySSH,IMAGES,ranCommitID,ranBranch,ranAllowMerge,displayedNewTags): + mySSH.run('cp docker-compose.y*ml ci-docker-compose.yml', 5) + for image in IMAGES: + imageTag = ImageTagToUse(image, ranCommitID, ranBranch, ranAllowMerge) + if image == 'oai-gnb' or image == 'oai-nr-ue' or image == 'oai-nr-cuup': + ret = mySSH.run(f'docker image inspect oai-ci/{imageTag}', reportNonZero=False, silent=False) + if ret.returncode != 0: + imageTag = imageTag.replace('oai-gnb', 'oai-gnb-asan') + imageTag = imageTag.replace('oai-nr-ue', 'oai-nr-ue-asan') + imageTag = imageTag.replace('oai-nr-cuup', 'oai-nr-cuup-asan') + if not displayedNewTags: + logging.debug(f'\u001B[1m Using sanitized version of {image} with {imageTag}\u001B[0m') + mySSH.run(f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) + mySSH.run(f'sed -i -e "s@{image}:latest@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) # temporary solution for not using the new branch + +def DeployServices(mySSH,svcName): + allServices = [] + if svcName == '': + logging.warning('No service name given: starting all services in ci-docker-compose.yml!') + ret = mySSH.run(f'docker compose -f ci-docker-compose.yml config --services') + allServices = ret.stdout.splitlines() + deployStatus = mySSH.run(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', 50) + return deployStatus.returncode,allServices + +def CopyFailedDeployLog(mySSH,lSourcePath,ymlPath,containerName,filename): + logging.warning(f'Deployment Failed, trying to copy the log from {filename}') + logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[2]}' + os.system(f'mkdir -p {logPath}') + mySSH.run(f'docker logs {containerName} > {lSourcePath}/cmake_targets/log/{filename} 2>&1') + mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', os.path.join(logPath, filename)) # pyshark livecapture launches 2 processes: # * One using dumpcap -i lIfs -w - (ie redirecting the packets to STDOUT) # * One using tshark -i - -w loFile (ie capturing from STDIN from previous process) @@ -884,136 +964,38 @@ class Containerize(): CreateWorkspace(sshSession, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) def DeployObject(self, HTML, EPC): - if self.eNB_serverId[self.eNB_instance] == '0': - lIpAddr = self.eNBIPAddress - lUserName = self.eNBUserName - lPassWord = self.eNBPassword - lSourcePath = self.eNBSourceCodePath - elif self.eNB_serverId[self.eNB_instance] == '1': - lIpAddr = self.eNB1IPAddress - lUserName = self.eNB1UserName - lPassWord = self.eNB1Password - lSourcePath = self.eNB1SourceCodePath - elif self.eNB_serverId[self.eNB_instance] == '2': - lIpAddr = self.eNB2IPAddress - lUserName = self.eNB2UserName - lPassWord = self.eNB2Password - lSourcePath = self.eNB2SourceCodePath + lIpAddr, lUserName, lPassWord, lSourcePath = GetCredentials(self) if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m') self.deployKind[self.eNB_instance] = True - - mySSH = cls_cmd.getConnection(lIpAddr) - - mySSH.cd(lSourcePath + '/' + self.yamlPath[self.eNB_instance]) - mySSH.run('cp docker-compose.y*ml ci-docker-compose.yml', 5) - for image in IMAGES: - imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) - if image == 'oai-gnb' or image == 'oai-nr-ue' or image == 'oai-nr-cuup': - ret = mySSH.run(f'docker image inspect oai-ci/{imageTag}', reportNonZero=False, silent=self.displayedNewTags) - if ret.returncode != 0: - imageTag = imageTag.replace('oai-gnb', 'oai-gnb-asan') - imageTag = imageTag.replace('oai-nr-ue', 'oai-nr-ue-asan') - imageTag = imageTag.replace('oai-nr-cuup', 'oai-nr-cuup-asan') - if not self.displayedNewTags: - logging.debug(f'\u001B[1m Using sanitized version of {image} with {imageTag}\u001B[0m') - mySSH.run(f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) - mySSH.run(f'sed -i -e "s@{image}:latest@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) # temporary solution for not using the new branch - - svcName = self.services[self.eNB_instance] - if svcName == '': - logging.warning('no service name giv en: starting all services in ci-docker-compose.yml!') - ret = mySSH.run(f'docker compose -f {lSourcePath}/{self.yamlPath[self.eNB_instance]}/ci-docker-compose.yml config --services') - if ret.returncode != 0: - HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', "cannot enumerate running services") - self.exitStatus = 1 - return - allServices = ret.stdout.splitlines() - - deployStatus = mySSH.run(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', 50) - if deployStatus.returncode != 0: + mySSH = cls_cmd.getConnection(lIpAddr, f'{lSourcePath}/{self.yamlPath[self.eNB_instance]}') + ReTagImages(mySSH,IMAGES,self.ranCommitID, self.ranBranch, self.ranAllowMerge, self.displayedNewTags) + deployStatus,allServices = DeployServices(mySSH,self.services[self.eNB_instance]) + if deployStatus != 0: mySSH.close() self.exitStatus = 1 logging.error('Could not deploy') HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK) return - # Checking Status - services_list = self.services[self.eNB_instance].split() - if services_list == []: services_list=allServices #handing empty services + services_list = allServices if self.services[self.eNB_instance].split() == [] else self.services[self.eNB_instance].split() + status = True for svcName in services_list: - logging.debug('current service in the service list: \033[4m%s\033[0m', svcName) - mySSH.run(f"docker compose -f docker-compose.yaml config --format json {svcName} | jq -r '.services.\"{svcName}\".container_name'") - result = mySSH.getBefore() - unhealthyNb = 0 - healthyNb = 0 - containerName = '' - usedImage = '' - imageInfo = '' - if result is not None: - containerName = result.group('container_name') - time.sleep(5) - cnt = 0 - while (cnt < 3): - if svcName != 'db_init': - mySSH.run('docker inspect --format="{{.State.Health.Status}}" ' + containerName, 5) - unhealthyNb = mySSH.getBefore().count('unhealthy') - healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb - if healthyNb == 1: - cnt = 10 - else: - time.sleep(10) - cnt += 1 - else: - # faking health of db_init - unhealthyNb = 0 - healthyNb = 1 - break - mySSH.run('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName) - for stdoutLine in mySSH.getBefore().split('\n'): - if stdoutLine.count('ImageUsed: oai-ci'): - usedImage = stdoutLine.replace('ImageUsed: oai-ci', 'oai-ci').strip() - logging.debug('Used image is ' + usedImage) - if usedImage != '': - ret = mySSH.run('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage) - imageInfo = ret.stdout - logging.debug(f' -- for service {svcName} containers: {str(healthyNb)} healthy, {str(healthyNb)} unhealthy') - + containerName = GetContainerName(mySSH, svcName) + healthyNb,unhealthyNb = GetContainerHealth(mySSH,containerName) self.testCase_id = HTML.testCase_id self.eNB_logFile[self.eNB_instance] = f'{svcName}-{self.testCase_id}.log' - - status = False - if healthyNb == 1: - status = True - logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m') - else: - # containers are unhealthy, so we won't start. However, logs are stored at the end - # in UndeployObject so we here store the logs of the unhealthy container to report it - logfilename = f'{lSourcePath}/cmake_targets/log/{self.eNB_logFile[self.eNB_instance]}' - mySSH.run(f'docker logs {containerName} > {logfilename}', 30) - cwd = os.getcwd() - logging.warning(f'Deployment Failed, trying to copy the log from {logfilename} at {cwd}') - mySSH.copyin(logfilename,cwd,True) - + if unhealthyNb: + CopyFailedDeployLog(mySSH,lSourcePath,self.yamlPath[0].split('/'),containerName,self.eNB_logFile[self.eNB_instance]) + status = False + logging.debug(GetImageInfo(mySSH, containerName)) mySSH.close() - - message = '' - if usedImage != '': - message += f'Used Image = {usedImage} :\n' - message += imageInfo - else: - message += 'Could not retrieve used image info!\n' if status: - message += '\nHealthy deployment!\n' - else: - message += '\nUnhealthy deployment! -- Check logs for reason!\n' - if status: - HTML.CreateHtmlTestRowQueue('N/A', 'OK', [message]) + HTML.CreateHtmlTestRowQueue('N/A', '0K', '\nHealthy deployment!\n') else: self.exitStatus = 1 - HTML.CreateHtmlTestRowQueue('N/A', 'KO', [message]) - + HTML.CreateHtmlTestRowQueue('N/A', 'KO', '\nUnhealthy deployment! -- Check logs for reason!\n') def UndeployObject(self, HTML, RAN): if self.eNB_serverId[self.eNB_instance] == '0': @@ -1111,135 +1093,6 @@ class Containerize(): logging.error('\u001B[1m Undeploying OAI Object Failed\u001B[0m') mySSH.close() - def DeployGenObject(self, HTML, RAN, UE): - self.exitStatus = 0 - logging.debug('\u001B[1m Checking Services to deploy\u001B[0m') - # Implicitly we are running locally - myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0]) - self.deployKind[0] = False - cmd = 'docker-compose config --services' - listServices = myCmd.run(cmd) - if listServices.returncode != 0: - myCmd.close() - self.exitStatus = 1 - HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK) - return - for reqSvc in self.services[0].split(' '): - res = re.search(reqSvc, listServices.stdout) - if res is None: - logging.error(reqSvc + ' not found in specified docker-compose') - self.exitStatus = 1 - if (self.exitStatus == 1): - myCmd.close() - HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK) - return - cmd = 'cp docker-compose.y*ml docker-compose-ci.yml' - myCmd.run(cmd, silent=self.displayedNewTags) - imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] - for image in imageNames: - tagToUse = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) - # In the scenario, for 5G images, we have the choice of either pulling normal images - # or -asan images. We need to detect which kind we did pull. - if image == 'oai-gnb' or image == 'oai-nr-ue' or image == 'oai-nr-cuup': - ret = myCmd.run(f'docker image inspect oai-ci/{tagToUse}', reportNonZero=False, silent=self.displayedNewTags) - if ret.returncode != 0: - tagToUse = tagToUse.replace('oai-gnb', 'oai-gnb-asan') - tagToUse = tagToUse.replace('oai-nr-ue', 'oai-nr-ue-asan') - tagToUse = tagToUse.replace('oai-nr-cuup', 'oai-nr-cuup-asan') - if not self.displayedNewTags: - logging.debug(f'\u001B[1m Using sanitized version of {image} with {tagToUse}\u001B[0m') - cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{tagToUse}@" docker-compose-ci.yml' - myCmd.run(cmd, silent=self.displayedNewTags) - self.displayedNewTags = True - - cmd = f'docker-compose -f docker-compose-ci.yml up -d {self.services[0]}' - deployStatus = myCmd.run(cmd, timeout=100) - if deployStatus.returncode != 0: - myCmd.close() - self.exitStatus = 1 - logging.error('Could not deploy') - HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK) - return - - logging.debug('\u001B[1m Checking if all deployed healthy\u001B[0m') - cmd = 'docker-compose -f docker-compose-ci.yml ps -a' - count = 0 - healthy = 0 - restarting = 0 - newContainers = [] - while (count < 10): - count += 1 - containerStatus = [] - deployStatus = myCmd.run(cmd, 30, silent=True) - healthy = 0 - restarting = 0 - for state in deployStatus.stdout.split('\n'): - state = state.strip() - res = re.search('Name|NAME|----------', state) - if res is not None: - continue - if len(state) == 0: - continue - res = re.search('^(?P[a-zA-Z0-9\-\_]+) ', state) - if res is not None: - cName = res.group('container_name') - found = False - for alreadyDeployed in self.deployedContainers: - if cName == alreadyDeployed: - found = True - if not found: - newContainers.append(cName) - self.deployedContainers.append(cName) - if re.search('\(healthy\)', state) is not None: - healthy += 1 - if re.search('rfsim4g-db-init.*Exit 0', state) is not None or re.search('rfsim4g-db-init.*Exited \(0\)', state) is not None: - myCmd.run('docker rm -f rfsim4g-db-init', timeout=30, silent=True, reportNonZero=False) - if re.search('l2sim4g-db-init.*Exit 0', state) is not None or re.search('l2sim4g-db-init.*Exited \(0\)', state) is not None: - myCmd.run('docker rm -f l2sim4g-db-init', timeout=30, silent=True, reportNonZero=False) - if re.search('Restarting', state) is None: - containerStatus.append(state) - else: - restarting += 1 - if healthy == self.nb_healthy[0] and restarting == 0: - count = 100 - else: - time.sleep(10) - - html_cell = '' - for newCont in newContainers: - if newCont == 'rfsim4g-db-init': - continue - cmd = 'docker inspect -f "{{.Config.Image}}" ' + newCont - imageInspect = myCmd.run(cmd, timeout=30, silent=True) - imageName = str(imageInspect.stdout).strip() - cmd = 'docker image inspect --format \'{{.RepoTags}}\t{{.Size}} bytes\t{{index (split .Created ".") 0}}\n{{.Id}}\' ' + imageName - imageInspect = myCmd.run(cmd, 30, silent=True) - html_cell += imageInspect.stdout + '\n' - myCmd.close() - - for cState in containerStatus: - html_cell += cState + '\n' - if count == 100 and healthy == self.nb_healthy[0]: - if self.tsharkStarted == False: - logging.debug('Starting tshark on public network') - self.CaptureOnDockerNetworks() - HTML.CreateHtmlTestRowQueue('n/a', 'OK', [html_cell]) - for cState in containerStatus: - logging.debug(cState) - logging.info('\u001B[1m Deploying OAI Object(s) PASS\u001B[0m') - else: - HTML.CreateHtmlTestRowQueue('Could not deploy in time', 'KO', [html_cell]) - for cState in containerStatus: - logging.debug(cState) - logging.error('\u001B[1m Deploying OAI Object(s) FAILED\u001B[0m') - HTML.testCase_id = 'AUTO-UNDEPLOY' - UE.testCase_id = 'AUTO-UNDEPLOY' - HTML.desc = 'Automatic Undeployment' - UE.desc = 'Automatic Undeployment' - UE.ShowTestID() - self.UndeployGenObject(HTML, RAN, UE) - self.exitStatus = 1 - def CaptureOnDockerNetworks(self): myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0]) cmd = 'docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"' @@ -1268,116 +1121,6 @@ class Containerize(): x.daemon = True x.start() - def UndeployGenObject(self, HTML, RAN, UE): - self.exitStatus = 0 - # Implicitly we are running locally - ymlPath = self.yamlPath[0].split('/') - logPath = '../cmake_targets/log/' + ymlPath[1] - myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0]) - cmd = 'cp docker-compose.y*ml docker-compose-ci.yml' - myCmd.run(cmd) - - # check which containers are running for log recovery later - cmd = 'docker-compose -f docker-compose-ci.yml ps --all' - deployStatusLogs = myCmd.run(cmd, timeout=30) - - # Stop the containers to shut down objects - logging.debug('\u001B[1m Stopping containers \u001B[0m') - cmd = 'docker-compose -f docker-compose-ci.yml stop -t3' - deployStatus = myCmd.run(cmd, timeout=100) - if deployStatus.returncode != 0: - myCmd.close() - self.exitStatus = 1 - logging.error('Could not stop containers') - HTML.CreateHtmlTestRow('Could not stop', 'KO', CONST.ALL_PROCESSES_OK) - logging.error('\u001B[1m Undeploying OAI Object(s) FAILED\u001B[0m') - return - - anyLogs = False - logging.debug('Working dir is now . (ie ci-scripts)') - myCmd2 = cls_cmd.LocalCmd() - myCmd2.run(f'mkdir -p {logPath}') - myCmd2.cd(logPath) - for state in deployStatusLogs.stdout.split('\n'): - res = re.search('Name|NAME|----------', state) - if res is not None: - continue - if len(state) == 0: - continue - res = re.search('^(?P[a-zA-Z0-9\-\_]+) ', state) - if res is not None: - anyLogs = True - cName = res.group('container_name') - cmd = f'docker logs {cName} > {cName}.log 2>&1' - myCmd2.run(cmd, timeout=30, reportNonZero=False) - if re.search('magma-mme', cName) is not None: - cmd = f'docker cp -L {cName}:/var/log/mme.log {cName}-full.log' - myCmd2.run(cmd, timeout=30, reportNonZero=False) - fullStatus = True - if anyLogs: - # Analyzing log file(s)! - listOfPossibleRanContainers = ['enb*', 'gnb*', 'cu*', 'du*'] - for container in listOfPossibleRanContainers: - filenames = './*-oai-' + container + '.log' - cmd = f'ls {filenames}' - lsStatus = myCmd2.run(cmd, silent=True, reportNonZero=False) - if lsStatus.returncode != 0: - continue - filenames = str(lsStatus.stdout).strip() - - for filename in filenames.split('\n'): - logging.debug('\u001B[1m Analyzing xNB logfile ' + filename + ' \u001B[0m') - logStatus = RAN.AnalyzeLogFile_eNB(f'{logPath}/{filename}', HTML, self.ran_checkers) - if (logStatus < 0): - fullStatus = False - self.exitStatus = 1 - HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus) - else: - HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) - - listOfPossibleUeContainers = ['lte-ue*', 'nr-ue*'] - for container in listOfPossibleUeContainers: - filenames = './*-oai-' + container + '.log' - cmd = f'ls {filenames}' - lsStatus = myCmd2.run(cmd, silent=True, reportNonZero=False) - if lsStatus.returncode != 0: - continue - filenames = str(lsStatus.stdout).strip() - - for filename in filenames.split('\n'): - logging.debug(f'\u001B[1m Analyzing UE logfile {filename} \u001B[0m') - logStatus = UE.AnalyzeLogFile_UE(f'{logPath}/{filename}', HTML, RAN) - if (logStatus < 0): - fullStatus = False - self.exitStatus = 1 - HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) - else: - HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) - myCmd2.close() - if self.tsharkStarted: - self.tsharkStarted = StopPySharkCapture(ymlPath[1]) - 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 -v' - deployStatus = myCmd.run(cmd, timeout=100) - if deployStatus.returncode != 0: - myCmd.close() - self.exitStatus = 1 - logging.error('Could not undeploy') - HTML.CreateHtmlTestRow('Could not undeploy', 'KO', CONST.ALL_PROCESSES_OK) - logging.error('\u001B[1m Undeploying OAI Object(s) FAILED\u001B[0m') - return - - self.deployedContainers = [] - myCmd.close() - - if fullStatus: - HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK) - logging.info('\u001B[1m Undeploying OAI Object(s) PASS\u001B[0m') - else: - HTML.CreateHtmlTestRow('n/a', 'KO', CONST.ALL_PROCESSES_OK) - logging.error('\u001B[1m Undeploying OAI Object(s) FAIL\u001B[0m') - def StatsFromGenObject(self, HTML): self.exitStatus = 0 ymlPath = self.yamlPath[0].split('/') From dad8edb448276b990078b4076574ca7b634ad4d0 Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Thu, 18 Jul 2024 12:22:27 +0200 Subject: [PATCH 08/15] Improved UndeployObject cohesion - Introduced additional helper functions: CopyinContainerLog, GetRunningServices, CheckLogs. --- ci-scripts/cls_containerize.py | 138 +++++++++++++-------------------- 1 file changed, 53 insertions(+), 85 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 50b4ae603d..c4651766a7 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -245,12 +245,53 @@ def DeployServices(mySSH,svcName): deployStatus = mySSH.run(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', 50) return deployStatus.returncode,allServices -def CopyFailedDeployLog(mySSH,lSourcePath,ymlPath,containerName,filename): - logging.warning(f'Deployment Failed, trying to copy the log from {filename}') +def CopyinContainerLog(mySSH,lSourcePath,ymlPath,containerName,filename): logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[2]}' os.system(f'mkdir -p {logPath}') mySSH.run(f'docker logs {containerName} > {lSourcePath}/cmake_targets/log/{filename} 2>&1') - mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', os.path.join(logPath, filename)) + copyin_res = mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', os.path.join(logPath, filename)) + return copyin_res + +def GetRunningServices(mySSH,yamlDir): + ret = mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml config --services') + allServices = ret.stdout.splitlines() + services = [] + for s in allServices: + # outputs the hash if the container is running + ret = mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml ps --all --quiet -- {s}') + c = ret.stdout + logging.debug(f'running service {s} with container id {c}') + if ret.stdout != "" and ret.returncode == 0: # something is running for that service + services.append((s, c)) + logging.info(f'stopping services {[s for s, _ in services]}') + return services + +def CheckLogs(self,mySSH,ymlPath,service_name,HTML,RAN): + logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[2]}' + filename = f'{logPath}/{service_name}-{HTML.testCase_id}.log' + isFailed = 0 + if (any(sub in service_name for sub in ['oai_ue','oai-nr-ue','lte_ue'])): + logging.debug(f'\u001B[1m Analyzing UE logfile {filename} \u001B[0m') + logStatus = cls_oaicitest.OaiCiTest().AnalyzeLogFile_UE(filename, HTML, RAN) + if (logStatus < 0): + HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) + isFailed = 1 + else: + HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) + elif service_name == 'nv-cubb': + msg = 'Undeploy PNF/Nvidia CUBB' + HTML.CreateHtmlTestRow(msg, 'OK', CONST.ALL_PROCESSES_OK) + elif (any(sub in service_name for sub in ['enb','rru','rcc','cu','du','gnb'])): + logging.debug(f'\u001B[1m Analyzing XnB logfile {filename}\u001B[0m') + logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers) + if (logStatus < 0): + HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus) + isFailed = 1 + else: + HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) + else: + logging.info(f'Skipping to analyze log for service name {service_name}') + return isFailed # pyshark livecapture launches 2 processes: # * One using dumpcap -i lIfs -w - (ie redirecting the packets to STDOUT) # * One using tshark -i - -w loFile (ie capturing from STDIN from previous process) @@ -987,110 +1028,37 @@ class Containerize(): self.testCase_id = HTML.testCase_id self.eNB_logFile[self.eNB_instance] = f'{svcName}-{self.testCase_id}.log' if unhealthyNb: - CopyFailedDeployLog(mySSH,lSourcePath,self.yamlPath[0].split('/'),containerName,self.eNB_logFile[self.eNB_instance]) + logging.warning(f"Deployment Failed: Trying to copy container logs {self.eNB_logFile[self.eNB_instance]}") + CopyinContainerLog(mySSH,lSourcePath,self.yamlPath[0].split('/'),containerName,self.eNB_logFile[self.eNB_instance]) status = False logging.debug(GetImageInfo(mySSH, containerName)) mySSH.close() if status: - HTML.CreateHtmlTestRowQueue('N/A', '0K', '\nHealthy deployment!\n') + HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['Healthy deployment!']) else: self.exitStatus = 1 - HTML.CreateHtmlTestRowQueue('N/A', 'KO', '\nUnhealthy deployment! -- Check logs for reason!\n') + HTML.CreateHtmlTestRowQueue('N/A', 'KO', ['Unhealthy deployment! -- Check logs for reason!']) def UndeployObject(self, HTML, RAN): - if self.eNB_serverId[self.eNB_instance] == '0': - lIpAddr = self.eNBIPAddress - lUserName = self.eNBUserName - lPassWord = self.eNBPassword - lSourcePath = self.eNBSourceCodePath - elif self.eNB_serverId[self.eNB_instance] == '1': - lIpAddr = self.eNB1IPAddress - lUserName = self.eNB1UserName - lPassWord = self.eNB1Password - lSourcePath = self.eNB1SourceCodePath - elif self.eNB_serverId[self.eNB_instance] == '2': - lIpAddr = self.eNB2IPAddress - lUserName = self.eNB2UserName - lPassWord = self.eNB2Password - lSourcePath = self.eNB2SourceCodePath + lIpAddr, lUserName, lPassWord, lSourcePath = GetCredentials(self) if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') logging.debug(f'\u001B[1m Undeploying OAI Object from server: {lIpAddr}\u001B[0m') mySSH = cls_cmd.getConnection(lIpAddr) yamlDir = f'{lSourcePath}/{self.yamlPath[self.eNB_instance]}' - svcName = self.services[self.eNB_instance] - forceDown = False - if svcName != '': - logging.warning(f'service name given, but will stop all services in ci-docker-compose.yml!') - svcName = '' - - ret = mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml config --services') - if ret.returncode != 0: - HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', "cannot enumerate running services") - self.exitStatus = 1 - return - # first line has command, last line has next command prompt - allServices = ret.stdout.splitlines() - services = [] - for s in allServices: - # outputs the hash if the container is running - ret = mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml ps --all --quiet -- {s}') - c = ret.stdout - logging.debug(f'running service {s} with container id {c}') - if ret.stdout != "" and ret.returncode == 0: # something is running for that service - services.append((s, c)) - logging.info(f'stopping services {[s for s, _ in services]}') - + services = GetRunningServices(mySSH, yamlDir) mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml stop -t3') - cwd = os.getcwd() copyin_res = True - ymlPath = self.yamlPath[0].split('/') - logPath = f'{cwd}/../cmake_targets/log/{ymlPath[2]}' - # Creating destination log folder if needed on the python executor workspace - os.system(f'mkdir -p {logPath}') - for service_name, container_id in services: - # head -n -1 suppresses the final "X exited with status code Y" - filename = f'{service_name}-{HTML.testCase_id}.log' - mySSH.run(f'docker logs {container_id} > {lSourcePath}/cmake_targets/log/{filename} 2>&1') - copyin_res = mySSH.copyin(f'{lSourcePath}/cmake_targets/log/{filename}', os.path.join(logPath, filename)) and copyin_res - + copyin_res = all(CopyinContainerLog(mySSH, lSourcePath, self.yamlPath[0].split('/'), container_id, f'{service_name}-{HTML.testCase_id}.log') for service_name, container_id in services) mySSH.run(f'docker compose -f {yamlDir}/ci-docker-compose.yml down -v') - - # Analyzing log file! if not copyin_res: HTML.htmleNBFailureMsg='Could not copy logfile(s) to analyze it!' HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE) self.exitStatus = 1 else: - for service_name, _ in services: - self.exitStatus == 0 - filename = f'{logPath}/{service_name}-{HTML.testCase_id}.log' - if (any(sub in service_name for sub in ['oai_ue','oai-nr-ue','lte_ue'])): - logging.debug(f'\u001B[1m Analyzing UE logfile {filename} \u001B[0m') - logStatus = cls_oaicitest.OaiCiTest().AnalyzeLogFile_UE(filename, HTML, RAN) - if (logStatus < 0): - HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) - self.exitStatus = 1 - else: - HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) - elif (any(sub in service_name for sub in ['enb','rru','rcc','cu','du','gnb'])): - logging.debug(f'\u001B[1m Analyzing XnB logfile {filename}\u001B[0m') - logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers) - if (logStatus < 0): - HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus) - self.exitStatus = 1 - else: - HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) - elif service_name == 'nv-cubb': - msg = 'Undeploy PNF/Nvidia CUBB' - HTML.CreateHtmlTestRow(msg, 'OK', CONST.ALL_PROCESSES_OK) - else: - logging.info(f'Skipping to analyze log for service name {service_name}') - if self.exitStatus == 0: - logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m') - else: - logging.error('\u001B[1m Undeploying OAI Object Failed\u001B[0m') + self.exitStatus = 1 if any(CheckLogs(self, mySSH, self.yamlPath[0].split('/'), service_name, HTML, RAN) for service_name, _ in services) else 0 + logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m') if self.exitStatus == 0 else logging.error('\u001B[1m Undeploying OAI Object Failed\u001B[0m') mySSH.close() def CaptureOnDockerNetworks(self): From 9890896b9c86ba4e3a2d433d259223f1fd222a31 Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Wed, 7 Aug 2024 11:37:09 +0200 Subject: [PATCH 09/15] patch for Iperf2_Unidir ci_infra %currenthost% --- ci-scripts/cls_oaicitest.py | 4 ++-- ci-scripts/main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 3d65a37c53..4498de2f5f 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -881,8 +881,8 @@ class OaiCiTest(): def Iperf2_Unidir(self,HTML,RAN,EPC,CONTAINERS): if self.ue_ids == [] or self.svr_id == None or len(self.ue_ids) != 1: raise Exception("no module names in self.ue_ids or/and self.svr_id provided, multi UE scenario not supported") - ue = cls_module.Module_UE(self.ue_ids[0].strip()) - svr = cls_module.Module_UE(self.svr_id) + ue = cls_module.Module_UE(self.ue_ids[0].strip(),self.nodes[0].strip()) + svr = cls_module.Module_UE(self.svr_id,self.svr_node) ueIP = ue.getIP() if not ueIP: return (False, f"UE {ue.getName()} has no IP address") diff --git a/ci-scripts/main.py b/ci-scripts/main.py index c1ac4f9ef7..6e0c2f66a5 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -269,7 +269,7 @@ def GetParametersFromXML(action): CiTestObj.nodes = test.findtext('nodes').split(' ') ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or '' - elif action == 'Iperf': + elif action == 'Iperf' or action == 'Iperf2_Unidir': CiTestObj.iperf_args = test.findtext('iperf_args') CiTestObj.ue_ids = test.findtext('id').split(' ') CiTestObj.svr_id = test.findtext('svr_id') or None From 3afbf8e39aa6ce9ee29254857c89d76d115daacc Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Wed, 21 Aug 2024 11:35:38 +0200 Subject: [PATCH 10/15] Patch to resolve MR comments --- ci-scripts/cls_containerize.py | 10 +++-- ci-scripts/main.py | 38 +++++-------------- ...container_lte_b200_fdd_05Mhz_tm1_if4_5.xml | 7 ---- ...container_lte_b200_tdd_05Mhz_tm1_if4_5.xml | 7 ---- .../xml_files/container_sa_aerial_quectel.xml | 7 ---- .../container_sa_e1_b200_quectel.xml | 12 ------ .../container_sa_f1_b200_quectel.xml | 7 ---- .../xml_files/container_sa_fhi72_vvdn_up2.xml | 8 +++- 8 files changed, 23 insertions(+), 73 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index c4651766a7..abaf9044c1 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -234,7 +234,6 @@ def ReTagImages(mySSH,IMAGES,ranCommitID,ranBranch,ranAllowMerge,displayedNewTag if not displayedNewTags: logging.debug(f'\u001B[1m Using sanitized version of {image} with {imageTag}\u001B[0m') mySSH.run(f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) - mySSH.run(f'sed -i -e "s@{image}:latest@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) # temporary solution for not using the new branch def DeployServices(mySSH,svcName): allServices = [] @@ -979,7 +978,7 @@ class Containerize(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) return True - def Create_Workspace(self): + def Create_Workspace(self,HTML): if self.eNB_serverId[self.eNB_instance] == '0': lIpAddr = self.eNBIPAddress lUserName = self.eNBUserName @@ -1003,6 +1002,7 @@ class Containerize(): sshSession = cls_cmd.getConnection(lIpAddr) CreateWorkspace(sshSession, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) + HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) def DeployObject(self, HTML, EPC): lIpAddr, lUserName, lPassWord, lSourcePath = GetCredentials(self) @@ -1012,6 +1012,7 @@ class Containerize(): logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m') self.deployKind[self.eNB_instance] = True mySSH = cls_cmd.getConnection(lIpAddr, f'{lSourcePath}/{self.yamlPath[self.eNB_instance]}') + logging.info(f'Current working directory: {lSourcePath}/{self.yamlPath[self.eNB_instance]}') ReTagImages(mySSH,IMAGES,self.ranCommitID, self.ranBranch, self.ranAllowMerge, self.displayedNewTags) deployStatus,allServices = DeployServices(mySSH,self.services[self.eNB_instance]) if deployStatus != 0: @@ -1031,7 +1032,7 @@ class Containerize(): logging.warning(f"Deployment Failed: Trying to copy container logs {self.eNB_logFile[self.eNB_instance]}") CopyinContainerLog(mySSH,lSourcePath,self.yamlPath[0].split('/'),containerName,self.eNB_logFile[self.eNB_instance]) status = False - logging.debug(GetImageInfo(mySSH, containerName)) + HTML.CreateHtmlTestRowQueue('N/A', 'OK', [(GetImageInfo(mySSH, containerName))]) mySSH.close() if status: HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['Healthy deployment!']) @@ -1057,7 +1058,8 @@ class Containerize(): HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE) self.exitStatus = 1 else: - self.exitStatus = 1 if any(CheckLogs(self, mySSH, self.yamlPath[0].split('/'), service_name, HTML, RAN) for service_name, _ in services) else 0 + log_results = [CheckLogs(self, mySSH, self.yamlPath[0].split('/'), service_name, HTML, RAN) for service_name, _ in services] + self.exitStatus = 1 if any(log_results) else 0 logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m') if self.exitStatus == 0 else logging.error('\u001B[1m Undeploying OAI Object Failed\u001B[0m') mySSH.close() diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 6e0c2f66a5..8d7ae9b9b4 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -219,6 +219,9 @@ def GetParametersFromXML(action): CiTestObj.ue_ids = test.findtext('id').split(' ') if test.findtext('nodes'): CiTestObj.nodes = test.findtext('nodes').split(' ') + if len(CiTestObj.ue_ids) != len(CiTestObj.nodes): + logging.error('Number of Nodes are not equal to the total number of UEs') + sys.exit("Mismatch in number of Nodes and UIs") elif action == 'Build_OAI_UE': CiTestObj.Build_OAI_UE_args = test.findtext('Build_OAI_UE_args') @@ -267,6 +270,9 @@ def GetParametersFromXML(action): CiTestObj.ue_ids = test.findtext('id').split(' ') if test.findtext('nodes'): CiTestObj.nodes = test.findtext('nodes').split(' ') + if len(CiTestObj.ue_ids) != len(CiTestObj.nodes): + logging.error('Number of Nodes are not equal to the total number of UEs') + sys.exit("Mismatch in number of Nodes and UIs") ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or '' elif action == 'Iperf' or action == 'Iperf2_Unidir': @@ -275,6 +281,9 @@ def GetParametersFromXML(action): CiTestObj.svr_id = test.findtext('svr_id') or None if test.findtext('nodes'): CiTestObj.nodes = test.findtext('nodes').split(' ') + if len(CiTestObj.ue_ids) != len(CiTestObj.nodes): + logging.error('Number of Nodes are not equal to the total number of UEs') + sys.exit("Mismatch in number of Nodes and UIs") if test.findtext('svr_node'): CiTestObj.svr_node = test.findtext('svr_node') CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold') @@ -377,23 +386,6 @@ def GetParametersFromXML(action): if string_field is not None: CONTAINERS.services[CONTAINERS.eNB_instance] = string_field - elif action == 'DeployGenObject' or action == 'UndeployGenObject' or action == 'StatsFromGenObject': - string_field=test.findtext('yaml_path') - if (string_field is not None): - CONTAINERS.yamlPath[0] = string_field - string_field=test.findtext('services') - if (string_field is not None): - CONTAINERS.services[0] = string_field - string_field=test.findtext('nb_healthy') - if (string_field is not None): - CONTAINERS.nb_healthy[0] = int(string_field) - string_field=test.findtext('d_retx_th') - if (string_field is not None): - CONTAINERS.ran_checkers['d_retx_th'] = [float(x) for x in string_field.split(',')] - string_field=test.findtext('u_retx_th') - if (string_field is not None): - CONTAINERS.ran_checkers['u_retx_th'] = [float(x) for x in string_field.split(',')] - elif action == 'Run_CUDATest' or action == 'Run_NRulsimTest' or action == 'Run_T2Test': ldpc.runargs = test.findtext('physim_run_args') ldpc.runsim = test.findtext('physim_run') @@ -865,7 +857,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re if not success: RAN.prematureExit = True elif action == 'Create_Workspace': - CONTAINERS.Create_Workspace() + CONTAINERS.Create_Workspace(HTML) elif action == 'Deploy_Object': CONTAINERS.DeployObject(HTML, EPC) if CONTAINERS.exitStatus==1: @@ -884,20 +876,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re RAN.prematureExit = True elif action == 'Deploy_Run_PhySim': PHYSIM.Deploy_PhySim(HTML, RAN) - elif action == 'DeployGenObject': - CONTAINERS.DeployGenObject(HTML, RAN, CiTestObj) - if CONTAINERS.exitStatus==1: - RAN.prematureExit = True - elif action == 'UndeployGenObject': - CONTAINERS.UndeployGenObject(HTML, RAN, CiTestObj) - if CONTAINERS.exitStatus==1: - RAN.prematureExit = True elif action == 'IperfFromContainer': CONTAINERS.IperfFromContainer(HTML, RAN, CiTestObj) if CONTAINERS.exitStatus==1: RAN.prematureExit = True - elif action == 'StatsFromGenObject': - CONTAINERS.StatsFromGenObject(HTML) elif action == 'Push_Images_To_Test_Servers': logging.debug('To be implemented') else: diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml index e40cc6f80a..adfe8860d6 100644 --- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml @@ -31,7 +31,6 @@ 040101 800813 030131 -800814 030132 040301 040531 040633 040634 040636 040671 040672 040673 040401 040201 030231 @@ -78,12 +77,6 @@ 0 0 - - Create_Workspace - Creating new Workspace for server 0 - 0 - 0 - Deploy_Object Deploy RCC (FDD/Band7/5MHz) in a container diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml index 8d67c23efd..e7ede0ff49 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml @@ -30,7 +30,6 @@ 111110 800813 030134 -800814 030135 040301 040532 040631 040632 040634 040635 040681 040682 040684 040685 040401 040201 030231 @@ -79,12 +78,6 @@ 0 0 - - Create_Workspace - Creating new Workspace for server 0 - 0 - 0 - Deploy_Object Deploy RCC (TDD/Band40/5MHz) in a container diff --git a/ci-scripts/xml_files/container_sa_aerial_quectel.xml b/ci-scripts/xml_files/container_sa_aerial_quectel.xml index 49f09ed669..7d7e992c12 100644 --- a/ci-scripts/xml_files/container_sa_aerial_quectel.xml +++ b/ci-scripts/xml_files/container_sa_aerial_quectel.xml @@ -31,7 +31,6 @@ 001111 800813 002222 - 800814 002223 000111 100000 @@ -70,12 +69,6 @@ 0 0 - - Create_Workspace - Creating new Workspace for server 0 - 0 - 0 - Deploy_Object Deploy VNF in a container diff --git a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml index 96067b5592..a2b7ab425e 100644 --- a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml @@ -94,12 +94,6 @@ 0 gnb_cucp - - Create_Workspace - Creating new Workspace - 0 - 0 - Deploy_Object Deploy gNB-CU-UP in a container @@ -108,12 +102,6 @@ 0 gnb_cuup - - Create_Workspace - Creating new Workspace - 0 - 0 - Deploy_Object Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml index 2c5ae10dba..821367cd3f 100644 --- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml @@ -30,7 +30,6 @@ 110002 800813 130101 - 800814 130102 100001 110000 @@ -95,12 +94,6 @@ 0 gnb_cu - - Create_Workspace - Creating new Workspace - 0 - 0 - Deploy_Object Deploy gNB-DU (FDD/Band1/10MHz/B200) in a container diff --git a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml index bac2ec38a0..6839be5e2d 100644 --- a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml +++ b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml @@ -28,6 +28,7 @@ 200000 110000 + 800813 120000 102000 102001 @@ -56,7 +57,12 @@ oaicicd-ran oai-gnb-fhi72 - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Deploy_Object Deploy gNB (TDD/Band78/100MHz/VVDN) in a container From 6053e2268462d92e40e47fdc0cbbc4f63244d804 Mon Sep 17 00:00:00 2001 From: Bipin Date: Thu, 22 Aug 2024 13:52:59 +0200 Subject: [PATCH 11/15] xml tab formatting cleanup --- ci-scripts/xml_files/cluster_image_build.xml | 8 ++++---- ci-scripts/xml_files/container_image_build.xml | 12 ++++++------ .../xml_files/container_image_build_cross.xml | 12 ++++++------ .../container_lte_b200_tdd_05Mhz_tm1.xml | 8 ++++---- .../container_lte_b200_tdd_05Mhz_tm1_if4_5.xml | 8 ++++---- .../xml_files/container_lte_n3xx_tdd_2x2_tm1.xml | 8 ++++---- .../xml_files/container_lte_n3xx_tdd_2x2_tm2.xml | 8 ++++---- .../xml_files/container_nsa_b200_quectel.xml | 2 +- ci-scripts/xml_files/container_sa_aw2s_asue.xml | 8 ++++---- .../xml_files/container_sa_b200_quectel.xml | 8 ++++---- .../xml_files/container_sa_e1_b200_quectel.xml | 8 ++++---- .../xml_files/container_sa_f1_b200_quectel.xml | 8 ++++---- .../xml_files/container_sa_fhi72_vvdn_up2.xml | 8 ++++---- .../container_sa_n310_2X2_100MHz_quectel.xml | 8 ++++---- .../container_sa_n310_2X2_60MHz_quectel.xml | 10 +++++----- ci-scripts/xml_files/container_sa_n310_nrue.xml | 16 ++++++++-------- .../xml_files/container_sa_sc_b200_quectel.xml | 8 ++++---- 17 files changed, 74 insertions(+), 74 deletions(-) diff --git a/ci-scripts/xml_files/cluster_image_build.xml b/ci-scripts/xml_files/cluster_image_build.xml index 769320e9d4..b389fa7e21 100644 --- a/ci-scripts/xml_files/cluster_image_build.xml +++ b/ci-scripts/xml_files/cluster_image_build.xml @@ -29,10 +29,10 @@ 000001 - - Create_Workspace - Creating new Workspace - + + Create_Workspace + Creating new Workspace + Build_Cluster_Image Build Images on OpenShift Cluster diff --git a/ci-scripts/xml_files/container_image_build.xml b/ci-scripts/xml_files/container_image_build.xml index 7ee075544f..cde7c7ce60 100644 --- a/ci-scripts/xml_files/container_image_build.xml +++ b/ci-scripts/xml_files/container_image_build.xml @@ -31,12 +31,12 @@ - - Create_Workspace - Creating new Workspace for server 0 - 0 - 0 - + + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 + Build_Image Build all Images diff --git a/ci-scripts/xml_files/container_image_build_cross.xml b/ci-scripts/xml_files/container_image_build_cross.xml index 9fc2ab68b3..c8bc67e51f 100644 --- a/ci-scripts/xml_files/container_image_build_cross.xml +++ b/ci-scripts/xml_files/container_image_build_cross.xml @@ -29,12 +29,12 @@ 000001 - - Create_Workspace - Creating new Workspace - 0 - 0 - + + Create_Workspace + Creating new Workspace + 0 + 0 + Build_Image Cross-Compile for ARM64 diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml index 0cd2d8335a..a512156ff5 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml @@ -60,10 +60,10 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml - Custom_Command - Reset USRP - starsky - sudo -S b2xx_fx3_utils --reset-device + Custom_Command + Reset USRP + starsky + sudo -S b2xx_fx3_utils --reset-device Create_Workspace diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml index e7ede0ff49..827675f3fb 100644 --- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml +++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml @@ -59,10 +59,10 @@ - Custom_Command - Reset USRP - starsky - sudo -S b2xx_fx3_utils --reset-device + Custom_Command + Reset USRP + starsky + sudo -S b2xx_fx3_utils --reset-device Create_Workspace diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml index eccb2ce64d..e7f7549a46 100644 --- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml +++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml @@ -66,10 +66,10 @@ sudo cpupower idle-set -E - Create_Workspace - Creating new Workspace - 0 - 0 + Create_Workspace + Creating new Workspace + 0 + 0 Deploy_Object diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml index b9b86cb297..3792b673d5 100644 --- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml +++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml @@ -66,10 +66,10 @@ sudo cpupower idle-set -E - Create_Workspace - Creating new Workspace - 0 - 0 + Create_Workspace + Creating new Workspace + 0 + 0 Deploy_Object diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml index 1336b3c74d..037ca1dc8c 100644 --- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml @@ -113,7 +113,7 @@ Attach_UE Attach UE idefix - + Detach_UE Detach UE diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue.xml b/ci-scripts/xml_files/container_sa_aw2s_asue.xml index b77645385e..0f96abaee8 100644 --- a/ci-scripts/xml_files/container_sa_aw2s_asue.xml +++ b/ci-scripts/xml_files/container_sa_aw2s_asue.xml @@ -67,10 +67,10 @@ oai-gnb-aw2s - Create_Workspace - Creating new Workspace - 0 - 0 + Create_Workspace + Creating new Workspace + 0 + 0 Deploy_Object diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index dfa38c90a7..4b6575df5f 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -97,10 +97,10 @@ idefix - Create_Workspace - Creating new Workspace for server 0 - 0 - 0 + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 Deploy_Object diff --git a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml index a2b7ab425e..963ab9981f 100644 --- a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml @@ -81,10 +81,10 @@ idefix - Create_Workspace - Creating new Workspace - 0 - 0 + Create_Workspace + Creating new Workspace + 0 + 0 Deploy_Object diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml index 821367cd3f..5f4a09dd83 100644 --- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml @@ -81,10 +81,10 @@ idefix - Create_Workspace - Creating new Workspace - 0 - 0 + Create_Workspace + Creating new Workspace + 0 + 0 Deploy_Object diff --git a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml index 6839be5e2d..2b3b02fb2b 100644 --- a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml +++ b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml @@ -58,10 +58,10 @@ oai-gnb-fhi72 - Create_Workspace - Creating new Workspace for server 0 - 0 - 0 + Create_Workspace + Creating new Workspace for server 0 + 0 + 0 Deploy_Object diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml index 9a6ce659de..643f0a0ab0 100644 --- a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml +++ b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml @@ -76,10 +76,10 @@ up2 - Create_Workspace - Creating new Workspace - 0 - 0 + Create_Workspace + Creating new Workspace + 0 + 0 Deploy_Object diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml index 9d6dcec899..c5b12e7ac3 100644 --- a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml +++ b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml @@ -82,11 +82,11 @@ 0 - Deploy_Object - Deploy gNB (TDD/Band77/60MHz/N310) in a container - ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz - 0 - 0 + Deploy_Object + Deploy gNB (TDD/Band77/60MHz/N310) in a container + ci-scripts/yaml_files/5g_sa_n310_2x2_60MHz + 0 + 0 diff --git a/ci-scripts/xml_files/container_sa_n310_nrue.xml b/ci-scripts/xml_files/container_sa_n310_nrue.xml index a414dc1143..92be5590b3 100644 --- a/ci-scripts/xml_files/container_sa_n310_nrue.xml +++ b/ci-scripts/xml_files/container_sa_n310_nrue.xml @@ -68,10 +68,10 @@ ssh root@192.168.20.2 reboot ; sleep 45 - Create_Workspace - Creating new Workspace - 0 - 0 + Create_Workspace + Creating new Workspace + 0 + 0 Deploy_Object @@ -81,10 +81,10 @@ 0 - Create_Workspace - Creating new Workspace - 1 - 1 + Create_Workspace + Creating new Workspace + 1 + 1 Deploy_Object diff --git a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml index a08e938268..fd59e20574 100644 --- a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml @@ -91,10 +91,10 @@ idefix - Create_Workspace - Creating new Workspace - 0 - 0 + Create_Workspace + Creating new Workspace + 0 + 0 Deploy_Object From db1f2649ee79555ba42054bd54623bb34b518b44 Mon Sep 17 00:00:00 2001 From: Bipin Date: Thu, 22 Aug 2024 17:15:50 +0200 Subject: [PATCH 12/15] Used Image Info in HTML --- ci-scripts/cls_containerize.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index abaf9044c1..9d3032fe69 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -189,16 +189,15 @@ def GetContainerName(mySSH, svcName): def GetImageInfo(mySSH, containerName): usedImage = '' - ret = mySSH.run('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName) - if ret.stdout.count('ImageUsed: oai-ci'): - usedImage = ret.stdout.replace('ImageUsed: oai-ci', 'oai-ci').strip() - logging.debug('Used image is ' + usedImage) - if usedImage != '': + ret = mySSH.run('docker inspect --format="{{.Config.Image}}" ' + containerName) + usedImage = ret.stdout.strip() + logging.debug('Used image is: ' + usedImage) + if usedImage: ret = mySSH.run('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage) - imageInfo = f"Used image is {usedImage}\n{ret.stdout}" + imageInfo = f"Used image is {usedImage}\n{ret.stdout}\n" return imageInfo else: - return "Could not retrieve used image info!\n" + return f"Could not retrieve used image info for {containerName}!\n" def GetContainerHealth(mySSH, containerName): if containerName is None: @@ -1023,6 +1022,7 @@ class Containerize(): return services_list = allServices if self.services[self.eNB_instance].split() == [] else self.services[self.eNB_instance].split() status = True + imagesInfo="" for svcName in services_list: containerName = GetContainerName(mySSH, svcName) healthyNb,unhealthyNb = GetContainerHealth(mySSH,containerName) @@ -1032,8 +1032,9 @@ class Containerize(): logging.warning(f"Deployment Failed: Trying to copy container logs {self.eNB_logFile[self.eNB_instance]}") CopyinContainerLog(mySSH,lSourcePath,self.yamlPath[0].split('/'),containerName,self.eNB_logFile[self.eNB_instance]) status = False - HTML.CreateHtmlTestRowQueue('N/A', 'OK', [(GetImageInfo(mySSH, containerName))]) + imagesInfo += (GetImageInfo(mySSH, containerName)) mySSH.close() + HTML.CreateHtmlTestRowQueue('N/A', 'OK', [(imagesInfo)]) if status: HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['Healthy deployment!']) else: From f3033533bb7aef61113e347cc969ba097255cfa9 Mon Sep 17 00:00:00 2001 From: Bipin Date: Fri, 23 Aug 2024 11:19:31 +0200 Subject: [PATCH 13/15] moving module id and node checks to parameter checks --- ci-scripts/cls_oaicitest.py | 20 ++++---------------- ci-scripts/main.py | 6 ++++++ 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 4498de2f5f..2a23f43dd7 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -608,10 +608,7 @@ class OaiCiTest(): self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS) def AttachUE(self, HTML, RAN, EPC, CONTAINERS): - if len(self.ue_ids) == len(self.nodes): - ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] - else: - ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] + ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] with concurrent.futures.ThreadPoolExecutor() as executor: futures = [executor.submit(ue.attach) for ue in ues] attached = [f.result() for f in futures] @@ -626,10 +623,7 @@ class OaiCiTest(): self.AutoTerminateUEandeNB(HTML, RAN, EPC, CONTAINERS) def DetachUE(self, HTML): - if len(self.ue_ids) == len(self.nodes): - ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] - else: - ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] + ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] with concurrent.futures.ThreadPoolExecutor() as executor: futures = [executor.submit(ue.detach) for ue in ues] [f.result() for f in futures] @@ -769,10 +763,7 @@ class OaiCiTest(): if self.ue_ids == []: raise Exception("no module names in self.ue_ids provided") - if len(self.ue_ids) == len(self.nodes): - ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] - else: - ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] + ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] logging.debug(ues) pingLock = Lock() with concurrent.futures.ThreadPoolExecutor() as executor: @@ -861,10 +852,7 @@ class OaiCiTest(): if self.ue_ids == [] or self.svr_id == None: raise Exception("no module names in self.ue_ids or/and self.svr_id provided") - if len(self.ue_ids) == len(self.nodes): - ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] - else: - ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids] + ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] svr = cls_module.Module_UE(self.svr_id,self.svr_node) logging.debug(ues) with concurrent.futures.ThreadPoolExecutor() as executor: diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 8d7ae9b9b4..532a5f564d 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -222,6 +222,8 @@ def GetParametersFromXML(action): if len(CiTestObj.ue_ids) != len(CiTestObj.nodes): logging.error('Number of Nodes are not equal to the total number of UEs') sys.exit("Mismatch in number of Nodes and UIs") + else: + CiTestObj.nodes = [None] * len(CiTestObj.ue_ids) elif action == 'Build_OAI_UE': CiTestObj.Build_OAI_UE_args = test.findtext('Build_OAI_UE_args') @@ -273,6 +275,8 @@ def GetParametersFromXML(action): if len(CiTestObj.ue_ids) != len(CiTestObj.nodes): logging.error('Number of Nodes are not equal to the total number of UEs') sys.exit("Mismatch in number of Nodes and UIs") + else: + CiTestObj.nodes = [None] * len(CiTestObj.ue_ids) ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or '' elif action == 'Iperf' or action == 'Iperf2_Unidir': @@ -284,6 +288,8 @@ def GetParametersFromXML(action): if len(CiTestObj.ue_ids) != len(CiTestObj.nodes): logging.error('Number of Nodes are not equal to the total number of UEs') sys.exit("Mismatch in number of Nodes and UIs") + else: + CiTestObj.nodes = [None] * len(CiTestObj.ue_ids) if test.findtext('svr_node'): CiTestObj.svr_node = test.findtext('svr_node') CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold') From e42b2c038901b6003605174561cadff8753a4e0a Mon Sep 17 00:00:00 2001 From: Bipin Adhikari Date: Thu, 29 Aug 2024 12:43:39 +0200 Subject: [PATCH 14/15] xml changes for NTN GEO and SIDELINK tests --- .../xml_files/container_5g_rfsim_ntn_geo.xml | 30 ++++++++++++++----- .../container_5g_rfsim_ntn_geo_down.xml | 6 ++-- .../xml_files/container_5g_rfsim_sidelink.xml | 30 +++++++++++++------ .../container_5g_rfsim_sidelink_down.xml | 6 ++-- 4 files changed, 51 insertions(+), 21 deletions(-) diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml index 3e34d0eeed..0b72888889 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml @@ -28,6 +28,7 @@ 111111 100001 + 800813 000001 000002 000003 @@ -44,32 +45,42 @@ oai-gnb-asan oai-nr-ue-asan + + Create_Workspace + Creating new Workspace + 0 + 0 + - DeployGenObject + Deploy_Object Deploy OAI 5G CoreNetwork - yaml_files/5g_rfsimulator_ntn_geo + ci-scripts/yaml_files/5g_rfsimulator_ntn_geo mysql oai-amf oai-smf oai-upf oai-ext-dn - 5 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G gNB+nrUE RF sim SA - yaml_files/5g_rfsimulator_ntn_geo + ci-scripts/yaml_files/5g_rfsimulator_ntn_geo oai-gnb oai-nr-ue - 7 + 0 + 0 Attach_UE Attach OAI UE (Wait for IP) rfsim5g_ue + cacofonix Ping Ping ext-dn from NR-UE rfsim5g_ue + cacofonix -c 20 -i 0.25 192.168.72.135 5 @@ -78,14 +89,17 @@ Ping Ping NR-UE from ext-dn rfsim5g_ext_dn + cacofonix -c 20 -i 0.25 12.1.1.2 5 - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_ntn_geo + ci-scripts/yaml_files/5g_rfsimulator_ntn_geo + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo_down.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo_down.xml index 53fa83806a..48b4a67fb2 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_ntn_geo + ci-scripts/yaml_files/5g_rfsimulator_ntn_geo + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml index 3346ace418..daa1152722 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml @@ -27,6 +27,7 @@ 1 111111 + 800813 000002 000003 000004 @@ -42,20 +43,29 @@ oai-nr-ue-asan + + Create_Workspace + Creating new Workspace + 0 + 0 + + - DeployGenObject + Deploy_Object Deploy OAI 5G UE 1 - yaml_files/5g_rfsimulator_sidelink + ci-scripts/yaml_files/5g_rfsimulator_sidelink oai-nr-ue-1 - 1 + 0 + 0 - DeployGenObject + Deploy_Object Deploy OAI 5G UE 2 - yaml_files/5g_rfsimulator_sidelink + ci-scripts/yaml_files/5g_rfsimulator_sidelink oai-nr-ue-2 - 1 + 0 + 0 @@ -67,17 +77,19 @@ Custom_Command Check that UE synched - localhost + cacofonix docker logs rfsim5g-oai-nr-ue-2 | grep -m 1 "PSBCH RX:OK" yes - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_sidelink + ci-scripts/yaml_files/5g_rfsimulator_sidelink 1,0,0,0 1,0,0,0 + 0 + 0 diff --git a/ci-scripts/xml_files/container_5g_rfsim_sidelink_down.xml b/ci-scripts/xml_files/container_5g_rfsim_sidelink_down.xml index 46661e3dc4..6608ebc572 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_sidelink_down.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_sidelink_down.xml @@ -31,9 +31,11 @@ - UndeployGenObject + Undeploy_Object Undeploy all OAI 5G stack - yaml_files/5g_rfsimulator_sidelink + ci-scripts/yaml_files/5g_rfsimulator_sidelink + 0 + 0 From 3393ca948bf07c91372a42bcd91e31cfb13f6a72 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 4 Sep 2024 15:58:20 +0200 Subject: [PATCH 15/15] chore(ci): concatenating deploy message into a single row Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 9d3032fe69..b4acdad5ad 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -1034,12 +1034,14 @@ class Containerize(): status = False imagesInfo += (GetImageInfo(mySSH, containerName)) mySSH.close() - HTML.CreateHtmlTestRowQueue('N/A', 'OK', [(imagesInfo)]) + imagesInfo += ("\n") if status: - HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['Healthy deployment!']) + imagesInfo += ("Healthy deployment!") + HTML.CreateHtmlTestRowQueue('N/A', 'OK', [(imagesInfo)]) else: self.exitStatus = 1 - HTML.CreateHtmlTestRowQueue('N/A', 'KO', ['Unhealthy deployment! -- Check logs for reason!']) + imagesInfo += ("Unhealthy deployment! -- Check logs for reason!") + HTML.CreateHtmlTestRowQueue('N/A', 'KO', [(imagesInfo)]) def UndeployObject(self, HTML, RAN): lIpAddr, lUserName, lPassWord, lSourcePath = GetCredentials(self)