- Oct 24, 2007
-
-
Iustin Pop authored
This duplicates some code from the DRBDev class, but not very much, and it will be expanded with the new functionality available for the 8.x version. Currently the code is not accessible outside the module. This patch introduces a dependency on the pyparsing module. Reviewed-by: imsnah
-
Iustin Pop authored
The DRBDev._IsValidMeta only checks for the metadata device size. Since this is a useful check (but not complete) for DRBD8, move it to the base class and name it _CheckMetaSize. Reviewed-by: imsnah
-
Iustin Pop authored
This moves the _SetFromMinor and _MassageProcData to the base class. Reviewed-by: imsnah
-
Iustin Pop authored
Currently, the out-of-minors handling is not very good: though both MD and DRBD functions for finding an unused minor can return None, only the DRBD code checks for this case. This patch improves this by making the functions _FindUnusedMinor raise an error instead of None, and gets rid of the one manual check for the return value. Reviewed-by: imsnah
-
Iustin Pop authored
Since some of the methods and constants are valid for both 0.7 and 8.x versions, we move them to the base class. Reviewed-by: imsnah
-
- Oct 19, 2007
-
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
This is a small split of some functionality from the DRBDev class into a base drbd class that holds just a few things, in order to make migration to drbd 8.x easier. Reviewed-by: imsnah
-
Iustin Pop authored
Currently, the disk types are defined using constants in the code. Convert those into constants so that we can easily find them and check their usage. Note that we don't rename the values of the constants as they are used in the configuration file, and as such it's best to leave them as they are. Reviewed-by: imsnah
-
- Oct 18, 2007
-
-
Michael Hanselmann authored
Testing failure on the primary node is currently disabled due to drbd problems. Reviewed-by: iustinp
-
Alexander Schreiber authored
This patch series implements the reboot command for gnt-instance. It supports three types of reboot: soft (hypervisor reboot), hard (instance config rebuild and reboot) and full (full instance shutdown and startup again). This patch contains the gnt-instance script and the man page for it. Reviewed-by: iustinp
-
Alexander Schreiber authored
This patch series implements the reboot command for gnt-instance. It supports three types of reboot: soft (hypervisor reboot), hard (instance config rebuild and reboot) and full (full instance shutdown and startup again). This patch contains the opcode and lu part. Reviewed-by: iustinp
-
- Oct 17, 2007
-
-
Alexander Schreiber authored
This patch series implements the reboot command for gnt-instance. It supports three types of reboot: soft (hypervisor reboot), hard (instance config rebuild and reboot) and full (full instance shutdown and startup again). This patch contains the backend and rpc part of the patch. Reviewed-by: iustinp
-
Alexander Schreiber authored
Reviewed-by: imsnah
-
- Oct 16, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
Alexander Schreiber authored
Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds a new option to the instance removal command "--ignore-failures" that forces the removal of the instance from the configuration even if the removal process encounters errors. In order to be able to do this when the remote node(s) is(are) down, we need to restrict the execution of the instance removal hook to the master only. I think this is a reasonable trade-off (but I'm not sure). Reviewed-by: imsnah
-
Iustin Pop authored
The node's ssh keys filenames are now provided as constants; this should allow easier customization. Also, the user's ssh key computing has been abstracted into ssh.py Reviewed-by: imsnah
-
- Oct 15, 2007
-
-
Alexander Schreiber authored
Reviewed-by: iustinp
-
Iustin Pop authored
The creation of the log file for the node daemon lacks the mode parameter, so after applying the current umask, the file got 0700 permissions. Restrict this to the correct 0600. Reviewed-by: schreiberal
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- Oct 12, 2007
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
Iustin Pop authored
This patch does the following: - add constants.GANETI_RUNAS = "root", which is used to compute the homedir (and thus the .ssh directory) instead of hardcoding "/root/.ssh" in backend.AddNode and backend.LeaveCluster - add constants.SSH_CONFIG_DIR (currently hardcoded to /etc/ssh) that is used in backend instead of hardcoding it (preparation for selecting that at ./configure time) - some more internal cleanup in backend.AddNode Reviewed-by: imsnah
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
Iustin Pop authored
Currently there are a few version of "write a file safely" in the code. This patch adds a generic function that should be able to replace all the other versions. The "take attributes from the target file" option, while useful, is not implemented by this patch. Reviewed-by: imsnah,ultrotter
-
Iustin Pop authored
Since we remove only files from DATA_DIR and not from subdirectories, let's not walk the entire tree, a simple listdir suffices. Also switch to utils.RemoveFile from simple os.unlink. Reviewed-by: imsnah
-
Iustin Pop authored
Currently GetHomeDir accepts UIDs only. Enhance it to accept either a user name or a user id, to allow for nicer usage. Reviewed-by: imsnah
-
Guido Trotter authored
Put some order in gnt-os putting helper functions above and command functions below. Also add a new _DiagnoseOSName() function and use it to make _GetAllOS simplier to understand. Change its name to _DiagnoseByOS which makes more clear what it does. Reviewed-by: iustinp
-
Guido Trotter authored
To do this we abstract the creation of the all_os dictionary, which was produced in DiagnoseOS and use it both for listing and diagnosing. Reviewed-by: iustinp
-
- Oct 11, 2007
-
-
Iustin Pop authored
For the configuration update hook, it's useful to have a consistent name for the target of the operation. As such, the LU code is modified to include an GANETI_OP_TARGET that points either to the cluster (name), node name or instance name depending on the opcode. Also, the NoHooksLU is modified such that its build env method returns an empty (but conformant) result. This should improve things in case by mistake this class' BuildHooksEnv is called. Reviewed-by: imsnah
-
Iustin Pop authored
This patch adds a special hook: the post-configuration update hook. This hook has only a post phase that runs after a top-level LU that modified the configuration. Since the hook is a post-phase one, no error checking is done on the results. The hook runs only on the master. Reviewed-by: imsnah
-
Iustin Pop authored
This patch moves some of the environment processing from _BuildEnv to a new _RunWrapper command which does the stringification and adds the sstore variables. The reasoning is that the sstore can be fresher than before the execution (e.g. in case of cluster init). In order to support thise, we also need to modify cmdlib.LUInitCluster: - memorize the sstore and cfgw newly created in the Exec function - no need to build the custom environment in the BuildHooks
-
Iustin Pop authored
Currently, the HooksMaster creation and execution decision is in the Processor class. This is not optimal, so we change to always create a hooks master and instead make the decision inside that class, by creating empty node lists for both pre and post if the lu doesn't support hooks. This way, hooks decisions are moved to HooksMaster (where they belong). Reviewed-by: imsnah
-
Iustin Pop authored
The HooksMaster class doesn't use the cfg parameter, and it's better to use it from the LU anyway (if needed). Let's remove it. Also, the sstore of the LU can be fresher than the sstore we got at init time, so use that instead and remove our own. Reviewed-by: imsnah
-
Iustin Pop authored
This allows external callers to determine if the configuration has been changed. Reviewed-by: imsnah
-
Oleksiy Mishchenko authored
Reviewed-by: iustinp
-
Alexander Schreiber authored
The beginning of the infrastructure for detailed instance restarts. Does not affect behaviour if code yet. Reviewed-by: iustinp
-
Michael Hanselmann authored
This removes the dependency on either the uuid module or e2fsprogs' uuidgen. Reviewed-by: iustinp
-