Add debug logging for Vagrant upgrade test

This commit is contained in:
Jason Tedor 2016-03-23 23:11:44 -04:00
parent 8202bf212c
commit 7ecfa6e2ad
2 changed files with 8 additions and 0 deletions

View File

@ -42,6 +42,7 @@ setup() {
@test "[UPGRADE] install old version" {
clean_before_test
install_package -v $(cat upgrade_from_version)
perl -p -i -e 's/es.logger.level: INFO/es.logger.level: DEBUG/' /etc/elasticsearch/logging.yml
}
@test "[UPGRADE] start old version" {
@ -80,6 +81,7 @@ setup() {
@test "[UPGRADE] install version under test" {
install_package -u
perl -p -i -e 's/es.logger.level: INFO/es.logger.level: DEBUG/' /etc/elasticsearch/logging.yml
}
@test "[UPGRADE] start version under test" {

View File

@ -385,6 +385,10 @@ wait_for_elasticsearch_status() {
local desiredStatus=${1:-green}
local index=$2
if [ -f /var/log/elasitcsearch/elasticsearch.log ]; then
cat /var/log/elasticsearch/elasticsearch.log >&3
fi
echo "Making sure elasticsearch is up..."
wget -O - --retry-connrefused --waitretry=1 --timeout=60 --tries 60 http://localhost:9200 || {
echo "Looks like elasticsearch never started. Here is its log:"
@ -394,6 +398,7 @@ wait_for_elasticsearch_status() {
echo "The elasticsearch log doesn't exist. Maybe /var/log/messages has something:"
tail -n20 /var/log/messages
fi
cat /var/log/elasticsearch/elasticsearch.log >&3
false
}
@ -408,6 +413,7 @@ wait_for_elasticsearch_status() {
echo "Connected"
else
echo "Unable to connect to Elastisearch"
cat /var/log/elasticsearch/elasticsearch.log >&3
false
fi