Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
2c0f416e
Commit
2c0f416e
authored
1 year ago
by
Michal Arbet
Committed by
Michal Nasiadka
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix podman logs
Change-Id: I7b1a5bef0cb1dc1dfad1c6c4ca486e6ead847f12
parent
9951c440
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/get_logs.sh
+3
-1
3 additions, 1 deletion
tests/get_logs.sh
with
3 additions
and
1 deletion
tests/get_logs.sh
+
3
−
1
View file @
2c0f416e
...
@@ -7,8 +7,10 @@ copy_logs() {
...
@@ -7,8 +7,10 @@ copy_logs() {
if
[
"
$CONTAINER_ENGINE
"
=
"docker"
]
;
then
if
[
"
$CONTAINER_ENGINE
"
=
"docker"
]
;
then
VOLUMES_DIR
=
"/var/lib/docker/volumes"
VOLUMES_DIR
=
"/var/lib/docker/volumes"
LOGS_TAIL_PARAMETER
=
"all"
elif
[
"
$CONTAINER_ENGINE
"
=
"podman"
]
;
then
elif
[
"
$CONTAINER_ENGINE
"
=
"podman"
]
;
then
VOLUMES_DIR
=
"/var/lib/containers/storage/volumes"
VOLUMES_DIR
=
"/var/lib/containers/storage/volumes"
LOGS_TAIL_PARAMETER
=
"-1"
else
else
echo
"Invalid container engine:
${
CONTAINER_ENGINE
}
"
echo
"Invalid container engine:
${
CONTAINER_ENGINE
}
"
exit
1
exit
1
...
@@ -140,7 +142,7 @@ copy_logs() {
...
@@ -140,7 +142,7 @@ copy_logs() {
fi
fi
for
container
in
$(
${
CONTAINER_ENGINE
}
ps
-a
--format
"{{.Names}}"
)
;
do
for
container
in
$(
${
CONTAINER_ENGINE
}
ps
-a
--format
"{{.Names}}"
)
;
do
${
CONTAINER_ENGINE
}
logs
--timestamps
--tail
all
${
container
}
&>
${
LOG_DIR
}
/container_logs/
${
container
}
.txt
${
CONTAINER_ENGINE
}
logs
--timestamps
--tail
=
${
LOGS_TAIL_PARAMETER
}
${
container
}
&>
${
LOG_DIR
}
/container_logs/
${
container
}
.txt
done
done
# Rename files to .txt; this is so that when displayed via
# Rename files to .txt; this is so that when displayed via
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment