Sebastian Wagner [Wed, 22 Apr 2020 09:51:49 +0000 (11:51 +0200)]
cephadm: Aquire lock, if fsid != None
Fixes:
```
Traceback (most recent call last):
File "./cephadm", line 4494, in <module>
r = args.func()
File "./cephadm", line 1077, in _infer_fsid
return func()
File "./cephadm", line 1103, in _infer_image
return func()
File "./cephadm", line 2813, in command_ceph_volume
l = FileLock(args.fsid)
File "./cephadm", line 560, in __init__
self._lock_file = os.path.join(LOCK_DIR, name + '.lock')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
```
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Clang complains:
src/rgw/rgw_bucket_sync_cache.h:88:3: error: exception specification of explicitly defaulted copy co
nstructor does not match the calculated one
Handle(const Handle&) noexcept = default;
^
1 error generated.
And a reference that I found for this:
https://github.com/mapnik/mapnik/issues/3274
Suggesting that the noexcept is inherited from the first definition.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Co-Authored-By: Sebastian Wagner <sebastian@spawnhost.de>
Update doc/cephadm/troubleshooting.rst
Co-Authored-By: Sebastian Wagner <sebastian@spawnhost.de>
Added mgfritch's suggestion regarding checking to see if the public key
is listed in the authorized_keys file.
the intention to add the whitelist was to test "sdk" class, but if we
add new classes to the list, and add tests exercising them, the tests
fail if we fail to update these `rados_cls_all.yaml` accordingly.
so in this change, the list is now '*' which allows OSD to load all
classes found in the specified directory
Ziye Yang [Tue, 7 Apr 2020 21:09:56 +0000 (05:09 +0800)]
NVMEDevice: Remove the performance counter
Compared with other approach (KernelDevice, iouring), it does not
have such feature, so remove it to simplify the code and improve
the performance. Because, each thread will call the logger and calculate
the time, it is very time consuming. And the upper layer in bluestore has
the feature to track each I/O task.
And it is not readable if we add ifdef configure to enable this feature,
so in my mind that I suggest removing this latency track. And the
latency benefit demonstrated by SPDK is already approved, so we do not
need to tracking every I/O time when invoking SPDK driver.
Changcheng Liu [Mon, 13 Apr 2020 09:55:49 +0000 (17:55 +0800)]
cmake: use cmake module to integrate liburing
1. WITH_LIBURING is used to set HAVE_LIBURING to decide
use liburing in KernelDevice or not.
2. WITH_SYSTEM_LIBURING is to choose use system installed
liburing or build the liburing from source code.
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
Jason Dillaman [Fri, 17 Apr 2020 15:17:05 +0000 (11:17 -0400)]
rbd-mirror: track in-flight start/stop/restart in instance replayer
The shut down waits for in-flight ops to complete but the
start/stop/restart operations were previously not tracked. This
could cause a potential race and crash between an image replayer
operation and the instance replayer shutting down.
Fixes: https://tracker.ceph.com/issues/45072 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
rgw: reshard: skip stale bucket id entries from reshard queue
If we encounter a reshard queue entry that has an older ID compared to the
bucket's current ID, it'd mean that some other process or a manual reshard has
already processed this entry, skip processing the entry this time. An
alternative is to verify the num_shards that we have in queue >= the current
shards, but this would mean that we may reshard a recently manual resharded
bucket again which might not be intended
Fixes errors when calling `from_json` of these classes:
- InventoryHost: parsing labels
- ServiceDescription: `last_refresh` and `created` fields should be parsed
to datetime type.
Yan, Zheng [Fri, 20 Mar 2020 05:15:45 +0000 (13:15 +0800)]
client: reset requested_max_size if file write is not wanted
write can stuck at waiting for larger max_size in following sequence of
events:
- client opens a file and writes to position 'A' (larger than unit of
max size increment)
- client closes the file handle and updates wanted caps (not wanting
file write caps)
- client opens and truncates the file, writes to position 'A' again.
At the 1st event, client set inode's requested_max_size to 'A'. At the
2nd event, mds removes client's writable range, but client does not reset
requested_max_size. At the 3rd event, client does not request max size
because requested_max_size is already larger than 'A'.
* use `shell` lexer, otherwise the Python one is used, and the rendered
result does not look right
* be consistent when indenting -- either use tab or spaces, otherwise
the indent in code block would be wrong.
* double quote the variables in text
Matthew Oliver [Thu, 23 Jan 2020 00:02:24 +0000 (11:02 +1100)]
cephadm: add RGW SSL support
This patch adds SSL support to RGW when using cephadm.
If an SSL certificate is provided, inside the json supplied with:
cpeh orchestrator rgw create -i rgw.json
Then the SSL cert and/or key will be added to pushed into the mon config-key database
using the key `rgw/cert/<rgw_realm>/<rgw_zone>.[crt|key]`.
Which will then be referenced in the config:
Of course you could also just upload the cert and key yourself to
config-key location, and ssl will be enabled as well. But this patch
let's you either supply them via `-i` or as a manual upload step.
Co-Authored-By: Michael Fritch <mfritch@suse.com> Co-Authored-By: Sebastian Wagner <sebastian@spawnhost.de> Signed-off-by: Matthew Oliver <moliver@suse.com>
include/denc: replace bufferlist::copy with iterator version
This version was only compiled as part of ceph-object-corpus
generation, when ENCODE_DUMP_PATH is defined, so it was missed
when bufferlist::copy() was removed.
Jason Dillaman [Wed, 15 Apr 2020 20:27:07 +0000 (16:27 -0400)]
qa/workunits/rbd: retry the addition of a mirror pool peer
We might race with the remote rbd-mirror daemon creating a
tx-only peer when adding a new peer. Therefore, delete the
tx-only peer and attempt to re-create it.
Fixes: https://tracker.ceph.com/issues/44938 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Ramana Raja [Tue, 14 Apr 2020 11:13:33 +0000 (16:43 +0530)]
mon/FSCommands: Fix 'fs new' command
After creating a filesystem using the 'fs new' command, the value
of the 'data' and 'metadata' key of the datapool and metadatapool's
application tag 'cephfs' should be the filesystem's name. This
didn't happen when the data or metadata pool's application metadata
'cephfs' was enabled before the pool was used in the 'fs new' command.
Fix this during the handling of the 'fs new' command by setting the
value of the key of the pool's application metadata 'cephfs' to the
filesystem's name even when the application metadata 'cephfs' is
already enabled or set.
Fixes: https://tracker.ceph.com/issues/43761 Signed-off-by: Ramana Raja <rraja@redhat.com>