History | View | Annotate | Download (122.5 kB)
Merge branch 'stable-2.10' into master
Merge branch 'stable-2.9' into stable-2.10
Use custom SSH ports in node groups when working with nodes
Calling `gnt-instance console` with a custom SSH port doesn't work yet.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Don't allow optional node parameters
Ganeti does not support optional fields in parameters(hypervisor-params, disk-params, etc.). OpenVSwitch related nodeparameters were the exception to this rule, which caused numerousproblems related to import/export and (de-)serialization....
When verifying BRBD version, ignore missing values
When comparing for consistency of the DRBD versions, someversions might not be available via RPC, typically, if thenode is offline. In this case, leave these nodes out of thetest, instead of failing with an internal python error....
Create Open vSwitch on Master during Cluster init
Currently, Open vSwitch is only created on additional nodes, not on the masteritself.This fixes the issue and creates and configures an Open vSwitch on the masternode during cluster init.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>...
Make 'gnt-cluster modify' respect the order of templates
This fixes a bug where the order of enabled disk templateswas not respected when manipulating it with 'gnt-clustermodify'.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix typos and indentation for cluster.py
This patches fixes a typo and some indentation errorsthat were accidentally introduced by premature pushingof the patch series "Improvements on disk templates, inparticular file storage".
Signed-off-by: Helga Velroyen <helgav@google.com>...
Make GetDiskTemplateSets output disabled disk templates
This patch extends the 'GetDiskTemplateSets' function toalso output the list of disk templates that were enabledbefore this operation, but will be disabled afterwards.This patch also includes code to check for instances using...
Rename GetEnabledDiskTemplates to include disabled ones
This patch solely renames the functions_GetEnabledDiskTemplates* to _GetDiskTemplateSets, becausein later patches, we will refactor it to not only outputdisk templates that are or get enabled, but also the ones...
Check for running instances when disabling templates
This patch introduces a function to be used in'gnt-cluster modify' when disabling a couple of disktemplates. It checks whether there are still instancesrunning that use these templates.
Check validity of the access protocol parameter
Fix RPC call to blockdev_getdimensions
The parameter format for call_blockdev_getdimensions has changed in aprevious patch. Here, the correct parameter format is used for the RPCcall.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Remove physical_id field from disk object
The 'physical_id' field of disk objects is no longer used, so remove it.Also, all references are removed together with the code which made surethat the physical_id is up to date when transmitted over RPC.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Replace physical_id with dynamic_params
The disk field 'physical_id' has to be kept up to date whenever a diskobject is sent to a node via RPC. This is done with the SetDiskID methodmanually, which is a source of bugs.
This patch replaces the use of 'physical_id' with a new field names...
Merge branch 'stable-2.9' into master
Replace LD_* constants with DT_* constants
LD_* constants are basically like DT_* constants, exceptfor that both file and shared file were mapped to file.In order to not having to maintain three slightly differentsets of disk-related constants (DT, LD and ST), we merge...
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 verify: check drbd helper only when drbd enabled
This change makes sure that 'gnt-cluster verify' onlychecks for the DRBD usermode helper, if DRBD is actuallyenabled.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
cmdlib/cluster.py: unit tests for usermode helper
This patch factors out the functions that deal with settingand modifying the DRBD usermode helper in cluster.py inorder to make them more unittestable. The unit tests areprovided as well. No functional changes otherwise....
Extend unit tests for LUClusterVerifyGroup
- Add tests for additional Verify* methods- Converted test for VerifyFiles to the new test framework- Added possibility to prepare the LU in a test class before actually executing the test method with it
Revert "Display node name instead of UUID in error message"
This reverts commit fbff213691328562cc4029f3babaa2e72e2012c4.When running hooks, the node name is used to identify nodes, not (aswrongly assumed in the patch) the node UUID.
Display node name instead of UUID in error message
The hooks callback in LUClusterGroupVerify misinterpreted the key in thenode result as name instead of node UUID. This patch fixes this, whichleads to more user friendly error messages.
ClusterSetParams: move vg-name checks from to CheckPrereq
This fixes a bug in the logic of 'gnt-cluster modify'.Some checks that should better be done in 'CheckPrereq'were actually done in 'Exec'. This lead to a strangebehavior in case the execution failed, because an...
Move Ipolicy utility function to cmdlib/common.py
Since the check of consistency between an ipolicy andthe list of enabled disk templates will not only beneeded on cluster modification, but also on groupmodification, we move the respective function and its...
gnt-cluster modify: ipolicy vs enabled disk templates
This patch adds a check to LUClusterSetParams whichensures that the list of allowed disk templates is asubset of the list of cluster-wide enabled disktemplates. Unit tests are included.
gnt-cluster modify: factor out ipolicy check
This refactors the LUClusterSetParams to do all ipolicysanity / validity checks in a separate functionin order to increase testability. No function changesotherwise.
Add unit test for LUClusterSetParams
Some changes to the test framework were performed while writing thistest: - Extended builder for disks - Introduced builder for NICs - Fixed bugs in RpcResultsBuilder
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>
Fix formatting of instance names in config verify
Instance object were incorrectly treated as instance UUID's which causedan exception to be raised. Using the names of the instance objectsdirectly fixes this problem.
Fix verify config if a node has no instances
Do not try to provide a fake instance UUID called "no instances", astrying to get the name for would fail and raise an exception.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Check for luxid permission during verify config
confd no longer needs access to the noded certificate file, but luxiddoes. Change the check to use the right user.
Check disk template in right dict when copying
Due to the structure of the code this condition can't possibly be true.We have to look in the new_diskparams dict instead, otherwise it'd bepossible to try to update a non-existing entry.
(The same patch is in stable-2.7 as 106441d already)....
gnt-cluster verify: consider shared file storage
This patch enhances 'gnt-cluster verify' in a way that itnow validates the acceptance and existance of the sharedstorage directory.
gnt-cluster modify --shared-file-storage-dir
This patch introduces to 'gnt-cluster modify' the option'--shared-file-storage-dir' to change the default directoryfor instances using shared file storage at cluster runtime.
Bootstrap: factor out and prepare shared-file-storage
This patch makes 'gnt-cluster init' use the'--shared-file-storage-dir' option to set the defaultshared file storage dir. Additionally, it performs thesame sanity and validity checks for the path as for...
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...
Merge branch 'stable-2.8' into master
Verify file storage path
This patch adds two verification steps to 'gnt-clusterverify':- The configured file storage directory is checked against the allowed file storage directories file.- We check whether the configured file storage directory is existing and writable on each node....
Prepare verification code for new file path verification
This patch prepares the verification code for addinga new verification step for the file storage paths:- It moves a couple of file storage helper functions from bdev to filestorage (since they make more sense there...
cmdlib: remove usage of ENABLE_FILE_STORAGE
This patch removes all usages of the constant'ENABLE_FILE_STORAGE' from the cmdlib code andreplaces them by checking the cluster's configuration.
cluster verify: adjust path verification
This patch adjusts the verification of file storage pathsby checking the list of enabled disk templates insteadof the 'ENABLE_FILE_STORAGE' constant.
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....
Cluster verify checks server.pem permissions
Currently, ConfD must be able to access server.pem (though this is likely tochange in the future). If this is not true, all sorts of weird things happen,such as "gnt-node list" printing lots of question marks instead of actual...
gnt-cluster info (py): add enabled disk templates
This fixes issue 485. In the python implementation ofthe cluster config info, the enabled_disk_templateswere missing.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Index instances by their UUID
No longer index instances 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...
Check DRBD status in cluster verify
If the status of DRBD disks is degraded or in a faulty state, issue anerror in cluster verify.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix reference to NodeInfo.name
This fixes a bug introduced during the move from node names to nodeUUIDs as indexes.
Also, a typo is corrected.
Merge branch 'stable-2.8' into 'master'
Inline simple "alias" variables
Remove variables in the form "var = self.var" throughout all LU's. Those"alias" variables make it harder to read the code (it's no longerimmediately clear what's a field and what's a local variable), and canintroduce subtle bug (especially when not used consistently and when...
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....
Verify: node info and instance list
This patch enhances node verification by:- Factoring out the verification of the node info and the instance list to increase testability.- Make both of them use the hvparams parameter.
Use RpcResult.Warn where appropriate the cmdlib
To avoid repetitive code, make use of the functionality factoredout to the Warn method of RpcResult.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add a force option to the ClusterSetParams Opcode
If set, the op code will, in particular, try to set the master IPon the new netdev, even if shutting down the master IP on the oldnetdev failed.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Add disks_active to configuration
This flag tracks if the disks of an instace are supposed to be active.That's the case when an instance is running or when its disks gotactivated explicitly (and in a couple of other cases).It will be used by watcher to re-activate disks after a node reboot....
Report missing spindles in the configuration
cfgupgrade and cluster-verify run a check for missing spindles in diskconfiguration when exclusive storage is enabled. The check in cfgupgrademay give false positives due to the complexity of getting the correct value...
gnt-cluster repair-disk-sizes repairs spindles too
When exclusive storage is active, any wrong or missing spindles informationin disks gets updated too.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
New RPC to get size and spindles of disks
This RPC replaces the existing one that only returned disk size.
cmdlib: Cleanup public/private functions
All functions/classes which are used outside of their defining module(with tests as an exception) no longer have a leading underscore.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Extract cluster related logical units from cmdlib
All LUCluster* classes are extracted to cluster.py. Shared functions areextracted to common.py, helper functions only used by LUCluster* areextracted to cluster.py.