Commit b1fef76e authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Remove the progress-monitor-support flag

snf-image-host will make use the external progress monitor program
if the PROGRESS_MONITOR variable is not empty. This way progress
monitor can be enable or disabled by just overwriting the aforementioned
variable in the defaults file.
parent 0d67af87
if PROGMONSUPPORT
progress_monitor_support=yes
else
progress_monitor_support=no
endif
if PITHOSIMGSUPPORT
pithos_backend_support=yes
else
......
......@@ -24,9 +24,8 @@ QEMU_IMG="qemu-img"
INSTALL_MBR="install-mbr"
TIMELIMIT="timelimit"
CURL="curl"
PROGRESS_MONITOR="snf-progress-monitor"
progress_monitor_support="@progress_monitor_support@"
pithos_backend_support="@pithos_backend_support@"
network_backend_support="@network_backend_support@"
......@@ -340,6 +339,7 @@ fi
: ${HELPER_MIRROR:=""}
: ${PITHOS_DB:="sqlite:////@localstatedir@/lib/pithos/backend.db"}
: ${PITHOS_DATA:="@localstatedir@/lib/pithos/data/"}
: ${PROGRESS_MONITOR:="@PROGRESS_MONITOR@"}
SCRIPT_NAME=$(basename $0)
......
......@@ -27,20 +27,18 @@ AM_CONDITIONAL(NETWORKIMGSUPPORT, [test "x$enable_network_backend" = "xyes"])
# --with-progress-monitor
AC_ARG_WITH([progress-monitor],
[AS_HELP_STRING([--with-progress-monitor=PRGRM_PATH],
[path to progress-monitor program]
[[snf-progress-monitor]])],
[if test "$withval" = "yes" ; then
AC_PATH_PROG(PROGRESS_MONITOR, [snf-progress-monitor], [], [$PATH:/usr/sbin:/sbin])
[path to progress-monitor program []])],
[if test "$withval" != "yes" -a "$withval" != "no"; then
AC_PATH_PROG(PROGRESS_MONITOR, ["$withval"], [], [$PATH:/usr/sbin:/sbin])
if test -z "$PROGRESS_MONITOR" ; then
AC_MSG_FAILURE([Could not find snf-progress-monitor.])
AC_MSG_FAILURE([Could not find progress-monitor: $withval.])
fi
else
PROGRESS_MONITOR="$withval"
fi],
[AC_MSG_NOTICE(progress-monitor support not enabled)]
elif test "$withval" != "no"; then
AC_MSG_ERROR([you must specify a value for progress-monitor if --with-progress-monitor is specified])
fi]
)
AM_CONDITIONAL(PROGMONSUPPORT, [test -n "$PROGRESS_MONITOR"])
# --with-helper-dir
AC_ARG_WITH([helper-dir],
......
......@@ -46,8 +46,8 @@ case $BACKEND_TYPE in
;;
esac
monitor="" #Empty if progress monitor support is disabled
if [ "$progress_monitor_support" = "yes" ]; then
monitor="" # Empty if no progress monitor program is not defined.
if [ -n "$PROGRESS_MONITOR" ]; then
monitor="$PROGRESS_MONITOR \
-i $(printf "%q" "$INSTANCE_NAME") -r $image_size"
fi
......
......@@ -64,7 +64,15 @@
# PITHOS_DATA: Directory where pithos data are hosted
# PITHOS_DATA="/var/lib/pithos/data"
# Paths for needed programs. Uncommend and change the variables below, if you
# PROGRESS_MONITOR: External program that monitors the progress of the image
# deployment. For now, this program is treated by snf-image as a decorator for
# the raw copy command that copies the image file to the instance's hard disk.
# This program must support the following options:
# -r, which specifies the expected number of bytes to be written to the disk.
# -i, which specifies the Ganeti instance name.
# PROGRESS_MONITOR=""
# Paths for needed programs. Uncommend and change the variables below if you
# don't want to use the default one.
# LOSETUP="losetup"
# KPARTX="kpartx"
......@@ -73,4 +81,3 @@
# INSTALL_MBR="install-mbr"
# TIMELIMIT="timelimit"
# CURL="curl"
# PROGRESS_MONITOR="snf-progress-monitor"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment