Kefu Chai [Wed, 29 May 2019 01:45:57 +0000 (09:45 +0800)]
ceph.in: do not preload libasan if it is not found
before this change, `asan_lib_path` could be `None` when we check it to
see if it ends with `NOTFOUND`. this happens if WITH_SEASTAR=OFF or
WITH_ASAN=OFF, as in that case, find_package(Sanitizers) is not called,
hence `ASAN_LIBRARY` won't be set.
in this change, libasan is only preloaded if
- (WITH_SEASTAR=ON and CMAKE_BUILD_TYPE=Debug and ASAN_LIBRARY is found)
or
- (WITH_ASAN)
Tatjana Dehler [Wed, 3 Apr 2019 14:24:11 +0000 (16:24 +0200)]
mgr/dashboard: Consider user permissions
Consider user permissions when showing advanced table actions and hide
all buttons requiring missing permissions from the user.
Also consider user permissions when showing submit buttons.
Tatjana Dehler [Fri, 1 Mar 2019 15:11:53 +0000 (16:11 +0100)]
mgr/dashboard: Add PG scrub configuration form
The commit adapts two different parts:
1. It adds all frontend related changes around the PG scrub
configuration form
2. It also adds an API test case to check the existence of
all hard-coded config options in the frontend
Fixes: https://tracker.ceph.com/issues/38211 Signed-off-by: Tatjana Dehler <tdehler@suse.com>
Tatjana Dehler [Wed, 6 Mar 2019 15:42:28 +0000 (16:42 +0100)]
mgr/dashboard: Add config option component
This commit adds an initial config option component in order to move
the HTML template and the config option types related code to an own
centralized place to be re-usable by other components
Tatjana Dehler [Wed, 13 Mar 2019 13:51:43 +0000 (14:51 +0100)]
mgr/dashboard: Add config filter and delete routes
Add a filter route to the configurations endpoint to get a subset of
config options in one request.
Add a delete route to the configurations endpoint to delete a
specific config option value.
The commit contains the frontend and backend related changes.
It also adds the missing '/' to `ConfigurationService.bulkCreate` and
unit test.
Kefu Chai [Wed, 15 May 2019 04:46:10 +0000 (12:46 +0800)]
blobhash: do not use cast for unaligned access
* remove the uncorrect comment. as std::hash<> does not apply to a
customized type. see https://en.cppreference.com/w/cpp/utility/hash
* do not use cast for accessing an uint32_t by dereferencing (void *)
or (char *) pointer. because the alignment requirement of `uint32_t`
is stricter than that of `void*` or `char *`. we need to do an
explicit memcpy() for accessing the uint32_t pointed by the pointer.
see also https://www.kernel.org/doc/Documentation/unaligned-memory-access.txt
* instead of using a loop for mixing the last few bytes. use a switch-
case. so GCC-9 won't complain with
```
../src/include/blobhash.h:38:10: warning: iteration 4 invokes undefined
behavior [-Waggressive-loop-optimizations]
38 | sh += 8;
| ~~~^~~~
../src/include/blobhash.h:36:12: note: within this loop
36 | while (len) {
| ^~~
```
at seeing `sh += 8;`
* instead of mixing the last bits repeatly by derefencing `p` using
`uint32_t`, while move it forwards with step size of `1`, mix
the bits byte-wise.
* include <cstdint>. this header file is supposed to be self-contained.
* use `std::uint32_t` instead of using `uint32_t`. we cannot assume
somebody is `using namespace std` or `using std::uint32_t` for us.
* mark the operator() `const noexcept`. see
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c89-make-a-hash-noexcept
for the rationale behind this
This patch fixes raw_bytes_used key which was renamed to stored_raw.
Also added key percent_used and fixed zabbix template to be fully
compatible with zabbix 3.0
Volker Theile [Mon, 6 May 2019 14:26:37 +0000 (16:26 +0200)]
monitoring: SNMP OID per every Prometheus alert rule
Use the Ceph enterprise OID 50495 (https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers) and create OIDs for every Prometheus alert rule according to the schema at https://github.com/SUSE/prometheus-webhook-snmp/blob/master/README.md.
Example OID:
1.3.6.1.4.1.50495.15.1.2.2.1
All alert rule OIDs are located below the object identifier 15 (15 for p which is the first character of prometheus). Check out the MIB at https://github.com/SUSE/prometheus-webhook-snmp/blob/master/PROMETHEUS-ALERT-CEPH-MIB.txt for more details.
simon gao [Tue, 28 May 2019 02:36:32 +0000 (22:36 -0400)]
mds: avoid sending too many osd requests at once after mds restarts Fixes: http://tracker.ceph.com/issues/40028 Signed-off-by: simon gao <simon29rock@gmail.com>
Mykola Golub [Fri, 24 May 2019 06:07:51 +0000 (07:07 +0100)]
journal: optimize object overflow detection
Previously to detect overflow we were sending journal append
requests until -EOVERFLOW is returned by osd. This means that we
had at least one waste (rejected) request per object set (though
there may be more if the number of in-flight appends is not
limited).
We can easily predict when the osd will start to return
-EOVERFLOW and avoid such additional requests.
Tiago Melo [Thu, 23 May 2019 16:18:22 +0000 (16:18 +0000)]
mgr/dashboard: Subscribe to changes when RequiredIf is used
FormControls that use 'requiredIf' validators depend on the state of other
controls.
To prevent that some of the state changes are not tracked, we now automatically
subscribe to the prerequsited controls and update the validation of the parent
control.
Lenz Grimmer [Tue, 21 May 2019 12:00:54 +0000 (14:00 +0200)]
Merge pull request #28147 from bk201/wip-39933
mgr/dashboard: fix backend error when updating RBD interlocked features
Reviewed-by: Laura Paduano <lpaduano@suse.com> Reviewed-by: Patrick Nawracay <pnawracay@suse.com> Reviewed-by: Ricardo Dias <rdias@suse.com> Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Kiefer Chang [Mon, 20 May 2019 06:18:32 +0000 (14:18 +0800)]
mgr/dashboard: fix some performance data are not displayed
Several Grafana dashboards were updated and their uids are changed.
Update corresponding uids in angular templates. Also fix that when a user
clicks performance details of an OSD, wrong OSD metrics are displayed.
Ali Maredia [Thu, 16 May 2019 16:03:20 +0000 (12:03 -0400)]
qa: remove mon valgrind check in rgw verfiy suite
memory leaks in the monitor are causing a significant
percentage of jobs run in the rgw verify suite to
fail even though the jobs succeeded before hand.
See: http://tracker.ceph.com/issues/38827 for
root cause
Kiefer Chang [Thu, 16 May 2019 07:53:35 +0000 (15:53 +0800)]
mgr/dashboard: fix backend error when updating RBD interlocked features
Now object-map and fast-diff features are interlocked. Allow
enabling/disabling these two features together without raising an already
enabled/disabled error.
Yuri Weinstein [Fri, 10 May 2019 16:28:56 +0000 (09:28 -0700)]
qa/tests: added new client-upgrade-*-nautilus suites for jewel, luminous, mimic
NOTE:
!!!! three suites below MUST use --suite-branch jewel, luminous, mimic (see https://tracker.ceph.com/issues/24021)
ref: https://github.com/ceph/ceph/pull/27983; https://github.com/ceph/ceph/pull/27934; https://github.com/ceph/ceph/pull/28027
--filter "ubuntu_16.04,centos_7.6,rhel_7.6" - test ONLY supported distro BEFORE mimic
--filter "ubuntu_16.04,ubuntu_18.04,centos_7.6,rhel_7.6" - test ONLY supported distro AFTER mimic
Merge after https://github.com/ceph/ceph/pull/28027
Jason Dillaman [Tue, 14 May 2019 13:34:04 +0000 (09:34 -0400)]
librbd: use custom allocator for aligned boost::lockfree::queue
If tcmalloc is in-use as the allocator and its version is less than 2.6.2,
it might be missing support for 'aligned_alloc'. This can result in the
glibc version of 'aligned_alloc' being used to allocate memory that is
then freed by tcmalloc -- resulting in a crash.
Fixes: http://tracker.ceph.com/issues/39703 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Patrick Donnelly [Tue, 14 May 2019 20:07:49 +0000 (13:07 -0700)]
Merge PR #27594 into master
* refs/pull/27594/head:
mgr/volumes: allow creation/deletion of FS subvolume group snapshots
mgr/volumes: allow creation/deletion of FS subvolume groups
mgr/volumes: allow creation/deletion of snapshots of FS subvolumes
mgr/volumes: allow fetching path of FS subvolumes
mgr/volumes: use the fs_subvolume module
mgr/volumes: add fs_subvolume module
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>