History | View | Annotate | Download (20.9 kB)
Design Doc: Ganeti Node OOB Management Framework
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Remove empty file from doc/html in distribution
It's not needed and some packaging systems complain about emptyfiles.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Makefile: Add PYTHON_BOOTSTRAP to linted code
Move ganeti-noded to ganeti.server.noded
Move ganeti-rapi to ganeti.server.rapi
Prepare move of daemons to ganeti.server
Move ganeti-masterd to ganeti.server.masterd
Move ganeti-confd to ganeti.server.confd
Makefile: Stricter checks for release distchecks
This should avoid cases like commit f64de30f where the releasedate was forgotten from NEWS.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Makefile: Generalize bootstrap script generator
Move ganeti-watcher to ganeti.watcher
Makefile: Streamline directory creation
Some directories don't exist in the repository, but are required at build time(e.g. doc/html). Until now some were created explicitly, some through thetarget “stamp-directories” and other target simply relied on a previous target...
A number of Makefile fixes
- run-in-tempdir should depend on what it copies to the temporary dir- Add PYTHON_BOOTSTRAP to BUILT_SOURCES- Don't use “mkdir p” directly Create directory if necessary for writing bootstrap script
In summary, this should make “make distcheck” in pristine...
Rebuild bash completion if client scripts change
Move gnt-backup to ganeti.client.gnt_backup
Move gnt-instance to ganeti.client.gnt_instance
Move gnt-job to ganeti.client.gnt_job
Move gnt-node to ganeti.client.gnt_node
Move gnt-cluster to ganeti.client.gnt_cluster
Python bootstrapper: hardcode /usr/bin/python
Move gnt-os to ganeti.client.gnt_os
Move gnt-debug to ganeti.client.gnt_debug
Allow programs to be part of the Ganeti library
Eventually this will help ensuring that clients and servers are of thesame version, as long as they're imported from the same path. Currentlyit's relatively easy for gnt-* and ganeti-* to be from a different...
Revert "Allow to specify wipe command and flags at configure time"
This reverts commit 6e991d0e64e36adf985d0512e4148bcd6a160c6a.
Conflicts:
lib/constants.py (this got already removed, so no changes in here)
Signed-off-by: René Nussbaumer <rn@google.com>...
Allow to specify wipe command and flags at configure time
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Merge branch 'devel-2.2'
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Crude workaround for pylint breakage
The way we currently call pylint, the exact order it inspect modules inlib/http/ depends on the filesystem order. This is not good, and iflib/http/server.py is loaded before lib/http/__init__.py, it will throwa "R0921:763:HttpMessageReader: Abstract class not referenced" (as that...
Move the parameter types to their own module
This is for cleanup, and for later reuse in other parts of the code(outside of LUs).
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Adding a runtime configuration library
This is used to expand the users/group names just once atinitial call.
etags: force Python as a language
etags has cannot properly identify the scripts/gnt-* files as Python, sowe statically force the language to Python.
Add template 2.3 design doc
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
makefile: fix TAGS building
“find .” requires that “-path” arguments start with a dot, otherwisethey are not matches. Additionally, we also include the QA files in thetags, for easier search while modifying the QA suite.
Signed-off-by: Iustin Pop <iustin@google.com>...
Adding tool to setup SSH on a remote host
This prepares the remote node to be joined into a cluster
Introduce git reference/tag tracking for debugging
This patch adds a new vcs-version file that is generated via git (andcan be adapted if VCS is changed) and then embebbded as VCS_VERSION inthe constants module.
This means two things:- local modifications without committing to git (or when using a tar.gz...
Convert RPC client to PycURL
Instead of using our custom HTTP client, using PycURL's multiinterface allows us to get rid of the HTTP client threadpool.The majority of the code is still in the ganeti.http.clientmodule.
A simple per-thread HTTP client pool gives cURL a chance to...
KVM hypervisor: Use utils.ShellWriter for network script
This patch converts hv_kvm to use utils.ShellWriter for writingthe network script. It also adds a few unittests (the firstfor any hypervisor modules).
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
jqueue: Factorize code waiting for job changes
By splitting the _WaitForJobChangesHelper class into multiple smallerclasses, we gain in several places:
- Simpler code, less interaction between functions and variables- Easy to unittest (close to 100% coverage)...
Merge branch 'devel-2.1'
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Manuel Franceschini <livewire@google.com>
Enable from-repository builds on old distributions
… or on distributions which simply have other implementations of man,that do not support '--warnings'.
Introduce lib/netutils.py
This patch moves network utility functions to a dedicated module.
Signed-off-by: Manuel Franceschini <livewire@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
BaseDRBD: provide a way to query usermode_helper parameter
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Silence the check-dirs check
The big shell fragment is just noise, for the common case where itdoesn't fail.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fixing Makefile.am to reflect the document move and adding of cluster merger
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Barebones LXC hypervisor
This needs lots of work, but it can successfully launch an LXC-basedinstance. See the docstring for the limitations/work to be done.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Balazs Lecz <leczb@google.com>
DRBD IPv6 support
Support IPv6 configuration for 'drbdsetup show' parser and add unittestsconcerning that case. Renames some data files to use consistent namesclarifying their usage.
Signed-off-by: Manuel Franceschini <livewire@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add test script for cfgupgrade
This should catch cases where we update the configuration version, butforget to adjust cfgupgrade accordingly.
Makefile: Add support for local Makefile additions
With the recent addition of a check for directories listed in Makefilelocal custom directories are always reported as unlisted. This patchadds support for a “Makefile.local” file, which can adjust settings in...
Makefile: Add check for DIRS consistency
It's easy to forget to add a new directory to DIRS. This check shouldreport such inconsistencies.
Add missing directory from Makefile.am
Add example gnt-debug submit-job json files
These files are being used to test the job queue performance withvarious changes and conditions. Adding them here for posterity.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add unittest for ganeti-cleaner
Let daemon-utils fix the owners for ganeti-rapi
This is a workaround until we fully switched to user separation and fixes theowners of directories/log files so ganeti-rapi will start flawlessly. This isright now run for every daemon but as it operates on a relatively small subset...
Let ganeti-rapi run under a different user/group
Adding customized user/group as configure flags
import/export daemon: Move command building into separate module
The import/export daemon code is already large. Moving some codeto a separate module will make it smaller and easier to test.
Add asyncnotifier unittests
Add initial mainloop unittests
Add tool to move instances between clusters
This is a first version of the instance move tool and it supports moving1..N instances from one cluster to another. When moving a single instance,the instance can be renamed, allowing for moves within the same cluster...
Fix distcheck broken by check-cert-expired unittest
ganeti-cleaner: Remove expired X509 certs
Importing/exporting an instance to a remote machine creates X509certificates which expire after some time. They need to be removed fromthe nodes as they become useless.
Add checks for master IP in cluster verify
This also updates a comment in the unittest for utils.py. We unittestthe new function for two things: correct reporting on real case (forlocalhost), and correct reporting with a mocked-out TcpPing that returns...
Conflicts: daemons/ganeti-noded lib/daemon.py lib/rapi/baserlib.py lib/rapi/rlib2.py lib/utils.py
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
RAPI: Add new request data format for instance creation
As mentioned in commit d975f482d, the current way of creating aninstance via RAPI is not very flexible. With this patch, a newinstance creation request data format is introduced and documented.Support can be detected by checking the list of features returned...
Introduce Mlockall()
Add Mlockall() utility to lock current process' virtual adress space into RAM.
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.
cmdlib: Add utility for instance data import/export
Interpreting the backend's import/export daemon status is a bit tricky.This utility code keeps track of multiple transfers at the same time.Users can supply callback functions to react to events.
Timeouts are currently hardcoded. Intra-cluster instance moves will likely...
Add separate module for backported language functionality
utils.py, where they were before, is already huge.
Add make commit-check target
distcheck, lint and apidoc. Take three pay only one.
Add ganeti.masterd module
This will be used to keep masterd-specific code.
Conflicts: doc/security.rst trivial lib/cli.py trivial
Signed-off-by: Balazs Lecz <leczb@google.com>Reviewed-by: Michael Hanselmann <hansmi@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.
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 daemon for instance import and export
This backend daemon for instance import and export will be used totransfer instance data to other machines. It is implemented in a genericway to support different ways of data input and output. The third-partyprogram “socat”, which is already used by the KVM hypervisor abstraction,...
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)
Add RPC calls to create and remove X509 certificates
Certificates and keys generated using these functions will be used forinter-cluster instance moves. As per design, the private key should neverleave the node.
Merge remote branch 'origin/devel-2.1'
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.
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.
Use OpenSSL module instead of binary to generate certs
This saves us one dependency and saves us from complicated handling ofexternal files if we need key and certificate separated from each other.
At the same time, the number of bits used for RSA keys is increased from...