From: Marko O. <d0...@us...> - 2010-05-10 13:17:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "UNNAMED PROJECT". The branch, master has been updated via a215039789e86a5d1e4f8f79cb4bb80c4649fefa (commit) via 486ac20ff0a03f1d8ce39d904d2c37f9b5fbd863 (commit) via b9386ae7c235c5b138b418a16b0f2374fd43e0a5 (commit) via b5c435951e2dcf142eb324cb32e00aac64db9d37 (commit) via f32f65208ef4ac8461c0bfcf5ece03f5762db9f6 (commit) via 097206745a62011ac2149286ea2951787ed86f91 (commit) via e6e9ba3f50e5577bfde30b09bba4bc3db540cb83 (commit) via a837fbe063d648496bb52913d3855d517a0abf38 (commit) via 60a45f10a90c775b09c4c1175737c7d13b1d808f (commit) via a05c680e72321c4050d95bab90189f71e405eec6 (commit) via 596d2e6fabad5fad30a97208e805b6aba5527e5a (commit) via 20b72c5712553a4915e23ff71d28183594828c58 (commit) via 30b090c71a3a822cd6c834d5101c1cedc86ad702 (commit) via 5dbf3667b7f3a4b88f726e777801468bb148d73f (commit) via 388d87c8843c052aef2ff7e7ff60481a3bc6966c (commit) via 0c75f669a94afd89a7c2ff258d8c383ae4dc0454 (commit) via b218993dd55d0b67678cba58980f0b056a758e2b (commit) via 8937cd62a5ce170f3fade59ab95b3533228015ff (commit) via c66a74d81462ab502cc62f78fa2057a7a64f70cf (commit) via d27dcb4861c29aef2b1404a28a3de8e1799ced45 (commit) via fe7ee93cf6f05cd110a999afdfd96094aefd6ccc (commit) via 93d31cf4afa0878adb8bdbade6254ca6e38e34ce (commit) via 86082d92ddcffafb621d172cd9fcc67db5f2fc81 (commit) via 0e7e9129358f813281ee9880079c064dbc853a7e (commit) via 4239a416a8e86a96e4a67430718fa4066fc64be1 (commit) via 4639e375cc08817d85e7733d8551ceec69c3ae1c (commit) via b6732c147efec4ab634685a8fa55d67f674ac053 (commit) via 459a6da9fa601aacb98a054eb3b998026e88fea8 (commit) via 8d44bc9d49b065c84dade8515262385bc2e94190 (commit) from 1593fa67a18a602c629d4977e63f7c58aa5c0175 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a215039789e86a5d1e4f8f79cb4bb80c4649fefa Author: Marko Obrovac <mar...@in...> Date: Mon May 10 17:16:46 2010 +0200 BUGFIX: * Add kdfs_stat and netclient as build targets diff --git a/tools/Makefile.am b/tools/Makefile.am index e5d3222..839edb6 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -11,7 +11,7 @@ sbindir=$(exec-prefix)/sbin dist_sbin_SCRIPTS = krginit_helper krg_legacy_scheduler bin_PROGRAMS = migrate checkpoint restart krgcapset krgcr-run ipccheckpoint ipcrestart -sbin_PROGRAMS = krgadm krginit mkfs.kdfs +sbin_PROGRAMS = krgadm krginit mkfs.kdfs kdfs_stat netclient INCLUDES = -I@top_srcdir@/libs/include LDADD = @top_builddir@/libs/libkerrighed/libkerrighed.la @top_builddir@/libs/libkrgcb/libkrgcb.la commit 486ac20ff0a03f1d8ce39d904d2c37f9b5fbd863 Merge: 1593fa6 b9386ae Author: Marko Obrovac <mar...@in...> Date: Mon May 10 17:07:34 2010 +0200 Merge branch 'master' of git://mirrors.git.kernel.org/cluster/kerrighed/tools commit b9386ae7c235c5b138b418a16b0f2374fd43e0a5 Author: Jean Parpaillon <jea...@ke...> Date: Wed May 5 14:03:02 2010 +0200 [tools] Update init scripts for new cluster start method diff --git a/tools/kerrighed.default b/tools/kerrighed.default index 9fa7662..dbdafa2 100644 --- a/tools/kerrighed.default +++ b/tools/kerrighed.default @@ -3,16 +3,12 @@ # #===================================================== -# Start kerrighed cluster -ENABLE=true -#ENABLE=false - # krgadm nodes add options. Can be used to wait for some nodes. # If empty, no nodes is added to the cluster. # See man krgadm(1) -START_OPTS="--all" -#START_OPTS="--count 4" -#START_OPTS="--nodes 1-4" +ADD_OPTS="--all" +#ADD_OPTS="--total 4" +#ADD_OPTS="--nodes 1-4" # Enable/Disable legacy scheduler behaviour LEGACY_SCHED=true diff --git a/tools/kerrighed.init b/tools/kerrighed.init index ff1d927..bdf1795 100755 --- a/tools/kerrighed.init +++ b/tools/kerrighed.init @@ -46,17 +46,12 @@ d_check_kerrighed() { return $? } -d_trigger_krg_legacy_scheduler() { - krgadm cluster wait_start - krg_legacy_scheduler > /dev/null 2>&1 -} - d_start_scheduler() { log_progress_msg "scheduler" case "x$LEGACY_SCHED" in xtrue) - d_trigger_krg_legacy_scheduler & + krg_legacy_scheduler > /dev/null 2>&1 ;; xfalse) log_progress_msg "disabled in $CFG" @@ -76,32 +71,12 @@ d_start_scheduler() { d_start() { log_daemon_msg "Starting $DESC" - if krgadm cluster status | grep -q '^status: up'; then - log_progress_msg "already started" - STATUS=1 - else - case "x$ENABLE" in - xtrue) - log_progress_msg "cluster" - krgadm cluster start > /dev/null - STATUS=$? - if [ $STATUS -eq 0 ]; then - if [ -n "$START_OPTS" ]; then - krgadm nodes add $START_OPTS > /dev/null - STATUS=$? - fi - d_start_scheduler - fi - ;; - xfalse) - log_progress_msg "disabled in $CFG" - ;; - *) - log_progress_msg "value of ENABLE in $CFG must be either 'true' or 'false'" - STATUS=1 - ;; - esac + if [ -n "$ADD_OPTS" ]; then + log_daemon_msg "nodes" + krgadm nodes add $ADD_OPTS > /dev/null + STATUS=$? fi + d_start_scheduler log_end_msg ${STATUS:-0} return $? commit b5c435951e2dcf142eb324cb32e00aac64db9d37 Author: Jean Parpaillon <jea...@ke...> Date: Thu May 6 14:02:37 2010 +0200 [tests] Remove wait_start call from krgltp-smp.sh diff --git a/tests/ktp/krgltp-smp.sh.in b/tests/ktp/krgltp-smp.sh.in index 754015b..0f31920 100755 --- a/tests/ktp/krgltp-smp.sh.in +++ b/tests/ktp/krgltp-smp.sh.in @@ -1837,12 +1837,6 @@ fi slab-check -# Use the distant fork feature -if [ -z "$localonly" ]; then - echo "* Waiting for the cluster to start" - krgadm cluster wait_start -fi - export KTP_NR_PS=$nr_ps export KTP_ROOT_PID=$$ commit f32f65208ef4ac8461c0bfcf5ece03f5762db9f6 Author: Jean Parpaillon <jea...@ke...> Date: Wed May 5 10:50:03 2010 +0200 [libkerrighed] Kill cluster_start and relative functions diff --git a/libs/include/hotplug.h b/libs/include/hotplug.h index 5100c28..94ff078 100644 --- a/libs/include/hotplug.h +++ b/libs/include/hotplug.h @@ -225,9 +225,6 @@ int krg_nodes_poweroff(struct krg_node_set *node_set); struct krg_nodes* krg_nodes_status(void); struct krg_clusters* krg_cluster_status(void); int krg_set_cluster_creator(int enable); -int krg_cluster_start(struct krg_node_set *krg_node_set); -int krg_cluster_start_all(void); -int krg_cluster_wait_for_start(void); int krg_node_ready(int setup_ok); int krg_cluster_shutdown(int subclusterid); int krg_cluster_reboot(int subclusterid); diff --git a/libs/include/kerrighed_tools.h b/libs/include/kerrighed_tools.h index 7854797..3fd9f8d 100644 --- a/libs/include/kerrighed_tools.h +++ b/libs/include/kerrighed_tools.h @@ -74,9 +74,6 @@ #define KSYS_GET_NODES_COUNT _IOR(KERRIGHED_PROC_MAGIC, \ COMM_PROC_BASE + 1, \ int) -#define KSYS_HOTPLUG_START _IOW(KERRIGHED_PROC_MAGIC, \ - COMM_PROC_BASE + 3, \ - krgnodemask_t) #define KSYS_HOTPLUG_RESTART _IOW(KERRIGHED_PROC_MAGIC, \ COMM_PROC_BASE + 4, \ krgnodemask_t) @@ -104,8 +101,6 @@ #define KSYS_HOTPLUG_POWEROFF _IOW(KERRIGHED_PROC_MAGIC, \ COMM_PROC_BASE + 12, \ struct hotplug_node_set) -#define KSYS_HOTPLUG_WAIT_FOR_START _IO(KERRIGHED_PROC_MAGIC, \ - COMM_PROC_BASE + 13) #define KSYS_HOTPLUG_SET_CREATOR _IO(KERRIGHED_PROC_MAGIC, \ COMM_PROC_BASE + 14) #define KSYS_HOTPLUG_READY _IO(KERRIGHED_PROC_MAGIC, \ diff --git a/libs/kerrighed.py b/libs/kerrighed.py index 83e6f10..346f051 100644 --- a/libs/kerrighed.py +++ b/libs/kerrighed.py @@ -89,9 +89,6 @@ libkerrighed.krg_node_set_next.restype = c_int libkerrighed.krg_status_str.restype = c_char_p libkerrighed.krg_nodes_status.restype = krg_nodes_ptr_t libkerrighed.krg_cluster_status.restype = krg_clusters_ptr_t -libkerrighed.krg_cluster_start.restype = krg_error_handler(libkerrighed.krg_cluster_start) -libkerrighed.krg_cluster_start_all.restype = krg_error_handler(libkerrighed.krg_cluster_start_all) -libkerrighed.krg_cluster_wait_for_start.restype = krg_error_handler(libkerrighed.krg_cluster_wait_for_start) libkerrighed.krg_cluster_shutdown.restype = krg_error_handler(libkerrighed.krg_cluster_shutdown) libkerrighed.krg_cluster_reboot.restype = krg_error_handler(libkerrighed.krg_cluster_reboot) @@ -282,18 +279,6 @@ def krg_cluster_status(): """ return krg_clusters(libkerrighed.krg_cluster_status()) -def krg_cluster_start(node_set): - """ - node_set: krg_node_set object - """ - libkerrighed.krg_cluster_start(node_set.c)==0 - -def krg_cluster_start_all(): - libkerrighed.krg_cluster_start_all() - -def krg_cluster_wait_for_start(): - libkerrighed.krg_cluster_wait_for_start() - def krg_cluster_shutdown(subclusterid=0): """ subclusterid: int diff --git a/libs/libkerrighed/libhotplug.c b/libs/libkerrighed/libhotplug.c index e1d2c4a..cd5d404 100644 --- a/libs/libkerrighed/libhotplug.c +++ b/libs/libkerrighed/libhotplug.c @@ -499,57 +499,6 @@ int krg_set_cluster_creator(int enable) enable ? (void *)1 : NULL); } -int krg_cluster_start(struct krg_node_set *krg_node_set){ - struct hotplug_node_set node_set; - struct krg_clusters* clusters; - int i; - - clusters = krg_cluster_status(); - if (krg_clusters_is_up(clusters, 0)) { - errno = EALREADY; - return -1; - } - - node_set.subclusterid = krg_node_set->subclusterid; - - krgnodes_clear(node_set.v); - - for (i = 0; i < kerrighed_max_nodes; i++) { - if (krg_node_set->v[i]) { - krgnode_set(i, node_set.v); - } - } - - return call_kerrighed_services(KSYS_HOTPLUG_START, &node_set); -} - -int krg_cluster_start_all(void) -{ - struct krg_nodes* status; - struct krg_node_set* nodes; - int r = -1; - - status = krg_nodes_status(); - if(! status) - return r; - - nodes = krg_nodes_get_present(status); - if (! nodes) - krg_nodes_destroy(status); - return r; - r = krg_cluster_start(nodes); - - krg_nodes_destroy(status); - krg_node_set_destroy(nodes); - - return r; -} - -int krg_cluster_wait_for_start(void) -{ - return call_kerrighed_services(KSYS_HOTPLUG_WAIT_FOR_START, NULL); -} - int krg_node_ready(int setup_ok) { return call_kerrighed_services(KSYS_HOTPLUG_READY, commit 097206745a62011ac2149286ea2951787ed86f91 Author: Jean Parpaillon <jea...@ke...> Date: Tue May 4 19:05:52 2010 +0200 [man] Update krgadm manpage diff --git a/man/krgadm.1.xml b/man/krgadm.1.xml index 99b6c7d..dad5094 100644 --- a/man/krgadm.1.xml +++ b/man/krgadm.1.xml @@ -19,7 +19,6 @@ <arg choice="plain">--help</arg> </group> <group choice="opt" > - <arg choice="plain">-v</arg> <arg choice="plain">--version</arg> </group> </cmdsynopsis> @@ -27,9 +26,7 @@ <command>krgadm</command> <arg choice="plain" >cluster</arg> <group choice="req" > - <arg choice="plain">start</arg> <arg choice="plain">status</arg> - <arg choice="plain">wait_start</arg> <arg choice="plain">poweroff</arg> <arg choice="plain">reboot</arg> </group> @@ -37,10 +34,13 @@ <cmdsynopsis> <command>krgadm</command> <arg choice="plain">nodes status</arg> - <group choice="opt" > - <arg choice="plain" >-n</arg> - <arg choice="plain" >--nodes <replaceable>node_list</replaceable></arg> - </group> + <arg choice="opt" > + <group choice="plain" > + <arg choice="plain" >-n</arg> + <arg choice="plain" >--nodes</arg> + </group> + <replaceable>node_list</replaceable> + </arg> </cmdsynopsis> <cmdsynopsis> <command>krgadm</command> @@ -49,14 +49,27 @@ <arg choice="plain">add</arg> <arg choice="plain">del</arg> </group> - <group choice="opt" > - <arg choice="plain" >-n</arg> - <arg choice="plain" >--nodes <replaceable>node_list</replaceable></arg> - </group> - <group choice="opt" > - <arg choice="plain" >-c</arg> - <arg choice="plain" >--count <replaceable>node_count</replaceable></arg> - </group> + <arg choice="opt" > + <group choice="plain" > + <arg choice="plain" >-n</arg> + <arg choice="plain" >--nodes</arg> + </group> + <replaceable>node_list</replaceable> + </arg> + <arg choice="opt" > + <group choice="plain" > + <arg choice="plain" >-c</arg> + <arg choice="plain" >--count</arg> + </group> + <replaceable>node_count</replaceable> + </arg> + <arg choice="opt" > + <group choice="plain" > + <arg choice="plain" >-t</arg> + <arg choice="plain" >--total</arg> + </group> + <replaceable>node_count</replaceable> + </arg> <group choice="opt" > <arg choice="plain" >-a</arg> <arg choice="plain" >--all</arg> @@ -67,13 +80,13 @@ <refsect1> <title>Description</title> <para> - <command>krgadm</command> allows the user to manage a Kerrighed - cluster by starting or stopping the cluster. + <command>krgadm</command> allows the user to manage Kerrighed + nodes. </para> - + <para> - Each <command>krgadm</command> invocation is followed by a command and some options - relative to this mode. + Each <command>krgadm</command> invocation is followed by a + command and some options relative to this mode. </para> </refsect1> @@ -89,7 +102,6 @@ </listitem> </varlistentry> <varlistentry> - <term>-v</term> <term>--version</term> <listitem> <para>Print version informations and exit</para> @@ -124,28 +136,12 @@ <para> <variablelist> <varlistentry> - <term> - <arg choice="plain" >start</arg> - </term> - <listitem> - <para> - Start the cluster on the current node. - </para> - </listitem> - </varlistentry> - <varlistentry> <term>status</term> <listitem> <para>Print cluster status</para> </listitem> </varlistentry> <varlistentry> - <term>wait_start</term> - <listitem> - <para>Return once cluster is started</para> - </listitem> - </varlistentry> - <varlistentry> <term>poweroff</term> <listitem> <para>Power off all nodes belonging to the cluster</para> @@ -193,6 +189,10 @@ <arg choice="plain" >--count <replaceable>node_count</replaceable></arg> </group> <group choice="opt" > + <arg choice="plain" >-t</arg> + <arg choice="plain" >--total <replaceable>node_count</replaceable></arg> + </group> + <group choice="opt" > <arg choice="plain" >-a</arg> <arg choice="plain" >--all</arg> </group> @@ -212,12 +212,20 @@ them to the running cluster. </para> <para> + With the <arg choice="plain" >--total</arg> option, add + enough nodes to get the given number of nodes in the + resulting cluster. Wait for nodes to be present if + necessary. + </para> + <para> With the <arg choice="plain" >--all</arg> option, add all the available node (state present) to the running cluster. </para> <para> - One of the options <arg choice="plain" >--nodes</arg>, <arg choice="plain" >--count</arg> + One and only one of the + options <arg choice="plain">--nodes</arg>, <arg choice="plain">--count</arg>, + <arg choice="plain">--total</arg> or <arg choice="plain" >--all</arg> must be used. </para> </listitem> @@ -234,6 +242,10 @@ <arg choice="plain" >--count <replaceable>node_count</replaceable></arg> </group> <group choice="opt" > + <arg choice="plain" >-t</arg> + <arg choice="plain" >--total <replaceable>node_count</replaceable></arg> + </group> + <group choice="opt" > <arg choice="plain" >-a</arg> <arg choice="plain" >--all</arg> </group> @@ -253,11 +265,17 @@ if there are no such nodes. </para> <para> + With the <arg choice="plain" >--total</arg> option, + remove enough nodes to get given number of nodes in the + resulting cluster. Fail if there are no such nodes. + </para> + <para> With the <arg choice="plain" >--all</arg> option, remove all nodes of the cluster, except current one. </para> <para> - One of the options <arg choice="plain" >--nodes</arg>, <arg choice="plain" >--count</arg> + One and only one of the + options <arg choice="plain">--nodes</arg>, <arg choice="plain">--count</arg>, <arg choice="plain">--total</arg> or <arg choice="plain" >--all</arg> must be used. </para> </listitem> commit e6e9ba3f50e5577bfde30b09bba4bc3db540cb83 Author: Jean Parpaillon <jea...@ke...> Date: Tue May 4 18:58:39 2010 +0200 [tools] Update krgadm bash completion diff --git a/tools/kerrighed.completion b/tools/kerrighed.completion index 30bf8bc..53e3368 100644 --- a/tools/kerrighed.completion +++ b/tools/kerrighed.completion @@ -59,11 +59,11 @@ _krgadm() local cur=$2 prev=$3 local modes='cluster nodes' - local cluster_actions='status start wait_start poweroff reboot' + local cluster_actions='status poweroff reboot' local nodes_actions='status add del' - local nodes_status_opts='-n --nodes' - local nodes_opts='-n --nodes -c --count -a --all' - local options='--help -h' + local nodes_status_opts='-n --nodes -a --all' + local nodes_opts='-n --nodes -c --count -t --total -a --all' + local options='--help -h --version' COMPREPLY=() @@ -87,8 +87,16 @@ _krgadm() return 0 ;; -n|--nodes) - _nodes 'possible' - return 0 + case "${COMP_WORDS[COMP_CWORD-2]}" in + "add"|"status") + _nodes 'possible' + return 0 + ;; + "del") + _nodes 'online' + return 0 + ;; + esac ;; *) case "${COMP_WORDS[1]}" in @@ -98,18 +106,12 @@ _krgadm() nodes) return 0 ;; + *) + COMPREPLY=( $(compgen -W "${options} ${modes}" -- ${cur} ) ) esac ;; esac - if [[ "${cur}" == -* ]]; then - # return one of the possible options - COMPREPLY=( $(compgen -W "${options}" -- ${cur} ) ) - else - # return one of the possible modes - COMPREPLY=( $(compgen -W "${modes}" -- ${cur}) ) - fi - return 0 } [ -n "${have:-}" ] && complete -F _krgadm krgadm commit a837fbe063d648496bb52913d3855d517a0abf38 Author: Jean Parpaillon <jea...@ke...> Date: Tue May 4 18:37:22 2010 +0200 [tools] Remove wait_start command diff --git a/tools/krgadm.c b/tools/krgadm.c index 587dc2b..6e28790 100644 --- a/tools/krgadm.c +++ b/tools/krgadm.c @@ -16,7 +16,6 @@ enum { NONE, STATUS, - WAIT_START, ADD, DEL, POWEROFF, @@ -64,14 +63,13 @@ void help(char * program_name) { printf("\ Usage: %s [-h|--help] [--version]\n\ - or: %s cluster {status|wait_start|poweroff|reboot}\n\ + or: %s cluster {status|poweroff|reboot}\n\ or: %s nodes status [-n|--nodes]\n\ or: %s nodes {add|del} {(-n|--nodes node_list) | (-c|--count node_count) | (-t|--total node_count) |(-a|--all)}\n", program_name, program_name, program_name, program_name); printf("\n\ Cluster Mode:\n\ status print cluster status\n\ - wait_start return when cluster is started\n\ poweroff poweroff all nodes in the cluster\n\ reboot restart all nodes in the cluster\n\ \n\ @@ -325,7 +323,7 @@ int nodes_status(struct krg_node_set* node_set, enum mode_t mode) perror("Error adding nodes"); return -1; } - + if (mode == NODES_MODE_ALL) { /* Add all nodes with status PRESENT or ONLINE */ node_set = krg_node_set_create(); @@ -545,8 +543,6 @@ int cluster(int argc, char* argv[], char* program_name) if(argc == 0 || ! strcmp(*argv, "status")) action = STATUS; - else if(! strcmp(*argv, "wait_start")) - action = WAIT_START; else if(! strcmp(*argv, "poweroff")) action = POWEROFF; else if(! strcmp(*argv, "reboot")) @@ -568,16 +564,6 @@ int cluster(int argc, char* argv[], char* program_name) printf("up on %d nodes\n", r); } break; - case WAIT_START: - printf("Waiting for cluster to start... "); - fflush(stdout); - r = krg_cluster_wait_for_start(); - if (r == -1) { - printf("fail (%s)\n", strerror(errno)); - ret = EXIT_FAILURE; - } else - printf("done\n"); - break; case POWEROFF: printf("Shutting down cluster... "); fflush(stdout); commit 60a45f10a90c775b09c4c1175737c7d13b1d808f Author: Jean Parpaillon <jea...@ke...> Date: Tue May 4 17:55:12 2010 +0200 [tools] Add --total option to krgadm --total option allow to add/remove nodes giving resulting wanted cluster diff --git a/tools/krgadm.c b/tools/krgadm.c index 6f47c6f..587dc2b 100644 --- a/tools/krgadm.c +++ b/tools/krgadm.c @@ -23,10 +23,12 @@ enum { REBOOT, }; -enum { - NB_NODES_UNSET = -2, - NB_NODES_ALL = -1, - NB_NODES_LIST = 0, +enum mode_t { + NODES_MODE_UNSET, + NODES_MODE_ALL, + NODES_MODE_COUNT, + NODES_MODE_TOTAL, + NODES_MODE_LIST, }; #define NODE_SEP ',' @@ -34,11 +36,16 @@ enum { #define POLL_NODES 1 #define NODES_OPTION "nodes", required_argument, NULL, 'n' #define COUNT_OPTION "count", required_argument, NULL, 'c' +#define TOTAL_OPTION "total", required_argument, NULL, 't' #define ALL_OPTION "all", no_argument, NULL, 'a' +#define MSG_EXCLUSIVE_OPTIONS "Only one of --all, --count, --total or --nodes option is\n\ +supported. Aborting.\n" + static struct option nodes_mode_options[] = { {NODES_OPTION}, {COUNT_OPTION}, + {TOTAL_OPTION}, {ALL_OPTION}, {NULL, 0, NULL, 0} }; @@ -59,7 +66,7 @@ void help(char * program_name) Usage: %s [-h|--help] [--version]\n\ or: %s cluster {status|wait_start|poweroff|reboot}\n\ or: %s nodes status [-n|--nodes]\n\ - or: %s nodes {add|del} {(-n|--nodes node_list) | (-c|--count node_count) | (-a|--all)}\n", + or: %s nodes {add|del} {(-n|--nodes node_list) | (-c|--count node_count) | (-t|--total node_count) |(-a|--all)}\n", program_name, program_name, program_name, program_name); printf("\n\ Cluster Mode:\n\ @@ -74,9 +81,10 @@ Nodes Mode:\n\ del remove nodes from the running cluster\n\ \n\ Options:\n\ - -n, --nodes list of nodes to apply action to\n\ + -n, --nodes list of nodes to add/del\n\ ie: 2,3,6-10,42-45\n\ - -c, --count number of nodes to apply action to\n\ + -c, --count number of nodes to add/del\n\ + -t, --total number of nodes in resulting cluster\n\ -a, --all apply to all nodes\n\ \n\ Node Status:\n\ @@ -192,8 +200,11 @@ int wait_for_nodes_count(int i, struct krg_node_set* node_set) int cur, r = 0; int nodes_count; - printf("Waiting for %d nodes to join... ", i); - fflush(stdout); + if (i > 0) { + printf("Waiting for %d nodes to join... ", i); + fflush(stdout); + } else + return 0; if (i < 1 || i > kerrighed_max_nodes) { r = -1; @@ -249,8 +260,11 @@ int wait_for_nodes(struct krg_node_set* node_set) struct krg_nodes* status; int bcl, r = 0, done, node_count; - printf("Waiting for nodes to join... "); - fflush(stdout); + if (krg_node_set_weight(node_set) > 0) { + printf("Waiting for nodes to join... "); + fflush(stdout); + } else + return 0; node_count = krg_node_set_weight(node_set); do { @@ -285,7 +299,7 @@ int wait_for_nodes(struct krg_node_set* node_set) } while (! done); exit: - if (r == 1) + if (r == 0) printf(" done\n"); else printf(" fail (%s)\n", strerror(errno)); @@ -296,11 +310,11 @@ exit: /* * nodes_status * - * Print status of nodes in node_set, or all nodes if nb_nodes == -1 + * Print status of nodes in node_set, or all nodes if mode == NODES_MODE_ALL * * Return 0 on success, -1 on failure */ -int nodes_status(struct krg_node_set* node_set, int nb_nodes) +int nodes_status(struct krg_node_set* node_set, enum mode_t mode) { struct krg_nodes* status; int bcl, node; @@ -312,8 +326,8 @@ int nodes_status(struct krg_node_set* node_set, int nb_nodes) return -1; } - if (nb_nodes == -1) { - /* If not specified add all nodes with status PRESENT or ONLINE */ + if (mode == NODES_MODE_ALL) { + /* Add all nodes with status PRESENT or ONLINE */ node_set = krg_node_set_create(); for (bcl = 0; bcl < kerrighed_max_nodes; bcl++) { if (status->nodes[bcl] > HOTPLUG_NODE_POSSIBLE) @@ -340,16 +354,18 @@ int nodes_status(struct krg_node_set* node_set, int nb_nodes) /* * nodes_add * - * If nb_nodes == NB_NODES_ALL, add all PRESENT nodes - * If nb_nodes == NB_NODES_LIST, add nodes in node_set - * If nb_nodes > 0, wait for nb_nodes nodes to be PRESENT, then add them + * If mode == NODES_MODE_ALL, add all PRESENT nodes + * If mode == NODES_MODE_LIST, add nodes in node_set + * If mode == NODES_MODE_COUNT, wait for n nodes to be PRESENT, then add them + * If mode == NODES_MODE_TOTAL, wait for n nodes to be PRESENT or ONLINE, + * then add PRESENT nodes. * * Return 0 on success, -1 on failure */ -int nodes_add(struct krg_node_set* node_set, int nb_nodes) +int nodes_add(struct krg_node_set* node_set, int n, enum mode_t mode) { struct krg_nodes* status; - int r = 0; + int node, r = 0; status = krg_nodes_status(); if (! status) { @@ -357,8 +373,8 @@ int nodes_add(struct krg_node_set* node_set, int nb_nodes) return -1; } - switch (nb_nodes) { - case NB_NODES_ALL: + switch (mode) { + case NODES_MODE_ALL: /* add all PRESENT nodes */ node_set = krg_nodes_get_present(status); if (! node_set) { @@ -368,18 +384,27 @@ int nodes_add(struct krg_node_set* node_set, int nb_nodes) return -1; } break; - case NB_NODES_LIST: + case NODES_MODE_LIST: + /* Remove online nodes from node_set */ + node = krg_node_set_next(node_set, -1); + while (node != -1) { + if (krg_nodes_is_online(status, node)) + krg_node_set_remove(node_set, node); + node = krg_node_set_next(node_set, node); + } + if (wait_for_nodes(node_set) == -1) return -1; break; - default: - /* If 'count' specified, wait for nodes to be present */ - if (nb_nodes < 1) - return -1; - + case NODES_MODE_TOTAL: + n -= krg_nodes_num_online(status); + case NODES_MODE_COUNT: node_set = krg_node_set_create(); - if (wait_for_nodes_count(nb_nodes, node_set) == -1) + if (wait_for_nodes_count(n, node_set) == -1) return -1; + break; + default: + return -1; } if (krg_node_set_weight(node_set) > 0) { @@ -398,13 +423,14 @@ int nodes_add(struct krg_node_set* node_set, int nb_nodes) /* * nodes_remove * - * If nb_nodes == NB_NODES_ALL, remove all ONLINE nodes except current one - * If nb_nodes == NB_NODES_LIST, remove nodes in node_set - * If nb_nodes > 0, remove nb_nodes ONLINE nodes + * If mode == NODES_MODE_ALL, remove all PRESENT nodes except current one + * If mode == NODES_MODE_LIST, remove nodes in node_set + * If mode == NODES_MODE_COUNT, remove n ONLINE nodes + * If mode == NODES_MODE_TOTAL, remove enough nodes for the cluster to contains n nodes * * Return 0 on success, -1 on failure */ -int nodes_remove(struct krg_node_set* node_set, int nb_nodes) +int nodes_remove(struct krg_node_set* node_set, int n, enum mode_t mode) { struct krg_nodes* status; int bcl, node, r = 0; @@ -415,15 +441,17 @@ int nodes_remove(struct krg_node_set* node_set, int nb_nodes) return -1; } - if (nb_nodes == NB_NODES_ALL) { + switch (mode) { + case NODES_MODE_ALL: /* remove all nodes except current */ node_set = krg_node_set_create(); for (bcl = 0; bcl < kerrighed_max_nodes; bcl++) { if (krg_nodes_is_online(status, bcl) && get_node_id() != bcl) krg_node_set_add(node_set, bcl); } - } else if (nb_nodes == NB_NODES_LIST) { - /* If list of nodes specified, check they are 'online', and not the current one */ + break; + case NODES_MODE_LIST: + /* check given nodes are 'online', and not the current one */ node = krg_node_set_next(node_set, -1); while (node != -1) { if (! krg_nodes_is_online(status, node)) { @@ -435,14 +463,17 @@ int nodes_remove(struct krg_node_set* node_set, int nb_nodes) } node = krg_node_set_next(node_set, node); } - } else if (nb_nodes > 0) { - /* If 'count' specified, remove 'nb_nodes' first online nodes */ + break; + case NODES_MODE_TOTAL: + n = krg_nodes_num_online(status) - n; + case NODES_MODE_COUNT: + /* remove 'n' first online nodes */ node_set = krg_nodes_get_online(status); - if (nb_nodes < krg_node_set_weight(node_set)) { + if (n < krg_node_set_weight(node_set)) { bcl = 0; node = krg_node_set_next(node_set, -1); while (node != -1) { - if (bcl < nb_nodes) + if (bcl < n) if (get_node_id() == node) krg_node_set_remove(node_set, node); else @@ -452,11 +483,13 @@ int nodes_remove(struct krg_node_set* node_set, int nb_nodes) node = krg_node_set_next(node_set, node); } } else { - printf("Can not remove so much nodes. Aborting.\n"); + printf("Not enough nodes to remove. Aborting.\n"); return -1; } - } else + break; + default: return -1; + } if (krg_node_set_weight(node_set) > 0) { printf("Removing nodes %s... ", node_set_str(node_set)); @@ -590,7 +623,8 @@ int nodes(int argc, char* argv[], char* program_name) struct krg_node_set* node_set = NULL; char* endptr; int c, option_index; - int nb_nodes = NB_NODES_UNSET; + enum mode_t mode = NODES_MODE_UNSET; + int nb_nodes = -1; int action = NONE; if ( krg_check_hotplug() ) { @@ -607,27 +641,29 @@ int nodes(int argc, char* argv[], char* program_name) else if(! strcmp(*argv, "del")) action = DEL; - while ((c = getopt_long(argc, argv, "n:c:a", + while ((c = getopt_long(argc, argv, "n:c:t:a", nodes_mode_options, &option_index)) != -1) { - switch (c) { - case 'n': - if (nb_nodes != NB_NODES_UNSET) { - printf("--nodes, --count and --all are mutually exclusive. Aborting.\n"); + if ( 'n' == c ) { + if (mode != NODES_MODE_UNSET) { + printf(MSG_EXCLUSIVE_OPTIONS); return EXIT_FAILURE; } + mode = NODES_MODE_LIST; - nb_nodes = NB_NODES_LIST; node_set = krg_node_set_create(); if (! node_set) return EXIT_FAILURE; if (parse_nodes(optarg, node_set) == -1) return EXIT_FAILURE; - break; - case 'c': - if (nb_nodes != NB_NODES_UNSET) { - printf("--nodes, --count and --all are mutually exclusive. Aborting.\n"); + } else if ( 'c' == c || 't' == c ) { + if (mode != NODES_MODE_UNSET) { + printf(MSG_EXCLUSIVE_OPTIONS); return EXIT_FAILURE; } + if ( 'c' == c ) + mode = NODES_MODE_COUNT; + else + mode = NODES_MODE_TOTAL; if (action == STATUS) { help(program_name); @@ -639,39 +675,37 @@ int nodes(int argc, char* argv[], char* program_name) perror("nodes number"); return EXIT_FAILURE; } - break; - case 'a': - if (nb_nodes != NB_NODES_UNSET) { - printf("--nodes, --count and --all are mutually exclusive. Aborting.\n"); + } else if ( 'a' == c ) { + if (mode != NODES_MODE_UNSET) { + printf(MSG_EXCLUSIVE_OPTIONS); return EXIT_FAILURE; } - nb_nodes = NB_NODES_ALL; - break; - default: + mode = NODES_MODE_ALL; + } else { help(program_name); return EXIT_FAILURE; } } - if (action == STATUS && nb_nodes == NB_NODES_UNSET) - nb_nodes = NB_NODES_ALL; - - if (nb_nodes == NB_NODES_UNSET) { + if ( (action == ADD || action == DEL) && mode == NODES_MODE_UNSET ) { + /* ADD and DEL actions requires a mode */ help(program_name); return EXIT_FAILURE; } switch (action) { case STATUS: - if (nodes_status(node_set, nb_nodes) == -1) + if (mode == NODES_MODE_UNSET) + mode = NODES_MODE_ALL; + if (nodes_status(node_set, mode) == -1) return EXIT_FAILURE; break; case ADD: - if (nodes_add(node_set, nb_nodes) == -1) + if (nodes_add(node_set, nb_nodes, mode) == -1) return EXIT_FAILURE; break; case DEL: - if (nodes_remove(node_set, nb_nodes) == -1) + if (nodes_remove(node_set, nb_nodes, mode) == -1) return EXIT_FAILURE; break; default: commit a05c680e72321c4050d95bab90189f71e405eec6 Author: Jean Parpaillon <jea...@ke...> Date: Tue May 4 11:21:33 2010 +0200 [tools] Remove start command from krgadm diff --git a/tools/krgadm.c b/tools/krgadm.c index a99f43c..6f47c6f 100644 --- a/tools/krgadm.c +++ b/tools/krgadm.c @@ -16,7 +16,6 @@ enum { NONE, STATUS, - START, WAIT_START, ADD, DEL, @@ -58,13 +57,12 @@ void help(char * program_name) { printf("\ Usage: %s [-h|--help] [--version]\n\ - or: %s cluster {start|status|wait_start|poweroff|reboot}\n\ + or: %s cluster {status|wait_start|poweroff|reboot}\n\ or: %s nodes status [-n|--nodes]\n\ or: %s nodes {add|del} {(-n|--nodes node_list) | (-c|--count node_count) | (-a|--all)}\n", program_name, program_name, program_name, program_name); printf("\n\ Cluster Mode:\n\ - start start the cluster\n\ status print cluster status\n\ wait_start return when cluster is started\n\ poweroff poweroff all nodes in the cluster\n\ @@ -497,38 +495,6 @@ exit: } /* - * Return 0 on success, -1 on failure - */ -int cluster_start(void) -{ - struct krg_node_set* node_set; - int ret = 0; - - if (cluster_status() > 0) { - errno = EALREADY; - fprintf(stderr, "Kerrighed is already running.\n"); - return -1; - } - - node_set = krg_node_set_create(); - if (! node_set) - return -1; - - /* Start cluster with current node */ - krg_node_set_add(node_set, get_node_id()); - - printf("Starting cluster... "); - fflush(stdout); - if (krg_cluster_start(node_set) == -1) { - printf("fail (%s)\n", strerror(errno)); - ret = -1; - } else - printf("done\n"); - - return ret; -} - -/* * Return EXIT_SUCCESS on success, EXIT_FAILURE on failure. */ int cluster(int argc, char* argv[], char* program_name) @@ -546,8 +512,6 @@ int cluster(int argc, char* argv[], char* program_name) if(argc == 0 || ! strcmp(*argv, "status")) action = STATUS; - else if(! strcmp(*argv, "start")) - action = START; else if(! strcmp(*argv, "wait_start")) action = WAIT_START; else if(! strcmp(*argv, "poweroff")) @@ -571,11 +535,6 @@ int cluster(int argc, char* argv[], char* program_name) printf("up on %d nodes\n", r); } break; - case START: - r = cluster_start(); - if (r == -1) - ret = EXIT_FAILURE; - break; case WAIT_START: printf("Waiting for cluster to start... "); fflush(stdout); commit 596d2e6fabad5fad30a97208e805b6aba5527e5a Merge: 20b72c5 86082d9 Author: Jean Parpaillon <jea...@ke...> Date: Fri May 7 17:39:53 2010 +0200 Merge branch 'master' of ssh://git.kerlabs.com/git/interne/kerrighed-tools commit 20b72c5712553a4915e23ff71d28183594828c58 Author: Jean Parpaillon <jea...@ke...> Date: Fri May 7 09:47:36 2010 +0200 Update ChangeLog diff --git a/ChangeLog b/ChangeLog index 65757dc..a6da7a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * [kernel] Port to linux 2.6.30 Features: Checkpoint/restart * Add various options to checkpoint and restart commit 30b090c71a3a822cd6c834d5101c1cedc86ad702 Author: Jean Parpaillon <jea...@ke...> Date: Wed May 5 17:24:39 2010 +0200 Update INSTALL file diff --git a/INSTALL b/INSTALL index 3b88316..ce841be 100644 --- a/INSTALL +++ b/INSTALL @@ -9,14 +9,19 @@ Table of contents ================= 1/ Pre-requisites -2/ Quick install -3/ Detailed configuration -3.1/ Generic configure options +2/ Quick Install +3/ Detailed Configuration +3.1/ Generic Configure Options 3.2/ Installation Names 3.3/ Operation Controls -3.4/ Specific configure options -3.5/ Build from outside of source dir +3.4/ Specific Configure Options +3.5/ Build from Outside of Source Dir +3.6/ Developer Tips +3.7/ Kernel Options Hints 4/ Starting Kerrighed +4.1/ New Kerrighed Architecture +4.2/ Quick Setup +4.3/ Kernel Configuration 1/ Pre-requisites ================= @@ -36,33 +41,54 @@ Table of contents Optional features requires the following: -- xsltproc : allow to create documentation in various formats (only needed by - maintainer. -- Python (>= 2.5) : Python interface is provided to libkerrighed (hotplug part) +- xsltproc : allow to create documentation in various formats (only needed by + maintainer). +- Python (>= 2.5) : to allow installation of the libkerrighed Python wrapper. 2/ Quick install ================ -Type the following in the base directory of the Kerrighed -distribution: +- Let's say this tarball have been uncompressed in '/usr/src/kerrighed-src' + +- Optionally, download linux-2.6.30 sources tarball into + '/usr/src'. If not 'configure' script will do it for you each and + every time. + +- Configure the sources: + % cd /usr/src/kerrighed-src && ./configure --sysconfdir=/etc + +- Configure the kernel. `./configure' setup the kernel with a default + configuration which may not suit your need but gives you a running + Kerrighed configuration. + + `configure' --with-kernel-* options can be given to configure kernel + sources, either with a `.config' file either with one of kernel's + *config targets. + + Type `./configure --help' for possible options. - % ./configure - % make - % make install + For some hints on kernel options, have a look at 'Kernel options' + section below. -3/ Detailed configuration +- Build the sources: + % make + +- Install all, as user root: + % make install + +3/ Detailed Configuration ========================= Kerrighed is made of several parts which can be built and installed -independently: + independently: -- kerrighed kernel (modified Linux kernel) -- libs -- tools -- scripts -- tests + - kerrighed kernel (modified Linux kernel) + - libs + - tools + - scripts + - tests -3.1/ Generic configure options +3.1/ Generic Configure Options ============================== The `configure' shell script attempts to guess correct values for @@ -70,8 +96,8 @@ various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up +you can run in the future to recreate the current configuration, a +file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). @@ -120,7 +146,13 @@ operates. Print the version of Autoconf used to generate the `configure' script, and exit. -3.4/ Specific configure options +`--enable-silent-rules' + Less verbose build output (undo: `make V=1') + +`--disable-silent-rules' + verbose build output (undo: `make V=0') + +3.4/ Specific Configure Options ===================================== Following options can be passed to the configure script: @@ -130,7 +162,8 @@ operates. --disable-libkerrighed Disable libkerrighed [default=enable] --disable-python Disable Python code [default=enable] --disable-tools Disable tools [default=enable] - --enable-host-tools Enable Kerrighed host service [default=disable] + --disable-host-tools Disable Kerrighed host service [default=enable] + --enable-preserve-conf Preserve configuration files if exist [default=disable] --enable-tests Globally enable tests [default=disable] --disable-tests-ktp Disable 'ktp' tests --disable-tests-apps Disable 'apps' tests @@ -149,10 +182,119 @@ operates. [default=none] --with-ltp-base Path to ltp base dir [default=DATAROOTDIR/ltp] -3.5/ Build from outside of source tree +3.5/ Build From Outside of Source Tree ====================================== Compilation and installation can be done from outside of source dir. - Just create a new directory where you want to build and cd into it. Call - configure script from this dir. - All make targets can be used as usual. + Just create a new directory where you want to build and cd into + it. Call configure script from this dir. All make targets can be + used as usual. + +3.6/ Developer Tips +=================== + +Kernel source dir is '_kernel'. If not present, 'configure' script +creates it from Linux vanilla sources and the kerrighed patch. If +present when running 'configure', this dir will be used as is. + +3.7/ Kernel Options Hints +=========================== + +If you want to edit kernel options, note that the following are +currently *broken* with Kerrighed: + + - Processor type and features -> Preemption Model -> Voluntary + Kernel Preemption (CONFIG_PREEMPT_NONE=y, + CONFIG_PREEMPT_VOLUNTARY=n, CONFIG_PREEMPT=n) + - Exectuble file formats / Emulations -> IA32 Emulation (CONFIG_IA32_EMULATION) + - Security options -> Enable access key retention support (CONFIG_KEYS=n) + +4/ Starting Kerrighed +===================== + +4.1/ New Kerrighed Architecture +=============================== + +Kerrighed is now isolated inside a Linux container on all nodes. For +information about Linux containers, please refer to technical articles +available on the web, for instance from [1]. + +These changes the way userspace has to setup and start a +cluster. + +In a few words, each Kerrighed node starts a 'root' container in which +only local resources are available. To access resources globally, one +must start the Kerrighed container on one node then add other nodes in +the Kerrighed container. + +4.2/ Quick Setup +================ + +As many different use cases are possible with this new architecture, +we define the default one as: + +- the root container and the Kerrighed container are running on the + same filesystem, + +- the root container runs a complete distribution, + +- the Kerrighed container runs sshd on a non-standard port (2222) to + allow user login. + + Note: for root container sshd on port 2222 and Kerrighed container + sshd on (standard) port 22, edit respectively files `/etc/default/ssh' + and `/etc/kerrighed/krginit_helper.conf'. + +- we know the number of nodes we want to start on boot and their + respective node_id. + +Now, we suppose you followed instructions in section 2 'Quick +Installation'. + +- Edit `/etc/default/kerrighed-host'. + Set BOOT_ID to the node_id of the node starting the container. + +- Edit `/etc/default/kerrighed'. + Set ADD_OPTS to "--total N" where N is the number of nodes you want + in the cluster at boot time. You will be able to add other nodes + later if you want with the krgadm(1) tool. + +- Add `kerrighed-host' init script to your default runlevel. + On Debian system, this can be done with: + + % update-rc.d kerrighed-host defaults 99 + +4.3/ Kernel Configuration +========================= + +The Kerrighed kernel is configured through kernel boot parameters. + +- session_id=X + + The session_id contains identifier of the cluster. When several + Kerrighed clusters have to share the same ethernet switch, each + cluster should define a different session identifier to avoid + collisions. + + A session identifier is a simple integer. Valid range is + 1..9999. + + This parameter is mandatory. + +- node_id=X + + The node_id contains identifier of the node. It is an integer. It + must be unique over the Kerrighed cluster. Valid range is 0..255. + + Unless autonodeid is activated, this parameter is mandatory. + +- autonodeid=0|1 + + When autonodeid value is 1, node_id is the last digit of the IP + address. This requires the NIC driver to be compiled into the kernel + and IP address to be set really early, either by DHCP or as kernel + boot parameters (see bootparam(7)). + + Default is 1 (activated). + +[1] http://lxc.sf.net commit 5dbf3667b7f3a4b88f726e777801468bb148d73f Author: Jean Parpaillon <jea...@ke...> Date: Wed May 5 17:24:10 2010 +0200 [man] Remove kerrighed_nodes file mentions diff --git a/man/Makefile.am b/man/Makefile.am index 4447afa..36de3b1 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -9,7 +9,6 @@ man_MANS = \ krgadm.1 \ kerrighed.7 \ - kerrighed_nodes.5 \ kerrighed_capabilities.7 \ krgcapset.1 \ krgcapset.2 \ diff --git a/man/kerrighed.7.xml b/man/kerrighed.7.xml index 87db893..66deb40 100644 --- a/man/kerrighed.7.xml +++ b/man/kerrighed.7.xml @@ -95,9 +95,7 @@ <refsect1> <title>Configuration</title> <para> - Kerrighed kernel can be setup - with <filename>/etc/kerrighed_nodes</filename>(5) or with kernel - boot parameters. + Kerrighed kernel is setup through boot parameters. </para> <refsect2> @@ -116,9 +114,7 @@ Valid range is 1..9999. </para> <para> - This parameter is mandatory, unless specified - through <filename>/etc/kerrighed_nodes</filename>(5). There - is no default. + This parameter is mandatory. </para> </listitem> </varlistentry> @@ -132,9 +128,8 @@ Valid range is 0..255. </para> <para> - Unless <varname>autonodeid</varname> is activated or - <filename>/etc/kerrighed_nodes</filename>(5) file is complete, - this parameter is mandatory. + Unless <varname>autonodeid</varname> is activated this + parameter is mandatory. </para> </listitem> </varlistentry> @@ -154,21 +149,6 @@ </para> </listitem> </varlistentry> - <varlistentry> - <term>nb_nodes_min=N</term> - <listitem> - <para> - The <varname>nb_nodes_min</varname> controls the - autostart feature of Kerrighed. If set to an integer, - kernel waits for this amount of nodes to be present - before starting Kerrighed cluster. - </para> - <para> - If not specified, Kerrighed cluster is not started - automatically. - </para> - </listitem> - </varlistentry> </variablelist> </para> </refsect2> @@ -187,7 +167,6 @@ <refsect1> <title>See also</title> <para> - <ulink url="kerrighed_nodes.5.html" ><command>kerrighed_nodes</command> (5)</ulink>, <ulink url="kerrighed_capabilities.7.html" ><command>kerrighed_capabilities</command> (7)</ulink>, <ulink url="migrate.1.html" ><command>migrate</command> (1)</ulink>, <ulink url="krgcapset.1.html" ><command>krgcapset</command> (1)</ulink>, diff --git a/man/kerrighed_capabilities.7.xml b/man/kerrighed_capabilities.7.xml index 8f5d3dc..e4de5d6 100644 --- a/man/kerrighed_capabilities.7.xml +++ b/man/kerrighed_capabilities.7.xml @@ -143,23 +143,6 @@ </refsect2> </refsect1> - - <refsect1> - <title>Files</title> - <para> - <variablelist> - <varlistentry> - <term><filename>/etc/kerrighed_nodes</filename></term> - <listitem> - <para> - This file contains the list of nodes used in the Kerrighed cluster. See - <command>kerrighed_nodes</command>(5) for further details. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> <refsect1> <title>Author</title> diff --git a/man/kerrighed_nodes.5.xml b/man/kerrighed_nodes.5.xml deleted file mode 100644 index 4d8943d..0000000 --- a/man/kerrighed_nodes.5.xml +++ /dev/null @@ -1,85 +0,0 @@ -<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" -"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> - -<refentry id='kerrighed_nodes.5'> - <refmeta> - <refentrytitle>kerrighed_nodes</refentrytitle> - <manvolnum>5</manvolnum> - </refmeta> - - <refnamediv> - <refname>kerrighed_nodes </refname> - <refpurpose>File hosting nodes list and session number of a Kerrighed cluster.</refpurpose> - </refnamediv> - - - <refsect1> - <title>Description</title> - <para> - The <filename>/etc/kerrighed_nodes</filename> file contains the list of nodes belonging - to the Kerrighed cluster. Each node name is on a separate line and is followed by - the logical node number and the name of the network device to - use for Kerrighed communications. - </para> - <para> - The <varname>session</varname> field contains identifier of the - cluster. When several Kerrighed clusters have to share the same - Ethernet switch, each cluster should define a different session - identifier to avoid collisions. A session identifier is a simple - integer. - </para> - <para> - The <varname>nbmin</varname> field is used to define the number - of nodes to be automatically started when a Kerrighed cluster is - booting. This field is optional. When this field is set, the use - of the <command>krgadm</command> is not needed any more. During - the boot phase of cluster nodes when the kerrighed module is - loaded, Kerrighed waits for "nbmin" nodes to be up. Then the - required number of nodes are up, Kerrighed is automatically - started. - </para> - <para> - </para> - <example> - <title><filename>kerrighed_nodes</filename></title> - <programlisting> - session=1 - nbmin=4 - node1:0:eth0 - node2:1:eth0 - node3:2:eth0 - node4:3:eth0 - </programlisting> - </example> - </refsect1> - - <refsect1> - <title>Files</title> - <para> - <variablelist> - <varlistentry> - <term><filename>/etc/kerrighed_nodes</filename></term> - <listitem> - <para> - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - - <refsect1> - <title>Author</title> - <para> - Renaud Lottiaux <email>ren...@ke...</email> - </para> - </refsect1> - - <refsect1> - <title>See Also</title> - <para> - <ulink url="kerrighed_session.5.html" ><command>kerrighed_session</command> (5)</ulink>, - <ulink url="krgadm.1.html" ><command>krgadm</command> (1)</ulink> - </para> - </refsect1> -</refentry> diff --git a/man/migrate.1.xml b/man/migrate.1.xml index 35b4117..ff80878 100644 --- a/man/migrate.1.xml +++ b/man/migrate.1.xml @@ -29,23 +29,6 @@ </refsect1> <refsect1> - <title>Files</title> - <para> - <variablelist> - <varlistentry> - <term><filename>/etc/kerrighed_nodes</filename></term> - <listitem> - <para> - This file contains the list of nodes used in the Kerrighed cluster. - See <command>kerrighed_nodes</command>(5) for further details. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - - <refsect1> <title>Author</title> <para> Renaud Lottiaux <email>ren...@ke...</email> diff --git a/man/migrate.2.xml b/man/migrate.2.xml index 47eefe2..768f809 100644 --- a/man/migrate.2.xml +++ b/man/migrate.2.xml @@ -63,23 +63,6 @@ </refsect1> <refsect1> - <title>Files</title> - <para> - <variablelist> - <varlistentry> - <term><filename>/etc/kerrighed_nodes</filename></term> - <listitem> - <para> - This file contains the list of nodes used in the Kerrighed cluster. - See <command>kerrighed_nodes</command>(5) for further details. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - - <refsect1> <title>Author</title> <para> Renaud Lottiaux <email>ren...@ke...</email> diff --git a/man/migrate_self.2.xml b/man/migrate_self.2.xml index 15fd654..f51298c 100644 --- a/man/migrate_self.2.xml +++ b/man/migrate_self.2.xml @@ -56,23 +56,6 @@ </refsect1> <refsect1> - <title>Files</title> - <para> - <variablelist> - <varlistentry> - <term><filename>/etc/kerrighed_nodes</filename></term> - <listitem> - <para> - This file contains the list of nodes used in the Kerrighed cluster. See - <command>kerrighed_nodes</command>(5) for further details. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - - <refsect1> <title>Author</title> <para> Renaud Lottiaux <email>ren...@ke...</email> commit 388d87c8843c052aef2ff7e7ff60481a3bc6966c Author: Jean Parpaillon <jea...@ke...> Date: Wed May 5 12:38:12 2010 +0000 [tools] link tools and tools-host statically with libkerrighed and libkrgcb While libkerrighed API is not stable enough, static linking is more secure. diff --git a/tools-host/Makefile.am b/tools-host/Makefile.am index efccd71..0a138c0 100644 --- a/tools-host/Makefile.am +++ b/tools-host/Makefile.am @@ -11,6 +11,7 @@ sbin_PROGRAMS = krgboot INCLUDES = -I@top_srcdir@/libs/include LDADD = @top_builddir@/libs/libkerrighed/libkerrighed.la @top_builddir@/libs/libkrgcb/libkrgcb.la +AM_LDFLAGS=-Wl,--as-needed -static krgboot_SOURCES = krgboot.c diff --git a/tools/Makefile.am b/tools/Makefile.am index a3d7aad..3bddeb5 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -12,7 +12,7 @@ sbin_PROGRAMS = krgadm krginit INCLUDES = -I@top_srcdir@/libs/include LDADD = @top_builddir@/libs/libkerrighed/libkerrighed.la @top_builddir@/libs/libkrgcb/libkrgcb.la -AM_LDFLAGS = -Wl,--as-needed +AM_LDFLAGS = -Wl,--as-needed -static migrate_SOURCES = migrate.c checkpoint_SOURCES = checkpoint.c commit 0c75f669a94afd89a7c2ff258d8c383ae4dc0454 Author: Louis Rilling <lou...@ke...> Date: Thu May 6 17:16:56 2010 +0200 ChangeLog: more updates Signed-off-by: Louis Rilling <lou...@ke...> diff --git a/ChangeLog b/ChangeLog index d61095a..65757dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,22 @@ Checkpoint/restart * Add various options to checkpoint and restart * Add tools ipccheckpoint and ipcrestart to help checkpoint/restart of applications using IPC objects + Kerrighed containerization + * [kernel] Run Kerrighed in a Linux container + * New tools krgboot[_helper] and krginit[_helper] to run Kerrighed in a Linux container + * Fully automatic cluster boot + Kerrighed hotplug + * [kernel] Experimental support for adding nodes to a live cluster + * New krgadm semantics: + * kill commands 'cluster start' and 'wait_start', + * make command 'nodes add' the default way to build a cluster + + Fixes: + * [kernel] Support migration of X connections + * [kernel] Many bugfixes in socket migration + * [kernel] Support migration / remote fork of chrooted applications + * [kernel] Many migration fixes + * Remove limitation on number of concurrent executions in KTP Kerrighed version 2.4.4 Features: commit b218993dd55d0b67678cba58980f0b056a758e2b Author: Louis Rilling <lou...@ke...> Date: Thu May 6 17:15:17 2010 +0200 ChangeLog: Remove duplicate entries Signed-off-by: Louis Rilling <lou...@ke...> diff --git a/ChangeLog b/ChangeLog index aa677f1..d61095a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,4 @@ Features: - * Remote vfork() - * New RPC transmission engine that highly increases performance - Build system - * Remove sub-configures - * Split tools dir into scripts/ man/ and tools/ - * Create patched kernel source dir in kernel/, no need for --with-kernel option - * Check architecture compatibility Checkpoint/restart * Add various options to checkpoint and restart * Add tools ipccheckpoint and ipcrestart to help checkpoint/restart of applications using IPC objects commit 8937cd62a5ce170f3fade59ab95b3533228015ff Author: Matthieu Fertré <mat...@ke...> Date: Thu May 6 16:22:03 2010 +0200 Changelog: add missing part of changelog coming from kerrighed svn trunk diff --git a/ChangeLog b/ChangeLog index 5f2eb9e..aa677f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,13 +10,62 @@ * Add various options to checkpoint and restart * Add tools ipccheckpoint and ipcrestart to help checkpoint/restart of applications using IPC objects -Kerrighed version 2.3.1 +Kerrighed version 2.4.4 + Features: + * Port driver for Realtek R8169 (present on some Atom platforms) + * Update tg3 driver from Broadcom website. Add support for BCM5784 for instance + * Upgrade krgadm + Fixes: + * Check for admin right for cluster start/shutdown/restart + +Kerrighed version 2.4.2 + Fixes: + * Fix crashes when doing CTRL-C on a process doing memory injection. + * Fix some random memory incoherence in process distant fork. + * Fix OOM in injection mechanism on large memory systems. + * Avoid migration of pages from processes without USE_REMOTE_MEMORY. + * Fix some crashes during distant fork or migration on loaded memory system. + +Kerrighed version 2.4.1 Fixes: + * Major performance improvement + * Fix crashes during migration or distant fork using Lustre. + * Fix crashes with distributed system V memory segments. + * Fix dead-lock in the MM sub-system + * Fix issues in system V message queue identifiers + * Fix deadlock on 32bit platforms in the RPC layer + * Fix forgotten processes in /proc/<pid> directories + * Fix OOM issue using injection mechanism + * Fix memory allocation failure when big buffers are passed to read or write + * Various memory leak fixes. + * Various fixes in the checkpoint/restart sub-system + * Various other fixes. + +Kerrighed version 2.4.0 + Features: + * Remote memory injection + * Configuration scheduler + * Application check-pointing + * Remote vfork() + * New RPC transmission engine that highly increases performance + + Fixes: + * Fix random seg-fault during process migration on 64bits machines. * Fix incompatibilities with IPv6 tunnels and other special net devices * Various bugfixes in RPCs + * Fix a strong memory leak * Fix wrong attempts to migrate threads when this is not supported * Fix random userspace memory access when using fcntl on files remotely open + * Fix random userspace memory access when using ioctl on files remotely open * Fix BUG when the parent of an exiting multi-threaded process is/was remote + * Fix many socket related bugs in the context of migrated processes + * Fix many bugs in krgadm (seg-fault, etc) + + Build system: + * Remove sub-configures + * Split tools dir into scripts/ man/ and tools/ + * Create patched kernel source dir in kernel/, no need for --with-kernel option + * Check architecture compatibility Kerrighed version 2.3.0 Fixes: commit c66a74d81462ab502cc62f78fa2057a7a64f70cf Author: Matthieu Fertré <mat...@ke...> Date: Thu May 6 15:50:06 2010 +0200 Changelog: add information about checkpoint/restart diff --git a/ChangeLog b/ChangeLog index 7cf797c..5f2eb9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * Split tools dir into scripts/ man/ and tools/ * Create patched kernel source dir in kernel/, no need for --with-kernel option * Check architecture compatibility + Checkpoint/restart + * Add various options to checkpoint and restart + * Add tools ipccheckpoint and ipcrestart to help checkpoint/restart of applications using IPC objects Kerrighed version 2.3.1 Fixes: commit d27dcb4861c29aef2b1404a28a3de8e1799ced45 Author: Louis Rilling <lou...@ke...> Date: Mon May 3 17:32:24 2010 +0200 capabilities: Constify krg_cap_t *args that can. Signed-off-by: Louis Rilling <lou...@ke...> diff --git a/libs/include/capability.h b/libs/include/capability.h index a7dcb54..064a6e0 100644 --- a/libs/include/capability.h +++ b/libs/include/capability.h @@ -9,19 +9,19 @@ #include <sys/types.h> #include "capabilities.h" -int krg_father_capset (krg_cap_t * new_caps) ; +int krg_father_capset (const krg_cap_t * new_caps) ; int krg_father_capget (krg_cap_t * old_caps) ; -int krg_capset (krg_cap_t * new_caps) ; +int krg_capset (const krg_cap_t * new_caps) ; int krg_capget (krg_cap_t * old_caps) ; -int krg_pid_capset (pid_t pid, krg_cap_t * new_caps) ; +int krg_pid_capset (pid_t pid, const krg_cap_t * new_caps) ; int krg_pid_capget (pid_t pid, krg_cap_t * old_caps) ; -i... [truncated message content] |