Set default temporary volume directory in rbd driver to /tmp

Bug #1288240 reported by Rohit Karajgi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Medium
Unassigned

Bug Description

IF the volume_tmp_dir flag is not set in cinder.conf, the copy_image_to_volume operation fails
since this parameter defaults to None.

Cinder should use '/tmp' as the default or whatever value is set in the TMPDIR environment variable

The following error is seen while performing a copy_image_to_volume using rbd and volume_tmp_dir not set.

2014-03-05 15:25:15.191 17763 DEBUG cinder.volume.flows.utils [-] LinearFlow: volume_create_manager; f-149ef205-ffeb-4e33-9e37-f7ead15267e4; 6; 0; RUNNING has moved Runner: cinder.volume.flows.create_volume.NotifyVolumeActionTask;volume:create, create.start==1.0; r-a110fcbe-2d4a-4947-961d-72e317a7a9d8; 1.0 into state SUCCESS with result: None task_log_change /usr/lib/python2.7/dist-packages/cinder/volume/flows/utils.py:49
2014-03-05 15:25:15.191 17763 DEBUG cinder.volume.flows.utils [-] LinearFlow: volume_create_manager; f-149ef205-ffeb-4e33-9e37-f7ead15267e4; 6; 0; RUNNING has moved Runner: cinder.volume.flows.create_volume.CreateVolumeFromSpecTask;volume:create==1.0; r-1df5b7d3-86fe-4712-aa8c-d17d13fdd4b4; 1.0 into state STARTED with result: None task_log_change /usr/lib/python2.7/dist-packages/cinder/volume/flows/utils.py:49
2014-03-05 15:25:15.192 17763 INFO cinder.volume.flows.create_volume [-] Volume c3f71c4b-dd49-4b1d-a0a0-6e8191fa0a42: being created using CreateVolumeFromSpecTask._create_from_image with specification: {'status': u'creating', 'image_location': (None, None), 'volume_size': 10, 'volume_name': u'volume-c3f71c4b-dd49-4b1d-a0a0-6e8191fa0a42', 'image_id': u'17fced73-c666-41ec-9df6-00627a1db1f7', 'image_service': <cinder.image.glance.GlanceImageService object at 0x2c3d950>, 'image_meta': {'status': u'active', 'name': u'Ubuntu', 'deleted': False, 'container_format': u'bare', 'created_at': datetime.datetime(2014, 2, 24, 11, 33, 8, tzinfo=<iso8601.iso8601.Utc object at 0x2c21c10>), 'disk_format': u'qcow2', 'updated_at': datetime.datetime(2014, 2, 24, 11, 33, 13, tzinfo=<iso8601.iso8601.Utc object at 0x2c21c10>), 'id': u'17fced73-c666-41ec-9df6-00627a1db1f7', 'owner': u'6f2c922c645d4db89f0c089a4bdcb318', 'min_ram': 0, 'checksum': u'4157886ad6d31b772743e648925ab5e9', 'min_disk': 0, 'is_public': True, 'deleted_at': None, 'properties': {}, 'size': 255197184}}
2014-03-05 15:25:15.192 17763 DEBUG cinder.volume.flows.create_volume [-] Cloning c3f71c4b-dd49-4b1d-a0a0-6e8191fa0a42 from image 17fced73-c666-41ec-9df6-00627a1db1f7 at location (None, None) _create_from_image /usr/lib/python2.7/dist-packages/cinder/volume/flows/create_volume/__init__.py:1434
2014-03-05 15:25:15.193 17763 DEBUG cinder.volume.drivers.rbd [-] creating volume 'volume-c3f71c4b-dd49-4b1d-a0a0-6e8191fa0a42' create_volume /usr/lib/python2.7/dist-packages/cinder/volume/drivers/rbd.py:468
2014-03-05 15:25:15.312 17763 DEBUG cinder.volume.flows.create_volume [-] Attempting download of 17fced73-c666-41ec-9df6-00627a1db1f7 ((None, None)) to volume c3f71c4b-dd49-4b1d-a0a0-6e8191fa0a42 _copy_image_to_volume /usr/lib/python2.7/dist-packages/cinder/volume/flows/create_volume/__init__.py:1356
2014-03-05 15:25:15.316 17763 ERROR cinder.volume.flows.create_volume [-] Failed to copy image 17fced73-c666-41ec-9df6-00627a1db1f7 to volume: c3f71c4b-dd49-4b1d-a0a0-6e8191fa0a42, error: [Errno 13] Permission denied: 'False'
2014-03-05 15:25:15.317 17763 DEBUG cinder.volume.flows.utils [-] LinearFlow: volume_create_manager; f-149ef205-ffeb-4e33-9e37-f7ead15267e4; 6; 0; RUNNING has moved Runner: cinder.volume.flows.create_volume.CreateVolumeFromSpecTask;volume:create==1.0; r-1df5b7d3-86fe-4712-aa8c-d17d13fdd4b4; 1.0 into state FAILURE with result: None task_log_change /usr/lib/python2.7/dist-packages/cinder/volume/flows/utils.py:49
2014-03-05 15:25:15.317 17763 DEBUG cinder.volume.flows.utils [-] LinearFlow: volume_create_manager; f-149ef205-ffeb-4e33-9e37-f7ead15267e4; 6; 0; REVERTING has moved into state REVERTING from state RUNNING flow_log_change /usr/lib/python2.7/dist-packages/cinder/volume/flows/utils.py:41
2014-03-05 15:25:15.317 17763 WARNING cinder.taskflow.utils [-] Activating 5 rollbacks due to <cinder.taskflow.utils.FlowFailure object at 0x2c2a290>.
2014-03-05 15:25:15.318 17763 DEBUG cinder.taskflow.utils [-] Calling rollback 1: cinder.volume.flows.create_volume.CreateVolumeFromSpecTask;volume:create==1.0 rollback /usr/lib/python2.7/dist-packages/cinder/taskflow/utils.py:351
2014-03-05 15:25:15.318 17763 DEBUG cinder.taskflow.utils [-] Calling rollback 2: cinder.volume.flows.create_volume.NotifyVolumeActionTask;volume:create, create.start==1.0 rollback /usr/lib/python2.7/dist-packages/cinder/taskflow/utils.py:351
2014-03-05 15:25:15.318 17763 DEBUG cinder.taskflow.utils [-] Calling rollback 3: cinder.volume.flows.create_volume.ExtractVolumeSpecTask;volume:create==1.0 rollback /usr/lib/python2.7/dist-packages/cinder/taskflow/utils.py:351
2014-03-05 15:25:15.319 17763 DEBUG cinder.taskflow.utils [-] Calling rollback 4: cinder.volume.flows.create_volume.OnFailureChangeStatusTask;volume:create==1.0 rollback /usr/lib/python2.7/dist-packages/cinder/taskflow/utils.py:351
2014-03-05 15:25:15.319 17763 DEBUG cinder.volume.flows.create_volume [-] Updating volume: c3f71c4b-dd49-4b1d-a0a0-6e8191fa0a42 with {'status': 'error'} due to: Failed to copy image to volume: [Errno 13] Permission denied: 'False' _error_out_volume /usr/lib/python2.7/dist-packages/cinder/volume/flows/create_volume/__init__.py:142
2014-03-05 15:25:15.363 17763 ERROR cinder.volume.flows.create_volume [-] Volume c3f71c4b-dd49-4b1d-a0a0-6e8191fa0a42: create failed
2014-03-05 15:25:15.364 17763 ERROR cinder.volume.flows.create_volume [-] Unexpected build error:
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume Traceback (most recent call last):
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume File "/usr/lib/python2.7/dist-packages/cinder/taskflow/patterns/linear_flow.py", line 172, in run_it
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume result = runner(context, *args, **kwargs)
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume File "/usr/lib/python2.7/dist-packages/cinder/taskflow/utils.py", line 260, in __call__
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume self.result = self.task(*args, **kwargs)
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/create_volume/__init__.py", line 1499, in __call__
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume **volume_spec)
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/create_volume/__init__.py", line 1462, in _create_from_image
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume image_id, image_location, image_service)
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/create_volume/__init__.py", line 1376, in _copy_image_to_volume
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume raise exception.ImageCopyFailure(reason=ex)
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume ImageCopyFailure: Failed to copy image to volume: [Errno 13] Permission denied: 'False'
2014-03-05 15:25:15.364 17763 TRACE cinder.volume.flows.create_volume

Rohit Karajgi (rohitk)
Changed in cinder:
assignee: nobody → Rohit Karajgi (rohitk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/79292

Changed in cinder:
status: New → In Progress
Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → High
milestone: none → icehouse-rc1
Changed in cinder:
importance: High → Medium
milestone: icehouse-rc1 → next
Revision history for this message
Ray Chen (chenrano2002) wrote :

set 'volume_tmp_dir' default to 'tmp', that should fix this issue

Revision history for this message
Eric Harney (eharney) wrote :

Does not appear to be in progress.

Changed in cinder:
assignee: Rohit Karajgi (rohitk) → nobody
status: In Progress → New
Revision history for this message
Eric Harney (eharney) wrote :

I've proposed a different fix in bug 1375490, which is that RBD should be using image_conversion_dir for this. Leaving this bug open for comment for now.

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

There doesn't appear to be any objections to the fix in 1375490. Eric, should this issue be closed?

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

Agree with Eric, it is similar to bug 1375490 and no need to fix both of them

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Cleanup

Closing stale bug. If this is still an issue please reopen.

Changed in cinder:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.