Kefu Chai [Thu, 6 Jun 2019 02:58:35 +0000 (10:58 +0800)]
debian/: add ceph-crimson-osd package
this package is commented out using `# Crimson`. and it will be enabled
only if we are building "crimson" flavor builds.
this package depends on ceph-osd, because it'll basically be a drop-in
replacement of ceph-osd. and it shares all the dependencies of ceph-osd.
so let's just reuse ceph-osd package for now.
Kefu Chai [Thu, 6 Jun 2019 03:10:41 +0000 (11:10 +0800)]
install-deps.sh: populate WITH_SEASTAR in the same way as for_make_check
because `install-deps.sh` is executed using `source`, we have to pass
these options using env variables. but before this change, `WITH_SEASTAR` is used directly,
while `FOR_MAKE_CHECK` is checked and translated to a local variable
`for_make_check`. which, in my opinion, has better readability.
so, in this change, `WITH_SEASTAR` is translated to `with_seastar`
variable in `install-deps.sh`.
Matt Benjamin [Thu, 6 Jun 2019 20:54:43 +0000 (16:54 -0400)]
rgw_file: permit lookup_handle to lookup root_fh
Originally, root_fh was reachable from RGWLibFS::fh_cache, but
this was problematic as it has infinite lifetime and so is not
present in RGWLibFS::fs_lru.
To fix the above, RGWLibFS::root_fh came to live unhooked from the
handle caches which works because nfs-ganesha/the application
always has an instance handle. However, this silently breaks
READDIR event invalidation.
Fixes: https://tracker.ceph.com/issues/40196 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Sage Weil [Thu, 6 Jun 2019 17:14:49 +0000 (12:14 -0500)]
Merge PR #28363 into master
* refs/pull/28363/head:
osd/ClassHandler: use std::variant for storing func
osd/ClassHandler: no need to add `struct` before struct type
osd/ClassHandler: use ceph::mutex instead of Mutex
osd/ClassHandler: remove unused function
osd/ClassHandler: s/string/std::string/ in header
Reviewed-by: Samuel Just <sjust@redhat.com> Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
xie xingguo [Mon, 3 Jun 2019 08:43:25 +0000 (16:43 +0800)]
test: add parallel clean_pg_upmaps test
With parallel clean_pg_upmaps feature on, the total time cost
of the performance test which now can utilize up to 8 threads for
parallel upmap validating decreased from:
Note that by default the mon uses only 4 worker threads for
CPU intensive background work, you could further increase
the "mon_cpu_threads" option value if you decided the
time-consuming of clean_pg_upmaps still matters.
xie xingguo [Mon, 3 Jun 2019 08:10:22 +0000 (16:10 +0800)]
mon/OSDMonitor: do clean_pg_upmaps the parallel way if necessary
There could definitely be some certain cases we could reliably
skip this kind of checking, but there is no easy way to separate
those out.
However, this is clearly the general way to do the massive pg
upmap clean-up job more efficiently and hence should make sense
in all cases.
Mike Christie [Tue, 14 May 2019 03:57:41 +0000 (22:57 -0500)]
rbd nbd: add support for netlink interface
This adds support for mapping and unmapping using the netlink
interface. If the user passes in --try-netlink during mapping then we
will try to use the netlink interface and if that is not supported use
the ioctl interface. For unmap we will always try netlink and if that is
not supported drop down to the ioctl.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Mike Christie [Wed, 5 Jun 2019 04:42:40 +0000 (23:42 -0500)]
cmake and build: add netlink lib requirement detection
The next patch adds netlink support to rbd-nbd. This patch just adds the
build related changes to bring in the netlink lib and test and build
against it.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Mike Christie [Tue, 4 Jun 2019 18:32:09 +0000 (13:32 -0500)]
cmake: Move WITH_RBD option earlier
The next patch will add a WITH_RBD check to the LINUX check block so we
only check for the netlink libs when those 2 conditions are met, so this
moves the WIT_RBD option setup to before the LINUX check.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Mike Christie [Tue, 30 Apr 2019 22:24:07 +0000 (17:24 -0500)]
rbd nbd: Add cond to signal nbd disconnection
With the ioctl interface we know when a disconnect has been executed
because the NBD_DO_IO ioctl will return. The netlink interface returns
after the nl connect cmd call has completed, so this patch adds a cond
that signals when a nl disconnect/NBD_DISCONNECT has been executed and
the server thread has handled the resulting NBD_CMD_DISC.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Mike Christie [Wed, 1 May 2019 01:14:31 +0000 (20:14 -0500)]
rbd nbd: move server startup code to function
The netlink connect cmd interface requires the server to be running when
the connect call completes or commands will timeout/fail. This breaks the
server code to 2 functions so we can control when it starts and runs.
Right now it looks odd in that start_server will allocate and return
the server only for it be freed after run, and it is not touched. The
netlink enablement patch at the end will use the returned server.
Signed-off-by: Mike Christie <mchristi@redhat.com>
xie xingguo [Wed, 5 Jun 2019 02:41:52 +0000 (10:41 +0800)]
osd/OSDMapMapping: make ParallelPGMapper can accept input pgs
The existing "prime temp" machinism is a good inspiration
for cluster with a large number of pgs that need to do various
calculations quickly.
I am planning to do the upmap tidy-up work the same way, hence
the need for an alternate way of specifying pgs to process other
than taking directly from the map.
Zack Cerza [Tue, 22 Jan 2019 00:30:44 +0000 (17:30 -0700)]
mgr/dashboard: Push Grafana dashboards on startup
Because we didn't have viable way to populate Grafana dashboards in a
fully containerized context, we needed a different method. This will
work in packaged and containerized deployments.
We provide three methods to push the dashboard JSON files to the Grafana
instance: a command (ceph dashboard update-grafana-dashboards); an API
endpoint (/api/grafana/update_dashboards); and an automatic on-startup
feature that is disabled by default (ceph dashboard
set-grafana-update-dashboards true). The on-startup method will also
retry periodically to avoid racing with the startup of Grafana itself.
Ramana Raja [Mon, 3 Jun 2019 09:46:18 +0000 (15:16 +0530)]
mgr/volumes: fix subvolume creation with quota
A quota is set on a subvolume by setting a quota virtual
xattr on a fs subdirectory. The value of the quota xattr
should be a bytes object. The quota value wasn't correctly
converted to a bytes object. Fix this.
Fixes: http://tracker.ceph.com/issues/40152 Signed-off-by: Ramana Raja <rraja@redhat.com>
Kefu Chai [Tue, 4 Jun 2019 12:59:24 +0000 (20:59 +0800)]
cmake: extract rgw_*_scheduler.cc into rgw_schedulers
i was running into following issue:
../../../lib/libradosgw_a.a(rgw_loadgen_process.cc.o): In function
`RGWLoadGenProcess::run()':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_loadgen_process.cc:102:
undefined reference to `signal_shutdown()'
collect2: error: ld returned 1 exit status
signal_shutdown() is only used by rgw_main.cc to notify the main thread,
but we don't need this facility in unit test exercising the schedulers,
so, in this change, rgw schedulers are extracted into librgw_schedulers,
so this library can be consumed by the unit test.