]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
config: -c foo or --conf=foo; -C bar or --cluster-conf=bar
authorSage Weil <sage@newdream.net>
Tue, 10 Mar 2009 23:08:00 +0000 (16:08 -0700)
committerSage Weil <sage@newdream.net>
Tue, 10 Mar 2009 23:08:00 +0000 (16:08 -0700)
12 files changed:
man/cmds.8
man/cmon.8
man/cosd.8
man/mkcephfs.8
src/cconf.cc
src/config.cc
src/config.h
src/cosd.cluster.conf
src/init-ceph
src/mkcephfs
src/mon/MonClient.cc
src/sample.cluster.conf

index a774c8f11bac44ae29be64636d83b0acdc0080d4..cd91eefcc62d75762f8e6107217719c186abc6be 100644 (file)
@@ -5,7 +5,6 @@ cmds \- ceph metadata server daemon
 .B cmds
 [ \fB\-\-mds\fI rank\fP ]
 [ \fB\-\-shadow\fI rank\fP ]
-[ \fB\-c\fI ceph.conf\fP ]
 .SH DESCRIPTION
 .B cmds
 is the metadata server daemon for the Ceph distributed file system.
@@ -32,9 +31,13 @@ do not daemonize after startup (run in foreground), but log to the usual locatio
 Useful when run via 
 .BR crun (8).
 .TP
-\fB\-c\fI ceph.conf\fR or \fB\-\-conf_file\fI ceph.conf\fP
+\fB\-c\fI ceph.conf\fR, \fB\-\-conf=\fIceph.conf\fR
 Use \fIceph.conf\fP configuration file instead of the default \fI/etc/ceph/ceph.conf\fP
 for runtime configuration options.
+.TP
+\fB\-C\fI cluster.conf\fR, \fB\-\-cluster-conf=\fIcluster.conf\fR
+Use \fIcluster.conf\fP cluster configuration file instead of the default \fI/etc/ceph/cluster.conf\fP
+to determine monitor addresses during startup.
 .SH AVAILABILITY
 .B cmon
 is part of the Ceph distributed file system.  Please refer to the Ceph wiki at
index d94660563384985b904de6ef309ebbfefec8045e..7cad1297fe0fd3b2992a7560f97de21fb90e57be 100644 (file)
@@ -4,7 +4,6 @@ cmon \- ceph monitor daemon
 .SH SYNOPSIS
 .B cmon
 \fImondatapath\fP
-[ \fB\-c\fI ceph.conf\fP ]
 .SH DESCRIPTION
 .B cmon
 is the cluster monitor daemon for the Ceph distributed file system.
@@ -26,9 +25,13 @@ do not daemonize after startup (run in foreground), but log to the usual locatio
 Useful when run via 
 .BR crun (8).
 .TP
-\fB\-c\fI ceph.conf\fR or \fB\-\-conf_file\fI ceph.conf\fP
+\fB\-c\fI ceph.conf\fR, \fB\-\-conf=\fIceph.conf\fR
 Use \fIceph.conf\fP configuration file instead of the default \fI/etc/ceph/ceph.conf\fP
 for runtime configuration options.
+.TP
+\fB\-C\fI cluster.conf\fR, \fB\-\-cluster-conf=\fIcluster.conf\fR
+Use \fIcluster.conf\fP cluster configuration file instead of the default \fI/etc/ceph/cluster.conf\fP
+to determine monitor addresses during startup.
 .SH AVAILABILITY
 .B cmon
 is part of the Ceph distributed file system.  Please refer to the Ceph wiki at
index 1b9d6b23732a02d1aa3d62914033d885942a447c..761ffead048067598adfbea74ffafb7246aeada6 100644 (file)
@@ -5,7 +5,6 @@ cosd \- ceph object storage daemon
 .B cosd
 \fIdatapath\fP
 [ \fB\-j\fI journal\fP ]
-[ \fB\-c\fI ceph.conf\fP ]
 [ \fB\-\-mkfs_for_osd\fI nodeid\fP ]
 .SH DESCRIPTION
 .B cosd
@@ -36,9 +35,13 @@ Create an empty object repository for OSD number \fInodeid\fP.  Normally
 invoked by
 .BR mkcephfs (8).
 .TP
-\fB\-c\fI ceph.conf\fR or \fB\-\-conf_file\fI ceph.conf\fP
+\fB\-c\fI ceph.conf\fR, \fB\-\-conf=\fIceph.conf\fR
 Use \fIceph.conf\fP configuration file instead of the default \fI/etc/ceph/ceph.conf\fP
 for runtime configuration options.
+.TP
+\fB\-C\fI cluster.conf\fR, \fB\-\-cluster-conf=\fIcluster.conf\fR
+Use \fIcluster.conf\fP cluster configuration file instead of the default \fI/etc/ceph/cluster.conf\fP
+to determine monitor addresses during startup.
 .SH AVAILABILITY
 .B cosd
 is part of the Ceph distributed file system.  Please refer to the Ceph wiki at
index 706bb3c6b7010b2d4f5ea78bc8139ea7743c0c6e..baa8201fbb0dba2110b6351e5c270e9fa8d51e97 100644 (file)
@@ -4,7 +4,7 @@ cosd \- ceph object storage daemon
 .SH SYNOPSIS
 .B cosd
 [ \fB\-a\fP ]
-[ \fB\-c\fP\fI cluster.conf\fP ]
+[ \fB\-C\fP\fI cluster.conf\fP ]
 [ \fB\-\-clobber_old_data\fP ]
 [ \fB\-\-mkbtrfs\fP ]
 .SH DESCRIPTION
@@ -20,7 +20,7 @@ metadata.
 Performs the necessary initialization steps on all hosts in the cluster,
 executing commands via SSH.
 .TP
-\fB\-c\fR, \fB\-\-conf_file \fIcluster.conf\fR
+\fB\-C\fI cluster.conf\fR, \fB\-\-cluster-conf=\fIcluster.conf\fR
 Use the given cluster conf file instead of the default \fI/etc/ceph/cluster.conf\fP.
 .TP
 \fB\-\-clobber_old_data\fR
index 5b98b9c237ebf66d3e204a1ea053b4fcea030335..b19118db28a6b72ae0d16c4129ab314e338ee914 100644 (file)
@@ -20,7 +20,7 @@ void usage()
 
 int main(int argc, const char **argv) 
 {
-  const char *fname = g_conf.conf_file;
+  const char *fname = g_conf.conf;
   const char *key = NULL, *defval = NULL;
   const char *list_sections = 0;
   char *val;
index 7cf9f47efc10f04658861bb32d8325b360baaf09..e69b38b001dc28612f9f1a10c1536e75d31af1dc 100644 (file)
@@ -356,8 +356,8 @@ static struct config_option config_optionsp[] = {
        OPTION(global, log_sym_dir, 0, STR, INSTALL_PREFIX "/var/log/ceph"),            // if daemonize == true
        OPTION(global, log_to_stdout, 0, BOOL, true),
        OPTION(global, pid_file, 'p', STR, 0),
-       OPTION(global, conf_file, 'c', STR, INSTALL_PREFIX "/etc/ceph/ceph.conf"),
-       OPTION(global, cluster_conf_file, 'C', STR, INSTALL_PREFIX "/etc/ceph/cluster.conf"),
+       OPTION(global, conf, 'c', STR, INSTALL_PREFIX "/etc/ceph/ceph.conf"),
+       OPTION(global, cluster_conf, 'C', STR, INSTALL_PREFIX "/etc/ceph/cluster.conf"),
        OPTION(global, dump_conf, 0, BOOL, false),
        OPTION(global, chdir, 0, STR, "/"),
        OPTION(global, fake_clock, 0, BOOL, false),
@@ -757,9 +757,9 @@ void parse_startup_config_options(std::vector<const char*>& args)
        cmd_equals(args[i], str_cmd, char_cmd, &val_pos)
 
     if (CMD_EQ("conf_file", 'c')) {
-       SAFE_SET_ARG_VAL(&g_conf.conf_file, STR);
+       SAFE_SET_ARG_VAL(&g_conf.conf, STR);
     } else if (CMD_EQ("cluster_conf_file", 'C')) {
-       SAFE_SET_ARG_VAL(&g_conf.cluster_conf_file, STR);
+       SAFE_SET_ARG_VAL(&g_conf.cluster_conf, STR);
     } else if (CMD_EQ("monmap_file", 'M')) {
        SAFE_SET_ARG_VAL(&g_conf.monmap_file, STR);
     } else if (CMD_EQ("dump_conf", 0)) {
@@ -782,7 +782,7 @@ void parse_startup_config_options(std::vector<const char*>& args)
   args.swap(nargs);
   nargs.clear();
 
-  ConfFile cf(g_conf.conf_file);
+  ConfFile cf(g_conf.conf);
 
   parse_config_file(&cf, true);
   if (g_conf.dump_conf)
@@ -802,9 +802,9 @@ void configure_client_mode()
 
 void generic_usage()
 {
-  cerr << "   -C cluster.conf\n";
+  cerr << "   -C cluster.conf or --cluster-conf=cluster.conf\n";
   cerr << "        get monitor IP(s) from given conf (instead of /etc/ceph/cluster.conf)\n";
-  cerr << "   -c ceph.conf\n";
+  cerr << "   -c ceph.conf or --conf=ceph.conf\n";
   cerr << "        get runtime options from given conf file" << std::endl;
 }
 
index 45be9fa8878d34e7713fcb7ef1063122c0090bfd..53852d4820171414570e4dc69ca6277fc39596ad 100644 (file)
@@ -64,8 +64,8 @@ struct md_config_t {
 
   const char *pid_file;
 
-  const char *conf_file;
-  const char *cluster_conf_file;
+  const char *conf;
+  const char *cluster_conf;
   bool dump_conf;
 
   const char *chdir;
index a70790aba5846a0b02a1663a72a0b3a2d82b9183..58c5e693684d644223e00d91687af70b712f82ed 100644 (file)
@@ -1,7 +1,7 @@
 [global]
        pid file = /home/sage/ceph/src/out/$name.pid
        restart on core dump = false
-       conf file = /home/sage/ceph/src/cosd.ceph.conf
+       conf = /home/sage/ceph/src/cosd.ceph.conf
 
 [mon]
 [mon0]
index 0b5621a2ed16cc606156c3cb4b5c32521fe05ac8..83014af29b868ea4e135be1b9f9bd6989cee900c 100755 (executable)
@@ -99,7 +99,7 @@ case $1 in
     --nobtrfs)
            dobtrfs=0
            ;;
-    --conf_file | -c)
+    --conf | -c)
            [ "$2" == "" ] && usage_exit
            options="$options $1"
            shift
@@ -139,7 +139,7 @@ for name in $what; do
     check_host || continue
 
     get_conf pid_file "/var/run/ceph/$name.pid" "pid file" $sections
-    get_conf conf_file "$runtime_conf" "conf file" $sections
+    get_conf conf "$runtime_conf" "conf" $sections
 
     # extract name-specific options from $conf
     if [[ $name =~ "mon" ]]; then
@@ -165,7 +165,7 @@ for name in $what; do
        first_dev=`echo $btrfs_devs | cut '-d ' -f 1`
     fi
 
-    module_opt="-p $pid_file -c $conf_file $module_opt"
+    module_opt="-p $pid_file -c $conf $module_opt"
 
     case "$command" in
        start)
index e44b0b65f45b125300506c839b53e44c722aa5ca..c28c6d2f5ebd724b434f91effbc21d453ec8f925 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+-c#!/bin/sh
 
 # if we start up with "./", assume everything else is in the current
 # directory too.
@@ -42,7 +42,7 @@ case $1 in
     --mkbtrfs)
            mkbtrfs=1
            ;;
-    --conf_file | -c)
+    --conf | -c)
            [ "$2" == "" ] && usage_exit
            shift
            conf=$1
@@ -117,7 +117,7 @@ for name in $what; do
 
     check_host || continue
 
-    get_conf conf_file "$runtime_conf" "conf file" $sections
+    get_conf conf "$runtime_conf" "conf" $sections
 
     if [[ $ssh = 1 ]] && [[ ! $pushed_to =~ " $host " ]]; then
        scp $osdmap $host:$osdmap
@@ -141,7 +141,7 @@ for name in $what; do
        fi
 
        [[ $ssh != "" ]] && scp $monmap $host:$monmap
-       do_cmd "$BINDIR/cosd -c $conf_file --monmap_file $monmap --mkfs_for_osd $num $osd_path"
+       do_cmd "$BINDIR/cosd -c $conf --monmap_file $monmap --mkfs_for_osd $num $osd_path"
     fi
 
     if [[ $type = "mds" ]]; then
index 6571d0e9ba199e982187cabd98a29c0489afdefa..58088474f53b20e5e0bd68ea95aa8a4030b8f135 100644 (file)
@@ -86,7 +86,7 @@ int MonClient::get_monmap(MonMap *pmonmap)
 
   if (!g_conf.mon_host) {
     // cluster conf?
-    ConfFile a(g_conf.cluster_conf_file);
+    ConfFile a(g_conf.cluster_conf);
     ConfFile b("cluster.conf");
     ConfFile *c = 0;
 
index 200c09e49bf0e5eae805ea1b8cb6bffd35fb8d29..1ab7b59257b7e54291d69a078543d6a734c589f5 100644 (file)
@@ -15,7 +15,7 @@
 
 ; global
 [global]
-        conf file = ceph.conf
+        conf = ceph.conf
        restart on core dump = true
 
 ; monitor