ganeti-local
15 years agoCorrectly fill the beparams too over RPC
Iustin Pop [Tue, 14 Oct 2008 11:29:28 +0000 (11:29 +0000)]
Correctly fill the beparams too over RPC

As for the hvparams, we need to replace the sent instance beparams.

Reviewed-by: ultrotter

15 years agoAdd cli function for beparams validation
Iustin Pop [Tue, 14 Oct 2008 11:29:20 +0000 (11:29 +0000)]
Add cli function for beparams validation

This is used to validate the parameters in both “gnt-instance add” and
“gnt-backup import”.

Reviewed-by: ultrotter

15 years agoModify the beparams constants
Iustin Pop [Tue, 14 Oct 2008 11:29:12 +0000 (11:29 +0000)]
Modify the beparams constants

Memory is renamed for easier use.

Reviewed-by: ultrotter

15 years agoFix a bug with instance creation and hvparameters
Iustin Pop [Tue, 14 Oct 2008 10:21:20 +0000 (10:21 +0000)]
Fix a bug with instance creation and hvparameters

When creating an instance, we need to check not the opcode hvparams, but
the final, filled hvparams against validity. While we do this for the
remote node calls (i.e. ValidateParams), we didn't do this for
CheckParameterSyntax.

Reviewed-by: imsnah

15 years agoAllow instance info to only query the config file
Iustin Pop [Tue, 14 Oct 2008 10:21:12 +0000 (10:21 +0000)]
Allow instance info to only query the config file

This patch adds a new '-s' parameter to ‘gnt-instance info’ that makes
it return only 'static' information. This is much faster, especially for
drbd instances.

This is a forward-port of rev 1570 on the ganeti-1.2 branch, resending
due to some conflicts.

Reviewed-by: imsnah

15 years agoConvert gnt-instance info to the hvparams model
Iustin Pop [Tue, 14 Oct 2008 10:21:00 +0000 (10:21 +0000)]
Convert gnt-instance info to the hvparams model

Some informations are not printed nicely (e.g. “virtual CDROM: False”),
but this is the first step.

Reviewed-by: imsnah

15 years agoChange gnt-instance modify to the hvparams model
Iustin Pop [Tue, 14 Oct 2008 10:20:50 +0000 (10:20 +0000)]
Change gnt-instance modify to the hvparams model

Reviewed-by: imsnah

15 years agoChange gnt-instance list to the hvparams model
Iustin Pop [Tue, 14 Oct 2008 10:20:32 +0000 (10:20 +0000)]
Change gnt-instance list to the hvparams model

This is just a change of the various hvm_ and pvm parameters to the hv
model. Parameters are queried via hv/$name or via the whole dict as
returned by hvparams.

Reviewed-by: ultrotter,imsnah

15 years agoSwitch instance hypervisor parameters to hvparams
Iustin Pop [Tue, 14 Oct 2008 10:20:21 +0000 (10:20 +0000)]
Switch instance hypervisor parameters to hvparams

This big patch changes instance create to the new hvparams structure.
Old parameters are removed, so old jobs or old instances file will break
current clusters.

Reviewed-by: ultrotter

15 years agoTemporary fix for dual hvm/pvm instances
Iustin Pop [Tue, 14 Oct 2008 10:20:10 +0000 (10:20 +0000)]
Temporary fix for dual hvm/pvm instances

We have a problem with the current model of combining instance lists
from multiple hypervisors: we don't allow duplicates, but "xm list"
gives the same output for both pvm and hvm. This is a lack in the actual
xen hypervisor implementation/split between pvm and hvm, but for now we
implement a weak workaround: identical instance params will be allowed,
and merged. This breaks because there is a delta in listing, and should
be treated as temporary workaround only.

Note that there are two cases for duplicate instance: the above one (xen
is the same, whether pvm or hvm), and the other case, the real error,
when we have two different hypervisors reporting the same instance name.
The latter case needs to be handled better (not by refusing to list the
instances in the backend).

Reviewed-by: ultrotter

15 years agoImplement FillHV for instance-related rpc calls
Iustin Pop [Tue, 14 Oct 2008 10:20:01 +0000 (10:20 +0000)]
Implement FillHV for instance-related rpc calls

We fill the instance hvparams with cluster defaults, and send a modified
dict over the wire to the node methods - they don't know anything about
cluster defaults versus instance parameters.

Reviewed-by: ultrotter

15 years agoExport the hypervisor.ValidateParameters over RPC
Iustin Pop [Tue, 14 Oct 2008 10:19:52 +0000 (10:19 +0000)]
Export the hypervisor.ValidateParameters over RPC

The newly-added node-specific ValidateParams hypervisor method is
exported over RPC, using the semi-standard (success, message) return
value. Multi-node call, so that we call on both primary and secondary at
once.

Reviewed-by: ultrotter

15 years agoImplement the new hypervisor API in base/xen
Iustin Pop [Tue, 14 Oct 2008 10:19:40 +0000 (10:19 +0000)]
Implement the new hypervisor API in base/xen

This patch adds the new methods CheckParameterSyntax and the
ValidateParameters in the base and xen hypervisors. It also changes the
xen hypervisor to use the new hvparams field on instance.

Reviewed-by: imsnah

15 years agoGet rid of httperror module
Michael Hanselmann [Tue, 14 Oct 2008 08:24:52 +0000 (08:24 +0000)]
Get rid of httperror module

This was a leftover from the early days of the remote API in Ganeti 1.2.

Reviewed-by: ultrotter

15 years agoImplement parameter removal in SplitKeyVal
Iustin Pop [Tue, 14 Oct 2008 06:38:44 +0000 (06:38 +0000)]
Implement parameter removal in SplitKeyVal

This patch adds paramter removal in SplitKeyVal, by prefixing a
value-less key with "-"; this is needed in resetting parameters back to
cluster defaults, but care must be applied now that None can come from
the parser.

Reviewed-by: imsnah

15 years agoAdd the hv/be params object attributes
Iustin Pop [Tue, 14 Oct 2008 06:36:39 +0000 (06:36 +0000)]
Add the hv/be params object attributes

This patch adds the instance and cluster be/hvparams attributes, and the
Fill* methods on the cluster object. Nothing else is changes, except
that these attributes exist now on the objects.

Reviewed-by: ultrotter

15 years agoAdd constants for the HV/BE parameter names
Iustin Pop [Tue, 14 Oct 2008 06:36:31 +0000 (06:36 +0000)]
Add constants for the HV/BE parameter names

Since we don't want the string values of the parameters (e.g.
“kernel_path”) spread over the code, we introduce constants for these.

Reviewed-by: ultrotter,schreiberal

15 years agoFix a few rpc-related errors
Iustin Pop [Mon, 13 Oct 2008 13:49:50 +0000 (13:49 +0000)]
Fix a few rpc-related errors

This fixes:
  - whitespace change, double lines between methods
  - duplication of call_upload_file, introduced by mistake in rev 1795
    and which went undetected because of the many changes in that ref
    (only diff -b shows it clearly)
  - call_instance_info didn't pass the hypervisor name parameter, but
    the backend requires it

Reviewed-by: ultrotter

15 years agoAdd two new options types for CLI usage
Iustin Pop [Mon, 13 Oct 2008 12:17:12 +0000 (12:17 +0000)]
Add two new options types for CLI usage

For the new 2.0-style command line options, we need to parse strings of
the type:
  ident:key=val[,...]
and
  key=val[,...]

This patch adds two new option builders for these two, which return
(ident, {key=val,}) and {key=val,} for the above two formats. It also
handles specially constructs of type “key” (val is set to True) and
“no_key” (val is set to False, and the ‘no_’ prefix is stripped).

Reviewed-by: imsnah

15 years agoSome small typos on design docs
Iustin Pop [Mon, 13 Oct 2008 12:15:58 +0000 (12:15 +0000)]
Some small typos on design docs

Reviewed-by: imsnah

15 years agoUpdate the cluster parameters design doc
Iustin Pop [Mon, 13 Oct 2008 09:19:31 +0000 (09:19 +0000)]
Update the cluster parameters design doc

As discussed, we update the design doc with the three classes of
parameters and other changes.

Reviewed-by: imsnah

15 years agoAbstract checking own address into a function
Iustin Pop [Sun, 12 Oct 2008 20:40:44 +0000 (20:40 +0000)]
Abstract checking own address into a function

Currently, we check if we have a given ip address (i.e. it's alive on
one of our interfaces) but manually calling TcpPing(source=localhost).
This works, but having it spread all over the code makes it hard to
change the implementation.

The patch abstracts this into a separate utils.OwnIpAddress(addr)
function. We add a rpc call for it, which we use instead of the
(single-use of) call_node_tcp_ping. We leave node_tcp_ping in, as seems
useful and eventually it should be removed in a separate patch.

Reviewed-by: imsnah

15 years agoMark call_node_leave_cluster as a static method
Michael Hanselmann [Fri, 10 Oct 2008 17:08:09 +0000 (17:08 +0000)]
Mark call_node_leave_cluster as a static method

Reviewed-by: iustinp

15 years agoOS API: support for multiple versions in an OS
Guido Trotter [Fri, 10 Oct 2008 16:04:43 +0000 (16:04 +0000)]
OS API: support for multiple versions in an OS

Allow multiple api versions in an OS. This is according to the OS API
changes design doc, by which an OS can support multiple versions of the
Ganeti API and if one is supported by Ganeti it will work. Since up to
version 5 of the API mandates an OS could support only one version, this
change is retrocompatible with it and requires no version bump up.

Reviewed-by: iustinp

15 years agoLUVerifyCluster: fix error from rpc call
Guido Trotter [Fri, 10 Oct 2008 16:04:07 +0000 (16:04 +0000)]
LUVerifyCluster: fix error from rpc call

When calling node_verify leads to an error _VerifyNodes tries to iterate
over a non-sequence. Catch the error before and avoid this from
happening.

Reviewed-by: iustinp

15 years agoConvert ganeti-noded to new HTTP server class
Michael Hanselmann [Fri, 10 Oct 2008 16:00:40 +0000 (16:00 +0000)]
Convert ganeti-noded to new HTTP server class

Reviewed-by: iustinp

15 years agoAdd new HTTP server implementation
Michael Hanselmann [Fri, 10 Oct 2008 16:00:25 +0000 (16:00 +0000)]
Add new HTTP server implementation

This patch adds another implementation of an HTTP server. It's
based on code of Python's BaseHTTPServer, from both version
2.4 and 3k. In the future we can write code to decide whether
we should fork for a request or not. Keep-alive is not supported.

Reviewed-by: iustinp

15 years agoAdd daemon library with mainloop
Michael Hanselmann [Fri, 10 Oct 2008 16:00:02 +0000 (16:00 +0000)]
Add daemon library with mainloop

This mainloop can be used in daemons like ganeti-noded.

Reviewed-by: iustinp

15 years agoSome updates on the job queue design doc
Iustin Pop [Fri, 10 Oct 2008 15:12:12 +0000 (15:12 +0000)]
Some updates on the job queue design doc

This clarifies the job storage and the reason for choosing it.

Reviewed-by: imsnah

15 years agoUpdate design-2.0-job-queue to reflect changes
René Nussbaumer [Fri, 10 Oct 2008 09:55:24 +0000 (09:55 +0000)]
Update design-2.0-job-queue to reflect changes

With change 1773 a new status WAITLOCK was introduced if a job/opcode is
waiting for a lock. This change updates the document about the job-queue
accordingly.

Reviewed-by: iustinp

15 years agoConvert rpc module to RpcRunner
Iustin Pop [Fri, 10 Oct 2008 09:55:02 +0000 (09:55 +0000)]
Convert rpc module to RpcRunner

This big patch changes the call model used in internode-rpc from
standalong function calls in the rpc module to via a RpcRunner class,
that holds all the methods. This can be used in the future to enable
smarter processing in the RPC layer itself (some quick examples are not
setting the DiskID from cmdlib code, but only once in each rpc call,
etc.).

There are a few RPC calls that are made outside of the LU code, and
these calls are left as staticmethods, so they can be used without a
class instance (which requires a ConfigWriter instance).

Reviewed-by: imsnah

15 years agoCleanup in cmdlib for standalone function calls
Iustin Pop [Fri, 10 Oct 2008 09:52:47 +0000 (09:52 +0000)]
Cleanup in cmdlib for standalone function calls

This patch is a cleanup of the standalone functions in cmdlib. Many of
them too as argument a ConfigWriter instance, but some also took other
parameters from the lu (e.g. proc), and in the future, if we want to
also pass the RpcRunner, we would have to add yet another parameter.

One option is to make all these methods of top-level LogicalUnit class.
I took another approach, and made (almost) all these functions take as
first parameter the lu instance. It's like methods, just not declared
under LogicalUnit.

Reviewed-by: imsnah

15 years agoSmall random fixes
Iustin Pop [Fri, 10 Oct 2008 09:51:34 +0000 (09:51 +0000)]
Small random fixes

Indentation in bootstrap was wrong and some names in cmdlib.py were not
right.

Reviewed-by: imsnah

15 years agoMove instance hypervisor check to ExpandNames
Iustin Pop [Thu, 9 Oct 2008 11:29:32 +0000 (11:29 +0000)]
Move instance hypervisor check to ExpandNames

This check can be done earlier, in ExpandNames, and is needed here for
the hypervisor parameter check.

Reviewed-by: ultrotter

15 years agoUpdate documentation & man pages for changed hypervisor names.
Alexander Schreiber [Wed, 8 Oct 2008 23:13:54 +0000 (23:13 +0000)]
Update documentation & man pages for changed hypervisor names.

Reviewed-by: imsnah

15 years agoAjust config unittest.
Oleksiy Mishchenko [Wed, 8 Oct 2008 18:48:19 +0000 (18:48 +0000)]
Ajust config unittest.

Reviewed-by: iustinp

15 years agoUpdate scripts and qa config for changed hypervisor names.
Alexander Schreiber [Wed, 8 Oct 2008 17:31:17 +0000 (17:31 +0000)]
Update scripts and qa config for changed hypervisor names.

Reviewed-by: ultrotter

15 years agoShorten variable names.
Alexander Schreiber [Wed, 8 Oct 2008 14:41:07 +0000 (14:41 +0000)]
Shorten variable names.

Reviewed-by: iustinp

15 years agoSanitize the hypervisor names
Iustin Pop [Wed, 8 Oct 2008 14:31:43 +0000 (14:31 +0000)]
Sanitize the hypervisor names

Since in 2.0 the user will possibly have more interaction with the
hypervisor names, we sanitize them by removing the version numbers
(the version can be a prerequisite for the ganeti installation, we
shouldn't document it in variable names).

Reviewed-by: schreiberal

15 years agoAlso export OS_API to the OS scripts
Iustin Pop [Wed, 8 Oct 2008 14:10:46 +0000 (14:10 +0000)]
Also export OS_API to the OS scripts

The idea is that if the OSes will support multiple version (e.g. both
1.2 and 2.0), then Ganeti should be able to talk to it using version
2.0, but then the script needs to be told nicely what version Ganeti is
using.

Reviewed-by: imsnah

15 years agoFix for gnt-cluster init.
Oleksiy Mishchenko [Wed, 8 Oct 2008 13:04:52 +0000 (13:04 +0000)]
Fix for gnt-cluster init.

Reviewed-by: iustinp

15 years agoMove the hypervisor attribute to the instances
Iustin Pop [Wed, 8 Oct 2008 10:36:29 +0000 (10:36 +0000)]
Move the hypervisor attribute to the instances

This (big) patch moves the hypervisor type from the cluster to the
instance level; the cluster attribute remains as the default hypervisor,
and will be renamed accordingly in a next patch. The cluster also gains
the ‘enable_hypervisors’ attribute, and instances can be created with
any of the enabled ones (no provision yet for changing that attribute).

The many many changes in the rpc/backend layer are due to the fact that
all backend code read the hypervisor from the local copy of the config,
and now we have to send it (either in the instance object, or as a
separate parameter) for each function.

The node list by default will list the node free/total memory for the
default hypervisor, a new flag to it should exist to select another
hypervisor. Instance list has a new field, hypervisor, that shows the
instance hypervisor. Cluster verify runs for all enabled hypervisor
types.

The new FIXMEs are related to IAllocator, since now the node
total/free/used memory counts are wrong (we can't reliably compute the
free memory).

Reviewed-by: imsnah

15 years agoUpdates to the security document
Iustin Pop [Tue, 7 Oct 2008 16:09:53 +0000 (16:09 +0000)]
Updates to the security document

This patch changes formatting and the DRBD shared secret details, and
adds master daemon socket details to the security doc.

Reviewed-by: imsnah

15 years agoMove the SECURITY document to the doc/ dir
Iustin Pop [Tue, 7 Oct 2008 16:08:55 +0000 (16:08 +0000)]
Move the SECURITY document to the doc/ dir

Reviewed-by: imsnah

15 years agoFix formatting in design-2.0-os-interface
Iustin Pop [Tue, 7 Oct 2008 15:37:28 +0000 (15:37 +0000)]
Fix formatting in design-2.0-os-interface

Reviewed-by: imsnah

15 years agoSmall changes to the index design doc
Iustin Pop [Tue, 7 Oct 2008 15:23:18 +0000 (15:23 +0000)]
Small changes to the index design doc

This is just some additions of not-yet-mentioned docs.

Reviewed-by: ultrotter

15 years agoChange default instance reboot type to hard.
Alexander Schreiber [Tue, 7 Oct 2008 13:16:32 +0000 (13:16 +0000)]
Change default instance reboot type to hard.

Merged r1777 from branches/ganeti/ganeti-1.2

Reviewed-by: imsnah

15 years agoAdd new design docs to Makefile.am
Alexander Schreiber [Tue, 7 Oct 2008 13:00:03 +0000 (13:00 +0000)]
Add new design docs to Makefile.am

Reviewed-by: imsnah

15 years agorpc.call_instance_migrate: pass the whole instance
Iustin Pop [Tue, 7 Oct 2008 11:39:50 +0000 (11:39 +0000)]
rpc.call_instance_migrate: pass the whole instance

Currently the call_instance_migrate call only passes the instance name;
we need to pass the whole object for the hypervisor_type changes (all
the other individual instance rpc calls already pass the instance
object).

Reviewed-by: imsnah

15 years agoSlightly change the hypervisor parameter example.
Alexander Schreiber [Tue, 7 Oct 2008 10:22:04 +0000 (10:22 +0000)]
Slightly change the hypervisor parameter example.

Reviewed-by: iustinp

15 years agoGaneti 2.0 cluster parameters design doc
Alexander Schreiber [Tue, 7 Oct 2008 08:47:51 +0000 (08:47 +0000)]
Ganeti 2.0 cluster parameters design doc

Reviewed-by: ultrotter

15 years agoImplement job 'waiting' status
Iustin Pop [Tue, 7 Oct 2008 08:03:19 +0000 (08:03 +0000)]
Implement job 'waiting' status

Background: when we have multiple jobs in the queue (more than just a
few), many of the jobs (up to the number of threads) will be in state
'running', although many of them could be actually blocked, waiting for
some locks. This is not good, as one cannot easily see what is
happening.

The patch extends the opcode/job possible statuses with another one,
waiting, which shows that the LU is in the acquire locks phase. The
mechanism for doing so is simple, we initialize (in the job queue) the
opcode with OP_STATUS_WAITLOCK, and when the processor is ready to give
control to the LU's Exec, it will call a notifier back into the
_JobQueueWorker that sets the opcode status to OP_STATUS_RUNNING (with
the proper queue locking). Because this mechanism does not save the job,
all opcodes on disk will be in status WAITLOCK and not RUNNING anymore,
so we also change the load sequence to consider WAITLOCK as RUNNING.

With the patch applied, creating in parallel (via burnin) five instances
on a five node cluster shows that only two are executing, while three
are waiting for locks.

Reviewed-by: imsnah

15 years agoOS Interface design doc
Guido Trotter [Tue, 7 Oct 2008 07:25:56 +0000 (07:25 +0000)]
OS Interface design doc

Reviewed-by: imsnah

15 years agoAdd .. contents:: marker to design docs
Guido Trotter [Tue, 7 Oct 2008 07:25:38 +0000 (07:25 +0000)]
Add .. contents:: marker to design docs

Reviewed-by: imsnah

15 years agoImplement job auto-archiving
Iustin Pop [Mon, 6 Oct 2008 16:42:18 +0000 (16:42 +0000)]
Implement job auto-archiving

This patch adds a new luxi call that implements auto-archiving of jobs
older than a certain age (or -1 for all completed jobs), and the gnt-job
command that makes use of this (with 'all' for -1).

Reviewed-by: imsnah

15 years agoAdd a simple timespec parsing function
Iustin Pop [Mon, 6 Oct 2008 15:59:32 +0000 (15:59 +0000)]
Add a simple timespec parsing function

This function will be used for auto-archiving jobs via the command line.
The function is pretty simple, we only support up to weeks since months
and higher are not 'precise' entities, and dealing with them would
require us to start using calendar functions.

Reviewed-by: imsnah

15 years agobackend.py change to get cluster name from master
Iustin Pop [Mon, 6 Oct 2008 15:58:26 +0000 (15:58 +0000)]
backend.py change to get cluster name from master

Currently there are three function in backend that need the cluster name
in order to instantiate an SshRunner. The patch changes these to get the
cluster name from the master in the rpc call; once the multi-hypervisor
change is implemented, then very few places in which we need the SCR
remain in the backend.

Reviewed-by: killerfoxi, imsnah

15 years agoDisable re-reading of config file
Iustin Pop [Mon, 6 Oct 2008 15:56:31 +0000 (15:56 +0000)]
Disable re-reading of config file

Since the objects read from the config file are passed to the various
threads, it's unsafe to re-read the config file (and throw away
ConfigWriter._config_data). As such, we disable the re-reading of the
file (since now the master is the owner the file, it makes not sense to
re-read it), and any modifications to the file must be done offline,
otherwise they will be overwritten.

Reviewed-by: imsnah

15 years agoRAPI Desing Doc
Oleksiy Mishchenko [Mon, 6 Oct 2008 15:13:40 +0000 (15:13 +0000)]
RAPI Desing Doc

Reviewed-by: iustinp

15 years agoStart implementation of parallel burnin
Iustin Pop [Mon, 6 Oct 2008 14:11:02 +0000 (14:11 +0000)]
Start implementation of parallel burnin

This patch introduces a simple framework for executing jobs in parallel
in burnin (the ExecJobSet function) and the "--parallel" command line
flag.

The patch also changes the instance creation to run in parallel when the
above flag is given. Error handling/instance removal is currently flacky
with this options if there are errors in the instance creation.

We also modify burnin to reuse a single client.

Reviewed-by: imsnah

15 years agoFix gnt-job list with empty timestamps
Iustin Pop [Mon, 6 Oct 2008 13:40:52 +0000 (13:40 +0000)]
Fix gnt-job list with empty timestamps

In case the job object doesn't have a timestamp (which is a separate
issue), the listing should not break. We fix this by changing the
FormatTimstamp function itself to return '?' in case the timestamp
doesn't look good (note that it still can break if non-integers are
returned, but this is unlikely).

Reviewed-by: imsnah

15 years agoIncrease the number of threads to 25
Iustin Pop [Mon, 6 Oct 2008 13:29:51 +0000 (13:29 +0000)]
Increase the number of threads to 25

Since our locks are not gathered nicely, we can have jobs that are
actually blocking on locks (parallel burnin shows this), so at least we
need to increase the number of threads above the usual number of jobs we
could have in a such a case.

Reviewed-by: imsnah

15 years agoMinor cleanups & typo fixes.
Alexander Schreiber [Mon, 6 Oct 2008 13:21:28 +0000 (13:21 +0000)]
Minor cleanups & typo fixes.

Reviewed-by: iustinp

15 years agoFix SshRunner breakage from the changed API
Iustin Pop [Mon, 6 Oct 2008 13:16:23 +0000 (13:16 +0000)]
Fix SshRunner breakage from the changed API

More places actually use the SshRunner than just the gnt-cluster
commands.

Reviewed-by: ultrotter

15 years agoChange SshRunner usage
Iustin Pop [Mon, 6 Oct 2008 11:48:59 +0000 (11:48 +0000)]
Change SshRunner usage

Currently the SshRunner uses a SimpleConfigReader instance, however this
is not best. We change it to use the cluster name directly (and its
constructor now takes this as parameter, instead of SCR), and its
callers are change to pass the name directly.

As a consequence, we can now remove the initialization of SCR in
gnt-cluster (copyfile and command), and instead we query the master for
the cluster name).

Reviewed-by: imsnah

15 years agoUpdate document describing cluster security
Michael Hanselmann [Mon, 6 Oct 2008 11:01:49 +0000 (11:01 +0000)]
Update document describing cluster security

It may need further updates, but here's a start.

Reviewed-by: ultrotter

15 years agoFix ssconf.GetMasterAndMyself
Iustin Pop [Sun, 5 Oct 2008 09:16:03 +0000 (09:16 +0000)]
Fix ssconf.GetMasterAndMyself

The ssconf migration left this out.

Reviwed-by: imsnah,ultrotter

15 years agoFix a mistake in the gnt-backup man page
Iustin Pop [Fri, 3 Oct 2008 14:32:30 +0000 (14:32 +0000)]
Fix a mistake in the gnt-backup man page

The actual location is /export, not /exports.

Reviewed-by: ultrotter

15 years agoUse docbook2* paths found during configure for actual build
Michael Hanselmann [Thu, 2 Oct 2008 10:22:57 +0000 (10:22 +0000)]
Use docbook2* paths found during configure for actual build

docbook-wrapper had the names for the docbook2* programs hardcoded. This
patch changes Makefile.am and the wrapper script to pass them via
another argument.

Another issue where rapi.in was built before rapi-resources.sgml is
also fixed.

Reviewed-by: iustinp

15 years agoRemove references to Twisted framework
Michael Hanselmann [Thu, 2 Oct 2008 10:22:02 +0000 (10:22 +0000)]
Remove references to Twisted framework

Reviewed-by: iustinp

15 years agoGet rid of ssconf
Michael Hanselmann [Wed, 1 Oct 2008 17:37:29 +0000 (17:37 +0000)]
Get rid of ssconf

Remove leftovers from ssconf.

Reviewed-by: iustinp

15 years agoDon't pass sstore to LUs anymore
Michael Hanselmann [Wed, 1 Oct 2008 17:37:05 +0000 (17:37 +0000)]
Don't pass sstore to LUs anymore

