Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
62efab72
Commit
62efab72
authored
Apr 17, 2023
by
Jaroslava Fiedlerova
Committed by
Robert Schmidt
Apr 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI EPC module: fix of CN log collection
parent
8a9346dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ci-scripts/epc.py
ci-scripts/epc.py
+8
-8
No files found.
ci-scripts/epc.py
View file @
62efab72
...
...
@@ -306,14 +306,13 @@ class EPCManagement():
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
OC_LOGIN_FAIL
)
return
False
for
ii
in
imageNames
:
mySSH
.
run
(
f'helm uninstall
'
+
ii
,
reportNonZero
=
False
)
mySSH
.
run
(
f'helm uninstall
{
ii
}
'
,
reportNonZero
=
False
)
mySSH
.
run
(
f'helm spray
{
lSourcePath
}
/ci-scripts/charts/oai-5g-basic/.'
)
ret
=
mySSH
.
run
(
f'oc get pods'
,
silent
=
True
)
if
ret
.
stdout
.
count
(
'Running'
)
!=
9
:
logging
.
error
(
'
\u001B
[1m Deploying 5GCN Failed using helm chart on OC Cluster
\u001B
[0m'
)
for
ii
in
imageNames
:
mySSH
.
run
(
'helm uninstall '
+
ii
)
mySSH
.
run
(
f'oc delete pod iperf-pod'
)
ret
=
mySSH
.
run
(
f'oc get pods'
)
if
re
.
search
(
'No resources found'
,
ret
.
stdout
):
logging
.
debug
(
'All pods uninstalled'
)
...
...
@@ -561,6 +560,7 @@ class EPCManagement():
def
Terminate5GCN
(
self
,
HTML
):
imageNames
=
[
"mysql"
,
"oai-nrf"
,
"oai-amf"
,
"oai-smf"
,
"oai-spgwu-tiny"
,
"oai-ausf"
,
"oai-udm"
,
"oai-udr"
,
"oai-traffic-server"
]
containerInPods
=
[
""
,
"-c nrf"
,
"-c amf"
,
"-c smf"
,
"-c spgwu"
,
"-c ausf"
,
"-c udm"
,
"-c udr"
,
""
]
mySSH
=
cls_cmd
.
getConnection
(
self
.
IPAddress
)
message
=
''
if
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
...
...
@@ -606,17 +606,17 @@ class EPCManagement():
return
False
mySSH
.
run
(
f'oc describe pod &>
{
lSourcePath
}
/logs/describe-pods-post-test.log'
)
mySSH
.
run
(
f'oc get pods.metrics.k8s &>
{
lSourcePath
}
/logs/nf-resource-consumption.log'
)
for
ii
in
imageNames
:
podName
=
mySSH
.
run
(
f"oc get pods | grep
"
+
ii
+
" | awk '{print $1}
'"
).
stdout
.
strip
()
for
ii
,
ci
in
zip
(
imageNames
,
containerInPods
)
:
podName
=
mySSH
.
run
(
f"oc get pods | grep
{
ii
}
| awk
\'
{{print $1}}
\
'
"
).
stdout
.
strip
()
if
not
podName
:
logging
.
debug
(
'{ii} pod not found!'
)
logging
.
debug
(
f
'
{
ii
}
pod not found!'
)
HTML
.
CreateHtmlTestRow
(
self
.
Type
,
'KO'
,
CONST
.
INVALID_PARAMETER
)
HTML
.
CreateHtmlTabFooter
(
False
)
mySSH
.
run
(
f'oc logs -f
{
podName
}
-c
{
i
i
}
&>
{
lSourcePath
}
/logs/
{
ii
}
.log &'
)
mySSH
.
run
(
f'oc logs -f
{
podName
}
{
c
i
}
&>
{
lSourcePath
}
/logs/
{
ii
}
.log &'
)
mySSH
.
run
(
f'helm uninstall
{
ii
}
'
)
podName
=
''
mySSH
.
run
(
f'cd
{
lSourcePath
}
/logs && zip -r -qq
{
self
.
eNBSourceCodePath
}
/ci-scripts/
test_logs_CN.zip *.log'
)
mySSH
.
copyin
(
f'
{
self
.
eNBSourceCodePath
}
/ci-script
s/test_logs_CN.zip'
,
'test_logs_CN.zip'
)
mySSH
.
run
(
f'cd
{
lSourcePath
}
/logs && zip -r -qq test_logs_CN.zip *.log'
)
mySSH
.
copyin
(
f'
{
lSourcePath
}
/log
s/test_logs_CN.zip'
,
'test_logs_CN.zip'
)
ret
=
mySSH
.
run
(
f'oc get pods'
,
silent
=
True
)
res
=
re
.
search
(
'No resources found in oaicicd-ran namespace.'
,
ret
.
stdout
)
if
res
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment