- Oct 08, 2012
-
-
Michael Hanselmann authored
utils.IsBelowDir is actually tested and doesn't allow writes to “…/queue*”, like the old code here did. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 05, 2012
-
-
Michael Hanselmann authored
This makes differences show up in “gnt-cluster verify”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
If normal file storage was disabled but shared storage enabled, “_TransformFileStorageDir” would still throw an exception. in “opcodes._CheckStorageType” there's also a check, but I wasn't quite sure what the correct way of handling it was, so I added a TODO comment. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 04, 2012
-
-
Michael Hanselmann authored
The “WriteSsconfFiles” function is used to write ssconf files. By moving it we can avoid importing backend into bootstrap. The latter is imported by CLI programs and backend doesn't have much to do with them. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 03, 2012
-
-
Michael Hanselmann authored
It is dangerous to have this block size as a global constant as that could give the impression of it being easily changed. Doing so without further adjustments to how “dd” is called will lead to disks not being wiped properly. Two additional parameter checks are added to “backend.BlockdevWipe”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Sep 28, 2012
-
-
Michael Hanselmann authored
Some parts of the code still use a hardcoded user name: root. This patch replaces all with a constant specified at build time. The end goal is to make it possible to run a Ganeti cluster without any special privileges (of course this will prevent some functionality from working). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 26, 2012
-
-
Agata Murawska authored
instance_info and all_instances_info calls had different per-instance return types, this commit fixes the mismatch. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 25, 2012
-
-
Michael Hanselmann authored
- pathutils: Prepend node-specific prefix path - RPC: Use virtual paths (see vcluster.py) - SSH: Pass environment variables, use destination's node directory when copying files using scp, use GANETI_HOSTNAME to determine hostname Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Sep 18, 2012
-
-
Michael Hanselmann authored
File system paths moved from constants to pathutils. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This is inpreparation for the implementation of virtual clusters. Many paths will change based on an environment variable and are no longer constant and should no longer be in “constants.py”. Since “constants.py” is already huge a number of other paths are also moved in the process. For now a wildcard import is used to re-export all paths from “constants.py” (this will change over coming patches). Daemon log paths have been changed to use a function. “RUN_GANETI_DIR” was moved to “RUN_DIR” as the latter was only used in “constants.py”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 23, 2012
-
-
Iustin Pop authored
Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's: - bump version in the docs - silence some new checks that are wrong due to our indent=2 instead of 4 - fix lots of errors in the code where the indentation was wrong by 1 or 2 spaces - fix a few cases of == True, False, None and replace with 'is' - re-indent some cases where the code is OK, but pep8 complains Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jul 05, 2012
-
-
Iustin Pop authored
There are two bugs in the current resize code, affecting mostly DRBD. First, due to bugs in old DRBD versions (pre 8.0.14), the code currently calls `drbdsetup resize' on both the primary or secondary. However, this is actually wrong per current DRBD (from drbdsetup(8)): resize This causes DRBD to reexamine the size of the device's backing storage device. To actually do online growing you need to extend the backing storages on both devices and call the resize command on one of your nodes. So calling it just on the primary node should be enough. However, we can't simply remove the calls to the secondary nodes, since that would break the growth of the underlying storage (LVM) on the secondary. Which leads to the second existing bug: we call resize on each node, even before finish the growth of the underlying storage. This can leads to all kind of issues if DRDB is not well behaved. So to fix both these bugs, we have to extend the current RPC call with another parameter, which denotes whether to extend the actual backing storage or just the "logical" one (DRBD being the only one; MD would be another, if implemented). This allows us to do the growth in two steps, first the backing store on all nodes, then the logical storage on just the primary node. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- May 09, 2012
-
-
Iustin Pop authored
In commit 896a03f6 I cleaned up the environment for OS scripts, however I think that was a bit too extreme - it breaks our own instance-debootstrap hooks, because for example dpkg (called from the grub script) requires PATH to be set. Instead of requiring every OS to define a path, let's set a default PATH for the OS scripts, which should cover most common uses. A more specialised PATH can be set, if needed, in the OS scripts. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 07, 2012
-
-
Iustin Pop authored
Per commit 0304f0ec, newer LVM has extended the lv_attr field. However, that commit was incomplete as we examine this attribute in another place in the code. Thanks to user alperhome, the _LVSLINE_REGEX in lib/backend.py also needs fixing. I've used the same change as in the above commit: accept at minimum 6 characters, but allow for more. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Jan 17, 2012
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Dec 08, 2011
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Dec 01, 2011
-
-
Andrea Spadaccini authored
* add the params attribute to BlockDev, and add the corresponding parameter to all the BlockDev classes; * change the Create, Assemble and FindDevice factory functions interface to accept as parameters an objects.Disk instance and a list of children block devices; update their callers; * make the factory functions provide default values for params if needed; * factor out a check in the block device factory functions. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
A quick QA run successfully finished with these changes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Andrea Spadaccini <spadaccio@google.com>
-
- Nov 30, 2011
-
-
Michael Hanselmann authored
Commit 78519c10 broke everything. Here's the fix. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Keeping the node state up to date will require information from multiple VGs and hypervisors. Instead of requiring multiple calls this change allows a single call to return all needed information. Existing users are changed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 22, 2011
-
-
Guido Trotter authored
Import uses the old "memory" parameter to populate the two new ones, if they're not overridden already. FinalizeExport exports minmem and maxmem, but also memory, as maxmem, to allow importing to older ganeti clusters. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 21, 2011
-
-
Andrea Spadaccini authored
Instead of relying on clients of the class for setting the device speed (and, in general, the DRBD parameters), move this responsibility inside the Assemble method. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 14, 2011
-
-
Andrea Spadaccini authored
Replace the code in backend.ActivateMasterIp and backend.DeactivateMasterIp with the master IP address setup script, either the default one or the one provided by the user. - Convert to string the netmask parameter in _BuildMasterIpEnv - Add the _RunMasterSetupScript function and let ActivateMasterIp and DeactivateMasterIp become wrappers for it; - Change the failure model of DeactivateMasterIp, raising errors if the script fails instead of silently ignoring the failure Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Andrea Spadaccini authored
Change the master IP address RPC call chain to accept the use_external_master_ip_script parameter. Introduces an unused parameter in backend.ActivateMasterIp and backend.DeactivateMasterIp, that will be used in the next commit. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Andrea Spadaccini authored
Update cluster-verify to check the integrity of the default master IP address setup script and the presence and executability of the external one (if currently in use by the cluster). Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 07, 2011
-
-
Andrea Spadaccini authored
- check if the master IP with the old netmask is up before attempting to change the netmask (to avoid a failed change netmask resulting in an undesired activation of the master IP); - improve error messages of the backend function; - in case of error, report the problem but otherwise change the cluster master_netmask parameter; - remove duplicate error feedback. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 03, 2011
-
-
Andrea Spadaccini authored
Let the environment variables of the master IP turnup/turndown be derived from the parameter of the RPC itself (that is of type objects.MasterNetworkParameters in both cases). Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
Pass instances of objects.MasterNetworkParameters when calling RPCs for activation and deactivation of master IP. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Andrea Spadaccini authored
Add the master IP family parameter to the master IP deactivation RPCs, so that the activation and deactivation interfaces are uniform. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Nov 02, 2011
-
-
Andrea Spadaccini authored
In the process of reworking the patches for master, I forgot to remove a call to GetMasterInfo() that overrides the parameters passed via RPC. This patch fixes this issue. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Andrea Spadaccini authored
Add the master netmask and master IP version parameters to the hooks and document them. In this way, the hook environment building function can be reused for the planned master IP turnup changes. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
Make the master explicitly pass the parameters to the change_master_netmask RPC, and change all the call flow to use the new interface. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
Make the master explicitly pass the parameters to the deactivate_master_ip RPC, and change all the call flow to use the new interface. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
To remove the usage of ssconf in the backend, the master needs to push the parameters of activate_master_ip to the backend. This patch changes the entire call path of activate_master_ip to use the new interface. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 01, 2011
-
-
Andrea Spadaccini authored
Reviewed-by:
Michael Hanselmann <hansmi@google.com> Signed-off-by:
Andrea Spadaccini <spadaccio@google.com>
-
Andrea Spadaccini authored
Add the RunLocalHooks decorator, that allows the execution of hooks locally. Also, add a RunLocalHooks method to HooksRunner, to adapt the signature of HooksRunner.RunHooks to the one expected by HooksMaster, and also to check that the hooks are being executed locally. Reviewed-by:
Michael Hanselmann <hansmi@google.com> Signed-off-by:
Andrea Spadaccini <spadaccio@google.com>
-
Andrea Spadaccini authored
Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
Add the RunLocalHooks decorator, that allows the execution of hooks locally. Also, add a RunLocalHooks method to HooksRunner, to adapt the signature of HooksRunner.RunHooks to the one expected by HooksMaster, and also to check that the hooks are being executed locally. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 28, 2011
-
-
Andrea Spadaccini authored
Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 20, 2011
-
-
René Nussbaumer authored
On a master failover some of the archive dirs might have wrong permissions in the non-root model. This is due to the nature of noded still running as root and the job queue is synced that way. This patch will fix this behaviour by setting the permissions accordingly. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-