sstore is no longer used in LUs.

Reviewed-by: iustinp

15 years agoConvert ganeti-master
Michael Hanselmann [Wed, 1 Oct 2008 17:36:51 +0000 (17:36 +0000)]
Convert ganeti-master

Use simpleconfig instead of ssconf.

Reviewed-by: iustinp

15 years agoConvert ganeti-watcher
Michael Hanselmann [Wed, 1 Oct 2008 17:36:20 +0000 (17:36 +0000)]
Convert ganeti-watcher

Use RPC calls instead of ssconf.

Reviewed-by: iustinp

15 years agoConvert ganeti-noded
Michael Hanselmann [Wed, 1 Oct 2008 17:36:09 +0000 (17:36 +0000)]
Convert ganeti-noded

Replace ssconf with utility functions.

Reviewed-by: iustinp

15 years agoConvert gnt-cluster
Michael Hanselmann [Wed, 1 Oct 2008 17:35:59 +0000 (17:35 +0000)]
Convert gnt-cluster

Replace ssconf with configuration.

Reviewed-by: iustinp

15 years agoConvert bootstrap.py
Michael Hanselmann [Wed, 1 Oct 2008 17:35:49 +0000 (17:35 +0000)]
Convert bootstrap.py

Replace ssconf with configuration.

Reviewed-by: iustinp

15 years agoConvert cmdlib.py
Michael Hanselmann [Wed, 1 Oct 2008 17:35:37 +0000 (17:35 +0000)]
Convert cmdlib.py

Replacing ssconf with configuration. Cluster rename is broken and stays
that way.

Reviewed-by: iustinp

15 years agoConvert ssh.py
Michael Hanselmann [Wed, 1 Oct 2008 17:35:21 +0000 (17:35 +0000)]
Convert ssh.py

Get rid of ssconf and convert to configuration instead.

Reviewed-by: iustinp

15 years agoConvert rpc.py
Michael Hanselmann [Wed, 1 Oct 2008 17:34:59 +0000 (17:34 +0000)]
Convert rpc.py

Replacing ssconf with utility functions.

Reviewed-by: iustinp

15 years agoConvert hypervisor
Michael Hanselmann [Wed, 1 Oct 2008 17:34:48 +0000 (17:34 +0000)]
Convert hypervisor

Replacing ssconf with configuration.

Reviewed-by: iustinp

15 years agoConvert mcpu.py
Michael Hanselmann [Wed, 1 Oct 2008 17:34:32 +0000 (17:34 +0000)]
Convert mcpu.py

Replacing ssconf with configuration.

Reviewed-by: iustinp

15 years agoConvert config.py
Michael Hanselmann [Wed, 1 Oct 2008 17:34:18 +0000 (17:34 +0000)]
Convert config.py

The configuration version is now again in the configuration file.

Reviewed-by: iustinp

15 years agoConvert backend.py
Michael Hanselmann [Wed, 1 Oct 2008 17:34:05 +0000 (17:34 +0000)]
Convert backend.py

Replacing ssconf with simpleconfig.

Reviewed-by: iustinp

15 years agoAdd new query to get cluster config values
Michael Hanselmann [Wed, 1 Oct 2008 17:33:52 +0000 (17:33 +0000)]
Add new query to get cluster config values

This can be used to retrieve certain cluster config values from
within clients.

OpDumpClusterConfig was not used anywhere, hence I'm just reusing
it. The way ConfigWriter.DumpConfig returned the configuration
was not thread-safe, anyway (no deepcopy).

Reviewed-by: iustinp

15 years agoMove functions from ssconf.py elsewhere
Michael Hanselmann [Wed, 1 Oct 2008 17:33:33 +0000 (17:33 +0000)]
Move functions from ssconf.py elsewhere

These functions will be used to access config values instead of using
ssconf.

Reviewed-by: iustinp

15 years agoAdd simple configuration reader/writer classes
Michael Hanselmann [Wed, 1 Oct 2008 17:33:18 +0000 (17:33 +0000)]
Add simple configuration reader/writer classes

This will be used to read the configuration file in the node daemon.
The write functionality is needed for master failover.

Reviewed-by: iustinp

15 years agoFix the watcher with down nodes
Iustin Pop [Wed, 1 Oct 2008 09:27:27 +0000 (09:27 +0000)]
Fix the watcher with down nodes

The watcher didn't handle the down nodes, fix this by ignoring (in
secondary node reboot checks) any node that doesn't return a boot id.

Reviewed-by: imsnah

