History | View | Annotate | Download (69.3 kB)
Verify incoming RPCs against candidate map
From this patch on, incoming RPC calls are checked againstthe map of valid master candidate certificates. If no mapis present, the cluster is assumed to be inbootstrap/upgrade mode and compares the incoming call...
Create client SSL certificates on cluster init
This patch makes Ganeti create a client SSL certificate forthe master node on cluster initialization. Note that some ofthe code in this patch is later moved into an LU to serverequirements for crypto renewal and updates, but for this...
ssconf: Add Gluster mount directory
This commit adds the gluster storage directory to ssconf (withoutactually using its value just yet).
Signed-off-by: Santi Raffa <rsanti@google.com>Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Add default_iallocator_params cluster parameter
Add a cluster parameter to hold the iallocator parameters usedby the default instance allocator. Implement the option tomodify config.data, query config.data and upgrade man pages,tests and cfgupgrade tool. The new default_iallocator_params is...
Use query client when neccessary for group queries
This patch makes code use the query client for groupqueries where necessary in order to remove the pythonqueries soon.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Use a query client for node queries where necessary
To remove the node query's python implementation soon, thispatch makes all users of the queries call the haskellimplementation instead of the python one.
Signed-off-by: Helga Velroyen <helgav@google.com>...
Use custom SSH ports for other operations
In particular copyfile and renew-crypto.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Remove deprecated deprecation warning for --no-lvm-storage
This removes the deprecation warning for the option'--no-lvm-storage'. The deprecation warning was intendedto be raised in 2.9 and 2.10 and removed after that.
Use 'DTS_LVM' when possible
This patch replaces all usages of the utility function'GetLvmDiskTemplate' by the new 'DTS_LVM' constantto make it consistant with the usage of other DTS_*constants.
Additionally, it provides a unit tests to ensureconsistancy between DTS_LVM and the mapping of disk...
If possible, replace symbolic links in place
Naive 'ln -s -f a b' will put the link inside 'b', if'b' is (a symlink to) a directory; so, during upgrades,the links in $(sysconfdir) cannot be updated this way.Removing and readding works, however leaves the risk...
Add --resume option to 'gnt-cluster upgrade'
This option will resume an upgrade of the Ganeti version ofa cluster that got interrupted by a reboot of the master node,or similar event.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Add function to determine current configuration version
The 'gnt-cluster upgrade --resume' command needs to determine whether theconfiguration has already been updated or not, in order to decide at whichphase to resume. So provide a function to determine the version of the...
Add method to read and parse the intent-to-upgrade file
During upgrades, a file is written to disk on master that documentsthe fact that an upgrade is currently in progress. Add a functionto parse it.
Write the intent-to-upgrade file during upgrades
To recognize that an upgrade attempt of a cluster was interrupted by apower failure or similar, write a file into the file system documentingthat currently an upgrade is in progress.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Add an upgrade command to gnt-cluster
This command will coordinate the switching to a newGaneti version across the cluster. This has becomepossible by the new layout that allows several Ganetiversions to be present at the same time.
Add option to redist-conf while queue is drained
Add a new option to 'gnt-cluster redist-conf' allowing to ignore a drainedstate of the Ganeti queue. This is needed (until we implement the fine-grainedqueue control) during upgrades, as here we have to redistribute the configuration...
CLI: actually remove the --no-drbd-storage option
This removes the '--no-drbd-storage' option completelyfrom the command line interface. The hugepages designdoc still had a left-over reference to --no-lvm-storage,which is removed in this patch as well....
cluster init/modify: set helper without DRBD being enabled
The logic around the DRBD usermode helper so far was thatsetting it was only possible when DRDB was not explicitelydisabled. This patches changes it in a way that it isconsistent to how Ganeti handles the volume group name....
cluster modify: deprecate --no-drbd-storage
As in the previous patch, the option '--no-drbd-storage'is deprectated, because it is subsumed by the non-inclusionof 'drbd' in the list of enabled disk templates.
cluster init: deprecate --no-drbd-storage
Whether or not a particular type of storage is enabledor not is determined by the list of enabled disk templatesin the cluster's configuration. This makes the option'--no-drbd-storage' obsolete, because it is subsumed by...
gnt_cluster.py: unit test for usermode helper
This patch factors out the functions in gnt_cluster(related to cluster init and cluster modify) whichdeal with setting / determining the drbd usermode helperto make them more testable. Unit tests for the extracted...
Merge branch 'stable-2.9'
Merge branch 'stable-2.8' into stable-2.9
Include VCS version in `gnt-cluster version`
Also print the VCS version in the output of `gnt-cluster version`. Thismakes the VCS version also available over RAPI, etc.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
gnt-cluster {init, modify} --file-storage-dir
This patch implements consistent usage and behavior ofthe --file-storage-dir option in 'gnt-cluster init'and 'gnt-cluster modify'. It includes a bunch of unittests as well.
Additionally, it enables the previously written unit...
Fix KeyErrors with network mode and vlan
This patch fixes some KeyErrors that were introduced by the vlan implementationand showed up when certain parameters were missing:gnt-cluster init without network modegnt-isntance add without vlan
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>...
Set default OVS in cluster init
This commit adds functionality to gnt_cluster to set the defaultmaster-netdev for openvswitch, when openvswitch mode is configured,instead of DEFAULT_BRIDGE.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Merge branch 'stable-2.8' into master
Allow modify_etc_hosts to be changed
The modify_etc_hosts options, enabling the cluster to modify the /etc/hostsfiles of nodes, and to keep them in sync, could only be set at cluster inittime.
With this commit it can now be changed through modify_etc_hosts as well....
Merge branch 'stable-2.8' into 'master'
Index nodes by their UUID
No longer index nodes by their name but by their UUID in the clusterconfig. This change changes large parts of the code, as the followingadjustments were necessary: * Change the index key to UUID in the configuration and the ConfigWriter, including all methods....
Add an option to print job id of submitted jobs on stdout
When submitting a job, the job id, prefixed by 'JobID: ', is output tostderr. While this is easy to understand for humans, for scripting, itis more convenient to have (additionally) the id on stdout (and only...
Add --force option to gnt-cluster modify
Make the force option of the ClusterSetParams Opcode availableon the command line.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
gnt-cluster info: only parameters for enabled hypervisors
In the output of gnt-cluster info, restrict the hypervisor parametersto those hypervisors that are enabled. This fixes issue 443.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Make DEFAULT_ENABLED_DISK_TEMPLATES a list
This patch makes the constant DEFAULT_ENABLED_DISK_TEMPLATESa list instead of a set, because the order of the elements actually mattersas the first one is planned to be the default disk template for instancecreation. Also, this constant is always used like a list and thus providing it...
gnt-cluster modify/init: deprecate --no-lvm-storage
This patch does three things:
1. It deprecates the option '--no-lvm-storage' of 'gnt-cluster modify'and 'gnt-cluster init'. Technically, it is not fully removed, but kept in orderto warn the user that it is no longer supported and that she should use...
Limit specs in ipolicy command lines are always complete
Command line options are brought in line with the specs change of previouspatch. Old options are still allowed in gnt-cluster init, where thesemantic will remain non-ambiguous even after introducing multiple specs....
Add --ipolicy-xxx-specs options
These options allow to specify whole instance policy specs. This is neededfor the upcoming changes that tend to threat specs as monolithic objects.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add command to print ipolicy options
The output of this command can be used to create an exact copy of thecurrent instance policy specs. The command could be expanded to print allthe options used to create a group or the cluster.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
Removes obsolete 'enabled storage types'
Since managing of different storage units is now done usingdisk templates and not storage types, we remove the obsoleteenabled storage types.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Michele Tartara <mtarara@google.com>
gnt-cluster init: enabling of disk templates
This patch enhances 'gnt-cluster init' to accept a list of disk templatesto be enabled. It removes the list of enabled storage types.
gnt-cluster modify: modify enabled disk templates
Adds setting of the list of enabled disk templates to 'gnt-cluster modify'.Note that this does not yet include any verification regarding disk templatescurrently used by instances.
gnt-cluster info: report enabled disk templates
Add reporting of the currently enabled disk templates to'gnt-cluster info'.
Refactor out function to format instance policy
The new function can be used for group-level instance policies. Support forroman numeral formatting has been dropped to make the code simpler. Forother info items it's already unsupported, and it's not exactly documented...
Refactor ispecs in ipolicy structures
Minimum and maximum instance specs are put together into a single elementof the instance policy. This is in preparation for introducing multiplemin/max specs.
Remove duplicate filling of instance policy
Instance policy fields were manually filled in CreateIPolicyFromOpts() andthen filled again by the caller. Now they are filled once inside thefunction.
gnt-cluster info uses a revised format
The code is more modular and the output is YAML-compliant.
Added function in QA that uses PyYAML to parse the command output, and QAis updated to take advantage of it (instead of using lots of complicatedREs).
gnt-cluster init: add enabled_storage_types parameter
This patch extends the 'gnt-cluster init' command to set the listof enabled storage types on cluster creation.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
gnt-cluster modify: dis/enabling storage types
This patch extends the 'gnt-cluster modify' command to manipulate the listof enabled storage types. Note that this currenlty does no validationwith respect to whether or not there are instances currently using a storage...
gnt-cluster info: show enabled storage types
This extends the 'gnt-cluster info' command to list the storage typesthat are enabled on the cluster. It also fixes the broken indentationin the 'handleCall' function.
Implement the External Storage Interface
With this commit we introduce the External Storage Interfaceto Ganeti, abbreviated: ExtStorage Interface.
The ExtStorage Interface provides Ganeti with the ability to interactwith externally connected shared storage pools, visible by all...
uidpool: Remove roman number support
Doing so simplifies to code a bit and never had a practical use.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Allow ignoring successful commands in "gnt-cluster command"
In some cases it is useful to ignore the output of and avoid mentioningsuccessful commands. One would be when looking for a certain string ina file:
$ gnt-cluster command egrep -q '^testing$' /etc/......
Move gnt_cluster.SHOW_MACHINE_OPT to cli
This allows the option to be re-used in other places.
Merge branch 'devel-2.6'
Add option to force master-failover without voting
This fixes issue 282.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
gnt-node add: Use prepare-node-join
This patch changes “gnt-node add” to use the newly added“prepare-node-join” tool. Hereby Paramiko is no longer a hard dependencyfor setting up SSH on nodes.
In “gnt_cluster.py”, a positional parameter is no longer passed as a...
verify-disks: Explicitely state nothing has to be done
Example output:$ gnt-cluster verify-disksSubmitted jobs 4327Waiting for job 4327 ...No disks need to be activated.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add basic unit tests for "gnt-cluster epo"
This patch adds some unit tests for “gnt-cluster epo”. Not everything iscovered, but at least the bug fixed in the previous patch is.
Fix pylint breakage due to unused var in gnt_cluster
The usage of that variable was removed in 45a36f36, but accidentallythe enumerate() was left in.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
cluster epo: Fix bug where IndexError is raised
Updating the “node_query_list” variable would fail if no arguments werepassed and the “--all” option wasn't specified. A follow-up patch willadd unit tests.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Stop hardcoding root user
Some parts of the code still use a hardcoded user name: root. This patchreplaces all with a constant specified at build time. The end goal is tomake it possible to run a Ganeti cluster without any special privileges(of course this will prevent some functionality from working)....
Migrate lib/client/*.py from constants to pathutils
File system paths moved from constants to pathutils.
Complete and enable the haskell QueryClusterInfo call
Since we have now access to all cluster parameters, we can "fill" theparameters, and can finally enable it in CLI/RAPI.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Agata Murawska <agatamurawska@google.com>
Add configure-time switch for split queries
And expand cli.GetClient() to allow opening the query socket, insteadof the main master socket.
Finally, enable the query socket use in gnt-cluster version, sincethat is already implemented fully in Queryd.hs/hconfd....
Bump pep8 version to 1.2
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...
gnt-cluster modify: Add ipolicy for spindle ratio opt
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Move some ipolicy functions from objects to cli
These are only used in CLI programs to parse command line options andsuch they do not belong in object.py (I will change them more and Idon't want to add more code in objects.py).
Signed-off-by: Iustin Pop <iustin@google.com>...
gnt-cluster info: Print and format disk parameters
gnt-cluster modify: Add "--submit" option
Add "show" as alias for "info" to gnt commands
This patch adds support for "show" as an alias for "info" tognt-(cluster|instance|node|os). It already exists in gnt-job.
Signed-off-by: Alexander Schreiber <als@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Merge branch 'devel-2.5'
gnt-* {add,list,remove}-tags: Unify options
- Listing tags is a query, so neither “--priority” nor “--submit” make sense- Support both options for adding/removing tags- Also remove “--submit” from “gnt-node health”; it doesn't work and doesn't make sense for listing node health...
EPO: Pass the no_remember parameter to preserve state
Fix gnt-cluster modify check of passed options
… and add the disk_templates/vcpu_ratio new entries. Since the defaultispecs_* are dicts, we can't compare them to none.
Additionally, add a QA test for this case (empty cluster modify).
Add ipolicy_vcpu_ratio to command line
This allows changing this value from the command line.
Add new ipolicy parameter vcpu_ratio
This adds the new parameter and changes the validation routines tohandle IPOLICY_PARAMETER value as floats. Very very ugly code :(,should be redone much cleaner.
Rename IPOLICY_PARAMETERS to IPOLICY_ISPECS
As opposed to the initial situation, the PARAMETERS will be more thanjust the min/std/max ispecs. Let's rename it, before re-adding thePARAMETERS constant with a different meaning.
Rename ispecs-disk-templates to ipolicy-disk-templates
The ispecs (min/std/max) are different from the other ipolicyvariables (disk templates for now, more in the future). As such, let'srename the ispecs-disk-templates to ipolicy-disk-templates forconsistency with this logical difference....
gnt-cluster command: Add option to prepend node name to output
With this patch a new option (“-M”, like dsh) is added to “gnt-clustercommand” to prepend the node name to all output lines.
$ gnt-cluster command -M uname -a | grep Linuxnode18.example.com: Linux node18.example.com [...]...
Further fixes to instance policy validation
As a followup from "Remove extraneous check in policy creation", thereare more places where we build an ipolicy, and then manually check forits validity. This is very bad style, as it duplicates theverification code across many places....
Add new disk_templates parameter to instance policy
This is a bit more complex patch, as it requires changing theassumption that all keys in the policy dict points to values that arethemselves dicts. Right now we introduce an assumption that anynon-dicts are lists, we'll see in the future if this holds or whether...
Remove extraneous check in policy creation
The values are already checked in CreateIPolicy, no need to manuallycheck them again.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Move the instance specs options to cli.py
Currently these are defined twice, instead of a single time incli.py. Also adds the new disk_templates option to the common block,even though it's not yet used.
Fix wrong variable name
Commit bc5d0215 added support for disk params, but due to copy-pasteit tries to enforce the hvparams into disk params values, leading to:
$ gnt-cluster modify -H kvm:initrd_path=/boot/initrd-2.6-kvmUParameter Error: Unknown parameter 'initrd_path'...
gnt-cluster: Add hv/disk state to init
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
mem_count is now mem_size everywhere
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Cluster-level instance policy - other
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
SetClusterParams supports instance policy changes
InitCluster supports instance policy
Instance policy command line support
gnt-cluster: Allow modify disk/hv state
Add basic support for disk parameters
objects.py: * add disk parameters to Disk, Cluster, NodeGroup.
constants.py: * add dictionaries that will hold types and default values for disk parameters (for now, empty).
test/ganeti.constants_unittest.py:...
Remove BE_MEMORY from beparams but keep compatibility
Queries are already compatible (be/memory is an alias for be/maxmem) andimport/exports work. This patch patch fixes it for cluster init, modifyand instance add/start/modify.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Add --use-external-mip-script flag
- add a command line flag to gnt-cluster init and modify to change the value of the cluster parameter use_external_mip_script;- add two constants representing the paths of the default script and of the external script;...
Update synopsis for “gnt-cluster repair-disk-sizes”
Mention that instances can be passed on the CLI when “--help” is used.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Andrea Spadaccini <spadaccio@google.com>