]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agomgr/dashboard: Display users current quota usage 40360/head
Avan Thakkar [Sat, 1 Aug 2020 10:36:13 +0000 (16:06 +0530)]
mgr/dashboard: Display users current quota usage

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

4 years agoMerge pull request #40310 from neha-ojha/wip-49908-pacific
Yuri Weinstein [Tue, 23 Mar 2021 19:12:50 +0000 (12:12 -0700)]
Merge pull request #40310 from neha-ojha/wip-49908-pacific

pacific: mon/MgrStatMonitor: ignore MMgrReport from non-active mgr

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #40309 from neha-ojha/wip-49920-pacific
Yuri Weinstein [Tue, 23 Mar 2021 19:12:19 +0000 (12:12 -0700)]
Merge pull request #40309 from neha-ojha/wip-49920-pacific

pacific: common/options: turn off bluestore_fsck_quick_fix_on_mount by default

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #40289 from liewegas/bug-49427-pacific
Yuri Weinstein [Tue, 23 Mar 2021 19:11:56 +0000 (12:11 -0700)]
Merge pull request #40289 from liewegas/bug-49427-pacific

pacific: osd: fix missing adjacent snaps when handling manifest object

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #40000 from rhcs-dashboard/wip-49702-pacific
Ernesto Puerta [Tue, 23 Mar 2021 17:23:17 +0000 (18:23 +0100)]
Merge pull request #40000 from rhcs-dashboard/wip-49702-pacific

pacific: mgr/dashboard: fix dashboard instance ssl certificate functionality

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
4 years agoMerge pull request #40086 from batrick/i49564
Yuri Weinstein [Tue, 23 Mar 2021 15:00:32 +0000 (08:00 -0700)]
Merge pull request #40086 from batrick/i49564

pacific: mon/MonCap: `fs authorize` generates unparseable cap for file system name containing '-'

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40082 from batrick/i49569
Yuri Weinstein [Tue, 23 Mar 2021 14:58:50 +0000 (07:58 -0700)]
Merge pull request #40082 from batrick/i49569

pacific: qa: rank_freeze prevents failover on some tests

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40093 from batrick/i49474
Yuri Weinstein [Tue, 23 Mar 2021 14:56:36 +0000 (07:56 -0700)]
Merge pull request #40093 from batrick/i49474

pacific: nautilus: qa: "Assertion `cb_done' failed."

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40092 from batrick/i49512
Yuri Weinstein [Tue, 23 Mar 2021 14:55:51 +0000 (07:55 -0700)]
Merge pull request #40092 from batrick/i49512

pacific: client: allow looking up snapped inodes by inode number+snapid tuple

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40090 from batrick/i49751
Yuri Weinstein [Tue, 23 Mar 2021 14:55:09 +0000 (07:55 -0700)]
Merge pull request #40090 from batrick/i49751

pacific: snap-schedule doc

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40089 from batrick/i49561
Yuri Weinstein [Tue, 23 Mar 2021 14:53:46 +0000 (07:53 -0700)]
Merge pull request #40089 from batrick/i49561

pacific: qa: file system deletion not complete because starter fs already destroyed

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40087 from batrick/i49470
Yuri Weinstein [Tue, 23 Mar 2021 14:52:49 +0000 (07:52 -0700)]
Merge pull request #40087 from batrick/i49470

pacific: qa: ffsb workload: PG_AVAILABILITY|PG_DEGRADED warnings

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40085 from batrick/i49517
Yuri Weinstein [Tue, 23 Mar 2021 14:51:27 +0000 (07:51 -0700)]
Merge pull request #40085 from batrick/i49517

pacific: pybind/cephfs: DT_REG and DT_LNK values are wrong

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40083 from batrick/i49608
Yuri Weinstein [Tue, 23 Mar 2021 14:50:36 +0000 (07:50 -0700)]
Merge pull request #40083 from batrick/i49608

pacific: mds: define CephFS errors that replace standard errno values

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40081 from batrick/i49612
Yuri Weinstein [Tue, 23 Mar 2021 14:48:49 +0000 (07:48 -0700)]
Merge pull request #40081 from batrick/i49612

pacific: qa: racy session evicted check

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40080 from batrick/i49630
Yuri Weinstein [Tue, 23 Mar 2021 14:48:02 +0000 (07:48 -0700)]
Merge pull request #40080 from batrick/i49630

pacific: qa: slow metadata ops during scrubbing

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40079 from batrick/i49631
Yuri Weinstein [Tue, 23 Mar 2021 14:47:13 +0000 (07:47 -0700)]
Merge pull request #40079 from batrick/i49631

pacific: mds: don't start purging inodes in the middle of recovery

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40315 from guits/wip-49924-pacific
Guillaume Abrioux [Tue, 23 Mar 2021 08:09:24 +0000 (09:09 +0100)]
Merge pull request #40315 from guits/wip-49924-pacific

pacific: ceph-volume: show devices with GPT headers as not available

4 years agoMerge PR #40184 into pacific
Sage Weil [Tue, 23 Mar 2021 00:20:48 +0000 (19:20 -0500)]
Merge PR #40184 into pacific

* refs/pull/40184/head:
qa/suites/rados/cephadm/orchestrator_cli: random-distro$ -> 0-random-distro$
qa/suites/rados/cephadm/smoke-roleless: distro -> 0-distro
qa/distros/podman: install kubic once per host, in parallel
qa/suites/fs/multiclient: use clients: not all: for pexec

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge PR #40202 into pacific
Sage Weil [Tue, 23 Mar 2021 00:20:39 +0000 (19:20 -0500)]
Merge PR #40202 into pacific

* refs/pull/40202/head:
qa/suites/rados/cephadm/upgrade: wait for rgw servicemap entries to refresh
mgr/cephadm: identify iscsi service by the pool
qa/distros/podman: install containernetworking-plugins along with podman
python-common: Validate characters in service_id for container names
qa/suites/rados/cephadm/smoke-roleless: deploy additional daemon types
cephadm: fix a minor typo in logging message
qa/suites/rados/cephadm/dashboard: test on centos
cephadm: use debug verbosity during container exec
mgr/cephadm/upgrade: do not repeat crash message
mgr/cephadm/upgrade: a little less verbose
mgr/cephadm: don't log not-ok-to-stop at ERR level
mgr/cephadm: is presumed -> appears
mgr/cephadm: don't double-log ok-to-stop results
mgr/cephadm/upgrade: include upgrade progress in ceph -s
mgr/cephadm: clean up misc messages
mgr/cephadm/configcheck: do not spam info every minute
mgr/cephadm: stop conflicting daemon when deploying to a specific port
mgr/cephadm: make DaemonPlacement print nicer
mgr/cephadm: fix --force remove comment
mgr/cephadm/schedule: choose an IP from a subnet list
mgr/cephadm: rgw: clean up config and config-key values on removal
mgr/cephadm: rgw: drop .crt extension when storing cert in config-key
mgr/cephadm/services: allow beast/civetweb to bind to a particular IP
python-common: add 'networks' property to ServiceSpec
mgr/cephadm/schedule: match placement ip only combination with port
mgr/cephadm: less noise about refreshing hosts
mgr/cephadm: fall back to service spec port if none on DaemonDescription
mgr/cephadm: fix redeploy when daemons have ip:port
mgr/cephadm/schedule: add test case
qa/suites/rados/cephadm/smoke-roleless: add rgw test on many ports
doc/cephadm/rgw: update docs to show count-per-host
mgr/cephadm: add support for rgw_frontend_type (beast or civetweb)
mgr/cephadm: remove ssl_frontend_ssl_key from RGWSpec
mgr/cephadm: fix beast private key config option
mgr/cephadm: fix rgw ssl cert/key config-key path
mgr/cephadm/schedule: dynamically assign ports for rgw
mgr/cephadm/schedule: only 1 port in DaemonPlacement
mgr/cephadm: move rgw frontend logic into RgwService
mgr/cephadm/schedule: return DaemonPlacement instead of HostPlacementSpec
mgr/cephadm/schedule: remove unused methods
mgr/cephadm: propagate ip:port from CephadmDaemoNDeploySpec to deployment
cephadm: populate ports if known and not included in unit.meta
mgr/cephadm: gather and report ports in 'orch ps' output
qa/suites/rados/cephadm/orchestrator_cli: random-distro$ -> 0-random-distro$
qa/suites/rados/cephadm/smoke-roleless: distro -> 0-distro
qa/distros/podman: install kubic once per host, in parallel
qa/suites/fs/multiclient: use clients: not all: for pexec
mgr/cephadm: add info to 'ceph orch upgrade status' in cephadm

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com>
4 years agoMerge PR #40279 into pacific
Sage Weil [Tue, 23 Mar 2021 00:20:30 +0000 (19:20 -0500)]
Merge PR #40279 into pacific

* refs/pull/40279/head:
mgr/cephadm: identify rgw, cepfs-mirror in servicemap
mgr/ServiceMap: adjust 'ceph -s' summary
rgw: register daemons in servicemap by gid; include id
cephadm: fix rbd-mirror auth name

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoqa/suites/rados/cephadm/upgrade: wait for rgw servicemap entries to refresh 40202/head
Sage Weil [Sun, 21 Mar 2021 14:07:49 +0000 (09:07 -0500)]
qa/suites/rados/cephadm/upgrade: wait for rgw servicemap entries to refresh

rgw changed the way it registered in the service map.  Wait a bit for
the old entries to be flushed out.

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

4 years agomgr/cephadm: identify iscsi service by the pool
Sage Weil [Fri, 19 Mar 2021 15:59:46 +0000 (10:59 -0500)]
mgr/cephadm: identify iscsi service by the pool

Since we deploy one of these per pool, name the service by the pool.

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

4 years agoqa/distros/podman: install containernetworking-plugins along with podman
Kefu Chai [Mon, 22 Mar 2021 06:49:13 +0000 (14:49 +0800)]
qa/distros/podman: install containernetworking-plugins along with podman

/etc/cni/net.d/87-podman-bridge.conflist tries to load "bridge",
"firewall", "tuning" and "portmap" plugins, which are provided by
containernetworking-plugins package.

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

4 years agoceph-volume: show devices with GPT headers as not available 40315/head
Andrew Schoen [Wed, 17 Mar 2021 20:19:08 +0000 (15:19 -0500)]
ceph-volume: show devices with GPT headers as not available

This patch ensures that if a device has GPT headers it will
not show up in `ceph-volume inventory` as available.

Fixes: https://tracker.ceph.com/issues/48697
Resolves: rhbz#1908065

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 1347243242fc55c904c4d94fb43bdf0bcfc23ab0)

4 years agoMerge pull request #40254 from singuliere/wip-49767-pacific
Yuri Weinstein [Mon, 22 Mar 2021 15:22:43 +0000 (08:22 -0700)]
Merge pull request #40254 from singuliere/wip-49767-pacific

pacific: librbd: allow interrupted trash move request to be restarted

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #40253 from singuliere/wip-49773-pacific
Yuri Weinstein [Mon, 22 Mar 2021 15:22:13 +0000 (08:22 -0700)]
Merge pull request #40253 from singuliere/wip-49773-pacific

pacific: librbd/io: send alloc_hint when compression hint is set

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agomon/MgrStatMonitor: ignore MMgrReport from non-active mgr 40310/head
Sage Weil [Thu, 18 Mar 2021 16:45:48 +0000 (11:45 -0500)]
mon/MgrStatMonitor: ignore MMgrReport from non-active mgr

If it's not the active mgr, we should ignore it.

Since the mgr instance is best identified by the gid, add that to the
message.  (We can't use the source_addrs for the message since that is
the MgrStandby monc addr, not the active mgr addrs in the MgrMap.)

This fixes a problem where a just-demoted mgr report gets processed and a
new mgr gets a ServiceMap with an epoch >= its pending map.  (At least,
that is my theory!)

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

4 years agomgr: tell monc when we get new servicemap, fsmap
Sage Weil [Thu, 18 Mar 2021 15:40:42 +0000 (10:40 -0500)]
mgr: tell monc when we get new servicemap, fsmap

Otherwise, when we re-subscribe we'll request an old map again.  In the
case of the servicemap, that can lead to a failed assertion.

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

4 years agocommon/options: turn off bluestore_fsck_quick_fix_on_mount by default 40309/head
Josh Durgin [Wed, 17 Mar 2021 18:51:27 +0000 (14:51 -0400)]
common/options: turn off bluestore_fsck_quick_fix_on_mount by default

This option enables 3 conversions:

1) pool stats, added in nautilus
2) per-pool omap, added in octopus
3) per-pg omap (replacing (2)) in pacific

Upgrading the long running cluster in sepia from octopus to pacific
resulted in conversion (3). This conversion isn't particularly useful
yet since the follow-on optimization of pg removal aren't in pacific
yet.

This took 25 minutes for the SSD-based osds with <10GB of omap. That's
a lot of disruption, and some clusters have 10x that much omap data.

Upgrades going from nautilus to pacific will miss the finer-grained
stats granularity, but isn't such an important feature it's worth
causing potential availability problems.

In the future we can orchestrate these format changes via cephadm/rook
to minimize the impact on the whole cluster, e.g. going an osd at a
time or doing it during an off-peak period, and not necessarily at the
same time as an upgrade.

Fixes: https://tracker.ceph.com/issues/45265
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit c3e7acb3acd4b099c12062aadf7d413d80ab0cab)

4 years agoMerge PR #40247 into pacific
Sage Weil [Sun, 21 Mar 2021 18:25:06 +0000 (13:25 -0500)]
Merge PR #40247 into pacific

* refs/pull/40247/head:
common: reset last_log_sent when clog_to_monitors is updated
logclient: move LogChannel::set_log_to_monitors(bool v) to LogClient.cc

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge PR #40246 into pacific
Sage Weil [Sun, 21 Mar 2021 18:24:25 +0000 (13:24 -0500)]
Merge PR #40246 into pacific

* refs/pull/40246/head:
osd: fix potential null pointer dereference when sending ping

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge PR #40126 into pacific
Sage Weil [Sun, 21 Mar 2021 18:23:41 +0000 (13:23 -0500)]
Merge PR #40126 into pacific

* refs/pull/40126/head:
pybind/mgr/balancer/module.py: assign weight-sets to all buckets before balancing

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge PR #40249 into pacific
Sage Weil [Sun, 21 Mar 2021 18:22:56 +0000 (13:22 -0500)]
Merge PR #40249 into pacific

* refs/pull/40249/head:
osd: ignore already dumped osd in dump_item()

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge PR #40248 into pacific
Sage Weil [Sun, 21 Mar 2021 18:22:08 +0000 (13:22 -0500)]
Merge PR #40248 into pacific

* refs/pull/40248/head:
debian/ceph-common.postinst: do not chown cephadm log dirs

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge pull request #40285 from tchaikov/pacific-pr-40272
Kefu Chai [Sun, 21 Mar 2021 17:19:49 +0000 (01:19 +0800)]
Merge pull request #40285 from tchaikov/pacific-pr-40272

pacific: install-deps.sh: remove existing ceph-libboost of different version

Reviewed-by: David Galloway <dgallowa@redhat.com>
4 years agoMerge PR #40231 into pacific
Sage Weil [Sun, 21 Mar 2021 14:39:20 +0000 (09:39 -0500)]
Merge PR #40231 into pacific

* refs/pull/40231/head:
mgr/dashboard: check .badge instead of text for expected label
mgr/dashboard: Add badge to the Label column in Host List

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
4 years agoMerge PR #40209 into pacific
Sage Weil [Sun, 21 Mar 2021 14:38:58 +0000 (09:38 -0500)]
Merge PR #40209 into pacific

* refs/pull/40209/head:
mgr/dashboard: select any object gateway on local cluster.

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
4 years agoMerge PR #40129 into pacific
Sage Weil [Sun, 21 Mar 2021 14:38:49 +0000 (09:38 -0500)]
Merge PR #40129 into pacific

* refs/pull/40129/head:
osd: PeeringState: implement an acting_set_writeable() function
osd: PeeringState: fix a boolean conditional direction
osd: PeeringState: fix stretch peering so PGs can go peered but not active
osd: PeeringState: don't add acting-set OSDs to candidate set in stretch mode
osd: PeeringState: fix calc_replicated_acting_stretch() syntax/logic
osd: PeeringState: respect stretch peering constraints for async recovery
osd: PeeringState: add a comment about using size as a proxy for activateable
osd: check for is_stretch_pool() in stretch_set_can_peer()
scripts: some additions to help with local testing
script: set_up_stretch_mode: include OSDs in root=default so pg creation works

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoosd: recover unreadable snapshots when handling manifest object 40289/head
myoungwon oh [Wed, 24 Feb 2021 14:16:39 +0000 (23:16 +0900)]
osd: recover unreadable snapshots when handling manifest object

The manifest object needs adjacent clones to increment/decrement
refcount when modifying the object. So, recovering the clones is needed
if the adjacent clones are unreadable.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
(cherry picked from commit b242a2c061182b724fa8016d1175f2b23e570d4b)

4 years agoosd: return -EINVAL if op is for existing cache tier
myoungwon oh [Wed, 24 Feb 2021 14:39:50 +0000 (23:39 +0900)]
osd: return -EINVAL if op is for existing cache tier

At the end of unit test, flush and evict are called.
But, those ops affect manifest object because
cache_mode is not set to NONE sometime.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
(cherry picked from commit 61b43e93bbb636c4852a304da031497a4c3671e3)

4 years agoinstall-deps.sh: remove existing ceph-libboost of different version 40269/head 40285/head
Kefu Chai [Sat, 20 Mar 2021 05:00:01 +0000 (13:00 +0800)]
install-deps.sh: remove existing ceph-libboost of different version

we install different versions of precompiled ceph-libboost packages
for different branches when building and testing them on ubuntu test
nodes. for instance,

- nautilus: v1.72
- octopus, pacific: v1.73

they share the same set of test nodes. and these ceph-libboost packages
conflict with each other, because they install files to the same places.

in order to avoid the confliction, we should uninstall existing packages
before installing a different version of ceph-libboost packages.

ceph-libboost${version}-dev is a package providing the shared headers of
boost library, so, in this change we check if it is installed before
returning or removing the existing packages.

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

Conflicts:
install-deps.sh: trivial resolution

4 years agoMerge pull request #40273 from singuliere/wip-49907-pacific
Kefu Chai [Sun, 21 Mar 2021 05:45:47 +0000 (13:45 +0800)]
Merge pull request #40273 from singuliere/wip-49907-pacific

pacific: pybind/mgr/dashboard: bump flake8 to 3.9.0

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agopython-common: Validate characters in service_id for container names
Melissa Li [Tue, 16 Mar 2021 05:07:31 +0000 (01:07 -0400)]
python-common: Validate characters in service_id for container names

Service_ids need to be valid docker and podman container names.

Fixes: https://tracker.ceph.com/issues/46497
Signed-off-by: Melissa Li <li.melissa.kun@gmail.com>
(cherry picked from commit 8dd2bf85e759072b4af6546e93ef3768ef9b2db8)

4 years agoqa/suites/rados/cephadm/smoke-roleless: deploy additional daemon types
Sage Weil [Fri, 19 Mar 2021 15:57:58 +0000 (10:57 -0500)]
qa/suites/rados/cephadm/smoke-roleless: deploy additional daemon types

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

4 years agomgr/cephadm: identify rgw, cepfs-mirror in servicemap 40279/head
Sage Weil [Thu, 18 Mar 2021 21:27:08 +0000 (17:27 -0400)]
mgr/cephadm: identify rgw, cepfs-mirror in servicemap

Like rbd-mirror, cephfs-mirror and rgw daemons register under their gid.

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

4 years agomgr/ServiceMap: adjust 'ceph -s' summary
Sage Weil [Fri, 19 Mar 2021 12:21:18 +0000 (08:21 -0400)]
mgr/ServiceMap: adjust 'ceph -s' summary

- Do not list individual daemon ids as this won't scale for larger
  clusters
- Do not contemplate multile daemons of the same type that register with
  different "daemon_type" -- not until we actually have any that do that.
- Present counts by various groupings: distinct hosts and rgw zones to
  start.

  services:
    mon:           1 daemons, quorum a (age 4m)
    mgr:           x(active, since 3m)
    osd:           1 osds: 1 up (since 3m), 1 in (since 3m)
    cephfs-mirror: 1 daemon active (1 hosts)
    rbd-mirror:    2 daemons active (1 hosts)
    rgw:           2 daemons active (1 hosts, 1 zones)

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

4 years agorgw: register daemons in servicemap by gid; include id
Sage Weil [Fri, 19 Mar 2021 12:25:23 +0000 (08:25 -0400)]
rgw: register daemons in servicemap by gid; include id

Registering by gid allows multiple radosgw instances to share an auth
key/identity.  Including the id in the metadata allows them to still be
identified by name (even if not uniquely).

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

4 years agocephadm: fix rbd-mirror auth name
Sage Weil [Thu, 18 Mar 2021 20:30:52 +0000 (16:30 -0400)]
cephadm: fix rbd-mirror auth name

Broken by 8fa941b35d89db6a40f7d2912b69eadf40c5004c

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

4 years agocephadm: fix a minor typo in logging message
Matthew Cengia [Sun, 14 Mar 2021 23:58:21 +0000 (10:58 +1100)]
cephadm: fix a minor typo in logging message

remove duplicated "to"

Signed-off-by: Matthew Cengia <mattcen@mattcen.com>
(cherry picked from commit bd500e88e225135d24d3aec78cfb0b6db7481dae)

4 years agoqa/suites/rados/cephadm/dashboard: test on centos
Sage Weil [Fri, 19 Mar 2021 13:16:55 +0000 (08:16 -0500)]
qa/suites/rados/cephadm/dashboard: test on centos

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

4 years agocephadm: use debug verbosity during container exec
Michael Fritch [Thu, 18 Mar 2021 21:41:06 +0000 (15:41 -0600)]
cephadm: use debug verbosity during container exec

avoid failures from appearing on the consle when exec'ing within the
container during the `ls` command

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 46f00a7bd7f38a1e2f3b301cd94c5d22b60bcc5a)

4 years agomgr/cephadm/upgrade: do not repeat crash message
Sage Weil [Fri, 19 Mar 2021 14:46:09 +0000 (10:46 -0400)]
mgr/cephadm/upgrade: do not repeat crash message

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

4 years agomgr/cephadm/upgrade: a little less verbose
Sage Weil [Fri, 19 Mar 2021 14:44:19 +0000 (10:44 -0400)]
mgr/cephadm/upgrade: a little less verbose

The _do_upgrade() method runs a zillion times; try to report fewer
repetitive messages on every iteration.

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

4 years agomgr/cephadm: don't log not-ok-to-stop at ERR level
Sage Weil [Fri, 19 Mar 2021 14:38:06 +0000 (10:38 -0400)]
mgr/cephadm: don't log not-ok-to-stop at ERR level

This is normal during the upgrade; INF is fine.

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

4 years agomgr/cephadm: is presumed -> appears
Sage Weil [Fri, 19 Mar 2021 14:37:37 +0000 (10:37 -0400)]
mgr/cephadm: is presumed -> appears

The old wording was weird.

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

4 years agomgr/cephadm: don't double-log ok-to-stop results
Sage Weil [Fri, 19 Mar 2021 14:37:16 +0000 (10:37 -0400)]
mgr/cephadm: don't double-log ok-to-stop results

The calling upgrade code also reports this.

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

4 years agomgr/cephadm/upgrade: include upgrade progress in ceph -s
Sage Weil [Fri, 19 Mar 2021 14:31:24 +0000 (10:31 -0400)]
mgr/cephadm/upgrade: include upgrade progress in ceph -s

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

4 years agopybind/mgr/dashboard: remove "python_version >= 3' 40273/head
Kefu Chai [Fri, 19 Mar 2021 04:24:28 +0000 (12:24 +0800)]
pybind/mgr/dashboard: remove "python_version >= 3'

remove "python_version >= '3'" from requirements-lint.txt, as we've
dropped the Python2 support.

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

4 years agopybind/mgr/dashboard: bump flake8 to 3.9.0
Kefu Chai [Fri, 19 Mar 2021 04:05:45 +0000 (12:05 +0800)]
pybind/mgr/dashboard: bump flake8 to 3.9.0

to address the failure of

ERROR: Cannot install -r requirements-lint.txt (line 2) and -r requirements-lint.txt (line 8) because these package versions have conflicting dependencies.

The conflict is caused by:
    flake8 3.8.4 depends on pycodestyle<2.7.0 and >=2.6.0a1
    autopep8 1.5.6 depends on pycodestyle>=2.7.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

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

4 years agoMerge pull request #40226 from neha-ojha/wip-49895-pacific
Yuri Weinstein [Fri, 19 Mar 2021 21:13:45 +0000 (14:13 -0700)]
Merge pull request #40226 from neha-ojha/wip-49895-pacific

pacific: osd: remove a ceph_assert() from a legitimate path

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #40221 from sseshasa/wip-49886-pacific
Yuri Weinstein [Fri, 19 Mar 2021 21:13:14 +0000 (14:13 -0700)]
Merge pull request #40221 from sseshasa/wip-49886-pacific

pacific: qa/tasks: Add additional wait_for_clean() check in lost_unfound tasks.

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #40197 from neha-ojha/wip-39757-pacific
Yuri Weinstein [Fri, 19 Mar 2021 21:12:51 +0000 (14:12 -0700)]
Merge pull request #40197 from neha-ojha/wip-39757-pacific

pacific: qa: Add bluestore resharding test

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #39997 from sseshasa/wip-49699-pacific
Yuri Weinstein [Fri, 19 Mar 2021 21:12:19 +0000 (14:12 -0700)]
Merge pull request #39997 from sseshasa/wip-49699-pacific

pacific: osd: Refinements to mclock built-in profiles implementation.

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agorbd: clarify trash remove error code from interrupted move 40254/head
Jason Dillaman [Wed, 10 Mar 2021 20:31:22 +0000 (15:31 -0500)]
rbd: clarify trash remove error code from interrupted move

Fixes: https://tracker.ceph.com/issues/49716
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 138d71fb0635682510cadda8e4ad5aaab3f39e44)

4 years agolibrbd/trash: don't return -ENOENT error from move state machine
Jason Dillaman [Wed, 10 Mar 2021 20:37:39 +0000 (15:37 -0500)]
librbd/trash: don't return -ENOENT error from move state machine

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f6ed98d682e562de1cad301696e918c52a4dba5d)

4 years agolibrbd/api: trash remove/purge should indicate interrupted move
Jason Dillaman [Wed, 10 Mar 2021 20:29:11 +0000 (15:29 -0500)]
librbd/api: trash remove/purge should indicate interrupted move

This will help the user self-diagnose that a trash move operation
was interrupted and therefore the state is invalid.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit c808abea64f00e25c6fd3bcaa7ebf9bc763e7ca0)

4 years agolibrbd/api: allow an interrupted trash move to be restarted
Jason Dillaman [Wed, 10 Mar 2021 20:15:26 +0000 (15:15 -0500)]
librbd/api: allow an interrupted trash move to be restarted

Search the trash entries for a matching image name that is
still in the moving state and allow the operation to be
restarted.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit ed2d696e1eafaa59d29ce6fac952e4e5f4f1e920)

4 years agolibrbd/api: helper method for natively listing the trash
Jason Dillaman [Wed, 10 Mar 2021 19:44:36 +0000 (14:44 -0500)]
librbd/api: helper method for natively listing the trash

The existing list method converts the native TrashImageSpec to the
API's rbd_trash_image_info_t which is missing the source field.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 21adc927fe50ae37069d77482edd4c4e098433c9)

4 years agolibrbd/io: send alloc_hint when compression hint is set 40253/head
Jason Dillaman [Fri, 12 Mar 2021 00:44:15 +0000 (19:44 -0500)]
librbd/io: send alloc_hint when compression hint is set

Previously the hint would not be set if the object map indicated the
object may exist.

Fixes: https://tracker.ceph.com/issues/49690
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit b52b5fe06d1f88130b72b8357dbf5630c7cf1cbd)

4 years agoosd: ignore already dumped osd in dump_item() 40249/head
jhonxue [Fri, 5 Mar 2021 15:33:10 +0000 (23:33 +0800)]
osd: ignore already dumped osd in dump_item()

Fixes: https://tracker.ceph.com/issues/49627
Signed-off-by: Xue Yantao <jhonxue@tencent.com>
(cherry picked from commit 7813819445e73d1e7f333bd9aaaf42624cd781ec)

4 years agodebian/ceph-common.postinst: do not chown cephadm log dirs 40248/head
Sage Weil [Tue, 9 Mar 2021 17:56:42 +0000 (11:56 -0600)]
debian/ceph-common.postinst: do not chown cephadm log dirs

The container uid/gid is different than the debian uid/gid (because the
container is centos-based and we got a different uid/gid allocation there).

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

4 years agocommon: reset last_log_sent when clog_to_monitors is updated 40247/head
Gerald Yang [Wed, 3 Mar 2021 04:37:15 +0000 (04:37 +0000)]
common: reset last_log_sent when clog_to_monitors is updated

When clog_to_monitors is disabled, "last_log" still keeps increasing by
get_next_seq() if OSD writes info to clog

But "last_log_sent" doesn't increase, if we disable clog_to_monitors for
a bit longer and then re-enabling it, the num_unsent could be bigger than
log_queue_size(), it will trigger an assertion in _get_mon_log_message

We need to reset last_log_sent to last_log before updating clog_to_monitors

Signed-off-by: Gerald Yang <gerald.yang@canonical.com>
(cherry picked from commit 294ddf9ba779d40b0bc859e55f5287379c75624f)

4 years agologclient: move LogChannel::set_log_to_monitors(bool v) to LogClient.cc
Gerald Yang [Thu, 21 Jan 2021 08:16:48 +0000 (08:16 +0000)]
logclient: move LogChannel::set_log_to_monitors(bool v) to LogClient.cc

Signed-off-by: Gerald Yang <gerald.yang@canonical.com>
(cherry picked from commit faf2e099ca58868e0b35e5b6f9639c1ecabb4e16)

4 years agoosd: fix potential null pointer dereference when sending ping 40246/head
Mykola Golub [Sat, 16 Jan 2021 05:00:09 +0000 (05:00 +0000)]
osd: fix potential null pointer dereference when sending ping

Fixes: https://tracker.ceph.com/issues/48821
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 86576b09973b857ec2fe8195069e21812992db26)

4 years ago16.1.0
Jenkins Build Slave User [Fri, 19 Mar 2021 16:54:22 +0000 (16:54 +0000)]
16.1.0

4 years agomgr/cephadm: clean up misc messages
Sage Weil [Wed, 17 Mar 2021 19:49:47 +0000 (15:49 -0400)]
mgr/cephadm: clean up misc messages

- join list with ' '
- key, not keyring
- -ing, not ': '

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

4 years agomgr/cephadm/configcheck: do not spam info every minute
Sage Weil [Wed, 17 Mar 2021 19:43:33 +0000 (15:43 -0400)]
mgr/cephadm/configcheck: do not spam info every minute

It doesn't make to spam INF every minute.  Reducing this to DBG means
it'll never be seen.  Just remove it.

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

4 years agomgr/cephadm: stop conflicting daemon when deploying to a specific port
Sage Weil [Wed, 17 Mar 2021 19:39:15 +0000 (15:39 -0400)]
mgr/cephadm: stop conflicting daemon when deploying to a specific port

If we are deploying a daemon to bind to a specific port and there is
an existing daemon we are removing that also binds to that port, stop
it first.  Unless we are both binding to different IPs.

This resolves the case where daemons bind to * and we redeploy with a
subnet to bind to.  It would eventually converge before, but would
throw a bind error in the process and take longer.

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

4 years agomgr/cephadm: make DaemonPlacement print nicer
Sage Weil [Wed, 17 Mar 2021 19:38:57 +0000 (15:38 -0400)]
mgr/cephadm: make DaemonPlacement print nicer

'host(ip:port)' or 'host(*:port)' so we can show it to a user.

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

4 years agomgr/cephadm: fix --force remove comment
Sage Weil [Wed, 17 Mar 2021 18:42:34 +0000 (14:42 -0400)]
mgr/cephadm: fix --force remove comment

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

4 years agomgr/cephadm/schedule: choose an IP from a subnet list
Sage Weil [Thu, 11 Mar 2021 23:47:24 +0000 (18:47 -0500)]
mgr/cephadm/schedule: choose an IP from a subnet list

Choose an IP from the subnet list provided by the ServiceSpec.

A few caveats:
- we ignore hosts that don't have IPs in the given subnet
- the subnet matching is STRICT.  That is, the CIDR name has to exactly
match what is configured on the host.  That means you can't just say 10/8
to match any 10.whatever addres--you need the exactly network on the host
(e.g, 10.1.2.0/24).
- If you modify a servicespec and change the networks when there are
already deployed daemons, we will try to deploy the new instances on
the same ports but bound to a specific IP instead of *.  Which will fail.
You need to remove the service first, or remove the old daemons manually
so that creating new ones will succeed.

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

4 years agomgr/cephadm: rgw: clean up config and config-key values on removal
Sage Weil [Tue, 16 Mar 2021 16:58:52 +0000 (12:58 -0400)]
mgr/cephadm: rgw: clean up config and config-key values on removal

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

4 years agomgr/cephadm: rgw: drop .crt extension when storing cert in config-key
Sage Weil [Tue, 16 Mar 2021 16:58:03 +0000 (12:58 -0400)]
mgr/cephadm: rgw: drop .crt extension when storing cert in config-key

This will no affect upgrades since we will run the config() method before
prepare_create() any time we deploy a new daemon on this service, which
means we'll re-store the cert in the new key location before we generate
a new rgw_frontends option that references it.

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

4 years agomgr/cephadm/services: allow beast/civetweb to bind to a particular IP
Sage Weil [Thu, 11 Mar 2021 23:42:33 +0000 (18:42 -0500)]
mgr/cephadm/services: allow beast/civetweb to bind to a particular IP

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

4 years agopython-common: add 'networks' property to ServiceSpec
Sage Weil [Tue, 16 Mar 2021 22:59:56 +0000 (18:59 -0400)]
python-common: add 'networks' property to ServiceSpec

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

4 years agomgr/cephadm/schedule: match placement ip only combination with port
Sage Weil [Thu, 11 Mar 2021 23:40:22 +0000 (18:40 -0500)]
mgr/cephadm/schedule: match placement ip only combination with port

1- We only have an IP to bind to if we also have a port, and
2- If we do, we want an exact match: if the DaemonPlacement has ip of
   None, then the DaemonDescription should have None too.

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

4 years agoMerge pull request #40165 from dillaman/wip-librbd-backports-pacific-9
Jason Dillaman [Fri, 19 Mar 2021 12:40:43 +0000 (08:40 -0400)]
Merge pull request #40165 from dillaman/wip-librbd-backports-pacific-9

pacific: librbd: miscellaneous backports

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agomgr/dashboard: check .badge instead of text for expected label 40231/head
Nizamudeen A [Mon, 8 Feb 2021 20:21:25 +0000 (01:51 +0530)]
mgr/dashboard: check .badge instead of text for expected label

this change fixes a regression introduced by
8c5e31ec1a13bc53394eb2cb6880d74db169fac4 which broke the 01-hosts.e2e-spec.ts test
driven by test_dashboard_e2e.sh

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

4 years agomgr/dashboard: Add badge to the Label column in Host List
Nizamudeen A [Tue, 2 Feb 2021 15:12:02 +0000 (20:42 +0530)]
mgr/dashboard: Add badge to the Label column in Host List

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

4 years agoMerge pull request #40228 from neha-ojha/wip-revert-39637
Neha Ojha [Fri, 19 Mar 2021 01:40:04 +0000 (18:40 -0700)]
Merge pull request #40228 from neha-ojha/wip-revert-39637

pacific: Revert "PendingReleaseNotes: mgr/pg_autoscaler"

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kamoltat (Junior) Sirivadhna <ksirivad@redhat.com>
4 years agoRevert "PendingReleaseNotes: mgr/pg_autoscaler" 40228/head
Neha Ojha [Thu, 18 Mar 2021 23:50:46 +0000 (23:50 +0000)]
Revert "PendingReleaseNotes: mgr/pg_autoscaler"

This reverts commit ce45584800f81d1d70d39a76d78778f0ccd73bb2.

Needs reverting since the corresponding code changes were reverted in
https://github.com/ceph/ceph/pull/39921.

Signed-off-by: Neha Ojha <nojha@redhat.com>
4 years agoosd: remove a ceph_assert() from a legitimate path 40226/head
Ronen Friedman [Wed, 17 Mar 2021 15:21:10 +0000 (17:21 +0200)]
osd: remove a ceph_assert() from a legitimate path

on_replica_init() might be legitimately called twice,
if the replica was waiting for updates to complete
before servicing the request.

Fixes: https://tracker.ceph.com/issues/49867
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 437456ecf9429dd5623cda105e1399234fcc86de)

4 years agoMerge pull request #40180 from linuxbox2/wip-pacific-lcloop
Matt Benjamin [Thu, 18 Mar 2021 20:04:40 +0000 (16:04 -0400)]
Merge pull request #40180 from linuxbox2/wip-pacific-lcloop

rgw: lc: fix infinite loop in bucket_lc_prepare

4 years agotest: ignore failures to force-enable lockdep 40165/head
Jason Dillaman [Wed, 17 Mar 2021 19:29:37 +0000 (15:29 -0400)]
test: ignore failures to force-enable lockdep

PR #40062 tweaked the behavior of lockdep to compile it out
of the code entirely for release builds. This fixes several
gtests where lockdep was force-enabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit bdc1178bd8a722233743a1b6ad63f79dccb3f8f8)

4 years agotest/pybind/rbd: fixed functional change in encryption API
Jason Dillaman [Wed, 17 Mar 2021 18:14:48 +0000 (14:14 -0400)]
test/pybind/rbd: fixed functional change in encryption API

The encryption format API now also implicitly loads the encryption
layer. This tweaks the tests to account for this functional
difference.

Fixes: https://tracker.ceph.com/issues/49848
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 625244f999a5ecaf908220d7bc68c81bab01cc6a)

4 years agorbd/cache/pwl: update wait_buffer state and add wake_up
Yin Congmin [Mon, 15 Mar 2021 07:34:35 +0000 (15:34 +0800)]
rbd/cache/pwl: update wait_buffer state and add wake_up

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
(cherry picked from commit 21cc46bb3aaf3315ceeef786710f6874c1ab6e86)

4 years agolibrbd/cache/pwl: set max size of continuous data
Yin Congmin [Mon, 8 Mar 2021 16:26:04 +0000 (00:26 +0800)]
librbd/cache/pwl: set max size of continuous data

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
(cherry picked from commit bcad92c126526be7ba249322ac3ead0d83b4d188)

4 years agoqa: krbd_blkroset.t: update for separate hw and user read-only flags
Ilya Dryomov [Wed, 17 Mar 2021 10:00:33 +0000 (11:00 +0100)]
qa: krbd_blkroset.t: update for separate hw and user read-only flags

Since kernel 5.12, hardware read-only state and user read-only
policy (BLKROGET/SET ioctls) are tracked separately in the block
layer.  As the purpose of our ->set_read_only() method was exactly
that, it was removed.

As a side effect, BLKROSET no longer returns EROFS on an attempt
to make a read-only mapping read-write with "blockdev --setrw".
The policy gets updated, but the device remains read-only as before
because the hardware (== mapping) state is controlled by the driver.

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

4 years agokrbd: check device node accessibility only if we actually mapped
Ilya Dryomov [Mon, 15 Mar 2021 19:30:07 +0000 (20:30 +0100)]
krbd: check device node accessibility only if we actually mapped

Fix a braino that came with commit f6854ac65d2a ("krbd: make sure the
device node is accessible after the mapping").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 8330c9fa4e27204c768777afe45af0eeb273c835)