Venky Shankar [Tue, 24 Nov 2020 09:03:23 +0000 (04:03 -0500)]
client: Snapshot cephfs APIs
Introduce calls to create and delete a snapshot. The difference
b/w this and the traditional mkdir() call to create a snapshot
is the additional metadata field that can be persistent along
side a snapshot (on creation). However, rmsnap() does nothing
special and is included for completeness.
Additionally, get_snap_info() API allows to fetch snapshot info
which includes things like snaphot ID and metadata (if any, which
was set via mksnap() API).
Venky Shankar [Mon, 19 Oct 2020 09:38:47 +0000 (05:38 -0400)]
mds: include snapshot metadata in trace reply to client
MDS sends (custom user) metadata associated with a snapshot in
trace reply to the client. This is required to implement API for
fetching snapshot info (snap-id, metadata, etc...).
Venky Shankar [Mon, 19 Oct 2020 09:02:21 +0000 (05:02 -0400)]
mds: include metadata in SnapInfo structure
This is a free-flowing key/value metadata attached to a snapshot
and persisted in `SnapInfo` structure. The idea is to allow
custom metadata to be persisted when creating a snapshot.
Initial users for this feature would be cephfs-mirror daemon. The
idea is to persist the primary filesystems snapshot ID on snapshot
creation in secondary filesystem. This allows identification of
snapshot renames and recreates.
Kefu Chai [Thu, 17 Dec 2020 10:52:00 +0000 (18:52 +0800)]
install-deps.sh: do not install libboost-all-dev for old distros
ubuntu disco and ubuntu focal do not ship libboost 1.72 and up, and
we depend on libboost 1.72 or up, so it does not help to install
liboost 1.67 or libboost 1.71 anymore.
Alfonso Martínez [Tue, 15 Dec 2020 08:28:46 +0000 (09:28 +0100)]
mgr/dashboard: CLI commands: read passwords from file
Fixes: https://tracker.ceph.com/issues/48355 Signed-off-by: Alfonso Martínez <almartin@redhat.com> Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Kefu Chai [Tue, 15 Dec 2020 15:11:47 +0000 (23:11 +0800)]
ceph.in: try harder if asok path does not exist
when handling "ceph daemon <name> ...", we need to figure out the asok
path, if the "<name>" option is not a path but a "name" as it claims to
be. but if the "admin_socket" option includes substitution/meta variable of
"$pid", it will be expanded using its own pid, instead of the process
with the specified "name". but "ceph" cli does not offer a dedicated
option for overriding the pid for ceph-conf which is used "ceph" cli to
retrieve the "admin_socket" option with specified "name".
in this change, "<name>" option is interpreted as "${name}.${pid}" if
the returned admin_socket path does not point to a valid UNIX domain
socket file. and "ceph" cli will try harder by passing "--pid ${pid}"
and "--name ${name}" instead of "--name ${name}.${pid}" to ceph-conf.
Zac Dover [Sat, 5 Dec 2020 02:17:24 +0000 (12:17 +1000)]
doc/dev: update auto pr validation section
This commit updates the "Automated PR Validation"
section of the "Basic Workflow" page in the
Developer Guide. This is part of a project that
aims to clean all of the sentences currently extant
in the Dev Guide, prior to a slight reorganization
of that guide for the sake of clarity and simplicity.
Deepika Upadhyay [Wed, 16 Dec 2020 12:47:01 +0000 (18:17 +0530)]
install-deps.sh: add with_jaeger options for installing it's dependencies
* if WITH_JAEGER flag is specified, install-deps should mangle and update
debian/control + ceph.spec the way we do for adding crimson dependencies
with WITH_SEASTAR flag.
Deepika Upadhyay [Wed, 16 Dec 2020 12:39:00 +0000 (18:09 +0530)]
debian/control: update yaml-cpp version if building with Jaeger
jaeger specifically requires yaml-dev +0.6 but since all supported
distro(bionic) still doesn't have this version, yaml-cpp will be build
from source if enabled.
This fixes the build failure:
```
Could NOT find yaml-cpp: Found unsuitable version "", but required is at
least "0.5.1" (found yaml-cpp_LIBRARY-NOTFOUND)
```
Nizamudeen A [Thu, 26 Nov 2020 10:25:00 +0000 (15:55 +0530)]
mgr/dashboard: Temporary User Lockout if 10 Invalid Login attempts
Implemented a user lockout mechanism if the user enters 10 invalid attempts. The attempt count gets resetted to 0 once the user succesfully logins before getting disabled. Once the user gets disabled administrator has to manually enable the user which will also resets the number of attempts.
Fixes: https://tracker.ceph.com/issues/40914 Signed-off-by: Nizamudeen A <nia@redhat.com>
Nizamudeen A [Wed, 16 Dec 2020 08:23:14 +0000 (13:53 +0530)]
mgr/dashboard: Fixing dashboard logs e2e test
Yesterday there were some changes went in which disables the logging of config set and config-key set to to be logged in mgr audit logs. Dashboard has an e2e test which checks for this config set and broke the current e2e jenkins job. This commit removes that certain test to fix the jenkins job.
Fixes: https://tracker.ceph.com/issues/48623 Signed-off-by: Nizamudeen A <nia@redhat.com>
Kefu Chai [Wed, 16 Dec 2020 07:43:45 +0000 (15:43 +0800)]
rpm: package crimson-store-nbd in ceph-test package
when building with seastar enabled, package crimson-store-ndb in
"ceph-test" package. "crimson-store-nbd" is a new tool for testing
seastore using nbd.
Anthony D'Atri [Tue, 15 Dec 2020 06:02:31 +0000 (22:02 -0800)]
doc: standardize config option names to use interstitial underscores
Ceph config option names may use spaces, underscores, or by one reference hyphens
as interstitial separators. Most usage within the doc tree uses underscores,
though example conf files and especially structured lists of options mostly
use spaces. Mostly. Underscores help differentiate the config names from
surrounding text, and moreover facilitate scripting, grep, awk, etc and match
their form in src/common/options.cc.
This PR conforms these occurrences of option names to use interstitial underscores instead of spaces.
Fixes: https://tracker.ceph.com/issues/48301 Signed-off-by: Anthony D'Atri <anthony.datri@gmail.com>
Kefu Chai [Tue, 15 Dec 2020 15:24:46 +0000 (23:24 +0800)]
ceph-conf: add --pid option
this change partially reverts 1f09b196657d21cec8fca9bc868bae307200aae8,
and add "--pid" option, so user can specify the pid to override the $pid
meta variable when expanding options.
mgr/dashboard: replace cdCopy2ClipboardButton Directive with a component
Replaces Directive-Based copy2ClipboardButton with a Component-based version.
Further replaces all instances of Directive use with Component version.
Similar toastr logic used. Fixes: https://tracker.ceph.com/issues/44960 Signed-off-by: Courtney Caldwell <ccaldwel@redhat.com>
Neha Ojha [Thu, 3 Dec 2020 19:18:04 +0000 (19:18 +0000)]
messages/MMonCommand, MMonCommandAck: don't log values for "config set" and "config-key set"
This acts like a big hammer to avoid adding sensitive information, like passwords
into mon/mgr/cluster logs when using "config set" and "config-key set" to set keys
whose values should be secure.
Kefu Chai [Tue, 15 Dec 2020 08:40:44 +0000 (16:40 +0800)]
crimson/osd: do not use do_with() unless necessary
in this change, a seastar::do_with() is removed, as the captured
variables are passed to submit_push_data() by value. so no need to keep
them alive after the call.