]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agodoc/cephfs/fs-nfs-export: add note about export update behavior
Sage Weil [Wed, 23 Jun 2021 16:46:07 +0000 (12:46 -0400)]
doc/cephfs/fs-nfs-export: add note about export update behavior

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: move user create/delete into helper
Sage Weil [Tue, 22 Jun 2021 16:25:44 +0000 (12:25 -0400)]
mgr/nfs: move user create/delete into helper

- Do user create or delete via a helper
- Defer until after we have validated the Export (on create or update)
- Support updates to user_id, which is needed to keep the naming consistent
and to also support changing the bucket, since the user_id is derived
from that.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: refactor _delete_user helper
Sage Weil [Mon, 21 Jun 2021 16:26:47 +0000 (12:26 -0400)]
mgr/nfs: refactor _delete_user helper

Single caller, trivial functions, and caller is also short.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: refactor create_export_from_dict() helper
Sage Weil [Tue, 22 Jun 2021 16:26:48 +0000 (12:26 -0400)]
mgr/nfs: refactor create_export_from_dict() helper

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: keep 'nfs export get' around for backward-compat
Sage Weil [Mon, 21 Jun 2021 16:35:36 +0000 (12:35 -0400)]
mgr/nfs: keep 'nfs export get' around for backward-compat

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: rename method
Sage Weil [Mon, 21 Jun 2021 16:23:58 +0000 (12:23 -0400)]
mgr/nfs: rename method

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoqa/tasks/cephfs/test_nfs: test new export via apply
Sage Weil [Mon, 21 Jun 2021 16:17:48 +0000 (12:17 -0400)]
qa/tasks/cephfs/test_nfs: test new export via apply

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/cephfs/fs-nfs-export: be consistent with cluster_id and _ vs -
Sage Weil [Mon, 21 Jun 2021 16:13:40 +0000 (12:13 -0400)]
doc/cephfs/fs-nfs-export: be consistent with cluster_id and _ vs -

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: addr -> client_addr for 'nfs export create ...'
Sage Weil [Sun, 20 Jun 2021 14:10:15 +0000 (10:10 -0400)]
mgr/nfs: addr -> client_addr for 'nfs export create ...'

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: fix tests
Sage Weil [Fri, 18 Jun 2021 01:30:48 +0000 (21:30 -0400)]
mgr/nfs: fix tests

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: 'nfs export get' -> 'nfs export info'
Sage Weil [Fri, 18 Jun 2021 15:01:32 +0000 (11:01 -0400)]
mgr/nfs: 'nfs export get' -> 'nfs export info'

This is a breaking change, but aligns the CLI verbs with the rest of ceph.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: binding -> pseudo_path
Sage Weil [Thu, 17 Jun 2021 21:12:15 +0000 (17:12 -0400)]
mgr/nfs: binding -> pseudo_path

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: more revisions based on review
Sage Weil [Thu, 17 Jun 2021 17:55:48 +0000 (12:55 -0500)]
mgr/nfs: more revisions based on review

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: adjust NFSExceptoin errno arg
Sage Weil [Thu, 17 Jun 2021 20:17:24 +0000 (16:17 -0400)]
mgr/nfs: adjust NFSExceptoin errno arg

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/cephfs: update 'nfs export {get,apply}' docs
Sage Weil [Thu, 17 Jun 2021 20:15:03 +0000 (16:15 -0400)]
doc/cephfs: update 'nfs export {get,apply}' docs

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: merge FSExport back into ExportMgr
Sage Weil [Thu, 17 Jun 2021 20:01:50 +0000 (16:01 -0400)]
mgr/nfs: merge FSExport back into ExportMgr

This class captures no data, and the current methods cover both cephfs
and rgw exports.  There is little value to making the class separate from
ExportMgr.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/radosgw/nfs: document mgr/nfs way to add/remove rgw exports
Sage Weil [Thu, 17 Jun 2021 19:45:17 +0000 (15:45 -0400)]
doc/radosgw/nfs: document mgr/nfs way to add/remove rgw exports

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: merge 'nfs export {update,import}' -> 'nfs export apply'
Sage Weil [Tue, 15 Jun 2021 17:34:47 +0000 (12:34 -0500)]
mgr/nfs: merge 'nfs export {update,import}' -> 'nfs export apply'

The only thing we lose is a strict 'update' that errors out if the
export didn't already exist, and we don't have any known need for that.

Fixes: https://tracker.ceph.com/issues/51265
Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: test export creation and list
Sage Weil [Fri, 11 Jun 2021 23:22:03 +0000 (19:22 -0400)]
mgr/nfs: test export creation and list

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: test export_update (+ fixes)
Sage Weil [Fri, 11 Jun 2021 20:55:25 +0000 (16:55 -0400)]
mgr/nfs: test export_update (+ fixes)

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: test Export.validate(); several fixes
Sage Weil [Fri, 11 Jun 2021 19:55:27 +0000 (15:55 -0400)]
mgr/nfs: test Export.validate(); several fixes

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: test that export <-> block+dict conversions go both ways
Sage Weil [Fri, 11 Jun 2021 19:34:27 +0000 (15:34 -0400)]
mgr/nfs: test that export <-> block+dict conversions go both ways

Fixes: https://tracker.ceph.com/issues/50449
Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: clean up test a bit
Sage Weil [Fri, 11 Jun 2021 19:34:14 +0000 (15:34 -0400)]
mgr/nfs: clean up test a bit

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs/export: fix export validation
Sage Weil [Wed, 9 Jun 2021 13:40:23 +0000 (09:40 -0400)]
mgr/nfs/export: fix export validation

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs/export: fix tests
Sage Weil [Tue, 8 Jun 2021 17:38:37 +0000 (13:38 -0400)]
mgr/nfs/export: fix tests

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: handle option addr/client block in create_export()
Sage Weil [Mon, 7 Jun 2021 20:52:30 +0000 (16:52 -0400)]
mgr/nfs: handle option addr/client block in create_export()

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: allow multiple addrs for new exports
Sage Weil [Mon, 7 Jun 2021 20:45:29 +0000 (16:45 -0400)]
mgr/nfs: allow multiple addrs for new exports

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: fix/finish rgw export
Sage Weil [Mon, 7 Jun 2021 20:38:23 +0000 (16:38 -0400)]
mgr/nfs: fix/finish rgw export

- create the rgw keys for the export
- cleanup the rgw user on export deletion

Fixes: https://tracker.ceph.com/issues/47172
Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs/module: clusterid -> cluster_id
Sage Weil [Mon, 7 Jun 2021 18:51:41 +0000 (14:51 -0400)]
mgr/nfs/module: clusterid -> cluster_id

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs/export: fix export_update_1 to type check
Sage Weil [Wed, 2 Jun 2021 20:16:26 +0000 (16:16 -0400)]
mgr/nfs/export: fix export_update_1 to type check

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs/cluster: fix type error
Sage Weil [Wed, 2 Jun 2021 18:43:52 +0000 (14:43 -0400)]
mgr/nfs/cluster: fix type error

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs/export: wrap long lines
Sage Weil [Wed, 2 Jun 2021 18:41:15 +0000 (14:41 -0400)]
mgr/nfs/export: wrap long lines

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: ExportMgr._delete_export only works for cephfs for now
Sebastian Wagner [Wed, 2 Jun 2021 15:54:23 +0000 (17:54 +0200)]
mgr/nfs: ExportMgr._delete_export only works for cephfs for now

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: Remove pool_ns from NFSCluster
Sebastian Wagner [Wed, 2 Jun 2021 15:46:52 +0000 (17:46 +0200)]
mgr/nfs: Remove pool_ns from NFSCluster

Cause this is a singleton instance. Better to explictly pass it along.

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: Remove ExportMgr.rados_namespace
Sebastian Wagner [Wed, 2 Jun 2021 14:20:54 +0000 (16:20 +0200)]
mgr/nfs: Remove ExportMgr.rados_namespace

Cause this is a singleton instance. Better to explictly pass it along.

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: flake8
Sebastian Wagner [Wed, 2 Jun 2021 14:04:21 +0000 (16:04 +0200)]
mgr/nfs: flake8

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: Add type checking
Sebastian Wagner [Wed, 2 Jun 2021 13:55:02 +0000 (15:55 +0200)]
mgr/nfs: Add type checking

Also introduce RawBlock class

Fixes: https://tracker.ceph.com/issues/50816
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: Add __eq__ method to Export
Sebastian Wagner [Wed, 2 Jun 2021 10:42:54 +0000 (12:42 +0200)]
mgr/nfs: Add __eq__ method to Export

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: Add some compatibility to mgr/dashboard
Sebastian Wagner [Wed, 2 Jun 2021 10:42:28 +0000 (12:42 +0200)]
mgr/nfs: Add some compatibility to mgr/dashboard

provide default values for `squash` and `security_label`

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: Fix whitespace handling
Sebastian Wagner [Wed, 2 Jun 2021 10:41:36 +0000 (12:41 +0200)]
mgr/nfs: Fix whitespace handling

keep whitespace in lines starting with %url

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: Copy unit tests from mgr/dashboard
Sebastian Wagner [Wed, 2 Jun 2021 10:40:24 +0000 (12:40 +0200)]
mgr/nfs: Copy unit tests from mgr/dashboard

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agomgr/nfs: partially implement rgw export support
Sage Weil [Tue, 1 Jun 2021 16:23:37 +0000 (12:23 -0400)]
mgr/nfs: partially implement rgw export support

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: abstract FSAL; add RGWFSAL
Sage Weil [Tue, 1 Jun 2021 16:23:24 +0000 (12:23 -0400)]
mgr/nfs: abstract FSAL; add RGWFSAL

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: refactor to merge 'update' and 'import' code
Sage Weil [Thu, 27 May 2021 23:43:22 +0000 (19:43 -0400)]
mgr/nfs: refactor to merge 'update' and 'import' code

- update must be an existing export
- import can be a new or existing export, and we will either update or
  create as appropriate.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: add 'nfs export import' command
Sage Weil [Thu, 27 May 2021 23:25:40 +0000 (19:25 -0400)]
mgr/nfs: add 'nfs export import' command

Allow import of JSON to create a new export.  Similar to 'update', which
allows an import of JSON to update an existing export.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: refactor 'nfs export update' and export validation
Sage Weil [Thu, 27 May 2021 23:25:06 +0000 (19:25 -0400)]
mgr/nfs: refactor 'nfs export update' and export validation

Move validation to the Export class, so it can check any object in
place.

Refactor update code to extract allowed changes checks from the old
validation class.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: fix _fetch_export to distinguish between clusters
Sage Weil [Wed, 26 May 2021 19:55:22 +0000 (15:55 -0400)]
mgr/nfs: fix _fetch_export to distinguish between clusters

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: move export ganesha conf translation into caller
Sage Weil [Wed, 26 May 2021 20:27:34 +0000 (16:27 -0400)]
mgr/nfs: move export ganesha conf translation into caller

This belongs in the (one) caller, not the helper.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: name nfs cephfs client key 'nfs.{cluster_id}.{export_id}'
Sage Weil [Wed, 26 May 2021 20:18:44 +0000 (16:18 -0400)]
mgr/nfs: name nfs cephfs client key 'nfs.{cluster_id}.{export_id}'

Better than '{cluster_id}{export_id}', which is confusing and ambiguous.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: add --addr to 'nfs export create'
Sage Weil [Wed, 26 May 2021 18:37:34 +0000 (14:37 -0400)]
mgr/nfs: add --addr to 'nfs export create'

Ganesha exports can have multiple client blocks with addresses and
access modes/squash behavior.  This cannot easily be exposed via a CLI.
However, providing no client address restriction is pretty useful to users
since it allows full access to the mount point with no restrictions.

Add an --addr argument that creates a single client block.  Set the top
export-level access_type to 'none' and squash to 'none' in this case.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs: add --squash to 'nfs export create'
Sage Weil [Wed, 26 May 2021 17:59:18 +0000 (13:59 -0400)]
mgr/nfs: add --squash to 'nfs export create'

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/nfs/export_utils: include false but non-None items in config
Sage Weil [Wed, 26 May 2021 17:45:53 +0000 (13:45 -0400)]
mgr/nfs/export_utils: include false but non-None items in config

For example, attr_expiration_time = 0 is the default. Include this since
it is not None.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agovstart.sh: enable nfs module
Sage Weil [Wed, 26 May 2021 17:44:04 +0000 (13:44 -0400)]
vstart.sh: enable nfs module

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm: nfs: drop attr_expiration_time from top-level config
Sage Weil [Wed, 26 May 2021 17:43:57 +0000 (13:43 -0400)]
mgr/cephadm: nfs: drop attr_expiration_time from top-level config

This is added on a per-export basis with the same default of 0.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm: remove Dir_Chunk = 0
Sage Weil [Wed, 26 May 2021 15:50:59 +0000 (11:50 -0400)]
mgr/cephadm: remove Dir_Chunk = 0

This breaks RGW exports, and is likely to be beneficial for libcephfs.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge pull request #41905 from ivancich/wip-improve-cls-rgw-tracing
J. Eric Ivancich [Thu, 17 Jun 2021 19:37:30 +0000 (15:37 -0400)]
Merge pull request #41905 from ivancich/wip-improve-cls-rgw-tracing

rgw: clean-up logging of function entering to make thorough and consistent

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Ali Maredia <amaredia@redhat.com>
4 years agorgw: clean-up logging of function entering to make thorough and consistent 41905/head
J. Eric Ivancich [Mon, 10 May 2021 21:36:49 +0000 (17:36 -0400)]
rgw: clean-up logging of function entering to make thorough and consistent

This provides more thorough and consistent function tracing in CLS/RGW
when logging is set to 10 or higher.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
4 years agoMerge pull request #41903 from liewegas/update-rook-client
Sebastian Wagner [Thu, 17 Jun 2021 14:53:56 +0000 (16:53 +0200)]
Merge pull request #41903 from liewegas/update-rook-client

rook-client-python: update to update-june-21

Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
4 years agoMerge pull request #41835 from TRYTOBE8TME/wip-rgw-keycloak-failure-fix
Ali Maredia [Thu, 17 Jun 2021 14:30:28 +0000 (10:30 -0400)]
Merge pull request #41835 from TRYTOBE8TME/wip-rgw-keycloak-failure-fix

qa/tasks: Keycloak failure fix

Reviewed-by: Ali Maredia <amaredia@redhat.com>
4 years agomgr/rook: comment out osd creation functions 41871/head 41903/head
Joseph Sawaya [Wed, 16 Jun 2021 16:49:53 +0000 (12:49 -0400)]
mgr/rook: comment out osd creation functions

This commit comments out the OSD creation functions in rook_cluster.py
and module.py, since the submodule update has broken them.

Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
4 years agomgr/rook: fix some mypy typing errors in rook_cluster.py
Joseph Sawaya [Tue, 15 Jun 2021 22:07:51 +0000 (18:07 -0400)]
mgr/rook: fix some mypy typing errors in rook_cluster.py

This commit fixes some errors caught by mypy in rook_cluster.py. Most of the
errors were caused by the update of the rook-client-python submodule in a previous
commit.

Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
4 years agomgr/rook: pass zone attribute to CephObjectStore CR when creating rgw
Joseph Sawaya [Tue, 15 Jun 2021 18:14:40 +0000 (14:14 -0400)]
mgr/rook: pass zone attribute to CephObjectStore CR when creating rgw

This commit passes the zone attribute to the CephObjectStore CR when
creating a RGW instance using the Rook Orchestrator backend:
`ceph orch apply rgw <rgw-name> --realm=<realm-name> --zone=<zone-name>`

Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
4 years agoMerge pull request #41856 from rhcs-dashboard/maintenance-bug-fix
Ernesto Puerta [Thu, 17 Jun 2021 10:44:57 +0000 (12:44 +0200)]
Merge pull request #41856 from rhcs-dashboard/maintenance-bug-fix

