Skip to content

cephadm: add nfs-ganesha deployment#33064

Merged
liewegas merged 18 commits intoceph:octopusfrom
mgfritch:cephadm-nfs-ganesha
Mar 12, 2020
Merged

cephadm: add nfs-ganesha deployment#33064
liewegas merged 18 commits intoceph:octopusfrom
mgfritch:cephadm-nfs-ganesha

Conversation

@mgfritch
Copy link
Contributor

@mgfritch mgfritch commented Feb 4, 2020

Add support for nfs-ganesha containers manged by bin/cephadm

RADOS pool config is stored in a json file:

$ cat nfs-ganesha.json
{
    "user" : "admin",
    "pool" : "nfs-ganesha",
    "namespace" : "nfs-ns"
}

The nfs-ganesha container can be deployed via cephadm:

$ cephadm deploy --fsid 00000000-0000-0000-0000-0000deadbeef --name nfs.a --keyring k --config c --config-json nfs-ganesha.json

Signed-off-by: Michael Fritch mfritch@suse.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@mgfritch mgfritch requested a review from a team as a code owner February 4, 2020 15:39
@mgfritch
Copy link
Contributor Author

mgfritch commented Feb 4, 2020

Do not merge, still WIP

@sebastian-philipp sebastian-philipp changed the title cephadm: add nfs-ganesha deployment [WIP] cephadm: add nfs-ganesha deployment Feb 4, 2020
@sebastian-philipp
Copy link
Contributor

sebastian-philipp commented Feb 7, 2020

@mgfritch mgfritch force-pushed the cephadm-nfs-ganesha branch 3 times, most recently from cfabbb2 to 824ed69 Compare February 18, 2020 15:17
@sebastian-philipp sebastian-philipp requested a review from a team as a code owner February 19, 2020 15:49
@mgfritch mgfritch added needs-review and removed DNM labels Feb 19, 2020
@mgfritch mgfritch force-pushed the cephadm-nfs-ganesha branch from 123a241 to 171305f Compare February 19, 2020 15:58
@mgfritch mgfritch changed the title [WIP] cephadm: add nfs-ganesha deployment cephadm: add nfs-ganesha deployment Feb 19, 2020
@mgfritch mgfritch force-pushed the cephadm-nfs-ganesha branch 4 times, most recently from 1aa41ae to e820916 Compare February 21, 2020 19:15
url += self.get_ganesha_config_object()
return url

def get_ganesha_config(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this should live in mgr/cephadm/module.py, not here, and be passed through as a file to simply write out... just like the monitoring components work. With that change, I wonder if this NFSGanesha class is needed, since most of this logic would exist in mgr/cephadm instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'll rework this PR to move the ganesha config into the json file

Copy link
Contributor Author

@mgfritch mgfritch Feb 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked to pass ganesha.conf (and any other additional /etc/ganesha/ conf file) via the files dict of the config-json

@mgfritch mgfritch added the DNM label Feb 21, 2020
@mgfritch mgfritch changed the title cephadm: add nfs-ganesha deployment [WIP] cephadm: add nfs-ganesha deployment Feb 21, 2020
@mgfritch mgfritch force-pushed the cephadm-nfs-ganesha branch from e820916 to 0e2bc10 Compare February 24, 2020 23:07
@mgfritch mgfritch changed the title [WIP] cephadm: add nfs-ganesha deployment cephadm: add nfs-ganesha deployment Feb 24, 2020
@mgfritch mgfritch force-pushed the cephadm-nfs-ganesha branch from 0e2bc10 to f49f9c5 Compare February 24, 2020 23:14
@mgfritch mgfritch changed the base branch from master to octopus March 9, 2020 17:52
@mgfritch mgfritch added this to the octopus milestone Mar 9, 2020
@sebastian-philipp
Copy link
Contributor

needs rebase

mgfritch added 18 commits March 12, 2020 08:03
Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
also allows for any arbitrary nfs conf to be deployed by adding items to
the `files` dict of the config-json

Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
container unit pre-start/post-stop for ganesha grace db

Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
allow rados obj. create to succeed during a single node test

Signed-off-by: Michael Fritch <mfritch@suse.com>
stop any running nfs servers before attempting a deploy of nfs-ganesha

Signed-off-by: Michael Fritch <mfritch@suse.com>
we only need to specify the rados pool and config object url

Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
the service might be enabled, but not running

Signed-off-by: Michael Fritch <mfritch@suse.com>
fixes mypy errors:
cephadm:1682: error: Incompatible types in assignment (expression has type "str", variable has type "int")
cephadm:1683: error: List item 3 has incompatible type "int"; expected "str"
cephadm:1686: error: List item 3 has incompatible type "int"; expected "str"
Found 3 errors in 1 file (checked 1 source file)

Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
@mgfritch mgfritch force-pushed the cephadm-nfs-ganesha branch from eceb7b9 to d02bfa3 Compare March 12, 2020 14:09
@liewegas liewegas merged commit d1736ae into ceph:octopus Mar 12, 2020
@mgfritch mgfritch deleted the cephadm-nfs-ganesha branch March 12, 2020 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants