From f40957ebc310261892f668007c1379cc958e151a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 3 Feb 2010 11:56:06 -0800 Subject: [PATCH] config: rename 'keys file' to 'keyring' --- src/common/common_init.cc | 2 +- src/config.cc | 4 ++-- src/config.h | 2 +- src/mon/AuthMonitor.cc | 10 +++++----- src/vstart.sh | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/common/common_init.cc b/src/common/common_init.cc index 04c9703f30953..8cc2485c8ba23 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -33,7 +33,7 @@ void common_init(std::vector& args, const char *module_type, bool d _dout_open_log(); if (init_keys && is_supported_auth(CEPH_AUTH_CEPHX)) { - g_keyring.load_master(g_conf.keys_file); + g_keyring.load_master(g_conf.keyring); } } diff --git a/src/config.cc b/src/config.cc index 098a355d2da43..8c8bba478fc66 100644 --- a/src/config.cc +++ b/src/config.cc @@ -321,7 +321,7 @@ static struct config_option config_optionsp[] = { OPTION(log_sym_dir, 0, OPT_STR, 0), OPTION(log_to_stdout, 0, OPT_BOOL, true), OPTION(pid_file, 0, OPT_STR, "/var/run/ceph/$type.$id.pid"), - OPTION(conf, 'c', OPT_STR, "/etc/ceph/ceph.conf, ~/ceph/config, ceph.conf"), + OPTION(conf, 'c', OPT_STR, "/etc/ceph/ceph.conf, ~/.ceph/config, ceph.conf"), OPTION(chdir, 0, OPT_STR, "/"), OPTION(fake_clock, 0, OPT_BOOL, false), OPTION(fakemessenger_serialize, 0, OPT_BOOL, true), @@ -353,7 +353,7 @@ static struct config_option config_optionsp[] = { OPTION(debug_paxos, 0, OPT_INT, 0), OPTION(debug_tp, 0, OPT_INT, 0), OPTION(debug_auth, 0, OPT_INT, 1), - OPTION(keys_file, 'k', OPT_STR, "~/.ceph/keyring.bin, /etc/ceph/keyring.bin, .ceph_keyring"), + OPTION(keyring, 'k', OPT_STR, "~/.ceph/keyring.bin, /etc/ceph/keyring.bin, .ceph_keyring"), OPTION(supported_auth, 0, OPT_STR, "none"), OPTION(clock_lock, 0, OPT_BOOL, false), OPTION(clock_tare, 0, OPT_BOOL, false), diff --git a/src/config.h b/src/config.h index 8714d822ec9e2..41fe17d40b8fa 100644 --- a/src/config.h +++ b/src/config.h @@ -112,7 +112,7 @@ struct md_config_t { bool clock_tare; // auth - char *keys_file; + char *keyring; char *supported_auth; // messenger diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index e1821dd69d5e7..8d9bb822d09a5 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -92,17 +92,17 @@ void AuthMonitor::on_active() void AuthMonitor::create_initial(bufferlist& bl) { dout(0) << "create_initial -- creating initial map" << dendl; - if (g_conf.keys_file) { + if (g_conf.keyring) { map keys_map; - dout(0) << "reading initial keys file " << dendl; + dout(0) << "reading initial keyring " << dendl; bufferlist bl; - string k = g_conf.keys_file; + string k = g_conf.keyring; list ls; get_str_list(k, ls); int r = -1; for (list::iterator p = ls.begin(); p != ls.end(); p++) - if ((r = bl.read_file(g_conf.keys_file)) >= 0) + if ((r = bl.read_file(g_conf.keyring)) >= 0) break; if (r >= 0) { bool read_ok = false; @@ -111,7 +111,7 @@ void AuthMonitor::create_initial(bufferlist& bl) ::decode(keys_map, iter); read_ok = true; } catch (buffer::error *err) { - cerr << "error reading file " << g_conf.keys_file << std::endl; + cerr << "error reading file " << g_conf.keyring << std::endl; } if (read_ok) { map::iterator iter = keys_map.begin(); diff --git a/src/vstart.sh b/src/vstart.sh index a3e801c69dcfa..9bae9b148c0aa 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -301,7 +301,7 @@ EOF for f in `seq 0 $((CEPH_NUM_MON-1))` do cmd="$CEPH_BIN/mkmonfs -c $conf --clobber --mon-data=dev/mon$f -i $f --monmap=$monmap_fn --osdmap=$osdmap_fn" - [ "$cephx" -eq 1 ] && cmd="$cmd --keys-file=$keyring_fn" + [ "$cephx" -eq 1 ] && cmd="$cmd --keyring=$keyring_fn" echo $cmd $cmd done @@ -329,7 +329,7 @@ if [ "$start_osd" -eq 1 ]; then osd journal size = 100 EOF [ "$cephx" -eq 1 ] && cat <> $conf - keys file = dev/osd$osd/osd$osd.keyring + keyring = dev/osd$osd/osd$osd.keyring EOF fi echo mkfs osd$osd @@ -375,7 +375,7 @@ EOF fi if [ "$cephx" -eq 1 ]; then cat <> $conf - keys file = $key_fn + keyring = $key_fn EOF cat < $mds_caps ; generated by vstart.sh on `date` -- 2.39.5