Update init script description
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Andrea Spadaccini <spadaccio@google.com>
Remove dumb-allocator
- Remove the actual code- Remove mentions of it from iallocator.rst, and use hail instead- Also remove mentions of "etch-image" and use "debootstrap+default" - Mention htools as the reference implementation in iallocator.rst
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Adding a basic oob helper as an example
This is just a plain stupid and simple out-of-band helper withoutanything fancy. It uses plain ssh to power off / power cycle themachine, does not support power on. It support power status using fpingto check if the host replies....
Script to gracefully power off KVM instances
When a node is running KVM instances and that node is rebooted orshutdown, the gnt-noded daemon is finished and leaves the KVM instancesrunning. Latter on in the shutdown process, all remaining processesreceive SIGTERM as usual, meaning that the KVM instances are all...
Make *.in non-executable
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Add repetition count to the TestDelay opcode
If the repetition count is not passed or is passed as 0 we sleep exactlyone time, otherwise we sleep "repeat" times and log in between.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add example gnt-debug submit-job json files
These files are being used to test the job queue performance withvarious changes and conditions. Adding them here for posterity.
ganeti.initd: Move all daemon names from init script to daemon-util
The list of daemon names will be used in daemon-util, too.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
ganeti.initd: Move code checking daemon exit code to daemon-util
This is again for re-using code.
ganeti.initd: Move code checking config to daemon-util
This allows for more code re-use. daemon-util will also be used to startall daemons.
Provide example default files and install one for development
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix the init script
The rewrite after the introduction of the daemon-util script has acopy-paste error.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add new “daemon-util” script to start/stop Ganeti daemons
Until now, Ganeti started and stopped its own daemons using custom functions.To start, the daemon was just executed and then sent the appropriate signals tostop it again. Init scripts would have to pay attention to the PID file and...
Add an example script for backing up the config
This requires git and lockfile-progs, and only backs up config.data (seethe comments why).
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
init script: allow singling out confd as well
Currently we can start/stop the various subdaemons, but not confd.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
ethers hook: allow more than one daemon pidfile
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Example IPsec hook
This hook is a simple example which automatically configures a basic IPsec linkamong all the nodes of a cluster.
Signed-off-by: Luca Bigliardi <shammash@google.com>
Merge branch 'next' into branch-2.1
Add script to clean archived jobs after 21 days
Use script to generate bash completion
Completion for tools/burnin is not yet implemented. It needs to beconverted to definition-based options handling first.
Improve the example startup script
Currently, the supplised script has two issues: - it doesn't use start-stop-daemon --start correctly, leading to messages like "ganeti.errors.GenericError: /var/run/ganeti/ganeti-rapi.pid contains a live process" in the logs...
Fix insserv dependencies
(import of a Debian patch)
This patch removes xend from the list of dependencies.
Ganeti doesn't need xend running to startup, it will only need it later(and only if xen is used as virtualisation technology). It also removes'Xen' from the description in the init script....
Merge commit 'origin/next' into branch-2.1
Ethers hook, compatibility with old lockfile
Remove "-l" option since some ancient systems ship a version of lockfile-progsnot supporting it.
init script: handle ganeti-confd as well
Adding ganeti-confd to the example init script. The daemon itself willonly start on master candidates, but the init script can just try tostart it on all nodes.
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.
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
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.
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>...
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
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.
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...
dumb-allocator: avoid allocating on drained nodes
This was forgotten when drained nodes were added.
Reviewed-by: iustinp
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.
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.
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)....
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
Distribute dumb-allocator in examples
When creating the ganeti tarball the dumb allocator was left out.Shipping it alongside the other examples.
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
Reviewed-by: ultrotter
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...
Improve ganeti example cron file
The cron file in ganeti's example directory is now static, and executesganeti-watcher in /usr/local/sbin no matter where it's really installed. Withthis patch we generate it at build time substituting the right value of...
Fix the init.d script
The script (which is geared towards Debian) is actually not fullycompliant, as lintian generates a warning on it - the S runlevel is nota valid one in the "Stop" stanza. This patch removes "S" from the stoplist.
Create /var/run/ganeti before noded startup
The /var/run directory can be a tmpfs mount, so even if we make it atinstall time (or include it in the package) it can go away. Therefore,test for its existence and create it in the startup script.
Fix usage of wrong variable in doc/examples/Makefile.am.
This makes “make distcheck” work again.
Reviewed-by: schreiberal
Do not install init script in PREFIX/bin.
Integrate Leonardo's LSB init script patch
Reviewed-By: imsnah
- Don't build .tar.bz2, we only distribute .tar.gz anyway.- Clean generated files on “make maintainer-clean”.- Build _autoconf.py and ganeti.initd on “make all”.
Use configure's paths in the init script example.
- Add Makefile in doc/examples/
- Rename docs/ to doc/- Add Makefile in doc/examples/