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
Michael Black
OpenXG-RAN
Commits
6f40b619
Commit
6f40b619
authored
Jul 04, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop containers before undeploying
parent
d08ef049
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+17
-3
No files found.
ci-scripts/cls_containerize.py
View file @
6f40b619
...
...
@@ -914,12 +914,26 @@ class Containerize():
logging
.
debug
(
cmd
)
subprocess
.
run
(
cmd
,
shell
=
True
)
#
if the containers are running, recover the logs!
#
check which containers are running for log recovery later
cmd
=
'cd '
+
self
.
yamlPath
[
0
]
+
' && docker-compose -f docker-compose-ci.yml ps --all'
logging
.
debug
(
cmd
)
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
30
)
deployStatusLogs
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
30
)
# Stop the containers to shut down objects
logging
.
debug
(
'
\u001B
[1m Stopping containers
\u001B
[0m'
)
cmd
=
'cd '
+
self
.
yamlPath
[
0
]
+
' && docker-compose -f docker-compose-ci.yml stop'
logging
.
debug
(
cmd
)
try
:
deployStatus
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
universal_newlines
=
True
,
timeout
=
100
)
except
Exception
as
e
:
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
for
state
in
deployStatus
.
split
(
'
\n
'
):
for
state
in
deployStatus
Logs
.
split
(
'
\n
'
):
res
=
re
.
search
(
'Name|----------'
,
state
)
if
res
is
not
None
:
continue
...
...
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