Commit Graph

123267 Commits

Author SHA1 Message Date
Sage Weil
0e0f892668 doc/cephadm/nfs: update
- leave off pool/ns, since they should almost never be necessary.
- add port

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-25 10:15:45 -04:00
Sage Weil
00aac5df9e mgr/nfs: change 'nfs cluster info'
- include the virtual_ip and port at top level
- move backend server list into a sub-item
- include (haproxy) monitoring port

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-25 10:15:45 -04:00
Sage Weil
26cb491d19 mgr/nfs: take optional virtual_ip for deploying ingress
For 'nfs cluster create', optionally take a virtual_ip to deploy ingress.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-25 10:15:45 -04:00
Sage Weil
e5c1d4aa71 mgr/nfs: remove 'nfs cluster update'
This command is very awkward to implement unless all service spec fields
are always required.  That will soon mean both the placement *and*
virtual_ip (if any), making it much less useful for a human to make use
of.

Instead, let them update yaml, or adjust the nfs and/or ingress specs
directly.  I don't think this command is needed.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-25 10:15:45 -04:00
Sage Weil
5585fdd5e3 mgr/nfs: factor out ganesha pool creation
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-20 18:38:20 -04:00
Sage Weil
ad0a62dc9d mgr/nfs: delete -> rm for CLI
The rest of the CLI uses 'rm' in place of 'remove' or 'delete', so let's
deprecate 'delete' and add 'rm'.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-20 18:38:18 -04:00
Sage Weil
7a5b45268c mgr/nfs: add some type annotations
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
05fdbc8c76 python-common: fix IngressSpec yaml dump
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
9dba27edfe mgr/cephadm: ingress: remove eth0 default
Better to raise an error; eth0 will never be correct.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
b711a75277 qa/tasks/cephadm: allow mounting volumes in shell
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
693fd30532 cephadm: add -v arg to shell
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
54542fdaab qa/tasks/vip: add 'vip.exec' task
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
205bf35c43 mgr/orchestrator: add --port arg to 'orch apply nfs'
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
15bdaa74b5 mgr/cephadm: nfs: add purge
Remove the grace object if we purge the service.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
51f0dedbbb mgr/cephadm: ingress: support nfs
- use consistent hashing
- statically map across ranks
- disable backend checks so that clients don't move

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
444663b740 mgr/cephadm: do not reconfigure daemons on deleted services
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
917fb59767 mgr/cephadm: nfs: shell out to rados tool for conf creation
This avoids any hangs due to rados.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
74169045a9 mgr/cephadm: nfs: add rank to grace file from mgr module
Do the grace file manipulation from the mgr module.  For add, this isn't
especially important, but for remove it is very important.  Clean out
old ranks from the grace table before we record that the rank has been
purged from the rank_map.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
ae4ab5d204 mgr/cephadm: nfs: bind ganesha to appropriate ip:port
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
a7d65f00ea mgr/cephadm: enable ranked daemons for nfs
Use ranked daemons for NFS. Ganesha does not like it if multiple
instances start up with the same rank, but we need stable ranks so that
a rank can "fail over" to a new instance of a new daemon on another host
(with the same rank) for NFS client reclaim to work.

Specify a nodeid of '{service_name}.{rank}' for ganesha.

Include a unique id in the daemon_id just because this avoids some issues
with the create/destroy ordering, and because the daemon_id doesn't matter
much anymore since we are using a stable rank.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
e8b07982b5 mgr/cephadm: support creation of daemons with ranks
- we need to assign all names and update the rank_map before we start
creating daemons.
- if we are using ranks, we should delete old daemons first, and
fence them from the cluster (where possible).

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
1b0980752f mgr/cephadm: make _plan show removed daemon names
This is more informative than just the hostnames.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
de03942f80 mgr/cephadm/schedule: assign/map ranks
If we are passed a rank_map, use it maintain one daemon per rank, where
the ranks are consecutive non-negative integers starting from 0.

A bit of refactoring in place() so that we only do the rank allocations
on slots we are going to use (no more than count).

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:14 -04:00
Sage Weil
5e8f184be8 mgr/cephadm: add rank[_generation] properties
DaemonDescription
CephadmDaemonDeploySpec
DaemonPlacement
unit.meta
get_unique_name() (we include it in the daemon_id)

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:13 -04:00
Sage Weil
d0d2232c05 mgr/cephadm/inventory: store optional rank_map along with specs
The rank_map is a bit of state to keep track of which ranks are
occupied by which generation and daemon_id.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:13 -04:00
Sage Weil
11ff4842a2 mgr/cephadm: include service_name is generated DaemonDescription
This makes 'orch ls' match up daemosn to services (and probably cleans up
other bits and pieces) when the old daemon id -> service name calc code
can't do its thing.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:13 -04:00
Sage Weil
15e5c0a3ac mgr/orchestrator: include service_name in DaemonDescription dump
('orch ps')

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:13 -04:00
Sage Weil
a282c3c249 mgr/cephadm/inventory: fix deleted check
Look in dict, not encoded JSON string

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:13 -04:00
Sage Weil
991515aaaa mgr/cephadm: simplify
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:13 -04:00
Sage Weil
adceaa9b28 mgr/cephadm/schedule: make placement shuffle deterministic
hash(str) is non-deterministic, probably because it is using the internal
object ID or something and not the string content?

In any case, explicitly hash the string content and use that instead.

