History | View | Annotate | Download (383.6 kB)
Remove private ip mention in error message
There is no "private" ip in Ganeti, we only have primary and secondaryones. Whether they are public or private is a per-installation detail.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add -s option to gnt-node modify
We can now change a nodes' secondary ip.
LUExportInstance: Accept instance already shut down
To remove the instance after an export it needs to be stopped. This canbe achived using the parameter “shutdown”, or by explicitly shuttingdown the instance before exporting. The latter would still require the...
Prevent onlining a node without working noded
This is just a basic check, plus a warning. In the future, we might domore checks, or prevent simple onlining (without readd) if --force isnot passed.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Yet another rework in LUSetNodeParms
We will need the new role in CheckPrereq, so move its computation thereand save the new role to self.
Prevent moving/creating instances on non-vm nodes
This small patch modifies LUCreateInstance, LUReplaceDisks andLUMoveInstance to not use non-vm_capable nodes.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add vm_capable to LUSetNodeParams
And also do some cleanup: we only run the role changed actions if thenode has actually changed roles.
Add support for vm_capable in cluster verify
The method to make vm_capable integrate easily into cluster verify is as follows:
- we add a new NV_VMNODES that represents nonvm-capable nodes the LU populates this list (it's expected that non-vm_capable nodes...
Add an UploadHelper to cmdlib
This is used in two places already, and will be needed in a third, solet's abstract it.
Add support for vm_capable in file distribution
Add the master/vm_capable flags in node add
Add a CheckNodeVmCapable helper in cmdlib
Also changes the error code for the other CheckNode* helpers toECODE_STATE, not ECODE_INVAL: ECODE_INVAL is for requests that areinvalid (e.g. create drbd instance with one node), whereas ECODE_STATEdenote requests that are not satisfiable due to cluster/node/instance...
LUClusterVerify: Complain if disk is marked faulty
This will show a warning if, for example, one side of a DRBDdisk becomes unavailable. The data is collected separatelyfrom the other verification data.
Example output:
Implement the master_capable flag in node modify
Export the capability flags in query, rapi, ialloc
Add the master/vm_capable flags to objects
This adds the flag and some initial handling. The rest of the changes,for cmdlib, come in a separate patch.
Rework node role changes
There have been many bugs in gnt-node modify. Let's try to introducesome more.
This patch reworks the node role changes from tracking the flag changesto completely overwriting the flags based on the new role. This pavesthe way for (in 2.4 or later) moving to a single attribute for nodes....
Merge branch 'devel-2.2'
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Allow remote imports without checked names
By default all names are checked (LUCreateInstance, name_check). In somecases it can be useful to disable this check, but doing so was notallowed for remote imports. One should be aware, however, that usingthis feature can lead to rename script failures when importing a remote...
Support modify of prealloc_wipe_disks config value
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Export a node's group information in iallocator
Rename node.nodegroup to node.group
In the context of a node, its group has (at least today) only onemeaning, that is the node's node group. As such, we renamenode.nodegroup to just node.group.
Note: if we want to keep node in there, it should be at least...
Export node group data in iallocator
Split IAllocator._ComputeClusterData
The node and instance computations were all in this big function; weseparate them out for more clarity.
Putting the pieces together and invoke the wipe in cmdlib
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
LUSetInstanceParams: Remove unused attribute
“os_new” is not used anywhere, removing it.
Fix remote imports
A simple typo…
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Fix typo introduced in 8d8c4ef
Commit 8d8c4ef broke instance reinstall with different OS, due to anattribute typo.
Fix clearing of the default iallocator
And also update the man page.
gnt-instance reinstall: Allow overriding OS parameters
This allows OS installation scripts to make use of special parameters,e.g. to retain some data on reinstallation.
The RAPI resource is not updated as it takes all parameters via thequery string and encoding arbitrary data in a query string is tricky....
Add option to ignore offline node on instance start/stop
In some cases it can be useful to mark as an instance as startedor stopped while its primary node is offline. With this patch,a new option, “--ignore-offline”, is introduced to “gnt-instancestart” and “… stop”....
Let gnt-cluster support prealloc_wipe_disks
This includes a new option gnt-cluster init and approriate outputon gnt-cluster info. Though gnt-cluster modify is not yet prepared.
Move the parameter types to their own module
This is for cleanup, and for later reuse in other parts of the code(outside of LUs).
Export more information via LUQueryInstances/RAPI
Currently, the custom instance parameters (hv, be, nicp) are onlyqueryable via LUQueryInstanceData. LUQueryInstance returns only thefilled parameters, thus its users (especially RAPI) have no way to know...
Show instance state in instance console failures
The current message is not entirely clear, as it doesn't show the reasonwhy the instance is not running.
Export VG name via LUQueryConfigValues
This will be used by LUXI client programs to display the VG name.
LUGetTags: Acquire locks in shared mode
Retrieving tags can be done while the lock is shared. Only writingneeds to be exclusive.
Also add a FIXME for cluster tags, where the code currently doesn'tuse any locks except the config lock.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
LUDelTags: Improve formatting of error message
Use utils.CommaJoin to add spaces after comma, clean up code a bit.
Before: Tag(s) 'bar','baz','foo','moo' not foundAfter: Tag(s) 'bar', 'baz', 'foo', 'moo' not found
Conflicts: lib/objects.py (trivial, strange that this one, and only this one, conflicted)
Rename the _oss cluster vars to _os
Per the mailing list discussion, rename _oss to _os, both in cluster parametersand in the rest of the code.
This is just an s/_oss/_os, with the exception of a small bit of cleanuparound the helper_os function in cmdlib.py....
Fix instance rename regression from 3fe11ba3
Committ 3fe11ba3 broke the instance rename as we don't use the FQDNanymore. This fixes it.
Sort OS names and variants in LUDiagnoseOS
The OS list and variants as returned from LUDiagnoseOS is not sorted,and gnt-instance reinstall doesn't sort it either. This means that itthe menu that users are present with is inconsistent across clusters,and that is confusing....
Change behaviour of OpDiagnoseOS w.r.t. 'valid'
This patch changes the behaviour of OpDiagnoseOS with regards to the'valid' field to be similar to the one for the hidden/blacklistedfields: unless this field is requested, invalid OSes are filtered out....
Allow gnt-os modify to change the new OS params
Add two more _T-type tests
These are useful for more in-depth checking of some kinds of arguments.
Add blacklisted/hidden OS support in LUDiagnoseOS
This changes the behaviour of LUDiagnoseOS significantly.
The addition of hidden/blacklisted OSes would mean that each user-facingclient would have to filter intentionally such OSes from display, whichis not a good choice. Rather, the patch makes LUDiagnoseOS not return...
Restrict blacklisted OSes in instance installation
Abstract OS name/variant functions
Currently, the computation of the 'pure' name or the variant ishardcoded and spread around the functions that need it. This is notnice, and in the future we'd spread it even more with more usage ofvariants/pure os names....
Ignore failures while shutting down instances during failover from offline node
Don't abort failover if instance shutdown doesn't work on a node markedoffline. The node is offline, so the instances living on it are too. Beforeyou had to use --ignore-consistency to archieve that....
cmdlib: Fix type of “name” parameter for tag operations
The parameter “name” is be None for cluster tags.
Add nodegroup option to AddNode
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add node's nodegroup field
If a node doesn't have a node group we'll upgrade the config making itthe cluster default. Also the node add and removal operations arechanged to set/clear the node group correctly. Finally we populate the"members" list of nodegroups on config load with the value from the...
Fix breakage introduced by commit 8044bf655
Note to self: even patches removing one line can break everything.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Manuel Franceschini <livewire@google.com>
Switch to the RPC call to update /etc/hosts in LUAddNode and LURemoveNode
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Support IPv6 for instances
Signed-off-by: Manuel Franceschini <livewire@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
gnt-node add: add error msg when using IPv6
Signed-off-by: Manuel Franceschini <livewire@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Merge branch 'devel-2.1' into devel-2.2
Don't ignore secondary node silently
Currently on non-mirrored disk templates the secondary node is ignoredsilently. This patch adds a check for this case, and warns the usershould this be happening. This solves issue 113.
The patch also moves a prereq check to an argument check. This is ok...
Removing all ssh setup code from the core
Support IPv6 node add
Support IPv6 cluster init
gnt-debug: Extend job queue tests
Test multiple opcodes, also with failure.
Support for resolving hostnames to IPv6 addresses
This patch enables IPv6 name resolution by using socket.getaddrinfoinstead of socket.gethostbyname_ex.
It renames the HostInfo class to Hostname and unifies its use throughoutthe code. This is achieved by using static calls where no object is...
Introduce new IPAddress classes
This patch unifies the netutils functions dealing with IP addresses tothree classes:- IPAddress: Common IP address functionality- IPv4Address: IPv4 specific functionality- IPv6address: IPv6-specific functionality
Furthermore it adds methods to check whether an address is a loopback...
Re-add the 'live' parameter to migration opcodes
This patch reintroduces the live parameter, for backwards compatibilityat the Luxi level. This way, clients can work transparently with both2.1 and 2.2, even though sub-optimally.
Signed-off-by: Iustin Pop <iustin@google.com>...
cmdlib: Change expected type for source CA on remote import
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Rename masterfailover to master-failover
Most (all?) of our commands use dash-separator: replace-disks,verify-disks, add-tags, etc. “gnt-cluster masterfailover” is an oldexception to this rule.
The patch replaces it with master-failover, add a compatiblity alias,...
cmdlib: Return new name from rename operations
The new name is then displayed by the clients.
gnt-instance rename: Fix bug and rename params
This patch fixes a bug when gnt-instance rename was invoked with--no-name-check. It renames the internal variables to be consistent withthe ones in equivalent instance add code. Furthermore it checks whether...
Add modification of the reserved logical volumes
This doesn't allow addition/removal of individual volumes, onlywholesale replace of the entire list. It can be improved later, if weever get generic container parameters.
The man page changes replaces some tabs with spaces (hence the...
Add printing of reserved_lvs in cluster info
Introuce a new cluster parameter - reserved_lvs
This parameter, which is a list of regular expression patterns, willmake cluster verify ignore any such LVs. It will not prevent creation orremoval of such volumes by the backend code.
Rename the OpMigrate* parameter 'live' to 'mode'
This is needed as now the parameter is no longer boolean, but tri-state.
Rename migration type to migration mode
This is in preparation for the rename of the opcode 'live' parameter to'mode'.
Merge branch 'devel-2.1' into master
Fix issue when changing the disk template to drbd
If we pass the current primary node, the conversion will fail horriblywith LVM creation errors. Instead, we catch and check for thiscondition in CheckPrereq.
Fix epydoc warning "Lists must be indented."
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix pylint complaints introduced in commit e58f87a958c
Due to a small mistake I missed three non-critical pylint complaints forcommit e58f87a958c. They're fixed with this patch.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Signed-off-by: Iustin Pop <iustin@google.com>...
Add a migration type global hypervisor parameter
Since migration live/non-live is more stable (e.g.) for Xen-PVM versusXen-HVM, we introduce a new parameter for what mode we should use bydefault (if not overridden by the user, in the opcode).
The meaning of the opcode 'live' field changes from boolean to either...
Add test for some aspects of job queue
This new opcode and gnt-debug sub-command test some aspects of thejob queue, including the status of a job. The bug fixed in commit2034c70d507 was identified using this test. A future patch willrun this test automatically from the QA scripts....
LUVerifyCluster: update _ValidateNode description
Change _ValidateNode description to reflect what the function actually does.
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Use reserved documentation IPs and domains
Use RFC 5737 IP addresses and RFC 2606 domain names in allunittests, docs, qa and docstrings.
Provide feedback function for all LU methods
By exposing mcpu's _Feedback function (now renamed to “Log”) to LU's,methods like ExpandNames can also write to the job execution log.
Introduce lib/netutils.py
This patch moves network utility functions to a dedicated module.
Add oper_vcpus instance status field
This introduces a new instance status field, named "oper_vcpus".It contains the actual number of VCPUs an instance is using asseen by the hypervisor.
Signed-off-by: Balazs Lecz <leczb@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
LUCreateInstance: use cluster-wide iallocator
LUCreateInstance uses the cluster-wide default iallocator if no iallocator orprimary node is specified manually.
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>Signed-off-by: Iustin Pop <iustin@google.com>...
LUNodeEvacuationStrategy: Use default iallocator
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add default_iallocator cluster parameter
Add a cluster parameter to hold the iallocator that will be used by defaultwhen required and no alternative (manually-specified iallocator ormanually-specified node(s)) is given.
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>...
Add _CheckIAllocatorOrNode for common iallocator/node checks
_CheckIAllocatorOrNode will be called by LUs wishing to use an instanceallocator or a target node. It performs sanity checks and will modify the LU'sopcode's iallocator slot to use the cluster-wide allocator if...
Rework the export failure handling
Currently, the way to signal export failures is by the return value.This means that if a client doesn't check the values (e.g. burnin), anyfailure is being ignore. And this is what we've been doing forever inburning (not actually testing that the export is successful)....
Report drbd helper in query info LU
Check and set drbd helper in set params LU
Check drbd usermode helper in cluster verify
Generalize a recursive check on logical disks