* s/source_dir/source-dir/: as the option is named "--source-dir", not
"--source_dir"
* cd $build_dir, before launching/stopping vstart. as vstart.sh is
supposed to run from the build directory
Yan Jun [Mon, 26 Aug 2019 10:34:50 +0000 (18:34 +0800)]
ec/jerasure: save the default m=2 of reed_sol_r6_op in profile
save the default value of m to profile so that it could be dumped
in command 'ceph osd erasure-code-profile get xxx', which is more
useful and friendly to user.
Currently always-on modules are not marked as enabled in the WebUI and can be disabled. This PR will fix that.
Note, this PR will NOT implement code that will prevent a developer from trying to disable an always-on module through the REST API. The Mgr Python extension will throw an adequate exception.
This PR will also do:
* Remove old code fragments from a previous Mgr Module management UI that is obsolete now.
* Cleanup code in BaseMgrModule code.
osd/MissingLoc.cc: do not rely on missing_loc_sources only
In 624ade487ea4aeaf988cc1767e0b293f76addd5b, we relied on missing_loc_sources
to check for strays and remove an OSD from missing_loc. However, it is
possible that missing_loc_sources is empty while there are still OSDs
present in missing_loc. Since the aim is to just remove a stray OSD from
missing_loc, we do not need to rely on missing_loc_sources. We still
clean missing_loc_sources if any stray is present in it.
install-deps.sh: install `python*-devel` for python*rpm-macros
in 087ea813, we installed '*rpm-macros' for the macros, so we can have
access to the latest python packaging related macros for preparing the
build dependencies.
but we could run into https://bugs.centos.org/view.php?id=16379, if
we already have an old version of python-devel installed. as the newer
version of python-rpm-macros conflicts with it.
it was a chicken-and-egg problem, as we don't know the exact name of
*rpm-macros packages. that's why we chose to install all of them. but
we have to upgrade the existing python-devel package to resolve the
conflict. but the since there is no python3-devel in RHEL7/CentOS7,
what they have is python36-devel. so we have to hardwire the
`%{python3_pkgversion}` to "36" even before we have access to this
macro, and upgrade the python36-devel package beforehand. but this
renders installing the rpm-macro package less useful -- we intend to
use the macro offered by the package to figure out "36".
as a workaround, we pretend that we know the "main" version of python3
in current RHEL/CentOS. and always install python36-devel for
python-rpm-macros. as the former requires the latter.
once all python3*-devel on all builders are upgraded, we will be safe
to install '*rpm-macros' again without installing python36-devel first.
by then, we could revert this change, or continue installing
python36-devel until the distro bumps up the "main" python version to 3.7
Sage Weil [Fri, 6 Sep 2019 02:24:38 +0000 (21:24 -0500)]
qa/tasks/ceph: restart: stop osd, mark down, then start
If we stop, start, and then mark down, we may (likely) end up marking
the *new* instance down, which is noisy (generates a cluster warning
message) and inefficient.
so we can reuse run-make.sh for building the artifact used by other
tests than "make check", for instance, dashboard's E2E test and
crimson's performance test.
immutable_object_cache: Endian fix for HeaderHelper
struct HeaderHelper is used to overlay buffer list data, which
was generated via encode, and therefore holds integer data in
fixed little-endian format.
Thus, HeaderHelper needs to use ceph_le32 instead of uint32_t
when accessing the len field.
struct PGTempMap in osd/OSDMap.h tracks a number of int32_t pointers
pointing into a buffer list. But that list was generated via encode,
which means int members are bytes-swapped. Fixed by using ceph_le32
pointers instead.
Use ceph_le16/32/64 instead of __le16/32/64 (which are no-op outside
of kernel code).
Note that this updates only those uses of __le16/32/64 which are
part of data structures that are serialized to disk/network
(i.e. Transaction::Op and Transaction::TransactionData).
Also note that code in this file performs combined operations on
little-endian values (in particular ++, +=, and |=) which are not
supported on the ceph_le16/32/64 class, and are therefore replaced
by more primitive operations.
Use ceph_le16/32/64 instead of __le16/32/64 (which are no-op outside
of kernel code).
Note that I've also changes cephx_calc_client_server_challenge to
use ceph_le64 instead of manually byte-swapping by mswab. (This
is a no-op, but it seems more consistent to use the ceph_le types
throughout.)
Use ceph_le16/32/64 instead of __le16/32/64 (which are no-op outside
of kernel code).
Note that I've changed the Alg::calc routines to return the
init_value_t type instead of value_t, to avoid having to
introduce explicit byte-swapping calls to init_le16/32/64 in
many places. (This way, the byte-swapping happens implicitly
at the very end, wher the init_value_t value is assigned via
a value_t pointer.)
include: Fix new-style encoding routines on big-endian
The new-style encoding routines (denc.h) are broken on big-endian
systems. While there is a lot of infrastucture in place to
recognize data types that need to be byte-swapped during encoding
and decoding on big-endian systems, nothing is actually ever swapped.
Fixed by using ceph_le16/32/64 instead of __le16/32/64 (which are
no-ops outside of kernel code).
include: Simplify usage of init_le16/32/64 routines
These routines currently just return plain __u16/32/64. This patch
changes them to return ceph_le16/32/64 types instead. This has a
number of benefits, in particular it allows the routines to now be
used to directly initialize variables of ceph_le16/32/64 type, as
one would expect from the names of those routines.
This doesn't make much of a difference in the current code base,
but it simplifies future patches to fix endian issues.
include: Endian fix for shared kernel/user headers
Endian swapping is done differently in kernel space vs. user space,
but a few header files are shared between those two user cases.
Current code attempts to handle this by re-defining __le16/32/64
before pulling those headers into user space, but this is not
consistenly done: when ceph_fs.h is included via types.h, the
redefinition happens, but when ceph_fs.h is directly included,
the redefinition does not happen.
Fix this by performing the same redefinition directly *in* those
shared headers, when included by user space.
Note that the redefines where also in effect for rbd_types.h,
which is *not* shared with the kernel, so in the file I'm simply
replacing __le16/32/64 with ceph_le16/32/64 in-line.
Also note that it is now no longer possible to include any of
the three files using the redefined macros in C code (as they
make use of C++ features). However, this currently happens in
exactly one file, src/mds/locks.c, which only uses a few CEPH_CAP_...
constants from the header. To fix this, I've simply duplicated
those definitions, which are unchangeable ABI constants anyway.
Adds a mgr module to provide integration between
Ceph and the kubernetes events API within the rook-ceph
namespace. It provides several commands to view event
status including;
ceph k8sevents list .... show all k8s related events
ceph k8sevents ceph .... show events generated from this
module
ceph k8sevents status .. show status of the tracker threads
and counts of tracked events
Events sent to kubernetes are sourced from the
a) clog: ceph healtchecks and admin commands
b) explicit checks: hosts, pools and OSD states are checked
every 'n' seconds
James McClune [Thu, 29 Aug 2019 00:30:49 +0000 (20:30 -0400)]
ceph-conf: added --show-config-value to ceph-conf usage
--show-config-value is another way to lookup ceph.conf
values. Users may want to utilize --show-config-value instead of
--lookup because --show-config-value also shows global defaults.
Signed-off-by: James McClune <jmcclune@mcclunetechnologies.net>
Stephan Müller [Tue, 30 Jul 2019 15:55:53 +0000 (17:55 +0200)]
mgr/dashboard: Use onCancel on any modal event
The problem was, that if 'onCancel' was provided, it wasn't used in all
modal exit cases. Only for the close buttons (the X and the labeled
one), but not if you clicked outside the modal or hit escape.
'onCancel' is currently only used inside the user management form, where
the problem caused, that the submit button was not longer click able if
the modal was hidden through clicking outside of it or hitting escape.
Fixes: https://tracker.ceph.com/issues/40828 Signed-off-by: Stephan Müller <smueller@suse.com>
mgr/DaemonServer: skip adjusting pgp_num when merging is in-progress
otherwise there is a possibility we might change the up set of the
merge participants and hence have to back off the merge process.
Also this will cause some other (racy) corner cases that are hard
to take care of.