Project

General

Profile

Actions

Bug #47923

closed

CephFS - Feature #47587: pybind/mgr/nfs: add Rook support

rook: 'ceph orch apply nfs' throws error if no ganesha daemons are deployed

Added by Varsha Rao over 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
mgr/rook
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

[root@rook-ceph-tools-78cdfd976c-gj55c /]# rados lspools
device_health_metrics
myfs-metadata
myfs-data0
nfs-ganesha

[root@rook-ceph-tools-78cdfd976c-gj55c /]# ceph orch ls
NAME      RUNNING  REFRESHED  AGE  PLACEMENT  IMAGE NAME                           IMAGE ID
mds.myfs      0/2  0s ago     -    count:1    192.168.0.138:5000/ceph/ceph:latest  <unknown>
mgr           0/1  0s ago     -    count:1    192.168.0.138:5000/ceph/ceph:latest  <unknown>
mon           0/1  0s ago     -    count:1    192.168.0.138:5000/ceph/ceph:latest  <unknown>

[root@rook-ceph-tools-78cdfd976c-gj55c /]# ceph orch apply nfs
Invalid command: missing required parameter svc_id(<string>)
orch apply nfs <svc_id> <pool> [<namespace>] [<placement>] [--dry-run] [plain|json|json-pretty|yaml] [--unmanaged] :  Scale an NFS service

[root@rook-ceph-tools-78cdfd976c-gj55c /]# ceph orch apply nfs mynfs nfs-ganesha mynfs
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1195, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 141, in handle_command
    return dispatch[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 332, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 103, in <lambda>
    wrapper_copy = lambda *l_args, **l_kwargs: wrapper(*l_args, **l_kwargs)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 92, in wrapper
    return func(*args, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator/module.py", line 1224, in _apply_nfs
    raise_if_exception(completion)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 643, in raise_if_exception
    raise e
kubernetes.client.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Wed, 21 Oct 2020 08:31:43 GMT', 'Content-Length': '224'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"cephnfses.ceph.rook.io \"mynfs\" not found","reason":"NotFound","details":{"name":"mynfs","group":"ceph.rook.io","kind":"cephnfses"},"code":404}

Mgr log

debug 2020-10-21T08:31:43.459+0000 7faeaf6c0700  0 log_channel(audit) log [DBG] : from='client.4796 -' entity='client.admin' cmd=[{"prefix": "orch apply nfs", "svc_id": "mynfs", "pool": "nfs-ganesha", "namespace": "mynfs", "target": ["mon-mgr", ""]}]: dispatch
debug 2020-10-21T08:31:43.467+0000 7faeaeebf700  0 [rook ERROR orchestrator._interface] _Promise failed
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 295, in _finalize
    next_result = self._on_complete(self._value)
  File "/usr/share/ceph/mgr/rook/module.py", line 67, in <lambda>
    on_complete=lambda _: on_complete(),
  File "/usr/share/ceph/mgr/rook/module.py", line 468, in <lambda>
    lambda: self.rook_cluster.update_nfs_count(spec.service_id, num),
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 522, in update_nfs_count
    return self._patch(cnfs.CephNFS, 'cephnfses',svc_id, _update_nfs_count)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 590, in _patch
    "{}/{}".format(crd_name, cr_name)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 222, in rook_api_get
    return self.rook_api_call("GET", path, **kwargs)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 219, in rook_api_call
    **kwargs)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 345, in call_api
    _preload_content, _request_timeout)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 176, in __call_api
    _request_timeout=_request_timeout)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 366, in request
    headers=headers)
  File "/lib/python3.6/site-packages/kubernetes/client/rest.py", line 241, in GET
    query_params=query_params)
  File "/lib/python3.6/site-packages/kubernetes/client/rest.py", line 231, in request
    raise ApiException(http_resp=r)
kubernetes.client.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Wed, 21 Oct 2020 08:31:43 GMT', 'Content-Length': '224'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"cephnfses.ceph.rook.io \"mynfs\" not found","reason":"NotFound","details":{"name":"mynfs","group":"ceph.rook.io","kind":"cephnfses"},"code":404}

