Noah Watkins [Fri, 22 Feb 2019 22:13:47 +0000 (14:13 -0800)]
mgr/dashboard: fix for using '::' on hosts without ipv6
CherryPy throws an uncaught exception using '::' when the host does not
have an ipv6 loopback address. This is currently the case in kubernetes.
This patch disables the routine in cherrypy that performs the validation
that requested server ports are actually bound.
Sage Weil [Fri, 22 Feb 2019 13:14:33 +0000 (07:14 -0600)]
Merge PR #26550 into master
* refs/pull/26550/head:
mon/AuthMonitor: provide auth_lock-safe _assign_global_id()
mon/AuthMonitor: provide AuthMonitor with mon count and rank *only* while active
Ken Dreyer [Mon, 18 Feb 2019 22:38:17 +0000 (15:38 -0700)]
rpm: fix pyOpenSSL requirement for RHEL 8
On RHEL 7, this package is named "pyOpenSSL", but on RHEL 8, Fedora, and
SUSE, it is named "python3-pyOpenSSL".
Prior to this change, the RHEL conditional was applying to both RHEL 7
and 8, so we would fail to resolve the "pyOpenSSL" package dependency on
RHEL 8.
Update the RPM conditionals to use "pyOpenSSL" on RHEL 7 and
"python3-pyOpenSSL" on all other distributions.
Ken Dreyer [Mon, 18 Feb 2019 22:19:41 +0000 (15:19 -0700)]
rpm: fix python dependencies on RHEL 8
On RHEL 8, the python34-* and Cython packages are named identically to
Fedora (eg "python3-Cython"). Move the Python 2 "Cython" and python34-*
BuildRequires lines inside a RHEL 7 conditional, so RHEL 8 falls through
to the Fedora package names.
Sage Weil [Thu, 21 Feb 2019 18:47:35 +0000 (12:47 -0600)]
Merge PR #26541 into master
* refs/pull/26541/head:
msg/async: guard protocol Interceptor with preprocessor variable
cmake: add UNIT_TESTS_BUILD preprocessor var based on WITH_TESTS cmake var
test/msgr: remove test_msgr2 unused test
msg/async: msgr2: resolve reconnect races
test/msgr: msgr2 unit tests using the protocol interceptor WIP
msg/async: Protocol interceptor infrastructure
Patrick Donnelly [Thu, 21 Feb 2019 18:26:25 +0000 (10:26 -0800)]
Merge PR #26468 into master
* refs/pull/26468/head:
qa: config recall settings to test cache drop
qa: check cache dump works without timeout
mds: add 2nd order recall throttle
mds: drive log flush and cache trim during recall
mds: avoid gather assertion when subs exist
mds: output full details for recall threshold
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Thu, 21 Feb 2019 18:11:55 +0000 (10:11 -0800)]
Merge PR #26422 into master
* refs/pull/26422/head:
mds: start to trim cache when mds enters clientreplay state
mds: avoid evaluating stray dentry multiple times
mds: simplfy stray manager activation
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Sage Weil [Thu, 21 Feb 2019 17:18:46 +0000 (11:18 -0600)]
Merge PR #26237 into master
* refs/pull/26237/head:
Revert "qa: update test_envlibrados_for_rocksdb.sh for libradospp split"
doc/librados: explicitly mention that the C++ API is not stable
ceph.spec: force use of upgrade devtoolset-gcc under RHEL 7
librados: add symbol versioning to the C++ API
librados: add symbol versioning to the C API
librados: revert librados3/libradoscc back to librados2
Kefu Chai [Thu, 21 Feb 2019 15:00:35 +0000 (23:00 +0800)]
pybind: auto encode/decode cstr
assuming all string in the cythonized string use the legacy python2
string type, instead of using the unicode, and assuming all c strings
are ASCII, so we don't need encode/decode them when coerce from/to C
strings.
Kefu Chai [Thu, 21 Feb 2019 14:54:30 +0000 (22:54 +0800)]
pybind: set language_level for cythonize explicitly
Compiling rbd.pyx because it changed.
[1/1] Cythonizing rbd.pyx
/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py:367:
FutureWarning: Cython directive 'language_level' not set, using 2 for
now (Py2). This will change in a later re
lease! File: /var/ssd/ceph/src/pybind/rbd/rbd.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Jason Dillaman [Mon, 4 Feb 2019 21:13:45 +0000 (16:13 -0500)]
librados: add symbol versioning to the C++ API
The future goal would be to change the version for each Ceph major
release to ensure C++ applications will need to be recompiled against
the librados C++ API since we don't guarentee ABI stability.
Fixes: https://tracker.ceph.com/issues/38177 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
- Implementation of operations add/rm hosts
- Improvement of error management in Ansible Runner Service Client
- Addressed @sebastian-philipp suggestions and findings
- Remove the <role> parameter of hosts operations.
Now all the hosts are placed by default in a specific Ansible Inventory group called <orchestrator>.
Discussion on-going about to keep Host management API endpoint or not.
If hosts management is removed, further modifications will be needed to:
- Keep updated the <host inventory> in the orchestrator
- Manage hosts groups when operations are executed
- Adapted new commands (host add/rm) to use to the new <orchestrator_cli> syntax
- Improved error management
- Added return information to Add/remove host methods docstring
- Removed redundant exceptions following @sebastian-philipp suggestion
- Removed duplicated code
- Removed extra space
- Fixed unit tests
- Improved error management in launch playbook
- removed unused param in docstring (orchestrator.py)
Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Kefu Chai [Thu, 21 Feb 2019 04:41:01 +0000 (12:41 +0800)]
cmake: find_package(RabbitMQ) instead of just checking its header
rabbitmq-c is not a header-only library. so we need to ensure that the
library is also around before linking against it. in this change:
* move the detection down to where librabbitmq is used
* add FindRabbitMQ.cmake for find_package(RabbitMQ)
* s/rabbitmq/RabbitMQ::RabbitMQ/ as the latter is an alias library
target, which has more information attached to it.
LiuPeng [Wed, 20 Feb 2019 02:39:00 +0000 (10:39 +0800)]
msg/async/rdma: parse IBSYNMsg.lid as hex when receiving message
function send_msg encode struct IBSYNMsg to a string, and recv_msg parse the string.
In the function send_msg, im.lid (unsigned short int) is formatted into a string with format string %04x,
so, recv_msg should read im.lid from the string with format string %hx instead of %hu (unsigned short).
Fixes: https://tracker.ceph.com/issues/38391 Signed-off-by: Peng Liu <liupeng37@baidu.com>
Ilya Dryomov [Wed, 20 Feb 2019 21:30:29 +0000 (22:30 +0100)]
osdc/Objecter: invalidate crcs on preallocated rx buffers
Both simple and async messengers use c_str() when copying the data from
the socket into the receive buffer, going behind bufferlist's back. If
the receive buffer is preallocated, we need to invalidate its crc cache
by hand to avoid possible data crc mismatches on the client side.
Sage Weil [Wed, 20 Feb 2019 23:09:06 +0000 (17:09 -0600)]
mon/AuthMonitor: provide auth_lock-safe _assign_global_id()
Break assign_global_id() into two parts:
- _assign_global_id(), called under auth_lock, that does nothing but
assign an id (or fail). This makes use of the num_mon and num_rank
values, which means it only works while we are in quorum.
- increase_max_global_id(), if it looks like we should.
Also, adjust _should_increase_max_global_id() to also work under auth_lock
since we are looking at last_allocated_id. All last_allocated_id users
are not protected by auth_lock.
Fixes: http://tracker.ceph.com/issues/38372 Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 20 Feb 2019 22:51:42 +0000 (16:51 -0600)]
mon/AuthMonitor: provide AuthMonitor with mon count and rank *only* while active
Provide AuthMonitor with the mon count and rank under the mon->auth_lock.
Only set these values while the monitor is active (and the mon is allowed
to authenticate). When we start an election or bootstrap, clear these
values.
Jason Dillaman [Wed, 20 Feb 2019 14:19:01 +0000 (09:19 -0500)]
librbd: attempt to restore deleted image from trash on known failures
If the image has watchers, snapshots, or group links, restore the image
from the trash back to the image directory since data removal hasn't yet
started.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 15 Feb 2019 14:11:36 +0000 (09:11 -0500)]
librbd: skip mirror image verification when pruning rbd-mirror watchers
When an image is moved to the trash, mirroring is disabled which will remove
the image id from the mirroring directory. If you then quickly attempt to
remove the image from the trash, it might fail if the rbd-mirror daemon hasn't
closed the image since it fails to filter out rbd-mirror daemon watchers
against images with mirroring disabled.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Sun, 3 Feb 2019 16:28:37 +0000 (11:28 -0500)]
librados: revert librados3/libradoscc back to librados2
For backwards compatibility and upgrade reasons, the librados2
API needs to be preserved and it needs to continue to be compatible
with dependent libraries like librbd1.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Sage Weil [Mon, 18 Feb 2019 19:02:16 +0000 (13:02 -0600)]
common/options: add ms_mon_client_mode
The server now has a list of *allowed* modes (no ordering) and the clients
have a list of modes in order of preference. Since we want everything
connecting to the mon to be secure by default (think: ceph auth set ...),
we need a separate option to ensure we prefer secure mon connections from
the CLI etc.