- Jul 26, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This will be used in the watcher where we don't want to pollute stdout unless in debug mode. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
It doesn't make sense to have to keep them up to date twice, and --help already lists all of them with help strings. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Right now we always restart all instances, which is not right if some instances were already down for other reasons. Thus we add an option to decide how to handle this. The right default should be "up" which is: "restart all options which were switched off by the merge", but since that's not implemented yet, the default remains the old one, for now. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
Currently, most htools code depends on Constants.hs which is generated from constants.py and also depends on _autoconf.py. Also, _autoconf.py depends on vcs-version, which all together means that when 'make regen-vcs-version' is run, for example by ./devel/upload, most of the Haskell code needs recompilation. Since htools already has its 'optimised' vcs-version (and doesn't use the _autoconf.VCS_VERSION constants), we can optimise this as follows: - _autoconf.py doesn't contain the VCS_VERSION anymore, and that is instead moved to _vcsversion.py - constants.py depends on and imports this new module - _autoconf.py doesn't get regenerated at vcs-version changes, but only at re-running configure/changing Makefile time The end result is that only htools/Ganeti/HTools/Version.hs is recompiled now, which is a significant speedup (usually < 1 second versus 10 seconds previously). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 25, 2011
-
-
Iustin Pop authored
s/'/"/ in (hopefully) the right places. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
* devel-2.4: Reopen daemon's stdio on SIGHUP Reopen log file only once after SIGHUP Don't leak file descriptors when setting up daemon output Fix aliases in bash completion Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Before this patch daemons would continue to refer to an old logfile for their standard I/O if they had been asked to reopen the log (SIGHUP). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Commit b6fa9a44 added a re-openable log handler. The log file is reopened when a daemon is sent a HUP signal. Due to a bug in the code, fixed by this patch, the log file would be reopened for every single log message thereafter. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
When a daemon's output is configured using “utils.SetupDaemonFDs”, the function must use dup2(2). Unfortunately the code didn't close the original file descriptors, leaking them in the process. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 22, 2011
-
-
Iustin Pop authored
I think I've identified the problem with the current ChangeAll mode. The current algorithm works as follows: - identify a new primary by choosing the node which gives best score as new secondary - failover to it - identify a new secondary by choosing the node which gives best score as new secondary This means that the future primary is 'fixed' after the first iteration, leaving to possibly suboptimal results. This patch changes the algorithm to do what, in hindsight, seems the obvious thing to do: - generate all pairs (primary, secondary) - identify the pair that after the above sequence (r:np, f, r:ns) gives the best group score This fixes some of the corner cases I've seen in relocation, but not all; the remaining cases are related to multi-instance relocation and while they can't be fixed in the current framework, the needed rebalancing is much smaller than with the current algorithm. The patch also fixes an issue with the docstring of another function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Before this patch “gnt-instance info” would fail with the error message “Error checking node $node: Node is marked offline” if the instance's primary node is marked offline and the user didn't explicitely request static information only. With this patch the LU will automatically return static information if the instance's primary node is marked offline. Some explicit loops are changed to map(). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
When the source node for a failover is marked offline, there's no need to require the user to specify “--ignore-consistency”. To make it work at all, a number of bugs introduced by the merge of migration and failover are also fixed by this patch. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
These two cases use explicit uses of primary and secondary nodes with Instance.allNodes, which means the code is more flexible if the internal layout of the instance changes. I've verified that the output of involvedNodes is not required to be 4-element long, and as such the function docstring has been updated. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
… and failover too. Not many changes otherwise except for serialisation and unittests. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
These will be used in Node.hs for proper add/remove instance code. Furthermore, we restrict the movable status to the right disk templates only, so that we don't attempt to move the 'wrong' instance types. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> [iustin@google.com: fixed formatting issues] Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Ever since commit 2d48a3a2 aliases were not included in the bash completion script. This patch also replaces one tab with two spaces. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This means opening the console no longer requires the instance lock, allowing it to be used during long-running operations (e.g. replacing a disk). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
* devel-2.4: gnt-node volumes: Fix instance names Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This attribute allows programmatic submitters of jobs (e.g. iallocator) to add a comment to each opcode, describing its purpose. Example: $ gnt-job info 123 Job ID: 123 … Opcodes: OP_INSTANCE_REPLACE_DISKS … Input fields: comment: Replaces disks on inst1.example.com … Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Commit 84d7e26b changed “objects.Instance.MapLVsByN” to not just return the LV name, but to include the volume group name (e.g. “xenvg/d67e8700….disk0_data”). This in turn broke the mapping of volume names in LUNodeQueryvols, stopping instance names from displayed in “gnt-node volumes”. This patch fixes the issue and does some cleanup. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 21, 2011
-
-
Andrea Spadaccini authored
The -g vg-name option was deprecated in commit 04367e70. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
More fallout from commit 323f9095. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
No idea why this was missed before. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This makes them visible to the user. Example: $ gnt-debug locks -o name,pending Name Pending job/890 job:891,892 job/892 job:894 Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This will be used for exporting job dependencies through the lock monitor. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
With this change it'll be possible to register other lock information providers. One usecase for this are job dependencies, which can be shown in the output of “gnt-debug locks”, too. The lock monitor is changed to accept more than one return value from the function providing the information. Unfortunately it's hard to keep weak references to bound methods, so that I settled on keeping a weak reference on the object instead (see note in docstring). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
These were forgot when the supported library versions were changed. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This adds tests for the opToResult and eitherToResult functions from Types.hs, and changes two other tests for the same module to test JSON serialisation (which automatically also tests the lower-level to/from string conversion functions). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Also mark the deprecated modes we no longer support. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Tested only on GHC 7.x, will test on 6.1x too before commit. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This adds parameter documentation for Cluster.iMoveToJob (I think it was not clear if the new or old node list is needed) and fixes other docstring style issues. After this patch, all modules except for CLI.hs (which has many obvious declarations for command-line options) and QC.hs (unittests) have 100% doc-strings. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This abstracts the JSON parsing of the type EvacMode near its definition, and simplifies its conversion in IAlloc.parseData. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Currently, hspace can only output a machine-readable format that (while detailed) is hard to parse quickly by people. This patch adds (and enables by default) a human-readable output that shows the most important metrics in a simple format. Most of the work of the patch is in moving the display of various metrics from the 'main' function to separate functions, each of which can output either a machine or human intended format. The patch also corrects a bug in the CPU efficiency display: before, the efficiency was computed as instance virtual CPUs divided by total physical CPUs, which is almost always supra-unitary. More correct is to divide by the total virtual CPUs, which shows a more meaningful number (when the p-to-v CPU ratio has been defined correctly). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
Commit 56c094b4 added use of job constants, but I didn't pay attention and ended up mixing things: job constants were used for opcode ones, and the job ones didn't get converted. This patch corrects it and uses only C.* constants throughout the Jobs module. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-