Project

General

Profile

Actions

Bug #57694

closed

Exports not created correctly when using ceph_argparse

Added by Victoria Martinez de la Cruz over 1 year ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
python interface
Target version:
-
% Done:

0%

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

Description

When issuing the command nfs export apply through the ceph_argparse.py library the execution finishes successfully but the export is not actually created.

Context
-------

Using ceph_argparse from within the CephFS driver in OpenStack manila. This command requires passing both an argdict specifying the nfs_cluster_id but also a bytes object (JSON object) specifying the export information.

DEBUG manila.share.drivers.cephfs.driver [None req-f79ae379-0ca7-4d43-9d4e-c56780eca00b demo None] Invoking ceph_argparse.json_command - rados_client=<rados.Rados object at 0x7f2007eaf7c0>, target=('mon-mgr',), prefix='nfs export apply', argdict={'nfs_cluster_id': 'cephfs', 'format': 'json'}, inbuf=b'{"path": "/volumes/_nogroup/eb514387-21f2-4a73-adee-cdec4f505056/504dabcd-1e52-4fa4-b40a-e0b24a73720b", "nfs_cluster_id": "cephfs", "pseudo": "/volumes/_nogroup/eb514387-21f2-4a73-adee-cdec4f505056/504dabcd-1e52-4fa4-b40a-e0b24a73720b", "squash": "none", "security_label": true, "protocols": [4], "fsal": {"name": "CEPH", "fs_name": "cephfs"}, "clients": [{"access_type": "rw", "addresses": ["10.0.0.11"], "squash": "none"}]}', timeout=10. {{(pid=3460532) rados_command /opt/stack/manila/manila/share/drivers/cephfs/driver.py:189}}

The output is:

INFO manila.share.drivers.cephfs.driver [None req-f79ae379-0ca7-4d43-9d4e-c56780eca00b demo None] Added export /volumes/_nogroup/eb514387-21f2-4a73-adee-cdec4f505056/504dabcd-1e52-4fa4-b40a-e0b24a73720b

But manually checking the cluster shows the following:

stack@quincy:~/devstack$ sudo ceph --id=manila nfs export ls <nfs_cluster_id>
[]

Ceph and NFS have been deployed with cephadm.

Executing this command (ceph --id=manila nfs export apply <nfs_cluster_id> -i export.json) from the CLI works

Precisely, trying to add access to the same share:

stack@quincy:~/devstack$ sudo ceph --id=manila nfs export apply <nfs_cluster_id> -i export-sample.json
Added export /volumes/_nogroup/eb514387-21f2-4a73-adee-cdec4f505056/504dabcd-1e52-4fa4-b40a-e0b24a73720b

stack@quincy:~/devstack$ sudo ceph --id=manila nfs export ls <nfs_cluster_id>
[
"/volumes/_nogroup/eb514387-21f2-4a73-adee-cdec4f505056/504dabcd-1e52-4fa4-b40a-e0b24a73720b"
]

Expected result
---------------

We should be able to use ceph_argparse to create exports of subvolumes

Actual result
-------------
The "ceph nfs export apply <nfs_cluster_id> -i export.json" command issued through ceph_argparse fails silently, outputs the successful creation of the export when this is not the case.

Actions #1

Updated by Ramana Raja over 1 year ago

  • Status changed from New to Need More Info

Can you try replacing the 'nfs_cluster_id' with 'cluster_id' in argdict as mentioned in the docs,
https://docs.ceph.com/en/quincy/mgr/nfs/#create-or-update-export-via-json-specification

Actions #2

Updated by Victoria Martinez de la Cruz over 1 year ago

Thanks Ramana, that was the issue, fixed it on the driver. We can close this tracker.

Actions #3

Updated by Ramana Raja over 1 year ago

  • Status changed from Need More Info to Rejected
Actions

Also available in: Atom PDF