Michael Hanselmann [Thu, 1 Oct 2009 15:22:02 +0000 (17:22 +0200)]
locking.SharedLock: Fix bug in delete function
SharedLock.__acquire_unlocked uses keyword parameters. Just passing
the timeout would set the “shared” parameter.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 29 Sep 2009 15:20:06 +0000 (17:20 +0200)]
Rename LockSet.acquire parameter “blocking” to “timeout”
Also remove the “blocking” parameter from LockSet.remove and
GanetiLockManager.remove. There's no point in implementing timeouts on removal
unless we need them.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 30 Sep 2009 16:24:43 +0000 (18:24 +0200)]
Try to fix locking unittests
Our automated test system found a few problems in the new locking
unittests. This patch should fix them, although I wasn't able to
reproduce the problem. All are race conditions.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 28 Sep 2009 15:44:19 +0000 (17:44 +0200)]
Change SharedLock to new pipe(2)-based condition
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 28 Sep 2009 15:43:53 +0000 (17:43 +0200)]
Add _PipeCondition class
_PipeCondition is a condition implemented using pipe(2) and poll(2).
It allows the implementation of timeouts without using a busy-wait loop
with time.sleep.
Unlike Python's built-in threading.Condition class and to save file
descriptors and an internal queue, it can only be used to notify
all waiters. Ganeti's use case for this condition class doesn't
require the ability to notify only one waiter.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Tue, 29 Sep 2009 14:12:12 +0000 (16:12 +0200)]
Add _SingleActionPipeCondition class
This class will be used as a basic block for pipe(2)-based
conditions. Upon initialization it creates a pipe and can be
notified once (hence the “single action” in the name). A
callable helper class is used to wait for notifications.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Thu, 24 Sep 2009 12:21:18 +0000 (14:21 +0200)]
SharedLock: implement timeouts
This patch greatly simplifies the SharedLock code and implements
timeouts for the acquire() and delete() functions. A wrapper around
Python's threading.Condition class must be used to ensure thread
safety when check whether there are any waiters left.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Luca Bigliardi [Wed, 30 Sep 2009 13:51:11 +0000 (14:51 +0100)]
Extend confd instances ips query
The query now accepts a link parameter.
Signed-off-by: Luca Bigliardi <shammash@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 30 Sep 2009 12:57:24 +0000 (14:57 +0200)]
Merge remote branch 'origin/master' into mogu
* origin/master:
Fix burnin's verbose mode
Final NEWS update and version increase for 2.0.4
Encode the actual exception raised by LU execution
Move the luxi error handling into errors.py
Fix the confusing ssh/hostname message in node add
Add man page for ganeti-cleaner
Update NEWS file for version 2.0.4
Automatically cleanup _temporary_ids at save
Separate the computation of all config IDs
Change config upgrade to be explicit
Fix unittest breakage due to new test file
Fix /proc/drbd parsing in presence of gaps
repair-size: ensure child disks have sane sizes
Fix yet another bug in LURepairDiskSizes
Fix a bug in LURepairDiskSizes
Conflicts:
NEWS (trivial, the RST change)
lib/cmdlib.py (trivial, some small change in 2.0)
lib/config.py (due to the cherry-picks and UUID changes in 2.1)
Signed-off-by: Iustin Pop <iustin@google.com>
Luca Bigliardi [Tue, 29 Sep 2009 17:07:37 +0000 (18:07 +0100)]
Improve description of migrate/failover post hooks env
Signed-off-by: Luca Bigliardi <shammash@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Luca Bigliardi [Tue, 29 Sep 2009 16:15:36 +0000 (17:15 +0100)]
Update env vars for instances in hooks documentation
Remove variables which are listed at the beginning of the section and variables
which are not declared when building hooks env.
Signed-off-by: Luca Bigliardi <shammash@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Tue, 29 Sep 2009 15:48:42 +0000 (17:48 +0200)]
Fix burnin's verbose mode
The timestamp need special formatting, which was done for the internal
buffer storage but not for the messages logged in verbose mode. This
patch unifies the formatting for these two cases.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Tue, 29 Sep 2009 10:19:59 +0000 (12:19 +0200)]
Final NEWS update and version increase for 2.0.4
QA passed successfully, let's try to have a release.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Thu, 24 Sep 2009 16:31:31 +0000 (17:31 +0100)]
Add initial confd client unittests
Some basic tests for the confd client library
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Tue, 29 Sep 2009 08:25:33 +0000 (09:25 +0100)]
confd/client: make it possible to update peer list
Until now the peers have to be the same all the time. Adding a new
function to update the list, and call it from the constructor to avoid
duplicating code.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Tue, 29 Sep 2009 09:06:55 +0000 (11:06 +0200)]
Remove ‘-u’ from masterd shebang
This is not needed anymore - the original change was more than a year
ago when masterd was in its incipient phase.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Mon, 28 Sep 2009 15:53:30 +0000 (16:53 +0100)]
confd/client: pass self to upcalls
It may be handy for upcalls to know which client called them, and call
it back. So we create a new "client" field in the upcall target,
containing the current client instance
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Mon, 28 Sep 2009 09:23:53 +0000 (10:23 +0100)]
devel/upload.in: make it more project generic
Only install ganeti specific files if they exist. This way we can call
ganeti's devel/upload in another sub-projects (eg. nbma) and have it
uploaded to a host as well, without having to create a new script there.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 25 Sep 2009 17:15:05 +0000 (18:15 +0100)]
ConfdFilterCallback: fix a bug in expire
The HandleExpire function takes the whole "up" structure, and not just
the salt.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 25 Sep 2009 16:56:00 +0000 (17:56 +0100)]
ganeti-confd: cleanup imports
Many functionalities of confd have been moved to other classes/modules,
and the main confd daemon doesn't reference these modules directly
anymore.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 25 Sep 2009 14:51:00 +0000 (15:51 +0100)]
ganeti-confd: don't depend on the os log dir
ganeti-confd doesn't need to log anything related to os installations.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Thu, 27 Aug 2009 13:02:50 +0000 (15:02 +0200)]
Encode the actual exception raised by LU execution
Currently, the actual exception raised during an LU execution (one of
OpPrereqError, OpExecError, HooksError, etc.) is lost because the
jqueue.py code simply sets that to a str(err), and the code in cli.py
simply passes that string to OpExecError.
This patch moves to encoding the errors as per errors.EncodeError and
changes the cli code to parse and raise that (if possible).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit
bcb66fcabfb31ac63beebcc2249bbb8cb30703ae)
Iustin Pop [Thu, 27 Aug 2009 13:01:23 +0000 (15:01 +0200)]
Move the luxi error handling into errors.py
Currently the luxi error handling is hardcoded as special encoding on
the masterd-side and special decoding on the client side. This patch
moves it to errors.py such that other parts of the code can reuse the
same encoding.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit
6956e9cd11e7fc3849824d9953c622143a732bd7)
Iustin Pop [Fri, 25 Sep 2009 15:34:47 +0000 (17:34 +0200)]
Fix the confusing ssh/hostname message in node add
Before, it used to say:
ssh/hostname verification failed node1.example.com -> hostname mismatch, got
node2
Now it says for wrong hostnames (maybe too verbose):
ssh/hostname verification failed (checking from node1.example.com): hostname
mismatch, expected node2.example.com but got node3
And for non-FQDN hostnames:
ssh/hostname verification failed (checking from node1.example.com): hostname
not FQDN: expected node2.example.com but got node2
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 25 Sep 2009 15:25:47 +0000 (17:25 +0200)]
Add man page for ganeti-cleaner
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 25 Sep 2009 14:11:08 +0000 (15:11 +0100)]
Remove secrets and kill confd on cluster leave
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Wed, 23 Sep 2009 15:05:19 +0000 (16:05 +0100)]
Implement ConfdFilterCallback
This callback can be stacked with another one, and will filter duplicate
or old results, making handling of results easier.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Thu, 24 Sep 2009 15:34:25 +0000 (16:34 +0100)]
Confd client: add module level documentation
Populate the docstring with documentation on the client library's usage.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 25 Sep 2009 14:11:29 +0000 (16:11 +0200)]
Update NEWS file for version 2.0.4
We don't bump up the version yet, pending more QA tests.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Fri, 25 Sep 2009 11:53:34 +0000 (13:53 +0200)]
Add uuid on node/instance add and cluster init
This patch does a little bit of cleanup first, since we want to call
GenerateUniqueID without reacquiring the lock.
Note that we don't necessarily need to do this for the cluster, since at
first startup ConfigWriter will do it anyway. But it's better to
explicitely do this instead of relying on the automated upgrade.
Additionally this patch adds ctime/mtime population at cluster init
time. mtime is not necessarily needed (master will update it
automatically, but we're doing it anyway for consistency).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Fri, 25 Sep 2009 11:38:03 +0000 (13:38 +0200)]
Fix RAPI QA, broken by NIC parameters changes
This also adds the new nic.links query field.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 23 Sep 2009 16:39:05 +0000 (18:39 +0200)]
Automatically cleanup _temporary_ids at save
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit
34d657bae4361b9d6fd8c6314dc7cca57b51c773)
Iustin Pop [Wed, 23 Sep 2009 15:37:46 +0000 (17:37 +0200)]
Separate the computation of all config IDs
We will need this in another place, so we abstract the 'compute all
current IDs' functionality into a separate function. We also change the
name of the _ComputeAllLVs to _AllLVs to match the other _All*s
functions.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit
34e54ebc1417f843bc96c86025f15fb76c3a023a)
Iustin Pop [Tue, 22 Sep 2009 13:54:20 +0000 (15:54 +0200)]
Change config upgrade to be explicit
Currently the config upgrade is done at each object instantiation, that
means that ganeti-noded will run UpgradeConfig on all objects received
remotely (instances, disks, nics). This is not so good, so this patch
changes it so that only the ConfigWriter runs this method at
configuration load time.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
(cherry picked from commit
90d726a80ce40a4990a26566211514e863985efc)
Iustin Pop [Fri, 25 Sep 2009 12:22:58 +0000 (14:22 +0200)]
Merge commit 'origin/next'
* commit 'origin/next': (74 commits)
Fix gnt-node modify online help
Fix gnt-job info entry in gnt-job(8)
locking: Don't swallow exceptions
Add check for duplicate MACs in instance add
scripts/gnt-node: fix a help string
Optimise multi-job submit
Extend gnt-debug with more debugging options
Return cluster tags from LUQueryClusterInfo
Add script to clean archived jobs after 21 days
rapi: export more static node information
Pass the correct signal to handlers
cli: Use ToStdout/ToStderr instead of print
Fix small typo in gnt-node
Simplify handling of boolean args in rapi
Fix checks in LUSetNodeParms for the master node
Improve the example startup script
Fix insserv dependencies
Fix a typo in InitCluster
Ignore results from drained nodes in iallocator
Ship the ethers hook
...
Michael Hanselmann [Thu, 24 Sep 2009 14:01:27 +0000 (16:01 +0200)]
Wrap documentation to max 72 characters per line
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 23 Sep 2009 15:36:36 +0000 (17:36 +0200)]
Set Vim textwidth in each documentation file
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Thu, 24 Sep 2009 14:50:29 +0000 (16:50 +0200)]
Add missing import sys to lib/daemon.py
It does “print >> sys.stderr, …” but there is no import sys.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Thu, 24 Sep 2009 14:12:07 +0000 (16:12 +0200)]
Add documentation on manual cluster cleanup
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 18 Sep 2009 15:29:54 +0000 (17:29 +0200)]
Add implementation details for 2.1 locking changes
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Thu, 24 Sep 2009 12:48:38 +0000 (13:48 +0100)]
KVMHypervisor: wrap long line
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Wed, 23 Sep 2009 17:11:32 +0000 (19:11 +0200)]
Export the uuid in RAPI
This also simplifies a little the field declaration in RAPI.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 23 Sep 2009 17:07:54 +0000 (19:07 +0200)]
Export and show the cluster uuid in cluster info
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 23 Sep 2009 17:04:36 +0000 (19:04 +0200)]
Man page updates for the uuid field
Also corrects wrong indentation in the gnt-instance.sgml file.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 23 Sep 2009 17:01:58 +0000 (19:01 +0200)]
Implement uuid in gnt-node/instance list and info
The patch modifies LUQueryInstanceData to return the uuid too and also
adds support for it in the gnt-* scripts.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 23 Sep 2009 16:58:28 +0000 (18:58 +0200)]
Simplify handling of regular fields in LUQuery*
For fields that correspond directly to an object's field, we can
simplify the handling. The patch also adds the new 'uuid' fields to
objects so that it can be queried.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 23 Sep 2009 16:44:06 +0000 (18:44 +0200)]
Automatically fill in missing UUIDs
The patch also starts using the current UUIDs (in the new attributes)
while computing the _AllIDs list.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 23 Sep 2009 16:43:46 +0000 (18:43 +0200)]
Add uuid attributes to configuration entities
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 23 Sep 2009 16:39:05 +0000 (18:39 +0200)]
Automatically cleanup _temporary_ids at save
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 23 Sep 2009 15:37:46 +0000 (17:37 +0200)]
Separate the computation of all config IDs
We will need this in another place, so we abstract the 'compute all
current IDs' functionality into a separate function. We also change the
name of the _ComputeAllLVs to _AllLVs to match the other _All*s
functions.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Thu, 24 Sep 2009 09:06:13 +0000 (10:06 +0100)]
Node init: copy hmac key as well
Without this confd will not start when a node is added to the cluster.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Wed, 23 Sep 2009 14:56:33 +0000 (15:56 +0100)]
Unpack the confd reply as an object, from the dict
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Tue, 22 Sep 2009 16:23:39 +0000 (17:23 +0100)]
Install guide: talk about routing mode
The networking section is updated to talk about both routing and
bridging.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Tue, 22 Sep 2009 15:12:59 +0000 (16:12 +0100)]
Update hypervisor installation section
Currently the section is called "Installing Xen" and also mentions KVM.
Updating the title and also make it slightly less xen-centric.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Tue, 22 Sep 2009 14:49:36 +0000 (15:49 +0100)]
document the nic link meaning in routed mode
Currently this feature is hypervisor specific, but under kvm we use it
by default (aka: if the user hasn't specified another network script
which overrides our auto-generated one) to specify the routing table.
This was already hinted as a possibility in the manpages, but never
explicitely stated as a reality, so we update gnt-cluster(8) to actually
say this, and gnt-{backup,instance}(8) to point to gnt-cluster(8) for
more information.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Thu, 24 Sep 2009 09:50:59 +0000 (10:50 +0100)]
KVM nic script: enable interface forwarding
If forwarding is enabled globally this is a no-op. If instead it's
enabled only for some special interfaces where instance traffic has to
go to/comes from (for example a gre tunnel) then it's useful to
explicitely enable it for the instances interfaces as well.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Tue, 22 Sep 2009 14:18:50 +0000 (15:18 +0100)]
KVM nic script: use routed link as table
In order to be able to maintain the node network standard routing
untouched while routing instance traffic through a different dedicated
interface (eg: a gre tunnel) we need to specify the instance routing
path inside a separate table, which will also contain different default
gateway values. This patch fixes the kvm default network script to use
the nic link, if present, as a routing table to use instead of the
default one.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Wed, 23 Sep 2009 11:19:47 +0000 (12:19 +0100)]
Confd client library: enable optional logging
If a logger is passed in, we log some debugging messages that might help
someone who's debugging a confd client to understand what's going on.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Wed, 16 Sep 2009 15:58:53 +0000 (16:58 +0100)]
Confd client: make confd port configurable
The port can be now chosen at library init time, with a default of
calling GetDaemonPort.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Wed, 16 Sep 2009 15:56:32 +0000 (16:56 +0100)]
Confd client: Change callback model
We move to one callback in total, rather than one per call, and call it
both for server replies and request expiring.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Wed, 16 Sep 2009 16:12:25 +0000 (17:12 +0100)]
Confd client: make SendRequest args optional
By default "None" will be used as an args value
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Tue, 22 Sep 2009 13:54:20 +0000 (15:54 +0200)]
Change config upgrade to be explicit
Currently the config upgrade is done at each object instantiation, that
means that ganeti-noded will run UpgradeConfig on all objects received
remotely (instances, disks, nics). This is not so good, so this patch
changes it so that only the ConfigWriter runs this method at
configuration load time.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Luca Bigliardi [Tue, 22 Sep 2009 14:24:30 +0000 (15:24 +0100)]
Confd: add instances IPs query
Extend confd to answer queries about instances IPs.
Signed-off-by: Luca Bigliardi <shammash@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Tue, 22 Sep 2009 13:02:41 +0000 (15:02 +0200)]
Fix utils.MatchNameComponent for full matches
While ‘test1’ matches both ‘test1’ and ‘test1.example’, it has a full,
exact match and we should return it if that is the case.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Mon, 21 Sep 2009 14:14:38 +0000 (16:14 +0200)]
Design doc changes for UUID tracking of objects
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Mon, 21 Sep 2009 14:11:25 +0000 (15:11 +0100)]
Fix _RemoveDisk for file based instances
During
621b7678 two typos were introduced which prevent file based
instances removal to work correctly. Fixing both of them to what they
were meant to be.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Mon, 21 Sep 2009 13:23:12 +0000 (15:23 +0200)]
Re-wrap locking changes design to 76 chars per line
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Mon, 21 Sep 2009 12:54:20 +0000 (14:54 +0200)]
Revert "Include NEWS file in documentation"
This reverts commit
350ecfecca136f50877898774c6b40014b5c2b1c. It broke
distcheck.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Mon, 21 Sep 2009 10:59:21 +0000 (11:59 +0100)]
gnt-instance info: fix nic display
In branch-2.1 the conversion of NICs to Tuples has been unified to the
_NICListToTuple function, which is used by both hook generation and
instance info generation. Unfortunately the ip and mac fields got
swapped from what instance info expected, so the mac is shown as ip, and
vice versa. Fixing this.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Mon, 21 Sep 2009 10:13:43 +0000 (11:13 +0100)]
cmdlib._CreateDisks fix a broken result.Raise
The format string has the ": %s" at the end, but no argument is passed,
which of course raises a TypeError. Removing ": %s" as it's added by
the RpcResult Raise() method anyway.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 18 Sep 2009 15:24:27 +0000 (17:24 +0200)]
Include NEWS file in documentation
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 18 Sep 2009 15:22:18 +0000 (17:22 +0200)]
Convert NEWS file to RST
- Add markup for titles
- Convert quotes
- Reindent and rewrap to 72 chars per line
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 18 Sep 2009 12:48:22 +0000 (14:48 +0200)]
Unify the instance creation code
Currently the AddInstance in gnt-instance and ImportInstance in
gnt-backup duplicate all of their code except the actual opcode creation
(the parameters to it). By moving this to cli.py (not optimal location,
but we don't have another one), we can use a single copy of the code,
and simply change based on the mode parameter the few different
opcode parameters.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Fri, 18 Sep 2009 11:45:23 +0000 (13:45 +0200)]
Unify multi-instance handling in gnt-instance
Start, stop and reboot have the same code for dealing with
multi-instance handling. This patch moves all that into a single generic
function, and leaves only the building of the specific opcode for the
operation in the individual functions.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Fri, 18 Sep 2009 11:01:03 +0000 (13:01 +0200)]
Fix gnt-instance start/stop/… args
The gnt-instance commands that have the multi-filter can take also zero
arguments, if the --all flag is passed. But they currently are declared
with min=1, and this is a regression due to the recent bash completion
changes.
There is also the problem that --primary/--secondary expect a node and
not an instance, but currently the completion doesn't support this
distinction.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 13:25:55 +0000 (15:25 +0200)]
Remove explicit DEBUG_OPT and add it by default
Since >90% of the commands take the “--debug” option, and all should
actually take it (the gnt-job command is currently missing it), it makes
sense to simply remove this and add it by default in cli.py.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 13:13:25 +0000 (15:13 +0200)]
Change indentation style in commands definitions
Currently, the indentation level for a command's definition depends on
the command name length, and this makes the commands dict unpleasant to
the eye. This patch changes it so that a new line begins right after the
left parenthesis starting the command tuple.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:58:53 +0000 (14:58 +0200)]
Make ganeti-watcher use the standard debug option
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:51:58 +0000 (14:51 +0200)]
Move the “--no-shutdown” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:49:42 +0000 (14:49 +0200)]
Move the “--ignore-secondaries” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:48:43 +0000 (14:48 +0200)]
Move the “--reboot-type” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:46:13 +0000 (14:46 +0200)]
Move cluster verify options to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:41:51 +0000 (14:41 +0200)]
Move more cluster init opts to cli.py
Some of these should be added to cluster modify too.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:37:06 +0000 (14:37 +0200)]
Move the “--mac-prefix” option to cli.py
The default has also been changed to None as this will be useful once
cluster modify will be able to change this setting too.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:32:30 +0000 (14:32 +0200)]
Move the “--no-voting” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:30:41 +0000 (14:30 +0200)]
Move the “--yes-do-it” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:24:26 +0000 (14:24 +0200)]
Unify the “--vg-name” option
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:21:33 +0000 (14:21 +0200)]
Unify the “--candidate-pool-size” option
This required a slight tweak since in init we want a different default.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:17:42 +0000 (14:17 +0200)]
Unify the “--nic-parameters” option
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 12:13:41 +0000 (14:13 +0200)]
Unify the “--enabled-hypervisors” option
This also required a change, as one of the cases used a different
default.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:57:50 +0000 (13:57 +0200)]
Unify the “--no-lvm-storage” option
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:54:19 +0000 (13:54 +0200)]
Move the “--allocatable” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:50:20 +0000 (13:50 +0200)]
Move the node flags options to cli.py
This also unifies a little the parameters to the respective options.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:46:54 +0000 (13:46 +0200)]
Move the “--no-ssh-key-check” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:45:58 +0000 (13:45 +0200)]
Move the “--readd” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:45:21 +0000 (13:45 +0200)]
Unify the “--secondary-ip” option
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:43:39 +0000 (13:43 +0200)]
Move the “--src-…” options to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:41:31 +0000 (13:41 +0200)]
Move the “--ignore-size” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:40:03 +0000 (13:40 +0200)]
Move the “--auto” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 17 Sep 2009 11:39:22 +0000 (13:39 +0200)]
Move the “--on-secondary” option to cli.py
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>