History | View | Annotate | Download (14.4 kB)
Introduce Mlockall()
Add Mlockall() utility to lock current process' virtual adress space into RAM.
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add RAPI client utility module with RAPI PollJob function
The RAPI client module shouldn't depend on any Ganeti module, yet it'suseful to have some Ganeti-specific code, like a PollJob function forRAPI.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Add separate module for backported language functionality
utils.py, where they were before, is already huge.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add make commit-check target
distcheck, lint and apidoc. Take three pay only one.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Complete check-man changes from 5fa16422
Commit 5fa16422 removed the checks at sed time, but only for %.7. Weneed to do it for %.8 too.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Makefile.am: sort lists, clean *.py[co] from all directories
*.py[co] were not removed from lib/confd. Removing *.py[co]from all directories listed in $DIRS can't hurt.
Add basic unittests for uid_pool
Signed-off-by: Balazs Lecz <leczb@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add --uid-pool option to gnt-cluster modify
Forward-port the ganeti 2.0 cfgupgrade
2.1's cfgupgrade doesn't support upgrading from 1.2, only from 2.0.However, it's trivial to forward-port the 2.0 cfgupgrade to work with2.1, thus providing an upgrade path for 1.2 users directly to 2.1,without the intermediate step of installing 2.0....
Add a new tool: sanitize-config
This can be used for two purposes:
- safety copy of the config file, with just the secrets changed- cleanup of the config file (full randomization), so that (e.g.) users could send a broken config file to the devel-list...
Rename the confd_client unittest (to confd.client)
This is to keep same naming across all tests (modules separate with dot,followed by _unittest.py).
Adding RAPI client library.
Signed-off-by: David Knowles <dknowles@google.com>Reviewed-by: Iustin Pop <iustin@google.com>Signed-off-by: Iustin Pop <iustin@google.com>(modified slightly the unittest to account for missing httplib2 library)
Fix two issues related to check-man
First, we don't need to check man pages at sed time, because this meanseveryone building the package will do - we only need to check at docbooktime, which is mostly at developer time.
Second, don't force LC_ALL to C, as this breaks newer man-db. I've...
Add unittest for daemon-util
This test doesn't cover everything, but it's better than nothing.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add support for non-Python unittests
Add unittests for ganeti.errors
utils: Add function to extract X509 cert validity
X509 uses ASN1 GENERALIZEDTIME or UTCTIME to store certificate validity.pyOpenSSL 0.7 and above allow us to retrieve both “notBefore” and“notAfter” as strings. Parsing them turned out to be a challenge since...
Implement disabling of file-based storage
Rationale: the file-based storage backend can add/remove files under acertain directory. However, the master node is also controlling thesetting of the file-based root directory, so basically it means we can'tprevent arbitrary modifications by the master of the node's filesystem....
Make SSH_CONFIG_DIR customizable
This patch adds ability to customize ssh config directory with --with-ssh-config-dir(instead of hardcoded /etc/ssh value). This is useful in Linux distributions withcustom ssh config directories (/etc/openssh in ALTLinux, for example)....
Adding tool for automated cluster-merger
This is the implementation of docs/design-cluster-merger.rst. It allowsthe automatic merging of one or more clusters into the invoking cluster.
While this version is tested and working it still needs some tweaking...
Add make target to generate unittest coverage report
Add unittests for ganeti.opcodes
According to “coverage”, this covers 99% of the code.
Add function to reset tempfile module after fork
On fork, the tempfile module's pseudo random generator isnot reset. If several processes (e.g. two children or parentand child) try to create a temporary file, they'll conflict.This function can be used to reset the name generator which...
Revert "Workaround man page output for long PREFIX dirs"
This reverts commit 83d9f4366f3aa9ae360e27bfe6619402793e9eb5.
man is still unable to wrap some long lines, so we simply revert this patch(and filter out the specific message in autotools/check-man)....
Workaround man page output for long PREFIX dirs
A long PREFIX variable (to configure) will result in very longLOCALSTATEDIR, which when concatenated with lib/ganeti/ (and even moreitems under it) will go over the 80 char line length we enforce in theman checker....
Check built manpages for errors
One fix is necessary in gnt-cluster.sgml. Also adding “DELETE_ON_ERROR”target to remove output file if an error occurred while building it (inthis case the manpage).
This was reported by Iustin Pop in issue 87 and proposed check method...
Makefile.am: Targets used directly should depend on BUILT_SOURCES
Add capability to use syslog for logging
This patch adds a configure-time parameter that will set the defaultsused by all programs, and command-line parameters in the daemons thatallow overriding it.
Syslog 'yes' enables syslog in addition to file-based logging, 'only'...
Add a crude disable for DRBD barriers
Ideally we want to/will have per-device DRBD controls of disk/metadataflushes. In the meantime, we want at least a disable of the barrierfunctionality for cases where one has battery-backed caches.
Background: DRBD has four mechanism of handling ordered disk-writes....
Don't use hardcoded name for pylint
Look it up at configure time instead.
Partially revert "Makefile.am: Run pylint on all Python code"
This partially reverts commit e4e7c7df3a2356103c2442a91d628ca0470fb267,which made newer pylint versions fail.
Makefile.am: Run pylint on all Python code
That is, all Python code except unittests. In particular,autotool/build-bash-completion was missing from theprevious list.
Provide example default files and install one for development
Allow passing options to pylint in the lint rule
This allows automated builders to override the format, for example.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Introduce a makefile lint rule
This runs pylint over all the python files. Yes, it takes a long while,but it's the only way to properly analyze the source codes as only inthis way pylint can see all uses of the various modules/classes/etc.
Signed-off-by: Iustin Pop <iustin@google.com>...
Update the _autoconf.py make rule for pylint
This adds targeted pylint disables, but since _autoconf.py isautogenerated we need to do this in Makefile.am (hence the separatepatch).
build-bash-completion: Check for None before comparing
Comparing a number with None is not a good idea:
>>> (0 < None, 0 > None) (False, True)
This patch also adds build-bash-completion to the listof checked Python scripts and wraps one line of more...
sphinx: Treat warnings as errors
This makes it easier to catch warnings.
Include INSTALL in documentation
Fix and simplify socat escape detection
- Program paths should not be --with-… options (see Autoconf docs)- Simplify checks for escape functionality- Make SOCAT_USE_ESCAPE variable a bool
Use “daemon-util” to reload SSH keys
Remove the KVM_MIGRATION_PORT configure.ac param
Since this is easily configurable at run-time, we remove theconfigure-time parameter. If anyone is building custom packages, thenthe default can be tweaked by a one-line patch to constants.py.
Note that this also fixes the type of parameter, the default from...
Add new “daemon-util” script to start/stop Ganeti daemons
Until now, Ganeti started and stopped its own daemons using custom functions.To start, the daemon was just executed and then sent the appropriate signals tostop it again. Init scripts would have to pay attention to the PID file and...
configure: check for socat and its escape feature
Currently we use a static value for the socat path, or we trust theuser-provided one. With this patch we still trust any user providedvalue, but if none is passed we check for socat on the machine we're...
Revert "configure: check for socat and its escape feature"
This reverts commit 37fc2cf5ba8919cef407199ee540aad4b1a9a2b6, since itintroduces configure.ac changes that depend on very very new autoconfmacros that are not present in current stable distros (and it was not...
Add an example script for backing up the config
This requires git and lockfile-progs, and only backs up config.data (seethe comments why).
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Makefile.am: Add more checks to distcheck-hook
Also use grep only to convert find's output to an exit status.
Documentation updates
Our admin guide was very very trivial. This patch updates it to containadvice on when to use which commands, removes the instanceadministration part from the installation guide (moved to the adminguide), and adds a walkthrough document that should be useable as a...
Include NEWS in documentation again
This was implemented in 350ecfecca and reverted in 700bb84367after it broke “make distcheck”. With other changes in thispatch series this will work now.
Contributing to the original problem was that the news.rst file...
Makefile.am: Wrap long lines
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Makefile.am: Use noinst_DATA instead of all-local target
Makefile.am: Don't include MAINTAINERCLEANFILES in EXTRA_DIST
Makefile.am: Make HTML doc building depend on stamp file
This patch also adds an explicit list of all files written bysphinx (“docoutput”).
By using an explicit list the build process is more predictableand will allow us to include the NEWS file again....
Makefile.am: Use dependencies to create symlinks only if necessary
Makefile.am: Move stamp-directories to BUILT_SOURCES
Use RUN_IN_TEMPDIR in Makefile.am
Since we have this variable and use it in other places, remove the onlyleftover hardcoded place.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Makefile: Use path from configure script for sphinx-build
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Ken Wehr <ksw@google.com>
Man page for ganeti-confd
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
mcpu: Implement lock timeouts
The timeout is always between ~0.1 and ~10.0 seconds. A smallvariation of ±5% is added to prevent different jobs fromfighting each other. After 10 attempts to acquire the locks witha timeout, a blocking acquire is made.
Lock status reporting will be improved in a separate patch....
Add support for using the bootloader in xen-pvm
This patch adds three optional parameters: - 'use_bootloader', whether use or not the bootloader - 'bootloader_path', absolute path to the bootloader - 'bootloader_args', extra arguments to the bootloader...
Merge remote branch 'origin/master' into mogu
Add initial confd client unittests
Some basic tests for the confd client library
Add man page for ganeti-cleaner
Merge commit 'origin/next'
Add implementation details for 2.1 locking changes
Revert "Include NEWS file in documentation"
This reverts commit 350ecfecca136f50877898774c6b40014b5c2b1c. It brokedistcheck.
Include NEWS file in documentation
Confd client library
Initial confd client library implementation. This initial version usesasyncore, and supports answers via a callback.
Move developer notes into normal documentation
Check for tabs and long lines in Python code
Makefile: Move lengthy variable list to separate variable
Add new ganeti.build namespace
This will be used to store build-time Python code.
Add locking doc to Ganeti documentation
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
Add simple unittest for hooks documentation
Makefile: add IPsec hook
Enable creation and dist for IPsec hook.
Signed-off-by: Luca Bigliardi <shammash@google.com>
Replace BINDIR variable as well
Add bindir to the list of variables replaced at make time.
Merge branch 'next' into branch-2.1
Add script to clean archived jobs after 21 days
Run unittests in a temporary directory
Fix building in a different directory
Also add build-bash-completion to EXTRA_DIST.
Add script to run build commands in temporary directory
Python always compiles imported modules. By running these targetsin a temporary directory we don't pollute the source tree.
Makefile: Use BUILT_SOURCES
These are always built before anything else.
Simplify manpage building
This eliminates one temporary directory in the process.
Makefile: Fix docbook2man error message
Add tools directory to constants
Use script to generate bash completion
Completion for tools/burnin is not yet implemented. It needs to beconverted to definition-based options handling first.
Fix unittest breakage due to new test file
Merge commit 'origin/next' into branch-2.1
Implement confd queries
We'll start with a simple ping query, which returns ok if it gets noquery argument, and an error if it gets any. Also non-implemented queryare handled by the base ConfdQuery class, so we don't have tospecial-case them in ConfdProcessor anymore....
Ship the ethers hook
doc/examples/hooks/ethers has been added without being shipped in thereleased tarball. Putting a stop to this.
Initial confd implementation
ganeti-confd is a simple asynchronous daemon, which listens on a UDPport, passes each packet to a processor, and sends back to the clientthe result.
It also listens on an inotify socket, in order to reload itsconfiguration when the ganeti config file changes....
confd.server.ConfdProcessor
A ConfdProcessor is the job processor for a confd query.It's responsible for all the processing, from unpacking it, verifyingit, to calculating the result.
Add empty ganeti.confd module
It will be used for the confd server code, and for a basic clientlibrary.
Merge branch 'master' into next
asycnotifier.AsyncNotifier
AsyncNotifier is a special asyncore class that delivers inotify eventsasynchronously.
ConfigObject.ToDict() only export non-None values
The method is changed to a normal loop, to avoid calling getattr()twice. Also getstate is changed to just use ToDict() by default.
This should also make getstate work for objects which have tooverride the ToDict function because they contain other objects....
Simplify the devel/upload script
Instead of multiple uploads to each node, this script copies everythingas needed to the temporary directory, exactly as to be installed in thedestination machine, then runs only one rsync per host.
This is more dangerous (we can break /etc now), but for development...
Merge commit 'origin/branch-2.1' into feature/containers
Add first implementation of generic storage unit framework