Extract node related logical units from cmdlib
[ganeti-local] / Makefile.am
index 47cca9f..cc9d2d2 100644 (file)
@@ -40,6 +40,7 @@ SHELL_ENV_INIT = autotools/shell-env-init
 # Note: these are automake-specific variables, and must be named after
 # the directory + 'dir' suffix
 clientdir = $(pkgpythondir)/client
+cmdlibdir = $(pkgpythondir)/cmdlib
 hypervisordir = $(pkgpythondir)/hypervisor
 httpdir = $(pkgpythondir)/http
 masterddir = $(pkgpythondir)/masterd
@@ -71,6 +72,7 @@ HS_DIRS = \
        src/Ganeti/HTools/Program \
        src/Ganeti/Hypervisor \
        src/Ganeti/Hypervisor/Xen \
+       src/Ganeti/Monitoring \
        src/Ganeti/Query \
        test/hs \
        test/hs/Test \
@@ -92,6 +94,7 @@ DIRS = \
        autotools \
        daemons \
        devel \
+       devel/data \
        doc \
        doc/css \
        doc/examples \
@@ -103,6 +106,7 @@ DIRS = \
        lib \
        lib/build \
        lib/client \
+       lib/cmdlib \
        lib/confd \
        lib/http \
        lib/hypervisor \
@@ -177,6 +181,8 @@ CLEANFILES = \
        $(SHELL_ENV_INIT) \
        daemons/daemon-util \
        daemons/ganeti-cleaner \
+       devel/squeeze-amd64.tar.gz \
+       devel/squeeze-amd64.conf \
        $(mandocrst) \
        doc/manpages-enabled.rst \
        $(BUILT_EXAMPLES) \
@@ -186,6 +192,7 @@ CLEANFILES = \
        $(man_MANS) \
        $(manhtml) \
        tools/kvm-ifup \
+       tools/users-setup \
        tools/vcluster-setup \
        stamp-directories \
        stamp-srclinks \
