]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agomon/PGMap: add pg count for pools in the ceph df command 36944/head
Vikhyat Umrao [Wed, 26 Aug 2020 10:17:05 +0000 (03:17 -0700)]
mon/PGMap: add pg count for pools in the ceph df command
Fixes: https://tracker.ceph.com/issues/46663
Signed-off-by: Vikhyat Umrao <vikhyat@redhat.com>
(cherry picked from commit 9ffbffbe6cd1d8dafb1dd88cbc1ce644afc7a915)

 Conflicts:
PendingReleaseNotes
        - Taking only release notes line for this commit

Signed-off-by: Vikhyat Umrao <vikhyat@redhat.com>
4 years agoMerge pull request #36930 from aclamk/wip-bluefs-log-replay-rescue-nautilus
Yuri Weinstein [Tue, 8 Sep 2020 17:15:44 +0000 (10:15 -0700)]
Merge pull request #36930 from aclamk/wip-bluefs-log-replay-rescue-nautilus

nautilus: Rescue procedure for extremely large bluefs log

Neha Ojha <nojha@redhat.com>

4 years agoMerge pull request #36785 from callithea/wip-46937-nautilus
Yuri Weinstein [Wed, 2 Sep 2020 17:33:26 +0000 (10:33 -0700)]
Merge pull request #36785 from callithea/wip-46937-nautilus

nautilus: mgr: Add missing states to PG_STATES in mgr_module.py.

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #36853 from dillaman/wip-46932-nautilus
Yuri Weinstein [Wed, 2 Sep 2020 16:42:53 +0000 (09:42 -0700)]
Merge pull request #36853 from dillaman/wip-46932-nautilus

nautilus: librados: add LIBRADOS_SUPPORTS_GETADDRS support

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
4 years agoMerge pull request #36784 from callithea/wip-46752-nautilus
Yuri Weinstein [Wed, 2 Sep 2020 16:41:46 +0000 (09:41 -0700)]
Merge pull request #36784 from callithea/wip-46752-nautilus

nautilus: mgr/dashboard: wait longer for health status to be cleared

Reviewed-by: Stephan Müller <smueller@suse.com>
4 years agoMerge pull request #36578 from callithea/wip-46716-nautilus
Yuri Weinstein [Wed, 2 Sep 2020 16:40:39 +0000 (09:40 -0700)]
Merge pull request #36578 from callithea/wip-46716-nautilus

nautilus: mgr/diskprediction_local: Fix array size error

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #36926 from leseb/bp-36700-nautilus
Jan Fajerski [Wed, 2 Sep 2020 13:34:40 +0000 (15:34 +0200)]
Merge pull request #36926 from leseb/bp-36700-nautilus

nautilus: ceph-volume: retry when acquiring lock fails

4 years agoos/bluestore: Add documentation for large bluefs log recovery 36930/head
Adam Kupczyk [Wed, 1 Jul 2020 21:09:17 +0000 (23:09 +0200)]
os/bluestore: Add documentation for large bluefs log recovery

Adds additional paragraph to ceph-bluestore-tool documentation,
describing how to use *special* options --bluefs_replay_recovery
and --bluefs_replay_recovery_disable_compact to recover large
bluefs log.

Fixes: https://tracker.ceph.com/issues/46714
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
4 years agoos/bluestore: Add ability to disable compaction
Adam Kupczyk [Fri, 26 Jun 2020 16:04:57 +0000 (18:04 +0200)]
os/bluestore: Add ability to disable compaction

This ability only makes sense as a step that allows to perform fsck before commiting recovered bluefs log.

Fixes: https://tracker.ceph.com/issues/46714
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
Cherry-picked from 7b01af4d95bfa789b3b3247d016431fdbfd844a4
Conflicts:
src/os/bluestore/BlueFS.cc

4 years agoos/bluestore: Added rescue procedure for bluefs log replay
Adam Kupczyk [Tue, 23 Jun 2020 12:45:18 +0000 (14:45 +0200)]
os/bluestore: Added rescue procedure for bluefs log replay

This is a procedure tries to find on disk unreachable extents and pretend they were
already a part of bluefs log. If this gives proper crc, accept it.

Fixes: https://tracker.ceph.com/issues/46714
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
Cherry-picked from 40e94a106a8adff6304905d59e1634801d2c9890

Conflicts:
src/common/legacy_config_opts.h
src/os/bluestore/BlueFS.cc

4 years agoMerge pull request #36615 from rishabh-d-dave/cv-add-tests-for-new-lvm-functions-n
Jan Fajerski [Tue, 1 Sep 2020 14:25:21 +0000 (16:25 +0200)]
Merge pull request #36615 from rishabh-d-dave/cv-add-tests-for-new-lvm-functions-n

nautilus: ceph-volume: add tests for new functions that run LVM commands

4 years agoMerge pull request #36610 from rishabh-d-dave/cv-rm-container-classes-n
Jan Fajerski [Tue, 1 Sep 2020 14:25:02 +0000 (16:25 +0200)]
Merge pull request #36610 from rishabh-d-dave/cv-rm-container-classes-n

nautilus: ceph-volume: remove container classes from api/lvm.py

4 years agoceph-volume: retry when acquiring lock fails 36926/head
Sébastien Han [Tue, 18 Aug 2020 13:41:31 +0000 (15:41 +0200)]
ceph-volume: retry when acquiring lock fails

When preaparing the osd device with --mkfs, the ceph-osd binary tries to
acquire an exclusive lock on the device (soon to become an OSD).
Unfortunately, when running in containers, we have seen cases where
there is a race between ceph-osd and systemd-udevd to acquire a lock on
the device. Sometimes systemd-udevd gets the lock and releases it soon
so that the ceph-osd gets sometimes the lock is still held and because
ceph-osd uses LOCK_NB the command fails.

This commit retries if the lock cannot be acquired, up to 5 times for 5
seconds, this should be more than enough to acquire the lock and
proceed with the OSD mkfs.

