Changed to do CI on Xenial platform.

Change-Id: I4b59a0aa6e457aa8dc435f79d7e788c7ed432dc1
This commit is contained in:
Teruaki Ishizaki 2017-01-20 18:59:50 +09:00 committed by YAMADA Hideki
parent 90e79d01dd
commit 2c020be470
1 changed files with 12 additions and 5 deletions

View File

@ -35,8 +35,8 @@ SHEEPDOG_LOOPBACK_DISK_SIZE=${SHEEPDOG_LOOPBACK_DISK_SIZE:-$SHEEPDOG_LOOPBACK_DI
# check_os_support_sheepdog() - Check if the operating system provides a decent version of Sheepdog
function check_os_support_sheepdog {
if [[ ! ${DISTRO} =~ (trusty) ]]; then
echo "WARNING: your distro $DISTRO does not provide (at least) the Firefly release. Please use Ubuntu Trusty"
if [[ ! ${DISTRO} =~ (trusty) && ! ${DISTRO} =~ (xenial) ]]; then
echo "WARNING: your distro $DISTRO does not provide (at least) the Firefly release. Please use Ubuntu Trusty or Xenial."
if [[ "$FORCE_SHEEPDOG_INSTALL" != "yes" ]]; then
die $LINENO "If you wish to install Sheepdog on this distribution anyway run with FORCE_SHEEPDOG_INSTALL=yes"
fi
@ -73,18 +73,25 @@ function configure_sheepdog {
# install_sheepdog() - Collect source and prepare
function install_sheepdog {
if [[ ${os_CODENAME} =~ trusty ]]; then
if [[ ${os_CODENAME} =~ trusty || ${os_CODENAME} =~ xenial ]]; then
NO_UPDATE_REPOS=False
install_package sheepdog
install_package xfsprogs
else
exit_distro_not_supported "Sheepdog since your distro doesn't provide (at least) the Firefly release. Please use Ubuntu Trusty."
exit_distro_not_supported "Sheepdog since your distro doesn't provide (at least) the Firefly release. Please use Ubuntu Trusty or Xenial."
fi
}
# start_sheepdog() - Start running processes, including screen
function start_sheepdog {
run_process sheepdog "sheep -f -o -l 7 -c local -n ${SHEEPDOG_DATA_DIR}"
if [[ ${DISTRO} =~ (trusty) ]]; then
run_process sheepdog "sheep -f -o -l 7 -c local -n ${SHEEPDOG_DATA_DIR}"
elif [[ ${DISTRO} =~ (xenial) ]]; then
run_process sheepdog "sheep -l dst=stdout,level=debug,format=server -c local -n ${SHEEPDOG_DATA_DIR}"
else
exit_distro_not_supported "Sheepdog since your distro doesn't provide (at least) the Firefly release. Please use Ubuntu Trusty or Xenial."
fi
sleep 3
dog cluster format -c 1