[xen_initrd="/boot/initrd-2.6-xenU"])
AC_SUBST(XEN_INITRD, $xen_initrd)
+# --enable-rapi
+AC_ARG_ENABLE([rapi],
+ [AS_HELP_STRING([--enable-rapi],
+ [Whether to enable remote API daemon]
+ )])
+if test "$enable_rapi" = "yes"
+then
+ enable_rapi_py=True
+else
+ enable_rapi=no
+ enable_rapi_py=False
+fi
+AC_SUBST(PY_ENABLE_RAPI, $enable_rapi_py)
+
+
# Check common programs
AC_PROG_INSTALL
AC_PROG_LN_S
"-s", master_ip, master_ip])
# we'll ignore the exit code of arping
- # Start remote API
- result = utils.RunCmd(["ganeti-rapi", "--port=%s" % constants.RAPI_PORT])
- if debug and result.failed:
- sys.stderr.write("Failed to start ganeti-rapi, error: %s\n" %
- result.output)
+ if constants.RAPI_ENABLE:
+ # Start remote API
+ result = utils.RunCmd(["ganeti-rapi", "--port=%s" % constants.RAPI_PORT])
+ if debug and result.failed:
+ sys.stderr.write("Failed to start ganeti-rapi, error: %s\n" %
+ result.output)
return EXIT_OK
"""Stops the master.
"""
- # Stop remote API
- result = utils.RunCmd(["fuser", "-k", "-n", "tcp", str(constants.RAPI_PORT)])
- if debug and result.failed:
- sys.stderr.write("Failed to stop ganeti-rapi, error: %s\n" % result.output)
+ if constants.RAPI_ENABLE:
+ # Stop remote API
+ result = utils.RunCmd(["fuser", "-k", "-n", "tcp",
+ str(constants.RAPI_PORT)])
+ if debug and result.failed:
+ sys.stderr.write("Failed to stop ganeti-rapi, error: %s\n" %
+ result.output)
result = utils.RunCmd(["ip", "address", "del", "%s/32" % master_ip,
"dev", master_netdev])
echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
echo "XEN_INITRD = '$(XEN_INITRD)'"; \
echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
+ echo "RAPI_ENABLE = $(PY_ENABLE_RAPI)"; \
} > $@
include $(srcdir)/Makefile.libcommon