Bug 1494980
| Summary: | pybind/ceph_volume_client: snapshot dir name hardcoded | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Ceph Storage | Reporter: | Ram Raja <rraja> |
| Component: | CephFS | Assignee: | Ram Raja <rraja> |
| Status: | CLOSED ERRATA | QA Contact: | Ramakrishnan Periyasamy <rperiyas> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.0 | CC: | ceph-eng-bugs, ceph-qe-bugs, hnallurv, john.spray, kdreyer, pdonnell, tserlin, vakulkar |
| Target Milestone: | rc | ||
| Target Release: | 3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-12-05 23:45:31 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Ram Raja
2017-09-24 15:14:58 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'
(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' Thanks for the verification steps. Moving this bug to verified state. 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 |