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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
3090d041
Commit
3090d041
authored
Jan 22, 2025
by
Sagar Arora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ci): waiting for a pod using k8s wait command
Signed-off-by:
Sagar Arora
<
sagar.arora@openairinterface.org
>
parent
d999ed2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
ci-scripts/cls_cluster.py
ci-scripts/cls_cluster.py
+4
-6
No files found.
ci-scripts/cls_cluster.py
View file @
3090d041
...
...
@@ -208,7 +208,7 @@ class Cluster:
return
-
1
return
int
(
result
.
group
(
"size"
))
def
_deploy_pod
(
self
,
filename
,
timeout
=
3
0
):
def
_deploy_pod
(
self
,
filename
,
timeout
=
12
0
):
ret
=
self
.
cmd
.
run
(
f'oc create -f
{
filename
}
'
)
result
=
re
.
search
(
f'pod/(?P<pod>[a-zA-Z0-9_\-]+) created'
,
ret
.
stdout
)
if
result
is
None
:
...
...
@@ -216,11 +216,9 @@ class Cluster:
return
None
pod
=
result
.
group
(
"pod"
)
logging
.
debug
(
f'checking if pod
{
pod
}
is in Running state'
)
while
timeout
>
0
:
ret
=
self
.
cmd
.
run
(
f'oc get pod
{
pod
}
-o json | jq -Mc .status.phase'
,
silent
=
True
)
if
re
.
search
(
'"Running"'
,
ret
.
stdout
)
is
not
None
:
return
pod
timeout
-=
1
time
.
sleep
(
1
)
ret
=
self
.
cmd
.
run
(
f'oc wait --for=condition=ready pod
{
pod
}
--timeout=
{
timeout
}
s'
,
silent
=
True
)
if
ret
.
returncode
==
0
:
return
pod
logging
.
error
(
f'pod
{
pod
}
did not reach Running state'
)
self
.
_undeploy_pod
(
filename
)
return
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