Commit Graph

125508 Commits

Author SHA1 Message Date
Kefu Chai
1d5b07a092 win32_deps_build.sh: only clone the tip of required tag
no need to clone the whole repo, just clone the tip of the specified
tag. this saves the bandwidth, disk IO and precious time.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-29 12:13:26 +08:00
Kefu Chai
b04248172d win32_deps_build.sh: bump snappy version to 1.1.9
in snappy, the commit of 26102a0c66175bc39edbf484c994a21902e986dc
fixes the SNAPPY_VERSION generation. and this commit was included by
v1.1.8 and v1.1.9.

also, in v1.1.9, a change was introduced, where the function signature
was changed, and more importantly, this change is not backward
compatible:

<   bool GetUncompressedLength(Source* source, uint32_t* result);
---
>   bool GetUncompressedLength(Source* source, uint32* result);

see also, https://tracker.ceph.com/issues/50934

so we check SNAPPY_VERSION to tell if we should use `uint32_t` or
`uint32`.

in this change, snappy version used to build win32 client is bumped
to the latest stable version, v1.1.9, to include the fix of
SNAPPY_VERSION. this paves the road to fix of https://tracker.ceph.com/issues/50934

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-29 12:13:26 +08:00
Nathan Cutler
4c13a798dc compression/snappy: use uint32_t to be compatible with 1.1.9
The snappy project made the following change in snappy.h between version 1.1.8
and 1.1.9:

<   bool GetUncompressedLength(Source* source, uint32_t* result);
---
>   bool GetUncompressedLength(Source* source, uint32* result);

This causes Ceph to FTBFS with snappy 1.1.9.

Thanks to Chris Denice for bringing this to our attention via Redmine.

Fixes: https://tracker.ceph.com/issues/50934
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-07-29 12:13:26 +08:00
Brad Hubbard
434b325c40
Merge pull request #42442 from badone/wip-insights-reports-non-persistent-storage
Don't persist report data

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2021-07-29 09:19:32 +10:00
Dimitri Savineau
3907ce7d6e cephadm: don't use ctx.fsid for clean_cgroup
The clean_cgroup method assumes that the ctx.fsid is set while this is
true for the bootstrap command, it isn't set for adopt or deploy commands
(and maybe others).

This ends up to the adopt command to fails:

Traceback (most recent call last):
  File "/sbin/cephadm", line 8301, in <module>
    main()
  File "/sbin/cephadm", line 8289, in main
    r = ctx.func(ctx)
  File "/sbin/cephadm", line 1764, in _default_image
    return func(ctx)
  File "/sbin/cephadm", line 5091, in command_adopt
    command_adopt_ceph(ctx, daemon_type, daemon_id, fsid)
  File "/sbin/cephadm", line 5299, in command_adopt_ceph
    osd_fsid=osd_fsid)
  File "/sbin/cephadm", line 2884, in deploy_daemon_units
    clean_cgroup(ctx, unit_name)
  File "/sbin/cephadm", line 2724, in clean_cgroup
    if not ctx.fsid:
  File "/sbin/cephadm", line 155, in __getattr__
    return super().__getattribute__(name)
AttributeError: 'CephadmContext' object has no attribute 'fsid'

Since we already have the fsid value in deploy_daemon_units (which calls
clean_cgroup) then we can pass the fsid value directly.

This fixes a regression introduced by 1fee255

Fixes: https://tracker.ceph.com/issues/51902

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2021-07-28 16:52:05 -04:00
Neha Ojha
847835aa7f
Merge pull request #42527 from ceph/ljflores-patch-3
doc/mgr/telemetry: fix formatting problem

Reviewed-by: Neha Ojha <nojha@redhat.com>
2021-07-28 13:00:32 -07:00
Adam King
d87f1ec841 mgr/cephadm: don't return hosts in offline_hosts set as schedulable
we are only checking for host status here but we
should also be checking the offline_hosts set

Signed-off-by: Adam King <adking@redhat.com>
2021-07-28 15:59:27 -04:00
Adam King
141072bc71 mgr/cephadm: fix unit test for don't touch offline hosts
We use an offline_hosts set for marking offline hosts
rather than the host status so changing this unit test
to reflect that

Signed-off-by: Adam King <adking@redhat.com>
2021-07-28 15:59:27 -04:00
Adam King
7c138ed52d mgr/cephadm: stop removal of daemons from offline hosts
This check was only looking for the status of the
host and not looking at the offline_hosts set so
it wasn't actually stopping daemons from being removed
from offline hosts

Signed-off-by: Adam King <adking@redhat.com>
2021-07-28 15:58:00 -04:00
Patrick Donnelly
665b36de4e Merge PR #42349 into master
* refs/pull/42349/head:
	mon/MDSMonitor: propose if FSMap struct_v is too old
	mon/MDSMonitor: give a proper error message if FSMap struct_v is too old
	mds/FSMap: use DECODE_OLDEST to gate FSMap version
	qa: add tests for fs dump of epoch and trimming
	qa: add file system support for dumping epoch
	mon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch
	mon: add debugging for trimming methods
	mon: fix debug spacing
	qa: add nofs upgrade suite

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2021-07-28 10:45:08 -07:00
Patrick Donnelly
3c00047f02 Merge PR #42199 into master
* refs/pull/42199/head:
	mds: add debugging when rejecting mksnap with EPERM

Reviewed-by: Milind Changire <mchangir@redhat.com>
2021-07-28 10:36:35 -07:00
Patrick Donnelly
4f0f51e4cb Merge PR #41025 into master
* refs/pull/41025/head:
	qa: wait pgs to be clean before using the pools
	qa: ignore PG_RECOVERY_FULL and PG_DEGRADED for mds-full
	qa: wait more time since there have many more pgs than before
	qa: do not multiple the full ratio twice
	qa: do not raise for kclient for _fsync test
	qa: use the pg autoscale mode to calcuate the pg_num
	qa: set the object_size to 1M
	qa: move the is_full() to parent class

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 10:34:12 -07:00
Patrick Donnelly
ca905165f7 Merge PR #38388 into master
* refs/pull/38388/head:
	mds: check rejoin_ack_gather before enter rejoin_gather_finish

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
2021-07-28 10:30:31 -07:00
Kefu Chai
985ce536d5
Merge pull request #42453 from sebastian-philipp/githubmap-rh
.githubmap: Update Sebastian Wagner's mapping

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: David Galloway <dgallowa@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-07-29 01:01:03 +08:00
Kefu Chai
04446b967c
Merge pull request #42501 from ybwang0211/doc-cap
doc/man: add missing right parenthesis in manpage.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-07-29 00:59:10 +08:00
Kefu Chai
cdc960e0eb
Merge pull request #42495 from hjwsm1989/wip-51842
crush: cancel upmaps with up set size != pool size

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2021-07-29 00:32:00 +08:00
Kefu Chai
afb2633cb8
Merge pull request #42511 from adk3798/shutil-copy-exception
cephadm: don't fail hard on SameFileError during shutil.copy

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-07-29 00:28:53 +08:00
Kefu Chai
b148620337
Merge pull request #40337 from ideepika/wip-bugzilla-1857447
mon/PGMap: remove DIRTY field in `ceph df detail` when cache tiering  is not in use

Reviewed-by: Neha Ojha <nojha@redhat.com>
2021-07-29 00:21:49 +08:00
Kefu Chai
656ea3c171
Merge pull request #42508 from cybozu/kv-rocksdbstore-enrich-debug-message
kv/RocksDBStore: enrich debug message

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-07-29 00:20:09 +08:00
Kefu Chai
5311c2ffb5
Merge pull request #42500 from ybwang0211/doc-list-get-attr
tools/rados: improve the usage message of {get,set}omapaheader

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-07-29 00:19:51 +08:00
Daniel Gryniewicz
61120ff147 RGW - Zipper - MultipartUpload
Create a MultipartUpload object in the Zipper API.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2021-07-28 12:19:18 -04:00
Daniel Gryniewicz
ee35d48ca7 Remove get_raw_obj() from Object
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2021-07-28 12:09:36 -04:00
Daniel Gryniewicz
c35887afb8 rgw - Configure ceph.conf for orphan-list
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2021-07-28 12:09:36 -04:00
Sage Weil
addbb8997d mon/LogMonitor: fix crash when cluster log file is not writeable
If we are in this block, then p == channel_fds.end() and p->first is not
valid.

Also, no need to populate channel_fds with an fd of -1.

Fixes: https://tracker.ceph.com/issues/51816
Signed-off-by: Sage Weil <sage@newdream.net>
2021-07-28 11:45:19 -04:00
Laura Flores
1734647008
doc/mgr/telemetry: fix formatting problem
There was strange bolding and bullet point placement due to a missing new line in the perf description.

Signed-off-by: Laura Flores <lflores@redhat.com>
2021-07-28 10:11:17 -05:00
Kefu Chai
ff3161f8a5
Merge pull request #42502 from tchaikov/wip-bloomfilter-cleanups
include/intarith, common/bloom_filter: add popcount() and cleanups

Reviewed-by: Sage Weil <sage@redhat.com>
2021-07-28 22:56:52 +08:00
Guillaume Abrioux
38882161cc ceph-volume/tests: retry when destroying osd
Sometimes, it can happen that the osds being destroyed in those tests
are not yet marked as 'down' for some reason. Let's add some retries on
those tasks to avoid CI failures.

Fixes: https://tracker.ceph.com/issues/51903

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2021-07-28 16:46:33 +02:00
Patrick Donnelly
56c3fc802e mon/MDSMonitor: propose if FSMap struct_v is too old
To flush older versions which may still be an empty MDSMap (for clusters
that have never used CephFS), we need to force a proposal so older
versions of the struct are trimmed.

This is the main fix of this branch. We removed code which processed old
encodings of the MDSMap in the mon store via 60bc524. That broke old
ceph clusters which never used CephFS (see cited ticket below).  This is
because the initial epoch is an empty MDSMap (back in Infernalis/Hammer)
that is never updated. So, the fix here is to just do proposals
periodically until all of the old structs are automatically trimmed by
the mons.

Fixes: 60bc524827
Fixes: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Patrick Donnelly
4298f97581 mon/MDSMonitor: give a proper error message if FSMap struct_v is too old
Fixes: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Patrick Donnelly
47a8273fae mds/FSMap: use DECODE_OLDEST to gate FSMap version
This throws a proper exception which can be handled.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Patrick Donnelly
5ddaa36d17 qa: add tests for fs dump of epoch and trimming
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Patrick Donnelly
ee899d9a44 qa: add file system support for dumping epoch
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Patrick Donnelly
d9dc2f11d5 mon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch
The PaxosService code already excludes the value returned by
PaxosService::get_trim_to as the upper bound of the range of epochs to
trim. Without this fix, you need to set mon_mds_force_trim_to to one
greater than the epoch you want to trim _and_ force the current epoch to
be one greater than that; the net result being that you can only force
trimming up to 2 epochs behind the current epoch.

This change is helpful for resolving issue 51673, but not strictly
necessary.

Related-to: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Patrick Donnelly
9297690e9a mon: add debugging for trimming methods
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Patrick Donnelly
147c27c033 mon: fix debug spacing
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Patrick Donnelly
9941188116 qa: add nofs upgrade suite
This adds an upgrade suite to ensure that a Ceph cluster without a
CephFS file system does not blow up on upgrade (in particular, that the
MDSMonitor does not trip). This was developed to potentially reproduce
tracker 51673 but the actual cause for that issue was an old encoding
for the MDSMap which was obsoleted in Pacific. You must create a cluster
older than the FSMap (~Hammer or Infernalis) to reproduce. In any case,
this upgrade suite may be useful in the future so let's keep it!

Related-to: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-07-28 07:07:05 -07:00
Michael Fritch
f0609429c0
cephadm: validate fsid during ceph-volume command
Signed-off-by: Michael Fritch <mfritch@suse.com>
2021-07-28 07:44:09 -06:00
Michael Fritch
25febfd9e0
cephadm: validate fsid during shell command
Signed-off-by: Michael Fritch <mfritch@suse.com>
2021-07-28 07:44:09 -06:00
Jeff Layton
75a3336c34 test: add a test for zero-length OP_ZERO request
This triggered an assertion before. Verify that it's a no-op now.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2021-07-28 08:27:17 -04:00
Aaryan Porwal
e61f884190 mgr/dashboard: Visual regression tests for dashboard component
Signed-off-by: Aaryan Porwal <aaryanporwal2233@gmail.com>
2021-07-28 14:36:51 +05:30
Aaryan Porwal
7d69309cf9 Added visual regression tests for login component
Signed-off-by: Aaryan Porwal <aaryanporwal2233@gmail.com>
2021-07-28 14:36:51 +05:30
Alfonso Martínez
890f42fafa mgr/dashboard: backend unit tests: decouple from build dir
After https://github.com/ceph/ceph/pull/42255 some unit tests got coupled
to the frontend folder of the build dir.
Backend unit tests do not need a build folder: they only test our business logic.

Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2021-07-28 09:51:52 +02:00
Yuval Lifshitz
aa14f3dd17
Merge pull request #42169 from Matan-B/lua-nats-example
rgw: Add an example for lua scripting
2021-07-28 10:16:30 +03:00
Yuval Lifshitz
e527b8ce55
Merge pull request #42350 from TRYTOBE8TME/wip-rgw-notification
rgw/notifications: Change in multipart upload notification behavior
2021-07-28 10:13:10 +03:00
Soumya Koduri
1da1e98a83 rgw/dbstore: Add DBStore base class def to namespace rgw::store
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
2021-07-28 12:15:13 +05:30
Soumya Koduri
2a3e3be238 rgw/dbstore: Use dpp for logging
Aligning with other Ceph RGW modules, use dpp for logging.
A default dpp is defined for DBStore to be used for unit-tests.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
2021-07-28 12:15:13 +05:30
Soumya Koduri
0d1868805b rgw/dbstore: Use CEPH RGW logging in ceph context
When running dbstore as RGW backend, use the logging mechanism
and config values provided by default by RGW.
For other tests, set logfile and loglevel to the input values provided.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
2021-07-28 12:15:07 +05:30
Soumya Koduri
67be96413d rgw/dbstore: DB backend for RGW
As part of Zipper, adding support for DB backend (using SQLite) for Stackable RGW.

The base class methods implemented are generic which could be extended to any backend database, not just SQLite.

More details on design/implementation can be found at -
https://docs.google.com/document/d/1xCoHT5DCujqbe1pnEfYpSaSqiBcW8z87CgQCC5LivOo/edit#

Current status:

[Done]
- User related APIs
- Bucket APIs
- Testcases (using Gtest) to test the DBStore APIs

[Not handled in the first pass]
- Quota
- Usage Stats
- Swift Users
- Multiple Zones/Zonegroups

[WIP]
- Object APIs

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
2021-07-28 12:10:16 +05:30
Xiubo Li
361ee535dd qa: multifs already enabled as default
Since pacific already mark multifs enabled as defaut.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
2021-07-28 13:56:10 +08:00
Kefu Chai
4f9fa25ce0 common/bloom_filter: move bloom_filter::density() to .cc
for faster compilation, also, bloom_filter::density()
is not sitting in the critical paths, so no need to make it an
inline function.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-28 12:57:13 +08:00