Also, sort the input pre-shuffle to ensure that variations in the original
host list ordering don't screw with the result.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:13 -04:00
Sage Weil
2fa80d8769 mgr/cephadm: document CephadmService flags
Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-19 08:43:13 -04:00
Kefu Chai
fa03786426
Merge pull request #41399 from idryomov/wip-mrun-if-posix
mrun: avoid == in [ command

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-05-19 20:38:07 +08:00
Kefu Chai
05b561a1d1
Merge pull request #41393 from rosinL/fix-50835
common/crc32c_aarch64: fix crc32c unittest failed on aarch64

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-05-19 20:37:44 +08:00
Sage Weil
4029981e45 Merge PR #41388 into master
* refs/pull/41388/head:
	cephadm: write config files as utf-8

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
2021-05-19 07:57:20 -04:00
Sage Weil
b9d8dc483a Merge PR #41286 into master
* refs/pull/41286/head:
	qa/suites/orch/rook: disable centos for now
	qa/suites/orch/rook/smoke: initial smoke suite
	qa/tasks/rook: ROOK_HOSTPATH_REQUIRES_PRIVILEGED=true on centos
	qa/tasks/rook: simplify shutdown
	qa/tasks/rook: archive logs
	qa/tasks/rook: more orderly cluster teardown
	qa/tasks/rook: deploy ceph via rook on top of kubernetes
	qa/tasks/kubeadm: install kubernetes with kubeadm
	qa/suites: move rados/cephadm -> orch/cephadm; symlink
	qa/tasks/cephadm: add whitespace between functions
	qa/tasks/cephadm: clean up ctx.manager setup

Reviewed-by: Sébastien Han <seb@redhat.com>
2021-05-19 07:55:30 -04:00
Sage Weil
825481b4f3 Merge PR #41370 into master
* refs/pull/41370/head:
	mgr/cephadm: pin haproxy image to 2.3.z

Reviewed-by: Daniel Pivonka <dpivonka@redhat.com>
Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
2021-05-19 07:52:17 -04:00
Ernesto Puerta
1eda1da113
Merge pull request #41345 from rhcs-dashboard/fix-CVE-2021-3509-master
mgr/dashboard: fix cookie injection issue (CVE-2021-3509)

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
2021-05-19 13:43:42 +02:00
Ilya Dryomov
20584f09e9 mrun: avoid == in [ command
== operator is not supported in POSIX sh (e.g. dash):

  ./mrun: 24: [: unexpected operator

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2021-05-19 13:00:16 +02:00
Ernesto Puerta
67fb1b157c
Merge pull request #41104 from rhcs-dashboard/fix-ESOCKETTIMEDOUT-e2e-failure
mgr/dashboard: fix ESOCKETTIMEDOUT E2E failure

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
2021-05-19 12:41:33 +02:00
Ernesto Puerta
8e1b94898b
Merge pull request #41273 from rhcs-dashboard/update-frontend-deps
mgr/dashboard: update frontend deps due to security vulnerabilities

Reviewed-by: Waad Alkhoury <walkhour@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
2021-05-19 12:40:02 +02:00
luo rixin
06ca2eba72 common/crc32c_aarch64: fix crc32c unittest failed on aarch64
On centos 8.2 for aarch64 with gcc 8.3, the complier will use
register v0 conflicting with the register v0 be usded in inline
asm code. Adding the related registers into clobber list to inform
complier avoiding the confict.

Fixes: https://tracker.ceph.com/issues/50835

Signed-off-by: luo rixin <luorixin@huawei.com>
2021-05-19 18:27:26 +08:00
Sage Weil
fa2cf2987c cephadm: write config files as utf-8
If we don't specify the encoding, python may use something like 'latin-1',
which cannot handle unicode characters.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-05-18 21:49:55 -04:00
Kefu Chai
ee9ae39d80
Merge pull request #41390 from batrick/i50865
doc: use sphinx .dot include

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-05-19 08:47:34 +08:00
Patrick Donnelly
5d8d691da2
Merge PR #41357 into master
* refs/pull/41357/head:
	mds: do not assert when receiving a unknow metric type

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2021-05-18 13:43:28 -07:00
Patrick Donnelly
e1f1659b18
Merge PR #41347 into master
* refs/pull/41347/head:
	mon,doc: deprecate CephFS min_compat_client
	doc: add alternate_name cephfs feature to table

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2021-05-18 13:42:47 -07:00
Patrick Donnelly
d706e825ce
Merge PR #41332 into master
* refs/pull/41332/head:
	mds: place the journaler pointer under the mds_lock

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-05-18 13:42:09 -07:00
Patrick Donnelly
e9f7fafe52
Merge PR #41171 into master
* refs/pull/41171/head:
	test: disable mirroring module for certain tests

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-05-18 13:41:28 -07:00
Patrick Donnelly
4111780363
Merge PR #41097 into master
* refs/pull/41097/head:
	cephfs-mirror: allow connecting to local cluster using mon address

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sébastien Han <seb@redhat.com>
2021-05-18 13:40:45 -07:00
Patrick Donnelly
d59f2fbbcf
Merge PR #40885 into master
* refs/pull/40885/head:
	doc: document cephfs-mirror configuration options
	cephfs-mirror: use sensible mount timeout when mounting local/remote fs
	test: add tests for settting mount timeout
	pybind/cephfs: add interface to set mount timeout
	libcephfs: add interface to set mount timeout

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-05-18 13:36:05 -07:00
Patrick Donnelly
ba1aaae837
Merge PR #41371 into master
* refs/pull/41371/head:
	mds/Mutation: initialize MutationImpl object's initiated_at

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-05-18 13:20:20 -07:00