luxid: fix detection of master node in node query
Ganeti.Config.getNodeRole would rely on clusterMasterNode returning themaster node name, however clusterMasterNode returns the master node'sUUID. We fix this and a similar issue in Ganeti.Query.Node.nodeFields....
query: fix detection of master in _GetNodeRole()
Commit 1c3231aa changed the invocation of _GetNodeRole() to pass themaster node by UUID and not by name, but didn't change theimplementation to compare the nodes by name. As a result, the masternode (which is also a master candidate) would always fall through to the...
Break line longer than 80 chars in configure.ac
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Jose Lopes <jabolopes@google.com>
Technical writing: improve documentation and glossary
Improve structure and content on the main documentation page of Ganetiand the glossary.
Signed-off-by: Betsy Beyer <bbeyer@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
configure: allow detection of Sphinx 1.2+
The regular expression used for parsing the Sphinx version does not workwith Sphinx versions after 1.1, as reported in issue #502. The reasonfor this is that upstream commit 8f28af8e2ed81 introduced propersupport for --version, which ganeti was already using but sphinx-build...
Remove deprecated _ERROR_DATA_KEY in QMP
Commit de253f14 of QEMU repo "BREAKS QMP's compatibility forthe error response" as it removes "data" key from qmp errorresponse messages. To this end we only log "class" and "desc" values of the message.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>...
Technical writing: improve main documentation page
Improve structure and content on the main documentation page ofGaneti.
Update the NEWS file with the Issue 640 fix
Add an entry in the NEWS file describing the fix of Issue 640.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Ensure that all the hypervisors exist in the config file
All the hypervisors are supposed to exist in the config file, but it might notbe so after upgrades from old versions. This patch ensures that all the missinghypervisors are added with their default values to the config file....
Fix testEncodeInstance test input
The input of the testEncodeInstance test was not adherent to the actual formatof the Ganeti configuration file: kvm has no HV_BLOCKDEV_PREFIX, and "hvparams" inside an instance should only contain the values of the hypervisor parameters,...
Merge branch 'stable-2.8' into stable-2.9
Add support for blktap2 file-driver
Newer Xen versions use blktap2 instead of blktap. This patch adds supportfor it in Ganeti.
Fixes Issue 638.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Fix RAPI network tag handling
The network tags were absent from an if check used to actually listtags. The patch fixes the oversight, and adds a proper error message incase the issue occurs again for a new tag type.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Add network tag tests to QA
The QA did not have a test for network tags until now, and this patchremedies the situation.
Signed-off-by: Hrvoje Ribicic <riba@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Make network tags searchable
This patch adds the network tags to the tags searched by gnt-clustersearch-tags, and in the process cleans up the code slightly.
Update opcodes test to include network tags
This patch adds the network tags to the list of all other tag typesthat can be tried in QuickCheck tests.
Fix gnt-network list-tags
Define network tags in haskell part.
This fixes issue 641.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Bump revision for 2.9.2
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Update NEWS for 2.9.2 release
Besides a few local fixes, the main improvement are the changesinherited from stable 2.8.
Pass hvparams to GetInstanceInfo
...so that the xen command to be called can be determined. Thisfixes another semantical conflict of the last merge.
Adapt parameters that moved to instance variables
Due to a change in the code organization in stable-2.9, somemethod variables became instance variables, causing a semanticmerge conflict. Fix this.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Avoid lines longer than 80 chars
...as they're a lint error.
Version bump for 2.8.3
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Update NEWS for 2.8.3 release
List all the changes that happened between 2.8.2 and 2.8.3.
Support reseting arbitrary params of ext disks
If param=default and the param already exists then we removeit from params dict. This is stolen by GetUpdatedParams() whichis used for hvparams modification/inheritance.
This means that 'default' value is not accepted for an arbitrary...
Allow modification of arbitrary params for ext
Disks of ext template are allowed to have arbitrary parametersstored in the Disk object's params slot. Those parameters can bepassed during creation of a new disk, either in LUInstanceCreate()or in LUInsanceSetParams(). Still those parameters can not be...
Do not clear disk.params in UpgradeConfig()
Commits 5dbee5e and cce4616 fix disk upgrades concerning paramsslot. Since 2.7 params slot should be empty and gets filledany time needed.
Still ext template allows passing arbitrary params per disk.These params should be saved in config file for future use....
SetDiskID() before accepting an instance
SetDiskID() fills physical_id slot of a Disk object.
LUInstanceSetParams() does not invoke SetDiskID() upon creation of anew disk. As a result the physical_id slot of the Disk object inconfig data is missing.
In case of ext disk template, in AcceptInstance() we invoke...
Lock group(s) when creating instances
This is required to prevent race conditions such as removing a networkfrom a group and adding an instance at the same time. (See issue 621#2.)
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>...
Fix job error message after unclean master shutdown
According to commit 599ee321eb, any job-related error messages shouldbe encoded within a Ganeti-specific error and not passed on as astring, to allow for easier parsing.
For jobs suffering from an undesirable status after an unclean master...
Add default file_driver if missing
If the file driver of an instance with file based storage is not specified, thedefault one is automatically added by the UpgradeConfig function.
Fixes Issue 571.
Update tests
Update hypervisor unit tests.
Partial cherry-pick from d2e4e099e4248832fef8ed7b0755d01bd4178e3a
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Xen handle domain shutdown
Update Xen backend to properly recognize when a domain has beenshutdown by the user and to properly cleanup a shutdown domain whenGaneti requests Xen to stop this domain.
Partial cherry-pick from 9d22cc90609e3ee8f0f2b34b793a3daced3c0e61...
Fix evacuation out of drained node
Refactor reading live data in htools
This simplifies different handling of individual items.
Cherry-picked from 8c72f7119f50a11661aacba2a1abffdfdc6f7cfa.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
master-up-setup: Ping multiple times with a shorter interval
In the case of network problems, one ping packet can possibly get lost.Sending multiple packets is safer. The interval between packets is setto 200ms so that the check finishes faster.
Signed-off-by: Petr Pudlak <pudlak@google.com>...
Add a packet number limit to "fping" in master-ip-setup
This fixes issue #630. Apparently there is a bug in fping 3.5 where itloops forever without "-c" given an unreachable host, even though"-c 1" should be the default according to the man page.
The "-c" flag works on Squeeze. Checking the man pages on the Internet,...
Fix a bug in InstanceSetParams concerning names
In case no name is passed in disk modifications we shouldkeep the old one. If name=none then set disk name to None.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
SingleNotifyPipeCondition: don't share pollers
As widely known Ganeti uses a better1 lock condition notificationlibrary based on operating system pipes.
Inside this library we were using a shared poller for all threadswaiting for a condition. While poller is not thread safe, since (1)...
build_chroot: hard-code the version of blaze-builder
The newest version does not build on Debian squeeze, so avoidit being pulled in as a dependency.
This is the same issue that has been fixed in [1e078ef3] on master.
Fix error printing
Fixes issue 616.
Allow link local IPv6 gateways
Each host using IPv6 always has a link local address in fe80::/10. It iscommon to use fe80::1 as default gateway to ease client configuration.Ganeti prevented this usage, because it made sure that the IPv6 gatewayis in the IPv6 network the instance is connected to....
Fix NODE/NODE_RES locking in LUInstanceCreate
Both NODE and NODE_RES locks were acquired opportunistically if sorequested by the user. LUInstanceCreate requires, however, that theactually locked elements on NODE and NODE_RES level are the same.
This patch changes the locking of NODE_RES such that those locks are not...
eta-reduce isIpV6
This is not only better style, but also fixes a lint error.Also use the infix form of `elem` to increase readability.
Ganeti.Rpc: use brackets for ipv6 addresses
We detect an IPv6 vs V4 address based on columns, rather than passingthe family from the cluster object to be more future proof (in casewe'll ever support mixed clusters).
Unfortunately quite a bit more code is required to test this: we need an...
KVM: use custom KVM path if set for version checking
This commit fixes two TODOs from 2008 about using the hardcoded"default" path for KVM where a custom one could've been set through`gnt-cluster modify`.
As a result, `gnt-cluster verify` will no longer fail if a custom...
Update NEWS file with socket permission fix info
The NEWS file now contains a 2.8.3 entry, describing the fix of theprevious patch.
Fix socket permissions after master-failover
When using gnt-cluster master-failover, on the soon-to-be-master theluxi daemon is started by the node daemon. This makes the luxidaemon inherit the node daemon's umask 077, making the communicationsocket unreadable to group members. When using Ganeti with non-root...
Bump revision for 2.9.1
Update NEWS and schedule release for 2.9.1
Now that issue 608 fixed, schedule a new release datefor 2.9.1.
Fix retrieval of xen command in class method
This patch fixes issue 608. When introducing theconfigurability of the xen toolstack in commit8ef418bb92, the hypervisor api was accidentally changedin a way that let to this error in KVM.
Signed-off-by: Helga Velroyen <helgav@google.com>...
Fix docstring for ganeti.storage.filestorage_unittest.py
Signed-off-by: Santi Raffa <rsanti@google.com>Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Undo revision bump
Before releasing 2.9.2, we still have issue 608 to fix; ifno release date is set, we still have to be at the lowerversion.
Postpone release of 2.9.1
...until issue 608 is fixed.
Revision bump for 2.9.1
Update NEWS for 2.9.1 release
Add a section in the file for the new upcoming release. Besidesthe fix of the DRBD race condition inherited from 2.8.2, thisalso fixes handling and readding of offline nodes.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Readd nodes as online
Patch d0d7d7cf accidentally removed the offline-flag resetwhen readding a node. Readd it.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
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....
Conflicts: NEWS: trivial configure.ac: ignore version bump on stable-2.8 lib/bdev.py: manually apply the part of commit...
Version bump for 2.8.2
Update NEWS file for 2.8.2 release
Add a section in the file for the new upcoming release.
DRBD: ensure peers are UpToDate for dual-primary
DrbdAttachNet supports both, normal primary/secondary node operation, and(during live migration) dual-primary operation. When resources are newlyattached, we poll until we find all of them in connected or syncing operation....
Revision bump for 2.9.0
Schedule release of 2.9.0
...and mention the last change pulled in from stable-2.8.
Conflicts: lib/cmdlib/instance_storage.pyResolved by manually applying the node name to uuidtransition on the version of stable-2.9.
Improve error message for replace-disks
In some conditions, replace-disks will fail if the disks are not properlyactivated. Improve the error message suggesting to run activate-disks beforeexecuting replace-disks.
Fixes Issue 606.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Conflicts: configure.ac: take both additions (and fix)...
Add all dependencies for confd as test dependencies
Since our tests pull in confd as a dependency, all build dependenciesfor confd are also necessary to run the tests.
Add snap-server to the test-relevenat packages
While snap-server is only needed for the optional monitoring daemon,some tests, notably those testing these optional features, still dependon it. So, if snap-server is missing, the Haskell tests should not be...
Placate warnings on ganeti.outils_unittest.py
Change ovf.py from using 'if foo:' to 'if foo is not None:' checks assuggested by the FutureWarnings the OVF library raises otherwise.This fixes issue 557.
Signed-off-by: Santi Raffa <rsanti@google.com>Reviewed-by: Jose Lopes <jabolopes@google.com>
Start NEWS entry for 2.9.0 rc4
So far, we have correct start/stop of luxid during gnt-cluster master-failoverinherited form stable-2.8
Version bump for 2.8.1
Also, update the NEWS file accordingly.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Verify that ConfD is running after master-failover
This patch adds additional 'gnt-node list' commands tothe testing of 'gnt-cluster master-failover' in order totest if ConfD (or LuxiD) is still running after amaster-failover.
daemon-util: handle luxid in {start,stop}_master()
Luxid was not handled in start_master() and stop_master() at all. As a result,during a master-failover, luxid would be left running on the old master andwould not start on the new master, leaving the cluster without management until...
Fix typo in storage.FileStorage docstring
Fix path for serial file
It is actually located inside the queue directory.
Version bump for 2.9.0 rc3
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add NEWS entry for 2.9.0 rc3
The main news is, that we fixed another issue with the configurationupgrading process.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Remove incorrect comment
Removing a comment which falsely states that Ganeti willstop supporting certain upgrades at some point.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
cfg auto update: match ipolicy with enabled disk templates
This patch fixes issue 599. The problem was that with 2.9,a sanity check was introduced that made sure that theipolicies' set of disk templates is a subset of thecluster-wide enabled disk templates. In order to make...
Remove obsolete configure option for shared file storage
This patch removes an obsolete configure option relatedto shared file storage. It was remove a while ago, butaccidentally reintroduced through a merge.
Improve harep documentation
Add a more complete description of how the tool works.
Version bump for 2.9.0 rc2
Update NEWS for 2.9.0 rc2
Document that we have also taken care of the bug in 'cfgupgrade --downgrade'and schedule release date.
Fix typo in walkthrough documentation
Fix typo in walkthrough documentation, where 'instance3' should read'instance1' in order to be consistent with the output below in theexample.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Downgrade 'vif_script'
This patch adds removing the 'vif_script' attributefrom the cluster's config when downgrading from 2.9to 2.8. Adaption of the unit test is included.
Downgrade 'xen_cmd'
This downgrades the cluster's hypervisor parameters for thexen hypervisors with respect to the 'xen_cmd' attribute.A unit tests is provided.
Add test cluster config for version 2.9
This adds a cluster config example for version 2.9 tothe test data collection. It will be used in subsequenttests.
Remove superfluous import of 'errors'
Don't attemp ipv6 ssh in case of ipv4 cluster
In case of a cluster with primary-ip-version=4, there is no needfor cluster to try ipv6 ssh connections which may timeout.So append '-4' on ssh if cluster is ipv4-only
Signed-off-by: Costas Drogos <costas.drogos@gmail.com>...
Start NEWS entry for 2.9.0 rc2
So far, there is one important change since 2.9.0 rc1, the fixin cfgupgrade.
Fix lint errors
This fixes a couple of lint errors that I missed withthe patch "Fix upgrade and downgrade regardingdisk.dev_type".
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Fix upgrade and downgrade regarding disk.dev_type
The up/downgrade procedure so far did not consider thechanges in the 'dev_type' attribute of disks. This patchadds relevant checks and updates. A related problemwas that the logical IDs of disks were adjusted depending...
Rename LDS_DRBD to DTS_DRBD
This patch renames the constant 'LDS_DRBD' to 'DTS_DRBD'to make it consistent with the renaming of LD_* constantsto DT_* constants.
Fix outdated documentation for users-setup
The --yes-do-it parameter was not properly documented yet. Add it to theadministration guide.