History | View | Annotate | Download (589.5 kB)
Merge branch 'stable-2.6' into stable-2.6-ippool-hotplug-esi
Fix TypeError when unsetting OS parameters
When all OS parameters should be unset (“gnt-os modify -H -xen-pvmfoo”), a TypeError was raised. This fixes issue 311.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix a bug introduced by resolving a conflict
In _GenerateDiskTemplate() we make use of params variable in caseof ExtStorage. Hotplug code conflicts here.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Merge branch 'stable-2.6-hotplug' into stable-2.6-ippool-hotplug-esi
Conflicts: lib/cmdlib.py tools/cfgupgrade
Refactor hotplug implementation
Remove pci_pool from hotplug_info. Hypervisor decides the pci slotbased on current occupations.
cmdlib.py: don't use GetHypervisor
In cmdlib we must only use the hypervisor class, and never instantiateit. As such we have to call GetHypervisorClass instead, to avoidgetting an instance of it.
This fixes Issue 316, because init is not called from masterd...
Improve error message when migration status fail
Commit 6a1434d7 (“Make migration RPC non-blocking”) changed the APIfor reporting migration status, but has a small cosmetic bug: if themigration status if failure, but the RPC itself to get the statusdidn't fail, it shows the following error message:...
Hotplug: do not allow disk/0 to be hotplug-able
BIOS boots from first disk. If we enable hotplug in disk/0it will added at the end of PCI address space (slot 31). Ifanother disk gets added then it will be added just before andBIOS will try to boot from an non bootable device and the...
Conflicts: lib/cmdlib.py
Make hostname checks uniform between instance rename and add
Currently, we have instance rename doing extra checks on the hostname, to prevent accidental wrong renames; however, instance createdoesn't do these checks (issue 291), which (if DNS is misconfigured)...
Fix runtime memory increases
Commit 2c0af7da which added the runtime memory changes functionalityhad a small typo (wrong name); I've rewritten this to only compute thedelta once, for simplicity.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fix removal of storage directory on shared file storage
This patch makes _RemoveDisks symmetric to _CreateDisks with respectto file-based storage: _CreateDisks uses "in constants.DTS_FILEBASED",whereas _RemoveDisks was not update and only uses "==constants.DT_FILE". This results in stale directories left on the...
Switch non-redundant check to disk template-based
Currently, the warning/notice about non-redundant instances in clusterverify is based non empty secondaries list (how old is this?); theproper way to check this nowadays is via DTS_MIRRORED.
Signed-off-by: Iustin Pop <iustin@google.com>...
Conflicts: lib/config.py
Hotplug: rpc only if instance is running
Intruduce new function _InstanceRunning().Fix *PCIInfo config methods to hold exclusively _config_lock andtake instance object as an argument.
Merge branch 'stable-2.6-ippool' into stable-2.6-ippool-hotplug-esi
Fix a bug in LUNetworkAdd concering needed_locks
Fix network client to pass conflicts_check to the opcode.
Fix disk adoption interaction with ipolicy checks
In Ganeti 2.6, disk adoption is broken due to the ipolicy checks beingdone before we read volume size from remote nodes. We fix this bysimply moving these checks to after the disk adoption code whichupdates the disk size; it's not that nice that we fail a (almost)...
Fixes to pass pylint (make lint)
Fix _GetPCIInfo() to pass unittests
Export serial_no of networks/instances in hooks
Fix locks in network LUs
Acquire corresponding instance locks if conflicts_check is True.
Show old primary/secondary node on disk replacement
People unfamiliar with Ganeti's internals might be confused with thedifferent hostnames showing up later in the process.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Check for existing networks/groups in Network LUs
LUClusterVerify: Ignore /proc/drbd if DRBD is disabled
This fixes issue 190. The problem was that the check for DRBD wasenabled if LVM storage is used and didn't depend at all on whether DRBDis enabled.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Always_failover doesn't require --allow-failover anymore
If an administrator sets always_failover, it means that there is no needfor another explicit approval to failover instead of migrating.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>...
Merge remote branch 'google/stable-2.6' into stable-2.6-ippool-hotplug-esi
Conflicts: lib/rpc.py
cmdlib: Handle locking.ALL_SET correctly when copying locks
When locks are copied “locking.ALL_SET” must be handled separately(ALL_SET has the value None). Reported by Constantinos Venetsanopouloswho saw failover for RDB-based instances not working.
Fix gnt-debug iallocator
There was an issue with the recent ipolicy introduction which lead to abug in gnt-debug iallocator. It was not providing the spindle_use fieldand therefore it wont let you create a valid iallocator request.
Signed-off-by: René Nussbaumer <rn@google.com>...
Fix warnings/errors with newer pylint
To help developing Ganeti on newer distributions, let's try to fixpylint warnings/errors. I'm using pylint from current Debian wheezy:pylint 0.25.1, astng 0.23.1, common 0.58.0, and we have 3 things thatneeds fixing....
Refactor _GetPCIInfo() in cmdlib
Signed-off-by: Dimitris Aragriorgs <dimara@grnet.gr>
Add logging in case of hotplug
Merge branch 'stable-esi'
Conflicts: Makefile.am lib/cli.py lib/client/gnt_instance.py lib/cmdlib.py lib/constants.py lib/opcodes.py
Add the gnt-storage client
Add a new client called 'gnt-storage'.The client interacts with the ExtStorage interface, similarly tothe way gnt-os interacts with the OS interface.
For now, only two commands are supported: 'info' and 'diagnose'.
'diagnose' calculates the node status of each provider on each node,...
Add --allow-arbit-params to gnt-instance modify
Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Multiple ExtStorage Providers and ext-params
Add support for passing parameters to the ext template (ext-params).Take advantage of disk-params, that don't seem to make much sense inthis template (ExtStorage Providers are not predefined and we don'tknow their needs) and use them to pass the ext-params dynamically to...
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...
Merge branch 'stable-hotplug'
Conflicts: lib/cli.py lib/client/gnt_instance.py lib/cmdlib.py lib/objects.py lib/opcodes.py lib/rpc.py
Hotplug: cmdlib support
Hotplugging is done by functions invoked by ApplyContainerMods(). Inorder hotplugging to take place a --hotplug option must be passed.Hotplug can enabled for a VM if --hotplug is passed duringgnt-instance add (hotplug_info will be added)....
Add tags in network objects
Support: - gnt-network add --tags. - gnt-network list-tags/add-tags/remove-tags/. - gnt-network list -o +tags
Pass detailed network info in hooks
Use network's mac prefix
Modify existing GenerateMAC so that it takes network as an argument.
Substitute _GenerateOneMAC with a decorator _GenerateMACPrefixthat chooses the prefix (network's or cluster's) and wraps_GenerateMACSuffix that generates the three remaining bytes....
Modify LUInstanceSetParams() to support networks
Keep backwards compatibility just like LUInstanceCreate() andsupport network parameter for NIC object.
Add ec_id argument in Update() to be able to commit temporaryIPs that were previously reserved.
Implement LUNetworkSetParams
Support modifying all network parameters except for network (ip range)Cannot modify gateway and reserved ips at the same time.
Implement network/nodegroup mappings
LUNetworkConnect() connects a network to a nodegroup and definesits netparams (mode and link). Specifically: * Check if network already exists * Check if netparams are valid * Check if already connected to the same nodegroup...
Modify LUInstanceCreate to support networks
Implement backend support, to export the IP pool managementfunctionality to the clients. When the new NIC parameter 'network'is given, the ippool management system is triggered.If a NIC belongs to a network, it inherits the netparams...
Basic IP pool management logic
Implement LUs for corresponding opcodes: * LUNetworkAdd: - Check for IP validity - Reserves all necessary IPs - Create new Network config object * LUNetworkRemove: - Checks if connected to any nodegroup - Remove a Network config object...
Implement LUNetworkQuery
Summarily list all existing networksSupply detailed info for every existing network - List used/free IPs - List instances with NICs assigned to the corresponding network - List NIC index and IP for the above instances
Implement complementary config methods for retrieving networks....
IP pool related objects, opcodes and constants
Config objects: * Introduce L{Network} with - IPv4 network field (mandatory) - IPv4 gateway, IPv6 (network/gateway), mac prefix, type (optional) * Modify existing config objects to support networks: - Add new slot 'network' to L{NIC} config object...
Fix computation of disk sizes in _ComputeDiskSize
Currently, hail fails with FailDisk when trying to add an instanceof type: 'file', 'sharedfile' and 'rbd'.
This is due to a "0" or None value in the corresponding dict inside_ComputeDiskSize, which results in a "O" or non Int value of the...
Add verification of RPC results in _WipeDisks
Due to an oversight, the pause/resume sync RPC calls in _WipeDiskslack the verification of the overall RPC status, and directly iterateover the payload. The code actually doing the wipe does verifycorrectly the results. This can result in jobs failing with a hard to...
Fix issue in LUClusterVerifyGroup with multi-group clusters
In case LUClusterVerifyGroup is run on a group which doesn't containthe master node, the following could happen:
- master node is selected due to the explicit check- if the order of nodes in the 'absent_nodes' list is such that the...
Fix node group modification of node parameters
Commit 904b3bfe tried to fix the deletion of custom ndparams fromgroup, but instead broke both modification and deletion: because werun ForceDictType on self.op.ndparams instead of the updatednew_ndparams, we can neither delete nor set properly spindle_count...
Fix setting ipolicy on node groups
On node groups we don't have the std field. However, the InstancePolicyobject always verifies that the std value is within a given range. As wefill it up with defaults if not set (as it happens to be on node groups)and the min value is higher than the default std value (taken from...
Allow reinstall even when secondaries are offline
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Agata Murawska <agatamurawska@google.com>
Ignore offline node errors when removing disks
When we delete DRBD disks from some instance, we do not want to geterrors due to nodes other than that instance's primary being offline.
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Iustin Pop <iustin@google.com>...
Allow instance disc activation with offline secondaries
Currently, this is not allowed, so one can't run a replace-disks; thisbreaks any non-invasive method of recovering the redundancy of theinstance if its disks are already stopped (but it still works if the...
Fix redistribution of files w.r.t. offline nodes
Currently, _RedistributeAncillaryFiles computes two lists: the list ofonline nodes (for all files redistribution), and the list ofvm_capable nodes, for hypervisor-specific files. However, thevm_capable list includes offline nodes too, leading to warning...
Fix cluster verify error on master-ip-setup script
This error does not show up until we exceed the pool of mastercandidates and have nodes which are not master candidates.
The background is that we check for master-ip-setup script on mastercandidates and expect them not to be on the other nodes. However, we...
Annotate disks upon blockdev_shutdown
Annotate disks on blockdev_remove
This annotates the disks for the blockdev_remove where it isappropriate. It leaves out 2 cases were we can't reliably annotate diskparameters due to lack of knowledge what we should annotate. Those casesaffects only lvs used for drbd, so it doesn't affect the bug reported by...
Annotate disk params on blockdev_getmirrorstatus_multi
This is also related to the bug reported by Constantinos,as we've only one getmirrorstatus_multi call in whole cmdlib, we justannotate them while we are building the disk list.
Annotate disk parameters on blockdev_getmirrorstatus
Not annotating them works for DRBD but not for RBD as reported byConstantinos.
Fix bug in instance net changes
_PrepareNicModification returns the invalid type, which triggers anassert resulting in a mysterious error:
Failure: command execution error:
Without any explanation. We fix this by removing the return value from_PrepareNicModification, and instead returning the expected type...
Verify the options on diskparameters
This prevents from setting for example drbd options on the plain disktemplate.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix creation of plain instances with --no-wait-for-sync
As reported on the devel mailing list by Christos Stavrakakis,creation of plain instances is broken when the --no-wait-for-sync flagis passed, because in that case WaitForSync is not called, hence...
Improve error message for auto-promote/node modify
This has been reported internally 3-4 times already, and the currentversion (from 8b437a6e) is still not good enough, it seems.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix a type issue and bad logic in cluster verification
Commit 2e04d454 introduced the new offline state for the instancestate, but being a big monolithic patch it sneaked in something thatdoesn't make sense.
The checks for extra instances (either wrongly up or just unknown) are...
Make it possible to reset vcpu/spindle ratio to default
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add man page documentation for cpu_mask hv parameter
This is adapted from the design doc.
Also fixes a typo in cmdlib.py.
Beautify a couple of error messages
Fix _ComputeNewInstanceViolations logic
This function did the opposite: was computing which old instanceviolated the specs but no longer do it now. new - old is the expectedbehaviour.
Beautify disk ipolicy violations in cluster-verify
Currently, we only get:
instance3: ['disk-size value 512 is not in range [1024, 1048576]'
which doesn't explain which disk we are talking about. This patchextends the verification functions to take an additional parameter...
LUInstanceCreate: Run rename script on instance import
If an instance is imported with a different name, network settings may have tobe changed. Since import scripts may not already to the right thing, we decidedto run the rename script. The same technique is already used for inter-cluster...
gnt-group add: Fix diskparam fill
This was a pretty non-obvious bug. A cluster looks sane aftergnt-cluster init, however on a daemon restart the diskparameters had thedefault filled in. The same applies to gnt-group add. This is due to thenature that UpgradeConfig() from NodeGroups did just populate them with...
gnt-group modify: Fix an update issue with diskparams
query: Expose diskparamters through query
gnt-cluster info: Print and format disk parameters
apidoc: Fix some typos and errors introduced by my previous patches
LUGroup*: Fix inheritance of disk parameters
Special case blockdev_find
Similiar to blockdev_create we sometimes do find on children. This fixesthose cases. However, this is not very nice.
Special case blockdev_create
This is due to the nature of bdev. We spread some logic into cmdlib anddeal for example with it's children recursively. This makes it hard toannotate the disk parameters in a generic way as we don't always dealwith the top most disk. But the disk parameters are depending on the top...
cmdlib: Adding annotation helper for special cases
cmdlib: Remove all diskparams calculations not required anymore
cmdlib: Adapt the rpc calls
The following (blockdev) RPC calls are not converted yet (as they arenot straight forward or need more research):
rpc: Adding helper to annotate disk params
Add 'absolute' grow-disk mode at OpCode/LU level
This also improves the log messages for the (default) relative mode("by %s to %s").
Convert LUClusterConfigQuery to query2
The main intention of this patch is to make it possible to retrievecluster tags via query2. While at it I decided to convertLUClusterConfigQuery right away. Some of the values returned byLUClusterQuery are also included, but the conversion of LUClusterQuery...
Stop using locks in LUXI "QueryTags"
Also mark it as deprecated in NEWS as normal queries can be usedinstead.
Convert listing exports to query2
This solves one case where locks are acquired during LUXI queries.Pretty late into the transition I noticed that OpBackupQuery had a“use_locking” parameter for a long time, but didn't use it. Sincemost of the other changes were already and this allows exports to...
Copy debug level, priority and set comment for LU-generated opcodes
Before this patch, a node evacuation submitted with high priority wouldonly compute the solution at that priority, but the actual evacuationran at normal priority.
Merge branch 'devel-2.5'
Merge branch 'stable-2.5' into devel-2.5
Merge branch 'devel-2.4' into stable-2.5