-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a conductor ramdisk-logs sidecar
This implements the runlogwatch.sh approach of metal3[1] to write any deployment logs to the console, making them accessable to the end user via the same mechanism as other openstack service logs. As part of this change the deploy logs directory needs to be moved to a directory on a volume shared by the pod. This is now /var/lib/ironic/ramdisk-logs Jira: OSPRH-1947 [1] https://github.com/metal3-io/ironic-image/blob/main/scripts/runlogwatch.sh
- Loading branch information
Showing
7 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/bash | ||
|
||
# Ramdisk logs path | ||
LOG_DIR=${LOG_DIR:-/var/lib/ironic/ramdisk-logs} | ||
|
||
while :; do | ||
sleep 5 | ||
|
||
while read -r fn; do | ||
echo | ||
echo "************ Contents of $fn ramdisk log file bundle **************" | ||
tar -xOzvvf "$fn" | sed -e "s/^/$(basename "$fn"): /" | ||
rm -f "$fn" | ||
# find all *.tar.gz files which are older than six seconds | ||
done < <(find "${LOG_DIR}" -mmin +0.1 -type f -name "*.tar.gz") | ||
|
||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"command": "/usr/local/bin/container-scripts/runlogwatch.sh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters