Merge "Te-broker: save all nodes console to html log dir"
This commit is contained in:
commit
936054e4ab
@ -32,8 +32,18 @@ function delete_ports() {
|
||||
}
|
||||
|
||||
# Save the end of the bmc log for debugging IPMI connectivity problems
|
||||
PYTHONIOENCODING='utf-8'
|
||||
CONSOLE_LOG_PATH=/var/www/html/tebroker/console-logs/
|
||||
nova console-log bmc-${ENVNUM} | tail -n 100 | awk -v envnum="$ENVNUM" '$0=envnum ": " $0' >> /var/log/bmc-console-logs
|
||||
|
||||
# Save all the consoles in the stack to a dedicated directory, stripping out ANSI color codes.
|
||||
for server in $(openstack server list -f value -c Name | grep baremetal-${ENVNUM}) bmc-$ENVNUM
|
||||
do
|
||||
openstack console log show $server | sed 's/\[[0-9;]*[a-zA-Z]//g' | gzip > $CONSOLE_LOG_PATH/$server-console.log.gz || true
|
||||
done
|
||||
|
||||
|
||||
|
||||
# Delete the ports that have been attached to the undercloud
|
||||
SUBNETID=$(neutron subnet-show $PUBLICNET | awk '$2=="id" {print $4}' || echo '')
|
||||
delete_ports $SUBNETID
|
||||
|
Loading…
Reference in New Issue
Block a user