15 years agoFix the watcher not restarting instance bug
Iustin Pop [Wed, 1 Oct 2008 09:27:17 +0000 (09:27 +0000)]
Fix the watcher not restarting instance bug

The watcher was using conflicting attributes of the instance:
  - it queried the admin_/oper_state, which are booleans
  - but it compared those to the status (which is a text field)

The code was changed to query the aggregated 'status' field, as that
will also return indication of node problems, and we can use this only
one field for all decisions. We still ask for the admin_state field as
that is needed for the activate disks check (in secondary node restart).

The patch also touches the watcher in some other parts:
  - log exceptions nicer
  - convert a method to @staticmethod
  - remove unused imports

Reviewed-by: imsnah

15 years agoRemove last use of utils.RunCmd from the watcher
Iustin Pop [Wed, 1 Oct 2008 09:27:07 +0000 (09:27 +0000)]
Remove last use of utils.RunCmd from the watcher

The watcher has one last use of ganeti commands as opposed to sending
requests via luxi. The patch changes this to use the cli functions.

The patch also has two other changes:
  - fix the docstring for OpVerifyDisks (found out while converting
    this)
  - enable stderr logging on the watcher when “-d” is passes

Reviewed-by: imsnah

15 years agoFix unittests broken by revision 1727
Michael Hanselmann [Wed, 1 Oct 2008 09:24:18 +0000 (09:24 +0000)]
Fix unittests broken by revision 1727

Reviewed-by: iustinp

15 years agoAdd cluster options from ssconf to configuration
Michael Hanselmann [Wed, 1 Oct 2008 09:03:22 +0000 (09:03 +0000)]
Add cluster options from ssconf to configuration

ssconf will become write-only from ganeti-masterd's point of view,
therefore all settings in there need to go into the main configuration
file.

Reviewed-by: iustinp

15 years agoMove instantiation of config into bootstrap.py
Michael Hanselmann [Wed, 1 Oct 2008 09:03:06 +0000 (09:03 +0000)]
Move instantiation of config into bootstrap.py

Future patches will add even more variables to the cluster config.
Adding more parameters wouldn't make the function easier to use and
it doesn't make sense to pass them to another function, as it's
only done once in bootstrap.py on cluster initialization.

Reviewed-by: iustinp

15 years agoChange the results from cli.PollJob
Iustin Pop [Wed, 1 Oct 2008 08:29:16 +0000 (08:29 +0000)]
Change the results from cli.PollJob

Curently PollJob accepts a generic job, but will return (history
artifact) only the first opcode result. This is wrong, as it doesn't
allow polling of a job with multiple results.

Its only caller (for now) is also changed, so no functional changes
should happen.

Reviewed-by: ultrotter, amishchenko

15 years agoAdd list of build dependencies
Michael Hanselmann [Tue, 30 Sep 2008 15:01:54 +0000 (15:01 +0000)]
Add list of build dependencies

Reviewed-by: iustinp

15 years agoBuild HTML from RST input
Michael Hanselmann [Tue, 30 Sep 2008 12:28:14 +0000 (12:28 +0000)]
Build HTML from RST input

This patch also adds the design documents to Makefile.am.

Reviewed-by: iustinp

15 years agoFix ‘gnt-job info’ with no arguments
Iustin Pop [Tue, 30 Sep 2008 12:22:13 +0000 (12:22 +0000)]
Fix ‘gnt-job info’ with no arguments

I didn't realize that my zip will break when no args are passed...

Reviewed-by: imsnah

15 years agoAdd output of job/opcode timestamps
Iustin Pop [Tue, 30 Sep 2008 12:13:26 +0000 (12:13 +0000)]
Add output of job/opcode timestamps

This patch adds posibility of selection of job/opcode timestamps in
gnt-job list and info.

The code handling the possible cases (None or a valid timestamps) are
ugly though...

Reviwed-by: imsnah

15 years agoEnhance the job-related timestamps
Iustin Pop [Tue, 30 Sep 2008 12:04:31 +0000 (12:04 +0000)]
Enhance the job-related timestamps

This patch adds start, stop, and received timestamp for jobs (and allows
querying of them), and allows querying of the opcode timestamps.

Reviewed-by: imsnah

15 years agoSmall fixes for master daemon design document
Michael Hanselmann [Tue, 30 Sep 2008 11:36:46 +0000 (11:36 +0000)]
Small fixes for master daemon design document

It said CLI/RAPI will talk to master using HTTP, which isn't true. Add
a reference to job queue design document. Small typos.

Reviewed-by: iustinp