Skip to content

Commit

Permalink
Merge pull request ceph#3207 from ceph/wip-cot-rename
Browse files Browse the repository at this point in the history
ceph_objectstore_tool: Rename generated binary to ceph-objectstore-tool

Reviewed-by: Loic Dachary <[email protected]>
  • Loading branch information
ldachary committed Dec 19, 2014
2 parents 2af416b + 4f72ba5 commit 8547d9b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%{_bindir}/ceph_smalliobenchdumb
%{_bindir}/ceph_smalliobenchfs
%{_bindir}/ceph_smalliobenchrbd
%{_bindir}/ceph_objectstore_tool
%{_bindir}/ceph-objectstore-tool
%{_bindir}/ceph_streamtest
%{_bindir}/ceph_test_*
%{_bindir}/ceph_tpbench
Expand Down
2 changes: 1 addition & 1 deletion debian/ceph-test.install
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
usr/bin/ceph-coverage
usr/bin/ceph_bench_log
usr/bin/ceph_objectstore_tool
usr/bin/ceph-objectstore-tool
usr/bin/ceph_kvstorebench
usr/bin/ceph_multi_stress_watch
usr/bin/ceph_erasure_code
Expand Down
2 changes: 1 addition & 1 deletion src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Makefile
/ceph-syn
/ceph.conf
/ceph_bench_log
/ceph_objectstore_tool
/ceph-objectstore-tool
/ceph_mon_store_converter
/ceph_multi_stress_watch
/ceph_erasure_code
Expand Down
12 changes: 6 additions & 6 deletions src/test/ceph-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -647,17 +647,17 @@ function test_get_not_primary() {
#######################################################################

##
# Run ceph_objectstore_tool against the OSD **id** using the data path
# Run ceph-objectstore-tool against the OSD **id** using the data path
# **dir**. The OSD is killed with TERM prior to running
# ceph_objectstore_tool because access to the data path is
# ceph-objectstore-tool because access to the data path is
# exclusive. The OSD is restarted after the command completes. The
# objectstore_tool returns after all PG are active+clean again.
#
# @param dir the data path of the OSD
# @param id the OSD id
# @param ... arguments to ceph_objectstore_tool
# @param STDIN the input of ceph_objectstore_tool
# @param STDOUT the output of ceph_objectstore_tool
# @param ... arguments to ceph-objectstore-tool
# @param STDIN the input of ceph-objectstore-tool
# @param STDOUT the output of ceph-objectstore-tool
# @return 0 on success, 1 on error
#
function objectstore_tool() {
Expand All @@ -668,7 +668,7 @@ function objectstore_tool() {
local osd_data=$dir/$id

kill_daemons $dir TERM osd.$id >&2 < /dev/null || return 1
ceph_objectstore_tool \
ceph-objectstore-tool \
--data-path $osd_data \
--journal-path $osd_data/journal \
"$@" || return 1
Expand Down
8 changes: 4 additions & 4 deletions src/test/ceph_objectstore_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def main(argv):
pid = os.getpid()
TESTDIR = "/tmp/test.{pid}".format(pid=pid)
DATADIR = "/tmp/data.{pid}".format(pid=pid)
CFSD_PREFIX = "./ceph_objectstore_tool --data-path " + OSDDIR + "/{osd} --journal-path " + OSDDIR + "/{osd}.journal "
CFSD_PREFIX = "./ceph-objectstore-tool --data-path " + OSDDIR + "/{osd} --journal-path " + OSDDIR + "/{osd}.journal "
PROFNAME = "testecprofile"

os.environ['CEPH_CONF'] = CEPH_CONF
Expand Down Expand Up @@ -449,11 +449,11 @@ def main(argv):
ERRORS += test_failure(cmd, "Must provide --type (filestore, memstore, keyvaluestore-dev)")

# Don't specify a data-path
cmd = "./ceph_objectstore_tool --journal-path {dir}/{osd}.journal --type memstore --op list --pgid {pg}".format(dir=OSDDIR, osd=ONEOSD, pg=ONEPG)
cmd = "./ceph-objectstore-tool --journal-path {dir}/{osd}.journal --type memstore --op list --pgid {pg}".format(dir=OSDDIR, osd=ONEOSD, pg=ONEPG)
ERRORS += test_failure(cmd, "Must provide --data-path")

# Don't specify a journal-path for filestore
cmd = "./ceph_objectstore_tool --type filestore --data-path {dir}/{osd} --op list --pgid {pg}".format(dir=OSDDIR, osd=ONEOSD, pg=ONEPG)
cmd = "./ceph-objectstore-tool --type filestore --data-path {dir}/{osd} --op list --pgid {pg}".format(dir=OSDDIR, osd=ONEOSD, pg=ONEPG)
ERRORS += test_failure(cmd, "Must provide --journal-path")

# Test --op list and generate json for all objects
Expand Down Expand Up @@ -875,7 +875,7 @@ def main(argv):
if string.find(pg, "{id}.".format(id=REPID)) != 0:
continue
file = os.path.join(dir, pg)
cmd = "./ceph_objectstore_tool import-rados {pool} {file}".format(pool=NEWPOOL, file=file)
cmd = "./ceph-objectstore-tool import-rados {pool} {file}".format(pool=NEWPOOL, file=file)
logging.debug(cmd)
ret = call(cmd, shell=True, stdout=nullfd)
if ret != 0:
Expand Down
2 changes: 1 addition & 1 deletion src/tools/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ceph_objectstore_tool_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) $(BOOST_PROGRAM_
if LINUX
ceph_objectstore_tool_LDADD += -ldl
endif # LINUX
bin_PROGRAMS += ceph_objectstore_tool
bin_PROGRAMS += ceph-objectstore-tool

monmaptool_SOURCES = tools/monmaptool.cc
monmaptool_LDADD = $(CEPH_GLOBAL) $(LIBCOMMON)
Expand Down
22 changes: 11 additions & 11 deletions src/tools/ceph_objectstore_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ int do_import(ObjectStore *store, OSDSuperblock& sb)
cerr << std::endl;
cerr << "OSD requires sharding to be enabled" << std::endl;
cerr << std::endl;
cerr << "If you wish to import, first do 'ceph_objectstore_tool...--op set-allow-sharded-objects'" << std::endl;
cerr << "If you wish to import, first do 'ceph-objectstore-tool...--op set-allow-sharded-objects'" << std::endl;
}
return 1;
}
Expand Down Expand Up @@ -2004,16 +2004,16 @@ void usage(po::options_description &desc)
cerr << std::endl;
cerr << "Positional syntax:" << std::endl;
cerr << std::endl;
cerr << "ceph_objectstore_tool ... <object> (get|set)-bytes [file]" << std::endl;
cerr << "ceph_objectstore_tool ... <object> set-(attr|omap) <key> [file]" << std::endl;
cerr << "ceph_objectstore_tool ... <object> (get|rm)-(attr|omap) <key>" << std::endl;
cerr << "ceph_objectstore_tool ... <object> get-omaphdr" << std::endl;
cerr << "ceph_objectstore_tool ... <object> set-omaphdr [file]" << std::endl;
cerr << "ceph_objectstore_tool ... <object> list-attrs" << std::endl;
cerr << "ceph_objectstore_tool ... <object> list-omap" << std::endl;
cerr << "ceph_objectstore_tool ... <object> remove" << std::endl;
cerr << "ceph-objectstore-tool ... <object> (get|set)-bytes [file]" << std::endl;
cerr << "ceph-objectstore-tool ... <object> set-(attr|omap) <key> [file]" << std::endl;
cerr << "ceph-objectstore-tool ... <object> (get|rm)-(attr|omap) <key>" << std::endl;
cerr << "ceph-objectstore-tool ... <object> get-omaphdr" << std::endl;
cerr << "ceph-objectstore-tool ... <object> set-omaphdr [file]" << std::endl;
cerr << "ceph-objectstore-tool ... <object> list-attrs" << std::endl;
cerr << "ceph-objectstore-tool ... <object> list-omap" << std::endl;
cerr << "ceph-objectstore-tool ... <object> remove" << std::endl;
cerr << std::endl;
cerr << "ceph_objectstore_tool import-rados <pool> [file]" << std::endl;
cerr << "ceph-objectstore-tool import-rados <pool> [file]" << std::endl;
cerr << std::endl;
cerr << "<object> can be a JSON object description as displayed" << std::endl;
cerr << "by --op list." << std::endl;
Expand Down Expand Up @@ -2098,7 +2098,7 @@ int main(int argc, char **argv)
// Handle completely different operation "import-rados"
if (object == "import-rados") {
if (vm.count("objcmd") == 0) {
cerr << "ceph_objectstore_tool import-rados <pool> [file]" << std::endl;
cerr << "ceph-objectstore-tool import-rados <pool> [file]" << std::endl;
exit(1);
}

Expand Down

0 comments on commit 8547d9b

Please sign in to comment.