
The log extension is responsible for retrieving logs from the system, if journalctl is present the logs will come from it, otherwise we fallback to getting the logs from the /var/log directory + dmesg logs. In the coreos ramdisk, we need to bind mount /run/log in the container so the IPA service can have access to the journal. For the tinyIPA ramdisk, the logs from IPA are now being redirected to /var/logs/ironic-python-agent.log instead of only going to the default stdout. Inspector now shares the same method of collecting logs, extending its capabilities for non-systemd systems. Partial-Bug: #1587143 Change-Id: Ie507e2e5c58cffa255bbfb2fa5ffb95cb98ed8c4
26 lines
523 B
Bash
Executable File
26 lines
523 B
Bash
Executable File
#!/bin/sh
|
|
# put other system startup commands here
|
|
|
|
#exec > /tmp/installlogs 2>&1
|
|
set -x
|
|
|
|
echo "Starting bootlocal script:"
|
|
date
|
|
|
|
export HOME=/root
|
|
|
|
# Maybe save some RAM?
|
|
#rm -rf /tmp/builtin
|
|
|
|
# Install IPA and dependecies
|
|
if ! type "ironic-python-agent" > /dev/null ; then
|
|
python /tmp/get-pip.py --no-wheel --no-index --find-links=file:///tmp/wheelhouse ironic_python_agent
|
|
fi
|
|
|
|
export PYTHONOPTIMIZE=1
|
|
|
|
# Run IPA
|
|
echo "Starting Ironic Python Agent:"
|
|
date
|
|
ironic-python-agent 2>&1 | tee /var/log/ironic-python-agent.log
|