Revision c8230353
b/snf-image-host/Makefile.am | ||
---|---|---|
1 |
if PROGMONSUPPORT |
|
2 |
progress_monitor_support=yes |
|
3 |
else |
|
4 |
progress_monitor_support=no |
|
5 |
endif |
|
6 |
|
|
7 | 1 |
if PITHOSIMGSUPPORT |
8 | 2 |
pithos_backend_support=yes |
9 | 3 |
else |
b/snf-image-host/common.sh.in | ||
---|---|---|
24 | 24 |
INSTALL_MBR="install-mbr" |
25 | 25 |
TIMELIMIT="timelimit" |
26 | 26 |
CURL="curl" |
27 |
PROGRESS_MONITOR="snf-progress-monitor" |
|
28 | 27 |
|
29 |
progress_monitor_support="@progress_monitor_support@" |
|
28 |
|
|
30 | 29 |
pithos_backend_support="@pithos_backend_support@" |
31 | 30 |
network_backend_support="@network_backend_support@" |
32 | 31 |
|
... | ... | |
336 | 335 |
: ${HELPER_MIRROR:=""} |
337 | 336 |
: ${PITHOS_DB:="sqlite:////@localstatedir@/lib/pithos/backend.db"} |
338 | 337 |
: ${PITHOS_DATA:="@localstatedir@/lib/pithos/data/"} |
338 |
: ${PROGRESS_MONITOR:="@PROGRESS_MONITOR@"} |
|
339 | 339 |
|
340 | 340 |
SCRIPT_NAME=$(basename $0) |
341 | 341 |
|
b/snf-image-host/configure.ac | ||
---|---|---|
27 | 27 |
# --with-progress-monitor |
28 | 28 |
AC_ARG_WITH([progress-monitor], |
29 | 29 |
[AS_HELP_STRING([--with-progress-monitor=PRGRM_PATH], |
30 |
[path to progress-monitor program] |
|
31 |
[[snf-progress-monitor]])], |
|
32 |
[if test "$withval" = "yes" ; then |
|
33 |
AC_PATH_PROG(PROGRESS_MONITOR, [snf-progress-monitor], [], [$PATH:/usr/sbin:/sbin]) |
|
30 |
[path to progress-monitor program []])], |
|
31 |
[if test "$withval" != "yes" -a "$withval" != "no"; then |
|
32 |
AC_PATH_PROG(PROGRESS_MONITOR, ["$withval"], [], [$PATH:/usr/sbin:/sbin]) |
|
34 | 33 |
if test -z "$PROGRESS_MONITOR" ; then |
35 |
AC_MSG_FAILURE([Could not find snf-progress-monitor.])
|
|
34 |
AC_MSG_FAILURE([Could not find progress-monitor: $withval.])
|
|
36 | 35 |
fi |
37 |
else |
|
38 | 36 |
PROGRESS_MONITOR="$withval" |
39 |
fi], |
|
40 |
[AC_MSG_NOTICE(progress-monitor support not enabled)] |
|
37 |
elif test "$withval" != "no"; then |
|
38 |
AC_MSG_ERROR([you must specify a value for progress-monitor if --with-progress-monitor is specified]) |
|
39 |
fi] |
|
41 | 40 |
) |
42 | 41 |
|
43 |
AM_CONDITIONAL(PROGMONSUPPORT, [test -n "$PROGRESS_MONITOR"]) |
|
44 | 42 |
|
45 | 43 |
# --with-helper-dir |
46 | 44 |
AC_ARG_WITH([helper-dir], |
b/snf-image-host/create | ||
---|---|---|
46 | 46 |
;; |
47 | 47 |
esac |
48 | 48 |
|
49 |
monitor="" #Empty if progress monitor support is disabled
|
|
50 |
if [ "$progress_monitor_support" = "yes" ]; then
|
|
49 |
monitor="" # Empty if no progress monitor program is not defined.
|
|
50 |
if [ -n "$PROGRESS_MONITOR" ]; then
|
|
51 | 51 |
monitor="$PROGRESS_MONITOR \ |
52 | 52 |
-i $(printf "%q" "$INSTANCE_NAME") -r $image_size" |
53 | 53 |
fi |
b/snf-image-host/defaults | ||
---|---|---|
60 | 60 |
# PITHOS_DATA: Directory where pithos data are hosted |
61 | 61 |
# PITHOS_DATA="/var/lib/pithos/data" |
62 | 62 |
|
63 |
# Paths for needed programs. Uncommend and change the variables below, if you |
|
63 |
# PROGRESS_MONITOR: External program that monitors the progress of the image |
|
64 |
# deployment. For now, this program is treated by snf-image as a decorator for |
|
65 |
# the raw copy command that copies the image file to the instance's hard disk. |
|
66 |
# This program must support the following options: |
|
67 |
# -r, which specifies the expected number of bytes to be written to the disk. |
|
68 |
# -i, which specifies the Ganeti instance name. |
|
69 |
# PROGRESS_MONITOR="" |
|
70 |
|
|
71 |
# Paths for needed programs. Uncommend and change the variables below if you |
|
64 | 72 |
# don't want to use the default one. |
65 | 73 |
# LOSETUP="losetup" |
66 | 74 |
# KPARTX="kpartx" |
... | ... | |
69 | 77 |
# INSTALL_MBR="install-mbr" |
70 | 78 |
# TIMELIMIT="timelimit" |
71 | 79 |
# CURL="curl" |
72 |
# PROGRESS_MONITOR="snf-progress-monitor" |
Also available in: Unified diff