]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agoos/bluestore/bluestore_tool: compare retval stat() with -1 41676/head
Kefu Chai [Thu, 20 May 2021 05:55:13 +0000 (13:55 +0800)]
os/bluestore/bluestore_tool: compare retval stat() with -1

before this change, stat() is always called to check if the
file specified by --dev-target exists even if this option is not
specified. also, we compare the retval of stat() with ENOENT, while
state() returns -1 on error.

after this change, stat() is called only if --dev-target is specified,
and we compare the retval of stat() with -1 and 0 only, so if
--dev-target option is not specified, the tool still hehaves.

this change addresses a regression introduced by
94a91f54fe30a4dd113fbc1b02bc3f3d52c82a92

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

4 years agotests/ceph_volume: add UT for bluefs migration stuff
Igor Fedotov [Wed, 28 Apr 2021 19:17:24 +0000 (22:17 +0300)]
tests/ceph_volume: add UT for bluefs migration stuff

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit f8def0443db59e7df31132953fff708b76417236)

Conflicts
  src/ceph-volume/ceph_volume/tests/devices/lvm/test_migrate.py -
get_single_lv is the new name for get_first_lvi

4 years agoceph-volume: implement bluefs volume migration.
Igor Fedotov [Fri, 19 Feb 2021 11:31:52 +0000 (14:31 +0300)]
ceph-volume: implement bluefs volume migration.

This is a wrapper over ceph-bluestore-tool's bluefs-bdev-migrate command.
Primarily intended to introduce LVM tags manipulation which
ceph-bluestore-tool is lacking.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 58efeb915198d4fbb40b6fa080312d8bee3141bf)

 Conflicts:
doc/man/8/ceph-volume.rst - a bit different formatting is in use
src/ceph-volume/ceph_volume/api/lvm.py - get_single_lv is the
new name for get_first_lv

4 years agotools/ceph-bluestore-tool: be more legible before requesting additional params
Igor Fedotov [Fri, 19 Feb 2021 11:23:00 +0000 (14:23 +0300)]
tools/ceph-bluestore-tool: be more legible before requesting additional params

Request DB/WAL size specification when relevant devices are created
only.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 94a91f54fe30a4dd113fbc1b02bc3f3d52c82a92)

4 years agoMerge pull request #41158 from smithfarm/wip-50430-nautilus
Yuri Weinstein [Wed, 2 Jun 2021 20:41:50 +0000 (13:41 -0700)]
Merge pull request #41158 from smithfarm/wip-50430-nautilus

nautilus: rgw: Added caching for S3 credentials retrieved from keystone

Reviewed-by: Friedmann <ofriedma@redhat.com>
4 years agoMerge pull request #41386 from rhcs-dashboard/wip-50841-nautilus
Ernesto Puerta [Wed, 2 Jun 2021 08:16:20 +0000 (10:16 +0200)]
Merge pull request #41386 from rhcs-dashboard/wip-50841-nautilus

nautilus: mgr/dashboard: grafana panels for rgw multisite sync performance

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 agoMerge pull request #41513 from ideepika/wip-49592-upgrade-nautilus
Ilya Dryomov [Tue, 1 Jun 2021 22:04:30 +0000 (00:04 +0200)]
Merge pull request #41513 from ideepika/wip-49592-upgrade-nautilus

nautilus: qa/upgrade: disable update_features test_notify with older client as lockowner

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
4 years agoMerge pull request #41531 from rhcs-dashboard/wip-50885-nautilus
Ernesto Puerta [Tue, 1 Jun 2021 18:07:48 +0000 (20:07 +0200)]
Merge pull request #41531 from rhcs-dashboard/wip-50885-nautilus

nautilus: mgr/dashboard: fix OSDs Host details/overview grafana graphs

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: wornet-mwo <NOT@FOUND>
4 years agonautilus: qa/upgrade: disable update_features test_notify with older client as lockowner 41513/head
Deepika Upadhyay [Wed, 26 May 2021 19:25:13 +0000 (00:55 +0530)]
nautilus: qa/upgrade: disable update_features test_notify with older client as lockowner

* with the recent support for async rbd operations from pacific+ when an
 older client(non async support) goes on upgrade, and simultaneously
 interacts with a newer client which expects the requests to be async,
 experiences hang; considering the return code for request completion to
 be acknowledgement for async request, which then keeps waiting for
 another acknowledgement of request completion.

 this if happens should be a rare only when lockowner is an old client
 and should be deferred if compatibility issues arises.

* amend upgrade test workunits to use respective stable branches

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoMerge pull request #41448 from idryomov/wip-monc-rotating-timeout-nautilus
Yuri Weinstein [Mon, 31 May 2021 17:05:41 +0000 (10:05 -0700)]
Merge pull request #41448 from idryomov/wip-monc-rotating-timeout-nautilus

nautilus: mon/MonClient: tolerate a rotating key that is slightly out of date

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #41394 from batrick/i50128
Yuri Weinstein [Mon, 31 May 2021 17:05:05 +0000 (10:05 -0700)]
Merge pull request #41394 from batrick/i50128

nautilus: pybind/mgr/volumes: deadlock on async job hangs finisher thread

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoMerge pull request #40769 from smithfarm/wip-49514-nautilus
Yuri Weinstein [Mon, 31 May 2021 17:03:38 +0000 (10:03 -0700)]
Merge pull request #40769 from smithfarm/wip-49514-nautilus

nautilus: cephfs: client: add ability to lookup snapped inodes by inode number

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
4 years agoMerge pull request #41297 from kotreshhr/wip-50628-nautilus
Yuri Weinstein [Sat, 29 May 2021 15:17:18 +0000 (08:17 -0700)]
Merge pull request #41297 from kotreshhr/wip-50628-nautilus