Unfortunately, this is so transient that we cannot lock earlier from c-v,
this won't do anything.

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

4 years agoMerge PR #36692 into nautilus
Patrick Donnelly [Fri, 28 Aug 2020 16:17:11 +0000 (09:17 -0700)]
Merge PR #36692 into nautilus

* refs/pull/36692/head:
mgr/dashboard/api: reduce amount of daemon logs

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #36783 from callithea/wip-46973-nautilus
Lenz Grimmer [Fri, 28 Aug 2020 10:30:08 +0000 (12:30 +0200)]
Merge pull request #36783 from callithea/wip-46973-nautilus

nautilus: mgr/dashboard: Hide table action input field if limit=0

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
4 years agoMerge pull request #36607 from s0nea/wip-46913-nautilus
Lenz Grimmer [Fri, 28 Aug 2020 10:21:16 +0000 (12:21 +0200)]
Merge pull request #36607 from s0nea/wip-46913-nautilus

nautilus: mgr/dashboard/api: increase API health timeout

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
4 years agomgr: Add missing states to PG_STATES in mgr_module.py. 36785/head
Harley Gorrell [Fri, 31 Jul 2020 23:21:47 +0000 (17:21 -0600)]
mgr: Add missing states to PG_STATES in mgr_module.py.

Fixes: https://tracker.ceph.com/issues/46808
Signed-off-by: Harley Gorrell <harley@panix.com>
(cherry picked from commit 5cdadf17d634e1cbd8d2b0be8c9439bc20bdbd13)

Conflicts:
src/pybind/mgr/mgr_module.py
- state "laggy" and "wait" are not relevant for nautilus

4 years agoMerge pull request #36354 from BenoitKnecht/nautilus-doc-osd-op-queue
Neha Ojha [Fri, 28 Aug 2020 01:15:46 +0000 (18:15 -0700)]
Merge pull request #36354 from BenoitKnecht/nautilus-doc-osd-op-queue

nautilus: doc/rados: Fix osd_op_queue default value

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge PR #36833 into nautilus
Patrick Donnelly [Thu, 27 Aug 2020 20:43:01 +0000 (13:43 -0700)]
Merge PR #36833 into nautilus

* refs/pull/36833/head:
nautilus: mgr/volumes: convert uid and gid to integer type
mgr/volumes: Address python breakage in python 2
mgr/volumes: Update doc/cephfs/fs-volumes.rst for nautilus
mgr/volumes: Prevent subvolume recreate if trash is not-empty
mgr/volumes: Disallow subvolume group level snapshots
mgr/volumes: Add test case to ensure subvolume is marked
mgr/volumes: handle idempotent subvolume marks
mgr/volumes: Tests amended and added to ensure subvolume trash functionality
mgr/volumes: Mark subvolume root with the vxattr ceph.dir.subvolume
mgr/volumes: Move incarnations for v2 subvolumes, to subvolume trash
mgr/volumes: maintain per subvolume trash directory
mgr/volumes: make subvolume_v2::_is_retained() object property
mgr/volumes: Use snapshot root directory attrs when creating clone root

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agonautilus: mgr/volumes: convert uid and gid to integer type 36833/head
Ramana Raja [Thu, 27 Aug 2020 11:19:50 +0000 (16:49 +0530)]
nautilus: mgr/volumes: convert uid and gid to integer type

... before chown in py2 environments.

Introduced-by: 0eaf9b0bd2786762160b83edc52d979f5aad233c
Signed-off-by: Ramana Raja <rraja@redhat.com>
4 years agomgr/volumes: Address python breakage in python 2
Shyamsundar Ranganathan [Wed, 26 Aug 2020 23:22:09 +0000 (19:22 -0400)]
mgr/volumes: Address python breakage in python 2

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit 284dd3c4829f95b9618d98da49e59ec1c56dde61)

4 years agomgr/volumes: Update doc/cephfs/fs-volumes.rst for nautilus
ShyamsundarR [Wed, 26 Aug 2020 20:30:23 +0000 (16:30 -0400)]
mgr/volumes: Update doc/cephfs/fs-volumes.rst for nautilus

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
4 years agomgr/volumes: Prevent subvolume recreate if trash is not-empty
Shyamsundar Ranganathan [Wed, 26 Aug 2020 12:41:11 +0000 (08:41 -0400)]
mgr/volumes: Prevent subvolume recreate if trash is not-empty

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit 00e4ab054faf7f33d117b5f6ce70c31e8d53ad1b)

4 years agomgr/volumes: Disallow subvolume group level snapshots
Shyamsundar Ranganathan [Tue, 25 Aug 2020 22:46:12 +0000 (18:46 -0400)]
mgr/volumes: Disallow subvolume group level snapshots

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit f97e57c28c7fa7685b853e9f7f7e23267739a6c0)

4 years agomgr/volumes: Add test case to ensure subvolume is marked
Shyamsundar Ranganathan [Tue, 25 Aug 2020 15:44:50 +0000 (11:44 -0400)]
mgr/volumes: Add test case to ensure subvolume is marked

with the vxattr ceph.dir.subvolume set to true.

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit 3527711a4a2600acb85f3cb2b599b531a8c1a104)

4 years agomgr/volumes: handle idempotent subvolume marks
Venky Shankar [Tue, 25 Aug 2020 06:57:50 +0000 (02:57 -0400)]
mgr/volumes: handle idempotent subvolume marks

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 2f5eed200a0710759001ae1a26c739584f32be88)

4 years agomgr/volumes: Tests amended and added to ensure subvolume trash functionality
Shyamsundar Ranganathan [Mon, 24 Aug 2020 19:10:44 +0000 (15:10 -0400)]
mgr/volumes: Tests amended and added to ensure subvolume trash functionality

Amended a few test cases to ensure created subvolumes and snaps
are removed, and trash stays empty at the end of the test.

Further added one test case for create errors in a retained
v2 subvolume, to ensure metadata is sane, and created incarnation
is not present.

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit 88cffe6ea97733f2f0169362ffbde3e3827dc861)

Conflicts:
qa/tasks/cephfs/test_volumes.py
- Remove pin related test cases

4 years agomgr/volumes: Mark subvolume root with the vxattr ceph.dir.subvolume
Shyamsundar Ranganathan [Mon, 24 Aug 2020 13:33:10 +0000 (09:33 -0400)]
mgr/volumes: Mark subvolume root with the vxattr ceph.dir.subvolume

This enables snapshot scaling of subvolumes, and hence prevents
renaming, hardlinking etc. outside the subvolume.

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit fe0c0bd5ea1e7ebd7f2777848b9cac3966342dda)

4 years agomgr/volumes: Move incarnations for v2 subvolumes, to subvolume trash
Shyamsundar Ranganathan [Sun, 23 Aug 2020 16:31:01 +0000 (12:31 -0400)]
mgr/volumes: Move incarnations for v2 subvolumes, to subvolume trash

For v2 subvolumes without any snapshots or pending purges
move the subvolume to trash, for the purge operation.

When removing only incarnations, leverage symlink based purge
job creation, to avoid renaming the incarnation out of the
subvolume.

For create errors, where the subvolume was retained, just remove
the created incarnation directory.

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit 20c8a62939a0f290234ffa048bcc4c36f033b440)

4 years agomgr/volumes: maintain per subvolume trash directory
Venky Shankar [Fri, 21 Aug 2020 14:07:37 +0000 (10:07 -0400)]
mgr/volumes: maintain per subvolume trash directory

PR https://github.com/ceph/ceph/pull/36472 introduces changes
that disallow nested nested snapshots in a subtree (subvolume)
and renames across subvolumes. This effect asynchronous purge
in mgr/volumes as subvolume are moved to a trash directory for
asynchronous deletion by purge threads.

To workaround this, start maintaining a subvolume specific
trash directory. Use the trash directory as an index to the
subvolume specific trash directory entry.

This changes subvolume deletion logic which currently relies
on `--retain-snapshots` flag to decide if the subvolume user
directory should get purged or the subvolume base directory
itself. Deleting a subvolume moves the user facing directory
to its specific trash directory. Purge threads take care of
deleting user facing directories (in trash) and the subvolume
base directory if required (when certain conditions are met).

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit aae7a70ed2cf9c32684cfdaf701778a05f229e09)

4 years agomgr/volumes: make subvolume_v2::_is_retained() object property
Venky Shankar [Fri, 21 Aug 2020 05:18:45 +0000 (01:18 -0400)]
mgr/volumes: make subvolume_v2::_is_retained() object property

... and drop the leading underscore.

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 9a76c01536377737a18ed7005fd10b1111e96d50)

4 years agomgr/volumes: Use snapshot root directory attrs when creating clone root
Shyamsundar Ranganathan [Tue, 23 Jun 2020 23:57:52 +0000 (19:57 -0400)]
mgr/volumes: Use snapshot root directory attrs when creating clone root

If a subvolumes mode or uid/gid values are changed post a snapshot,
and a clone of a snapshot prior to the change is initiated, the clone
inherits the current source subvolumes attributes, rather than the
snapshots attributes.

Fixing this by using the snapshots subvolume root attributes to create
the clone subvolumes root.

Following attributes are picked from the source subvolume snapshot:
- uid, gid, mode, data pool, pool namespace, quota

Fixes: https://tracker.ceph.com/issues/46163
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit 0eaf9b0bd2786762160b83edc52d979f5aad233c)

4 years agoMerge PR #36404 into nautilus
Patrick Donnelly [Thu, 27 Aug 2020 19:31:24 +0000 (12:31 -0700)]
Merge PR #36404 into nautilus

* refs/pull/36404/head:
client: expose ceph.quota.max_bytes xattr within snapshots

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #36613 from tspmelo/wip-46925-nautilus
Lenz Grimmer [Thu, 27 Aug 2020 15:21:44 +0000 (17:21 +0200)]
Merge pull request #36613 from tspmelo/wip-46925-nautilus

nautilus: mgr/dashboard: Unable to edit iSCSI logged-in client

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
4 years agoMerge pull request #36304 from dillaman/wip-46725-nautilus
Yuri Weinstein [Thu, 27 Aug 2020 14:51:30 +0000 (07:51 -0700)]
Merge pull request #36304 from dillaman/wip-46725-nautilus

nautilus: ceph-iscsi: selinux fixes

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
4 years agolibrados: add LIBRADOS_SUPPORTS_GETADDRS support 36853/head
Xiubo Li [Thu, 6 Aug 2020 03:56:26 +0000 (11:56 +0800)]
librados: add LIBRADOS_SUPPORTS_GETADDRS support

This will be very helpful when release ceph package(like RPM) with
backporting rados_getaddrs() api to previous version.

In tcmu-runner we need to check whether the rados_getaddrs() is
support or not.

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

4 years agolibrados: expose msgr client addresses via API
Jason Dillaman [Thu, 27 Aug 2020 13:24:49 +0000 (09:24 -0400)]
librados: expose msgr client addresses via API

This is a partial backport of the librados API changes from commit
df507cde8d71063d5873a42f668156e4c32e86f9.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agolibrbd: added missing <string> include to PoolMetadata header
kalebskeithley [Mon, 13 Jan 2020 12:51:59 +0000 (07:51 -0500)]
librbd: added missing <string> include to PoolMetadata header

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
(cherry picked from commit 84f629e1b1c8b336b9ce6bcc2466010045e68e7e)

4 years agocommon: add missing #include
Kefu Chai [Sun, 5 Jan 2020 14:25:40 +0000 (22:25 +0800)]
common: add missing #include

clang++-9.0.1 and libc++ require them to build

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

4 years agoMerge PR #36804 into nautilus
Patrick Donnelly [Wed, 26 Aug 2020 23:35:08 +0000 (16:35 -0700)]
Merge PR #36804 into nautilus

* refs/pull/36804/head:
qa/workunits/fs: add test for subvolume
mds: don't move inode with nlink > 1 to global snaprealm if it's in subvolume
mds: disallow hardlink across subvolume
mds: disallow across subvolume rename
mds: disallow creating snapshot on descendent directory of subvolume
mds: add vxattr that marks/clears subvolume flag

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #36756 from smithfarm/wip-47070-nautilus
Yuri Weinstein [Wed, 26 Aug 2020 16:28:05 +0000 (09:28 -0700)]
Merge pull request #36756 from smithfarm/wip-47070-nautilus

nautilus: os/bluestore: dump onode that has too many spanning blobs

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #36741 from yaarith/devicehealth-fix-daemon-filtering-when-scraping
Yuri Weinstein [Wed, 26 Aug 2020 16:26:28 +0000 (09:26 -0700)]
Merge pull request #36741 from yaarith/devicehealth-fix-daemon-filtering-when-scraping

nautilus: mgr/devicehealth: fix daemon filtering before scraping device

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #36670 from smithfarm/wip-46981-nautilus
Yuri Weinstein [Wed, 26 Aug 2020 16:25:01 +0000 (09:25 -0700)]
Merge pull request #36670 from smithfarm/wip-46981-nautilus

nautilus: pybind/mgr/restful: use dict.items() for py3 compatible

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #36634 from smithfarm/wip-46952-nautilus
Yuri Weinstein [Wed, 26 Aug 2020 16:15:44 +0000 (09:15 -0700)]
Merge pull request #36634 from smithfarm/wip-46952-nautilus

nautilus: monclient: schedule first tick using mon_client_hunt_interval

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
4 years agoMerge pull request #36790 from rhcs-dashboard/wip-47122-nautilus
Lenz Grimmer [Wed, 26 Aug 2020 08:21:10 +0000 (10:21 +0200)]
Merge pull request #36790 from rhcs-dashboard/wip-47122-nautilus

nautilus: mgr/dashboard: remove "This week/month/year" and "Today" time stamps

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
4 years agoqa/workunits/fs: add test for subvolume 36804/head
Yan, Zheng [Wed, 5 Aug 2020 15:31:03 +0000 (23:31 +0800)]
qa/workunits/fs: add test for subvolume

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit df7e9aa42b97f3203e92387d2ceea5636f5230ad)

4 years agomds: don't move inode with nlink > 1 to global snaprealm if it's in subvolume
Yan, Zheng [Wed, 5 Aug 2020 09:31:57 +0000 (17:31 +0800)]
mds: don't move inode with nlink > 1 to global snaprealm if it's in subvolume

Fixes: https://tracker.ceph.com/issues/46074
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 63da28d6a8be20183a294744892a41f47e8ba24b)

 Conflicts:
src/mds/Server.cc

4 years agomds: disallow hardlink across subvolume
Yan, Zheng [Wed, 5 Aug 2020 08:04:30 +0000 (16:04 +0800)]
mds: disallow hardlink across subvolume

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 55cc3f7d7d27837bfe64ee46444358c0e45d16f6)

4 years agomds: disallow across subvolume rename
Yan, Zheng [Wed, 5 Aug 2020 07:37:20 +0000 (15:37 +0800)]
mds: disallow across subvolume rename

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 53348ab67f0f3e691cfeb6b02d80b868fdb98d89)

4 years agomds: disallow creating snapshot on descendent directory of subvolume
Yan, Zheng [Wed, 5 Aug 2020 07:33:10 +0000 (15:33 +0800)]
mds: disallow creating snapshot on descendent directory of subvolume

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 34c6b4437a2e8a49bb76e86d07cd86b740e3f581)

4 years agomds: add vxattr that marks/clears subvolume flag
Yan, Zheng [Tue, 4 Aug 2020 13:26:26 +0000 (21:26 +0800)]
mds: add vxattr that marks/clears subvolume flag

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 8d531680cdf48ba43d93becd5a19072844e92c19)

 Conflicts:
src/mds/Server.cc
src/mds/SnapRealm.h
src/mds/snap.h

4 years agoMerge pull request #36725 from dillaman/wip-46946-nautilus
Yuri Weinstein [Wed, 26 Aug 2020 00:11:08 +0000 (17:11 -0700)]
Merge pull request #36725 from dillaman/wip-46946-nautilus

nautilus: rbd: librbd: global and pool-level config overrides require image refresh to apply

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #36712 from smithfarm/wip-47023-nautilus
Yuri Weinstein [Wed, 26 Aug 2020 00:10:30 +0000 (17:10 -0700)]
Merge pull request #36712 from smithfarm/wip-47023-nautilus

nautilus: librbd: Align rbd_write_zeroes declarations

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #36413 from shyukri/wip-46321-nautilus
Yuri Weinstein [Wed, 26 Aug 2020 00:07:08 +0000 (17:07 -0700)]
Merge pull request #36413 from shyukri/wip-46321-nautilus

nautilus: osd/OSDCap: rbd profile permits use of "rbd_info"

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
4 years agoMerge pull request #36770 from smithfarm/wip-47115-nautilus
Yuri Weinstein [Tue, 25 Aug 2020 22:14:48 +0000 (15:14 -0700)]
Merge pull request #36770 from smithfarm/wip-47115-nautilus

nautilus: rgw: hold reloader using unique_ptr

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
4 years agoMerge pull request #36727 from smithfarm/wip-47042-nautilus
Yuri Weinstein [Tue, 25 Aug 2020 22:13:38 +0000 (15:13 -0700)]
Merge pull request #36727 from smithfarm/wip-47042-nautilus

nautilus: rgw: add access log to the beast frontend

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #36682 from BryceCao/wip-backport-nautilus
Yuri Weinstein [Tue, 25 Aug 2020 22:13:07 +0000 (15:13 -0700)]
Merge pull request #36682 from BryceCao/wip-backport-nautilus

nautilus: rgw: fix double slash (//) killing the gateway

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
4 years agoMerge pull request #36637 from smithfarm/wip-46954-nautilus
Yuri Weinstein [Tue, 25 Aug 2020 22:12:10 +0000 (15:12 -0700)]
Merge pull request #36637 from smithfarm/wip-46954-nautilus

nautilus: rgw: policy: reuse eval_principal to evaluate the policy principal

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agomgr/dashboard: remove "This week/month/year" and "Today" time stamps of Grafana in... 36790/head
Avan Thakkar [Thu, 20 Aug 2020 09:32:33 +0000 (15:02 +0530)]
mgr/dashboard: remove "This week/month/year" and "Today" time stamps of Grafana in dashboard

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

4 years agomgr/dashboard: wait longer for health status to be cleared 36784/head
Tatjana Dehler [Tue, 28 Jul 2020 11:18:56 +0000 (13:18 +0200)]
mgr/dashboard: wait longer for health status to be cleared

Because of reasons the cluster needs more time to recover from
HEALTH_WARN while changes are made by `test_pool_update_metadata`.
Lets wait several times for the cluster status to be HEALTH_OK
again.

Fixes: https://tracker.ceph.com/issues/46573
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
(cherry picked from commit 739b365a3f6be9557ccb784819d4ad9ad524880f)

4 years agomgr/dashboard: Hide table action input field if limit=0 36783/head
Volker Theile [Tue, 11 Aug 2020 13:26:24 +0000 (15:26 +0200)]
mgr/dashboard: Hide table action input field if limit=0

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

4 years agorgw: hold reloader using unique_ptr 36770/head
Kefu Chai [Fri, 7 Aug 2020 16:26:21 +0000 (00:26 +0800)]
rgw: hold reloader using unique_ptr

instead of using optional<> for holding reloader, use unique_ptr<>.
as `RGWRealmReloader` is neither
trivially_copy_{assignable,constructible} nor
is_trivially_move_{assignable, constructible}, because of the `Cond`
member variable. but Clang++ and libc++ still tries to rely on a
delgating copy constructor for constructing the
optional<RGWRealmReloader> instance even the optional object is
created `in_place`.

in this change, to workaround this issue, reloader is instead
constructed using make_unique<>

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

4 years agoos/bluestore: make alerting onode dump less frequent. 36756/head
Igor Fedotov [Wed, 1 May 2019 17:12:27 +0000 (20:12 +0300)]
os/bluestore: make alerting onode dump less frequent.

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

4 years agoos/bluestore: dump onode if too many spanning blobs detected.
Igor Fedotov [Wed, 1 May 2019 13:49:37 +0000 (16:49 +0300)]
os/bluestore: dump onode if too many spanning blobs detected.

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

4 years agoMerge pull request #36289 from dillaman/wip-config-noise-nautilus
Yuri Weinstein [Thu, 20 Aug 2020 20:21:35 +0000 (13:21 -0700)]
Merge pull request #36289 from dillaman/wip-config-noise-nautilus

nautilus: common/config: less noise about configs from mon we can't apply

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agomgr/devicehealth: fix daemon filtering before scraping device 36741/head
Yaarit Hatuka [Thu, 20 Aug 2020 18:21:11 +0000 (18:21 +0000)]
mgr/devicehealth: fix daemon filtering before scraping device

Scraping health metrics of mon devices was introduced in Nautilus, then
disabled (only in Nautilus) since the 'tell' mechanism of mons was not
reliable.
This commit fixes a bug when filtering the daemons on the device to be
scrapped (and allows scraping osd devices solely).

When:
$ ceph device scrape-health-metrics seagate_123
Error EAGAIN: device seagate_123 not claimed by any active OSD daemons

But:
$ ceph device ls
DEVICE         HOST:DEV      DAEMONS   LIFE EXPECTANCY
seagate_123 hostname:sdc osd.1

See:
Introducing the feature in Nautilus:
PR: https://github.com/ceph/ceph/pull/24151
commit: 8d786003a44313c85c038cbdc9bd9875da197ab1

Disabling the feature in Nautilus:
PR: https://github.com/ceph/ceph/pull/31446
commit: d592e56e74d94c6a05b9240fcb0031868acefbab

This issue exists only in Nautilus and does not require fixes in any other branch.

Fixes: https://tracker.ceph.com/issues/46871
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
4 years agorgw: add access log to the beast frontend 36727/head
Mark Kogan [Tue, 18 Feb 2020 10:59:35 +0000 (12:59 +0200)]
rgw: add access log to the beast frontend

Add to the Beast frontend an access log line similar to CivetWeb.
attempting to adhere as much as possible to the Apache Combined Log
Format.

Fixes: https://tracker.ceph.com/issues/45920
rgw: use beast message for access log
(cherry picked from commit 44ec38933cbe6cc864c56332cc99502d86568fdc)

Co-authored-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Mark Kogan <mkogan@redhat.com>
(cherry picked from commit 5ea7bb8449a75f96ed6e4d4d1c1f3d31e27040f8)

4 years agoMerge PR #36448 into nautilus
Patrick Donnelly [Wed, 19 Aug 2020 20:49:00 +0000 (13:49 -0700)]
Merge PR #36448 into nautilus

* refs/pull/36448/head:
mgr: Add python-enum34 dependency to package for older distributions
mgr/volumes: Add documentation regarding --retain-snapshots option
mgr/volumes: Avoid trashing retained subvolume on create errors
mgr/volumes: Add subvolume v2 test cases
mgr/volumes: Derive v2 from v1 to leverage common methods
mgr/volumes: Introduce v2 subvolumes
mgr/volumes: Use operation type during subvolume open

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agolibrbd: update hidden global config when setting pool config override 36725/head
Jason Dillaman [Tue, 28 Jul 2020 01:14:18 +0000 (21:14 -0400)]
librbd: update hidden global config when setting pool config override

The new "dev"-level global config setting will be updated when any
pool-level config override is updated. librbd clients will detect
the new global-level config update and trigger a refresh. This avoids
the need for potentially tens of thousands of librbd clients
registering a watch on the pool metadata object or periodically polling
the pool metadata object for updates.

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

Conflicts:
src/common/options.cc
- "rbd_quiesce_notification_attempts", "rbd_default_snapshot_quiesce_mode", and
  "rbd_plugins" options have not been backported to Octopus, yet

(cherry picked from commit ea2dec49276c5ea79980d184d97b6a410ee1dec5)

Conflicts:
src/common/options.cc: trivial resolution

4 years agolibrbd: initialize/shut down config watcher during image open/close
Jason Dillaman [Mon, 27 Jul 2020 20:29:05 +0000 (16:29 -0400)]
librbd: initialize/shut down config watcher during image open/close

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

Conflicts:
src/librbd/ImageCtx.h
- AsioEngine has not been backported yet

(cherry picked from commit ada201d460d37d68275ed4b35f6e3ec293f247fc)

4 years agolibrbd: initial config watcher implementation
Jason Dillaman [Mon, 27 Jul 2020 19:31:09 +0000 (15:31 -0400)]
librbd: initial config watcher implementation

The config watcher will initially observe all "rbd_" configuration
updates received from the MON that have not been locally overridden
at the pool and/or image level.

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

Conflicts:
src/test/librbd/mock/MockImageState.h
- once again, I don't see why git flagged this as a conflict

(cherry picked from commit c830365a8a243bd4976a682af1bf8d768924eaff)

Conflicts:
src/librbd/ConfigWatcher.cc: image_lock -> md_lock
src/test/librbd/mock/MockImageState.h: trivial resolution

4 years agolibrbd: hold ImageCtx::md_lock while computing config overrides
Jason Dillaman [Mon, 27 Jul 2020 18:36:49 +0000 (14:36 -0400)]
librbd: hold ImageCtx::md_lock while computing config overrides

The 'ImageCtx::apply_metadata' is guaranteed to be thread-safe but
a future commit will attempt to utilize the cached config override
set.

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

Conflicts:
src/librbd/ImageCtx.cc: image_lock -> md_lock

4 years agolibrbd: Align rbd_write_zeroes declarations 36712/head
Corey Bryant [Mon, 17 Aug 2020 12:19:25 +0000 (08:19 -0400)]
librbd: Align rbd_write_zeroes declarations

Fixes: https://tracker.ceph.com/issues/46928
Signed-off-by: Corey Bryant <corey.bryant@canonical.com>
(cherry picked from commit 32fcd679132fab93ea50ec791f559ad2b09d8a2b)

4 years agomgr/dashboard/api: reduce amount of daemon logs 36692/head
Ernesto Puerta [Thu, 13 Aug 2020 11:45:17 +0000 (13:45 +0200)]
mgr/dashboard/api: reduce amount of daemon logs

Fixes: https://tracker.ceph.com/issues/46920
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit 88865cbfb101fcbb290fcb8151187e98a70fa3dd)

Conflicts:
qa/tasks/vstart_runner.py
src/pybind/mgr/dashboard/run-backend-api-tests.sh
        - Bring opt_verbose option and only dump last 1000 lines of logs

4 years agorgw: fix double slash (//) killing the gateway 36682/head
root [Fri, 26 Jun 2020 10:44:45 +0000 (12:44 +0200)]
rgw: fix double slash (//) killing the gateway

When a bucket is inialized as a static website, a curl request on the bucket with double slash kills the gateway.
The problem is on the URL handling of the subdirectory, which tries to remove the last slash of any URL, so when only / is given as a sub-directory, this results to an empty string.

Fixes: https://tracker.ceph.com/issues/41225
Signed-off-by: Theofilos Mouratidis <t.mour@cern.ch>
(cherry picked from commit 626330c504b1af8393986bd0553786c3031422cd)

4 years agopybind/mgr/restful: use dict.items() for py3 compatibility 36670/head
Kefu Chai [Fri, 26 Jul 2019 14:43:00 +0000 (22:43 +0800)]
pybind/mgr/restful: use dict.items() for py3 compatibility

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

4 years agoMerge pull request #36415 from shyukri/wip-46638-nautilus
Nathan Cutler [Sat, 15 Aug 2020 13:40:20 +0000 (15:40 +0200)]
Merge pull request #36415 from shyukri/wip-46638-nautilus

nautilus: doc/rbd: add rbd-target-gw enable and start

Reviewed-by: Nathan Cutler <ncutler@suse.com>
4 years agorgw: policy: reuse eval_principal to evaluate the policy principal 36637/head
Abhishek Lekshmanan [Mon, 27 Jul 2020 14:58:30 +0000 (16:58 +0200)]
rgw: policy: reuse eval_principal to evaluate the policy principal

Since the other edge case when no Principal or a NotPrincipal is supplied also
must be accounted for, which is already done in eval_principal function. Also
reraising the error as Effect::Pass in line with the previous output, though an
Effect::Deny would also work here.

Fixes: https://tracker.ceph.com/issues/46078
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 1843f2dca853f97c6c9b4196eaf27581705be0e2)

4 years agomonclient: use "is_connected" check when scheduling tick 36634/head
Mykola Golub [Thu, 30 Jul 2020 05:59:57 +0000 (06:59 +0100)]
monclient: use "is_connected" check when scheduling tick

When schedule_tick is called for the first time (in init) we are
still not in hunting mode so mon_client_ping_interval and
mon_client_log_interval were used to schedule the tick.

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

Conflicts:
src/mon/MonClient.cc

4 years agoMerge pull request #36390 from smithfarm/wip-46799-nautilus
Yuri Weinstein [Thu, 13 Aug 2020 17:44:18 +0000 (10:44 -0700)]
Merge pull request #36390 from smithfarm/wip-46799-nautilus

nautilus: rgw: append obj: prevent tail from being GC'ed

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoceph-volume: add tests for new functions that run LVM commands 36615/head
Rishabh Dave [Sat, 1 Aug 2020 18:36:25 +0000 (00:06 +0530)]
ceph-volume: add tests for new functions that run LVM commands

... and for supporting functions. Specifically, these functions are
get_pvs(), get_vgs(), get_lvs(), get_first_pv(), get_first_vg(),
get_first_lv() and make_filters_lvmcmd_ready().

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 97c3a0c80a2c03478d948fed7e0ffa8913d394a2)

4 years agomgr/dashboard: Unable to edit iSCSI logged-in client 36613/head
Ricardo Marques [Mon, 3 Aug 2020 15:38:10 +0000 (16:38 +0100)]
mgr/dashboard: Unable to edit iSCSI logged-in client

Fixes: https://tracker.ceph.com/issues/46818
Signed-off-by: Ricardo Marques <rimarques@suse.com>
(cherry picked from commit 7ee7fb98d343f6c6c44cac60ce6ca5ab8aeb9021)

4 years agoceph-volume: relocate the new LVM methods 36610/head
Rishabh Dave [Mon, 3 Aug 2020 14:10:08 +0000 (19:40 +0530)]
ceph-volume: relocate the new LVM methods

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit e6d2dd0c893c30dda1c51d02f51df7ae7093d008)

4 years agoceph-volume: remove api.lvm.get_api_lvs() and related tests
Rishabh Dave [Mon, 3 Aug 2020 14:15:47 +0000 (19:45 +0530)]
ceph-volume: remove api.lvm.get_api_lvs() and related tests

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit b7ca04dc647b2e7b3b2388c48884af9bd69db2c4)

4 years agoceph-volume: remove api.lvm.get_api_vgs() and related tests
Rishabh Dave [Mon, 3 Aug 2020 14:14:48 +0000 (19:44 +0530)]
ceph-volume: remove api.lvm.get_api_vgs() and related tests

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit ab7a2c3df8a9997c693fdd6ace38b89c67650197)

4 years agoceph-volume: remove api.lvm.get_api_pvs()
Rishabh Dave [Mon, 3 Aug 2020 14:13:24 +0000 (19:43 +0530)]
ceph-volume: remove api.lvm.get_api_pvs()

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 93bae7afdd881fe345e0001a6c02975979ab188c)

4 years agoceph-volume: remove class Volumes from api/lvm.py
Rishabh Dave [Fri, 3 Jul 2020 06:17:50 +0000 (11:47 +0530)]
ceph-volume: remove class Volumes from api/lvm.py

And remove methods is_lv(), get_lv() and get_lv_from_argument() since
these methods uses class Volumes and get_first_lv() or get_lv() can be
easily used instead when needed in future.

Also, update tests and comments accordingly.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit e09d3cd1a5bcfb42972b6958fb7e6c42a645549d)

 Conflicts:
src/ceph-volume/ceph_volume/tests/util/test_device.py
Test "test_is_member_lsblk" has a slightly different signature
than master.

4 years agoceph-volume: remove class VolumeGroups from api/lvm.py
Rishabh Dave [Fri, 3 Jul 2020 05:28:02 +0000 (10:58 +0530)]
ceph-volume: remove class VolumeGroups from api/lvm.py

And remove get_vg() since its based on VolumesGroups and get_first_vg()
or get_vg() can be easily used instead in future when needed. Also,
update tests accordingly.

iSigned-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 72068493ac9b3d281aeda3f0481ad63c24d796e3)

4 years agoceph-volume: remove PVolumes from api/lvm.py
Rishabh Dave [Fri, 3 Jul 2020 05:15:23 +0000 (10:45 +0530)]
ceph-volume: remove PVolumes from api/lvm.py

And method get_pv() since it's based on PVolumes and get_first_pv() and
get_pvs() can be easily used instead in future. Also, update tests
accordingly.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 009e9dcebf6e13b6fb66bc0368c907d0b988d127)

 Conflicts:
src/ceph-volume/ceph_volume/tests/util/test_device.py
The dummy device path in tests "test_is_lvm_memeber",
"test_is_not_lvm_memeber" and "test_is_partition" are slightly
different from master.

4 years agomgr/dashboard/api: increase API health timeout 36607/head
Ernesto Puerta [Fri, 17 Jul 2020 13:21:55 +0000 (15:21 +0200)]
mgr/dashboard/api: increase API health timeout

Fixes: https://tracker.ceph.com/issues/46601
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit cd9f680b1121d0a8cb14f260a21b0cab4dbeee0a)

Conflicts:
qa/tasks/mgr/dashboard/helper.py
A variable 'maxDiff' has been introduced in master and not been
        backported: https://github.com/ceph/ceph/pull/35768

4 years agoMerge pull request #36494 from rhcs-dashboard/wip-make_check-nautilus
Yuri Weinstein [Wed, 12 Aug 2020 16:06:00 +0000 (09:06 -0700)]
Merge pull request #36494 from rhcs-dashboard/wip-make_check-nautilus

nautilus: run-make-check.sh: extract run-make.sh + run sudo with absolute path

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
4 years agoselinux: Fix ceph-iscsi etc access 36304/head
Mike Christie [Thu, 9 Jan 2020 00:37:15 +0000 (18:37 -0600)]
selinux: Fix ceph-iscsi etc access

This fixes the selinux errors like this for /etc/target

-----------------------------------
Additional Information:
Source Context                system_u:system_r:ceph_t:s0
Target Context                system_u:object_r:targetd_etc_rw_t:s0
Target Objects                target [ dir ]
Source                        rbd-target-api
Source Path                   rbd-target-api
Port                          <Unknown>
Host                          ans8
Source RPM Packages
Target RPM Packages
Policy RPM                    selinux-policy-3.14.3-20.el8.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     ans8
Platform                      Linux ans8 4.18.0-147.el8.x86_64 #1 SMP
Thu Sep 26
                              15:52:44 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2020-01-08 18:39:48 EST
Last Seen                     2020-01-08 18:39:48 EST
Local ID                      9a13ee18-eaf2-4f2a-872f-2809ee4928f6

Raw Audit Messages
type=AVC msg=audit(1578526788.148:69): avc:  denied  { search } for
pid=995 comm="rbd-target-api" name="target" dev="sda1" ino=52198
scontext=system_u:system_r:ceph_t:s0
tcontext=system_u:object_r:targetd_etc_rw_t:s0 tclass=dir permissive=1

Hash: rbd-target-api,ceph_t,targetd_etc_rw_t,dir,search

which are a result of the rtslib library the ceph-iscsi daemons use
accessing /etc/target to read/write a file which stores meta data the
target uses.

Signed-off-by: Mike Christie <mchristi@redhat.com>
(cherry picked from commit 53be18165323a80895a34185df4ad9e8d37db618)

Conflicts:
selinux/ceph.te: trivial resolution

4 years agoselinux: Fix ceph-iscsi configfs access
Mike Christie [Thu, 9 Jan 2020 00:03:40 +0000 (18:03 -0600)]
selinux: Fix ceph-iscsi configfs access

This fixes the the following selinux error when using ceph-iscsi's
rbd-target-api daemon (rbd-target-gw has the same issue). They are
a result of the a python library, rtslib, which the daemons use.

Additional Information:
Source Context                system_u:system_r:ceph_t:s0
Target Context                system_u:object_r:configfs_t:s0
Target Objects
/sys/kernel/config/target/iscsi/iqn.2003-01.com.re
                              dhat:ceph-iscsi/tpgt_1/attrib/authentication
[
                              file ]
Source                        rbd-target-api
Source Path                   /usr/libexec/platform-python3.6
Port                          <Unknown>
Host                          ans8
Source RPM Packages           platform-python-3.6.8-15.1.el8.x86_64
Target RPM Packages
Policy RPM                    selinux-policy-3.14.3-20.el8.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     ans8
Platform                      Linux ans8 4.18.0-147.el8.x86_64 #1 SMP
Thu Sep 26
                              15:52:44 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2020-01-08 18:39:47 EST
Last Seen                     2020-01-08 18:39:47 EST
Local ID                      6f8c3415-7a50-4dc8-b3d2-2621e1d00ca3

Raw Audit Messages
type=AVC msg=audit(1578526787.577:68): avc:  denied  { ioctl } for
pid=995 comm="rbd-target-api"
path="/sys/kernel/config/target/iscsi/iqn.2003-01.com.redhat:ceph-iscsi/tpgt_1/attrib/authentication"
dev="configfs" ino=25703 ioctlcmd=0x5401
scontext=system_u:system_r:ceph_t:s0
tcontext=system_u:object_r:configfs_t:s0 tclass=file permissive=1

type=SYSCALL msg=audit(1578526787.577:68): arch=x86_64 syscall=ioctl
success=no exit=ENOTTY a0=34 a1=5401 a2=7ffd4f8f1f60 a3=3052cd2d95839b96
items=0 ppid=1 pid=995 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0
egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=rbd-target-api
exe=/usr/libexec/platform-python3.6 subj=system_u:system_r:ceph_t:s0
key=(null)

Hash: rbd-target-api,ceph_t,configfs_t,file,ioctl

Signed-off-by: Mike Christie <mchristi@redhat.com>
(cherry picked from commit 8187235c91e897cb8c167ee4cbb90d910103709b)

4 years agoMerge pull request #36379 from dzafman/wip-46096-nautilus-smithfarm
Yuri Weinstein [Wed, 12 Aug 2020 14:23:28 +0000 (07:23 -0700)]
Merge pull request #36379 from dzafman/wip-46096-nautilus-smithfarm

nautilus: mon: Warn when too many reads are repaired on an OSD

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #36493 from rishabh-d-dave/cv-naut-test-fix
Jan Fajerski [Wed, 12 Aug 2020 12:19:10 +0000 (14:19 +0200)]
Merge pull request #36493 from rishabh-d-dave/cv-naut-test-fix

nautilus: ceph-volume: fix test_lvm.TestVolume.test_is_not_ceph_device

4 years agoMerge pull request #35878 from ceph/wip-nautilus-32493
Jan Fajerski [Wed, 12 Aug 2020 12:18:29 +0000 (14:18 +0200)]
Merge pull request #35878 from ceph/wip-nautilus-32493

nautilus: ceph-volume: don't use container classes in api/lvm.py

4 years agoMerge pull request #35881 from ceph/wip-nautilus-34744
Jan Fajerski [Wed, 12 Aug 2020 12:16:45 +0000 (14:16 +0200)]
Merge pull request #35881 from ceph/wip-nautilus-34744

nautilus: ceph-volume: handle idempotency with batch and explicit scenarios

4 years agomgr/diskprediction_local: Fix array size error 36578/head
Benoît Knecht [Wed, 15 Jul 2020 13:14:51 +0000 (15:14 +0200)]
mgr/diskprediction_local: Fix array size error

The disk predictor assumes that it has at least 6 days worth of data to work
with, and the code ensures that `health_data` contains at least 6 elements.

However, it then gets fitlered down into a `predict_datas` array that can
contain less than 6 elements in some cases.

This commit ensures that `predict_datas` contains 6 elements or more before
passing it on to the disk predictor.

Fixes: https://tracker.ceph.com/issues/46549
Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit ab0e5ae928d4fc15cf812957541c02770d13ab26)

4 years agoMerge pull request #36435 from yuriw/wip-yuriw-cleanup-nautilus
Yuri Weinstein [Tue, 11 Aug 2020 17:41:23 +0000 (10:41 -0700)]
Merge pull request #36435 from yuriw/wip-yuriw-cleanup-nautilus

qa/tests: moved client-upgrade* under new dir

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years ago14.2.11 14.2.10 v14.2.11
Jenkins Build Slave User [Mon, 10 Aug 2020 20:15:22 +0000 (20:15 +0000)]
14.2.11