Compatibility test for instances
This patch introduces a test to check the compatibilityof the Haskell and the Python representation of instances.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Instance generators
This patch introduces and enhances generators forinstances:- 'genInstWithNets' is split into the generation of an arbitrary instance and enhancing an instance with nets- 'genInst' calls 'genInstWithNets' with an empty set of initial networks to provide a reasonable default...
Annotate every arbitrary instance field
The Arbitrary instance of the 'Instance' object is writtenusing the <*> syntax. Since it often uses the 'arbitrary'generator for the instance's fields it is hard to figureout which 'arbitrary' fills which instance field. This...
Generators for disks
This patch adds generators for Disk instances to the Haskelltest code. It uses somewhat more reasonable generators tofill the fields instead of just arbitrary values.'genDiskWithChildren' is a generator that generates a diskwith a specified number of disk children. To avoid shooting...
Remove extra newline
Also, properly set the date of the last modification.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add MonD to the watcher
The monitoring daemon should always be alive, therefore it's added to thewatcher.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Start the monitoring and node daemons together
Add the monitoring daemon to the command starting the node daemon, given thatthey both have to be started on all nodes.
Note that daemon-util only supports starting one daemon at the time, so theactual command has to be composed as a sequence of two different daemon-util...
Add a constant stating whether monitoring is enabled
Move cmdlib.py to cmdlib/__init__.py
cmdlib.py has grown really too much. Move it into its own package toallow splitting it further.
Signed-off-by: Guido Trotter <ultrotter@google.com>Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Allow build_chroot to work from any directory
build_chroot used to work only if launched from ./devel/, whereas nowit can be launched from anywhere, and it will store the resulting filesin the current directory.
Fixes Issue 459.
Signed-off-by: Michele Tartara <mtartara@google.com>...
build_chroot: check whether the data dir exists
If the data directory is not in the expected place, the script complainswith an error message and stops, instead of giving obscure messages.
Partially fixes Issue 459.
Fix a misspelled word in design-storagetypes
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add version numbers to chroot build script
Update the script adding explicit version numbers for increased repeatabilityof the build environment construction process. Version numbers are alignedwith those used by the external buildbot slack role.
QA checks suitability for exclusive_storage tests
When instance tests with exclusive_storage are enabled, the number of PVson nodes are checked to see if it's suitable for those tests.
This fixes issue 437.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
Disk templates are "allowed" and not "enabled" in ipolicies
The way disk templates were displayed in instance policies became confusingsince the introduction of the enabled_disk_templates cluster parameter.
Fix issue 440.
Unit test for FillIPolicy keeping unknown keys
This makes sure that issue 401 doesn't come back.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Merge stable-2.7 into stable-2.8
Conflicts: INSTALL NEWS configure.ac src/Ganeti/Query/Group.hs test/hs/Test/Ganeti/Objects.hs test/hs/Test/Ganeti/Query/Query.hs
Cleanup of the INSTALL file
Curl is not optional anymore. Remove reference to it in the optional librariessection.
gnt-cluster modify: check vg name only on vm-capable nodes
This fixes issue 432: when setting the volume group name, the presenceof the volume group was checked on all nodes. This patch now restrictsthe check only to the vm-capable ones.
Signed-off-by: Helga Velroyen <helgav@google.com>...
Disable inter-cluster instance move for file instances
Inter-cluster instance moves depends on exporting an instance. For file-basedinstance, exporting is not supported. Therefore, this patch disablesinter-cluster instance moves for file-based instances and informs the user...
Improve error message for file instance creation
Currently, when creating an instance with file storage fails,the error message is rather general. This patch adds a hinton what to do as a possible fix.
Update NEWS for 2.7.0 rc1
Move the "main" 2.7 section up to rc1, and just leave the delta inbeta3. Then add a new beta3 to rc1 delta.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
admin guide updates for 2.7
- Mention the file-storage-paths config file- Add information about sharedfile and ext storage types- Change one manpage reference to a proper link
Mention file-storage-paths in UPGRADE
It was in NEWS, but not mentioned at all in the upgrade notes.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
kvm: use -machine type,accel= for newer qemu
-enable-kvm and -disable-kvm are deprecated in favor of accel=kvm passedas a machine specification. This fixes compatibility with newer qemuversions.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
kvm: Move parameter validation before use
We had parameter validation when the runtime is generated, but in themiddle of the function. Move up, before any parameter is accessed.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
kvm: Use -display none rather than -nographic
Newer versions of kvm (from 1.4) don't support -nographic with-daemonize. When -display exists, use -display none instead.
This fixes Issue 389.
INSTALL updates for wheezy, and fixes
- Remove mention of python 2.4 specific modules, as that version is not supported anymore- Add bitarray and ipaddr- Remove a double space- Add mandatory C library packages too- Mention the option of using drbd modules directly from your kernel...
Disable compiling mon-collector if monitoring is disabled
Mon-collector kept being compiled even if monitoring was disabled duringconfigure.
Fixes Issue 441.
Add confd as a dependency of monitoring
Some data collectors require confd data information. Therefore, monitoring isdependent on confd, but this was not checked.
This commit introduces such a check and partially fixes Issue 441.
Add reason trail to haskell opcode format
The haskell type definition of opcodes should remain aligned with the pythonone.
Add the reason trail type definition in Haskell
It will be added to the haskell definition of opcodes, to keep it aligned tothe python one, and it will be used for fetching the reason trail by theinstance status data collector.
Update "reason" field in instance status design
Now the reason field is implemented according to the reason trail designdocument.
Remove outdated TODO comment
Add proper error management to monitoring daemon
Produce a personalized 404 error when the requested resource is not available.
Produce a report for all the data collectors
Implement the API function of the monitoring daemon that provides the reportof all the data collectors.
Generate report for a single collector
Allow to ask the monitoring daemon for the report of one specific datacollector.
Export the full report from DRBD data collector
Export the full report instead of just the data from the DRBD data collector.
Add monitoring daemon to the masterd group
The hmac.key file is owned by group masterd and is required to communicate withthe confd.
The monitoring daemon need to communicate with the confd so it has to be part ofthe masterd group.
Update JSON serialization for "category"
Change the JSON serialization for the "category" field of data collectors,in accordance to the latest version of the design document.
Improve monitoring agent design document
Specify more precisely the format of the category names.
Implement the "list collectors" API in monitoring
Implement the handler for outputting the list of collectors(name, category, kind) in JSON format.
Fix bug in group queries related to node/instance fields
Since we use the primitive string type for group UUIDs, the groupfields have a bug where we pass the group name as filter for nodetests, whereas the nodes themselves use the group UUID. This results...
gnt-instance: new hypervisor parameter 'vif_type'
This patch fixes issue 247. It empowers the user to specifyexplicitly the vif type of a nic configuration of a Xen HVMinstance. This includes the option of setting it to '' on thecommandline, causing Ganeti to leave out the 'type' parameter...
man gnt-instance: new hypervisor parameter 'vif_type'
This patch extends the man page of the 'gnt-instance' commandby describing the newly implemented hypervisor parameter'vif_type'.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add shelltests for hspace allocation
Both tiered and standard allocations are tested, with a single and a doublemin/max instance specification.
hspace: Handle multiple ipolicy specs
With tiered allocation, hspace uses all the max specs in turn as theinitial instance spec.
QA: Test multiple instance specs
The test of the interaction between policy and instances is extended.
QA: Handle multiple instance specs
Existing tests are updated to cope with the new instance specs format.
Unit test for cli.FormatPolicyInfo()
We try to parse the string obtained by formatting a policy, and see if weget the same policy.
Add command-line support for multiple specs in ipolicy
Command line options accept multiple min/max specifications in instancepolicies. The output of show-ispecs-cmd is updated accordingly.
Add multiple min/max specs in instance policy
Now instance policies can contain more than one min/max specs. This is themain element of the "Constrained instance sizes" section in the"Partitioned Ganeti" design doc.
This is a big patch, but changing the type of a configuration item requires...
Separate checks for std spec compliance
This is needed to be able to validate the std spec against multiple min/maxspec pairs (appearing in next patches).
QA: Transpose instance specs
The format used to store instance specs in QA is changed to better handlemultiple instance specs, a feature contained in the following patches.
Log at info level the success of a luxi query
So far, any successful query was only logged at debug level, thus leavingno traces in the logs, unless debugging was enabled. Therefore, we adda notes about successful completion at info level. Also, repeat a failed...
Fix typo in documentation string
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Improve gnt-instance documentation
Explain the relationship of the ip and network parameter in`gnt-instance add --net` better.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fix unclear error when replacing a nic's ip
The current error message ends up saying something like'192.168.5.5' != 'network1', which is sort of non-intuitive (yes, ofcourse they are different). Fix this by explaining better what theerroneous condition actually is....
In plain to drbd conversion, rename LVs back on failure
Currently, if converting an instance from plain to drbd fails afterrenaming the original LVs, the instance is left in an inconsistentstate. This commit tries to undo the renaming if a failure occurs...
Merge branch 'stable-2.7' into stable-2.8
This fixes the problem with the distcheck-release target failing needlessly.
Improve check for "unreleased" versions in NEWS
Currently this is checked only when distcheck-release is called.Check it in check-news instead, for all versions before the "current" one (as defined by configure.ac)
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Update documentation for text format
In commit 000ca91a the text format was extended to also includeinformation about the master node. This commit updates thehtools man page to reflect this change.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Conflicts: NEWS doc/rapi.rst
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add missing fields in htools text-backend documentation
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
cfgupgrade: Remove enabled_disk_templates on downgrade
Remove enabled_disk_templates instead of the deprecatedenabled_storage_types.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Reason trail implementation for "start"
Opcode-specific implementation of the reason trail for the instancestartup operation.
Reason trail implementation for "shutdown"
Opcode-specific implementation of the reason trail for the instance shutdownoperation.
Add unit tests for cfgupgrade with a real configuration
Test upgrade and downgrade from a realistic 2.7 configuration.
QA: Update tests for new ipolicy specs command-line options
The old command-line options weren't working any more. Utility functionsare updated, and broken tests are removed (new tests are coming in thefollowing patches).
QA: Split function to set and parse instance policies
The main parts, moved to qa_util, will be used for node groups too.
QA: More tests for instance policies in groups
Instance policies are changed and checked for changes.
Split functions in cfupgrade unit tests
This makes easier to test real configurations.
cfgupgrade: Limit specs in ipolicy are always complete
Partial specs are filled with cluster defaults.
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....
QA for --ipolicy-xxx-specs and show-ispecs-cmd
The tests check the interactions between the two commands.
Also refactored group QA code to separate tests about ipolicy, as thosetests are going to grow in complexity.
Refactor tests in ipolicy validation
This makes the code more modular, in preparation for the following patches.
Limit specs in instance policies are always complete
Specs used to specify limits in instance policies are always complete, evenat group level (only the whole limit set can be overridden). This is inpreparation for introducing multiple limits.
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.
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.
New CLI input type: list of key/value pairs
This will be used for the new instance specs options.
Allow "default" as a value for ipolicy templates
Previously the string value was being corrupted.
Document all --ipolicy-... options
They were missing from the man pages.
Fix a few unclear sentences in gnt-cluster(8)
The renew-crypto entry had a few obscure sentences. Improve it byrephrasing it.
Make burnin compatible with the reason trail
The burnin uses its own option list, different from the one of all othercommand line programs, and uses it as a parameter to a function that nowrequires the "--reason" option to be present.
This commit updates the burnin option list to be compatible with the reason...
Extend the simulation backend to also simulate a master node
In a simulated cluster as created by the simulation backend tothe htools, make the first node of the first node group the masternode. In this way, hools (like hroller) that require a master node...
Add unit tests for hroller
Add a unit test for hroller in a situation where the orderis completely determined. There are 3 nodes where node 2 has,for each of the other nodes, an instanced shared with it. Sonode 2 has to be a reboot group of its own. There are no more...
Extend Text format by marking the master node
Sometimes, e.g., for hroller, it is necessary to know which nodeis the master node. Therefore this information has to be includedin the text format as well. Since we never use an offline node asmaster node, we can put this information can be put in the "is...
Minor changes / bugfixes in documentation
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Reason trail implementation for instance reboot
This commits allows ganeti to correctly forward the reason trail informationregarding instance reboot.
Add "reason" as a common parameter for all the RAPI calls
Also, this add an infrastructure for having parameters common to all theRAPI calls.
Add infrastructure for adding common RAPI parameters
Some parameters can be common to all the RAPI calls: this commitadds the possibility of specifying them just once, instead ofmanually adding them to the classes describing each call.
Add job_id and index to the reason trail
The reason trail will contain an item indicating the job_id and theindex number of the current opcode inside the job queue.
Add the reason trail to the opcodes
The reason trail is available for all the opcodes, and as such it isinitialized as a generic option.
Add a field to store the reason trail in OpCodes
The reason trail will be available for all the OpCodes, so the field thatis to contain it has to be added to the OpCode base class.
Provide "--reason" as a parameter for all commands
Add function for extending the reason trail
Noded functions will have to extend the reason trail specifying whatoperation is being executed.
This commit adds a function for doing that (will be used by future commits).
Add an opcode name conversion function
Add a function to convert an opcode class name to a source string for thereason trail, factoring out the code in common with the existing _NameToIdfunction.
Add function for storing the reason trail of an instance
We are interested in storing the reason trail for operations that changedthe state of instances. This commit adds a function to do this.
Also, the GetInstReasonFilename() function name is prepended with an...
Add function for getting the timestamp in nanoseconds
The timestamp is returned as an integer number of nanoseconds since the Unixepoch.
Add TMaybeList as a new type for parameters
This will be used as the type for the reason trail parameter.