- Jul 26, 2009
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 25, 2009
-
-
Guido Trotter authored
With three ganeti daemons, and one or two more coming, the daemon's main function started becoming too much cut&pasted code. Collapsing most of it in a daemon.GenericMain function. Some more code could be collapsed between the two http-based daemons, but since the new daemons won't be http-based we won't do it right now. As a bonus a functionality for overriding the network port on the command line for all network based nodes is added. Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 24, 2009
-
-
Guido Trotter authored
The <DAEMON>_PID constants were created to reference a daemon pid file, but actually contain a daemon's name, because the various functions that work with pidfiles abstract the filename from the daemon name themselves. Removing the constants and using the actual daemon name constants in their place. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
The original LOG_<DAEMON_NAME> constants for daemon logfiles are gone. In their place there is a DAEMONS_LOGFILES dict, indexed by daemon name. This is a minor change with the objective to uniform most of the daemon's main() functions code, which is very similar one to the other. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Currently rapi is the only daemon which accepts a port option, rather than querying its own port from services, and failing back to the default if not found. Changing this to conform to what other daemons do. Also update the ganeti-rapi(8) manpage Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
GetNodeDaemonPort is used to lookup the node daemon port in the services file, and if not found to return the default one. We make it a generic function, which accepts the daemon name in input, so that it can be used by confd as well, to lookup its own udp port. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
* next: lvmstrap: Change diskinfo to use GenerateTable Get rid of constants.RAPI_ENABLE Remove references to utils.debug ganeti-rapi, replace hardcoded exit value Add the bind-address option to ganeti-rapi noded: Abstract hard-coded sys.exit value Add an example "ethers" hook burnin: move batch init/commit into a decorator burnin: move instance alive checks to a decorator burnin: Implement retryable operations Ignore vim swap files burnin: fix removal errors hiding real errors
-
Stephen Shirley authored
This way the produced table is formatted nicely. Signed-off-by:
Stephen Shirley <diamond@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
This constant is unused, except in qa. Removing it since it's always True. This patch also removes the unused qa_rapi.PrintRemoteAPIWarning function, and removes a comment about temporary constants "until we have cluster parameters". Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 23, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Various modules set it to True when called in debugging mode, but the utils module supports no such global. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
substitute exit(1) with exit(constants.EXIT_FAILURE). Also fix a wrongly indented line. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 22, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
On machines without the ssl file noded exists '5'. Changing this to constants.EXIT_NOTCLUSTER. Also utils.GetNodeDaemonPort hasn't risen errors.ConfigurationError for a while, so removing that try/except block. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This hook can be used to update /etc/ethers with instance's mac addresses. A dhcp server on the nodes can then serve to the instances their correct address. (This has been tested with dnsmasq's dhcp implementation) Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 21, 2009
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Many burnin steps initialize the batch queue at the beginning and commit it at the end of their operation. This patch moves this code to a decorator, in order to reduce redundant code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
-
Iustin Pop authored
Many burn steps to a manual check of instance aliveness, via duplicate code. This patch moves this code to a decorator. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Some burnin steps are idempotent: e.g. reinstalling an instance (from burning p.o.v.) can be done multiple times without any side-effects that would affect later burnin steps. As such, failing the whole burnin process due a reinstall failure is undesirable. This patch modifies burnin by marking each opcode (in case of individual execution) and job set retryable or not. Retryable actions will be retried up to a number of times, after which we give up and return failure. One side-effect is that in case of full-failure in retryable job sets we lose the original exception (but we do log its string format), so we have a little bit less information in this case. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 20, 2009
-
-
Guido Trotter authored
This key is shared on all nodes (via cmdlib._RedistributeAncillaryFiles) and will be used for HMAC authentication of confd messages. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
File "../test/ganeti.hooks_unittest.py", line 239, in setUp self.lu = FakeLU(FakeProc(), self.op, self.context, None) File "…/ganeti/cmdlib.py", line 92, in __init__ self.LogStep = processor.LogStep AttributeError: FakeProc instance has no attribute 'LogStep' Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This class will be used for a new opcode to evacuate nodes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Before IAllocator would access them using “self.lu.cfg” and “self.lu.rpc”. It shouldn't know about the internals of the LU. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
The merge of commit 360b0dc2 into branch-2.1 broke import of backend, since it uses hypervisor.GetHypervisor() which returns an instance of the hypervisor. Some of the hypervisors create directories at init time, thus the import of backend failed due this chain if it's not done on a (proper) ganeti node, such as during unittest time. This patch adds in hypervisor a GetHypervisorClass() function, which returns the class not the instance of the hypervisor, and uses that in _BuildUploadFiles(). The existing GetHypervisor is then changed to use this function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jul 19, 2009
-
-
Iustin Pop authored
A long-standing bug in burnin makes errors during the removal phase (e.g. because an import has failed, or because the initial creation has failed) hide the original error. This patch suppresses removal errors if we are already in ‘has_err’ mode, and otherwise it displays them normally. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Conflicts: lib/backend.py: non-trivial conflict but easy to solve
-
Iustin Pop authored
The list of upload files is built currently at every UploadFile() call. This patch moves it to a separate variable which is initialized only once. This won't make much difference but I regard it as cleanup. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Conflicts: lib/cli.py: trivial extra empty line
-
Iustin Pop authored
Commit 55efe6da "Convert instance reinstall to multi instance model" actually broke instance reinstall for single-instance cases. This one-liner fixes it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> (cherry picked from commit b6e243ab)
-
Iustin Pop authored
It seems epydoc needs fully-qualified references, and doesn't deal with relative ones (not even in the current module) if there are any ambiguities. There are other epydoc warnings, in the rapi docstrings, but those are left as-is as they're removed in 2.1. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently, unclean master daemon shutdown overwrites all of a job's opcode status and result with error/None. This is incorrect, since the any already finished opcode(s) should have their status and result preserved, and only not-yet-processed opcodes should be marked as ‘error’. Cancelling jobs between opcodes does the same (but this is not allowed currently by the code, so it's not as important as unclean shutdown). This patch adds a new _QueuedJob function that only overwrites the status and result of finalized opcodes, which is then used in job queue init and in the cancel job functions. The patch also adds some comments and a new set constants in constants.py highlighting the finalized vs. non-finalized opcode statuses. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently gnt-debug submits jobs individually, but in 2.1 JobExecutor uses the optimized SubmitManyJobs luxi call and as such should be used whenever multiple jobs need to be submitted. This patch converts gnt-debug submit-job to use it and also removes an extra empty line in the JobExecutor class. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-