mgr/dashboard: Fix 500 error while exiting out of maintenance

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: sebastian-philipp <NOT@FOUND>
4 years agoMerge pull request #41694 from jmolmo/kcli_cephadm_doc
Sebastian Wagner [Thu, 17 Jun 2021 09:37:26 +0000 (11:37 +0200)]
Merge pull request #41694 from jmolmo/kcli_cephadm_doc

doc: Add kcli utilization for development environments

Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
4 years agoMerge pull request #41848 from xxhdx1985126/wip-errorator-parallel_for_each
Kefu Chai [Thu, 17 Jun 2021 04:23:29 +0000 (12:23 +0800)]
Merge pull request #41848 from xxhdx1985126/wip-errorator-parallel_for_each

crimson: errorator parallel_for_each

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #41894 from tchaikov/wip-crimson-sigint
Kefu Chai [Thu, 17 Jun 2021 02:31:27 +0000 (10:31 +0800)]
Merge pull request #41894 from tchaikov/wip-crimson-sigint

crimson/{osd,store_nbd}: handle SIGINT

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
4 years agoMerge pull request #41895 from ceph/wip-cacephcom
Kefu Chai [Thu, 17 Jun 2021 00:13:49 +0000 (08:13 +0800)]
Merge pull request #41895 from ceph/wip-cacephcom

MIRRORS: Add ca.ceph.com

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agomgr/dashboard: Fix 500 error while exiting out of maintenance 41856/head
Nizamudeen A [Tue, 15 Jun 2021 08:47:58 +0000 (14:17 +0530)]
mgr/dashboard: Fix 500 error while exiting out of maintenance

When you add a host in maintenance mode and then exit the maintenance
mode, a 500 server error will popup which will interrupt the whole
exit maintenance process and leave the host in an unknown/offline state.
It happened when I was setting the status of the host through the
HostSpec(). With this change, I am using the enter_maintenance api of
the orch to enable the maintenance.

Fixes: https://tracker.ceph.com/issues/51218
Signed-off-by: Nizamudeen A <nia@redhat.com>
4 years agorook-client-python: update to update-june-21
Sage Weil [Wed, 16 Jun 2021 20:11:34 +0000 (16:11 -0400)]
rook-client-python: update to update-june-21

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge PR #41890 into master
Sage Weil [Wed, 16 Jun 2021 18:01:26 +0000 (14:01 -0400)]
Merge PR #41890 into master

* refs/pull/41890/head:
doc/cephadm: removing "Octopus" from procedure

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMIRRORS: Add ca.ceph.com 41895/head
David Galloway [Wed, 16 Jun 2021 16:30:22 +0000 (12:30 -0400)]
MIRRORS: Add ca.ceph.com

Signed-off-by: David Galloway <dgallowa@redhat.com>
4 years agocrimson/osd: use stop_signal from seastar 41894/head
Kefu Chai [Wed, 16 Jun 2021 16:04:37 +0000 (00:04 +0800)]
crimson/osd: use stop_signal from seastar

and disable app_cfg.auto_handle_sigint_sigterm, otherwise app template
handles SIGINT and SIGTERM by itself, and calls app.stop(). but we don't
use this mechinary at all. we use seastar::defer() instead of
seastar::at_exit() for doing graceful shutdown and cleanup.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/tools/store_nbd: update example usage in comment
Kefu Chai [Wed, 16 Jun 2021 13:59:59 +0000 (21:59 +0800)]
crimson/tools/store_nbd: update example usage in comment

--total-device-size is not supported any more.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/tools/store_nbd: add graceful shutdown support
Kefu Chai [Wed, 16 Jun 2021 13:51:57 +0000 (21:51 +0800)]
crimson/tools/store_nbd: add graceful shutdown support

we could have more sophisticate mechinary for interrupting fio job,
but so far it is able to stop itself if it idle by handling ctrl-C.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/seastore/nbd: destruct the store before create
Yingxin Cheng [Wed, 16 Jun 2021 08:00:44 +0000 (16:00 +0800)]
crimson/seastore/nbd: destruct the store before create

