Sage Weil
f3980856c3
common/ceph_context: add generic asok 'injectargs'
...
Lots of scripts and users expect this, even though 'config set' is
generally nicer to use.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-04 09:07:02 -05:00
Sage Weil
7fdc96cf0e
common/admin_socket: allow dup prefixes
...
Allow multiple commands to register with the same prefix (but different
commands description strings).
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
ab8594c328
common/admin_socket: refactor with sync and async execute_command variants
...
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
a460a63869
common/admin_socket: pass input bufferlist
...
Pass this to the async handler only for now, since the sync implementations
don't currently use it.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
f4786deeab
osd: transition to call_async() for asok
...
And some variable renames, error path fixup.
No other significant functional change.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
3c381398aa
common/admin_socket: support alternative call_async()
...
Some tell commands reply asynchronously. Support that through the generic
infrastructure.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
4ef0502da5
mon/MonClient: send tell commands out of band via MCommand
...
The current tell mon command handling is pretty fragile and semi-broken:
we force the client to (exclusively) connect to the target mon, disrupting
other monclient business, and the retry logic is fragile.
Instead, use entirely independent connections for each tell command, and
tear them down when we get a reply. Implement independent and simple
error handling and timeouts.
Keep most of the old behavior alive so that we can still use tell against
pre-octopus mons.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
83b551d6ae
mon: accept tell commands via MCommand and send them to asok handler
...
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
9d772b8ea9
common/admin_socket: return int from hook call()
...
Previously, call() returned a bool. Return an int instead so we can
wire this up to tell command return values.
The admin socket 'ceph daemon ...' unix domain socket protocol does not
pass a return code, only data, so we cannot pass these errors that way.
We have two choices: make error codes silently succeed when accessed via
asok (so that we get an error string etc), or make them fail without any
specific error code or string.
Unfortunately, there are several cases where an exception was caught and
what() returned as a string, or where error strings are returned. These
would "blindly" fail if we took the latter approach.
So, for the asok interface, -ENOSYS means a "hard" error that gives the
user no data and makes the 'ceph daemon ...' command return an error code.
Other error codes are interpreted as a success. This is ONLY for the
asok interface; the tell interface has full fidelity with error codes and
error strings.
Note that this means that 'net new' tell-style commands that we move over
to this handler will also appear to succeed via the 'ceph daemon'
interface when they return error codes.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
42823a092c
mgr/DaemonServer: route MCommand (for octopus+) to asok commands
...
Send mgr 'tell' commands (if they originate from a octopus+ client that
knows the difference between MCommand and MMgrCommand) to the asok
comand queue.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
8128045511
do not use 'ceph tell mgr'
...
This is now for a daemon/asok command, not a module command.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
4000d500c0
pybind/ceph_argparse: disambiguate mgr tell and CLI commands
...
The mgr tell commands are somewhat special in that you can tell the mgr
with an empty id ('ceph tell mgr' or target ('mgr', '')) to get the
currently active mgr. This makes it hard to disabiguate between a tell
command and a CLI command.
Fix that by explicitly setting the target to 'mon-mgr' when a CLI command
is flagged as a mgr command.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
774c0e6797
ceph: make 'ceph tell mgr.*' send to the active mgr
...
We can only send tell commands to the active mgr.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
5c1269b11e
ceph: send 'ceph tell mgr.X' to the right mgr
...
Previously this would go to the active mgr, whoever that was.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
85736b784a
librados: add rados_mgr_command_target
...
This variant lets you specify which mgr to talk to.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
1fb103da34
mgr/MgrClient: add start_command variant that takes a target
...
Note that the initial implementation can only target the active mgr!
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
d134a622a5
common/admin_socket: drop unregister_command(); use per-hook variant
...
There's never a need to unregister individual commands; doing it by hook
is sufficient for all users. Simpler and faster.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Sage Weil
1a7cdedb56
common/admin_socket: drop explicit prefix arg to register_command
...
This is always the cmddesc prefix.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:52 -05:00
Sage Weil
e616bece08
common/admin_socket: simplify command routing
...
Back in e30e937c89
we made it possible to
route a command via any prefix. This worked when we wanted to pass
arguments but were just dealing with a vector<string>. These days we have
an actual prefix followed by named arguments, so we don't need this
ad hoc routing.
Derive the prefix from the cmddesc at registration time, and match that
explicitly against the prefix at execution time.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:52 -05:00
Sage Weil
a3bf24d71e
common/admin_socket: add ability to process MCommand via asok queue
...
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:52 -05:00
Sage Weil
32ad6692de
common/admin_socket: pass cmdvec to execute_command
...
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:52 -05:00
Sage Weil
aed0fe4605
common/admin_socket: use pipe for general wakeup
...
Use the pipe to wake up the thread. Use a separate bool to signal a
shutdown.
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:52 -05:00
Sage Weil
058aa90f03
include/compat: add flags arg to pipe_cloexec
...
This matches pipe(2).
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:52 -05:00
Sage Weil
675bbf3211
common/admin_socket: drop unused args
...
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:52 -05:00
Ali Maredia
bc8efa16d3
Merge pull request #28569 from alimaredia/wip-rgw-ioctx-operate-replace
...
rgw: replace direct calls to ioctx.operate()
2019-10-01 16:48:11 -04:00
Kefu Chai
2b6056f935
Merge pull request #30655 from tchaikov/wip-cmake/crimson/pass-args
...
cmake: pass arguments to crimson tests
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2019-10-01 22:28:58 +08:00
Casey Bodley
ec0e97fe8d
Merge pull request #30613 from joke-lee/rgw-ceph-dencoder-add-RGWPeriodLatestEpochInfo
...
ceph-dencoder: add RGWPeriodLatestEpochInfo support.
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2019-10-01 09:59:30 -04:00
Kefu Chai
d656c05f50
cmake: pass arguments to crimson tests
...
otherwise they will take all CPU cores and all memory
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-01 19:40:37 +08:00
Sebastian Wagner
4e3bdafc98
Merge pull request #30587 from sebastian-philipp/python-common-readme
...
python-common: Add small Readme
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
2019-10-01 12:05:00 +02:00
Patrick Donnelly
59d740d7cd
Merge PR #30341 into master
...
* refs/pull/30341/head:
cephfs-shell: better complain info, when deleting non-empty directory
Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Varsha Rao <varao@redhat.com>
2019-10-01 01:21:16 -07:00
Patrick Donnelly
907c2d6ed5
Merge PR #30559 into master
...
* refs/pull/30559/head:
mds: Reorganize class members in MDBalancer header
Reviewed-by: Jos Collin <jcollin@redhat.com>
2019-10-01 01:17:53 -07:00
Patrick Donnelly
4bb8cb3a90
Merge PR #30580 into master
...
* refs/pull/30580/head:
client: don't ceph_abort on bad llseek whence value
client: remove Inode dir_contacts field
Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-10-01 01:15:54 -07:00
Ramana Raja
0bfcace85e
Merge pull request #30407 from joscollin/wip-B41841-yes-really-mean-it
...
mgr/volumes: protection for `fs volume rm` command
2019-10-01 13:05:33 +05:30
Patrick Donnelly
bbe3a33775
Merge PR #30552 into master
...
* refs/pull/30552/head:
cmake: fix libtsan detection
test: librados startup/shutdown racer test
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2019-09-30 20:46:14 -07:00
Kefu Chai
a56266ef09
Merge pull request #30630 from tchaikov/wip-build-on-centos8
...
install-deps,rpm,do_cmake: build on RHEL/CentOS 8
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2019-10-01 10:57:16 +08:00
Kefu Chai
7925aee2d5
Merge pull request #30531 from alimaredia/wip-rgw-maven-version-update
...
qa: bump maven repo version in s3a_hadoop.py
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2019-10-01 10:45:23 +08:00
Xie Xingguo
b93b3dd827
Merge pull request #30615 from xiexingguo/wip-progress-time-remaining
...
mgr/progress: estimated remaining time for events
Reviewed-by: Sage Weil <sage@redhat.com>
2019-10-01 09:07:29 +08:00
Xie Xingguo
f28f35f79b
Merge pull request #30591 from xiexingguo/wip-balancer-throttler
...
mgr/balancer: upmap_max_iterations -> upmap_max_optimizations; behave as it is per pool
Reviewed-by: Sage Weil <sage@redhat.com>
2019-10-01 07:42:25 +08:00
Samuel Just
79847358cf
Merge pull request #29674 from athanatos/sjust/wip-fio-trace
...
os/bluestore: expand lttng tracepoints, improve fio_ceph_objectstore backend
Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-09-30 14:15:31 -07:00
Ali Maredia
d250906aee
cls: CLS_CLIET_HIDE_IOCTX changes in cls headers
...
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2019-09-30 15:48:58 -04:00
Ali Maredia
582511446b
rgw: various ioctx.operate refactoring changes
...
- remove unused #include for cls_client headers
- refactor cls_timeindex_trim call in
rgw_object_expirer_core.cc
- add more CLS_CLIENT_HIDE_IOCTX in header files
- move target_compile_definitions to rgw_a target
- make repeat cls helper functions static
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2019-09-30 15:48:58 -04:00
Ali Maredia
cd684a04ee
rgw: overload cls_rgw functions that do io_ctx.operate()
...
Call the new overloaded functions and call
rgw_rados_operate after them.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2019-09-30 15:48:58 -04:00
Ali Maredia
9886e93118
cls: remove unused cls_rgw_reshard_get_head()
...
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2019-09-30 15:48:58 -04:00
Ali Maredia
3143f2f7d8
rgw: replace ioctx.operate() with rgw_rados_operate()
...
For all operate calls in:
rgw_op.cc
rgw_orphan.cc
rgw_reshard.cc
rgw_rados.cc
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2019-09-30 15:48:58 -04:00
Jeff Layton
09bd258a9f
cmake: fix libtsan detection
...
This variable is case-sensitive.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-09-30 14:49:12 -04:00
Lenz Grimmer
3de8ee9392
Merge pull request #30620 from votdev/issue_42069_validate_bucket_name
...
mgr/dashboard: Bucket names cannot be formatted as IP address
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Kai Wagner <kwagner@suse.com>
2019-09-30 13:51:44 +00:00
Lenz Grimmer
3b30a5a54e
Merge pull request #30647 from s0nea/wip-dashboard-fix-typo
...
mgr/dashboard: fix small typos in description message
Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2019-09-30 13:44:40 +00:00
Kefu Chai
cc9746a701
Merge pull request #29925 from sebastian-philipp/run_tox-overwrite-build-dir
...
script/run_tox.sh: Don't overwrite the build dir
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-09-30 21:18:43 +08:00
Tatjana Dehler
b3983578d6
mgr/dashboard: fix two small typos
...
Remove unnecessary blanks.
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-09-30 13:59:48 +02:00
Sebastian Wagner
8826afd84e
script/run_tox.sh: Don't overwrite the Ceph's bulid dir
...
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-09-30 13:21:40 +02:00