From: Sage Weil Date: Thu, 22 Sep 2011 22:16:56 +0000 (-0700) Subject: doc: more c* -> ceph-* renames X-Git-Tag: v0.36~49^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3e9a9360625dff3b9bc87f94c0b5109535b58b5e;p=ceph.git doc: more c* -> ceph-* renames Signed-off-by: Sage Weil --- diff --git a/ceph.spec.in b/ceph.spec.in index 4cce04ef7c07..c029e5dca2f7 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -163,7 +163,7 @@ fi %{_bindir}/crushtool %{_bindir}/monmaptool %{_bindir}/osdmaptool -%{_bindir}/cauthtool +%{_bindir}/ceph-authtool %{_bindir}/ceph-syn %{_bindir}/ceph-run %{_bindir}/ceph-mon diff --git a/debian/ceph.install b/debian/ceph.install index 8d452454aca7..3a0b75d6a2df 100644 --- a/debian/ceph.install +++ b/debian/ceph.install @@ -9,7 +9,7 @@ usr/bin/ceph-run usr/bin/ceph-mon usr/bin/ceph-mds usr/bin/ceph-osd -usr/bin/cauthtool +usr/bin/ceph-authtool usr/bin/ceph-debugpack sbin/mkcephfs usr/lib/ceph/ceph_common.sh diff --git a/doc/man/8/cauthtool.rst b/doc/man/8/cauthtool.rst deleted file mode 100644 index 7d3fadd92fef..000000000000 --- a/doc/man/8/cauthtool.rst +++ /dev/null @@ -1,140 +0,0 @@ -============================================= - cauthtool -- ceph keyring manipulation tool -============================================= - -.. program:: cauthtool - -Synopsis -======== - -| **cauthtool** *keyringfile* [ -l | --list ] [ -C | --create-keyring - ] [ -p | --print ] [ -n | --name *entityname* ] [ --gen-key ] [ -a | - --add-key *base64_key* ] [ --caps *capfils* ] [ -b | --bin ] - - -Description -=========== - -**cauthtool** is a utility to create, view, and modify a Ceph keyring -file. A keyring file stores one or more Ceph authentication keys and -possibly an associated capability specification. Each key is -associated with an entity name, of the form -``{client,mon,mds,osd}.name``. - - -Options -======= - -.. option:: -l, --list - - will list all keys and capabilities present in the keyring - -.. option:: -p, --print - - will print an encoded key for the specified entityname. This is - suitable for the ``mount -o secret=`` argument - -.. option:: -C, --create-keyring - - will create a new keyring, overwriting any existing keyringfile - -.. option:: --gen-key - - will generate a new secret key for the specified entityname - -.. option:: --add-key - - will add an encoded key to the keyring - -.. option:: --cap subsystem capability - - will set the capability for given subsystem - -.. option:: --caps capsfile - - will set all of capabilities associated with a given key, for all subsystems - -.. option:: -b, --bin - - will create a binary formatted keyring - - -Capabilities -============ - -The subsystem is the name of a Ceph subsystem: ``mon``, ``mds``, or -``osd``. - -The capability is a string describing what the given user is allowed -to do. This takes the form of a comma separated list of allow, deny -clauses with a permission specifier containing one or more of rwx for -read, write, and execute permission. The ``allow *`` grants full -superuser permissions for the given subsystem. - -For example:: - - # can read, write, and execute objects - osd = "allow rwx [pool=foo[,bar]]|[uid=baz[,bay]]" - - # can access mds server - mds = "allow" - - # can modify cluster state (i.e., is a server daemon) - mon = "allow rwx" - -A librados user restricted to a single pool might look like:: - - osd = "allow rw pool foo" - -A client mounting the file system with minimal permissions would need caps like:: - - mds = "allow" - - osd = "allow rw pool=data" - - mon = "allow r" - - -Caps file format -================ - -The caps file format consists of zero or more key/value pairs, one per -line. The key and value are separated by an ``=``, and the value must -be quoted (with ``'`` or ``"``) if it contains any whitespace. The key -is the name of the Ceph subsystem (``osd``, ``mds``, ``mon``), and the -value is the capability string (see above). - - -Example -======= - -To create a new keyring containing a key for client.foo:: - - cauthtool -c -n client.foo --gen-key keyring - -To associate some capabilities with the key (namely, the ability to -mount a Ceph filesystem):: - - cauthtool -n client.foo --cap mds 'allow' --cap osd 'allow rw pool=data' --cap mon 'allow r' keyring - -To display the contents of the keyring:: - - cauthtool -l keyring - -When mount a Ceph file system, you can grab the appropriately encoded secret key with:: - - mount -t ceph serverhost:/ mountpoint -o name=foo,secret=`cauthtool -p -n client.foo keyring` - - -Availability -============ - -**cauthtool** is part of the Ceph distributed file system. Please -refer to the Ceph wiki at http://ceph.newdream.net/wiki for more -information. - - -See also -======== - -:doc:`ceph `\(8) diff --git a/doc/man/8/cclsinfo.rst b/doc/man/8/cclsinfo.rst deleted file mode 100644 index b9f3074d3c93..000000000000 --- a/doc/man/8/cclsinfo.rst +++ /dev/null @@ -1,47 +0,0 @@ -=========================================== - ceph-clsinfo -- show class object information -=========================================== - -.. program:: ceph-clsinfo - -Synopsis -======== - -| **ceph-clsinfo** [ *options* ] ... *filename* - - -Description -=========== - -**ceph-clsinfo** can show name, version, and architecture information -about a specific class object. - - -Options -======= - -.. option:: -n, --name - - Shows the class name - -.. option:: -v, --version - - Shows the class version - -.. option:: -a, --arch - - Shows the class architecture - - -Availability -============ - -**ceph-clsinfo** is part of the Ceph distributed file system. Please -refer to the Ceph wiki at http://ceph.newdream.net/wiki for more -information. - - -See also -======== - -:doc:`ceph `\(8) diff --git a/doc/man/8/cconf.rst b/doc/man/8/cconf.rst deleted file mode 100644 index 70acb024f73e..000000000000 --- a/doc/man/8/cconf.rst +++ /dev/null @@ -1,87 +0,0 @@ -============================== - ceph-conf -- ceph conf file tool -============================== - -.. program:: ceph-conf - -Synopsis -======== - -| **ceph-conf** -c *conffile* --list-all-sections -| **ceph-conf** -c *conffile* -L -| **ceph-conf** -c *conffile* -l *prefix* -| **ceph-conf** *key* -s *section1* ... -| **ceph-conf** [-s *section* ] --lookup *key* -| **ceph-conf** [-s *section* ] *key* - - -Description -=========== - -**ceph-conf** is a utility for getting information about a ceph -configuration file. As with most Ceph programs, you can specify which -Ceph configuration file to use with the ``-c`` flag. - - -Actions -======= - -.. TODO format this like a proper man page - -**ceph-conf** will perform one of the following actions: - ---list-all-sections or -L prints out a list of all the section names in the configuration -file. - ---list-sections or -l prints out a list of all the sections that begin -with a given prefix. For example, --list-sections mon would list all -sections beginning with mon. - ---lookup will search the configuration for a given value. By default, the sections that -are searched are determined by the Ceph name that we are using. The Ceph name defaults to -client.admin. It can be specified with --name. - -For example, if we specify --name osd.0, the following sections will be searched: -[osd.0], [osd], [global] - -You can specify additional sections to search with --section or -s. These additional -sections will be searched before the sections that would normally be searched. As always, -the first matching entry we find will be returned. - -Note: --lookup is the default action. If no other actions are given on the command line, -we will default to doing a lookup. - - -Examples -======== - -To find out what value osd 0 will use for the "osd data" option:: - - ceph-conf -c foo.conf --name osd.0 --lookup "osd data" - -To find out what value will mds a use for the "log file" option:: - - ceph-conf -c foo.conf --name mds.a "log file" - -To list all sections that begin with osd:: - - ceph-conf -c foo.conf -l osd - -To list all sections:: - - ceph-conf -c foo.conf -L - - -Availability -============ - -**ceph-conf** is part of the Ceph distributed file system. Please refer -to the Ceph wiki at http://ceph.newdream.net/wiki for more -information. - - -See also -======== - -:doc:`ceph `\(8), -:doc:`mkcephfs `\(8) diff --git a/doc/man/8/cdebugpack.rst b/doc/man/8/cdebugpack.rst deleted file mode 100644 index 259cf87d1928..000000000000 --- a/doc/man/8/cdebugpack.rst +++ /dev/null @@ -1,47 +0,0 @@ -========================================= - cdebugpack -- ceph debug packer utility -========================================= - -.. program:: cdebugpack - -Synopsis -======== - -| **cdebugpack** [ *options* ] *filename.tar.gz* - - -Description -=========== - -**cdebugpack** will build a tarball containing various items that are -useful for debugging crashes. The resulting tarball can be shared with -Ceph developers when debugging a problem. - -The tarball will include the binaries for ceph-mds, ceph-osd, and ceph-mon, any -log files, the ceph.conf configuration file, any core files we can -find, and (if the system is running) dumps of the current osd, mds, -and pg maps from the monitor. - - -Options -======= - -.. option:: -c ceph.conf, --conf=ceph.conf - - Use *ceph.conf* configuration file instead of the default - ``/etc/ceph/ceph.conf`` to determine monitor addresses during - startup. - - -Availability -============ - -**cdebugpack** is part of the Ceph distributed file system. Please -refer to the Ceph wiki at http://ceph.newdream.net/wiki for more -information. - - -See also -======== - -:doc:`ceph `\(8) diff --git a/doc/man/8/ceph-authtool.rst b/doc/man/8/ceph-authtool.rst new file mode 100644 index 000000000000..88f592ffa58c --- /dev/null +++ b/doc/man/8/ceph-authtool.rst @@ -0,0 +1,140 @@ +============================================= + ceph-authtool -- ceph keyring manipulation tool +============================================= + +.. program:: ceph-authtool + +Synopsis +======== + +| **ceph-authtool** *keyringfile* [ -l | --list ] [ -C | --create-keyring + ] [ -p | --print ] [ -n | --name *entityname* ] [ --gen-key ] [ -a | + --add-key *base64_key* ] [ --caps *capfils* ] [ -b | --bin ] + + +Description +=========== + +**ceph-authtool** is a utility to create, view, and modify a Ceph keyring +file. A keyring file stores one or more Ceph authentication keys and +possibly an associated capability specification. Each key is +associated with an entity name, of the form +``{client,mon,mds,osd}.name``. + + +Options +======= + +.. option:: -l, --list + + will list all keys and capabilities present in the keyring + +.. option:: -p, --print + + will print an encoded key for the specified entityname. This is + suitable for the ``mount -o secret=`` argument + +.. option:: -C, --create-keyring + + will create a new keyring, overwriting any existing keyringfile + +.. option:: --gen-key + + will generate a new secret key for the specified entityname + +.. option:: --add-key + + will add an encoded key to the keyring + +.. option:: --cap subsystem capability + + will set the capability for given subsystem + +.. option:: --caps capsfile + + will set all of capabilities associated with a given key, for all subsystems + +.. option:: -b, --bin + + will create a binary formatted keyring + + +Capabilities +============ + +The subsystem is the name of a Ceph subsystem: ``mon``, ``mds``, or +``osd``. + +The capability is a string describing what the given user is allowed +to do. This takes the form of a comma separated list of allow, deny +clauses with a permission specifier containing one or more of rwx for +read, write, and execute permission. The ``allow *`` grants full +superuser permissions for the given subsystem. + +For example:: + + # can read, write, and execute objects + osd = "allow rwx [pool=foo[,bar]]|[uid=baz[,bay]]" + + # can access mds server + mds = "allow" + + # can modify cluster state (i.e., is a server daemon) + mon = "allow rwx" + +A librados user restricted to a single pool might look like:: + + osd = "allow rw pool foo" + +A client mounting the file system with minimal permissions would need caps like:: + + mds = "allow" + + osd = "allow rw pool=data" + + mon = "allow r" + + +Caps file format +================ + +The caps file format consists of zero or more key/value pairs, one per +line. The key and value are separated by an ``=``, and the value must +be quoted (with ``'`` or ``"``) if it contains any whitespace. The key +is the name of the Ceph subsystem (``osd``, ``mds``, ``mon``), and the +value is the capability string (see above). + + +Example +======= + +To create a new keyring containing a key for client.foo:: + + ceph-authtool -c -n client.foo --gen-key keyring + +To associate some capabilities with the key (namely, the ability to +mount a Ceph filesystem):: + + ceph-authtool -n client.foo --cap mds 'allow' --cap osd 'allow rw pool=data' --cap mon 'allow r' keyring + +To display the contents of the keyring:: + + ceph-authtool -l keyring + +When mount a Ceph file system, you can grab the appropriately encoded secret key with:: + + mount -t ceph serverhost:/ mountpoint -o name=foo,secret=`ceph-authtool -p -n client.foo keyring` + + +Availability +============ + +**ceph-authtool** is part of the Ceph distributed file system. Please +refer to the Ceph wiki at http://ceph.newdream.net/wiki for more +information. + + +See also +======== + +:doc:`ceph `\(8) diff --git a/doc/man/8/ceph-clsinfo.rst b/doc/man/8/ceph-clsinfo.rst new file mode 100644 index 000000000000..b9f3074d3c93 --- /dev/null +++ b/doc/man/8/ceph-clsinfo.rst @@ -0,0 +1,47 @@ +=========================================== + ceph-clsinfo -- show class object information +=========================================== + +.. program:: ceph-clsinfo + +Synopsis +======== + +| **ceph-clsinfo** [ *options* ] ... *filename* + + +Description +=========== + +**ceph-clsinfo** can show name, version, and architecture information +about a specific class object. + + +Options +======= + +.. option:: -n, --name + + Shows the class name + +.. option:: -v, --version + + Shows the class version + +.. option:: -a, --arch + + Shows the class architecture + + +Availability +============ + +**ceph-clsinfo** is part of the Ceph distributed file system. Please +refer to the Ceph wiki at http://ceph.newdream.net/wiki for more +information. + + +See also +======== + +:doc:`ceph `\(8) diff --git a/doc/man/8/ceph-conf.rst b/doc/man/8/ceph-conf.rst new file mode 100644 index 000000000000..70acb024f73e --- /dev/null +++ b/doc/man/8/ceph-conf.rst @@ -0,0 +1,87 @@ +============================== + ceph-conf -- ceph conf file tool +============================== + +.. program:: ceph-conf + +Synopsis +======== + +| **ceph-conf** -c *conffile* --list-all-sections +| **ceph-conf** -c *conffile* -L +| **ceph-conf** -c *conffile* -l *prefix* +| **ceph-conf** *key* -s *section1* ... +| **ceph-conf** [-s *section* ] --lookup *key* +| **ceph-conf** [-s *section* ] *key* + + +Description +=========== + +**ceph-conf** is a utility for getting information about a ceph +configuration file. As with most Ceph programs, you can specify which +Ceph configuration file to use with the ``-c`` flag. + + +Actions +======= + +.. TODO format this like a proper man page + +**ceph-conf** will perform one of the following actions: + +--list-all-sections or -L prints out a list of all the section names in the configuration +file. + +--list-sections or -l prints out a list of all the sections that begin +with a given prefix. For example, --list-sections mon would list all +sections beginning with mon. + +--lookup will search the configuration for a given value. By default, the sections that +are searched are determined by the Ceph name that we are using. The Ceph name defaults to +client.admin. It can be specified with --name. + +For example, if we specify --name osd.0, the following sections will be searched: +[osd.0], [osd], [global] + +You can specify additional sections to search with --section or -s. These additional +sections will be searched before the sections that would normally be searched. As always, +the first matching entry we find will be returned. + +Note: --lookup is the default action. If no other actions are given on the command line, +we will default to doing a lookup. + + +Examples +======== + +To find out what value osd 0 will use for the "osd data" option:: + + ceph-conf -c foo.conf --name osd.0 --lookup "osd data" + +To find out what value will mds a use for the "log file" option:: + + ceph-conf -c foo.conf --name mds.a "log file" + +To list all sections that begin with osd:: + + ceph-conf -c foo.conf -l osd + +To list all sections:: + + ceph-conf -c foo.conf -L + + +Availability +============ + +**ceph-conf** is part of the Ceph distributed file system. Please refer +to the Ceph wiki at http://ceph.newdream.net/wiki for more +information. + + +See also +======== + +:doc:`ceph `\(8), +:doc:`mkcephfs `\(8) diff --git a/doc/man/8/ceph-debugpack.rst b/doc/man/8/ceph-debugpack.rst new file mode 100644 index 000000000000..ede3a88953cb --- /dev/null +++ b/doc/man/8/ceph-debugpack.rst @@ -0,0 +1,47 @@ +========================================= + ceph-debugpack -- ceph debug packer utility +========================================= + +.. program:: ceph-debugpack + +Synopsis +======== + +| **ceph-debugpack** [ *options* ] *filename.tar.gz* + + +Description +=========== + +**ceph-debugpack** will build a tarball containing various items that are +useful for debugging crashes. The resulting tarball can be shared with +Ceph developers when debugging a problem. + +The tarball will include the binaries for ceph-mds, ceph-osd, and ceph-mon, any +log files, the ceph.conf configuration file, any core files we can +find, and (if the system is running) dumps of the current osd, mds, +and pg maps from the monitor. + + +Options +======= + +.. option:: -c ceph.conf, --conf=ceph.conf + + Use *ceph.conf* configuration file instead of the default + ``/etc/ceph/ceph.conf`` to determine monitor addresses during + startup. + + +Availability +============ + +**ceph-debugpack** is part of the Ceph distributed file system. Please +refer to the Ceph wiki at http://ceph.newdream.net/wiki for more +information. + + +See also +======== + +:doc:`ceph `\(8) diff --git a/doc/man/8/ceph-fuse.rst b/doc/man/8/ceph-fuse.rst new file mode 100644 index 000000000000..bb900c8b786d --- /dev/null +++ b/doc/man/8/ceph-fuse.rst @@ -0,0 +1,62 @@ +===================================== + ceph-fuse -- FUSE-based client for ceph +===================================== + +.. program:: ceph-fuse + +Synopsis +======== + +| **ceph-fuse** [ -m *monaddr*:*port* ] *mountpoint* [ *fuse options* ] + + +Description +=========== + +**ceph-fuse** is a FUSE (File system in USErspace) client for Ceph +distributed file system. It will mount a ceph file system (specified +via the -m option for described by ceph.conf (see below) at the +specific mount point. + +The file system can be unmounted with:: + + fusermount -u mountpoint + +or by sending ``SIGINT`` to the ``ceph-fuse`` process. + + +Options +======= + +Any options not recognized by ceph-fuse will be passed on to libfuse. + +.. option:: -d + + Detach from console and daemonize after startup. + +.. option:: -c ceph.conf, --conf=ceph.conf + + Use *ceph.conf* configuration file instead of the default + ``/etc/ceph/ceph.conf`` to determine monitor addresses during startup. + +.. option:: -m monaddress[:port] + + Connect to specified monitor (instead of looking through ceph.conf). + +.. option:: -r root_directory + + Use root_directory as the mounted root, rather than the full Ceph tree. + + +Availability +============ + +**ceph-fuse** is part of the Ceph distributed file system. Please refer to +the Ceph wiki at http://ceph.newdream.net/wiki for more information. + + +See also +======== + +fusermount(8), +:doc:`ceph `\(8) diff --git a/doc/man/8/ceph-mds.rst b/doc/man/8/ceph-mds.rst new file mode 100644 index 000000000000..8383bca0bd45 --- /dev/null +++ b/doc/man/8/ceph-mds.rst @@ -0,0 +1,72 @@ +===================================== + ceph-mds -- ceph metadata server daemon +===================================== + +.. program:: cmds + +Synopsis +======== + +| **ceph-mds** -i *name* [[ --hot-standby [*rank*] ]|[--journal_check *rank*]] + + +Description +=========== + +**ceph-mds** is the metadata server daemon for the Ceph distributed file +system. One or more instances of ceph-mds collectively manage the file +system namespace, coordinating access to the shared OSD cluster. + +Each ceph-mds daemon instance should have a unique name. The name is used +to identify daemon instances in the ceph.conf. + +Once the daemon has started, the monitor cluster will normally assign +it a logical rank, or put it in a standby pool to take over for +another daemon that crashes. Some of the specified options can cause +other behaviors. + +If you specify hot-standby or journal-check, you must either specify +the rank on the command line, or specify one of the +mds_standby_for_[rank|name] parameters in the config. The command +line specification overrides the config, and specifying the rank +overrides specifying the name. + + +Options +======= + +.. option:: -f, --foreground + + Foreground: do not daemonize after startup (run in foreground). Do + not generate a pid file. Useful when run via :doc:`ceph-run + `\(8). + +.. option:: -d + + Debug mode: like ``-f``, but also send all log output to stderr. + +.. option:: -c ceph.conf, --conf=ceph.conf + + Use *ceph.conf* configuration file instead of the default + ``/etc/ceph/ceph.conf`` to determine monitor addresses during + startup. + +.. option:: -m monaddress[:port] + + Connect to specified monitor (instead of looking through + ``ceph.conf``). + + +Availability +============ + +**ceph-mon** is part of the Ceph distributed file system. Please refer to the Ceph wiki at +http://ceph.newdream.net/wiki for more information. + + +See also +======== + +:doc:`ceph `\(8), +:doc:`ceph-mon `\(8), +:doc:`ceph-osd `\(8) diff --git a/doc/man/8/ceph-mon.rst b/doc/man/8/ceph-mon.rst new file mode 100644 index 000000000000..9430017a334a --- /dev/null +++ b/doc/man/8/ceph-mon.rst @@ -0,0 +1,56 @@ +============================= + ceph-mon -- ceph monitor daemon +============================= + +.. program:: cmon + +Synopsis +======== + +| **cmon** -i *monid* [ --mon-data *mondatapath* ] + + +Description +=========== + +**cmon** is the cluster monitor daemon for the Ceph distributed file +system. One or more instances of **cmon** form a Paxos part-time +parliament cluster that provides extremely reliable and durable +storage of cluster membership, configuration, and state. + +The *mondatapath* refers to a directory on a local file system storing +monitor data. It is normally specified via the ``mon data`` option in +the configuration file. + +Options +======= + +.. option:: -f, --foreground + + Foreground: do not daemonize after startup (run in foreground). Do + not generate a pid file. Useful when run via :doc:`ceph-run `\(8). + +.. option:: -d + + Debug mode: like ``-f``, but also send all log output to stderr. + +.. option:: -c ceph.conf, --conf=ceph.conf + + Use *ceph.conf* configuration file instead of the default + ``/etc/ceph/ceph.conf`` to determine monitor addresses during + startup. + + +Availability +============ + +**cmon** is part of the Ceph distributed file system. Please refer to +the Ceph wiki at http://ceph.newdream.net/wiki for more information. + + +See also +======== + +:doc:`ceph `\(8), +:doc:`ceph-mds `\(8), +:doc:`ceph-osd `\(8) diff --git a/doc/man/8/ceph-osd.rst b/doc/man/8/ceph-osd.rst new file mode 100644 index 000000000000..3a1c70f3a518 --- /dev/null +++ b/doc/man/8/ceph-osd.rst @@ -0,0 +1,95 @@ +==================================== + ceph-osd -- ceph object storage daemon +==================================== + +.. program:: ceph-osd + +Synopsis +======== + +| **ceph-osd** -i *osdnum* [ --osd-data *datapath* ] [ --osd-journal + *journal* ] [ --mkfs ] [ --mkjournal ] [ --mkkey ] + + +Description +=========== + +**ceph-osd** is the object storage daemon for the Ceph distributed file +system. It is responsible for storing objects on a local file system +and providing access to them over the network. + +The datapath argument should be a directory on a btrfs file system +where the object data resides. The journal is optional, and is only +useful performance-wise when it resides on a different disk than +datapath with low latency (ideally, an NVRAM device). + + +Options +======= + +.. option:: -f, --foreground + + Foreground: do not daemonize after startup (run in foreground). Do + not generate a pid file. Useful when run via :doc:`ceph-run `\(8). + +.. option:: -d + + Debug mode: like ``-f``, but also send all log output to stderr. + +.. option:: --osd-data osddata + + Use object store at *osddata*. + +.. option:: --osd-journal journal + + Journal updates to *journal*. + +.. option:: --mkfs + + Create an empty object repository. Normally invoked by + :doc:`mkcephfs `\(8). This also initializes the journal + (if one is defined). + +.. option:: --mkkey + + Generate a new secret key. This is normally used in combination + with ``--mkfs`` as it is more convenient than generating a key by + hand with :doc:`ceph-authtool `\(8). + +.. option:: --mkjournal + + Create a new journal file to match an existing object repository. + This is useful if the journal device or file is wiped out due to a + disk or file system failure. + +.. option:: --flush-journal + + Flush the journal to permanent store. This runs in the foreground + so you know when it's completed. This can be useful if you want to + resize the journal or need to otherwise destroy it: this guarantees + you won't lose data. + +.. option:: -c ceph.conf, --conf=ceph.conf + + Use *ceph.conf* configuration file instead of the default + ``/etc/ceph/ceph.conf`` for runtime configuration options. + +.. option:: -m monaddress[:port] + + Connect to specified monitor (instead of looking through + ``ceph.conf``). + + +Availability +============ + +**ceph-osd** is part of the Ceph distributed file system. Please refer to +the Ceph wiki at http://ceph.newdream.net/wiki for more information. + +See also +======== + +:doc:`ceph `\(8), +:doc:`ceph-mds `\(8), +:doc:`ceph-mon `\(8), +:doc:`ceph-authtool `\(8) diff --git a/doc/man/8/ceph-rbdnamer.rst b/doc/man/8/ceph-rbdnamer.rst new file mode 100644 index 000000000000..f325e8ebfcfd --- /dev/null +++ b/doc/man/8/ceph-rbdnamer.rst @@ -0,0 +1,39 @@ +============================================== + ceph-rbdnamer -- udev helper to name RBD devices +============================================== + +.. program:: ceph-rbdnamer + + +Synopsis +======== + +| **ceph-rbdnamer** *num* + + +Description +=========== + +**ceph-rbdnamer** prints the pool and image name for the given RBD devices +to stdout. It is used by `udev` (using a rule like the one below) to +set up a device symlink. + + +:: + + KERNEL=="rbd[0-9]*", PROGRAM="/usr/bin/ceph-rbdnamer %n", SYMLINK+="rbd/%c{1}/%c{2}:%n" + + +Availability +============ + +**ceph-rbdnamer** is part of the Ceph distributed file system. Please +refer to the Ceph wiki at http://ceph.newdream.net/wiki for more +information. + + +See also +======== + +:doc:`rbd `\(8), +:doc:`ceph `\(8) diff --git a/doc/man/8/ceph-run.rst b/doc/man/8/ceph-run.rst new file mode 100644 index 000000000000..bba301369f0a --- /dev/null +++ b/doc/man/8/ceph-run.rst @@ -0,0 +1,43 @@ +===================================== + ceph-run -- restart daemon on core dump +===================================== + +.. program:: ceph-run + +Synopsis +======== + +| **ceph-run** *command* ... + + +Description +=========== + +**ceph-run** is a simple wrapper that will restart a daemon if it exits +with a signal indicating it crashed and possibly core dumped (that is, +signals 3, 4, 5, 6, 8, or 11). + +The command should run the daemon in the foreground. For Ceph daemons, +that means the ``-f`` option. + + +Options +======= + +None + + +Availability +============ + +**ceph-run** is part of the Ceph distributed file system. Please refer to +the Ceph wiki at http://ceph.newdream.net/wiki for more information. + + +See also +======== + +:doc:`ceph `\(8), +:doc:`ceph-mon `\(8), +:doc:`ceph-mds `\(8), +:doc:`ceph-osd `\(8) diff --git a/doc/man/8/ceph-syn.rst b/doc/man/8/ceph-syn.rst new file mode 100644 index 000000000000..4303c1683e3c --- /dev/null +++ b/doc/man/8/ceph-syn.rst @@ -0,0 +1,97 @@ +=========================================== + ceph-syn -- ceph synthetic workload generator +=========================================== + +.. program:: ceph-syn + +Synopsis +======== + +| **ceph-syn** [ -m *monaddr*:*port* ] --syn *command* *...* + + +Description +=========== + +**ceph-syn** is a simple synthetic workload generator for the Ceph +distributed file system. It uses the userspace client library to +generate simple workloads against a currently running file system. The +file system need not be mounted via ceph-fuse(8) or the kernel client. + +One or more ``--syn`` command arguments specify the particular +workload, as documented below. + + +Options +======= + +.. option:: -d + + Detach from console and daemonize after startup. + +.. option:: -c ceph.conf, --conf=ceph.conf + + Use *ceph.conf* configuration file instead of the default + ``/etc/ceph/ceph.conf`` to determine monitor addresses during + startup. + +.. option:: -m monaddress[:port] + + Connect to specified monitor (instead of looking through + ``ceph.conf``). + +.. option:: --num_client num + + Run num different clients, each in a separate thread. + +.. option:: --syn workloadspec + + Run the given workload. May be specified as many times as + needed. Workloads will normally run sequentially. + + +Workloads +========= + +Each workload should be preceded by ``--syn`` on the command +line. This is not a complete list. + +:command:`mknap` *path* *snapname* + Create a snapshot called *snapname* on *path*. + +:command:`rmsnap` *path* *snapname* + Delete snapshot called *snapname* on *path*. + +:command:`rmfile` *path* + Delete/unlink *path*. + +:command:`writefile` *sizeinmb* *blocksize* + Create a file, named after our client id, that is *sizeinmb* MB by + writing *blocksize* chunks. + +:command:`readfile` *sizeinmb* *blocksize* + Read file, named after our client id, that is *sizeinmb* MB by + writing *blocksize* chunks. + +:command:`rw` *sizeinmb* *blocksize* + Write file, then read it back, as above. + +:command:`makedirs` *numsubdirs* *numfiles* *depth* + Create a hierarchy of directories that is *depth* levels deep. Give + each directory *numsubdirs* subdirectories and *numfiles* files. + +:command:`walk` + Recursively walk the file system (like find). + + +Availability +============ + +**ceph-syn** is part of the Ceph distributed file system. Please refer to +the Ceph wiki at http://ceph.newdream.net/wiki for more information. + +See also +======== + +:doc:`ceph `\(8), +:doc:`ceph-fuse `\(8) diff --git a/doc/man/8/cfuse.rst b/doc/man/8/cfuse.rst deleted file mode 100644 index bb900c8b786d..000000000000 --- a/doc/man/8/cfuse.rst +++ /dev/null @@ -1,62 +0,0 @@ -===================================== - ceph-fuse -- FUSE-based client for ceph -===================================== - -.. program:: ceph-fuse - -Synopsis -======== - -| **ceph-fuse** [ -m *monaddr*:*port* ] *mountpoint* [ *fuse options* ] - - -Description -=========== - -**ceph-fuse** is a FUSE (File system in USErspace) client for Ceph -distributed file system. It will mount a ceph file system (specified -via the -m option for described by ceph.conf (see below) at the -specific mount point. - -The file system can be unmounted with:: - - fusermount -u mountpoint - -or by sending ``SIGINT`` to the ``ceph-fuse`` process. - - -Options -======= - -Any options not recognized by ceph-fuse will be passed on to libfuse. - -.. option:: -d - - Detach from console and daemonize after startup. - -.. option:: -c ceph.conf, --conf=ceph.conf - - Use *ceph.conf* configuration file instead of the default - ``/etc/ceph/ceph.conf`` to determine monitor addresses during startup. - -.. option:: -m monaddress[:port] - - Connect to specified monitor (instead of looking through ceph.conf). - -.. option:: -r root_directory - - Use root_directory as the mounted root, rather than the full Ceph tree. - - -Availability -============ - -**ceph-fuse** is part of the Ceph distributed file system. Please refer to -the Ceph wiki at http://ceph.newdream.net/wiki for more information. - - -See also -======== - -fusermount(8), -:doc:`ceph `\(8) diff --git a/doc/man/8/cmds.rst b/doc/man/8/cmds.rst deleted file mode 100644 index 936bb99eea19..000000000000 --- a/doc/man/8/cmds.rst +++ /dev/null @@ -1,72 +0,0 @@ -===================================== - ceph-mds -- ceph metadata server daemon -===================================== - -.. program:: cmds - -Synopsis -======== - -| **ceph-mds** -i *name* [[ --hot-standby [*rank*] ]|[--journal_check *rank*]] - - -Description -=========== - -**ceph-mds** is the metadata server daemon for the Ceph distributed file -system. One or more instances of ceph-mds collectively manage the file -system namespace, coordinating access to the shared OSD cluster. - -Each ceph-mds daemon instance should have a unique name. The name is used -to identify daemon instances in the ceph.conf. - -Once the daemon has started, the monitor cluster will normally assign -it a logical rank, or put it in a standby pool to take over for -another daemon that crashes. Some of the specified options can cause -other behaviors. - -If you specify hot-standby or journal-check, you must either specify -the rank on the command line, or specify one of the -mds_standby_for_[rank|name] parameters in the config. The command -line specification overrides the config, and specifying the rank -overrides specifying the name. - - -Options -======= - -.. option:: -f, --foreground - - Foreground: do not daemonize after startup (run in foreground). Do - not generate a pid file. Useful when run via :doc:`ceph-run - `\(8). - -.. option:: -d - - Debug mode: like ``-f``, but also send all log output to stderr. - -.. option:: -c ceph.conf, --conf=ceph.conf - - Use *ceph.conf* configuration file instead of the default - ``/etc/ceph/ceph.conf`` to determine monitor addresses during - startup. - -.. option:: -m monaddress[:port] - - Connect to specified monitor (instead of looking through - ``ceph.conf``). - - -Availability -============ - -**ceph-mon** is part of the Ceph distributed file system. Please refer to the Ceph wiki at -http://ceph.newdream.net/wiki for more information. - - -See also -======== - -:doc:`ceph `\(8), -:doc:`ceph-mon `\(8), -:doc:`ceph-osd `\(8) diff --git a/doc/man/8/cmon.rst b/doc/man/8/cmon.rst deleted file mode 100644 index 6bf94c291c0b..000000000000 --- a/doc/man/8/cmon.rst +++ /dev/null @@ -1,56 +0,0 @@ -============================= - ceph-mon -- ceph monitor daemon -============================= - -.. program:: cmon - -Synopsis -======== - -| **cmon** -i *monid* [ --mon-data *mondatapath* ] - - -Description -=========== - -**cmon** is the cluster monitor daemon for the Ceph distributed file -system. One or more instances of **cmon** form a Paxos part-time -parliament cluster that provides extremely reliable and durable -storage of cluster membership, configuration, and state. - -The *mondatapath* refers to a directory on a local file system storing -monitor data. It is normally specified via the ``mon data`` option in -the configuration file. - -Options -======= - -.. option:: -f, --foreground - - Foreground: do not daemonize after startup (run in foreground). Do - not generate a pid file. Useful when run via :doc:`ceph-run `\(8). - -.. option:: -d - - Debug mode: like ``-f``, but also send all log output to stderr. - -.. option:: -c ceph.conf, --conf=ceph.conf - - Use *ceph.conf* configuration file instead of the default - ``/etc/ceph/ceph.conf`` to determine monitor addresses during - startup. - - -Availability -============ - -**cmon** is part of the Ceph distributed file system. Please refer to -the Ceph wiki at http://ceph.newdream.net/wiki for more information. - - -See also -======== - -:doc:`ceph `\(8), -:doc:`ceph-mds `\(8), -:doc:`ceph-osd `\(8) diff --git a/doc/man/8/cosd.rst b/doc/man/8/cosd.rst deleted file mode 100644 index 7bf2c175fa43..000000000000 --- a/doc/man/8/cosd.rst +++ /dev/null @@ -1,95 +0,0 @@ -==================================== - ceph-osd -- ceph object storage daemon -==================================== - -.. program:: ceph-osd - -Synopsis -======== - -| **ceph-osd** -i *osdnum* [ --osd-data *datapath* ] [ --osd-journal - *journal* ] [ --mkfs ] [ --mkjournal ] [ --mkkey ] - - -Description -=========== - -**ceph-osd** is the object storage daemon for the Ceph distributed file -system. It is responsible for storing objects on a local file system -and providing access to them over the network. - -The datapath argument should be a directory on a btrfs file system -where the object data resides. The journal is optional, and is only -useful performance-wise when it resides on a different disk than -datapath with low latency (ideally, an NVRAM device). - - -Options -======= - -.. option:: -f, --foreground - - Foreground: do not daemonize after startup (run in foreground). Do - not generate a pid file. Useful when run via :doc:`ceph-run `\(8). - -.. option:: -d - - Debug mode: like ``-f``, but also send all log output to stderr. - -.. option:: --osd-data osddata - - Use object store at *osddata*. - -.. option:: --osd-journal journal - - Journal updates to *journal*. - -.. option:: --mkfs - - Create an empty object repository. Normally invoked by - :doc:`mkcephfs `\(8). This also initializes the journal - (if one is defined). - -.. option:: --mkkey - - Generate a new secret key. This is normally used in combination - with ``--mkfs`` as it is more convenient than generating a key by - hand with :doc:`cauthtool `\(8). - -.. option:: --mkjournal - - Create a new journal file to match an existing object repository. - This is useful if the journal device or file is wiped out due to a - disk or file system failure. - -.. option:: --flush-journal - - Flush the journal to permanent store. This runs in the foreground - so you know when it's completed. This can be useful if you want to - resize the journal or need to otherwise destroy it: this guarantees - you won't lose data. - -.. option:: -c ceph.conf, --conf=ceph.conf - - Use *ceph.conf* configuration file instead of the default - ``/etc/ceph/ceph.conf`` for runtime configuration options. - -.. option:: -m monaddress[:port] - - Connect to specified monitor (instead of looking through - ``ceph.conf``). - - -Availability -============ - -**ceph-osd** is part of the Ceph distributed file system. Please refer to -the Ceph wiki at http://ceph.newdream.net/wiki for more information. - -See also -======== - -:doc:`ceph `\(8), -:doc:`ceph-mds `\(8), -:doc:`ceph-mon `\(8), -:doc:`ceph-authtool `\(8) diff --git a/doc/man/8/crbdnamer.rst b/doc/man/8/crbdnamer.rst deleted file mode 100644 index f325e8ebfcfd..000000000000 --- a/doc/man/8/crbdnamer.rst +++ /dev/null @@ -1,39 +0,0 @@ -============================================== - ceph-rbdnamer -- udev helper to name RBD devices -============================================== - -.. program:: ceph-rbdnamer - - -Synopsis -======== - -| **ceph-rbdnamer** *num* - - -Description -=========== - -**ceph-rbdnamer** prints the pool and image name for the given RBD devices -to stdout. It is used by `udev` (using a rule like the one below) to -set up a device symlink. - - -:: - - KERNEL=="rbd[0-9]*", PROGRAM="/usr/bin/ceph-rbdnamer %n", SYMLINK+="rbd/%c{1}/%c{2}:%n" - - -Availability -============ - -**ceph-rbdnamer** is part of the Ceph distributed file system. Please -refer to the Ceph wiki at http://ceph.newdream.net/wiki for more -information. - - -See also -======== - -:doc:`rbd `\(8), -:doc:`ceph `\(8) diff --git a/doc/man/8/crun.rst b/doc/man/8/crun.rst deleted file mode 100644 index 3ab97fa2be11..000000000000 --- a/doc/man/8/crun.rst +++ /dev/null @@ -1,43 +0,0 @@ -===================================== - ceph-run -- restart daemon on core dump -===================================== - -.. program:: ceph-run - -Synopsis -======== - -| **ceph-run** *command* ... - - -Description -=========== - -**ceph-run** is a simple wrapper that will restart a daemon if it exits -with a signal indicating it crashed and possibly core dumped (that is, -signals 3, 4, 5, 6, 8, or 11). - -The command should run the daemon in the foreground. For Ceph daemons, -that means the ``-f`` option. - - -Options -======= - -None - - -Availability -============ - -**ceph-run** is part of the Ceph distributed file system. Please refer to -the Ceph wiki at http://ceph.newdream.net/wiki for more information. - - -See also -======== - -:doc:`ceph `\(8), -:doc:`ceph-mon `\(8), -:doc:`ceph-mds `\(8), -:doc:`ceph-osd `\(8) diff --git a/doc/man/8/csyn.rst b/doc/man/8/csyn.rst deleted file mode 100644 index 4a540fc54cae..000000000000 --- a/doc/man/8/csyn.rst +++ /dev/null @@ -1,97 +0,0 @@ -=========================================== - csyn -- ceph synthetic workload generator -=========================================== - -.. program:: csyn - -Synopsis -======== - -| **csyn** [ -m *monaddr*:*port* ] --syn *command* *...* - - -Description -=========== - -**csyn** is a simple synthetic workload generator for the Ceph -distributed file system. It uses the userspace client library to -generate simple workloads against a currently running file system. The -file system need not be mounted via ceph-fuse(8) or the kernel client. - -One or more ``--syn`` command arguments specify the particular -workload, as documented below. - - -Options -======= - -.. option:: -d - - Detach from console and daemonize after startup. - -.. option:: -c ceph.conf, --conf=ceph.conf - - Use *ceph.conf* configuration file instead of the default - ``/etc/ceph/ceph.conf`` to determine monitor addresses during - startup. - -.. option:: -m monaddress[:port] - - Connect to specified monitor (instead of looking through - ``ceph.conf``). - -.. option:: --num_client num - - Run num different clients, each in a separate thread. - -.. option:: --syn workloadspec - - Run the given workload. May be specified as many times as - needed. Workloads will normally run sequentially. - - -Workloads -========= - -Each workload should be preceded by ``--syn`` on the command -line. This is not a complete list. - -:command:`mknap` *path* *snapname* - Create a snapshot called *snapname* on *path*. - -:command:`rmsnap` *path* *snapname* - Delete snapshot called *snapname* on *path*. - -:command:`rmfile` *path* - Delete/unlink *path*. - -:command:`writefile` *sizeinmb* *blocksize* - Create a file, named after our client id, that is *sizeinmb* MB by - writing *blocksize* chunks. - -:command:`readfile` *sizeinmb* *blocksize* - Read file, named after our client id, that is *sizeinmb* MB by - writing *blocksize* chunks. - -:command:`rw` *sizeinmb* *blocksize* - Write file, then read it back, as above. - -:command:`makedirs` *numsubdirs* *numfiles* *depth* - Create a hierarchy of directories that is *depth* levels deep. Give - each directory *numsubdirs* subdirectories and *numfiles* files. - -:command:`walk` - Recursively walk the file system (like find). - - -Availability -============ - -**csyn** is part of the Ceph distributed file system. Please refer to -the Ceph wiki at http://ceph.newdream.net/wiki for more information. - -See also -======== - -:doc:`ceph `\(8), -:doc:`ceph-fuse `\(8) diff --git a/doc/start/block.rst b/doc/start/block.rst index 01f866c0d4a8..947adfc01ed7 100644 --- a/doc/start/block.rst +++ b/doc/start/block.rst @@ -56,7 +56,7 @@ And then make that visible as a block device:: touch secretfile chmod go= secretfile - cauthtool --name=bar --print-key /etc/ceph/client.bar.keyring >secretfile + ceph-authtool --name=bar --print-key /etc/ceph/client.bar.keyring >secretfile rbd map tengigs --user bar --secret secretfile .. todo:: the secretfile part is really clumsy diff --git a/man/ceph-authtool.8 b/man/ceph-authtool.8 index 3abbba343268..afb5abb7fb67 100644 --- a/man/ceph-authtool.8 +++ b/man/ceph-authtool.8 @@ -1,6 +1,6 @@ .TH "CAUTHTOOL" "8" "September 09, 2011" "dev" "Ceph" .SH NAME -cauthtool \- ceph keyring manipulation tool +ceph-authtool \- ceph keyring manipulation tool . .nr rst2man-indent-level 0 . @@ -32,14 +32,14 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] . .SH SYNOPSIS .nf -\fBcauthtool\fP \fIkeyringfile\fP [ \-l | \-\-list ] [ \-C | \-\-create\-keyring +\fBceph-authtool\fP \fIkeyringfile\fP [ \-l | \-\-list ] [ \-C | \-\-create\-keyring ] [ \-p | \-\-print ] [ \-n | \-\-name \fIentityname\fP ] [ \-\-gen\-key ] [ \-a | \-\-add\-key \fIbase64_key\fP ] [ \-\-caps \fIcapfils\fP ] [ \-b | \-\-bin ] .fi .sp .SH DESCRIPTION .sp -\fBcauthtool\fP is a utility to create, view, and modify a Ceph keyring +\fBceph-authtool\fP is a utility to create, view, and modify a Ceph keyring file. A keyring file stores one or more Ceph authentication keys and possibly an associated capability specification. Each key is associated with an entity name, of the form @@ -144,7 +144,7 @@ To create a new keyring containing a key for client.foo: .sp .nf .ft C -cauthtool \-c \-n client.foo \-\-gen\-key keyring +ceph-authtool \-c \-n client.foo \-\-gen\-key keyring .ft P .fi .sp @@ -153,7 +153,7 @@ mount a Ceph filesystem): .sp .nf .ft C -cauthtool \-n client.foo \-\-cap mds \(aqallow\(aq \-\-cap osd \(aqallow rw pool=data\(aq \-\-cap mon \(aqallow r\(aq keyring +ceph-authtool \-n client.foo \-\-cap mds \(aqallow\(aq \-\-cap osd \(aqallow rw pool=data\(aq \-\-cap mon \(aqallow r\(aq keyring .ft P .fi .sp @@ -161,7 +161,7 @@ To display the contents of the keyring: .sp .nf .ft C -cauthtool \-l keyring +ceph-authtool \-l keyring .ft P .fi .sp @@ -169,12 +169,12 @@ When mount a Ceph file system, you can grab the appropriately encoded secret key .sp .nf .ft C -mount \-t ceph serverhost:/ mountpoint \-o name=foo,secret=\(gacauthtool \-p \-n client.foo keyring\(ga +mount \-t ceph serverhost:/ mountpoint \-o name=foo,secret=\(gaceph-authtool \-p \-n client.foo keyring\(ga .ft P .fi .SH AVAILABILITY .sp -\fBcauthtool\fP is part of the Ceph distributed file system. Please +\fBceph-authtool\fP is part of the Ceph distributed file system. Please refer to the Ceph wiki at \fI\%http://ceph.newdream.net/wiki\fP for more information. .SH SEE ALSO diff --git a/man/ceph-osd.8 b/man/ceph-osd.8 index 79d9839bd402..edaa884da6bc 100644 --- a/man/ceph-osd.8 +++ b/man/ceph-osd.8 @@ -80,7 +80,7 @@ Create an empty object repository. Normally invoked by .B \-\-mkkey Generate a new secret key. This is normally used in combination with \fB\-\-mkfs\fP as it is more convenient than generating a key by -hand with \fBcauthtool\fP(8). +hand with \fBceph-authtool\fP(8). .UNINDENT .INDENT 0.0 .TP @@ -118,7 +118,7 @@ the Ceph wiki at \fI\%http://ceph.newdream.net/wiki\fP for more information. \fBceph\fP(8), \fBcmds\fP(8), \fBcmon\fP(8), -\fBcauthtool\fP(8) +\fBceph-authtool\fP(8) .SH COPYRIGHT 2011, New Dream Network .\" Generated by docutils manpage writer. diff --git a/qa/rbd/common.sh b/qa/rbd/common.sh index 4c4ff0d38b13..e1926f7f9c04 100644 --- a/qa/rbd/common.sh +++ b/qa/rbd/common.sh @@ -34,7 +34,7 @@ set_variables() { [ -z "$imgsize" ] && imgsize=1024 [ -z "$user" ] && user=admin [ -z "$keyring" ] && keyring="`$CCONF keyring`" - [ -z "$secret" ] && secret="`cauthtool $keyring -n client.$user -p`" + [ -z "$secret" ] && secret="`ceph-authtool $keyring -n client.$user -p`" monip="`echo $monhost | sed 's/:/ /g' | awk '{print $1}'`" monport="`echo $monhost | sed 's/:/ /g' | awk '{print $2}'`" diff --git a/qa/workunits/caps/mon_commands.sh b/qa/workunits/caps/mon_commands.sh index 237055c3c169..5b5bce62ea19 100755 --- a/qa/workunits/caps/mon_commands.sh +++ b/qa/workunits/caps/mon_commands.sh @@ -1,6 +1,6 @@ #!/bin/sh -ex -cauthtool --create-keyring k --gen-key -p --name client.xx +ceph-authtool --create-keyring k --gen-key -p --name client.xx ceph auth add -i k client.xx mon "allow command foo; allow command bar *; allow command baz ...; allow command foo add * mon allow\\ rwx osd allow\\ *" ( ceph -k k -n client.xx foo || true ) | grep 'unrecog' diff --git a/src/cauthtool.cc b/src/cauthtool.cc index cde058917cd4..bef361b7c0de 100644 --- a/src/cauthtool.cc +++ b/src/cauthtool.cc @@ -29,7 +29,7 @@ using namespace std; void usage() { - cout << "usage: cauthtool keyringfile [OPTIONS]...\n" + cout << "usage: ceph-authtool keyringfile [OPTIONS]...\n" << "where the options are:\n" << " -l, --list will list all keys and capabilities present in\n" << " the keyring\n" diff --git a/src/test/libceph_config.cc b/src/test/libceph_config.cc deleted file mode 100644 index c5e184f59c4f..000000000000 --- a/src/test/libceph_config.cc +++ /dev/null @@ -1,63 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab -/* - * Ceph - scalable distributed file system - * - * Copyright (C) 2011 New Dream Network - * - * This is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software - * Foundation. See file COPYING. - * - */ - -#include "gtest/gtest.h" -#include "include/cephfs/libcephfs.h" - -#include -#include -#include - -using std::string; - -TEST(LibCephConfig, SimpleSet) { - struct ceph_mount_info *cmount; - int ret = ceph_create(&cmount, NULL); - ASSERT_EQ(ret, 0); - - ret = ceph_conf_set(cmount, "debug", "21"); - ASSERT_EQ(ret, 0); - - char buf[128]; - memset(buf, 0, sizeof(buf)); - ret = ceph_conf_get(cmount, "debug", buf, sizeof(buf)); - ASSERT_EQ(ret, 0); - ASSERT_EQ(string("21"), string(buf)); - - ceph_shutdown(cmount); -} - -TEST(LibCephConfig, ArgV) { - struct ceph_mount_info *cmount; - int ret = ceph_create(&cmount, NULL); - ASSERT_EQ(ret, 0); - - const char *argv[] = { "foo", "--debug", "2", - "--keyfile", "/tmp/my-keyfile", NULL }; - size_t argc = (sizeof(argv) / sizeof(argv[0])) - 1; - ceph_conf_parse_argv(cmount, argc, argv); - - char buf[128]; - memset(buf, 0, sizeof(buf)); - ret = ceph_conf_get(cmount, "keyfile", buf, sizeof(buf)); - ASSERT_EQ(ret, 0); - ASSERT_EQ(string("/tmp/my-keyfile"), string(buf)); - - memset(buf, 0, sizeof(buf)); - ret = ceph_conf_get(cmount, "debug", buf, sizeof(buf)); - ASSERT_EQ(ret, 0); - ASSERT_EQ(string("2"), string(buf)); - - ceph_shutdown(cmount); -} diff --git a/src/test/libcephfs_config.cc b/src/test/libcephfs_config.cc new file mode 100644 index 000000000000..c5e184f59c4f --- /dev/null +++ b/src/test/libcephfs_config.cc @@ -0,0 +1,63 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +/* + * Ceph - scalable distributed file system + * + * Copyright (C) 2011 New Dream Network + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ + +#include "gtest/gtest.h" +#include "include/cephfs/libcephfs.h" + +#include +#include +#include + +using std::string; + +TEST(LibCephConfig, SimpleSet) { + struct ceph_mount_info *cmount; + int ret = ceph_create(&cmount, NULL); + ASSERT_EQ(ret, 0); + + ret = ceph_conf_set(cmount, "debug", "21"); + ASSERT_EQ(ret, 0); + + char buf[128]; + memset(buf, 0, sizeof(buf)); + ret = ceph_conf_get(cmount, "debug", buf, sizeof(buf)); + ASSERT_EQ(ret, 0); + ASSERT_EQ(string("21"), string(buf)); + + ceph_shutdown(cmount); +} + +TEST(LibCephConfig, ArgV) { + struct ceph_mount_info *cmount; + int ret = ceph_create(&cmount, NULL); + ASSERT_EQ(ret, 0); + + const char *argv[] = { "foo", "--debug", "2", + "--keyfile", "/tmp/my-keyfile", NULL }; + size_t argc = (sizeof(argv) / sizeof(argv[0])) - 1; + ceph_conf_parse_argv(cmount, argc, argv); + + char buf[128]; + memset(buf, 0, sizeof(buf)); + ret = ceph_conf_get(cmount, "keyfile", buf, sizeof(buf)); + ASSERT_EQ(ret, 0); + ASSERT_EQ(string("/tmp/my-keyfile"), string(buf)); + + memset(buf, 0, sizeof(buf)); + ret = ceph_conf_get(cmount, "debug", buf, sizeof(buf)); + ASSERT_EQ(ret, 0); + ASSERT_EQ(string("2"), string(buf)); + + ceph_shutdown(cmount); +}