Skip to content

Commit

Permalink
Add a new entry point script to dump and delete ramdisk host provisio…
Browse files Browse the repository at this point in the history
…ning logs
  • Loading branch information
akiselev1 committed Nov 7, 2020
1 parent a223755 commit cbee3ff
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The following entry points are provided:
- rundnsmasq - Runs the dnmasq dhcp server to provide addresses and initiate PXE boot of baremetal nodes. This includes a lightweight TFTP server. Details on dnsmasq can be found at http://www.thekelleys.org.uk/dnsmasq/doc.html.
- runhttpd - Starts the Apache web server to provide images via http for PXE boot and for deployment of the final images.
- runmariadb - Provides a database to store information associated with baremetal nodes.
- ironic-provisioning-log-watch - Waits for host provisioning ramdisk logs to appear, prints their contents and deletes files.

All of the containers must share a common mount point or data store. Ironic requires files for both the TFTP server and HTTP server to be stored in the same partition. This common store must include, in <shared store>/html/images, the following images:
- ironic-python-agent.kernel
Expand Down
23 changes: 23 additions & 0 deletions ironic-provisioning-log-watch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/bash

# Ramdisk logs path
LOG_DIR="/shared/log/ironic/deploy"

until ls "${LOG_DIR}"/*.tar.gz 1> /dev/null 2>&1
do
sleep 1
done

cd "${LOG_DIR}"

for fn in *.tar.gz
do
echo "************ Contents of $fn ramdisk log file bundle **************"
tar -xOzvvf $fn | sed -e "s/^/$fn: /"
done

rm -rf ${LOG_DIR}/*




0 comments on commit cbee3ff

Please sign in to comment.