- Oct 07, 2011
-
-
Andrea Spadaccini authored
lib/constants.py * add to each CV_E* tuple the documentation of the error code * add the DOCUMENTED_CONSTANTS constant for the doc preprocessor autotools/docpp * add a new directive class CONSTANTS_<kind>, that gets data from constants.DOCUMENTED_CONSTANTS lib/cmdlib.py * modify the code that unpacked the CV_E* tuples to ignore the documentation parameter Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
autotools/docpp * handle generic custom directives in the form <class>_<kind> * adapt handling of query fields build/sphinx_ext.py * add the BuildValuesDoc function to output definitions using the sphinx syntax that was already used for query fields * adapt BuildQueryFields to use BuildValuesDoc Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 06, 2011
-
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 05, 2011
-
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Andrea Spadaccini authored
Treat the gnt-cluster verify errors identified by the error codes in --ignore-errors as warnings; just print a warning message for the user. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
lib/cli.py - add IGNORE_ERROR_OPT; client/gnt_cluster.py - pass the ignore_errors parameter to the opcodes lib/opcode.py - update OpClusterVerifyConfig, OpClusterVerify and OpClusterVerifyGroup to accept the ignore_errors parameter lib/cmdlib.py - pass the ignore_errors parameter to the opcodes that need it Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
- move the cluster verify error codes from cmdlib._VerifyErrors to constants; - add to each of them the CV (Cluster Verify) prefix; - add the CV_ALL_ECODES and CV_ALL_ECODES_STRINGS constants; - wrap the lines that exceed 80 characters after changing the error code names to the new ones. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
Change 5a8648eb changed the order of the return values of backend.GetMasterInfo(). This broke the users of the master_info RPC. This change restores the original order, and adds a comment in bootstrap.py about the new value added to the return values of master_info. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Andrea Spadaccini authored
Add the master_netmask cluster parameter, that represents the netmask of the master IP, encoded as a CIDR suffix. This parameter can be set via the --master-netmask of gnt-cluster init and gnt-cluster modify. The default behaviour is to be consistent with the old default (/32 for IPv4 and /128 for IPv6). Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Andrea Spadaccini authored
Add the following methods to netutils.IPAddress: * ValidateNetmask * GetClassFromIpVersion * GetClassFromIpFamily Also, add related tests to the test suite. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 04, 2011
-
-
Andrea Spadaccini authored
* devel-2.5: cluster-merge: log an info message at node readd Bump version to 2.5.0~rc1 Fix issue when verifying cluster files Revert "utils.log: Write error messages to stderr" Fix adding nodes after commit 64c7b383 LUClusterVerifyGroup: Spread SSH checks over more nodes Optimise cli.JobExecutor with many pending jobs Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Andrea Spadaccini authored
Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Guido Trotter authored
node readd can take a long time, it's good to have info messages to see progress. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Andrea Spadaccini <spadaccio@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Include QCHelper.hs in the distributed files, and also exclude it and the THH.hs file from coverage reports. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Andrea Spadaccini <spadaccio@google.com>
-
Michael Hanselmann authored
If a cluster has any non-master-candidate nodes, those don't contain all files (e.g. config.data). With commit aef59ae7 (March 31st, 2011) the logic was changed and subsequently verifying a cluster with non-mc nodes would complain. This patch fixes this issue by changing the algorithm. It also adds an additional check for files which shouldn't exist on a machine. A newly added unittest is included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 03, 2011
-
-
Michael Hanselmann authored
This reverts commit 34aa8b7c. Writing error messages to stderr would also include backtraces, something we tried to avoid in the past. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Commit 64c7b383 changed the RPC call for verifying SSH connections. Unfortunately this case in adding nodes was missed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Now that the basic code works, let's use some aliases for simpler code and less ))))))))). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds a few niceties to the test suite: - allows matching test groups case insensitive and emit warnings when we give test group names that don't match anything - add a new operator that is similar to assertEqual in Python: it tests for equality and emits the two values in case of error Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This makes error message change from "Test 4 failed …" to "Test prop_Loader_mergeData failed", which is much more readable. It also removes the duplication of test suite names in the test.hs file. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This replaces the hand-coded opcode serialisation code with auto-generation based on TemplateHaskell. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This replaces the hand-coded opID with one automatically generated from the constructor names, similar to the way Python does it, except it's done at compilation time as opposed to runtime. Again, the code line delta does not favour this patch, but this eliminates error-prone, manual code with auto-generated one; in case we add more opcode support, this will help a lot. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This patch replaces the current hard-coded JSON instances (all alike, just manual conversion to/from string) with auto-generated code based on Template Haskell (http://www.haskell.org/haskellwiki/Template_Haskell ). The reduction in code line is not big, as the helper module is well documented and thus overall we gain about 70 code lines; however, if we ignore comments we're in good shape, and any future addition of such data types will be much simpler and less error-prone. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This changes the names for some helper functions so that future patches are touching less unrelated code. The change replaces shortened prefixes with the full type name. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
Utils is a bit big, let's split the JSON stuff (not all of it) into a separate module that doesn't have any other dependencies. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Sep 30, 2011
-
-
Michael Hanselmann authored
When verifying a group the code would always check SSH to all nodes in the same group, as well as the first node for every other group. On big clusters this can cause issues since many nodes will try to connect to the first node of another group at the same time. This patch changes the algorithm to choose a different node every time. A unittest for the selection algorithm is included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
In the case we submit many pending jobs (> 100) to the masterd, the JobExecutor 'spams' the master daemon with status requests for the status of all the jobs, even though in the end it will only choose a single job for polling. This is very sub-optimal, because when the master is busy processing small/fast jobs, this query forces reading all the jobs from this. Restricting the 'window' of jobs that we query from the entire set to a smaller subset makes a huge difference (masterd only, 0s delay jobs, all jobs to tmpfs thus no I/O involved): - submitting/waiting for 500 jobs: - before: ~21 s - after: ~5 s - submitting/waiting for 1K jobs: - before: ~76 s - after: ~8 s This is with a batch of 25 jobs. With a batch of 50 jobs, it goes from 8s to 12s. I think that choosing the 'best' job for nice output only matters with a small number of jobs, and that for more than that people will not actually watch the jobs. So changing from 'perfect job' to 'best job in the first 25' should be OK. Note that most jobs won't execute as fast as 0 delay, but this is still a good improvement. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
* devel-2.5: Use --yes to deactivate master ip in cluster merge Use deactivate-master-ip in cluster-merge Add gnt-cluster commands to toggle the master IP Split starting and stopping master IP and daemons listrunner: Don't pass arguments if there are none ssh: Quote strings in error message utils.log: Write error messages to stderr Add signal handling doc to hbal man page Migration: warn the user about hv version mismatch Fix handling of cluster verify hooks Redistribute the RAPI certificate QA: Add tests for instance start/stop via RAPI RAPI: Fix wrong check on instance shutdown baserlib: Accept empty body in FillOpcode Conflicts: lib/backend.py - no real conflicts lib/constants.py - preserve both changes lib/rapi/rlib2.py - keep master lib/rpc.py - no real conflicts tools/cluster-merge - keep devel-2.5 Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Andrea Spadaccini authored
* stable-2.5: listrunner: Don't pass arguments if there are none ssh: Quote strings in error message utils.log: Write error messages to stderr Add signal handling doc to hbal man page Fix handling of cluster verify hooks Redistribute the RAPI certificate QA: Add tests for instance start/stop via RAPI RAPI: Fix wrong check on instance shutdown baserlib: Accept empty body in FillOpcode Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Andrea Spadaccini <spadaccio@google.com>
-
Andrea Spadaccini authored
Use the gnt-cluster deactivate-master-ip command in cluster-merge to disable the master IP. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> (cherry picked from commit e87e5afb)
-
Andrea Spadaccini authored
lib/client/gnt_cluster.py: * Add activate-master-ip and deactivate-master-ip commands man/gnt-cluster.rst: * Document the new commands lib/opcodes.py lib/cmdlib.py * Add two opcodes and the LU that call the relevant RPCs test/docs_unittest.py * Silence an error about RAPI not implemented for the two new opcodes Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> (cherry picked from commit fb926117) Conflicts: test/docs_unittest.py - kept devel-2.5 version, without the RAPI opcode checks
-
Andrea Spadaccini authored
lib/backend.py * split StartMaster() in ActivateMasterIp() and StartMasterDaemons() * split StopMaster() in DeactivateMasterIp() and StopMasterDaemons() lib/server/noded.py, lib/rpc.py * adapt the call chains to the new functions, define new RPCs lib/bootstrap.py, lib/cmdlib.py, lib/server/masterd.py * use the new RPCs Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com> (cherry picked from commit fb460cf7)
-
Andrea Spadaccini authored
Use the gnt-cluster deactivate-master-ip command in cluster-merge to disable the master IP. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Andrea Spadaccini authored
lib/client/gnt_cluster.py: * Add activate-master-ip and deactivate-master-ip commands man/gnt-cluster.rst: * Document the new commands lib/opcodes.py lib/cmdlib.py * Add two opcodes and the LU that call the relevant RPCs test/docs_unittest.py * Silence an error about RAPI not implemented for the two new opcodes Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Andrea Spadaccini authored
lib/backend.py * split StartMaster() in ActivateMasterIp() and StartMasterDaemons() * split StopMaster() in DeactivateMasterIp() and StopMasterDaemons() lib/server/noded.py, lib/rpc.py * adapt the call chains to the new functions, define new RPCs lib/bootstrap.py, lib/cmdlib.py, lib/server/masterd.py * use the new RPCs Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
If no arguments were specified the “exec_args” variable was “None”, leading to the command being run as “… ./… None”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-