Commit bcb1ab78 authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Merge branch 'stable-2.11' into master



* stable-2.11
  Update the list dependencies in INSTALL
  Make luxid's Haskell dependencies mandatory
  Fix start/stop scripts to run luxid unconditionally
  Remove the HTOOLS configuration variable
  Add a config. conditional for running Haskell coverage
  Make htools and luxid mandatory in the Makefile
  Temporarily remove SSL changes from NEWS file
  Fix bracket style in rapi-workload
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parents 8d2ca7d1 5a5a64c6
...@@ -144,18 +144,33 @@ deploy Ganeti on production machines). More specifically: ...@@ -144,18 +144,33 @@ deploy Ganeti on production machines). More specifically:
- `bytestring <http://hackage.haskell.org/package/bytestring>`_ and - `bytestring <http://hackage.haskell.org/package/bytestring>`_ and
`utf8-string <http://hackage.haskell.org/package/utf8-string>`_ `utf8-string <http://hackage.haskell.org/package/utf8-string>`_
libraries; these usually come with the GHC compiler libraries; these usually come with the GHC compiler
- `text <http://hackage.haskell.org/package/text>`_
- `deepseq <http://hackage.haskell.org/package/deepseq>`_ - `deepseq <http://hackage.haskell.org/package/deepseq>`_
- `curl <http://hackage.haskell.org/package/curl>`_, tested with - `curl <http://hackage.haskell.org/package/curl>`_, tested with
versions 1.3.4 and above versions 1.3.4 and above
- `hslogger <http://software.complete.org/hslogger>`_, version 1.1 and - `hslogger <http://software.complete.org/hslogger>`_, version 1.1 and
above (note that Debian Squeeze only has version 1.0.9) above (note that Debian Squeeze only has version 1.0.9)
- `hinotify <http://hackage.haskell.org/package/hinotify>`_, tested with
version 0.3.2
- `Crypto <http://hackage.haskell.org/package/Crypto>`_, tested with
version 4.2.4
- `regex-pcre <http://hackage.haskell.org/package/regex-pcre>`_,
bindings for the ``pcre`` library
- `attoparsec <http://hackage.haskell.org/package/attoparsec>`_
- `vector <http://hackage.haskell.org/package/vector>`_
- `process <http://hackage.haskell.org/package/process>`_, version 1.0.1.1 and
above
Some of these are also available as package in Debian/Ubuntu:: Some of these are also available as package in Debian/Ubuntu::
$ apt-get install ghc libghc-json-dev libghc-network-dev \ $ apt-get install ghc libghc-json-dev libghc-network-dev \
libghc-parallel-dev libghc-deepseq-dev \ libghc-parallel-dev libghc-deepseq-dev \
libghc-utf8-string-dev libghc-curl-dev \ libghc-utf8-string-dev libghc-curl-dev \
libghc-hslogger-dev libghc-hslogger-dev \
libghc-crypto-dev libghc-text-dev \
libghc-hinotify-dev libghc-regex-pcre-dev \
libpcre3-dev \
libghc-attoparsec-dev libghc-vector-dev
Or in older versions of these distributions (using GHC 6.x):: Or in older versions of these distributions (using GHC 6.x)::
...@@ -166,57 +181,51 @@ Or in older versions of these distributions (using GHC 6.x):: ...@@ -166,57 +181,51 @@ Or in older versions of these distributions (using GHC 6.x)::
In Fedora, some of them are available via packages as well:: In Fedora, some of them are available via packages as well::
$ yum install ghc ghc-json-devel ghc-network-devel \ $ yum install ghc ghc-json-devel ghc-network-devel \
ghc-parallel-devel ghc-deepseq-devel ghc-parallel-devel ghc-deepseq-devel \
ghc-hslogger-devel ghc-text-devel \
ghc-regex-pcre-devel
If using a distribution which does not provide them, first install The most recent Fedora doesn't provide ``crypto``, ``inotify``. So these
the Haskell platform. You can also install ``cabal`` manually:: need to be installed using ``cabal``.
If using a distribution which does not provide these libraries, first
install the Haskell platform. You can also install ``cabal`` manually::
$ apt-get install cabal-install $ apt-get install cabal-install
$ cabal update $ cabal update
Then install the additional libraries (only the ones not available in your Then install the additional native libraries::
distribution packages) via ``cabal``::
$ apt-get install libpcre3-dev libcurl4-openssl-dev
And finally the libraries required for building the packages (only the
ones not available in your distribution packages) via ``cabal``::
$ cabal install json network parallel utf8-string curl hslogger $ cabal install json network parallel utf8-string curl hslogger \
Crypto text hinotify==0.3.2 regex-pcre \
attoparsec vector
Haskell optional features Haskell optional features
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
Optionally, more functionality can be enabled if your build machine has Optionally, more functionality can be enabled if your build machine has
a few more Haskell libraries enabled: the ``ganeti-confd`` and a few more Haskell libraries enabled: the ``ganeti-confd`` daemon
``ganeti-luxid`` daemon (``--enable-confd``) and the monitoring daemon (``--enable-confd``) and the monitoring daemon (``--enable-mond``).
(``--enable-mond``). The list of extra dependencies for these is: The extra dependency for these is:
- `Crypto <http://hackage.haskell.org/package/Crypto>`_, tested with
version 4.2.4
- `text <http://hackage.haskell.org/package/text>`_
- `hinotify <http://hackage.haskell.org/package/hinotify>`_, tested with
version 0.3.2
- `regex-pcre <http://hackage.haskell.org/package/regex-pcre>`_,
bindings for the ``pcre`` library
- `attoparsec <http://hackage.haskell.org/package/attoparsec>`_
- `vector <http://hackage.haskell.org/package/vector>`_
- `snap-server` <http://hackage.haskell.org/package/snap-server>`_, version - `snap-server` <http://hackage.haskell.org/package/snap-server>`_, version
0.8.1 and above. 0.8.1 and above.
- `process <http://hackage.haskell.org/package/process>`_, version 1.0.1.1 and
above
These libraries are available in Debian Wheezy (but not in Squeeze), so you This library is available in Debian Wheezy (but not in Squeeze), so you
can use either apt:: can use either apt::
$ apt-get install libghc-crypto-dev libghc-text-dev \ $ apt-get install libghc-snap-server-dev
libghc-hinotify-dev libghc-regex-pcre-dev \
libpcre3-dev \
libghc-attoparsec-dev libghc-vector-dev \
libghc-snap-server-dev
or ``cabal``, after installing a required non-Haskell dependency:: or ``cabal``::
$ apt-get install libpcre3-dev libcurl4-openssl-dev $ cabal install snap-server
$ cabal install Crypto text hinotify==0.3.2 regex-pcre \
attoparsec vector snap-server
to install them. to install it.
In case you still use ghc-6.12, note that ``cabal`` would automatically try to In case you still use ghc-6.12, note that ``cabal`` would automatically try to
install newer versions of some of the libraries snap-server depends on, that install newer versions of some of the libraries snap-server depends on, that
...@@ -227,13 +236,6 @@ own, explicitly forcing the installation of compatible versions:: ...@@ -227,13 +236,6 @@ own, explicitly forcing the installation of compatible versions::
hashable==1.1.2.0 case-insensitive==0.3 parsec==3.0.1 \ hashable==1.1.2.0 case-insensitive==0.3 parsec==3.0.1 \
network==2.3 snap-server==0.8.1 network==2.3 snap-server==0.8.1
The most recent Fedora doesn't provide ``crypto``, ``inotify``. So these
need to be installed using ``cabal``, if desired. The other packages can
be installed via ``yum``::
$ yum install ghc-hslogger-devel ghc-text-devel \
ghc-regex-pcre-devel
.. _cabal-note: .. _cabal-note:
.. note:: .. note::
If one of the cabal packages fails to install due to unfulfilled If one of the cabal packages fails to install due to unfulfilled
......
...@@ -282,17 +282,13 @@ GENERATED_FILES = \ ...@@ -282,17 +282,13 @@ GENERATED_FILES = \
$(PYTHON_BOOTSTRAP) \ $(PYTHON_BOOTSTRAP) \
$(gnt_python_sbin_SCRIPTS) $(gnt_python_sbin_SCRIPTS)
HS_GENERATED_FILES = HS_GENERATED_FILES = $(HS_PROGS) src/hluxid src/ganeti-luxid
if WANT_HTOOLS
HS_GENERATED_FILES += $(HS_PROGS)
if ENABLE_CONFD if ENABLE_CONFD
HS_GENERATED_FILES += src/hconfd src/ganeti-confd src/hluxid src/ganeti-luxid HS_GENERATED_FILES += src/hconfd src/ganeti-confd
endif endif
if ENABLE_MOND if ENABLE_MOND
HS_GENERATED_FILES += src/ganeti-mond HS_GENERATED_FILES += src/ganeti-mond
endif endif
endif
built_base_sources = \ built_base_sources = \
stamp-directories \ stamp-directories \
...@@ -991,9 +987,7 @@ qa_scripts = \ ...@@ -991,9 +987,7 @@ qa_scripts = \
qa/qa_utils.py \ qa/qa_utils.py \
qa/rapi-workload.py qa/rapi-workload.py
bin_SCRIPTS = bin_SCRIPTS = $(HS_BIN_PROGS)
if WANT_HTOOLS
bin_SCRIPTS += $(HS_BIN_PROGS)
install-exec-hook: install-exec-hook:
@mkdir_p@ $(DESTDIR)$(iallocatorsdir) @mkdir_p@ $(DESTDIR)$(iallocatorsdir)
# FIXME: this is a hardcoded logic, instead of auto-resolving # FIXME: this is a hardcoded logic, instead of auto-resolving
...@@ -1002,7 +996,6 @@ install-exec-hook: ...@@ -1002,7 +996,6 @@ install-exec-hook:
for role in $(HS_BIN_ROLES); do \ for role in $(HS_BIN_ROLES); do \
$(LN_S) -f htools $(DESTDIR)$(bindir)/$$role ; \ $(LN_S) -f htools $(DESTDIR)$(bindir)/$$role ; \
done done
endif
HNORMAL_SUFFIX = .o HNORMAL_SUFFIX = .o
HPROFILE_SUFFIX = .prof.o HPROFILE_SUFFIX = .prof.o
...@@ -1879,7 +1872,6 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in $(PRINT_PY_CONSTANTS) \ ...@@ -1879,7 +1872,6 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in $(PRINT_PY_CONSTANTS) \
-DMOND_GROUP="$(MOND_GROUP)" \ -DMOND_GROUP="$(MOND_GROUP)" \
-DDISK_SEPARATOR="$(DISK_SEPARATOR)" \ -DDISK_SEPARATOR="$(DISK_SEPARATOR)" \
-DQEMUIMG_PATH="$(QEMUIMG_PATH)" \ -DQEMUIMG_PATH="$(QEMUIMG_PATH)" \
-DHTOOLS="True" \
-DENABLE_CONFD="$(ENABLE_CONFD)" \ -DENABLE_CONFD="$(ENABLE_CONFD)" \
-DXEN_CMD="$(XEN_CMD)" \ -DXEN_CMD="$(XEN_CMD)" \
-DENABLE_RESTRICTED_COMMANDS="$(ENABLE_RESTRICTED_COMMANDS)" \ -DENABLE_RESTRICTED_COMMANDS="$(ENABLE_RESTRICTED_COMMANDS)" \
...@@ -2378,7 +2370,7 @@ TAGS: $(GENERATED_FILES) ...@@ -2378,7 +2370,7 @@ TAGS: $(GENERATED_FILES)
.PHONY: coverage .PHONY: coverage
COVERAGE_TESTS= COVERAGE_TESTS=
if WANT_HTOOLS if HS_UNIT
COVERAGE_TESTS += hs-coverage COVERAGE_TESTS += hs-coverage
endif endif
if PY_UNIT if PY_UNIT
......
...@@ -57,11 +57,6 @@ Incompatible/important changes ...@@ -57,11 +57,6 @@ Incompatible/important changes
as well as the --enable-split-queries configuration option. as well as the --enable-split-queries configuration option.
- Orphan volumes errors are demoted to warnings and no longer affect the exit - Orphan volumes errors are demoted to warnings and no longer affect the exit
code of ``gnt-cluster verify``. code of ``gnt-cluster verify``.
- RPC security got enhanced by using different client SSL certificates
for each node. In this context 'gnt-cluster renew-crypto' got a new
option '--renew-node-certificates', which renews the client
certificates of all nodes. After a cluster upgrade from pre-2.11, run
this to create client certificates and activate this feature.
New features New features
~~~~~~~~~~~~ ~~~~~~~~~~~~
......
...@@ -848,10 +848,9 @@ def main(): ...@@ -848,10 +848,9 @@ def main():
WriteHaskellCompletion(sw, "daemons/ganeti-cleaner", htools=False, WriteHaskellCompletion(sw, "daemons/ganeti-cleaner", htools=False,
debug=not options.compact) debug=not options.compact)
# htools, if enabled # htools
if _constants.HTOOLS: for script in _constants.HTOOLS_PROGS:
for script in _constants.HTOOLS_PROGS: WriteHaskellCompletion(sw, script, htools=True, debug=debug)
WriteHaskellCompletion(sw, script, htools=True, debug=debug)
# ganeti-confd, if enabled # ganeti-confd, if enabled
if _constants.ENABLE_CONFD: if _constants.ENABLE_CONFD:
......
...@@ -545,18 +545,21 @@ AC_GHC_PKG_REQUIRE(base64-bytestring-1.*, t) ...@@ -545,18 +545,21 @@ AC_GHC_PKG_REQUIRE(base64-bytestring-1.*, t)
AC_GHC_PKG_REQUIRE(utf8-string) AC_GHC_PKG_REQUIRE(utf8-string)
AC_GHC_PKG_REQUIRE(zlib) AC_GHC_PKG_REQUIRE(zlib)
AC_GHC_PKG_REQUIRE(hslogger) AC_GHC_PKG_REQUIRE(hslogger)
AC_GHC_PKG_REQUIRE(process)
AC_GHC_PKG_REQUIRE(attoparsec)
AC_GHC_PKG_REQUIRE(vector)
AC_GHC_PKG_REQUIRE(text)
AC_GHC_PKG_REQUIRE(hinotify)
AC_GHC_PKG_REQUIRE(Crypto)
# extra modules for confd functionality; also needed for tests # extra modules for confd functionality; also needed for tests
HS_NODEV= HS_NODEV=
CONFD_PKG= CONFD_PKG=
AC_GHC_PKG_CHECK([vector], [], [HS_NODEV=1; CONFD_PKG="$CONFD_PKG vector"]) # if a new confd dependency is needed, add it here like:
# AC_GHC_PKG_CHECK([somepkg], [], [HS_NODEV=1; CONFD_PKG="$CONFD_PKG somepkg"])
HS_REGEX_PCRE=-DNO_REGEX_PCRE HS_REGEX_PCRE=-DNO_REGEX_PCRE
AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=], AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=],
[HS_NODEV=1; CONFD_PKG="$CONFD_PKG regex-pcre"]) [HS_NODEV=1; CONFD_PKG="$CONFD_PKG regex-pcre"])
AC_GHC_PKG_CHECK([text], [], [HS_NODEV=1; CONFD_PKG="$CONFD_PKG text"])
AC_GHC_PKG_CHECK([hinotify], [], [HS_NODEV=1; CONFD_PKG="$CONFD_PKG hinotify"])
AC_GHC_PKG_CHECK([Crypto], [], [HS_NODEV=1; CONFD_PKG="$CONFD_PKG Crypto"])
has_confd=False has_confd=False
if test "$enable_confd" != no; then if test "$enable_confd" != no; then
...@@ -580,12 +583,8 @@ AM_CONDITIONAL([ENABLE_CONFD], [test x$has_confd = xTrue]) ...@@ -580,12 +583,8 @@ AM_CONDITIONAL([ENABLE_CONFD], [test x$has_confd = xTrue])
#extra modules for monitoring daemon functionality; also needed for tests #extra modules for monitoring daemon functionality; also needed for tests
MONITORING_PKG= MONITORING_PKG=
AC_GHC_PKG_CHECK([attoparsec], [],
[HS_NODEV=1; MONITORING_PKG="$MONITORING_PKG attoparsec"])
AC_GHC_PKG_CHECK([snap-server], [], AC_GHC_PKG_CHECK([snap-server], [],
[NS_NODEV=1; MONITORING_PKG="$MONITORING_PKG snap-server"]) [NS_NODEV=1; MONITORING_PKG="$MONITORING_PKG snap-server"])
AC_GHC_PKG_CHECK([process], [],
[HS_NODEV=1; MONITORING_PKG="$MONITORING_PKG process"])
has_monitoring=False has_monitoring=False
if test "$enable_monitoring" != no; then if test "$enable_monitoring" != no; then
...@@ -639,9 +638,7 @@ else ...@@ -639,9 +638,7 @@ else
AC_MSG_NOTICE([Haskell development modules found, unittests enabled]) AC_MSG_NOTICE([Haskell development modules found, unittests enabled])
fi fi
AC_SUBST(HS_NODEV) AC_SUBST(HS_NODEV)
AM_CONDITIONAL([HS_UNIT], [test -n $HS_NODEV])
HTOOLS=yes
AC_SUBST(HTOOLS)
# Check for HsColour # Check for HsColour
HS_APIDOC=no HS_APIDOC=no
...@@ -671,12 +668,6 @@ if test -z "$HLINT"; then ...@@ -671,12 +668,6 @@ if test -z "$HLINT"; then
AC_MSG_WARN([hlint not found, checking code will not be possible]) AC_MSG_WARN([hlint not found, checking code will not be possible])
fi fi
if test "$HTOOLS" != yes && test "$ENABLE_CONFD" = True; then
AC_MSG_ERROR(m4_normalize([cannot enable ganeti-confd if
htools support is not enabled]))
fi
AM_CONDITIONAL([WANT_HTOOLS], [test "$HTOOLS" = yes])
AM_CONDITIONAL([WANT_HSTESTS], [test "x$HS_NODEV" = x]) AM_CONDITIONAL([WANT_HSTESTS], [test "x$HS_NODEV" = x])
AM_CONDITIONAL([WANT_HSAPIDOC], [test "$HS_APIDOC" = yes]) AM_CONDITIONAL([WANT_HSAPIDOC], [test "$HS_APIDOC" = yes])
AM_CONDITIONAL([HAS_HLINT], [test "$HLINT"]) AM_CONDITIONAL([HAS_HLINT], [test "$HLINT"])
......
...@@ -31,6 +31,7 @@ DAEMONS=( ...@@ -31,6 +31,7 @@ DAEMONS=(
ganeti-noded ganeti-noded
ganeti-masterd ganeti-masterd
ganeti-rapi ganeti-rapi
ganeti-luxid
) )
_confd_enabled() { _confd_enabled() {
...@@ -39,7 +40,6 @@ _confd_enabled() { ...@@ -39,7 +40,6 @@ _confd_enabled() {
if _confd_enabled; then if _confd_enabled; then
DAEMONS+=( ganeti-confd ) DAEMONS+=( ganeti-confd )
DAEMONS+=( ganeti-luxid )
fi fi
_mond_enabled() { _mond_enabled() {
...@@ -233,7 +233,7 @@ start() { ...@@ -233,7 +233,7 @@ start() {
local usergroup=$(_daemon_usergroup $plain_name) local usergroup=$(_daemon_usergroup $plain_name)
local daemonexec=$(_daemon_executable $name) local daemonexec=$(_daemon_executable $name)
if ( [[ "$name" == ganeti-confd ]] || [[ "$name" == ganeti-luxid ]] ) \ if [[ "$name" == ganeti-confd ]] \
&& ! _confd_enabled; then && ! _confd_enabled; then
echo 'ganeti-confd disabled at build time' >&2 echo 'ganeti-confd disabled at build time' >&2
return 1 return 1
...@@ -292,18 +292,12 @@ check_and_start() { ...@@ -292,18 +292,12 @@ check_and_start() {
start_master() { start_master() {
start ganeti-masterd start ganeti-masterd
start ganeti-rapi start ganeti-rapi
if _confd_enabled; then start ganeti-luxid
start ganeti-luxid
else
return 0
fi
} }
# Stops the master role # Stops the master role
stop_master() { stop_master() {
if _confd_enabled ; then stop ganeti-luxid
stop ganeti-luxid
fi
stop ganeti-rapi stop ganeti-rapi
stop ganeti-masterd stop ganeti-masterd
} }
......
...@@ -735,8 +735,8 @@ def InitCluster(cluster_name, mac_prefix, # pylint: disable=R0913, R0914 ...@@ -735,8 +735,8 @@ def InitCluster(cluster_name, mac_prefix, # pylint: disable=R0913, R0914
raise errors.OpPrereqError("Invalid default iallocator script '%s'" raise errors.OpPrereqError("Invalid default iallocator script '%s'"
" specified" % default_iallocator, " specified" % default_iallocator,
errors.ECODE_INVAL) errors.ECODE_INVAL)
elif constants.HTOOLS: else:
# htools was enabled at build-time, we default to it # default to htools
if utils.FindFile(constants.IALLOC_HAIL, if utils.FindFile(constants.IALLOC_HAIL,
constants.IALLOCATOR_SEARCH_PATH, constants.IALLOCATOR_SEARCH_PATH,
os.path.isfile): os.path.isfile):
......
...@@ -4179,13 +4179,6 @@ blockdevDriverManual = Types.blockDriverToRaw BlockDrvManual ...@@ -4179,13 +4179,6 @@ blockdevDriverManual = Types.blockDriverToRaw BlockDrvManual
qemuimgPath :: String qemuimgPath :: String
qemuimgPath = AutoConf.qemuimgPath qemuimgPath = AutoConf.qemuimgPath
-- | Whether htools was enabled at compilation time
--
-- FIXME: this should be moved next to the other enable constants,
-- such as, 'enableConfd', and renamed to 'enableHtools'.
htools :: Bool
htools = AutoConf.htools
-- | The hail iallocator -- | The hail iallocator
iallocHail :: String iallocHail :: String
iallocHail = "hail" iallocHail = "hail"
......
...@@ -36,12 +36,12 @@ if ! grep -q '^ENABLE_MOND = ' lib/_constants.py; then ...@@ -36,12 +36,12 @@ if ! grep -q '^ENABLE_MOND = ' lib/_constants.py; then
err "Please update $0, mond enable feature is missing" err "Please update $0, mond enable feature is missing"
fi fi
DAEMONS_LIST="noded masterd rapi" DAEMONS_LIST="noded masterd rapi luxid"
STOPDAEMONS_LIST="rapi masterd noded" STOPDAEMONS_LIST="luxid rapi masterd noded"
if grep -q '^ENABLE_CONFD = True' lib/_constants.py; then if grep -q '^ENABLE_CONFD = True' lib/_constants.py; then
DAEMONS_LIST="$DAEMONS_LIST confd luxid" DAEMONS_LIST="$DAEMONS_LIST confd"
STOPDAEMONS_LIST="luxid confd $STOPDAEMONS_LIST" STOPDAEMONS_LIST="confd $STOPDAEMONS_LIST"
fi fi
if grep -q '^ENABLE_MOND = True' lib/_constants.py; then if grep -q '^ENABLE_MOND = True' lib/_constants.py; then
......
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