@@ -193,6 +200,7 @@ CLEANFILES = \
        $(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
        $(HS_BUILT_TEST_HELPERS) \
        src/ganeti-confd \
+       src/ganeti-mond \
        .hpc/*.mix src/*.tix test/hs/*.tix \
        doc/hs-lint.html
 
@@ -207,6 +215,10 @@ HS_GENERATED_FILES += $(HS_PROGS)
 if ENABLE_CONFD
 HS_GENERATED_FILES += src/hconfd src/ganeti-confd
 endif
+
+if ENABLE_MOND
+HS_GENERATED_FILES += src/ganeti-mond
+endif
 endif
 
 built_base_sources = \
@@ -250,12 +262,12 @@ pkgpython_PYTHON = \
        lib/bdev.py \
        lib/bootstrap.py \
        lib/cli.py \
-       lib/cmdlib.py \
        lib/compat.py \
        lib/config.py \
        lib/constants.py \
        lib/daemon.py \
        lib/errors.py \
+       lib/hooksmaster.py \
        lib/ht.py \
        lib/jqueue.py \
        lib/jstore.py \
@@ -295,6 +307,17 @@ client_PYTHON = \
        lib/client/gnt_os.py \
        lib/client/gnt_storage.py
 
+cmdlib_PYTHON = \
+       lib/cmdlib/__init__.py \
+       lib/cmdlib/common.py \
+       lib/cmdlib/base.py \
+       lib/cmdlib/cluster.py \
+       lib/cmdlib/group.py \
+       lib/cmdlib/node.py \
+       lib/cmdlib/tags.py \
+       lib/cmdlib/network.py \
+       lib/cmdlib/test.py
+
 hypervisor_PYTHON = \
        lib/hypervisor/__init__.py \
        lib/hypervisor/hv_base.py \
@@ -383,6 +406,7 @@ docinput = \
        doc/design-bulk-create.rst \
        doc/design-chained-jobs.rst \
        doc/design-cpu-pinning.rst \
+       doc/design-device-uuid-name.rst \
        doc/design-draft.rst \
        doc/design-htools-2.3.rst \
        doc/design-http-server.rst \
@@ -406,7 +430,7 @@ docinput = \
        doc/design-virtual-clusters.rst \
        doc/design-x509-ca.rst \
        doc/design-hroller.rst \
-       doc/design-storagespace.rst \
+       doc/design-storagetypes.rst \
        doc/devnotes.rst \
        doc/glossary.rst \
        doc/hooks.rst \
@@ -432,11 +456,15 @@ mandocrst = $(addprefix doc/man-,$(notdir $(manrst)))
 HS_BIN_PROGS=src/htools
 
 # Haskell programs to be installed in the MYEXECLIB dir
+if ENABLE_MOND
 HS_MYEXECLIB_PROGS=src/mon-collector
+else
+HS_MYEXECLIB_PROGS=
+endif
 
-# Haskell programs to compiled but not installed automatically
-# Usually they have their own specific installation rules
+# Haskell programs to be compiled by "make really-all"
 HS_COMPILE_PROGS= \
+       src/ganeti-mond \
        src/hconfd \
        src/rpc-test
 
@@ -530,6 +558,7 @@ HS_LIB_SRCS = \
        src/Ganeti/Jobs.hs \
        src/Ganeti/Logging.hs \
        src/Ganeti/Luxi.hs \
+       src/Ganeti/Monitoring/Server.hs \
        src/Ganeti/Network.hs \
        src/Ganeti/Objects.hs \
        src/Ganeti/OpCodes.hs \
@@ -828,6 +857,10 @@ src/ganeti-confd: src/hconfd
 nodist_sbin_SCRIPTS += src/ganeti-confd
 endif
 
+if ENABLE_MOND
+nodist_sbin_SCRIPTS += src/ganeti-mond
+endif
+
 python_scripts = \
        tools/cfgshell \
        tools/cfgupgrade \
@@ -842,6 +875,7 @@ python_scripts = \
 
 dist_tools_SCRIPTS = \
        $(python_scripts) \
+       tools/burnin \
        tools/kvm-console-wrapper \
        tools/master-ip-setup \
        tools/xen-console-wrapper
@@ -851,6 +885,7 @@ nodist_tools_python_scripts = \
 
 nodist_tools_SCRIPTS = \
        $(nodist_tools_python_scripts) \
+       tools/users-setup \
        tools/vcluster-setup
 
 pkglib_python_scripts = \
@@ -858,7 +893,6 @@ pkglib_python_scripts = \
        tools/check-cert-expired
 
 nodist_pkglib_python_scripts = \
-       tools/burnin \
        tools/ensure-dirs \
        tools/node-daemon-setup \
        tools/prepare-node-join
@@ -901,6 +935,7 @@ EXTRA_DIST = \
        devel/upload \
        devel/webserver \
        tools/kvm-ifup.in \
+       tools/users-setup.in \
        tools/vcluster-setup.in \
        $(docinput) \
        doc/html \
@@ -933,6 +968,7 @@ man_MANS = \
        man/ganeti-confd.8 \
        man/ganeti-listrunner.8 \
        man/ganeti-masterd.8 \
+       man/ganeti-mond.8 \
        man/ganeti-noded.8 \
        man/ganeti-os-interface.7 \
        man/ganeti-extstorage-interface.7 \
@@ -975,24 +1011,31 @@ TEST_FILES = \
        test/data/htools/common-suffix.data \
        test/data/htools/empty-cluster.data \
        test/data/htools/hail-alloc-drbd.json \
+       test/data/htools/hail-alloc-invalid-twodisks.json \
+       test/data/htools/hail-alloc-twodisks.json \
        test/data/htools/hail-change-group.json \
        test/data/htools/hail-invalid-reloc.json \
        test/data/htools/hail-node-evac.json \
        test/data/htools/hail-reloc-drbd.json \
        test/data/htools/hbal-excl-tags.data \
        test/data/htools/hbal-split-insts.data \
+       test/data/htools/hspace-tiered-dualspec.data \
+       test/data/htools/hspace-tiered.data \
        test/data/htools/invalid-node.data \
        test/data/htools/missing-resources.data \
+       test/data/htools/multiple-master.data \
        test/data/htools/n1-failure.data \
        test/data/htools/rapi/groups.json \
        test/data/htools/rapi/info.json \
        test/data/htools/rapi/instances.json \
        test/data/htools/rapi/nodes.json \
+       test/data/htools/unique-reboot-order.data \
        test/hs/shelltests/htools-balancing.test \
        test/hs/shelltests/htools-basic.test \
        test/hs/shelltests/htools-dynutil.test \
        test/hs/shelltests/htools-excl.test \
        test/hs/shelltests/htools-hail.test \
+       test/hs/shelltests/htools-hroller.test \
        test/hs/shelltests/htools-hspace.test \
        test/hs/shelltests/htools-invalid.test \
        test/hs/shelltests/htools-multi-group.test \
@@ -1020,6 +1063,8 @@ TEST_FILES = \
        test/data/bdev-rbd/output_invalid.txt \
        test/data/cert1.pem \
        test/data/cert2.pem \
+       test/data/cluster_config_2.7.json \
+       test/data/cluster_config_downgraded_2.7.json \
        test/data/instance-minor-pairing.txt \
        test/data/ip-addr-show-dummy0.txt \
        test/data/ip-addr-show-lo-ipv4.txt \
@@ -1207,6 +1252,7 @@ all_python_code = \
        $(python_tests) \
        $(pkgpython_PYTHON) \
        $(client_PYTHON) \
+       $(cmdlib_PYTHON) \
        $(hypervisor_PYTHON) \
        $(rapi_PYTHON) \
        $(server_PYTHON) \
@@ -1279,6 +1325,10 @@ tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
        sed -f $(REPLACE_VARS_SED) < $< > $@
        chmod +x $@
 
+tools/users-setup: tools/users-setup.in $(REPLACE_VARS_SED)
+       sed -f $(REPLACE_VARS_SED) < $< > $@
+       chmod +x $@
+
 tools/vcluster-setup: tools/vcluster-setup.in $(REPLACE_VARS_SED)
        sed -f $(REPLACE_VARS_SED) < $< > $@
        chmod +x $@
@@ -1647,7 +1697,7 @@ check-local: check-dirs $(GENERATED_FILES)
        $(CHECK_PYTHON_CODE) $(check_python_code)
        PYTHONPATH=. $(CHECK_HEADER) $(check_python_code)
        $(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
-       $(CHECK_NEWS) < $(top_srcdir)/NEWS
+       RELEASE=$(PACKAGE_VERSION) $(CHECK_NEWS) < $(top_srcdir)/NEWS
        PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . $(standalone_python_modules)
        @expver=$(VERSION_MAJOR).$(VERSION_MINOR); \
        error= ; \
@@ -1788,18 +1838,12 @@ distcheck-hook:
          echo "Found empty files or directories in final archive." 1>&2; \
          exit 1; \
        fi
-       if test -n "$(BUILD_RELEASE)" && \
-          grep -n -H -E '^\*.*unreleased' $(top_distdir)/NEWS; then \
-          echo "Found unreleased version in NEWS." >&2; \
-          exit 1; \
-       fi
        if test -e $(top_distdir)/doc/man-html; then \
          echo "Found documentation including man pages in final archive" >&2; \
          exit 1; \
        fi
 
-# When building a release, stricter checks should be used
-distcheck-release dist-release: export BUILD_RELEASE = 1
+# Backwards compatible distcheck-release target
 distcheck-release: distcheck
 
 distrebuildcheck: dist