Conflicts:
src/test/mon/MonMap.cc
- do not attempt to introduce boost::intrusive_ptr into Nautilus
- monmap.build_initial takes bare cct in nautilus (master: cct.get())
Conflicts:
src/test/mon/MonMap.cc
- do not attempt to introduce boost::intrusive_ptr into nautilus
- monmap.build_initial takes bare cct in nautilus (master: cct.get())
blk/kernel: retry forever if bdev_flock_retry is 0
retry forever if cct->_conf->bdev_flock_retry is 0.
systemd-udevd is most likely the reason why ceph-osd fails to
acquire the flock when "mkfs", because systemd-udevd probes
all block devices when the device changes in the system using
libblkid, and when systemd-udevd starts looking at the device
it takes a `LOCK_SH|LOCK_NB` lock. and it releases the lock
right after done with it. so normally, it only takes a jiffy,
see
https://github.com/systemd/systemd/blob/ee0b9e721a368742ac6fa9c3d9a33e45dc3203a2/src/shared/lockfile-util.c#L18
so, we just need to retry couple times before acquiring the
lock.
blk/kernel: use open file description lock if available
* use OFD lock if available. OFD is Linux specific, and only available
on 3.15 kernels. OFD is able to synchronize both threads and
processes. and has simpler semantics. this is just a cleanup.
as we don't create threads for acquiring the flock.
* use BSD flock(2) as a fallback
* return the errno right away, without printing logging messages.
for two reasons:
- writing logging messages would reset the errno.
- the caller of _lock() also prints the logging messages along
with strerror(errno)
also drop bdev_flock_retry and bdev_flock_retry_interval from
legacy_config_opts.h, as `KernelDevice::_lock()` is not in the critical
path, there is no need to access these settings via member variables --
get_val<> would just suffice.
Mykola Golub [Mon, 13 Jan 2020 08:36:39 +0000 (08:36 +0000)]
mgr: fix race between module load and notify
When starting a module, there was a time window between we
registered the module in the module list and loaded it in the
finisher thread, when a notify could be delivered to not fully
initialized module.
We can avoid this by delaying registering the module in the
module list until it is successfully initialized.
When the block changes, systemd-udevd will open the block,
read some information and close it. Then a failure occurs here.
So we need to try again here.
Igor Fedotov [Fri, 29 May 2020 19:28:15 +0000 (22:28 +0300)]
test/objectstore/store_test: kill ExcessiveFragmentation test case.
This test case was introduced by https://github.com/ceph/ceph/pull/18494
to verify allocation failure handling while gifting during bluefs rebalance
Not it looks outdated as there is no periodic gifting any more.
Fixes: https://tracker.ceph.com/issues/45788 Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit b852703dd01a66028c0d123ac3579e1611393afe)
Jason Dillaman [Mon, 21 Sep 2020 16:53:37 +0000 (12:53 -0400)]
osdc/ObjectCacher: overwrite might cause stray read request callbacks
In librbd, if readahead is active, there might be a pending read request
for the cache which is then (partially) overwritten by a write request.
This overwrite will cause bh splits and merges which can cause the
bh read callback to fail to invoke the pending read callbacks.
Fixes: https://tracker.ceph.com/issues/46822 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 94d43165ed7319d163640f38d154f8f80408eb14)
qa/workunits/rbd: yet another attempt to improve rbd-nbd unmap
Previously it still could race when unmap_device returned success
because the device was not found in `rbd-nbd list-mapped` (the nbd
device was removed) but the test failed because the process was still
found in the ps table.
KeyCount should return object count + common prefix count.
see S3 example: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_Example_5
rgw: radosgw-admin should paginate internally when listing bucket
Currently `radosgw-admin bucket list ...`, when listing a bucket, asks
for the value of "--max-entries" internally. To list a large bucket
entirely the user would have to set "--max-entries" to a large value
(e.g., 10000000). Internally this doesn't paginate, so it will try to
produce the entire list at once. This can consume a lot of memory, and
there are known cases where this induces an out-of-memory crash.
So now we'll set a maximum pagination size of 10,000. So even with
large values of "--max-entries" it will still be able to produce the
full listing without stressing memory, because it will ask for at most
10,000 entries at a time.
Conflicts:
src/rgw/rgw_admin.cc
- RGWRados::Bucket::List.list_objects() does not take null_yield
argument in nautilus
- formatter does not have get() method in nautilus
Or Friedmann [Thu, 23 Jul 2020 15:36:07 +0000 (18:36 +0300)]
rgw: fix expiration header returned even if there is only one tag in the object the same as the rule
Expiration header returned even if there is only one tag in the object the same as the rule
Signed-off-by: Or Friedmann <ofriedma@redhat.com> Reported-by: Avi Mor <avmor@redhat.com> Fixes: https://tracker.ceph.com/issues/46614
(cherry picked from commit bf7c7e59f390afb53cb1e30a440ab26bb093c11c)
Conflicts:
src/rgw/rgw_lc.cc
- whitespace (effectively no conflict)
luo rixin [Tue, 1 Sep 2020 09:06:40 +0000 (17:06 +0800)]
rgw/rgw_file: Fix the incorrect lru object eviction
In func lookup_fh, when RGWFileHandle not be found in fh_cache, it
need to recycle an object and create an new RGWFileHandle. When there
are multi threads use lookup_fh to find and create RGWFileHandle concurrently,
it must to make sure evict lru object from the partiton of fh_cache which new
RGWFileHandle will be inserted to.
Fixes: https://tracker.ceph.com/issues/47235 Signed-off-by: luo rixin <luorixin@huawei.com>
(cherry picked from commit f2097338722d7f2526bb815da47695f2da17fcce)
rgw: rgw-orphan-list should use "plain" formatted `rados ls` output
The previous version that used "json-pretty" output for `rados ls`
added complications due to json's escaping of special characters. So
this version returns to the "plain" output for `rados ls` but deals
with entries (oids) that might have namespaces and/or locators as
well.
rgw: allow rgw-orphan-list to note when rados objects are in namespace
Currently namespaces and locators are ignored when `rados ls` is run
by rgw-orphan-list to record RADOS's known objects.
However there have been cases where RADOS objects have a locator, and
when one is included in the listing, the script does not handle it
correctly. Now when objects have locators, we will prevent their
output from entering the .intermediate file.
Additionally we do not expect RGW data objects to be in RADOS
namespaces, so when a namespaced object is detected, we'll error out
with a message.
rgw: fix setting of namespace in ordered and unordered bucket listing
The namespace is not always set correctly during bucket listing. This
can, for example, cause the listing of incomplete multipart uploads,
which are in the _multipart_ namespace, to not paginate correctly, and
cause entries to be re-listed.
J. Eric Ivancich [Fri, 31 Jan 2020 20:01:40 +0000 (15:01 -0500)]
rgw: fix bug with (un)ordered bucket listing and marker w/ namespace
When listing without specifying a namespace, the returned entries
could be in one or more namespaces. The marker used to continue the
listing may therefore contain a namespace, and that needs to be
preserved. This fixes a bug in both ordered and unordered listings
where it was not preserved.
Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.html
- line 24: span class "invalid feedback" is not available in nautilus, keeping "help-block" instead
Jan Fajerski [Thu, 8 Oct 2020 06:45:26 +0000 (08:45 +0200)]
ceph-volume: don't exit before empty report can be printed
get_plan() called exit in case of an empty plan. This prevented a report
being printed under these circumstances. Avoid exit in this case. Also
adds tests to ensure an empty report is printed.
Fixes: https://tracker.ceph.com/issues/47760 Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 0cc5604843b215709a681fa402145c9fa403b1dd)
mon: set session_timeout when adding to session_map
With msgr2, the session is added in Monitor::ms_handle_accept()
which is queued by ProtocolV2 at the end of handling CLIENT_IDENT
frame, before responding with SERVER_IDENT frame. session_timeout
is 0 and gets set only in Monitor::ms_dispatch(), so if the session
trimming code in Monitor::tick() gets to the session before the peer
receives our SERVER_IDENT, handles it, sends the first message and
we receive it, the session is wrongly closed.
This doesn't happen with msgr1, because there the session is added in
Monitor::ms_dispatch(), upon receive of the first message (MSG_AUTH).
Matt Benjamin [Wed, 30 Sep 2020 19:13:04 +0000 (15:13 -0400)]
rgw_file: avoid long-ish delay on shutdown
Normal shutdown was likely to be delayed a substantial fraction
of rgw_nfs_namespace_expire_secs due to an ill-advised use of
this_thread::sleep_for.
Fixes: https://tracker.ceph.com/issues/47710 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 805f74956489e3158437acc1c3c12f267221843e)
Mark Nelson [Fri, 24 Jul 2020 05:29:15 +0000 (05:29 +0000)]
mds/CInode: Optimize only pinned by subtrees check
Fixes: https://tracker.ceph.com/issues/46727 Signed-off-by: Mark Nelson <mnelson@redhat.com>
(cherry picked from commit 6a865f805b723525358ed8e79bb3d41709e98bf3)
Conflicts:
src/mds/MDCache.cc
- use the nautilus code flow of trim instead master
Sebastian Krah [Tue, 19 Nov 2019 10:41:49 +0000 (11:41 +0100)]
mgr/dashboard: Don't use any xlf file when building the default language
The build-i18n script no longer uses a xlf file when building the default
language. This means that we don't need to keep the messages.en-US.xlf in the repository anymore.
Fixes: https://tracker.ceph.com/issues/42693 Signed-off-by: Sebastian Krah <skrah@suse.com>
(cherry picked from commit 5efe0a3ab25e26421001033bd7ea36c86aca2b02)
Conflicts:
src/pybind/mgr/dashboard/frontend/src/locale/messages.en-US.xlf
- Deleted this file