Kefu Chai [Thu, 30 May 2019 15:44:37 +0000 (23:44 +0800)]
qa/standalone/ceph-helpers: resurrect all OSD before waiting for health
address the regression introduced by e62cfceb
in e62cfceb, we wanted to test the newly introduced TOO_FEW_OSDS
warning, so we increased the number of OSD to the size of pool, so if
the number of OSD is less than pool size, monitor will send a warning
message.
but we need to bring all OSDs back if we are expecting a healthy
cluster. in this change, all OSDs are resurrect before
`wait_for_health_ok`.
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.)
> In general we could remove it as the `buffer` library tends to
> disrespects `size_t` – `list::_len` and `ptr::_len` are both
`unsigned`.
> There are some exceptions like `size_t buffer::ptr::get_offset()`
(used
> altogether with `::advance` in `denc.h`) but they deserve rework as
> well.
and in this very case, we simply cast `size_t` to `unsigned`. so we
could silently trim a 64bits integer to 32bit on 64bits architecture.
so for better portability, we can just remove it. also, this function is
inlined, so the ABI is not changed.
Matthew Vernon [Wed, 29 May 2019 13:36:48 +0000 (14:36 +0100)]
doc: note explicitly that "profile rbd" allows blacklisting
The Luminous release notes tell users to ensure that rbd clients have
the ability to blacklist other client users; this is provided by
"profile rbd", which this change now documents explicitly in the user
management documentation.
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 09:45:35 +0000 (17:45 +0800)]
common/blkdev.c: check retval of snprintf()
as snprintf()'ed string could be truncated, to properly use this
function, we need to check its return value.
to silence warning like
../src/common/blkdev.cc: In member function ‘int64_t
BlkDev::get_string_property(blkdev_prop_t, char*, size_t) const’:
../src/common/blkdev.cc:165:15: warning: ‘%s’ directive output may be
truncated writing up to 4095 bytes into a region of size between 4085
and 4089 [-Wformat-truncation=]
165 | "%s/block/%s/%s", sysfsdir(), dev, propstr);
| ^~
In file included from /usr/include/stdio.h:873,
from /usr/include/c++/9/cstdio:42,
from /usr/include/c++/9/ext/string_conversions.h:43,
from /usr/include/c++/9/bits/basic_string.h:6493,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iterator:64,
from
/opt/ceph/include/boost/iterator/iterator_traits.hpp:10,
from
/opt/ceph/include/boost/range/iterator_range_core.hpp:26,
from
/opt/ceph/include/boost/algorithm/string/replace.hpp:16,
from ../src/common/blkdev.cc:31:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note:
‘__builtin___snprintf_chk’ output 9 or more bytes (assuming 4108) into a
destination of size 4096
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL
- 1,
|
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
James Page [Wed, 29 May 2019 04:54:37 +0000 (05:54 +0100)]
common: avoid use of size_t in options
On 32 bit architectures size_t is not a 64 bit type
which causes comparison/assignment mismatch failures
during compilation - specifically in the handling of
legacy configuration values with boost::variant
records where size_t is not supported.
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.