History | View | Annotate | Download (58.7 kB)
Merge remote-tracking branch 'origin/stable-2.8'
Conflicts: lib/bdev.py lib/cmdlib.py
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Merge stable-2.7 into stable-2.8
Conflicts: INSTALL NEWS configure.ac src/Ganeti/Query/Group.hs test/hs/Test/Ganeti/Objects.hs test/hs/Test/Ganeti/Query/Query.hs
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Disable compiling mon-collector if monitoring is disabled
Mon-collector kept being compiled even if monitoring was disabled duringconfigure.
Fixes Issue 441.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Merge branch 'stable-2.8' into master
Extract DRBD related tests
As the DRBD code was extracted from bdev.py, the corresponding testsshould as well be extracted into their own file. That's what this patchperforms.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Signed-off-by: Michele Tartara <mtartara@google.com>...
Extract command generation logic from DRBD8
In order to easily support the DRBD 8.4 command syntax, this patchextracts all command generation logic (i.e. where calls to `drbdsetup`are assembled) into a new class DRBD83CmdGenerator.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Add `drbdsetup show` parser for DRBD 8.4
Common functionality between the DRBD 8.3 and DRBD 8.4 parser has beenextracted into BaseShowInfo. A test which verifies the behaviour isincluded, but the DRBD84ShowInfo class is not yet used within the DRBD8class....
Extract DRBD info parsing into drbd_info.py
Parsing the status (/proc/drbd) and `drbdsetup show` output takes quitea bit of code, which has to be augmented by even more with the DRBD 8.4support. So extract all the related classes into their own file.
Add test for DRBD 8.4 /proc/drbd parsing
The current parser already supports the output of DRBD 8.4 /proc/drbd,so add tests which actually verify this behaviour.Note that the empty lines in proc_drbd84.txt are actually present in theoutput of DRBD 8.4, they always appear when minors are not contiguous....
Add test for empty version in /proc/drbd
The previous patch removed a (rather implicit) test for /proc/drbd notcontaining a version line. This adds an explicit test for this case.
Add shelltests for hspace allocation
Both tiered and standard allocations are tested, with a single and a doublemin/max instance specification.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Utility functions for storage
This patch add a couple of utility functions dealing withstorage types and disk templates.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Merge branch 'stable-2.7' into stable-2.8
This fixes the problem with the distcheck-release target failing needlessly.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Improve check for "unreleased" versions in NEWS
Currently this is checked only when distcheck-release is called.Check it in check-news instead, for all versions before the "current" one (as defined by configure.ac)
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Conflicts: NEWS doc/rapi.rst
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add unit tests for cfgupgrade with a real configuration
Test upgrade and downgrade from a realistic 2.7 configuration.
Extract DRBD-related classes into block/drbd.py
This is in preparation to introducing support for DRBD8.4.base.py had to be extracted as well in order to avoid cylic importsbetween bdev.py and drbd.py. It now contains the BlockDev class andutility functions needed by bdev.py and drbd.py....
Move lib/bdev.py to lib/block/bdev.py
That's in preparation of extracting DRBD related code from bdev.py. Asbdev.py is already rather long, new features will require to split itinto more manageable pieces. That's why it's moved in an own directory.
Add unit tests for hroller
Add a unit test for hroller in a situation where the orderis completely determined. There are 3 nodes where node 2 has,for each of the other nodes, an instanced shared with it. Sonode 2 has to be a reboot group of its own. There are no more...
Use correct name for design-storagespace.rst
This was renamed in b284f50 but the old name was still in use in themakefile and draft designs list.
Add design doc for device UUIDs and names
This commit adds the design document for adding UUID and name slots to NIC andDisk objects and the ability to refer to them by these slots.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>...
Move HooksMaster out of the mcpu module
We need to do this, so that backend.py doesn't need to import mcpu, andthus indirectly cmdlib. This reduces the size of the node daemon byabout half, which is very important as it is pinned in memory.
This solves Issue 419....
Merge branch 'devel-2.7'
Fix burnin install path
Due to a bug in 8e55e20f burnin's installation path got changed.Moving tools/burnin to the right makefile target reverts this (whilepreserving the value of the original commit).
Add shelltests verifying hail applies disk ipolicy per disk
We test on two minimal examples, a positive and a negative one, wherethe possibility to allocate a node depends on whether the disk policyis checked on a per-disk level or on the total amount of disk space...
Add tool for creating users and groups
When executed in split user mode, Ganeti requires a specific set of usersand groups to be created in the appropriate way.
This commit introduces a tool that takes care of that automatically.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Add script for building chroot
Setting up a proper environment for building a Ganeti can be quite difficult.
This patch adds a script for building a compressed chroot with all therequired libraries and tools.
Add the core of the monitoring daemon
This commit adds the core infrastructure of the monitoring daemon,and integrates it in the build and test systems.
The actual functionality of the monitoring daemon is still completelymissing.
Add design document for the "reason trail"
This commit adds the design document for introducing "reason trails",tracing the reason why opcodes are executed, step by step.
Add user and group for the monitoring agent
This commit adds the user and group variables for the monitoring agent in allthe configuration files where they are required.
Signed-off-by: Iustin Pop <iustin@google.com>...
Fix bug in man build rule
Currently the man page build rule is run without ‘-e’, so the actualchecks in there are just warnings (check-man-warnings,check-man-dashes).
The patch fixes this and also fixes the man pages which made me see theproblem.
Additionally, check-man-dashes is now verbose, otherwise it's hard to...
Fix hscolour style sheet building
Currently we only symlink this into two hard-coded directories, whichbreaks the source code viewing for all the others.
The patch replaces this with automatic building; as playing withrelative symlinks is non-trivial, I just generate it many times (the...
Conflicts: Makefile.am (curl changes and new hs directories)...
Expand Haddock to run over test files as well
This patch does multiple enhancements to the way we build the Haddockdocs, motivated by the fact that if we don't run Haddock over testfiles as well, bad formatting can be submitted and will accumulateover time (without any checks)....
Implement Export queries in Haskell
This is a simple query as it has only two fields, however it's thefirst query that doesn't have a clear 'base' object and 1:1correspondence between such objects and the results (groups, nodes andnetworks do so).
We keep nodes as the 'base' object, since that's what we want to...
Add a Ganeti-specific implementation of Curl Multi
As we want to be able to run queries against multiple nodes inparallel, and furthermore in parallel with other work, we need toimplement the Curl Multi interface (see libcurl-multi(3)).
This patch adds a Ganeti-specific such implementation, to be used...
Switch the curl bindings from optional to required
Currently, we support curl being optional via some sporting exercises:ifdefs in the code, data types that represent 'Curl is disabled'state, etc. However, with the future work on RPC, we would have toeven make the dependencies list conditional on it, etc. This is too...
Makefile: Add dependencies
The RAPI documentation now depends on “connector.py” (handlerregistration) and “rlib2.py” (access permissions).
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Unit tests for Query/Network.hs
This patch adds a couple of unit tests for Query/Network.hs.Note that they'll need to be adapted, once issue 362 is addressed.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add Haskell parser for "xm uptime"
In order to fetch precise information about the uptime of the VMsrunning in Xen, we need to analyze the output of the "xm uptime" command.
This commit adds the parser to do that, and its tests.
Add Haskell parser for "xm list --long"
In order to fetch precise information about the status of the VMs running inXen, we need to analyze the output of the "xm list --long" command.
Design correct reporting of storage free space
This is a long standing bug in Ganeti. Add a small design on how we planto fix this for Ganeti 2.7.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Rename lib/objectutils to outils.py
Back when this was introduced, I mentioned that it breaks heavily tabcompletion (ob<TAB> doesn't work anymore), but at that moment I didn'thave a suggestion what to name it. I think outils is good and shortenough, and doesn't conflict with anything else, so here it goes....
Add hroller design to Makefile and design-drafts
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Finish the remote→restricted commands rename
The documentation still points to /etc/ganeti/remote-commands,although the code is already using restricted-command. Update thedocumentation and a few docstrings accordingly.
Add unit tests for RADOSBLockDevice
Add unit tests for the RADOSBlockDevice JSON output parsing function,and modify the unit tests for the plain output parsing function towork with the new code.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>Reviewed-by: Guido Trotter <ultrotter@google.com>
Refactor storage of runtime exclusive storage flag in QA
This is a follow-up for “qa_config: Remove exclusive storage flag fromconfig”. Instead of storing the flag in a module-level variable it isnow stored within the new QA configuration class and unit tests are...
Workaround hlint behaviour with no warnings/errors
When hlint sees a perfectly nice code tree, it will skip generatingthe reports (both stdout and html). This means that usually the oldreport will remain in place, so it makes development harder, as the...
Add some more Haskell/Python equivalence tests
This would have caught the log file problem fixed in the previouspatch (9411474b), for example. Also we test user/group equivalence,name only.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Program/Harep.hs: add skeleton for the new auto-repair tool
harep(1) detects certain kind of problems with instances and applies theallowed set of solutions. See doc/design-autorepair.rst.
Signed-off-by: Dato Simó <dato@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
First part of Network Queries in Haskell
This is the beginning of the implementation of networkqueries. This includes establishing all infrastructureto run the network queries and implement querying ofsome simpler fields and the node group listing.
Signed-off-by: Helga Velroyen <helgav@google.com>...
hv_xen: Refactor getting node information, add tests
Refactor and add tests for getting node (Domain-0) information.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
hv_xen: Refactor running & parsing "xm list", add tests
This patch refactors “_RunXmList” and adds some tests.
Make Xen config path a build-time option
Stop hardcoding the path in “hv_xen.py”.
Makefile.am: Protect placeholders for sed
If the placeholder has exactly the same name as the variable used inautoconf it would be replaced as well. In the case of“ENABLE_SPLIT_QUERY” this led to the sed command “s#False#False#g”.Inserting additional quotes after the first @ sign prevents this....
ENABLE_SPLIT_QUERY
Makefile: Allow tarball creation when man-in-doc is active
Documentation with included man pages should not be distributed as itcontains fixed paths. Since the documentation with man pages is actuallywritten to a separate directory, tarball creation is still possible....
run-in-tempdir: Copy doc/* only if needed
To preserve disk space on copying all files to a temporary directory,the “doc” directory is only copied when building documentation. Acomment describing the need is also added to Makefile.am, as well as asuperfluous direct invocation of Bash removed....
Add reporting infrastructure for data collectors
This commit adds the part of the JSON report generation code that will becommon to all the data collectors, according to the format specified in thedesign document.
burnin: Add unittest for supported disk templates
When new a new disk template is added, burnin should be updated.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Move burnin to ganeti.tools.burnin
Similar to other scripts, “tools/burnin” just becomes a wrapper script.
Link man pages in documentation
This patch depends on “Option to include man pages in documentation”. Inthe documentation build including man pages, all “:manpage:`…`”references are converted to links. For man pages not provided by Ganeti,Sphinx' standard formatting is used....
Option to include man pages in documentation
Before this patch, HTML versions of man pages (man/*.rst) were alreadybuilt. However, since they are separate from the normal documentation,their content is not indexed for Sphinx' search functionality.Additionally it would simply be nice to have everything in one place....
kvm: add two help dump files
One is the --help output for kvm 1.1.2 and the second one is the same as0.9.1 but with a fake option added between -drive and its boot=on|offoption: this tests that if boot=on|off appears in another option after-drive it is not accepted by our regexp....
Generate documentation from build directory
When man pages should be included they need to be copied from man/*.rst.This means documentation can no longer be built from the static reSTfiles alone (which are referenced using “abs_top_srcdir”). Similar to...
Add script to check man page references
This script checks for some of the most obvious mistakes when formattingman page references (which should have the form “**ganeti**\(7)”). Whilethis works now, it is very hard to avoid ambiguities (e.g. references...
Makefile: Fix list of directories
Commit dbee5c9 had a wrong path.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Highlight external links in HTML documentation
Based on MediaWiki's monobook skin.
Unit tests for bdev and utils.lvm
Also amended a comment of a tested method.The tests are for methods introduced in commit 63c73073 (LVM disk creationuses dedicated PVs).
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Support instance-minor pairing in the DRBD collector
This commits enables the DRBD data collector to use the Confd client togather information about the pairing between DRBD minors and instances.
For testing purposes, the DRBD data collector now requires either zero...
Add footer.rst as a dependency for all man pages
Commit 6aff051 removed an intermediate step, but forgot to add“footer.rst” as a direct dependency.
Remove intermediate footer.man/footer.html files
I don't remember why I introduced these when switching to pandoc, butthey are not absolutely needed. Instead of pre-generating them (whichmight save some trivial cpu time), we can simply pass footer.rst as an...
Enable a table of contents for the html version of man pages
This makes the (very dull) html version of the man pages a bit morereadable, until such a time that we can switch over to sphinx fully.
Stop manually building images out of dot files
The first dot files we added way back in the 2.0 release are managedmanually: we build the .pngs ourselves, track them in .gitingore,etc. Since then, we have switched to allow sphinx to build/manage themitself, so it makes sense to cleanup the build system and covert...
Inline the standalone dot files
This removes entirely the standalone dot files by inlining them in theRST documents - as they weren't referenced from more than one documenteither way.
Add small webserver for development
When working on documentation it can be helpful to use a browser. Insome environments it's not possible to access the files directly from agraphical browser. This trivial webserver exports all files in thecurrent directory and unlike alternatives such as thttpd, doesn't check...
Makefile.am: Add missing space
Commit acaf3ca missed this space before a backslash.
Fix the installation location of mon-collector
The mon-collector binary was erroneously installed twice: once in/usr/bin/ and once in /usr/lib/ganeti/.With this modification, it is now installed in /usr/lib/ganeti/ only,as intended.
In order to do this in a proper way, some parts of the Makefile.am where...
Move src/Ganeti/HTools/Program.hs to Program/Main.hs
This removes one more tab conflict; this is the last module in ourcode where we have both x.hs and x/.
Furthermore, we collapse all actual code into the new Main.hs module,leaving the htools.hs basically empty (will allow better testing in...
A bit more name cleanup
- gen-coverage → gen-py-coverage- coverage-htools.tix → coverage-hs.tix
Split the hs-check test rule
Currently, both the unit test and the shell tests are run (manually)from this rule. This has two downsides: you can't (compile and) runjust one of them easily, and make can't run them in parallel.
By splitting the rules, we can both of the above easily....
Rename test/hs/test to htest
The current base name of 'test' means that this binary will generateprofiling, coverage, etc. files with the name 'test.*', result intab-completion conflicts with the test directory. Let's slightlychange its base name for typing easiness....
Move htest/ files under the test/ tree
htest/data becomes test/data/htools (basically reverting commit8feabc89), and htest/* becomes test/hs/*.
Most changes beside the rename are trivial s/…/…, with the exceptionof autotools/run-in-tempdir, which needed some more changes now that...
Move python test files to test/py
This is the first step of the test files reorganisation: moving test/*(except test/data) to new directory test/py/.
Replace htools→hs in configure/makefile rules
This continues the cleanup of the 'htools' name, by replacing 'htools'with 'hs' in configure and makefile rules.
There is still 'WANT_HTOOLS' left as it is correct, but some of theconditionals in Makefile.am will need some cleanup (in a different...
Fix dependency on built python sources for hs-check
Since we call into Python for opcodes and other type compatibilitychecks, we need to ensure that the python sources arebuilt. Otherwise, full parallel make might or might not break,depending on timing....
Rename htools/ to src/
Per offline discussions, this is the first patch of therenames. Tested with "make distcheck", seems to work fine.
The only change outside of the renaming is a bit of simplification inthe .gitignore rules; otherwise, simply s/htools/src/....
Fix building of Constants.hs w.r.t .pyc files
Unless this is run under run-in-tempdir, it will create as usual the.pyc files.
Add ExtStorage related man pages
Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add the gnt-storage client
Add a new client called 'gnt-storage'.The client interacts with the ExtStorage interface, similarly tothe way gnt-os interacts with the OS interface.
For now, only two commands are supported: 'info' and 'diagnose'.
'diagnose' calculates the node status of each provider on each node,...
Extend the hcheck shell tests
This adds a few new hcheck tests, to extend the coverage.
Extend the hbal shell tests
After this patch, almost all of hbal except the actual Luxi executionis being covered by unit- or shelltests.
Fix build after addition of 'empty-cluster.data'
Of course I forgot to add this to TEST_FILES… and only distcheckcatches it.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Added class to contain information about a PV
This makes the code more readable and easier to upgrade.bdev.LogicalVolume.GetPVInfo and the code that depends on it have beenrefactored to use the new class.
utils.CheckVolumeGroupSize() has been moved to lib/utils/lvm.py, where more...
Add Confd client to the Haskell code base
The client queries all the master candidates in parallel, until the minimumnumber of replies, defined in the constant file, is received.A timeout prevents the waiting from being of indefinite length.
The reply to be returned to the function that made the query is decided...
Implement the External Storage Interface
With this commit we introduce the External Storage Interfaceto Ganeti, abbreviated: ExtStorage Interface.
The ExtStorage Interface provides Ganeti with the ability to interactwith externally connected shared storage pools, visible by all...
Add hroller htools personality
This is a new personality that for the moment doesn't do anything.