debug 2020-10-21T08:31:43.471+0000 7faeaeebf700  0 [rook ERROR orchestrator._interface] _Promise failed
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 295, in _finalize
    next_result = self._on_complete(self._value)
  File "/usr/share/ceph/mgr/rook/module.py", line 67, in <lambda>
    on_complete=lambda _: on_complete(),
  File "/usr/share/ceph/mgr/rook/module.py", line 468, in <lambda>
    lambda: self.rook_cluster.update_nfs_count(spec.service_id, num),
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 522, in update_nfs_count
    return self._patch(cnfs.CephNFS, 'cephnfses',svc_id, _update_nfs_count)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 590, in _patch
    "{}/{}".format(crd_name, cr_name)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 222, in rook_api_get
    return self.rook_api_call("GET", path, **kwargs)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 219, in rook_api_call
    **kwargs)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 345, in call_api
    _preload_content, _request_timeout)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 176, in __call_api
    _request_timeout=_request_timeout)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 366, in request
    headers=headers)
  File "/lib/python3.6/site-packages/kubernetes/client/rest.py", line 241, in GET
    query_params=query_params)
  File "/lib/python3.6/site-packages/kubernetes/client/rest.py", line 231, in request
    raise ApiException(http_resp=r)
kubernetes.client.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Wed, 21 Oct 2020 08:31:43 GMT', 'Content-Length': '224'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"cephnfses.ceph.rook.io \"mynfs\" not found","reason":"NotFound","details":{"name":"mynfs","group":"ceph.rook.io","kind":"cephnfses"},"code":404}

debug 2020-10-21T08:31:43.471+0000 7faeaeebf700  0 [rook ERROR orchestrator._interface] _Promise failed
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 295, in _finalize
    next_result = self._on_complete(self._value)
  File "/usr/share/ceph/mgr/rook/module.py", line 67, in <lambda>
    on_complete=lambda _: on_complete(),
  File "/usr/share/ceph/mgr/rook/module.py", line 468, in <lambda>
    lambda: self.rook_cluster.update_nfs_count(spec.service_id, num),
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 522, in update_nfs_count
    return self._patch(cnfs.CephNFS, 'cephnfses',svc_id, _update_nfs_count)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 590, in _patch
    "{}/{}".format(crd_name, cr_name)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 222, in rook_api_get
    return self.rook_api_call("GET", path, **kwargs)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 219, in rook_api_call
    **kwargs)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 345, in call_api
    _preload_content, _request_timeout)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 176, in __call_api
    _request_timeout=_request_timeout)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 366, in request
    headers=headers)
  File "/lib/python3.6/site-packages/kubernetes/client/rest.py", line 241, in GET
    query_params=query_params)
  File "/lib/python3.6/site-packages/kubernetes/client/rest.py", line 231, in request
    raise ApiException(http_resp=r)
kubernetes.client.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Wed, 21 Oct 2020 08:31:43 GMT', 'Content-Length': '224'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"cephnfses.ceph.rook.io \"mynfs\" not found","reason":"NotFound","details":{"name":"mynfs","group":"ceph.rook.io","kind":"cephnfses"},"code":404}

[root@rook-ceph-tools-78cdfd976c-gj55c /]# ceph version
ceph version 16.0.0-4762-ga1c3f3b (a1c3f3b7cfe7cd69ea4218393490b61c4e03e716) pacific (dev)
[root@rook-ceph-tools-78cdfd976c-gj55c /]# rook version
rook: v1.4.0-alpha.0.499.g40068a95
go: go1.15.2
Actions #1

Updated by Varsha Rao over 3 years ago

  • Parent task set to #47587
Actions #2

Updated by Varsha Rao over 3 years ago

  • Subject changed from rook: 'ceph orch apply nfs' returns 404 error to rook: 'ceph orch apply nfs' throws error if no ganesha daemons are deployed

Currently, it works only if nfs-ganesha daemons are already deployed. Otherwise too, it should work. Since 'orch apply' is preferred way to create daemons. https://docs.ceph.com/en/latest/mgr/orchestrator/#stateless-services-mds-rgw-nfs-rbd-mirror-iscsi

Actions #3

Updated by Varsha Rao over 3 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 37881
Actions #4

Updated by Patrick Donnelly over 3 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Assignee set to Varsha Rao
Actions #5

Updated by Sebastian Wagner almost 3 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF