]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agoos/bluestore: fix erroneous SharedBlob record removal during repair. 42423/head
Igor Fedotov [Fri, 9 Jul 2021 18:13:48 +0000 (21:13 +0300)]
os/bluestore: fix erroneous SharedBlob record removal during repair.

Fixes: https://tracker.ceph.com/issues/51619
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 7090930d4a2e6f2efdecaff23f9a2f795e7819fb)

4 years agoMerge pull request #42297 from callithea/wip-51558-pacific
Ernesto Puerta [Mon, 19 Jul 2021 17:53:20 +0000 (19:53 +0200)]
Merge pull request #42297 from callithea/wip-51558-pacific

pacific: mgr/dashboard: fix Accept-Language header parsing

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: huww98 <NOT@FOUND>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
4 years agoMerge pull request #42346 from adamemerson/wip-51674-pacific
Yuri Weinstein [Mon, 19 Jul 2021 15:04:50 +0000 (08:04 -0700)]
Merge pull request #42346 from adamemerson/wip-51674-pacific

rgw: Backport of 51674 to Pacific

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42336 from adamemerson/wip-51661-pacific
Yuri Weinstein [Mon, 19 Jul 2021 15:04:34 +0000 (08:04 -0700)]
Merge pull request #42336 from adamemerson/wip-51661-pacific

pacific: rgw: Don't segfault on datalog trim

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42166 from batrick/i51499
Yuri Weinstein [Mon, 19 Jul 2021 15:03:54 +0000 (08:03 -0700)]
Merge pull request #42166 from batrick/i51499

pacific: qa: test_ls_H_prints_human_readable_file_size failure

Reviewed-by: Jos Collin <jcollin@redhat.com>
4 years agoMerge pull request #42354 from rhcs-dashboard/wip-51685-pacific
Yuri Weinstein [Mon, 19 Jul 2021 15:02:13 +0000 (08:02 -0700)]
Merge pull request #42354 from rhcs-dashboard/wip-51685-pacific

pacific: mgr/dashboard: Fix test_error force maintenance dashboard check

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Aaryan Porwal <aaryanporwal2233@gmail.com>
4 years agopacific: qa: avoid sudo on tmpfile 42166/head
Patrick Donnelly [Mon, 12 Jul 2021 15:18:27 +0000 (08:18 -0700)]
pacific: qa: avoid sudo on tmpfile

This code does not exist in master. This is a continuation of the fix
for the backport. Resolves failures like [1].

[1] /ceph/teuthology-archive/yuriw-2021-07-08_23:33:26-fs-wip-yuri2-testing-2021-07-08-1142-pacific-distro-basic-smithi/6260232/teuthology.log

Fixes: https://tracker.ceph.com/issues/51704
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42228 from cfsnyder/wip-51188-pacific
Yuri Weinstein [Thu, 15 Jul 2021 15:35:30 +0000 (08:35 -0700)]
Merge pull request #42228 from cfsnyder/wip-51188-pacific

pacific: mgr/telemetry: pass leaderboard flag even w/o ident

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42229 from cfsnyder/wip-51556-pacific
Yuri Weinstein [Thu, 15 Jul 2021 15:34:41 +0000 (08:34 -0700)]
Merge pull request #42229 from cfsnyder/wip-51556-pacific

pacific: mon: return -EINVAL when handling unknown option in 'ceph osd pool get'

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42323 from cfsnyder/wip-51080-pacific
Yuri Weinstein [Thu, 15 Jul 2021 15:15:07 +0000 (08:15 -0700)]
Merge pull request #42323 from cfsnyder/wip-51080-pacific

pacific: rgw: require bucket name in bucket chown

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agoMerge pull request #42321 from cfsnyder/wip-51514-pacific
Yuri Weinstein [Thu, 15 Jul 2021 15:14:36 +0000 (08:14 -0700)]
Merge pull request #42321 from cfsnyder/wip-51514-pacific

pacific: rgw/notifications: support metadata filter in CompleteMultipartUpload and Copy events

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42320 from cfsnyder/wip-51221-pacific
Yuri Weinstein [Thu, 15 Jul 2021 15:13:55 +0000 (08:13 -0700)]
Merge pull request #42320 from cfsnyder/wip-51221-pacific

pacific: RGW - Don't move attrs before setting them

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agoMerge pull request #42226 from cfsnyder/wip-51547-pacific
Yuri Weinstein [Thu, 15 Jul 2021 14:49:12 +0000 (07:49 -0700)]
Merge pull request #42226 from cfsnyder/wip-51547-pacific

pacific: src/pybind/mgr/mirroring/fs/snapshot_mirror.py: do not assume a cephf…

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Sébastien Han <seb@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
4 years agoMerge pull request #42225 from cfsnyder/wip-51424-pacific
Yuri Weinstein [Thu, 15 Jul 2021 14:47:48 +0000 (07:47 -0700)]
Merge pull request #42225 from cfsnyder/wip-51424-pacific

pacific: mgr: set debug_mgr=2/5 (so INFO goes to mgr log by default)

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #42223 from cfsnyder/wip-51498-pacific
Yuri Weinstein [Thu, 15 Jul 2021 14:47:16 +0000 (07:47 -0700)]
Merge pull request #42223 from cfsnyder/wip-51498-pacific

pacific: mgr/DaemonServer: skip redundant update of pgp_num_actual

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agomgr/dashboard: Fix test_error force maintenance dashboard check 42354/head
Nizamudeen A [Wed, 12 May 2021 10:07:40 +0000 (15:37 +0530)]
mgr/dashboard: Fix test_error force maintenance dashboard check

Fixes: https://tracker.ceph.com/issues/50771
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 871e5995cbbafaa980f6df383e375359b4364428)

4 years agorgw: Robust notify invalidates on cache timeout 42346/head
Adam C. Emerson [Wed, 14 Jul 2021 15:02:21 +0000 (11:02 -0400)]
rgw: Robust notify invalidates on cache timeout

This avoids a potential race condition in which updates are delayed.

Fixes: https://tracker.ceph.com/issues/51674
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 76247990ff38049ee32dd47d31482b9648353673)

Conflicts:
         src/rgw/services/svc_notify.cc
     - Skip the renaming, since this is a backport and that's mostly a
       matter of futureproofing.

Backport: https://tracker.ceph.com/issues/51679
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
4 years agorgw: distribute() takes RGWCacheNotifyInfo
Adam C. Emerson [Wed, 7 Jul 2021 22:47:00 +0000 (18:47 -0400)]
rgw: distribute() takes RGWCacheNotifyInfo

So we don't have to parse the bufferlist back out to find what object
to throw out of the cache.

Fixes: https://tracker.ceph.com/issues/51674
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 7f952ad80114096322f202ba58279aaa4a002313)
Backport: https://tracker.ceph.com/issues/51679
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
4 years agoMerge pull request #42258 from sseshasa/wip-51603-pacific
Neha Ojha [Wed, 14 Jul 2021 16:49:56 +0000 (09:49 -0700)]
Merge pull request #42258 from sseshasa/wip-51603-pacific

pacific: qa/standalone: Add missing cleanups after completion of a subset of osd and scrub tests.

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42231 from cfsnyder/wip-51081-pacific
Yuri Weinstein [Wed, 14 Jul 2021 15:21:08 +0000 (08:21 -0700)]
Merge pull request #42231 from cfsnyder/wip-51081-pacific

pacific: rgw: parse tenant name out of rgwx-bucket-instance

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42230 from cfsnyder/wip-51329-pacific
Yuri Weinstein [Wed, 14 Jul 2021 15:20:39 +0000 (08:20 -0700)]
Merge pull request #42230 from cfsnyder/wip-51329-pacific

pacific: rgw: avoid infinite loop when deleting a bucket

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agorgw: Don't segfault on datalog trim 42336/head
Adam C. Emerson [Tue, 13 Jul 2021 20:05:47 +0000 (16:05 -0400)]
rgw: Don't segfault on datalog trim

Synchronous (or yielded, basically other-than AioCompletion trim)
would try to dereference the past-the-end iterator if we were trimming
to a point in the most recent generation.

https://tracker.ceph.com/issues/51661
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 97305f03c16db1cfaceef04a74ee510bc1fc1e80)
https://tracker.ceph.com/issues/51675
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
4 years agoMerge pull request #42233 from smithfarm/wip-51579-pacific
Yuri Weinstein [Wed, 14 Jul 2021 14:25:06 +0000 (07:25 -0700)]
Merge pull request #42233 from smithfarm/wip-51579-pacific

pacific: common/Formatter: include used header

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42221 from neha-ojha/wip-50393-pacific
Yuri Weinstein [Wed, 14 Jul 2021 14:23:45 +0000 (07:23 -0700)]
Merge pull request #42221 from neha-ojha/wip-50393-pacific

pacific: qa/workunits/mon/test_mon_config_key: use subprocess.run() instead of proc.communicate()

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #42165 from batrick/i51500
Yuri Weinstein [Wed, 14 Jul 2021 14:23:09 +0000 (07:23 -0700)]
Merge pull request #42165 from batrick/i51500

pacific: qa: FileNotFoundError: [Errno 2] No such file or directory: '/sys/kernel/debug/ceph/3fab6bea-f243-47a4-a956-8c03a62b61b5.client4721/mds_sessions'

Reviewed-by: Jos Collin <jcollin@redhat.com>
4 years agoMerge pull request #42088 from lxbsz/wip-51285
Yuri Weinstein [Wed, 14 Jul 2021 14:22:28 +0000 (07:22 -0700)]
Merge pull request #42088 from lxbsz/wip-51285

pacific: mds: to print the unknow type value

Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoMerge pull request #42086 from kotreshhr/wip-51200-pacific
Yuri Weinstein [Wed, 14 Jul 2021 14:21:23 +0000 (07:21 -0700)]
Merge pull request #42086 from kotreshhr/wip-51200-pacific

pacific: mgr/volumes: Add config to insert delay at the beginning of the clone

Reviewed-by: Jos Collin <jcollin@redhat.com>
4 years agoMerge pull request #39834 from sebastian-philipp/pacific-backport-39131-39373
Yuri Weinstein [Wed, 14 Jul 2021 14:18:51 +0000 (07:18 -0700)]
Merge pull request #39834 from sebastian-philipp/pacific-backport-39131-39373

pacific: mgr/rook: Add timezone info

Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Varsha Rao <varao@redhat.com>
4 years agoMerge pull request #42316 from rhcs-dashboard/wip-51657-pacific
Ernesto Puerta [Wed, 14 Jul 2021 11:44:02 +0000 (13:44 +0200)]
Merge pull request #42316 from rhcs-dashboard/wip-51657-pacific

pacific: mgr/dashboard: remove usage of 'rgw_frontend_ssl_key'

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agorgw: require bucket name in bucket chown 42323/head
Zulai Wang [Thu, 3 Jun 2021 05:13:15 +0000 (13:13 +0800)]
rgw: require bucket name in bucket chown

Checking and reporting missing the mandatory parameter avoid clueless error
message for bucket chown.

Signed-off-by: Zulai Wang <zl31wang@gmail.com>
(cherry picked from commit 158a1f4313c0fa206031ede6f48a26c0c7467d57)

4 years agorgw/notifications: support metadata filter in COPY events 42321/head
Yuval Lifshitz [Thu, 17 Jun 2021 13:08:32 +0000 (16:08 +0300)]
rgw/notifications: support metadata filter in COPY events

Fixes: https://tracker.ceph.com/issues/51261
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com> (cherry picked from commit
e7f30a1b278455567f1f1069f41c9a1c3ef335c2)

Conflicts:
        src/rgw/rgw_notify.cc
        src/rgw/rgw_notify.h
        src/test/rgw/bucket_notification/test_bn.py

Cherry-pick notes:
- handle differences due to renaming of rgw::sal::RGWObject to rgw::sal::Object
- handle differences due to move of test_ps_s3_metadata_on_master test from tests_ps.py to test_bn.py

4 years agoRGW - Don't move attrs before setting them 42320/head
Daniel Gryniewicz [Tue, 8 Jun 2021 16:59:56 +0000 (12:59 -0400)]
RGW - Don't move attrs before setting them

Moving the attrs into s->bucket_attrs before setting them results in
setting empty attrs into the bucket.  This means that reading them back
later gets empty attrs, which can cause a segfault.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
(cherry picked from commit 4d38154f5779b01ed93430ef7405417820214796)

Conflicts:
src/rgw/rgw_op.cc

4 years agomgr/dashboard: remove usage of 'rgw_frontend_ssl_key' 42316/head
Avan Thakkar [Tue, 13 Jul 2021 12:41:10 +0000 (18:11 +0530)]
mgr/dashboard: remove usage of 'rgw_frontend_ssl_key'

Fixes: https://tracker.ceph.com/issues/51643
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Removing the usage of rgw_frontend_ssl_key from the rgw service form.

(cherry picked from commit f6afed5aa51d80257b4883c976bbae7c3b5cc524)

4 years agoMerge pull request #42264 from yuriw/wip-yuriw-p2p-pacific
Yuri Weinstein [Tue, 13 Jul 2021 15:04:19 +0000 (08:04 -0700)]
Merge pull request #42264 from yuriw/wip-yuriw-p2p-pacific

qa/tests: advanced pacific version to reflect the latest 16.2.5 point

4 years agomgr/dashboard: fix Accept-Language header parsing 42297/head
胡玮文 [Mon, 5 Jul 2021 13:27:57 +0000 (21:27 +0800)]
mgr/dashboard: fix Accept-Language header parsing

Fix 400 error caused by multi-subtag language in Accept-Language header.
Reproduced by Firefox for Android in Chinese.

The regex expression is fixed according to https://datatracker.ietf.org/doc/html/rfc4647#section-2.1

Fixes: https://tracker.ceph.com/issues/51528
Signed-off-by: 胡玮文 <huww98@outlook.com>
(cherry picked from commit c7b2d079a3323765e2c56e24309c89728c1b8b6a)

4 years agoMerge pull request #40694 from singuliere/wip-50209-pacific
Yuri Weinstein [Mon, 12 Jul 2021 16:04:36 +0000 (09:04 -0700)]
Merge pull request #40694 from singuliere/wip-50209-pacific

pacific: qa/rgw: move ignore-pg-availability.yaml out of suites/rgw

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42093 from thotz/rgwkmsvaultsslsupport-pacific
Yuri Weinstein [Mon, 12 Jul 2021 16:03:14 +0000 (09:03 -0700)]
Merge pull request #42093 from thotz/rgwkmsvaultsslsupport-pacific

pacific: rgw: extending existing ssl support for vault KMS

Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
4 years agoMerge pull request #42265 from neha-ojha/wip-rn-cleanup
Neha Ojha [Fri, 9 Jul 2021 17:51:54 +0000 (10:51 -0700)]
Merge pull request #42265 from neha-ojha/wip-rn-cleanup

pacific: doc/releases/pacific.rst: remove notes about autoscaler

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
4 years agoqa/tests: advanced pacific version to reflect the latest 16.2.5 point 42264/head
Yuri Weinstein [Fri, 9 Jul 2021 15:13:40 +0000 (08:13 -0700)]
qa/tests: advanced pacific version to reflect the latest 16.2.5 point

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agodoc/releases/pacific.rst: remove notes about autoscaler 42265/head
Neha Ojha [Fri, 9 Jul 2021 15:54:02 +0000 (15:54 +0000)]
doc/releases/pacific.rst: remove notes about autoscaler

This was reverted in 504d0cb120f02b1940f81505bd37a54773625af0, but
got added back by mistake in 6a3dde8b498af5e33242955a0609b0e27adf4877.

The relevant code in master was not reverted and is being reworked, we'll
update PendingReleaseNotes in master after that.

Signed-off-by: Neha Ojha <nojha@redhat.com>
4 years agoqa/standalone: Add missing teardowns to a subset of osd-scrub-repair tests 42258/head
Sridhar Seshasayee [Wed, 7 Jul 2021 19:09:26 +0000 (00:39 +0530)]
qa/standalone: Add missing teardowns to a subset of osd-scrub-repair tests

Tests identified with missing teardown within osd-scrub-repair.sh:
  1. TEST_periodic_scrub_replicated()
  2. TEST_scrub_warning()
  3. TEST_request_scrub_priority()

Centralize setup and teardown within the run() function for all the tests.

Fixes: https://tracker.ceph.com/issues/51580
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
(cherry picked from commit 84cab65e3aafcf656b860abd72a09799458f6bc5)

 Conflicts:
qa/standalone/scrub/osd-scrub-repair.sh
 - Removed non-existent test TEST_auto_repair_bluestore_tag() and its
   associated helper functions initiate_and_fetch_state() and
   wait_end_of_scrub()

4 years agoqa/standalone: Add missing teardowns to a subset of osd tests
Sridhar Seshasayee [Wed, 7 Jul 2021 18:59:30 +0000 (00:29 +0530)]
qa/standalone: Add missing teardowns to a subset of osd tests

The following files and tests in them did not teardown the
cluster after a test completed.

1. osd/osd-force-create.sh
2. osd/osd-reuse-id.sh
3. osd/pg-split-merge.sh

This wouldn't cause issues if the tests are run individually. But when
running all the tests in the files mentioned above, it could introduce
unexpected test failures down the line. For e.g., multiple tests may
create pools with same name and if they are not cleaned up properly, this
could result in unexpected failures in a subsequent test.

Fixes: https://tracker.ceph.com/issues/51580
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
(cherry picked from commit a96c34f0ee91af55f80fb58936299f5effc0c0cc)

4 years agoMerge pull request #42250 from paulreece42/pacific
Neha Ojha [Thu, 8 Jul 2021 23:49:51 +0000 (16:49 -0700)]
Merge pull request #42250 from paulreece42/pacific

pacific: doc/rados/operations: s/max_misplaced/target_max_misplaced_ratio/

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #40692 from singuliere/wip-50240-pacific
Yuri Weinstein [Thu, 8 Jul 2021 18:47:04 +0000 (11:47 -0700)]
Merge pull request #40692 from singuliere/wip-50240-pacific

pacific: Warning Cleanup and Clang Compile Fix

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
4 years agodoc: added documentation on additional throttling options for the PG balancer module 42250/head
Paul Reece [Thu, 6 May 2021 18:09:34 +0000 (14:09 -0400)]
doc: added documentation on additional throttling options for the PG balancer module

Signed-off-by: Paul Reece <paul@reece.cc>
(cherry picked from commit eafa979b7972be72f7bde1dd29f40b403f29a496)

4 years agodoc/rados/operations: s/max_misplaced/target_max_misplaced_ratio/
Kefu Chai [Tue, 11 May 2021 04:18:56 +0000 (12:18 +0800)]
doc/rados/operations: s/max_misplaced/target_max_misplaced_ratio/

max_misplaced with replaced by in target_max_misplaced_ratio
edbd592ee44e02a5328e1510879555c2f9dcfc9e, but the document was not
sync'ed. let's update it accordingly.

Fixes: https://tracker.ceph.com/issues/50745
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cc43462ab3d4b38cf0c496ae084b82c20ba449ae)

4 years ago16.2.5 v16.2.5
Jenkins Build Slave User [Thu, 8 Jul 2021 14:03:56 +0000 (14:03 +0000)]
16.2.5

4 years agoinclude/denc: include used header 42233/head
Kefu Chai [Mon, 12 Apr 2021 09:43:13 +0000 (17:43 +0800)]
include/denc: include used header

to address the FTBFS like:

/home/kchai/ceph/src/include/denc.h: In member function ‘void DencDumper<T>::dump() const’:
/home/kchai/ceph/src/include/denc.h:121:60: error: ‘O_BINARY’ was not declared in this scope
     int fd = ::open(fn, O_WRONLY|O_TRUNC|O_CREAT|O_CLOEXEC|O_BINARY, 0644);
                                                            ^~~~~~~~
/home/kchai/ceph/src/include/denc.h:121:60: note: the macro ‘O_BINARY’ had not yet been defined
In file included from /home/kchai/ceph/src/include/statlite.h:14,
                 from /home/kchai/ceph/src/include/types.h:41,
                 from /home/kchai/ceph/src/auth/Crypto.h:19,
                 from /home/kchai/ceph/src/auth/Crypto.cc:21:

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 03770f75562812c683ff1503d2032dcd66d83289)

4 years agomon,osd: always init local variable
Kefu Chai [Mon, 12 Apr 2021 09:32:59 +0000 (17:32 +0800)]
mon,osd: always init local variable

this change silences the warning like:

../src/mon/Monitor.cc: In member function ‘void Monitor::handle_command(MonOpRequestRef)’:
../src/mon/Monitor.cc:3703:55: warning: ‘osd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 3703 |     uint64_t seq = mgrstatmon()->get_last_osd_stat_seq(osd);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7c2f58ea5ec70e5606ab362e6f4cfda087cec65a)

4 years agocommon/Formatter: include used header
Kefu Chai [Mon, 12 Apr 2021 09:28:56 +0000 (17:28 +0800)]
common/Formatter: include used header

otherwise it fails to build with gcc-toolset-10, like:

../src/common/Formatter.cc: In member function ‘virtual void ceph::XMLFormatter::close_section()’:
../src/common/Formatter.cc:449:8: error: ‘transform’ is not a member of ‘std’
  449 |   std::transform(section.begin(), section.end(), section.begin(),
      |        ^~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit ff79cae5a1243111c8a039426081638d40a258fa)

4 years agorgw: parse tenant name out of rgwx-bucket-instance 42231/head
Casey Bodley [Wed, 12 May 2021 18:13:13 +0000 (14:13 -0400)]
rgw: parse tenant name out of rgwx-bucket-instance

used by multisite bucket full sync to request the listing of a specific
bucket instance. if the bucket lives under a tenant, we need to get that
out of the rgwx-bucket-instance header, because the http request path
only names the bucket

Fixes: https://tracker.ceph.com/issues/50785
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 291342425e4b49de9b6985c718f6cb9210f5554d)

4 years agorgw: avoid infinite loop when deleting a bucket 42230/head
Jeegn Chen [Wed, 25 Nov 2020 09:15:25 +0000 (17:15 +0800)]
rgw: avoid infinite loop when deleting a bucket

When deleting a bucket with an incomplete multipart upload that
has about 2000 parts uploaded, we noticed an infinite loop, which
stopped s3cmd from deleting the bucket forever.
Per check, when the bucket index was sharded (for example 128
shards), the original logic in
RGWRados::cls_bucket_list_unordered() did not calculate
the bucket shard ID correctly when the index key of a data
part was taken as the marker.

The issue is not necessarily reproduced each time. It will depend
on the key of the object. To reproduce it in 128-shard bucket,
we use 334 as the key for the incomplete multipart upload,
which will be located in Shard 127 (known by experiment). In this
setup, the original logic will usually come out a shard ID smaller
than 127 (since 127 is the largest one) from the marker and
thus a circle is constructed, which results in an infinite loop.

PS: Some times the bucket ID calculation may incorrectly going forward
instead of backward. Thus, the check logic may skip some shards,
which may have regular keys. In such scenarios, some non-empty buckets may
be deleted by accident.

Fixes: http://tracker.ceph.com/issues/49206
Signed-off-by: Jeegn Chen <jeegnchen@tencent.com>
(cherry picked from commit 3cafe5774a5a453d58a3a6bed1f02d3200c4bb1d)

4 years agomon: return -EINVAL when handling unknown option in 'ceph osd pool get' 42229/head
Zhao Cuicui [Mon, 5 Jul 2021 08:53:17 +0000 (16:53 +0800)]
mon: return -EINVAL when handling unknown option in 'ceph osd pool get'

Signed-off-by: Zhao Cuicui <brucen1030@163.com>
(cherry picked from commit 7ed494076e2390f8e6a386278346632d00ee718a)

4 years agomgr/telemetry: pass leaderboard flag even w/o ident 42228/head
Sage Weil [Fri, 4 Jun 2021 17:49:40 +0000 (12:49 -0500)]
mgr/telemetry: pass leaderboard flag even w/o ident

Allow non-identified clusters to appear in the leaderboard.
The leaderboard option still defaults to false, so the change here
is that if they opt in to leaderboard but not ident we'll see
that on the backend.

Note that a leaderboard still does not exist (yet), so this doesn't
have any immediate impact.  But if/when we do create one, it will
allow us to show big clusters (that opt in) on the leaderboard
as 'unidentified' or similar.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit d4a6c3d0099a1f005f41a2cbcfbdbfeddd468db6)

4 years agosrc/pybind/mgr/mirroring/fs/snapshot_mirror.py: do not assume a cephfs-mirror daemon... 42226/head
Sébastien Han [Thu, 1 Jul 2021 15:23:57 +0000 (17:23 +0200)]
src/pybind/mgr/mirroring/fs/snapshot_mirror.py: do not assume a cephfs-mirror daemon is always running

We should not assume a daemon is runnning. If the daemon is not running
we get the default value of None. So let's skip the status if no daemon
is running yet.

Fixes: https://tracker.ceph.com/issues/51476
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit dd45ec499c009a4d0487b22f59f9360fb4f55c34)

4 years agomgr: set debug_mgr=2/5 (so INFO goes to mgr log by default) 42225/head
Sage Weil [Fri, 18 Jun 2021 15:49:43 +0000 (11:49 -0400)]
mgr: set debug_mgr=2/5 (so INFO goes to mgr log by default)

Fixes: https://tracker.ceph.com/issues/48311
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 5e22dfd8749f4ec9837ccdc177e130ac79ce4fa3)

4 years agomgr/DaemonServer: skip redundant update of pgp_num_actual 42223/head
Dan van der Ster [Tue, 29 Jun 2021 20:36:00 +0000 (22:36 +0200)]
mgr/DaemonServer: skip redundant update of pgp_num_actual

During PG merge the MGR was observed repeatedly sending identical
set pgp_num_actual values, leading to osdmap churn at 2000/hr.

Skip the redundant osd set pgp_num_actual command if the
pgp_num is already our computed next.

Fixes: https://tracker.ceph.com/issues/51433
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit 3f15749de0d550a124f8c6afbd457f17ef020963)

4 years agoMerge pull request #41774 from trociny/wip-51143-pacific
Yuri Weinstein [Wed, 7 Jul 2021 13:08:46 +0000 (06:08 -0700)]
Merge pull request #41774 from trociny/wip-51143-pacific

pacific: cls/rgw: look for plain entries in non-ascii plain namespace too

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/workunits/mon/test_mon_config_key: use subprocess.run() instead of proc.communicate() 42221/head
Kefu Chai [Fri, 16 Apr 2021 04:09:14 +0000 (12:09 +0800)]
qa/workunits/mon/test_mon_config_key: use subprocess.run() instead of proc.communicate()

the loop of proc.communicate() on python3.6, where we always are able to
get something out of stdout and/or stderr PIPEs. and the `stdout` and
`stderr` keep growing until out of memory. and teuthology considers
the command crashed after a while.

Fixes: https://tracker.ceph.com/issues/50393
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f2e0770c276e6fffa01a0bcb2d969f02ee1aafef)

4 years agoMerge pull request #42153 from rhcs-dashboard/wip-51478-pacific
Ernesto Puerta [Tue, 6 Jul 2021 16:15:08 +0000 (18:15 +0200)]
Merge pull request #42153 from rhcs-dashboard/wip-51478-pacific

pacific: mgr/dashboard: fix OSD out count

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: huww98 <NOT@FOUND>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
4 years agoMerge pull request #42156 from rhcs-dashboard/wip-51489-pacific
Ernesto Puerta [Mon, 5 Jul 2021 15:51:40 +0000 (17:51 +0200)]
Merge pull request #42156 from rhcs-dashboard/wip-51489-pacific

pacific: mgr/dashboard: run cephadm-backend e2e tests with KCLI

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoqa: avoid using sudo for regular test artifacts
Patrick Donnelly [Tue, 29 Jun 2021 16:47:21 +0000 (09:47 -0700)]
qa: avoid using sudo for regular test artifacts

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit e2b39f6c8c23b54d7e1ff326175b371a7496f85e)

4 years agoqa: convert mount calls to mount_wait
Patrick Donnelly [Tue, 29 Jun 2021 21:51:43 +0000 (14:51 -0700)]
qa: convert mount calls to mount_wait

These tests want to immediately use the mount anyway. But the main
problem is, without waiting for the mount to complete, the command:

    chmod 1777 /path/to/mount

is not run so the mount cannot be written to by normal users without
sudo.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 4fc4ccb7a112e16f564cbc01a3ced8d2b6be2d68)

4 years agoqa: use run_shell_payload to avoid sudo
Patrick Donnelly [Mon, 28 Jun 2021 22:20:43 +0000 (15:20 -0700)]
qa: use run_shell_payload to avoid sudo

"run_shell" adds 'sudo' which runs afoul of new security protections on
Ubuntu 20.04.

Fixes: https://tracker.ceph.com/issues/51417
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 8a1ee83b1a2979be40234501d7709c65124fe1bd)

4 years agoqa: use kclient xattr to lookup client id 42165/head
Patrick Donnelly [Tue, 29 Jun 2021 00:15:19 +0000 (17:15 -0700)]
qa: use kclient xattr to lookup client id

Added relatively recently but in RHEL 8.4.

Fixes: https://tracker.ceph.com/issues/51183
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit f92a4f4330da5f7d1d277ba6744f819c4c541eb4)

4 years agoqa: refactor reading debug file code
Patrick Donnelly [Tue, 29 Jun 2021 02:21:44 +0000 (19:21 -0700)]
qa: refactor reading debug file code

No need to invoke Python to read a file!

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 891c2773e9067b0d40d222f3f69635211809efaa)

4 years agoqa: get mount id before failing fs
Patrick Donnelly [Tue, 29 Jun 2021 14:27:11 +0000 (07:27 -0700)]
qa: get mount id before failing fs

Otherwise getxattr will hang.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 97a86453f87f8e731bd3cce6bc525b412bf68cf3)

4 years agoMerge PR #42159 into pacific
Patrick Donnelly [Fri, 2 Jul 2021 20:07:04 +0000 (13:07 -0700)]
Merge PR #42159 into pacific

* refs/pull/42159/head:
pybind/ceph_volume_client: use cephfs mkdirs api

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agopybind/ceph_volume_client: use cephfs mkdirs api 42159/head
Patrick Donnelly [Fri, 2 Jul 2021 16:07:34 +0000 (09:07 -0700)]
pybind/ceph_volume_client: use cephfs mkdirs api

This _mkdir_p should never have worked as the first directory it tries
to stat/mkdir is "", the empty string. This causes an assertion in the
client. I'm not sure how this code ever functioned without causing
faults. They look like:

    2021-07-01 02:15:04.449 7f7612b5ab80  3 client.178735 statx enter (relpath  want 2047)

The assertion is caused by a C++ exception:

/usr/include/c++/8/string_view:172: constexpr const _CharT& std::basic_string_view<_CharT, _Traits>::operator[](std::basic_string_view<_CharT, _Traits>::size_type) const [with _CharT = char$_Traits = std::char_traits<char>; std::basic_string_view<_CharT, _Traits>::size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed.
        Aborted (core dumped)

Where relpath is just the path passed to Client::stat.

This commit only applies to Pacific and older because master no longer
has this library.

Fixes: https://tracker.ceph.com/issues/51492
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agomgr/dashboard: run cephadm-backend e2e tests with KCLI 42156/head
Alfonso Martínez [Fri, 2 Jul 2021 08:08:49 +0000 (10:08 +0200)]
mgr/dashboard: run cephadm-backend e2e tests with KCLI

Fixes: https://tracker.ceph.com/issues/51300
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit 5c03b49c4da55cf8d0c679ecb2c58182e4d3361a)

4 years agomgr/dashboard: fix OSD out count 42153/head
胡玮文 [Mon, 21 Jun 2021 13:31:49 +0000 (21:31 +0800)]
mgr/dashboard: fix OSD out count

Think we have 3 OSDs out but up (prepare for re-formatting to change min_alloc_size), and another OSD down but in
(during reboot). The dashboard will display "1 down, 2 out", which is obviously incorrect. It should be "1 down, 3 out"

Fixes: https://tracker.ceph.com/issues/51376
Signed-off-by: 胡玮文 <huww98@outlook.com>
(cherry picked from commit 921b48234777eba1a15c126f964cc47c0932879a)

4 years agoMerge pull request #42140 from rhcs-dashboard/wip-51475-pacific
Ernesto Puerta [Fri, 2 Jul 2021 09:14:24 +0000 (11:14 +0200)]
Merge pull request #42140 from rhcs-dashboard/wip-51475-pacific

pacific: mgr/dashboard: User database migration has been cut out

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
Reviewed-by: Yuri Weinstein <yweins@redhat.com>
4 years agoMerge pull request #42120 from neha-ojha/wip-51453-pacific
Yuri Weinstein [Thu, 1 Jul 2021 18:57:19 +0000 (11:57 -0700)]
Merge pull request #42120 from neha-ojha/wip-51453-pacific

pacific: qa/suites/rados: add simultaneous scrubs to the thrasher

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
4 years agoMerge pull request #42065 from batrick/i51232
Yuri Weinstein [Thu, 1 Jul 2021 16:02:37 +0000 (09:02 -0700)]
Merge pull request #42065 from batrick/i51232

pacific: qa: scrub code does not join scrubopts with comma

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42067 from batrick/i51251
Yuri Weinstein [Thu, 1 Jul 2021 16:01:46 +0000 (09:01 -0700)]
Merge pull request #42067 from batrick/i51251

pacific: qa: fs:upgrade uses teuthology default distro

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agomgr/dashboard: User database migration has been cut out 42140/head
Volker Theile [Wed, 30 Jun 2021 12:00:28 +0000 (14:00 +0200)]
mgr/dashboard: User database migration has been cut out

This PR will revert changes done by https://tracker.ceph.com/issues/49645 to auto-migrate user database v1 to v2.

Fixes: https://tracker.ceph.com/issues/51443
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit 82922811612813840a684af993ca7c95a0b48d53)

4 years agoMerge pull request #41842 from Daniel-Pivonka/pacific-backport-41740
Sage Weil [Thu, 1 Jul 2021 15:51:32 +0000 (10:51 -0500)]
Merge pull request #41842 from Daniel-Pivonka/pacific-backport-41740

pacific: mgr/nfs: do not depend on cephadm.utils

4 years agoMerge pull request #42117 from liewegas/cephadm-june-last-pacific
Sage Weil [Thu, 1 Jul 2021 15:49:37 +0000 (10:49 -0500)]
Merge pull request #42117 from liewegas/cephadm-june-last-pacific

pacific: cephadm june final batch

4 years agoMerge pull request #42119 from rhcs-dashboard/wip-51447-pacific
Ernesto Puerta [Thu, 1 Jul 2021 08:45:45 +0000 (10:45 +0200)]
Merge pull request #42119 from rhcs-dashboard/wip-51447-pacific

pacific: mgr/dashboard: Fix bucket name input allowing space in the value

Reviewed-by: Waad Alkhoury <walkhour@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #42061 from batrick/i50913
Yuri Weinstein [Wed, 30 Jun 2021 23:58:48 +0000 (16:58 -0700)]
Merge pull request #42061 from batrick/i50913

pacific: MDS heartbeat timed out between during executing MDCache::start_files_to_recover()

Reviewed-by: Jeff Layton <jlayton@redhat.com>
4 years agoMerge pull request #42068 from batrick/i51286
Yuri Weinstein [Wed, 30 Jun 2021 23:57:28 +0000 (16:57 -0700)]
Merge pull request #42068 from batrick/i51286

pacific: MDSMonitor: crash when attempting to mount cephfs

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42097 from vshankar/wip-51413
Yuri Weinstein [Wed, 30 Jun 2021 19:38:52 +0000 (12:38 -0700)]
Merge pull request #42097 from vshankar/wip-51413

pacific: cephfs-mirror: reopen logs on SIGHUP

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42072 from batrick/i51414
Yuri Weinstein [Wed, 30 Jun 2021 19:35:53 +0000 (12:35 -0700)]
Merge pull request #42072 from batrick/i51414

pacific: mds: "FAILED ceph_assert(r == 0 || r == -2)"

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42071 from batrick/i51412
Yuri Weinstein [Wed, 30 Jun 2021 19:35:17 +0000 (12:35 -0700)]
Merge pull request #42071 from batrick/i51412

pacific: mds: mkdir on ephemerally pinned directory sometimes blocked on journal flush

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42070 from batrick/i51324
Yuri Weinstein [Wed, 30 Jun 2021 19:34:30 +0000 (12:34 -0700)]
Merge pull request #42070 from batrick/i51324

pacific: pacific: client: abort after MDS blocklist

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42069 from batrick/i51322
Yuri Weinstein [Wed, 30 Jun 2021 19:33:55 +0000 (12:33 -0700)]
Merge pull request #42069 from batrick/i51322

pacific: qa: test_data_scan.TestDataScan.test_pg_files AssertionError: Items in the second set but not the first:

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42066 from batrick/i51235
Yuri Weinstein [Wed, 30 Jun 2021 19:32:05 +0000 (12:32 -0700)]
Merge pull request #42066 from batrick/i51235

pacific: doc: pacific updates

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42064 from batrick/i51231
Yuri Weinstein [Wed, 30 Jun 2021 19:29:55 +0000 (12:29 -0700)]
Merge pull request #42064 from batrick/i51231

pacific: pybind/mgr/snap_schedule: Invalid command: Unexpected argument 'fs=cephfs'

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42063 from batrick/i51230
Yuri Weinstein [Wed, 30 Jun 2021 19:29:06 +0000 (12:29 -0700)]
Merge pull request #42063 from batrick/i51230

pacific: qa: fs:bugs does not specify distro

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agopacific: qa: add missing package exclusions 42067/head
Patrick Donnelly [Wed, 30 Jun 2021 19:18:47 +0000 (12:18 -0700)]
pacific: qa: add missing package exclusions

ceph-immutable-object-cache does not exist on nautilus.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agotest/pybind/test_ceph_argparse: add a test where args contains comma 42065/head
Kefu Chai [Sun, 13 Jun 2021 11:56:26 +0000 (19:56 +0800)]
test/pybind/test_ceph_argparse: add a test where args contains comma

to ensure the support for the new syntax of "prefix --name bon,jour"
does not break existing behavior of "prefix hello cruel,world" where value2
contains reads "hello,world", and the parsed result should be

prefix="prefix"
value=["hello", "cruel,world"]

instead of something like

prefix="prefix"
value=["hello", "cruel", "world"]

or

prefix="prefix"
value=["cruel", "world"]

the above test only applies to the test where "value" is a CephString.
if "value" is a CephChoices, the parsed argument should be

prefix="prefix"
value=["hello", "cruel", "world"]

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9b6be59d6fa6ff7f6c5d773b6774728cf828b768)

4 years agocmake: run nose test using "python3 -m nose"
Kefu Chai [Wed, 9 Jun 2021 03:37:41 +0000 (11:37 +0800)]
cmake: run nose test using "python3 -m nose"

otherwise the tests are not performed at all.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 49be76ce11085bd333b5b8b281d8676c5ed450c2)

4 years agotest/pybind/test_ceph_argparse: check for expected argument
Kefu Chai [Sun, 13 Jun 2021 04:03:11 +0000 (12:03 +0800)]
test/pybind/test_ceph_argparse: check for expected argument

instead of comparing the validated argument with empty dict, check for
its content for better coverage of testing.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cf4570d663d9c0fb656a54adc03fdfe83ead6ed0)

4 years agotest/pybind/test_ceph_argparse: decorate helper method with @nottest
Kefu Chai [Wed, 9 Jun 2021 03:24:37 +0000 (11:24 +0800)]
test/pybind/test_ceph_argparse: decorate helper method with @nottest

otherwise nose tries to run it as a test as its name contains "test", like

E.
======================================================================
ERROR: Runs validate in different arg/kargs ways.
----------------------------------------------------------------------
TypeError: arg_kwarg_test() missing 3 required positional arguments: 'prefix', 'args', and 'sig'

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 3d7516f8daefcefa06a46981a62442d9193164f6)

4 years agotest/pybind: do not test obsoleted command
Kefu Chai [Wed, 9 Jun 2021 03:11:40 +0000 (11:11 +0800)]
test/pybind: do not test obsoleted command

"scrub" command was marked obsoleted in
e9a5ce0897efc6126caeebea9900bf05ec3d2174, so the test_ceph_argparse
cannot retrieve its command description using "get_command_descriptions"
cli tool anymore, let's drop the related test accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 77cb1fed0c30eec83ee0e4e0899dfdc1d4c5cc51)

4 years agotest/pybind: drop forward and readforward from test
Kefu Chai [Wed, 9 Jun 2021 03:01:20 +0000 (11:01 +0800)]
test/pybind: drop forward and readforward from test

these two write modes were dropped in
a0a3ed324a130a9934735927600f01d1fa65bc0d, so update the test
accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b8389557ad6297256f6a793723a5b601de739f2d)

4 years agotest/pybind: do not use tab for indent
Kefu Chai [Wed, 9 Jun 2021 02:57:32 +0000 (10:57 +0800)]
test/pybind: do not use tab for indent

the python source file is idented using spaces.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 952285dcde501b38a63533768705526d3c5f02dc)

4 years agopybind/ceph_argparse: validate csv if desc.N
Kefu Chai [Wed, 9 Jun 2021 02:01:35 +0000 (10:01 +0800)]
pybind/ceph_argparse: validate csv if desc.N

if desc.N is not None, we should take the argument as a comma separated
values, and validate the values individually.

restructure the validate() function and its helpers to pass the
validated args if desc.N explicitly, as desc.instance.val should only
hold a single value of desc.instance type, otherwise we need to reset
it after collecting all the argument in a CSV string value is parsed.

this change would be less consistent and hackish.

and update a test to verify this behavior.

Fixes: https://tracker.ceph.com/issues/51145
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 0948a78ee6524911bd1fb76f1bf285e90e3cd349)

4 years agotest/pybind: pep8 cleanups
Kefu Chai [Wed, 9 Jun 2021 02:00:08 +0000 (10:00 +0800)]
test/pybind: pep8 cleanups

* do not import unused symbols
* add two empty lines before method
* aligned indents

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit bc182888a3ca557e330e4317e0c50c1e80dbde4d)

4 years agoMerge pull request #42045 from tchaikov/pacific-51354
Yuri Weinstein [Wed, 30 Jun 2021 18:51:31 +0000 (11:51 -0700)]
Merge pull request #42045 from tchaikov/pacific-51354

pacific: osd/osd_type: use f->dump_unsigned() when appropriate

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Kamoltat (Junior) Sirivadhna <ksirivad@redhat.com>