logging: extract journal to compressed text file, before gathering
Change-Id: I4d905c2e9a86e6750d0b56def0e8e1306917d43d
This commit is contained in:
parent
10ab20bbb5
commit
0eeffdd9dc
|
@ -179,6 +179,7 @@ function postci(){
|
|||
|
||||
# Generate extra state information from the running undercloud
|
||||
sudo -E $TRIPLEO_ROOT/tripleo-ci/scripts/get_host_info.sh
|
||||
eval $JLOGCMD
|
||||
|
||||
if [ "$OVB" == "1" ] ; then
|
||||
# Get logs from the undercloud
|
||||
|
@ -192,6 +193,7 @@ function postci(){
|
|||
NAME=${INSTANCE//=*}
|
||||
scp $SSH_OPTIONS $TRIPLEO_ROOT/tripleo-ci/scripts/get_host_info.sh heat-admin@${SANITIZED_ADDRESS}:/tmp
|
||||
timeout -s 15 -k 600 300 ssh $SSH_OPTIONS heat-admin@$IP sudo /tmp/get_host_info.sh
|
||||
ssh $SSH_OPTIONS heat-admin@$IP $JLOGCMD
|
||||
ssh $SSH_OPTIONS heat-admin@$IP $TARCMD > $WORKSPACE/logs/${NAME}.tar.xz
|
||||
extract_logs $NAME
|
||||
done
|
||||
|
@ -226,6 +228,7 @@ function postci(){
|
|||
mkdir $WORKSPACE/logs/subnode-$i/
|
||||
ssh $SSH_OPTIONS -i /etc/nodepool/id_rsa $ip \
|
||||
sudo $TRIPLEO_ROOT/tripleo-ci/scripts/get_host_info.sh
|
||||
ssh $SSH_OPTIONS -i /etc/nodepool/id_rsa $ip $JLOGCMD
|
||||
ssh $SSH_OPTIONS -i /etc/nodepool/id_rsa $ip \
|
||||
$TARCMD > $WORKSPACE/logs/subnode-$i/subnode-$i.tar.xz
|
||||
# Extract /var/log for easy viewing
|
||||
|
|
|
@ -22,3 +22,4 @@ SSH_OPTIONS='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogL
|
|||
|
||||
# NOTE(pabelanger): this logic should be inverted to only include what developers need, not exclude things on the filesystem.
|
||||
TARCMD="sudo XZ_OPT=-3 tar -cJf - --exclude=udev/hwdb.bin --exclude=etc/puppet/modules --exclude=etc/project-config --exclude=etc/services --exclude=selinux/targeted --exclude=etc/services --exclude=etc/pki /var/log /etc"
|
||||
JLOGCMD="sudo journalctl --output short-precise | gzip -c | sudo dd of=/var/log/journal-text.txt.gz"
|
||||
|
|
Loading…
Reference in New Issue