Filters out LANG and LC_* on RunCmd
This filters out the LANG and LC_ variables from the environment of programsexecuted by RunCmd, in order to get consistent output of execute programs likelvs, etc.
Reviewed-by: imsnah
- Don't build .tar.bz2, we only distribute .tar.gz anyway.- Clean generated files on “make maintainer-clean”.- Build _autoconf.py and ganeti.initd on “make all”.
Reviewed-by: iustinp
Make import/export use the auxiliary ssh library to build the remote commands.
This avoids forgetting some parameters, as it's happening right now(the correct known host file is not being passed)
In order to do so we split SSHCall into an auxiliary BuildSSHCmd which builds...
Add function to get all local IP addresses, will be used in cmdlib.py.
Reviewed-by: schreiberal
Use _autoconf.py instead of version.py, generated by Makefile with morevariables. The underline is there to mark it as a private module.
- Generic automake cleanup- Bump version number to 1.2b2- Add version.py file generated from version.py.in by autoconf
Switch utils.RunCmd from popen2 to subprocess
This changes the implementation of RunCmd from using the popen2 moduleto using the (new in 2.4) subprocess module.
This is helpful because the subprocess module has more advanced featuresthan popen2, the most important ones being the ability to run code in the...
Fix mdadm -D output compatibility issues.
Also add some debugging output.
- Check for secondary node before doing a failover.- Replace magic values by constants.
Add a safety check to the backend.AddOSToInstance
This changes a ';' to '&&' to make sure we run the create script fromthe correct directory.
Add one more check on cluster init.
This adds a check that the initial node's IP name doesn't resolve to aloopback address (127.x.y.z).
Also remove an unused variable.
Document kernel selection method
This changelist add: - documentation on how to select the kernel and initrd (if needed) for instances - support in hypervisor.py for the initrd - adds note about internet-connectivity and debootstrap requirements...
Refuse nodes with non-FQDN hostnames.
This changes the cluster init and node join to refuse a node that has adifferent hostname than what the resolver returns.
Fix compatibility problems with mdadm-2.5.6
This fixes a compatibility problem with recent mdadm (2.x?) byreimplementing the zero-ing of the superblocks in ganeti itself.
Rework ssh known-hosts handling.
This changes: - cluster setup, we no longer edit /etc/ssh/ssh_known_hosts but our own file - node add, we no longer remove root's known_hosts (twice) - gnt-instance console, both the LU and the script: since now the ssh...
Improve LURunClusterCommand
This function used a hand-coded ssh call to remote nodes. Fix it to use thessh.SSHCall function, and in the process drop the command field from theresults, as it's too verbose and we can use (in gnt-cluster) what we passed in....
Fix one wrong usage of _GetWantedNodes
_GetWantedNodes is used wrongly by the LUClusterCopyFile. This fixes that.
Fix typo.
Reviewed-by: iustin
Disable hashing of the ssh keys.
In case we use StrictHostKeyChecking=ask, also add HashKnownHosts=no so thatdebugging is easier. The nodes to which we are connecting are anyway visible in/etc/ssh/ssh_known_hosts.
Add support for listing instance disk sizes.
A CheckPrereq method had one unconverted "return 1" statement. Change it to theappropriate raise.
Change cli.OutputTable to cli.GenerateTable
Since the table generation might be useful elsewhere, let's change it toreturn the data instead of directly printing it.
Its callers have also been updated.
Some small fixes.
It fixes the main Makefile.am to create $localstatedir/{lib,log}/ganeti.It fixes the testing Makefile.am after the rename fake_config.py ->mocks.py. It strips the output of "ip link show" to have a nicer outputif the master netdev does not exist.
Style changes for pep-8 and python-3000 compliance.
This changes the raising of exceptions from: raise Exception, valueto raise Exception(value)
as the first form will be removed in python-3000 and the second form ispreferred now.
The changes also involve a few cases of changing from raising standard...
Implement tag support for cluster, nodes and instances.
This is only the backend part, from the command line the tags can't beread/modified yet.
Don't bail out if node isn't there on “gnt-node volumes”.
Prepare for the tags implementation: - add an Update method on the ConfigWriter class; - make the AddInstance method not log disks for diskless types (helps with testing) - implement limited testing for the ConfigWriter with focus on the new Update method
Re-stat the config file when we write it so that the next _OpenConfig()won't reread it if not modified by someone else.
Add instance name to LVM volume as a tag.
Implement a standard way of getting the cluster object from theconfiguration.
Change logival volume names to not be based on the instance's name, butinstead use an UUID prefix and a suffix denoting the disk iv_name(sda/sdb) and possibly it's type (data/meta).
Put synchronization speed into constant.
Put default bridge into constant.
Add configuration upgrade utility.
Implement setitem for ConfigObject to add container protocol compatibility.
Fix issues reported by pylint.
Unify environment variables for instance related hooks.
Check for instances on “gnt-cluster destroy”.
- Implement “gnt-instance reinstall --os-type=…”- Add the command to gnt-instance.sgml
Fix the "gnt-cluster getmaster" command by making the LuQueryClusterInforunnable on non-master nodes (and remove the list of instances and nodesreturned by it, that information can be retrieved by other opcodes).
Also, remove the node/instance list from "gnt-cluster info" as it...
Move the cluster name from ConfigWriter to SimpleStore.
Reason: if left ConfigWriter, nodes don't know to which cluster they belong.This will bite us later when we'll revisit node join operation.
Cons: we lose the cluster name from the config file, which means a...
- Move --force option to cli.py- Implement “gnt-instance reinstall”- Fix two typos
Don't pass master_node
Comment formatting updates.
The master_node is no longer stored in the config file (but in sstore)and all users have been converted, let's remove it from the slots of thecluster object.
Also let's move the tcpudp_port_pool to the cluster object.
Get ports from configuration if there are some.
It seems the _CheckNodesDirs function is no longer used. Let's remove it.
Since the watcher can run on all nodes, let's get rid of the cron filehandling, as it can be static and outside of ganeti.
This also means we can get rid of a lot of infrastructure too: - the master/node config files checkers - one rpc function
Make the ganeti-watcher exit gracefully if it's not run on the master.
Add description, fix indentation.
Use generic function to output tables.
- Implement “gnt-node volumes”- Create all --output options using a constant- Put node checking code from opcodes into a single function- Do the same for output fields
Big change/cleanup in relation to the master startup: - move the master node name from the ConfigWriter to SimpleStore (all nodes need this, and it was the only thing pulled in from the ConfigWriter on nodes) - fix mcpu.py and the testing w.r.t. this change; for testing, rename...
Do the secondary check and subsequently allocate the drive on all availablelogival volumes. This lets you use more than one when none of them can supportyour full drive size.
Reviewed-By: iustinp
Fix a typo in an error message, and actually pass it its parameters.
Reviewed-By: imsnah
Output instance name in error message instead of object representation.
Fix calls to _GenerateMDDRBDBranch.
Check for memory size requirements before failing over an instance.
Implement space requirement checking before creating/importing an instance.
Initial commit.