From: Kefu Chai Date: Fri, 13 Nov 2020 05:32:14 +0000 (+0800) Subject: doc/rados/configuration: document option types X-Git-Tag: v17.0.0~652^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=520ddd689404935c76651d69953e89a5717de84f;p=ceph-ci.git doc/rados/configuration: document option types Signed-off-by: Kefu Chai --- diff --git a/doc/rados/configuration/ceph-conf.rst b/doc/rados/configuration/ceph-conf.rst index 6a8d47723d4..b906e6219c4 100644 --- a/doc/rados/configuration/ceph-conf.rst +++ b/doc/rados/configuration/ceph-conf.rst @@ -330,6 +330,73 @@ like [global] secret = "i love \# and \[" +Every configuration option is typed with one of the types below: + +``int`` + +:Description: 64-bit signed integer, Some SI prefixes are supported, like "K", "M", "G", + "T", "P", "E", meaning, respectively, 10\ :sup:`3`, 10\ :sup:`6`, + 10\ :sup:`9`, etc. And "B" is the only supported unit. So, "1K", "1M", "128B" and "-1" are all valid + option values. Some times, a negative value implies "unlimited" when it comes to + an option for threshold or limit. +:Example: ``42``, ``-1`` + +``uint`` + +:Description: It is almost identical to ``integer``. But a negative value will be rejected. +:Example: ``256``, ``0`` + +``str`` + +:Description: Free style strings encoded in UTF-8, but some characters are not allowed. Please + reference the above notes for the details. +:Example: ``"hello world"``, ``"i love \#"``, ``yet-another-name`` + +``boolean`` + +:Description: one of the two values ``true`` or ``false``. But an integer is also accepted, + where "0" implies ``false``, and any non-zero values imply ``true``. +:Example: ``true``, ``false``, ``1``, ``0`` + +``addr`` + +:Description: a single address optionally prefixed with ``v1``, ``v2`` or ``any`` for the messenger + protocol. If the prefix is not specified, ``v2`` protocol is used. Please see + :ref:`address_formats` for more details. +:Example: ``v1:1.2.3.4:567``, ``v2:1.2.3.4:567``, ``1.2.3.4:567``, ``2409:8a1e:8fb6:aa20:1260:4bff:fe92:18f5::567``, ``[::1]:6789`` + +``addrvec`` + +:Description: a set of addresses separated by ",". The addresses can be optionally quoted with ``[`` and ``]``. +:Example: ``[v1:1.2.3.4:567,v2:1.2.3.4:568]``, ``v1:1.2.3.4:567,v1:1.2.3.14:567`` ``[2409:8a1e:8fb6:aa20:1260:4bff:fe92:18f5::567], [2409:8a1e:8fb6:aa20:1260:4bff:fe92:18f5::568]`` + +``uuid`` + +:Description: the string format of a uuid defined by `RFC4122 `_. + And some variants are also supported, for more details, see + `Boost document `_. +:Example: ``f81d4fae-7dec-11d0-a765-00a0c91e6bf6`` + +``size`` + +:Description: denotes a 64-bit unsigned integer. Both SI prefixes and IEC prefixes are + supported. And "B" is the only supported unit. A negative value will be + rejected. +:Example: ``1Ki``, ``1K``, ``1KiB`` and ``1B``. + +``secs`` + +:Description: denotes a duration of time. By default the unit is second if not specified. + Following units of time are supported: + + * second: "s", "sec", "second", "seconds" + * minute: "m", "min", "minute", "minutes" + * hour: "hs", "hr", "hour", "hours" + * day: "d", "day", "days" + * week: "w", "wk", "week", "weeks" + * month: "mo", "month", "months" + * year: "y", "yr", "year", "years" +:Example: ``1 m``, ``1m`` and ``1 week`` .. _ceph-conf-database: diff --git a/doc/rados/configuration/msgr2.rst b/doc/rados/configuration/msgr2.rst index 70494d65ff8..98b0bba5c0c 100644 --- a/doc/rados/configuration/msgr2.rst +++ b/doc/rados/configuration/msgr2.rst @@ -22,6 +22,8 @@ By default, monitors now bind to the new IANA-assigned port ``3300`` (ce4h or 0xce4) for the new v2 protocol, while also binding to the old default port ``6789`` for the legacy v1 protocol. +.. _address_formats: + Address formats --------------- @@ -35,8 +37,8 @@ Starting with nautilus, we now have three different address types: * **v1**: ``v1:1.2.3.4:578/89012`` identifies a daemon binding to a port speaking the legacy v1 protocol. Any address that was previously shown with any prefix is now shown as a ``v1:`` address. -* **TYPE_ANY** addresses identify a client that can speak either - version of the protocol. Prior to nautilus, clients would appear as +* **TYPE_ANY** ``any:1.2.3.4:578/89012`` identifies a client that can + speak either version of the protocol. Prior to nautilus, clients would appear as ``1.2.3.4:0/123456``, where the port of 0 indicates they are clients and do not accept incoming connections. Starting with Nautilus, these clients are now internally represented by a **TYPE_ANY**