- Mar 09, 2010
-
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Mar 08, 2010
-
-
Timothy Kuhlman authored
Each nic should be connected to its own qemu vlan, to avoid them all bridging together. Signed-off-by:
Timothy Kuhlman <timkuhlman@gmail.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This way we can re-use file objects opened in other places. Also add more unittests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds validation of new names used, i.e. at cluster init time, node add time, and instance creation. For instances, especially when using «--no-name-check» (which skips DNS checks), we should validate the give name, and also normalize it (otherwise, we could have two instances named inst1 and Inst1). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This differs slightly from the specification, by allowing names to start with digits, not checking the length of individual components, and allowing underscores. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch changes ListVisibleFiles to raise ProgrammerError if it's passed a non-absolute/non-normalized path name, and adds unittests for this behaviour. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This should remove most of the remaining constructs which can be replaced by PathJoin. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Since in objects we don't have access to utils.py, we add a warning that the result value from objects.Disk.StaticDevPath might not be a valid path, and change its only caller to validate the path. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This switches hv_kvm to PathJoin. There are still a few cases of direct path construction, but those _should_ be safe. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This changes to hv_fake to PathJoin. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch abstract the computation of an instance's root directory into a separate function (that uses PathJoin instead of "%s/%s"). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently we don't enforce name validation for the LVM backend, on the idea that LVM itself will reject invalid names and we catch those errors. However, recent LVM documents the accepted VG/LV name space, so it's easy to add this in the LVM backend code. In addition, the patch changes some hardcoded /dev/ constructions with utils.PathJoin(). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Rationale: the file-based storage backend can add/remove files under a certain directory. However, the master node is also controlling the setting of the file-based root directory, so basically it means we can't prevent arbitrary modifications by the master of the node's filesystem. In order to mitigate this for setups where the file-based storage is not used, we introduce a new setting at ./configure time, that controls the enable/disable of file-based storage. Since this is not modifiable by the master (over RPC), it is now possible in this case to prevent unintended modifications of the node's filesystem from the master. The new setting is used in bdev.py to not expose the file-based storage at all, and in cmdlib.py to prevent attempts at creation of such instances. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This is a no-op change, but at least we concentrate the calls to path joins into a single function. A use in utils.FindFile is left as-is (don't want to raise exceptions there, at least for now). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
The various OS operations create log files in a specific directory (constants.LOG_OS_DIR). The construction of the log names is however spread and duplicated across multiple functions. This patch abstracts this into a separate function that also validates the log name, which should be safer in the long run. We also rename the export logs from having a prefix of “exp” to “export”, since it was the only operation that had an abbreviated prefix. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
For non-existing hooks (the majority of cases probably), logging a warning every time is not helpful. So we first check if we have a valid directory. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This passes a full burnin with lots of instances, and should be safe as we mostly to join a known root (various constants) to a run-time variable. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This will replace os.path.join since it is not safe for directory traversal issues. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
In order to protect from accidental use of _CleanDirectory on a random directory, we add a list of allowed clean directories, somewhat similar to _ALLOWED_UPLOAD_FILES (but statically computed). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Mar 02, 2010
-
-
Vitaly Kuznetsov authored
Using absolute path for a privileged command is a bad idea as this path may vary. For example /usr/sbin/brctl in Debian and /sbin/brctl in ALTLinux. Using $PATH is a better idea. Signed-off-by:
Vitaly Kuznetsov <vitty@altlinux.ru> Reviewed-by:
Iustin Pop <iustin@google.com> Signed-off-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
* stable-2.1: Make stable release 2.1.0 Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
It is about time (rc0 was almost four months ago)… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 26, 2010
-
-
Michael Hanselmann authored
By opening the lock file early, other programs can lock the state file to prevent ganeti-watcher from restarting daemons. Using the pause feature is inherently prone to race conditions. Before a traceback was logged when the lock file couldn't be acquired. Now it'll be a more friendly message. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Vitaly Kuznetsov authored
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 with custom ssh config directories (/etc/openssh in ALTLinux, for example). Signed-off-by:
Vitaly Kuznetsov <vitty@altlinux.ru> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
* stable-2.1: Add NLD constants to Ganeti Fix two potentially endless loops in http library Fix bug in LUQueryConfigValues Fix typo in LUVerifyCluster when checking node time Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This avoids the need for them to be injected in the nbma repository. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
I was using a too old version which doesn't got all those. This patch is fixing the new lint errors. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
* origin/devel-2.0: Fix two potentially endless loops in http library Update NEWS file and bump version to 2.0.6 ganeti-cleaner: does 'echo 0' instead of 'exit 0' Conflicts: NEWS: Trivial configure.ac: Trivial Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The first can be problematic if poll(2) returns POLLHUP|POLLERR on a socket. Before it would be only be respected for SOCKOP_RECV, but since they can also occur on other socket operations, esp. in combination with OpenSSL, letting the socket functions handle POLLHUP|POLLERR seems to be the right thing. The second is a typo leading to an endless loop if the first line of an HTTP connection is empty (simply "\r\n"). Instead of removing the empty line, it would remove anything after it. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This is going to be used from the nbma repository, to ensure that the nld daemon is running. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
This is the implementation of docs/design-cluster-merger.rst. It allows the automatic merging of one or more clusters into the invoking cluster. While this version is tested and working it still needs some tweaking here and there for error handling and user experience. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Balazs Lecz authored
Signed-off-by:
Balazs Lecz <leczb@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
The first can be problematic if poll(2) returns POLLHUP|POLLERR on a socket. Before it would be only be respected for SOCKOP_RECV, but since they can also occur on other socket operations, esp. in combination with OpenSSL, letting the socket functions handle POLLHUP|POLLERR seems to be the right thing. The second is a typo leading to an endless loop if the first line of an HTTP connection is empty (simply "\r\n"). Instead of removing the empty line, it would remove anything after it. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
LUQueryConfigValues supports multiple output fields. If the client asked for the watcher pause status, it would not get a list, but simply the value. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
These hooks are run on all nodes, after the "base" daemons are started. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
We're using a separate function for this, as we're going to add some functionality to this feature. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 25, 2010
-
-
Michael Hanselmann authored
The first argument to _ErrorIf should always be True in this case. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-