nautilus: client: Fix executeable access check for the root user

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #40865 from lxbsz/wip-49519-nautilus
Yuri Weinstein [Sat, 29 May 2021 15:16:47 +0000 (08:16 -0700)]
Merge pull request #40865 from lxbsz/wip-49519-nautilus

nautilus: cephfs: client: wake up the front pos waiter

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #41144 from smithfarm/wip-50634-nautilus
Yuri Weinstein [Sat, 29 May 2021 15:16:11 +0000 (08:16 -0700)]
Merge pull request #41144 from smithfarm/wip-50634-nautilus

nautilus: mds: do not trim the inodes from the lru list in standby_replay

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #41519 from tchaikov/nautilus-pr-41516
Yuri Weinstein [Thu, 27 May 2021 15:15:57 +0000 (08:15 -0700)]
Merge pull request #41519 from tchaikov/nautilus-pr-41516

nautilus: mon/OSDMonitor: drop stale failure_info even if can_mark_down()

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agotest: add ceph_mksnap and ceph_rmsnap replacements 40769/head
Jeff Layton [Wed, 26 May 2021 11:05:13 +0000 (07:05 -0400)]
test: add ceph_mksnap and ceph_rmsnap replacements

Signed-off-by: Jeff Layton <jlayton@redhat.com>
4 years agoMerge pull request #36679 from josecastroleon/nautilus
Yuri Weinstein [Wed, 26 May 2021 13:57:47 +0000 (06:57 -0700)]
Merge pull request #36679 from josecastroleon/nautilus

nautilus: pybind: volume_client handle purge of directory names encoded in utf-8

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agomgr/pybind/volumes: avoid acquiring lock for thread count updates 41394/head
Patrick Donnelly [Mon, 22 Mar 2021 16:17:43 +0000 (09:17 -0700)]
mgr/pybind/volumes: avoid acquiring lock for thread count updates

Perform thread count updates in a dedicated tick thread. This avoids the
mgr Finisher thread from getting potentially hung via a mutex deadlock
in the cloner thread management.

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

4 years agoqa: bump debugging for mgr
Patrick Donnelly [Fri, 19 Mar 2021 21:44:37 +0000 (14:44 -0700)]
qa: bump debugging for mgr

Hunting [1].

[1] https://tracker.ceph.com/issues/49605
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 17b291e57d18d13643761570adf208fbbca06252)

Conflicts:
qa/suites/fs/basic_functional/tasks/volumes.yaml
qa/suites/fs/volumes/tasks/volumes/overrides.yaml

4 years agomgr: add debug output for commands dispatched
Patrick Donnelly [Fri, 19 Mar 2021 21:41:58 +0000 (14:41 -0700)]
mgr: add debug output for commands dispatched

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

Conflicts:
src/mgr/DaemonServer.cc

4 years agomgr/dashboard: fix OSDs Host details/overview grafana graphs 41531/head
Alfonso Martínez [Fri, 7 May 2021 13:38:07 +0000 (15:38 +0200)]
mgr/dashboard: fix OSDs Host details/overview grafana graphs

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

4 years agodashboard: Fixed name clash when hostname similar to anaother
Michael Wodniok [Fri, 12 Mar 2021 16:08:54 +0000 (17:08 +0100)]
dashboard: Fixed name clash when hostname similar to anaother

Fixes: #49769
Signed-off-by: Michael Wodniok <wodniok@wor.net>
(cherry picked from commit e97e27ebdbb394c01aa1cf502039a798d9c4e110)

4 years agoMerge pull request #41521 from rhcs-dashboard/wip-50961-nautilus
Ernesto Puerta [Tue, 25 May 2021 11:28:57 +0000 (13:28 +0200)]
Merge pull request #41521 from rhcs-dashboard/wip-50961-nautilus

nautilus: mgr/dashboard: fix API docs link

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agomon/OSDMonitor: drop stale failure_info even if can_mark_down() 41519/head
Kefu Chai [Tue, 25 May 2021 06:31:02 +0000 (14:31 +0800)]
mon/OSDMonitor: drop stale failure_info even if can_mark_down()

in a124ee85b03e15f4ea371358008ecac65f9f4e50, we add a check to drop
stale failure_info reports. but if osdmap does not prohibit us from
marking the osd in question down, the branch checking the stale info
is not executed. in general, it is allowed to mark an osd down, so
the fix of a124ee85b03e15f4ea371358008ecac65f9f4e50 just fails to
work.

in this change, we check for stale failure report of osd in question
as long as the osd is not marked down in the same function. this should
address the slow ops of failure report issue.

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

4 years agomgr/dashboard: fix API docs link 41521/head
Avan Thakkar [Wed, 19 May 2021 23:57:29 +0000 (05:27 +0530)]
mgr/dashboard: fix API docs link

Fixes: https://tracker.ceph.com/issues/50890
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit e79c9d3f51970fbe275087e92e468205f70e6f12)

 Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts
       - Adopt the master branch changes.

4 years agoMerge pull request #41310 from k0ste/wip-50777-nautilus
Yuri Weinstein [Mon, 24 May 2021 19:37:55 +0000 (12:37 -0700)]
Merge pull request #41310 from k0ste/wip-50777-nautilus

nautilus: mgr/progress: ensure progress stays between [0,1]

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #41164 from linuxbox2/wip-nautilus-41031
Yuri Weinstein [Mon, 24 May 2021 19:36:46 +0000 (12:36 -0700)]
Merge pull request #41164 from linuxbox2/wip-nautilus-41031

nautilus: rgw: check object locks in multi-object delete

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #41238 from trociny/wip-50701-nautilus
Yuri Weinstein [Thu, 20 May 2021 17:04:39 +0000 (10:04 -0700)]
Merge pull request #41238 from trociny/wip-50701-nautilus

nautilus: os/FileStore: fix to handle readdir error correctly

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #41111 from k0ste/wip-50603-nautilus
Yuri Weinstein [Thu, 20 May 2021 15:17:50 +0000 (08:17 -0700)]
Merge pull request #41111 from k0ste/wip-50603-nautilus

nautilus: osd: compute OSD's space usage ratio via raw space utilization

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #40106 from xijiacun/nautilus
Yuri Weinstein [Thu, 20 May 2021 15:17:13 +0000 (08:17 -0700)]
Merge pull request #40106 from xijiacun/nautilus

nautilus: rgw: Use correct bucket info when put or get large object with swift.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agomon/MonClient: tolerate a rotating key that is slightly out of date 41448/head
Ilya Dryomov [Mon, 17 May 2021 19:16:16 +0000 (21:16 +0200)]
mon/MonClient: tolerate a rotating key that is slightly out of date

Commit 918c12c2ab5d ("monclient: avoid key renew storm on clock skew")
made wait_auth_rotating() wait for a key set with a valid "current" key
(instead of any key set, including with all keys expired if the clocks
are skewed).  While a good idea in general, this is a bit too stringent
because the monitors will hand out key sets with "current" key that is
_just_ about to expire.  There is nothing wrong with that as "next" key
is also there, valid for the entire auth_service_ticket_ttl.  So even
if the daemon is talking to the leader, it is possible to get a key set
with an expired "current" key.  If the daemon is talking to a peon, it
is pretty easy to run into in practice.  This, coupled with the fact
that _check_auth_rotating() explicitly allows the keys to go slightly
out of date, can lead to wait_auth_rotating() stalling the boot for up
to 30 seconds:

  15:41:11.824+0000  1 ... ==== auth_reply(proto 2 0 (0) Success)
  15:41:41.824+0000  0 monclient: wait_auth_rotating timed out after 30
  15:41:41.824+0000 -1 mds.b unable to obtain rotating service keys; retrying

Apply the same 30 second or less tolerance in wait_auth_rotating().

Fixes: https://tracker.ceph.com/issues/50390
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 6160ed75fcc2a648da4b696fd0ec20b95c4a0a61)

Conflicts:
src/mon/MonClient.cc [ commit 85157d5aae3d ("mon:
  s/Mutex/ceph::mutex/") not in nautilus ]

4 years agoclient: Fix executeable access check for the root user 41297/head
Kotresh HR [Fri, 16 Apr 2021 04:14:05 +0000 (09:44 +0530)]
client: Fix executeable access check for the root user

Executeable permission check always returned sucessful
even when executeable bit is not set on any of the user,
group or others. This patch fixes it by overiding
executeable permission check for root only if one of
the executeable bit is set

Signed-off-by: Kotresh HR <khiremat@redhat.com>
Fixes: https://tracker.ceph.com/issues/50060
(cherry picked from commit b20ec2978cd3e16be9f45f1b7860bdae3c738147)

Conflicts:
   src/client/Client.cc: The commit 6aa78836548f (cephfs errno aliases) is not present in
nautilus and some other trivial conflict, may be because some patches are missing
in nautilus.

4 years agomgr/dashboard: grafana panels for rgw multisite sync performance 41386/head
Alfonso Martínez [Fri, 22 May 2020 11:36:10 +0000 (13:36 +0200)]
mgr/dashboard: grafana panels for rgw multisite sync performance

* RGW sync perf. counters are now exposed through grafana panels.
* Sync Performance tab is only shown if rgw realm is detected.
* Prometheus module: added metrics suitable for prometheus consumption (from existing ones, not replacing for backward compatibility).

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

 Conflicts:
   - Solved conflicts from cherry-pick:
       src/pybind/mgr/dashboard/controllers/rgw.py
       src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts
       src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts
       src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-list/rgw-daemon-list.component.ts
       src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-site.service.spec.ts
       src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-site.service.ts
       src/pybind/mgr/dashboard/services/rgw_client.py
       src/pybind/mgr/dashboard/tests/test_rgw_client.py
   - src/pybind/mgr/dashboard/tools.py: added method included in a feature not to be backported.
   - src/pybind/mgr/dashboard/module.py: fixed linting issue.

4 years agorgw: Use correct bucket info when put or get large object with swift. 40106/head
zhangzhiming [Mon, 15 Mar 2021 01:42:33 +0000 (09:42 +0800)]
rgw: Use correct bucket info when put or get large object with swift.

Fixes: https://tracker.ceph.com/issues/49791
Signed-off-by: zhiming zhang <zhangzhm1@chinatelecom.cn>
Signed-off-by: yupeng chen <chenyupeng@chinatelecom.cn>
(cherry picked from commit bdd0635fbb0632c881e8f38c563f88d0957688bf)

 Conflicts:
src/rgw/rgw_op.cc
src/rgw/rgw_rest_swift.cc

-In octopus:
- RGWRados::Object op_target(store->getRados(), ...)
-In nautilus:
- RGWRados::Object op_target(store, ...)

4 years agoMerge pull request #41137 from tchaikov/nautilus-50456
Yuri Weinstein [Mon, 17 May 2021 15:21:11 +0000 (08:21 -0700)]
Merge pull request #41137 from tchaikov/nautilus-50456

nautilus: bind on loopback address if no other addresses are available

4 years agoMerge pull request #41318 from neha-ojha/wip-50692-nautilus
Yuri Weinstein [Fri, 14 May 2021 17:48:39 +0000 (10:48 -0700)]
Merge pull request #41318 from neha-ojha/wip-50692-nautilus

nautilus: pybind/rados: should pass "name" to cstr()

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoMerge pull request #39818 from ceph/wip-yuriw-client-upgrade-nautilus-pacific-nautilus
Yuri Weinstein [Fri, 14 May 2021 17:06:36 +0000 (10:06 -0700)]
Merge pull request #39818 from ceph/wip-yuriw-client-upgrade-nautilus-pacific-nautilus

nautilus: qa/tests: added client-upgrade-nautilus-pacific tests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge remote-tracking branch 'origin/nautilus-saved' into nautilus
Sage Weil [Fri, 14 May 2021 14:15:48 +0000 (10:15 -0400)]
Merge remote-tracking branch 'origin/nautilus-saved' into nautilus

4 years ago14.2.21 v14.2.21
Jenkins Build Slave User [Thu, 13 May 2021 17:23:08 +0000 (17:23 +0000)]
14.2.21

4 years agomgr/dashboard: fix cookie injection issue
Ernesto Puerta [Thu, 13 May 2021 15:43:56 +0000 (17:43 +0200)]
mgr/dashboard: fix cookie injection issue

Fixes: CVE-2021-3509
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit b39922818bc57cde1b016e9ad41908b18063b93b)

 Conflicts:
src/pybind/mgr/dashboard/controllers/docs.py
        - Remove allow_empty_body and _with_token method

4 years agoUpdate qa/suites/upgrade-clients/client-upgrade-nautilus-pacific/nautilus-client... 39818/head
Yuri Weinstein [Thu, 25 Mar 2021 22:32:04 +0000 (15:32 -0700)]
Update qa/suites/upgrade-clients/client-upgrade-nautilus-pacific/nautilus-client-x/rbd/1-install/nautilus-client-x.yaml

Co-authored-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agomgr/dashboard: fix base-href: revert it to previous approach
Avan Thakkar [Fri, 7 May 2021 09:38:11 +0000 (15:08 +0530)]
mgr/dashboard: fix base-href: revert it to previous approach

Fixes: https://tracker.ceph.com/issues/50684
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit b6f92922f5c80223fd288d98ce85405a650c0135)

 Conflicts:

src/pybind/mgr/dashboard/frontend/src/app/app.module.ts
      - Adopt the changes coming from master for this file.

(cherry picked from commit 3802683035532bc15d95e16232e69e0fa96c474f)

4 years agocommon/pick_addr: use grading machinery to refactor pick_address() 41137/head
Kefu Chai [Thu, 22 Apr 2021 17:03:54 +0000 (01:03 +0800)]
common/pick_addr: use grading machinery to refactor pick_address()

as picking iface on the same NUMA node is not a hard requirement, the
grading machinery is a nice fit for this purpose.

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

4 years agocommon/pick_address: prefer non-loopback addresses
Kefu Chai [Wed, 21 Apr 2021 11:50:48 +0000 (19:50 +0800)]
common/pick_address: prefer non-loopback addresses

instead of filtering out loopback ifaces, check for loopback addresses,
and prefer non-loopback addresses over loopback addresses.

before this change, iface named "lo" is filtered out by default,
and "lo" is allowed if `ms_bind_exclude_lo_iface` is false.

after this change, iface with address out of 127/8 is prefered.
the iface marked down is not considered.

the option of "ms_bind_exclude_lo_iface" is removed. the tests are
updated accordingly.

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

Conflicts:
src/common/options/global.yaml.in
src/common/pick_address.cc: trivial resolution

4 years agocommon/pick_address: Allow binding on loopback iface
Kefu Chai [Fri, 26 Mar 2021 12:03:09 +0000 (20:03 +0800)]
common/pick_address: Allow binding on loopback iface

in 6147c0917157efd2d35610e759685656a4989abb, "lo" is also skipped when
daemon is trying to find an address to bind. but that change reverts the
fix of 201b59204374ebdab91bb554b986577a97b19c36, to address the problem.

an option named "ms_bind_exclude_lo_iface" is added, it defaults to
"true". but it can be changed to false to allow daemon to bind on "lo".

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

4 years agocommon/pick_address: document find_ip_in_subnet_list()
Kefu Chai [Fri, 26 Mar 2021 07:36:21 +0000 (15:36 +0800)]
common/pick_address: document find_ip_in_subnet_list()

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

4 years agocommon/pick_address: pass string by reference
Kefu Chai [Sat, 27 Mar 2021 02:03:02 +0000 (10:03 +0800)]
common/pick_address: pass string by reference

to silence warnings from clang-tidy.

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

4 years agocommon/pick_addr: refactor pick_address.cc and ipaddr.cc
Kefu Chai [Fri, 26 Mar 2021 10:23:35 +0000 (18:23 +0800)]
common/pick_addr: refactor pick_address.cc and ipaddr.cc

* do not replicate the same logic in IPv4 and IPv6 paths
* use helpers returning bool for filtering the candidate addresses
  for better readability

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

Conflicts:
src/common/ipaddr.cc
src/common/pick_address.cc: trivial resolution

4 years agocommon/pick_address: use scope_guard for freeifaddrs()
Kefu Chai [Fri, 26 Mar 2021 10:34:32 +0000 (18:34 +0800)]
common/pick_address: use scope_guard for freeifaddrs()

for better readability

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

4 years agocommon/pick_address: fail if cannot bind with specified network family
Kefu Chai [Mon, 19 Oct 2020 13:50:45 +0000 (21:50 +0800)]
common/pick_address: fail if cannot bind with specified network family

this change partially reverts 9f75dfbf364f5140b3f291e0a2c6769bc3d8cbac

we should not proceed against user's will if dual stack is specified but
only one network for a network family can be found. the right fix is
have better error message and documentation, not to tolerate the
failure.

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

4 years agopick_address: Warn and continue when you find at least 1 IPv4 or IPv6 address
Matthew Oliver [Mon, 10 Aug 2020 04:46:21 +0000 (04:46 +0000)]
pick_address: Warn and continue when you find at least 1 IPv4 or IPv6 address

Currently if specify a single public or cluster network, yet have both
`ms bind ipv4` and `ms bind ipv6` set daemons crash when they can't find
both IPs from the same network:

    unable to find any IPv4 address in networks '2001:db8:11d::/120' interfaces ''

And rightly so, of course it can't find an IPv4 network in an IPv6
network.
This patch, adds a new helper method, networks_address_family_coverage,
that takes the list of networks and returns a bitmap of address families
supported.
We then check to see if we have enough networks defined and if you don't
it'll warn and then continue.

Also update the network-config-ref to mention having to define both
address family addresses for cluster and or public networks.

As well as a warning about `ms bind ipv4` being enabled by default which
is easy to miss, there by enabling dual stack when you may only be
expect single stack IPv6.

Thee is also a drive by to fix a `note` that wan't being displayed due
to missing RST syntax.

Signed-off-by: Matthew Oliver <moliver@suse.com>
Fixes: https://tracker.ceph.com/issues/46845
Fixes: https://tracker.ceph.com/issues/39711
(cherry picked from commit 9f75dfbf364f5140b3f291e0a2c6769bc3d8cbac)

4 years agopybind/rados: should pass "name" to cstr() 41318/head
Kefu Chai [Fri, 22 Mar 2019 06:25:12 +0000 (14:25 +0800)]
pybind/rados: should pass "name" to cstr()

it's a regression introduced by 6cb23f9c

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

4 years agoMerge pull request #41227 from ceph/wip-yuriw-nautilus-p2p nautilus-saved
Yuri Weinstein [Wed, 12 May 2021 19:27:01 +0000 (12:27 -0700)]
Merge pull request #41227 from ceph/wip-yuriw-nautilus-p2p

nautilus: qa/tests: advanced nautilus initial version to 14.2.20

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #41156 from smithfarm/wip-50366-nautilus
Yuri Weinstein [Wed, 12 May 2021 17:00:42 +0000 (10:00 -0700)]
Merge pull request #41156 from smithfarm/wip-50366-nautilus

nautilus: rgw: during reshard lock contention, adjust logging

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
4 years agotest: add test case for MDS privated inos accessing
Xiubo Li [Wed, 28 Apr 2021 01:32:24 +0000 (09:32 +0800)]
test: add test case for MDS privated inos accessing

Fixes: https://tracker.ceph.com/issues/50216
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 0ec4d781787df777bbfdeb742b394c73a0d76e08)

Conflicts:
src/test/libcephfs/test.cc
- octopus version of this file is missing lots of tests that were added to
  master post-octopus

4 years agomds: make the lost+found dir accessible from clients
Xiubo Li [Mon, 19 Apr 2021 02:34:02 +0000 (10:34 +0800)]
mds: make the lost+found dir accessible from clients

Inode number 0x4 is reserved for the lost+found dir, and the apps
or recovery apps need to access it.

At the same time the 0x3 is reserved for the global snaprealm, which
will also be lookup by the clients when looking up the snaprealm inodes.

Here will make all the inode less than 100 accessible by clients.

Fixes: https://tracker.ceph.com/issues/50216
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 841071b3602aa2b8bcca57b95cdf671d48036a34)

Conflicts:
src/mds/Server.cc
- code being changed does not exist in octopus: change omitted
        src/mds/mdstypes.h
- trivial resolution

4 years agomds: move the inos 1,2 and 3 macros to ceph_fs.h
Xiubo Li [Tue, 20 Apr 2021 01:08:20 +0000 (09:08 +0800)]
mds: move the inos 1,2 and 3 macros to ceph_fs.h

For inos 1 and 2 there has two places are defining them, to make
sure we won't miss any one of them, let's define them in only one
header file.

Fixes: https://tracker.ceph.com/issues/50216
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 8615807237458e8cebf9497a7431097cdc56c784)

Conflicts:
src/client/Inode.h
src/mds/CInode.h
src/mds/MDCache.cc
src/mds/Server.cc
        src/mds/SnapServer.h
- change MDS_INO_ROOT to CEPH_INO_ROOT in src/mds/SnapServer.h (nautilus-only)

4 years agomgr/progress: ensure progress stays between [0,1] 41310/head
Dan van der Ster [Thu, 29 Apr 2021 23:06:17 +0000 (01:06 +0200)]
mgr/progress: ensure progress stays between [0,1]

If _original_pg_count is 0 then progress can be negative.

Fixes: https://tracker.ceph.com/issues/50591
Related-to: https://tracker.ceph.com/issues/50587
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit 20990a94598d0249745e2ec25c9197d842119d92)

4 years agoclient: don't allow access to MDS-private inodes
Xiubo Li [Wed, 7 Apr 2021 11:37:26 +0000 (19:37 +0800)]
client: don't allow access to MDS-private inodes

Fixes: https://tracker.ceph.com/issues/50112
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 89c511356125f892477ef42bd14c0b447ff06106)

Conflicts:
src/client/Client.cc
- nautilus wants ESTALE instead of CEPHFS_ESTALE

4 years agoclient: add testcase for ceph_ll_lookup_vino
Jeff Layton [Wed, 3 Feb 2021 15:24:16 +0000 (10:24 -0500)]
client: add testcase for ceph_ll_lookup_vino

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit a956c7986fd43da851918b87c71524f9a2bb1162)

Conflicts:
src/test/libcephfs/test.cc
- octopus is missing a bunch of tests, but this doesn't matter because the
  commit being cherry-picked did not touch those

4 years agoclient: add ceph_ll_lookup_vino
Jeff Layton [Mon, 1 Feb 2021 16:04:07 +0000 (11:04 -0500)]
client: add ceph_ll_lookup_vino

Add a new API function for looking up an inode via a vinodeno_t. This
should give ganesha a way to reliably look up snapshot inodes.

We do need to add some special handling for CEPH_SNAPDIRs. If we're
looking for one, then find the non-snapped parent, and then call
open_snapdir to get the snapdir inode.

Also, have the function check the local cache before calling the MDS
to look up an inode.

Fixes: https://tracker.ceph.com/issues/48991
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 70622079c2ec55222a139fa5042902e0b19bd839)

Conflicts:
src/client/Client.cc

4 years agoclient: make _lookup_ino take a vinodeno_t
Jeff Layton [Mon, 1 Feb 2021 15:41:14 +0000 (10:41 -0500)]
client: make _lookup_ino take a vinodeno_t

Currently, it always leaves the snapid as 0. Rename it to
_lookup_vino and make it fill the snapid from the vinodeno_t
instead, but only when it's a "real" snapid.

Change the existing callers to pass in a vinodeno_t with the
snapid set to CEPH_NOSNAP.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 0e0bebd22dc1abea3f0132debc0b524a01fadf63)

Conflicts:
src/client/Client.cc

4 years agoclient: stop doing unnecessary work in ll_lookup_inode
Jeff Layton [Wed, 3 Feb 2021 13:12:41 +0000 (08:12 -0500)]
client: stop doing unnecessary work in ll_lookup_inode

It's not clear to me why we're looking up the parent and name of the
inode in ll_lookup_inode, as we don't actually do anything with them.
Just return once we get an inode reference.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 2b0b895e888c0f3dece3c1e717ca6e1552e588d8)

4 years agoqa/tests: resolved comment - changed to 14.2.20 41227/head
Yuri Weinstein [Tue, 11 May 2021 19:48:16 +0000 (12:48 -0700)]
qa/tests: resolved comment  - changed to 14.2.20

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoMerge pull request #41213 from tchaikov/nautilus-49919
Neha Ojha [Tue, 11 May 2021 16:55:42 +0000 (09:55 -0700)]
Merge pull request #41213 from tchaikov/nautilus-49919

nautilus: mon/OSDMonitor: drop stale failure_info after a grace period

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agorgw: sanitize \r in s3 CORSConfiguration's ExposeHeader
Casey Bodley [Tue, 4 May 2021 12:32:58 +0000 (08:32 -0400)]
rgw: sanitize \r in s3 CORSConfiguration's ExposeHeader

follows up on 1524d3c0c5cb11775313ea1e2bb36a93257947f2 to escape \r as
well

Fixes: CVE-2021-3524
Reported-by: Sergey Bobrov <Sergey.Bobrov@kaspersky.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 87806f48e7a1b8891eb90711f1cedd26f1119aac)

4 years agorgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name
Felix Hüttner [Thu, 6 May 2021 16:18:00 +0000 (12:18 -0400)]
rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name

checking for empty name avoids later assertion in RGWObjectCtx::set_atomic

Fixes: CVE-2021-3531
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b00a5610)

4 years agoMerge pull request #41253 from rhcs-dashboard/wip-50724-nautilus
Ernesto Puerta [Tue, 11 May 2021 07:46:46 +0000 (09:46 +0200)]
Merge pull request #41253 from rhcs-dashboard/wip-50724-nautilus

nautilus: mgr/dashboard: fix base-href: revert it to previous approach

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #40667 from smithfarm/wip-49092-nautilus
Yuri Weinstein [Mon, 10 May 2021 14:46:15 +0000 (07:46 -0700)]
Merge pull request #40667 from smithfarm/wip-49092-nautilus

nautilus: rgw/http: add timeout to http client

Reviewed-by: Yuval Lifshitz <yuvalif@yahoo.com>
4 years agoMerge pull request #40713 from smithfarm/wip-49471-nautilus
Yuri Weinstein [Mon, 10 May 2021 14:45:03 +0000 (07:45 -0700)]
Merge pull request #40713 from smithfarm/wip-49471-nautilus

nautilus: qa: bump osd heartbeat grace for ffsb workload

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #41173 from ifed01/wip-ifed-better-onode-trim-nau
Yuri Weinstein [Mon, 10 May 2021 14:43:46 +0000 (07:43 -0700)]
Merge pull request #41173 from ifed01/wip-ifed-better-onode-trim-nau

nautilus:os/bluestore: do not count pinned entries as trimmed ones.

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
4 years agomgr/dashboard: fix base-href: revert it to previous approach 41253/head
Avan Thakkar [Fri, 7 May 2021 09:38:11 +0000 (15:08 +0530)]
mgr/dashboard: fix base-href: revert it to previous approach

Fixes: https://tracker.ceph.com/issues/50684
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit b6f92922f5c80223fd288d98ce85405a650c0135)

 Conflicts:

src/pybind/mgr/dashboard/frontend/src/app/app.module.ts
      - Adopt the changes coming from master for this file.

4 years agoMerge pull request #36183 from smithfarm/wip-46480-nautilus
Yuri Weinstein [Sat, 8 May 2021 19:52:59 +0000 (12:52 -0700)]
Merge pull request #36183 from smithfarm/wip-46480-nautilus

nautilus: mds: send scrub status to ceph-mgr only when scrub is running

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoos/FileStore: fix to handle readdir error correctly 41238/head
Misono Tomohiro [Thu, 29 Apr 2021 10:57:35 +0000 (19:57 +0900)]
os/FileStore: fix to handle readdir error correctly

Currently filestore code does not handle readdir error.
As man readdir(3) says, we need to check errno after readdir
returns NULL to determine if error happens or not.

This patch fixes the all readdir() calls to check errono and
handle it appropriately:
 - FileStore.cc ... abort if EIO error happens
 - BtrfsFileStoreBAckend.cc/LFNindex.cc
                ... return error to upper layer

Without this fixes, primary PG could fail to correctly perform
backfill operation and could lead data loss propagation described
in #50558.

Fixes: https://tracker.ceph.com/issues/50558
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
(cherry picked from commit 5a6c6267a182f859471ee629b490777ee1e970dd)

4 years agoMerge pull request #40920 from neha-ojha/wip-50403-nautilus
Yuri Weinstein [Fri, 7 May 2021 19:55:25 +0000 (12:55 -0700)]
Merge pull request #40920 from neha-ojha/wip-50403-nautilus

nautilus: common/options/global.yaml.in: increase default value of bluestore_cache_trim_max_skip_pinned

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoqa/tests: advanced nautilus initial version to 14.2.20
Yuri Weinstein [Fri, 7 May 2021 16:07:46 +0000 (09:07 -0700)]
qa/tests: advanced nautilus initial version to 14.2.20

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoosd: drop entry in failure_pending when resetting stale peer 41213/head
Kefu Chai [Sun, 14 Mar 2021 03:56:59 +0000 (11:56 +0800)]
osd: drop entry in failure_pending when resetting stale peer

no need to keep it in the pending list anymore.

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

4 years agomon/OSDMonitor: drop stale failure_info
Kefu Chai [Thu, 11 Mar 2021 13:13:13 +0000 (21:13 +0800)]
mon/OSDMonitor: drop stale failure_info

failure_info keeps strong references of the MOSDFailure messages
sent by osd or peon monitors, whenever monitor starts to handle
an MOSDFailure message, it registers it in its OpTracker. and
the failure report messageis unregistered when monitor acks them
by either canceling them or replying the reporters with a new
osdmap marking the target osd down. but if this does not happen,
the failure reports just pile up in OpTracker. and monitor considers
them as slow ops. and they are reported as SLOW_OPS health warning.

in theory, it does not take long to mark an unresponsive osd down if
we have enough reporters. but there is chance, that a reporter fails
to cancel its report before it reboots, and the monitor also fails
to collect enough reports and mark the target osd down. so the
target osd never gets an osdmap marking it down, so it won't send
an alive message to monitor to fix this.

in this change, we check for the stale failure info in tick(), and
simply drop the stale reports. so the messages can released and
marked "done".

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

Conflicts:
src/mon/OSDMonitor.h: trivial resolution

4 years agomon/OSDMonitor: restructure OSDMonitor::check_failures() loop
Kefu Chai [Thu, 11 Mar 2021 10:28:18 +0000 (18:28 +0800)]
mon/OSDMonitor: restructure OSDMonitor::check_failures() loop

will add a trim failures call in the loop, which mutates failure_info,
while we are still iterating this map. so have to restructure the loop
a little bit.

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

4 years agorgw: rename variable for clarity 41164/head
Mark Houghton [Tue, 3 Nov 2020 15:14:06 +0000 (15:14 +0000)]
rgw: rename variable for clarity

Signed-off-by: Mark Houghton <mhoughton@microfocus.com>
(cherry picked from commit 5d22b7d29a25db4f648daf0c51be74702d4149a2)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
 Conflicts:
src/rgw/rgw_op.cc

4 years agorgw: fix RGWDeleteMultiObj::verify_permission
Mark Houghton [Tue, 3 Nov 2020 11:10:04 +0000 (11:10 +0000)]
rgw: fix RGWDeleteMultiObj::verify_permission

Signed-off-by: Mark Houghton <mhoughton@microfocus.com>
(cherry picked from commit ba23750bea89a0e9818887abe62db0efef02fe3a)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
 Conflicts:
src/rgw/rgw_op.cc

4 years agorgw: Check user permissions for governance retention bypass in multi-object delete.
Mark Houghton [Wed, 28 Oct 2020 14:44:03 +0000 (14:44 +0000)]
rgw: Check user permissions for governance retention bypass in multi-object delete.

fixes: https://tracker.ceph.com/issues/47586
Signed-off-by: Mark Houghton <mhoughton@microfocus.com>
(cherry picked from commit 4f1524199132cbf382877a35b040d691b12717d1)

Conflicts:
rgw_op.cc

4 years agorgw: Honour governance retention override in multi-object delete.
Mark Houghton [Tue, 20 Oct 2020 16:54:32 +0000 (17:54 +0100)]
rgw: Honour governance retention override in multi-object delete.

Allow governance  retention to be overridden by a suitably privileged user.

Fixes: http://tracker.ceph.com/issues/47586
Signed-off-by: Mark Houghton <mhoughton@microfocus.com>
(cherry picked from commit 6989da1bcbe59e4d561c9d16f0ff891f6c6ef567)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
 Conflicts:
src/rgw/rgw_op.cc

4 years agorgw: Check S3 object lock date in multi-object delete
Mark Houghton [Thu, 15 Oct 2020 11:13:50 +0000 (12:13 +0100)]
rgw: Check S3 object lock date in multi-object delete

Multi-object delete (via the S3 API) will now check each object's retention date in the same way as single object delet does.

Fixes: http://tracker.ceph.com/issues/47586
Signed-off-by: Mark Houghton <mhoughton@microfocus.com>
(cherry picked from commit 1a3f08550813e719b34a8133b83eefa97dd43d3a)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
 Conflicts:
src/rgw/rgw_common.h
src/rgw/rgw_common.cc
src/rgw/rgw_op.cc

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
4 years agoMerge pull request #40753 from smithfarm/wip-50073-nautilus
Yuri Weinstein [Wed, 5 May 2021 21:04:57 +0000 (14:04 -0700)]
Merge pull request #40753 from smithfarm/wip-50073-nautilus

nautilus: mgr/PyModule: put mgr_module_path before Py_GetPath()

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #41167 from tchaikov/nautilus-doc-build
Yuri Weinstein [Wed, 5 May 2021 17:56:39 +0000 (10:56 -0700)]
Merge pull request #41167 from tchaikov/nautilus-doc-build

nautilus: build python extensions using distutils

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoos/bluestore: do not count pinned entries as trimmed ones. 41173/head
Igor Fedotov [Wed, 5 May 2021 13:02:24 +0000 (16:02 +0300)]
os/bluestore: do not count pinned entries as trimmed ones.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
4 years agopybind: use distutils.sysconfig for compiling flags 41167/head
Kefu Chai [Mon, 8 Jul 2019 14:08:57 +0000 (22:08 +0800)]
pybind: use distutils.sysconfig for compiling flags

this allows maintainer to override the compiling flags when
cross-compiling Ceph.

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

4 years agopybind: encode flattened dict
Kefu Chai [Sat, 23 Feb 2019 14:26:48 +0000 (22:26 +0800)]
pybind: encode flattened dict

in python3, the keys and values in dict are unicode strings, so we need
to encode them before passing them to underlying librados' C API.

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

4 years agopybind: extract flatten_dict() out
Kefu Chai [Sat, 23 Feb 2019 14:19:11 +0000 (22:19 +0800)]
pybind: extract flatten_dict() out

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

4 years agopybind: set language_level for cythonize explicitly
Kefu Chai [Thu, 21 Feb 2019 14:54:30 +0000 (22:54 +0800)]
pybind: set language_level for cythonize explicitly

Compiling rbd.pyx because it changed.
[1/1] Cythonizing rbd.pyx
/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py:367:
FutureWarning: Cython directive 'language_level' not set, using 2 for
now (Py2). This will change in a later re
lease! File: /var/ssd/ceph/src/pybind/rbd/rbd.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

this warning is raised by cython 0.29.2

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

4 years agorgw: Removed duplicate signing method from S3 credentials caching 41158/head
James Weaver [Fri, 1 Feb 2019 12:19:23 +0000 (12:19 +0000)]
rgw: Removed duplicate signing method from S3 credentials caching

Now makes use of existing method for generating a signature for an S3 request.

Signed-off-by: James Weaver <james.barrett@bbc.co.uk>
(cherry picked from commit 2e25485383f945b52542b3a7d8a97d8296687261)

4 years agorgw: Added caching for tokens retrieved from keystone using S3 credentials
James P. Weaver [Mon, 14 Jan 2019 16:09:13 +0000 (16:09 +0000)]
rgw: Added caching for tokens retrieved from keystone using S3 credentials

When providing an S3 compatible interface previous behaviour has been to cache the
access token but request verification of the signature for every request from keystone.
This causes keystone to be quite a performance bottleneck especially for instalations
with high levels of S3 traffic.

In this commit a change is made to perform the verification of S3 request signatures
inside the radosgw process, thereby seriously reducing the number of requests that need
to be made to keystone. To do this a shared S3 secret key is obtained from keystone and
kept in a local cache.

Signed-off-by: James Weaver <james.barrett@bbc.co.uk>
(cherry picked from commit f8a82240d0b177451bf958be0a671def098932a6)

4 years agorgw: during reshard lock contention, adjust logging 41156/head
J. Eric Ivancich [Wed, 14 Apr 2021 17:55:22 +0000 (13:55 -0400)]
rgw: during reshard lock contention, adjust logging

When RGW fails to get a lock on a reshard log, we log it in such a way
that it looks like an error. Instead we'll make sure that the log
message is informational.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 6d3dee37791ad427a3435c493a1d7874ba075674)

4 years agoMerge pull request #41099 from amathuria/wip-50125-nautilus
Yuri Weinstein [Tue, 4 May 2021 16:38:59 +0000 (09:38 -0700)]
Merge pull request #41099 from amathuria/wip-50125-nautilus

nautilus: mon: Modifying trim logic to change paxos_service_trim_max dynamically

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #41098 from dvanders/nautilus_neg_progress
Yuri Weinstein [Tue, 4 May 2021 16:38:13 +0000 (09:38 -0700)]
Merge pull request #41098 from dvanders/nautilus_neg_progress

nautilus: mon: ensure progress is [0,1] before printing

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #41016 from idryomov/wip-reset-authenticate-err-nautilus
Yuri Weinstein [Tue, 4 May 2021 16:37:22 +0000 (09:37 -0700)]
Merge pull request #41016 from idryomov/wip-reset-authenticate-err-nautilus

nautilus: mon/MonClient: reset authenticate_err in _reopen_session()

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40987 from trociny/wip-50481-nautilus
Yuri Weinstein [Tue, 4 May 2021 15:31:40 +0000 (08:31 -0700)]
Merge pull request #40987 from trociny/wip-50481-nautilus

nautilus: os/FileStore: don't propagate split/merge error to "create"/"remove"

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agomds: do not trim the inodes from the lru list in standby_replay 41144/head
Xiubo Li [Wed, 21 Apr 2021 13:00:19 +0000 (21:00 +0800)]
mds: do not trim the inodes from the lru list in standby_replay

In standby_replay, if some dentries just added/linked but not get a
chance to replay the EOpen journals followed, if the upkeep_main() is
excuted, which will may trim them out immediately. Then when playing
the EOpen journals later the replay will fail.

In standby_replay, let's skip trimming them if dentry's linkage inode
is not nullptr.

Fixes: https://tracker.ceph.com/issues/50246
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 79bb44c1b9f1715378a9550a81984e949e454ff4)