cephfs-shell: Change type of d_name to bytes array
By reverting commit 5106582 'd_name' is always a bytes array. This produces
type error wherever 'd_name' is used with 'str' type. In such cases decode it.
Sage Weil [Wed, 10 Apr 2019 21:49:17 +0000 (16:49 -0500)]
Merge PR #27387 into nautilus
* refs/pull/27387/head:
mgr/pg_autoscaler: apply bias to pg_num selection
mgr/pg_autoscaler: include pg_autoscale_bias in autoscale-status table
osd/osd_types,mon: add pg_autoscale_bias pool property
Sage Weil [Wed, 10 Apr 2019 21:48:16 +0000 (16:48 -0500)]
Merge PR #27440 into nautilus
* refs/pull/27440/head:
os/filestore/FileJournal: note EIO events
os/filestore: make note of EIO errors when we see them
os/filestore: note devname for later use
global/signal_handler: avoid core dump on EIO
os/bluestore/KernelDevice: note EIO metadata on aio EIO
global: add hook to annotate crash report with EIO information
Sage Weil [Sun, 7 Apr 2019 18:54:59 +0000 (13:54 -0500)]
common: add --log-early command line option
Sometime it is important and useful to see the logs from the bootstrap
phase where we are getting the initial configs from the monitors. Add
a command-line option --log-early to do that.
Sage Weil [Thu, 4 Apr 2019 20:48:40 +0000 (15:48 -0500)]
os/filestore: make note of EIO errors when we see them
This is imprecise, since we can't (easily) map an EIO back to a specific
part of the device, or even (easily) tell whether it was a read or write
error. It's enough to mark a crash dump as an EIO event, though, and to
include the name of the (primary) filestore device.
Sage Weil [Thu, 4 Apr 2019 19:47:17 +0000 (14:47 -0500)]
os/bluestore/KernelDevice: note EIO metadata on aio EIO
Note that we only do this if we're about to induce a crash. If we can
pass EIO up the stack, it's up to the upper layer to handle it or trigger
its own crash if it can't.
Sage Weil [Fri, 5 Apr 2019 13:59:23 +0000 (08:59 -0500)]
OSD: OSDMapRef access by multiple threads is unsafe
we update OSD::osdmap in OSD::_committed_osd_maps() which is executed
by objectstore's finisher thread. while PG::sched_scrub() is called
by OSD's sharded work queue's worker thread.and we push the osdmap
updates down to PGs OSD::consume_map() which is in turn called by
OSD::_committed_osd_maps() where osdmap is updated. so it does not big
deal if we are checking a stale CEPH_OSDMAP_NODEEP_SCRUB flag.
also this flag will be updated with the latest osdmap very soon.
Sage Weil [Tue, 2 Apr 2019 21:50:08 +0000 (16:50 -0500)]
mon/MonmapMonitor: clean up empty created stamp in monmap
Some old clusters have an empty created timestamp. This is mostly
harmless, but it is confusing/wrong, and it does currently break the
telemetry module with errors like
ValueError: time data '0.000000' does not match format '%Y-%m-%d %H:%M:%S.%f'
from 'ceph telemetry show'.
If we detect an empty created stamp, look at old monmap and use the oldest
modified stamp we can find.
Jason Dillaman [Tue, 2 Apr 2019 20:34:56 +0000 (16:34 -0400)]
test/librados_test_stub: ensure the log flusher thread is started
Recent changes merged in cd6a5b9c40779956629803f222c365bdb291a169
resulted in the logger flusher thread never being started for
librados_test_stub-derived unit tests.
Stephan Müller [Wed, 20 Feb 2019 11:26:44 +0000 (12:26 +0100)]
mgr/dashboard: Fixes tooltip behavior
The problem was that the tool tip element was added to the current parent
element which caused the CSS to make the last
button in a button group look like the fore last button as a rectangle
but the last element should have a rounded corner.
Fixes: https://tracker.ceph.com/issues/38932 Signed-off-by: Stephan Müller <smueller@suse.com>
(cherry picked from commit 4b23b78)
Volker Theile [Tue, 12 Mar 2019 13:12:55 +0000 (14:12 +0100)]
mgr/dashboard: Add separate option to config SSL port
There is a need to introduce this new config option because the MgrModule::get_module_option() and MgrModule::get_localized_module_option() method will be refactored soon and will not support the default parameter anymore. Instead the default value must be configured in the MODULE_OPTIONS. Currently we misuse the server_port depending on if SSL is enabled or not.
Stephan Müller [Thu, 21 Feb 2019 10:53:46 +0000 (11:53 +0100)]
mgr/dashboard: Make preventDefault work with 400 errors
The problem was that, if a error with the status code 400 was
received by the error interceptor the "timeoutId" was not tracked,
therefor "preventDefault" didn't prevent anything as "timeoutId"
was undefined.
Fixes: https://tracker.ceph.com/issues/38418 Signed-off-by: Stephan Müller <smueller@suse.com>
(cherry picked from commit 5aa984cc6c5a737e2dfcc7806f0fe48d1b41d1c5)
Sage Weil [Wed, 3 Apr 2019 19:54:55 +0000 (14:54 -0500)]
common/common_init: start log from common_init_finish (if not yet started)
This captures any non-global_init users who created their cct but haven't
started up the log thread yet. As long as common_init_finish() happens
after we have all of our config options (from the mon config or whatever),
we will log (or not log) to the right location(s).
Sage Weil [Mon, 25 Mar 2019 11:39:28 +0000 (06:39 -0500)]
mgr/pg_autoscaler: apply bias to pg_num selection
This is a relatively naive way to apply the bias: we just multiply it
to whatever we would have chosen. A more clever approach would be to
factor this into the overall cluster-wide PG budget, so that biasing one
pool's PGs up would put downward pressure on other pools. That is
significantly more complicated, however, and (I think) not worth the
effort.
to force cmake to use the python3 and python3 modules for building
python3 bindings
on the debian side, it's okay to continue using "-DWITH_PYTHON3=ON", as
- cmake does normalize "ON" to 3
- debian's cmake extension lives on /usr/lib/python3/dist-packages/
not in a specific /usr/lib/python3.x/dist-packages directory
use might have multiple python3 installed, some of them has/have all
dependencies installed and is good enough for building Ceph. we should
not always use the latest python installed in the system and complain that
there is missing dependencies, even if user has installed all the
python3 dependencies for the older python3.
put in other words, if user only installs cython module for python3.4, but
she has both python3.6 and python3.4 in her system. we should not force
her to uninstall python3.6 for installing Ceph.
this change also aligns with MGR_PYTHON_VERSION. i am not applying the
same change to WITH_PYTHON2, because python2 is already stablized. and distros
are not likely to release new python2 releases.
Helpers to decide when it is safe to stop a mon, add a mon that is
not started, or remove a mon. (Adding and start a mon would always
be safe, but it takes time to sync, so it's not really possible to do
quickly.)
Casey Bodley [Fri, 15 Mar 2019 20:47:19 +0000 (16:47 -0400)]
rgw: don't crash on missing /etc/mime.types
lack of mime types is not a fatal error. when a Content-Type header
is not provided in swift's PutObj, it uses this mime type mapping
to guess a content type based on the object's suffix
Tim Serong [Fri, 15 Mar 2019 04:52:23 +0000 (15:52 +1100)]
mgr/deepsea: use ceph_volume output in get_inventory()
DeepSea is being updated to use ceph_volume internally (see
https://github.com/SUSE/DeepSea/pull/1517). Once this is done,
the mgr_orch.get_inventory runner will just be returning the
raw ceph_volume output, so this commit updates the DeepSea mgr
module to match.
Tim Serong [Thu, 14 Mar 2019 11:48:44 +0000 (22:48 +1100)]
mgr/deepsea: log salt job failures
If a request to salt succeeds, but the event comes back with some internal
failure (e.g.: an exception was thrown inside the salt runner), we need to
log this so the admin can find out what on earth went wrong.
Tim Serong [Thu, 14 Mar 2019 10:10:38 +0000 (21:10 +1100)]
mgr/deepsea: use empty strings rather than None for option defaults
This makes the _config_valid() function work properly; the option
defaults are being strinified somewhere, so we need to use empty
strings rather than None (which becomes "None"), in order to check
if they're set or not.