forked from openshift/ironic-image
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openshift#217 from akiselev1/ironic-provisioning-l…
…og-watch Add new entry point script to dump ramdisk host provisioning logs
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 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,20 @@ | ||
#!/usr/bin/bash | ||
|
||
# Ramdisk logs path | ||
LOG_DIR="/shared/log/ironic/deploy" | ||
|
||
while : | ||
do | ||
until ls "${LOG_DIR}"/*.tar.gz 1> /dev/null 2>&1 | ||
do | ||
sleep 5 | ||
done | ||
|
||
for fn in "${LOG_DIR}"/*.tar.gz | ||
do | ||
echo "************ Contents of $fn ramdisk log file bundle **************" | ||
tar -xOzvvf $fn | sed -e "s/^/$(basename $fn): /" | ||
rm -f $fn | ||
done | ||
done | ||
|