Bug 1494980 - pybind/ceph_volume_client: snapshot dir name hardcoded
Summary: pybind/ceph_volume_client: snapshot dir name hardcoded
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 3.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 3.0
Assignee: Ram Raja
QA Contact: Ramakrishnan Periyasamy
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-24 15:14 UTC by Ram Raja
Modified: 2017-12-05 23:45 UTC (History)
8 users (show)

Fixed In Version: RHEL: ceph-12.2.1-3.el7cp Ubuntu: ceph_12.2.1-10redhat1xenial
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-05 23:45:31 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 21476 0 None None None 2017-09-25 21:53:16 UTC
Red Hat Product Errata RHBA-2017:3387 0 normal SHIPPED_LIVE Red Hat Ceph Storage 3.0 bug fix and enhancement update 2017-12-06 03:03:45 UTC

Description Ram Raja 2017-09-24 15:14:58 UTC
Description of problem:

The ceph_volume_client always creates snapshots in '.snap' folder.  But the snapshot folder name can be modified using `client_snapdir` config setting. Need to let ceph_volume_client fetch the `client_snapdir` option, and use that to create snapshots.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 18 Ram Raja 2017-10-24 15:03:26 UTC
Steps to verify the fix,

//Create a ceph auth ID
# ceph auth get-or-create client.bangalore mds 'allow *' mon 'allow *' osd 'allow rw' -o /etc/ceph/ceph.client.bangalore.keyring

//Append the following to the client's ceph.conf file to set
//snapshot dir as '.mgroad' for client.bangalore
[client.bangalore]
client_mount_uid = 0
client_mount_gid = 0
client_snapdir = .mgroad

// Now try creating a snapshot 'snapshot00' of a Ceph dir 'share00'
// using python ceph_volume_client.
// ceph_volume_client module is part of `python-cephfs` package
// and it's a wrapper around librados/libcephfs
// In python2.x interpreter you run the following commands to do so
>>> import ceph_volume_client
>>> vc = ceph_volume_client.CephFSVolumeClient('bangalore', '/etc/ceph/ceph.conf', 'ceph')
>>> vc.connect()
>>> volpath = ceph_volume_client.VolumePath(None, 'share00')
>>> volume = vc.create_volume(volpath, 5)
>>> volsnap = vc.create_snapshot_volume(volpath, 'snapshot00')
>>> vc.disconnect()


// Mount the Ceph file system via fuse using ID 'bangalore'
# sudo ceph-fuse --id=bangalore /mnt/ceph-fuse

// Check whether snapshot 'snapshot00' is created within
// '.mgroad' snapdir
# cd /mnt/ceph-fuse/

// Get into the directory 'share00'
# cd volumes/_nogroup/share00/

// Its snapshot should be in the desired snapdir and not
// in the default '.snap' snapdir
# cd .mgroad
# ls
snapshot00

// You should be able to see the 'snapshot00'

Comment 19 Ram Raja 2017-10-24 15:05:20 UTC
(In reply to Ram Raja from comment #18)

Please do the following in your client machine.
> Steps to verify the fix,
> 
> //Create a ceph auth ID
> # ceph auth get-or-create client.bangalore mds 'allow *' mon 'allow *' osd
> 'allow rw' -o /etc/ceph/ceph.client.bangalore.keyring
> 
> //Append the following to the client's ceph.conf file to set
> //snapshot dir as '.mgroad' for client.bangalore
> [client.bangalore]
> client_mount_uid = 0
> client_mount_gid = 0
> client_snapdir = .mgroad
> 
> // Now try creating a snapshot 'snapshot00' of a Ceph dir 'share00'
> // using python ceph_volume_client.
> // ceph_volume_client module is part of `python-cephfs` package
> // and it's a wrapper around librados/libcephfs
> // In python2.x interpreter you run the following commands to do so
> >>> import ceph_volume_client
> >>> vc = ceph_volume_client.CephFSVolumeClient('bangalore', '/etc/ceph/ceph.conf', 'ceph')
> >>> vc.connect()
> >>> volpath = ceph_volume_client.VolumePath(None, 'share00')
> >>> volume = vc.create_volume(volpath, 5)
> >>> volsnap = vc.create_snapshot_volume(volpath, 'snapshot00')
> >>> vc.disconnect()
> 
> 
> // Mount the Ceph file system via fuse using ID 'bangalore'
> # sudo ceph-fuse --id=bangalore /mnt/ceph-fuse
> 
> // Check whether snapshot 'snapshot00' is created within
> // '.mgroad' snapdir
> # cd /mnt/ceph-fuse/
> 
> // Get into the directory 'share00'
> # cd volumes/_nogroup/share00/
> 
> // Its snapshot should be in the desired snapdir and not
> // in the default '.snap' snapdir
> # cd .mgroad
> # ls
> snapshot00
> 
> // You should be able to see the 'snapshot00'

Comment 20 Ramakrishnan Periyasamy 2017-10-25 08:24:09 UTC
Thanks for the verification steps.

Moving this bug to verified state.

Comment 23 errata-xmlrpc 2017-12-05 23:45:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3387


Note You need to log in before you can comment on or make changes to this bug.