Bug 1031939

Summary: GlusterFS: the cinder fails to create the snapshot info file
Product: Red Hat OpenStack Reporter: Yogev Rabl <yrabl>
Component: openstack-cinderAssignee: RHOS Maint <rhos-maint>
Status: CLOSED DUPLICATE QA Contact: Haim <hateya>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.0CC: eharney, hateya, yeylon
Target Milestone: ---   
Target Release: 4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-19 15:11:26 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 Yogev Rabl 2013-11-19 07:58:17 UTC
Description of problem:
The 'cinder snapshot-create/delete' command fails due to lack of permissions of the cinder group on the mounted directory. 

the implications are that the snapshots could not be deleted afterwards, as well.
the log show: 

2013-11-19 08:57:51.218 12798 DEBUG cinder.openstack.common.processutils [req-3ed57b36-5eab-4e83-a825-e7ebd6576d2f e04d990c76a44037bdfa1bf7e90381e4 8bdf5dbdf54644cd8b8369dec0bd05c8] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf qemu-img rebase -u -b volume-fd40de23-c87d-49d4-a6ef-025188a820e7 -F raw /var/lib/cinder/mnt/1f79a07997c5c9cea4fdf7d4f0fb7a9f/volume-fd40de23-c87d-49d4-a6ef-025188a820e7.f3df72fa-f44d-4d18-b94b-bf948e538142 execute /usr/lib/python2.6/site-packages/cinder/openstack/common/processutils.py:142                                                                                             
2013-11-19 08:57:51.485 12798 ERROR cinder.openstack.common.rpc.amqp [req-3ed57b36-5eab-4e83-a825-e7ebd6576d2f e04d990c76a44037bdfa1bf7e90381e4 8bdf5dbdf54644cd8b8369dec0bd05c8] Exception during message handling  
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):                                                                                                              
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/cinder/openstack/common/rpc/amqp.py", line 441, in _process_data                                       
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     **args)                                                                                                                                     
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/cinder/openstack/common/rpc/dispatcher.py", line 148, in dispatch                                      
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     return getattr(proxyobj, method)(ctxt, **kwargs)                                                                                            
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/cinder/utils.py", line 808, in wrapper                                                                 
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     return func(self, *args, **kwargs)                                                                                                          
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 371, in create_snapshot                                                
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     {'status': 'error'})                                                                                                                        
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__                                                                               
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     self.gen.next()                                                                                                                             
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 362, in create_snapshot                                                
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     model_update = self.driver.create_snapshot(snapshot_ref)                                                                                    
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/glusterfs.py", line 446, in create_snapshot                                      
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     self._create_snapshot(snapshot, path_to_disk, snap_id)                                                                                      
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/glusterfs.py", line 496, in _create_snapshot                                     
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     self._write_info_file(info_path, snap_info)                                                                                                 
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/glusterfs.py", line 521, in _write_info_file                                     
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp     with open(info_path, 'w') as f:                                                                                                             
2013-11-19 08:57:51.485 12798 TRACE cinder.openstack.common.rpc.amqp IOError: [Errno 13] Permission denied: u'/var/lib/cinder/mnt/1f79a07997c5c9cea4fdf7d4f0fb7a9f/volume-fd40de23-c87d-49d4-a6ef-025188a820e7.info'


Version-Release number of selected component (if applicable):
openstack-cinder-2013.2-2.el6ost.noarch
Red Hat Enterprise Linux Server release 6.5 Beta

How reproducible:
everytime

Steps to Reproduce:
1. Create a volume 
2. Create a snapshot of that volume
3.

Actual results:
All the created snapshots are in the state of error. 
The deleted snapshots are in the state of error-deleting.

Expected results:
The snapshot are available and the been deleted successfully.

Additional info:

Comment 1 Eric Harney 2013-11-19 15:11:26 UTC
Related to permissions of GlusterFS share -- this is being handled in bug 1016798.

*** This bug has been marked as a duplicate of bug 1016798 ***