Update IAllocator interface documentation
Update the missing documentation for the tags fields of node groups.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>(partially cherry picked from commit 2daca99b5be21ea4667637721ee2c65a14444520)...
Bump up version for 2.7.0~rc2 release
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add NEWS entry for SO_PEERCRED fix
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Workaround missing SO_PEERCRED
This bug happens in a few new distributions, so we workaround it bydefining the constant ourselves, if it's missing.
Add debugging clause to _ExpandCheckDisks error
This has been reported by users, so we should have the extra debuggingavailable.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Mention hail network incompatibility in manpages
We can't fix this in the 2.7 version, so it should be documented.
Remove obsolete Debian-related documentation
This part of the documentation refers to Grub instead of Grub2, butGrub2 has been the standard boot loader since Squeeze. As this part only(wrongly) repeats the preceeding documentation, it's removed completely....
Update NEWS for 2.7.0 rc2
Move "local" entries at the bottom, and leave global 2.7 entries at thetop, as for the other releases.
Improve installation documentation
Based on user feedback the installation documentation is clarified andextended.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>(cherry picked from commit 3913eaa72b8a48706ca4caa59dd022fa1a05805a)...
Fix owner of the OS log dir
The OS log dir is used by noded, not masterd.
Signed-off-by: Balazs Lecz <leczb@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Update NEWS with disk creation fixes
Also document a couple more fixes.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Don't fail to deactivate master IP if already down
The master IP setup script now checks if the master IP is actuallyconfigured on the machine before trying to remove the IP.
This fixes issue 460.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add QA for recreating single instance disks
So far QA only recreated the whole set of disks at once.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add QA for gnt-instance modify --disk
Just a very basic test that adds and then removes a disk.
Clean up when "gnt-instance modify" fails to create a disk
cmdlib.LUInstanceSetParams now uses helper functions to create and wipedisks, so that when the creation of a disk fails, any leftover device iscleaned up. As a bonus, exceptions raised by _CreateBlockDev() are caught...
recreate-disks honors the prealloc_wipe_disks flag
Now even recreate-disks wipes the newly-created disks, if the flag is set.
Introduce wrapper for cmdlib._WipeDisks()
The wrapper handles errors by logging them and cleaning up freshly-createddisks.
Also, the correct disk is used in the error message when an error happensin cmdlib._CreateDisks() and the resulting disk clean-up fails....
Don't catch an exception that cannot be raised
Since 9b221ea4, _CreateBlockDev() doesn't raise OpExecError any more. Yetsome code was left in place to catch it. By removing that code we have twoadvantages:1. Dead code is removed.2. If for whatever reason _CreateBlockDev() raises OpExecError, the...
Wipe disks added through "gnt-instance modify"
In issue 353 Sascha Lucas reported that disks are not wiped when addedthrough “gnt-instance modify”. This patch adds this functionality andupdates the docstring for “_WipeDisks”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Support /var/run being a symlink in upload
Starting from Debian Wheezy, /var/run is a symlink to /run. If rsyncdoes not treat receiving symlinks to directories as directories, itwould remove the original symlink and create a new, empty directorywhere only the files to sync are put in. In the case of /var/run, this...
Final NEWS and configure.ac update for 2.7.0~rc1
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
gnt-job list: deal with non-ascii encoding in jobs
This fixes issue 432. If a job summary contained a non-ascii character,gnt-job list crashed badly so far. This patch fixes the crash and makesgnt-job list display unicode characters properly.
Signed-off-by: Helga Velroyen <helgav@google.com>...
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.
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.
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.
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.
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.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
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.
Signed-off-by: Michele Tartara <mtartara@google.com>...
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>
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.
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...
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>...
Add missing fields in htools text-backend documentation
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix a few unclear sentences in gnt-cluster(8)
The renew-crypto entry had a few obscure sentences. Improve it byrephrasing it.
Bump up version for 2.7.0~beta3
Update NEWS for 2.7.0~beta3
- Most entries for beta1 are moved to the top level- The beta1 to beta2 delta is left
Allow proper cleanup of partially created disks
During the creation of an instance, if the creation of disks fails, somepartially created disks might remain lying around. There is an alreadyimplemented cleanup procedure, but it requires the disks to be listed in the...
Better wording of a documentation sentence
Specify that the need to manually modify the metavg only applies toclusters with DRBD enabled, and is not always required.
Specify behaviour of vg-name change in gnt-cluster manual
The current behaviour of a volume group name change after the clusterhas been initialized can be somewhat unclear. This patch specifies itmore esplicitly in the man page.
Set the default metavg to be equal to the cluster name
The default metavg was always set to be the constant value "xenvg".This is OK for most cases, but if the cluster is initialized witha default name through the --vg-name option, the metavg should change...
Move HooksMaster out of the mcpu module
We need to do this, so that backend.py doesn't need to import mcpu, andthus indirectly cmdlib. This reduces the size of the node daemon byabout half, which is very important as it is pinned in memory.
This solves Issue 419....
users setup: add masterd to confd group
Without this masterd fails saving the config, because it can't changethe group on the file.
Use KB as the unit for LVM PE size
LogicalVolume.Attach in bdev.py is calling "lvs" and specifying a unit ofMegabytes that is then converted to an integer resulting in the value 0 forsmall sizes.
This patch makes Ganeti use KB for the unit instead of MB....
Improve RAPI documentation for command line usage
Provide some more insights about how to use the RAPI from the command linethrough the "curl" command.
More info on using the RAPI
Add some additional information about how to use/test the RAPI,including how to specify authentication credentials.
Cherry picked from 681f4f7bb95a2b467f917c84a68ccf9aa7665763 on master.
Fix burnin install path
Due to a bug in 8e55e20f burnin's installation path got changed.Moving tools/burnin to the right makefile target reverts this (whilepreserving the value of the original commit).
Fix format of the NEWS file
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
NEWS: Add news entry for the hail disk policy fix
hail now correctly applies the instance disk policies, whichleads to differnt allocations.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add shelltests verifying hail applies disk ipolicy per disk
We test on two minimal examples, a positive and a negative one, wherethe possibility to allocate a node depends on whether the disk policyis checked on a per-disk level or on the total amount of disk space...
Make the disks parameter available to the constructor
In that way, tools building on Instance will benefit from the correctedverification semantics of the instance policy on disk space.
Verify individual disks in Instance
Instance policy on disks is specified on a per-disk basis. So extendthe instance description by the sizes of the individual disks and modifythe instance policy verification to correctly check individual disks.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Compatibility fix for GHC 7
Importing an instance, like JSON, automatically allows the names of allits functions to be used.
If one of this functions (namely showJSON) is imported separately, GHC 6is fine with that, but GHC 7 emits a warning (therefore, the compilation of...
Properly update iv_name of disks while changing templates
Trasforming the disk of an instance from DRBD to plain did not properlyupdate the iv_name of disks, leaving it to None.
This commit modifies _ConvertDrbdToPlain to properly set the iv_namevariables....
Check minimum size of networks on creation
When creating a network, so far no size constraints were checked.We now limit the size of a network to a /30 or bigger, althoughtecnically, the ipaddr library supports even /32 networks.
Limit the size of networks to /16
This patch introduces an upper limit to the size of the networks that canbe created.
Fix job queue directory permission problems
If split users are used, the queue directory could only be accessedby masterd, but also confd needs to be able to read it, e.g. when itis queried as part of "gnt-job list"
This commit fixes the permissions in such a way to allow proper access rights....
The disk size of a diskless instance is 0, not None
For diskless instances it is still reasonable to sum up the disk usageof all the (zero) disks, resulting in the empty sum. This uniformityalso has the advantage that iallocators (like hail) do not have to do...
Postpone non-urgent TODO from 2.7 to 2.9
Add tool for creating users and groups
When executed in split user mode, Ganeti requires a specific set of usersand groups to be created in the appropriate way.
This commit introduces a tool that takes care of that automatically.
Backwards compatibility fix for Lucid
The code introduced by the previous commit triggered a possible libraryconflict in Ubuntu Lucid.
This patch introduces an equivalent but more widely acceptable version ofthe same code.
Properly export errors while reading job list
In case of problems while reading the job list from disk (such as permissionerrors) confd would silently fail, writing a warning on the log file butsending an empty list and no error message to the client....
Fix typo and improve comment
Fix a bug in the Runtime tests
A group name was erroneusly inserted in the list of user names.
Restrict instance move to templates based on local files
Moving an instance is done by copying over the disks. Restrictthis to disk templates that are copyable. This avoids accidentaluse on, e.g., the sharedfile template.
Introduce a constant for the copyable disk templates
This list contains the disk templates suitable for movingan instance by copying the files. A requirement is thatthey're not accessed externally or shared between nodes;in particular, sharedfile is not suitable....
Do not _RemoveDisks after failed _CreateDisks
Now that _CreateDisks cleans up after itself in case of failure,do not clean up at call sites, as there we have to overapproximatethus potentially causing data loss.
Make _CreateDisk clean up partially created disks on failure
_CreateDisk used to just throw an exception if _CreateBlockDev failedleaving the caller in the state that some disks were created, withoutprecise knowledge which. Usually, the clean up then overapproximated...
Fix typo in an error message
Bump up version for 2.7.0~beta2
Also update the release date for beta2
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
check-news: fix behavior on invalid date line
Before:$ ./autotools/check-news < ./NEWSTraceback (most recent call last): File "./autotools/check-news", line 150, in <module> main() File "./autotools/check-news", line 120, in main parsed_ts = time.mktime(time.strptime(m.group("date"), "%d %b %Y"))...
News updates for 2.7.0 beta2
Mention most relevant updates and user visible changes and fixes.
These entries will only be maintained during the beta/rc series, butwill then be replaced with a single "2.7.0" entry when we will release2.7.
cfgupgrade: Fix error messages
Messages were inconsistent. You could get both an error and a messagesaying that everything was fine.
Update "FIXME" string in RAPI
We are not ready for this change yet. Let's push it to 2.8.
rapi client: add target_node to migrate instance
This allows migrating to any node, as it is already possible forfailover, when instances are externally mirrored.
Signed-off-by: Daniel Krambrock <danielk_lists@z9d.de>Signed-off-by: Guido Trotter <ultrotter@google.com>...
Make diskless instances externally mirrored
This addresses Issue 237.
Mirroring no disk is a no-op. As such we can treat them like mirroredinstances, since the data they need (none) will be present on all nodes.
This is definitely enough to failover or migrate instances with a manual...
Fix migrate/failover -n for ext mirror storage
This fixes issue 396.
- Fix a wrong comment that mentions drbd8 when actually the code acts only on externally mirrored instances.- Fix a wrong assert that requires failover/migrate to acquire the NAL on externally mirrored instances: this is the case only when a...
Add QA for instance creation with policy violation
When instance policy is violated, creation fails.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add QA for policy-instance interactions
Violations on policy changes are checked.
Add QA for cluster policies
qa_cluster.TestClusterSetISpecs() is exported as it will be used in futuretests.
Unit tests for objects.InstancePolicy + a fix
Tests for: objects.InstancePolicy.CheckParameterSyntax() objects.InstancePolicy.CheckDiskTemplates() objects.InstancePolicy.CheckISpecSyntax()
Instance policies with an empty disk-template list now are reported....
Unit tests for objects.FillIPolicy() + small fix
IPOLICY_DEFAULTS is now a legal policy (the disk-templates entry was a setinstead of a list, before).
Fix upgrade of policy in objects.Cluster
Unknown elements were silently removed on startup. This means that asoftware upgrade could result in lost configuration information ifcfgupgrade wasn't run promptly.
Added unit test for Cluster.UpgradeConfig() to cover this case....
Fix instance policy checks for default back-end parameters
Policy violations of back-end parameters that used the cluster defaultvalue were not reported in cluster-verify.
Fix restoring default instance specs in group policies
"default" was not accepted as a valid input value for instance specs ingroup policies, due to a bug introduced in 2cc673a3e (and released with2.6.0). Added QA for this and another similar case.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
Unit tests for cmdlib._GetUpdatedIPolicy()
Not 100% coverage, though.
Fix policy check for disk templates
Instance disk template is checked against the policy, and disklessinstances aren't checked for the number of disks.
Fix merge 8e09e801 that resulted in duplicated code
A fragment in LUInstanceCreate.CheckPrereq() removed in commit ba147ff8 wasreintroduced in merge 8e09e801 due to a change in df28c49b.
GanetiRapiClient: fix the no_remember option
There was a typo which prevented the correct option from being passed toRAPI
Signed-off-by: Daniel Krambrock <danielk_lists@z9d.de>Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Change hbal behaviour in case of early exit
Currently, hbal exits with status 1 if early exit is requested, evenwhen all jobs are successful. This is counter-intuitive behaviour, solet's fix it (Issue 386).
Note that the man page had conflicting information already, so it's a...