John Mulligan [Tue, 21 Jan 2025 21:28:42 +0000 (16:28 -0500)]
container: add label ceph=True back
Add a label used by cephadm internally that was always set by
ceph-container [1] back to the new containerfile. This should
prevent issues with cephadm shell command thinking official ceph images
are not official ceph images.
Ilya Dryomov [Thu, 30 Jan 2025 19:30:18 +0000 (20:30 +0100)]
doc/rbd: use https links in live import examples
Even though it's explicitly said that "http" stream can be used to
import via both HTTP and HTTPS, it can still be confusing that "type":
"http" is expected to go with "url": "https://...". Switch example
URLs from HTTP to HTTPS to make it more obvious.
Dan Mick [Thu, 23 Jan 2025 02:28:15 +0000 (18:28 -0800)]
container/build.sh: fix up org vs. repo naming
release builds were using the wrong container repo name because of
confused variable naming and inadequate separation. Keep the hostname,
org name, and repo name in separate variables, and assemble the full
path with a version when tagging is done.
Ilya Dryomov [Sat, 25 Jan 2025 10:11:14 +0000 (11:11 +0100)]
doc/rados: pool and namespace are independent osdcap restrictions
For the "profile {name}" syntax, pool and namespace restrictions are
independent of each other (i.e. specifying namespace doesn't also
require specifying pool like is currently suggested). A cap can look
like "profile rbd namespace=myns", signifying that the RBD profile is
to be allowed in myns namespace of any pool.
For the "allow {access-spec}" syntax, pool restriction is optional.
A cap can look like "allow r namespace=myns", "allow w object_prefix
myprefix" or "allow rw namespace=myns object_prefix myprefix", for
example.
Zac Dover [Fri, 24 Jan 2025 13:46:19 +0000 (23:46 +1000)]
doc/cephfs: edit disaster-recovery-experts (6 of x)
In doc/cephfs/disaster-recovery-experts.rst, incorporate Anthony's
suggestions in
https://github.com/ceph/ceph/pull/61462#discussion_r1923917812
and
https://github.com/ceph/ceph/pull/61462#discussion_r1923920724
and reword the sentences in the section "Using an alternate metadata
pool for recovery" to be in the imperative mood, which better suits the
ordered list format that was introduced in
https://github.com/ceph/ceph/pull/61493.
Follows https://github.com/ceph/ceph/pull/61493.
https://tracker.ceph.com/issues/69557
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com> Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 5670054bd0533c8f2507d0596797214da8ba489a)
Zac Dover [Thu, 23 Jan 2025 09:49:26 +0000 (19:49 +1000)]
doc/cephfs: edit disaster-recovery-experts (5 of x)
Put the procedure in the section called "Using an alternate metadata
pool for recovery" into an ordered list, so that it is in a proper
procedure format.
This commit is meant only to break the procedure into steps. The English
language in each of these steps could be improved, but that improvement
will be done after this formatting has been merged and backported.
Zac Dover [Tue, 21 Jan 2025 05:53:19 +0000 (15:53 +1000)]
doc/cephfs: edit disaster-recovery-experts (4 of x)
Edit the seventh and final section of
doc/cephfs/disaster-recovery-experts.rst in preparation for adding
deeper explanations of the contexts in which one should use the various
commands listed on that page.
The section edited in this commit is
* Using an alternate metadata pool for recovery
A future commit might beneficially put this section into the format of
an ordered list. If so, such a commit should only reformat the
content and should not make any changes to the English. It's enough to
verify content or format. Let's not overload our editorial faculties by
forcing ourselves to walk and chew gum at the same time.
Zac Dover [Tue, 7 Jan 2025 06:42:52 +0000 (16:42 +1000)]
doc/cephfs: edit grammar in snapshots.rst
This commit improves the grammar in doc/cephfs/snapshots.rst. The PR
associated with this commit follows from
https://github.com/ceph/ceph/pull/61240, the PR raised by Neeraj Pratap
Singh to introduce information about snapshots into the CephFS
documentation.
Aashish Sharma [Mon, 28 Oct 2024 10:09:52 +0000 (15:39 +0530)]
mgr/dashboard: fix total objects/Avg object size in RGW Overview Page
Till now we are calculating the total number of objects and the average
object size in the RGW Overview Page using `ceph df` command's output.
As per the discussion with RGW team, this data is not correct as S3
objects in rgw can occupy more than one rados object. This PR tends to
make the overview page's info in sync with the RGW bucket page's info.
Zac Dover [Sat, 18 Jan 2025 04:04:14 +0000 (14:04 +1000)]
doc/cephfs: edit disaster-recovery-experts (3 of x)
Edit the fifth and sixth sections of
doc/cephfs/disaster-recovery-experts.rst in preparation for adding
deeper explanations of the contexts in which one should use the various
commands listed on that page.
The sections edited in this commit are
- MDS Map Reset
- Recovery From Mission Metadata Objects
Zac Dover [Mon, 20 Jan 2025 05:33:36 +0000 (15:33 +1000)]
exporter: repair Squid ceph_exporter.cc
Restore the documentation of "--prio-limit" in
src/exporter/ceph_exporter.cc and remove the documentation of
"--cert-file" in src/exporter/ceph_exporter.cc. These two changes are
made to repair damage done to this file as a result of a
miscommunication in https://github.com/ceph/ceph/pull/61331.
Zac Dover [Sun, 19 Jan 2025 12:49:52 +0000 (22:49 +1000)]
doc/cephfs: disaster-recovery-experts cleanup
Properly wrap a poorly-formatted paragraph that looks just awful in an
80-column viewport and change MDS to "MDS daemons" where the latter
makes the sentence a lot clearer.
Zac Dover [Fri, 17 Jan 2025 12:33:49 +0000 (22:33 +1000)]
doc/cephfs: edit disaster-recovery-experts (2 of x)
Edit the third and fourth sections of
doc/cephfs/disaster-recovery-experts.rst in preparation for adding
deeper explanations of the contexts in which one should use the various
commands listed on that page.
Follows https://github.com/ceph/ceph/pull/61426
https://tracker.ceph.com/issues/69557
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com> Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 4f3a69eb919fc0d99cdf943f095ca3a951c82897)
This commit updates RGW Config Reference - Lifecycle Settings section. In particular it addresses an incorrect suggestion to decrease parallel threads in the workers pool for a more aggressive/accelerated per-bucket lifecycle processing. A more aggressive lifecycle processing for a bucket containing higher number of objects is achieved by increasing, not decreasing parallel threads.
Current suggestion is miss-leading.
Zac Dover [Thu, 16 Jan 2025 11:51:46 +0000 (21:51 +1000)]
doc/cephfs: edit disaster-recovery-experts
Edit the first two sections of doc/cephfs/disaster-recovery-experts.rst
in preparation for adding deeper explanations of the contexts in which
one should use the various commands listed on that page.
Zac Dover [Thu, 16 Jan 2025 15:49:04 +0000 (01:49 +1000)]
squid: src/exporter: revert incorrect lines
Revert part of 99f4eccb6bef444f86e6d6cbf579dc3ba975af98. The lines
removed here were reported to me by Anthony D'Atri, who says that Juan
Miguel Olmo told him that they should not be in the Squid branch.
See https://github.com/ceph/ceph/pull/61331#issuecomment-2596058701
Samuel Just [Fri, 31 May 2024 18:42:58 +0000 (11:42 -0700)]
test/librados/testcase_cxx: set_allow_ec_overwrites wait for overwrite to work
The mon command to enable ec overwrites succeeds once the mon commits
the update. However, actual IOs won't suceed until the map is actually
propagated to OSDs. Update set_allow_ec_overwrites to try performing
overwrites until it actually succeeds (with a 120s timelimit) before
returning.
Samuel Just [Fri, 31 May 2024 17:19:51 +0000 (17:19 +0000)]
test/librados/io_cxx: fix ec overwrites cleanup in CrcZeroWrite
We can't rely on recreating the pool at the end of the test case because
failing an assert in CrcZeroWrite would skip it. Instead, recreate the
pool in TearDown with other cleanup.
jiawd [Fri, 12 Nov 2021 03:48:56 +0000 (03:48 +0000)]
osd: full-object read crc is mismatch, because truncate modify oi.size and forget to clear data_digest
when write before truncate, need trim length, if truncate is to 0,
write is [0~128k], write change to [0~0], do nothing, oi.size is 0, x1 = set_data_digest(crc32(-1)).
write is [128k~128k], write change to [128k~0], truncate oi.size to offset 128k, x2 = set_data_digest(crc32(x1)).
write is [256k~128k], write change to [256k~0], truncate oi.size to offset 256k, x3 = set_data_digest(crc32(x2)).
...
write is [4063232~128k], write change to [4063232~0], truncate oi.size to offset 4063232, xn = set_data_digest(crs32(xn-1))
Now, we can see oi.size is 4063232, and data_digest is 0xffffffff, because thelength of in_data of crc is 0 every time.
when read verify crc will reply EIO. (EC pool).
so, when truncate in write, need clear data_digest and DIGEST flag,
when write before truncate, need to trim length, when offset over than oi.size, don't truncate oi.size to offset.
Fixes: https://tracker.ceph.com/issues/53240 Signed-off-by: jiawd <jiawendong@xtaotech.com>
(cherry picked from commit aeafd2e9a452d6a10b742c885dc44927b256c3bf)
Adam Kupczyk [Fri, 10 Jan 2025 08:26:54 +0000 (08:26 +0000)]
os/bluestore: Fix BlueFS::truncate()
In `struct bluefs_fnode_t` there is a vector `extents` and
the vector `extents_index` that is a log2 seek cache.
Until modifications to truncate() we never removed extents from files.
Modified truncate() did not update extents_index.
For example 10 extents long files when truncated to 0 will have:
0 extents, 10 extents_index.
After writing some data to file:
1 extents, 11 extents_index.
Now, `bluefs_fnode_t::seek` will binary search extents_index,
lets say it located seek at item #3.
It will then jump up from #0 extent (that exists) to #3 extent which
does not exist at.
The worst part is that code is now broken, as #3 != extent.end().
There are 3 parts of the fix:
1) assert in `bluefs_fnode_t::seek` to protect against
jumping outside extents
2) code in BlueFS::truncate to sync up `extents_index` with `extents`
3) dampening down assert in _replay to give a way out of cases
where incorrect "offset 12345" (12345 is file size) instead of
"offset 20000" (allocations occupied) was written to log.
Fixes: https://tracker.ceph.com/issues/69481 Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit 7f3601089d41bfc23f530c7bf3fb7efad2d055ec)
Adam Kupczyk [Fri, 10 Jan 2025 10:07:18 +0000 (10:07 +0000)]
os/bluestore: bluefs unittest for truncate bug
Unittest showing 2 different flavours of problems:
1) bluefs log corruption
2) bluefs sigsegv
Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit f2b5e2fa0a9274c1667fccafa597fff9be7a74b1)
+fixup for bad usage of std::string's fill constructor
This commit adds:
1. workflow summary in the first section along with an image.
2. sub-section "Pushing to ceph-ci repository" to second section.
3. file doc/dev/developer_guide/testing_integration_tests/workflow.png
Dongdong Tao [Fri, 22 Nov 2024 01:56:30 +0000 (10:56 +0900)]
osd: optimize extent comparison in PrimaryLogPG
Improve the performance of finish_extent_cmp by using bufferlist iterators
instead of array access operator[]. This change:
- Replaces O(N) array access with O(1) iterator operations
The original implementation used array access which has O(N) complexity
for each access in bufferlist (N being the number of buffers in a bufferlist).
The new version uses iterators which wprovide O(1) increment operations,
reducing the overall function complexity from O(M*N) to O(M) with M being the
length of the bufferlist.
Fixes: https://tracker.ceph.com/issues/69014 Signed-off-by: Dongdong Tao <dongdong.tao@canonical.com>
(cherry picked from commit 60797f6862f8387be2b09ad61e198a60c55383d5)