Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Commit

Permalink
Get hostd logs for CI runs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritesh Shukla committed Nov 24, 2016
1 parent 9c3d15c commit c19608f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
11 changes: 2 additions & 9 deletions misc/drone-scripts/deploy-and-test-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ dump_logs() {
dump_log_vm $VM2
}

truncate_vm_logs() {
$SSH $USER@$1 "cat /dev/null > /var/log/docker-volume-vsphere.log"
}

truncate_esx_logs() {
$SSH $USER@$ESX "cat /dev/null > /var/log/vmware/vmdk_ops.log"
}

log "truncate vm logs"
truncate_vm_logs $VM1
Expand All @@ -93,8 +86,8 @@ log "starting deploy and test"

if make -s deploy-esx deploy-vm testasroot testremote TEST_VOL_NAME=vol.build$BUILD_NUMBER;
then
dump_logs
stop_build $VM1 $BUILD_NUMBER
dump_logs
stop_build $VM1 $BUILD_NUMBER
else
log "Build + Test not successful"
dump_logs
Expand Down
15 changes: 13 additions & 2 deletions misc/drone-scripts/dump_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,25 @@
# A few helper functions for dumping logs

VM_LOGFILE="/var/log/docker-volume-vsphere.log"
VM_STDLOG="/tmp/plugin.log"
ESX_LOGFILE="/var/log/vmware/vmdk_ops.log"
HOSTD_LOGFILE="/var/log/hostd.log"

dump_log_esx() {
log $ESX_LOGFILE
$SSH $USER@$1 cat $ESX_LOGFILE
log $HOSTD_LOGFILE
$SSH $USER@$1 cat $HOSTD_LOGFILE
}

dump_log_vm(){
$SSH $USER@$1 cat $VM_STDLOG
$SSH $USER@$1 cat $VM_LOGFILE
}

truncate_vm_logs() {
$SSH $USER@$1 "echo > $VM_LOGFILE"
}

truncate_esx_logs() {
$SSH $USER@$1 "echo > $ESX_LOGFILE"
$SSH $USER@$1 "echo > $HOSTD_LOGFILE"
}

0 comments on commit c19608f

Please # to comment.