Sage Weil [Wed, 29 May 2019 20:27:52 +0000 (15:27 -0500)]
Merge PR #27799 into master
* refs/pull/27799/head:
common/utime: don't pass %z to utime if there is a 'Z'
test: test json encode/decode of utime_t
mgr/ssh: parse new datetime
mgr/devicehealth: parse new datetime
mgr/crash: parse both old and new timestamp formats
mgr/telemetry: use cluster-provided timestamp unmolested
mon/MonMap: dump timestamps in UTC
qa/tasks/ceph: tolerate 'T' or ' ' as date and time separator
PendingReleaseNotes: note about change to ISO 8601 throughout
test/cli: update regexs for timestamps
log/LogClock: render timestamp in ISO 8601 format
common/ceph_time: stringify in ISO 8601 format
unittest_utime: add tests
common/utime: make parse() handle (our) ISO 8601 output
include/utime: make default string rendering ISO 8601 conformant
include/utime: remove unused s[n]printf methods
include/utime: make gmtime() output conformant ISO 8601
Reviewed-by: Kanika Murarka <kmurarka@redhat.com> Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Sage Weil [Mon, 29 Apr 2019 19:32:44 +0000 (14:32 -0500)]
mgr/telemetry: use cluster-provided timestamp unmolested
The cluster stamp is now ISO 8601; just use that.
(The isoformat() puts a : in +hh:mm the timezone offset, which is slightly
different than what Ceph does; just pass Ceph's value through for
consistency.)
Tiago Melo [Wed, 22 May 2019 08:58:36 +0000 (08:58 +0000)]
mgr/dashboard: Change the provider of services to root
It looks like that even if we provide a service only in 1 module, there are
still situations where angular will create multiple instances of that service.
By setting root as its providers, this no longer happens.
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>
Kefu Chai [Mon, 27 May 2019 11:55:59 +0000 (19:55 +0800)]
common: no need to include ceph_assert.h
src/common/convenience.h is a header-only library, and it does not use
dout or ceph_assert() utilities. so there is no need to include
`ceph_assert.h`.
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>