Ignore results from drained nodes in iallocator
Since drained nodes could be (partially or fully) broken in iallocator,we ignore results from these nodes when building the cluster map inpreparation for sending it to the script.
This is a cheap change for the stable branch; ideally we should not...
Ethers hook, compatibility with old lockfile
Remove "-l" option since some ancient systems ship a version of lockfile-progsnot supporting it.
Signed-off-by: Luca Bigliardi <shammash@google.com>
Merge branch 'master' into next
example ethers hook: use lockfile-progs
Rather than writing our own locking routing, use the one implemented bythe lockfile-create program.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
ethers hook lock: use logger not echo
Overwrite debugging 'echo's
Signed-off-by: Luca Bigliardi <shammash@google.com>Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
ethers hook: reduce the probability of data loss
The hook was exiting immediately if lock was not acquired, entering a timedloop to have more chances when acquiring the lock.
Signed-off-by: Luca Bigliardi <shammash@google.com>Signed-off-by: Guido Trotter <ultrotter@google.com>...
Implement gnt-cluster check-disk-sizes
This patch adds a new opcode and lu for checking disk sizes. Currentlyit does only top-level disk verification, and also doesn't checkprimary/secondary node size mismatches (these two are added as TODOs inthe Exec() function of the LU)....
Add an example "ethers" hook
This hook can be used to update /etc/ethers with instance's macaddresses. A dhcp server on the nodes can then serve to the instancestheir correct address. (This has been tested with dnsmasq's dhcpimplementation)
Signed-off-by: Guido Trotter <ultrotter@google.com>
ganeti.initd: Pass $*_ARGS to programs when restarting them
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix some typos
Minor patch to rapi documentation
Minor patch to clarify the URL necessary for accessing the RAPI.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Pass optional arguments to the daemons
These can be set in the defaults file, default to no arguments beingpassed, and make it easy for local installation to customize the way theganeti daemons are called.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
ganeti.initd: include defaults file, if present
In the example init script we'll execute an optional defaults file tomake it easier to add local customizations to the ganeti startup.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin <iustin@google.com>
Fix ;; indentation in the main initd loop
Currently two of the ;; ending the case bodies are not indented withanything. Reindent all of them to the body of the loop, as it's donesomewhere else in the init script.
A bunch of doc and other small fixes
This patch adds a couple of both externally and internally reportedissues: - missing SGML tags (Issue 54), report and patch by superdupont - wrong variable used in the init.d script, report and patch by Karsten Keil <karsten-keil@t-online.de>...
Add the 2.0-specific node flags to the design doc
This patch adds the newly-introduced node flags to the design document,as they currently are missing from there.
The patch also reduces the TOC depth to 3, as it was too big.
Reviewed-by: ultrotter
Fix bash completion for cluster copyfile/command
“copyfile” takes a file argument, so we enable file-completion for it.“gnt-cluster command” takes a command, so we enable command completion.
Reviewed-by: imsnah
Export tags to cluster verify hooks
This patch export the cluster and node tags to the cluster verify hookscripts. The tags are exported as a space-separated list, which allowseasy parsing from the shell (e.g. “for tag in $GANETI_CLUSTER_TAGS; do...”) and therefore requires the previous “Don't allow spaces in tag...
Update the iallocator documentation
This updates the iallocator documentation to 2.0, bumps up theiallocator version (and moves a constants to lib/constants.py), andfixes a style on install.rst.
A doc update and a small indentation fix
This adds a small paragraph about the “master” role of a node, and fixesa wrong indentation in the bash completion file.
Convert the RAPI document to restructured text
This patch changes the RAPI document, and the RAPI resourcesautogenerated-documentation to restructured text. This meant changingthe autogen tool.
The new fragment can be included via RST directives, and doesn't need...
Convert the install document to restructured text.
This switches back to the hardcoding of the version number, as we don'tyet have a wrapper for rst files that passes them throughreplace-sed-vars.
Add bash-completion rules
This is a not-complete bash completion file for ganeti commands (gnt-*)and the burnin tool. It is based on previous work by Minghua Ye<yeminghua@google.com> for Ganeti 1.1, which wasn't used because thelack of ssconf keys (which allow easy inspection by the shell of the...
Convert the hooks document to restructured text
This also updates the hooks document to 2.0.
Convert iallocator.sgml to restructured text
This is a no-contents change, this doc will need update to conform to2.0 message contents (and also the code will need increase to version 2of the iallocator protocol).
Convert the admin guide to restructured text
The RST format holds a little bit less information, as all the <fileclass="directory"> and <userinput> tags are gone, however we're notreally losing important context here. And it's way easier to read andupdate....
dumb-allocator: avoid allocating on drained nodes
This was forgotten when drained nodes were added.
Reviewed-by: iustinp
Update the install and admin documents
This is not a real update, just a quick pass changing the obvious parts.
RAPI: documentation updates
This patch fixes the version and does some update to the RAPI resourcesdocs.
dumb allocator: do not use drained nodes
This patch changes the dumb allocator not to use drained nodes (similarto offline nodes).
Small improvement to the init.d example file
The start_action function is changed so that it can be called witharguments - this could be used to parse a defaults file, etc.
RAPI: rlib1 removal
The resources we still need moved to rlib2.
Fix batcher for 2.0-style disks and nics
This patch fixes the gnt-instance batch-create command, and in doing soalso slightly changes two other functions: - we change utils.ParseUnit so that it accepts integer values also (both ParseUnit(5) and ParseUnit("5") return the same value)...
Make iallocator work with offline nodes
This patch changes the iallocator framework to work with and properlyexport to plugins offline nodes. It does this by only exporting thestatic configuration data for those nodes, and not attempting to parsethe runtime data....
Get rid of node daemon password
With the new SSL client certificate stuff it's no longer needed.
More updates to the documentation
This patch removes the client-api.txt document (since it's obsoleted bythe documentation inside the design-2.0.rst document) and adds manyupdates to the latter.
Add a cluster architecture diagram
This adds a simple diagram for the cluster architecture and also adds adependency on graphviz (both doc and in configure).
Combine the 2.0 design documents into one
This patch combines all the design documents for 2.0 except thesecurity one into a single document, in order to ease reading and reduceduplication of information.
Future patches will start removing wrong pointers to old document names...
design-2.0-os-interface: update import/export
In the end we ended up taking a slightly different approach forimport/export than the one discussed in the design doc, aftertrying/talking about a few more alternatives. Document this in thedocument.
Fix whitespace-at-EOL
Please configure your editors to strip it, or enable your git hooks...
design-2.0-cluster-parameters: escape final _
In rst a final _ is used for linking. Escaping it prevents an error atcompile time on design-2.0-cluster-parameters.rst
OS Design: invert new and old name
Internally in ganeti we already have renamed the instance, so it'sbetter to pass the new name in INSTANCE_NAME and the old one inOLD_INSTANCE_NAME rather than the old name in INSTANCE_NAME and the newone in NEW_INSTANCE_NAME as this reflects what the cluster thinks....
Provide example for backend parameters
Update the design about cluster parameters and providesome example of backend parameters. By now this includesall supported parameters.
Reviewed-by: iustinp, ultrotter
Some small typos on design docs
Update the cluster parameters design doc
As discussed, we update the design doc with the three classes ofparameters and other changes.
Some updates on the job queue design doc
This clarifies the job storage and the reason for choosing it.
Update design-2.0-job-queue to reflect changes
With change 1773 a new status WAITLOCK was introduced if a job/opcode iswaiting for a lock. This change updates the document about the job-queueaccordingly.
Update documentation & man pages for changed hypervisor names.
Shorten variable names.
Also export OS_API to the OS scripts
The idea is that if the OSes will support multiple version (e.g. both1.2 and 2.0), then Ganeti should be able to talk to it using version2.0, but then the script needs to be told nicely what version Ganeti isusing....
Updates to the security document
This patch changes formatting and the DRBD shared secret details, andadds master daemon socket details to the security doc.
Move the SECURITY document to the doc/ dir
Fix formatting in design-2.0-os-interface
Small changes to the index design doc
This is just some additions of not-yet-mentioned docs.
Slightly change the hypervisor parameter example.
Ganeti 2.0 cluster parameters design doc
OS Interface design doc
Add .. contents:: marker to design docs
RAPI Desing Doc
Minor cleanups & typo fixes.
Small fixes for master daemon design document
It said CLI/RAPI will talk to master using HTTP, which isn't true. Adda reference to job queue design document. Small typos.
Import design doc for commandline arguments
locking design: code path and declarations
locking design: explain use of async mode
Before we were discussing this possible future feature, and itsdrawbacks, but not its usefulness. This patch corrects this.
locking design: talk about removing locks
Import (and update) granular locking design doc
Add job queue design document
Add an 'index' of design documents
This will be an overview document, enumerating the changes without goinginto details and pointing to the actual documents.
Add design doc for the disk changes
Design doc for the master daemon
It's not complete, but I hope it's up to date. It's restructured text,but no make rules or such for html output are needed, it's readableas-is.
doc/locking.txt: Job queue functions can be called from LUs
The previous description was unclear. Reported by Guido Trotter.
Add lock documentation for job queue and ganeti-noded
Also change title formatting to match client-api.txt.
Remove bom-byte
This is not nice, removing it :)
Please use 'set nobomb' in your vi init file.
Merge r1295 from branches/ganeti/ganeti-1.2
Clarify cluster IP requirement.
Add doc/locking.txt, documenting locking order
Another typo in the install doc
Update the module build section of install doc
Rework master startup/shutdown/failover
This (big) patch reworks the master startup/shutdown and the fixes themaster failover.
What does the patch do?
For master start/stop: - remove the old ganeti-master script and its associated man page - moves the ip start/stop directly into the backend.(Start|Stop)Master...
Use pidfiles in example init script
Rather than searching for the ganeti daemons by name we'll use thepidfile they create to stop them. This change also adds the --oknodooption to start-stop-daemon when stopping ganeti (which means it won'tgive an error if it wasn't started)....
Split RAPI resources to pieces
Fix rapi documentation
As a nice side-effect this also fixes "make distcheck".
The way used to include the generated rapi-resources.sgml file onlyworks if it's built in the same directory. That's not the case during"make distcheck". The patch changes the sed script used for variables...
Copy the rest of the Restful-API files to trunk
Use a single Makefile.am instead of many
This change allows us to use cleaner dependencies betweendirectories. The build system is basically rewritten in large partsand may contain bugs.
Forward-port: Small codestyle fixes for dumb-allocator
Forward-port: Remove output file if docbook failed
Forward-port: patch 4/4 extended HVM features for 1.2
This patch documents the extended HVM features.
Author: schreiberalReviewed-by: imsnah
Distribute dumb-allocator in examples
When creating the ganeti tarball the dumb allocator was left out.Shipping it alongside the other examples.
Export the number of cpus to iallocator scripts
Now that we have the number of cpus available from the hypervisors, wecan export this to the iallocator scripts.
Remove deprecated disk templates from doc
Since local_raid1 and remote_raid1 are deprecated they are removedfrom the docs. This patch removes some old documentation sectionsand bumps the documented version from 1.2 to 1.3.
hooks.sgml: Add cluster-verify hooks information
Add iallocator documentation
Generalize the replace_secondary mode in iallocator
Currently the replace_secondary mode is too restrictive. This patchchanges this to a general 'relocate' mode where the node(s) to bechanged are specified via a new key in the request dict ('nodes') so...
Implement replace_secondary in the dumb allocator
This patch allows the dumb allocator to perform the replace secondaryrequest type. This is done simply by not allowing the current instancesnodes as a valid selection, and using the existing instance data instead...
Send required_nodes field to the iallocator scripts
This patch adds the 'required_nodes' field in the request dict for theiallocator.
This means that the handmade-checks in the create instance can besimplified, and that the dumb allocator can be made simple. Therefore...
IAllocator part 3: LUCreateInstance changes
This (final) patch allows the instance's nodes to be selectedautomatically based on the passed allocator algorithm.
The patch changes the pnode opcode parameter from required to optional,now either the pnode or the iallocator must be passed....
Implement 'out' direction on allocator tests
This patch adds the paths for searching for instance allocators andmakes the LUTestAllocator code run the allocator and return the resultsif the direction specified is 'out'. 'out' means that the opcode will...
Make the init script start the master daemon too
Fix example scripts build dependencies
Currently, the example scripts (the init.d and the cron script) do notdepend on the Makefile, so if configure is rerun with differentparameters these scripts are not rebuild.
The patch adds Makefile as a dependency so changes to installation paths...
Make ganeti-noded create BDEV_CACHE_DIR automatically
Currently in order to deal with tmpfs /var/run, we create theBDEV_CACHE_DIR in the init script. However, that does not cover all thecases, and it's not a proper place to deal with it: for example, dealing...