Otherwise the store will register the conflicting metrics and result in
double_registration.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
4 years agodoc/cephadm: removing "Octopus" from procedure 41890/head
Zac Dover [Wed, 16 Jun 2021 14:34:10 +0000 (00:34 +1000)]
doc/cephadm: removing "Octopus" from procedure

This PR removes "Octopus" from the curl-based installation
procedure.

After we moved on to Pacific, referring to Octopus looks wrong.
It looks wrong because it now is wrong.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
4 years agoMerge pull request #41882 from tchaikov/wip-crimson-int-safty
Kefu Chai [Wed, 16 Jun 2021 14:09:28 +0000 (22:09 +0800)]
Merge pull request #41882 from tchaikov/wip-crimson-int-safty

crimson/osd: guard non-pg-op handling with with_sequencer()

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoMerge pull request #41885 from tchaikov/wip-crimson-os-cleanups
Kefu Chai [Wed, 16 Jun 2021 12:36:32 +0000 (20:36 +0800)]
Merge pull request #41885 from tchaikov/wip-crimson-os-cleanups

crimson/os: cleanups and reformat

Reviewed-by: Myoungwon Oh <myoungwon.oh@samsung.com>
4 years agocrimson/osd: reindent 41882/head
Kefu Chai [Wed, 16 Jun 2021 10:27:07 +0000 (18:27 +0800)]
crimson/osd: reindent

for less indent, hence better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: wrap line at 80
Kefu Chai [Wed, 16 Jun 2021 10:26:15 +0000 (18:26 +0800)]
crimson/osd: wrap line at 80

for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/osd: guard non-pg-op handling with with_sequencer()
Kefu Chai [Wed, 16 Jun 2021 10:25:55 +0000 (18:25 +0800)]
crimson/osd: guard non-pg-op handling with with_sequencer()

because we should only ensure the ordering of the requests touching
the objects, the other requests like pgls should not be ordered along
with them. so as the second step, guard the non-pg-op handling with
with_sequencer().

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/os: use reference for loop variable 41885/head
Kefu Chai [Wed, 16 Jun 2021 11:58:42 +0000 (19:58 +0800)]
crimson/os: use reference for loop variable

for better performance, also silences the warning like:

../src/crimson/os/seastore/random_block_manager/nvme_manager.cc:444:23: warning: loop variable ‘b’ creates a copy from type ‘const crimson::os::seastore::rbm_alloc_delta_t’ [-Wrange-loop-construct]
  444 |       for (const auto b : alloc_blocks) {
      |                       ^

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #41859 from sebastian-philipp/mypy-constrains.txt
Sebastian Wagner [Wed, 16 Jun 2021 11:54:31 +0000 (13:54 +0200)]
Merge pull request #41859 from sebastian-philipp/mypy-constrains.txt

global,tox.ini: add mypy-constrains.txt

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Patrick Seidensal <pseidensal@suse.com>
4 years agocrimson/os: return seastar::now() in "finally()" block
Kefu Chai [Wed, 16 Jun 2021 11:05:53 +0000 (19:05 +0800)]
crimson/os: return seastar::now() in "finally()" block

so finally() is able to identify the return is a future, and discard it
manually.
otherwise the return value will be discarded even the future is marked
[[nodiscard]], hence the C++ compiler warns.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/os: remove unnecessary now()
Kefu Chai [Wed, 16 Jun 2021 11:00:00 +0000 (19:00 +0800)]
crimson/os: remove unnecessary now()

the previous continuation in the chain already returns a future, no need
to hook up another now().

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/os: remove unnecessary parentheses
Kefu Chai [Wed, 16 Jun 2021 10:38:22 +0000 (18:38 +0800)]
crimson/os: remove unnecessary parentheses

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/os: fix the indent
Kefu Chai [Wed, 16 Jun 2021 10:37:52 +0000 (18:37 +0800)]
crimson/os: fix the indent

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/os: do not capture unused variables
Kefu Chai [Wed, 16 Jun 2021 10:34:36 +0000 (18:34 +0800)]
crimson/os: do not capture unused variables

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoglobal,tox.ini: add mypy-constrains.txt 41859/head
Sebastian Wagner [Tue, 15 Jun 2021 10:10:36 +0000 (12:10 +0200)]
global,tox.ini: add mypy-constrains.txt

let's avoid getting new versions of those packages by accident.
Unfortunately this means we have to manually update those
packages regurarly.

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
4 years agocrimson/osd: extract with_sequencer() method out
Kefu Chai [Wed, 16 Jun 2021 09:46:06 +0000 (17:46 +0800)]
crimson/osd: extract with_sequencer() method out

because we should only ensure the ordering of the requests touching
the objects, the other requests like pgls should not be ordered along
with them, so as the first step, let's extract with_sequencer() method
out, so we can differentiate these two cases with minimal repeatings.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #41881 from tchaikov/wip-crimson-alien
Kefu Chai [Wed, 16 Jun 2021 10:28:33 +0000 (18:28 +0800)]
Merge pull request #41881 from tchaikov/wip-crimson-alien

crimson: adapt to the new alien API

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agocrimson: adapt to the new alien API 41881/head
Kefu Chai [Wed, 16 Jun 2021 09:11:50 +0000 (17:11 +0800)]
crimson: adapt to the new alien API

since seastar now deprecates the old alien::submit_to() API, and
replaced it with a variant which requires a new parameter of "alien"
instance, let's pick it up, to amortize the cost to catch up with
the seastar master HEAD.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agotest/crimson: add test case for errorator parallel_for_each 41848/head
Xuehan Xu [Thu, 10 Jun 2021 06:21:01 +0000 (14:21 +0800)]
test/crimson: add test case for errorator parallel_for_each

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agocrimson: add parallel_for_each to errorator
Xuehan Xu [Thu, 10 Jun 2021 06:21:01 +0000 (14:21 +0800)]
crimson: add parallel_for_each to errorator

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
4 years agoMerge pull request #41825 from tchaikov/wip-avl-cleanup
Igor Fedotov [Wed, 16 Jun 2021 09:02:38 +0000 (12:02 +0300)]
Merge pull request #41825 from tchaikov/wip-avl-cleanup

os/bluestore/AvlAllocator: specialize _block_picker() and cleanups

Reviewed-by: Igor Fedotov <ifedotov@suse,com>
4 years agoMerge pull request #41346 from adk3798/enough-mds-upgrade
Sebastian Wagner [Wed, 16 Jun 2021 08:53:33 +0000 (10:53 +0200)]
Merge pull request #41346 from adk3798/enough-mds-upgrade

mgr/cephadm: skip ok-to-stop for mds in upgrade if not enough mds daemons

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
4 years agoMerge pull request #41813 from adk3798/repo
Sebastian Wagner [Wed, 16 Jun 2021 08:51:53 +0000 (10:51 +0200)]
Merge pull request #41813 from adk3798/repo

cephadm: Use gpg rather than asc key for add-repo

Reviewed-by: Sage Weil <sage@newdream.net>
4 years agoMerge pull request #41820 from mgfritch/cephadm-not-a-mon-ip
Sebastian Wagner [Wed, 16 Jun 2021 08:51:38 +0000 (10:51 +0200)]
Merge pull request #41820 from mgfritch/cephadm-not-a-mon-ip

cephadm: raise Error() when unable to bind to an ip

Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
4 years agoMerge pull request #41041 from myoungwon/wip-randomblockmanager-part1
Samuel Just [Wed, 16 Jun 2021 07:29:18 +0000 (00:29 -0700)]
Merge pull request #41041 from myoungwon/wip-randomblockmanager-part1

seastore: RandomBlockManager part1

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agoMerge pull request #27465 from tchaikov/wip-38219
Kefu Chai [Wed, 16 Jun 2021 01:38:45 +0000 (09:38 +0800)]
Merge pull request #27465 from tchaikov/wip-38219

ceph-monstore-tool: use a large enough paxos/{first,last}_committed

Reviewed-by: Neha Ojha <nojha@redhat.com>