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:
- `bytestring <http://hackage.haskell.org/package/bytestring>`_ and
`utf8-string <http://hackage.haskell.org/package/utf8-string>`_
libraries; these usually come with the GHC compiler
- `text <http://hackage.haskell.org/package/text>`_
- `deepseq <http://hackage.haskell.org/package/deepseq>`_
- `curl <http://hackage.haskell.org/package/curl>`_, tested with
versions 1.3.4 and above
- `hslogger <http://software.complete.org/hslogger>`_, version 1.1 and
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::
$ apt-get install ghc libghc-json-dev libghc-network-dev \
libghc-parallel-dev libghc-deepseq-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)::
......@@ -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::
$ 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 Haskell platform. You can also install ``cabal`` manually::
The most recent Fedora doesn't provide ``crypto``, ``inotify``. So these
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
$ cabal update
Then install the additional libraries (only the ones not available in your
distribution packages) via ``cabal``::
Then install the additional native libraries::
$ 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
~~~~~~~~~~~~~~~~~~~~~~~~~
Optionally, more functionality can be enabled if your build machine has
a few more Haskell libraries enabled: the ``ganeti-confd`` and
``ganeti-luxid`` daemon (``--enable-confd``) and the monitoring daemon
(``--enable-mond``). The list of extra dependencies for these is:
a few more Haskell libraries enabled: the ``ganeti-confd`` daemon
(``--enable-confd``) and the monitoring daemon (``--enable-mond``).
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
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::
$ apt-get install libghc-crypto-dev libghc-text-dev \
libghc-hinotify-dev libghc-regex-pcre-dev \
libpcre3-dev \
libghc-attoparsec-dev libghc-vector-dev \
libghc-snap-server-dev
$ apt-get install 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 Crypto text hinotify==0.3.2 regex-pcre \
attoparsec vector snap-server
$ cabal install snap-server
to install them.
to install it.
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
......@@ -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 \
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:
.. note::
If one of the cabal packages fails to install due to unfulfilled
......
......@@ -282,17 +282,13 @@ GENERATED_FILES = \
$(PYTHON_BOOTSTRAP) \
$(gnt_python_sbin_SCRIPTS)
HS_GENERATED_FILES =
if WANT_HTOOLS
HS_GENERATED_FILES += $(HS_PROGS)
HS_GENERATED_FILES = $(HS_PROGS) src/hluxid src/ganeti-luxid
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
if ENABLE_MOND
HS_GENERATED_FILES += src/ganeti-mond
endif
endif
built_base_sources = \
stamp-directories \
......@@ -991,9 +987,7 @@ qa_scripts = \
qa/qa_utils.py \
qa/rapi-workload.py
bin_SCRIPTS =
if WANT_HTOOLS
bin_SCRIPTS += $(HS_BIN_PROGS)
bin_SCRIPTS = $(HS_BIN_PROGS)
install-exec-hook:
@mkdir_p@ $(DESTDIR)$(iallocatorsdir)
# FIXME: this is a hardcoded logic, instead of auto-resolving
......@@ -1002,7 +996,6 @@ install-exec-hook:
for role in $(HS_BIN_ROLES); do \
$(LN_S) -f htools $(DESTDIR)$(bindir)/$$role ; \
done
endif
HNORMAL_SUFFIX = .o
HPROFILE_SUFFIX = .prof.o
......@@ -1879,7 +1872,6 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in $(PRINT_PY_CONSTANTS) \
-DMOND_GROUP="$(MOND_GROUP)" \
-DDISK_SEPARATOR="$(DISK_SEPARATOR)" \
-DQEMUIMG_PATH="$(QEMUIMG_PATH)" \
-DHTOOLS="True" \
-DENABLE_CONFD="$(ENABLE_CONFD)" \
-DXEN_CMD="$(XEN_CMD)" \
-DENABLE_RESTRICTED_COMMANDS="$(ENABLE_RESTRICTED_COMMANDS)" \
......@@ -2378,7 +2370,7 @@ TAGS: $(GENERATED_FILES)
.PHONY: coverage
COVERAGE_TESTS=
if WANT_HTOOLS
if HS_UNIT
COVERAGE_TESTS += hs-coverage
endif
if PY_UNIT
......
......@@ -57,11 +57,6 @@ Incompatible/important changes
as well as the --enable-split-queries configuration option.
- Orphan volumes errors are demoted to warnings and no longer affect the exit
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
~~~~~~~~~~~~
......
......@@ -848,10 +848,9 @@ def main():
WriteHaskellCompletion(sw, "daemons/ganeti-cleaner", htools=False,
debug=not options.compact)
# htools, if enabled
if _constants.HTOOLS:
for script in _constants.HTOOLS_PROGS:
WriteHaskellCompletion(sw, script, htools=True, debug=debug)
# htools
for script in _constants.HTOOLS_PROGS:
WriteHaskellCompletion(sw, script, htools=True, debug=debug)
# ganeti-confd, if enabled
if _constants.ENABLE_CONFD:
......
......@@ -545,18 +545,21 @@ AC_GHC_PKG_REQUIRE(base64-bytestring-1.*, t)
AC_GHC_PKG_REQUIRE(utf8-string)
AC_GHC_PKG_REQUIRE(zlib)
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
HS_NODEV=
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
AC_GHC_PKG_CHECK([regex-pcre], [HS_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
if test "$enable_confd" != no; then
......@@ -580,12 +583,8 @@ AM_CONDITIONAL([ENABLE_CONFD], [test x$has_confd = xTrue])
#extra modules for monitoring daemon functionality; also needed for tests
MONITORING_PKG=
AC_GHC_PKG_CHECK([attoparsec], [],
[HS_NODEV=1; MONITORING_PKG="$MONITORING_PKG attoparsec"])
AC_GHC_PKG_CHECK([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
if test "$enable_monitoring" != no; then
......@@ -639,9 +638,7 @@ else
AC_MSG_NOTICE([Haskell development modules found, unittests enabled])
fi
AC_SUBST(HS_NODEV)
HTOOLS=yes
AC_SUBST(HTOOLS)
AM_CONDITIONAL([HS_UNIT], [test -n $HS_NODEV])
# Check for HsColour
HS_APIDOC=no
......@@ -671,12 +668,6 @@ if test -z "$HLINT"; then
AC_MSG_WARN([hlint not found, checking code will not be possible])
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_HSAPIDOC], [test "$HS_APIDOC" = yes])
AM_CONDITIONAL([HAS_HLINT], [test "$HLINT"])
......
......@@ -31,6 +31,7 @@ DAEMONS=(
ganeti-noded
ganeti-masterd
ganeti-rapi
ganeti-luxid
)
_confd_enabled() {
......@@ -39,7 +40,6 @@ _confd_enabled() {
if _confd_enabled; then
DAEMONS+=( ganeti-confd )
DAEMONS+=( ganeti-luxid )
fi
_mond_enabled() {
......@@ -233,7 +233,7 @@ start() {
local usergroup=$(_daemon_usergroup $plain_name)
local daemonexec=$(_daemon_executable $name)
if ( [[ "$name" == ganeti-confd ]] || [[ "$name" == ganeti-luxid ]] ) \
if [[ "$name" == ganeti-confd ]] \
&& ! _confd_enabled; then
echo 'ganeti-confd disabled at build time' >&2
return 1
......@@ -292,18 +292,12 @@ check_and_start() {
start_master() {
start ganeti-masterd
start ganeti-rapi
if _confd_enabled; then
start ganeti-luxid
else
return 0
fi
start ganeti-luxid
}
# Stops the master role
stop_master() {
if _confd_enabled ; then
stop ganeti-luxid
fi
stop ganeti-luxid
stop ganeti-rapi
stop ganeti-masterd
}
......
......@@ -735,8 +735,8 @@ def InitCluster(cluster_name, mac_prefix, # pylint: disable=R0913, R0914
raise errors.OpPrereqError("Invalid default iallocator script '%s'"
" specified" % default_iallocator,
errors.ECODE_INVAL)
elif constants.HTOOLS:
# htools was enabled at build-time, we default to it
else:
# default to htools
if utils.FindFile(constants.IALLOC_HAIL,
constants.IALLOCATOR_SEARCH_PATH,
os.path.isfile):
......
......@@ -4179,13 +4179,6 @@ blockdevDriverManual = Types.blockDriverToRaw BlockDrvManual
qemuimgPath :: String
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
iallocHail :: String
iallocHail = "hail"
......
......@@ -36,12 +36,12 @@ if ! grep -q '^ENABLE_MOND = ' lib/_constants.py; then
err "Please update $0, mond enable feature is missing"
fi
DAEMONS_LIST="noded masterd rapi"
STOPDAEMONS_LIST="rapi masterd noded"
DAEMONS_LIST="noded masterd rapi luxid"
STOPDAEMONS_LIST="luxid rapi masterd noded"
if grep -q '^ENABLE_CONFD = True' lib/_constants.py; then
DAEMONS_LIST="$DAEMONS_LIST confd luxid"
STOPDAEMONS_LIST="luxid confd $STOPDAEMONS_LIST"
DAEMONS_LIST="$DAEMONS_LIST confd"
STOPDAEMONS_LIST="confd $STOPDAEMONS_LIST"
fi
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