GlusterFS: cloned volume has incorrect permissions

Bug #1254768 reported by Dafna Ron on 2013-11-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
Eric Harney
Havana
High
Eric Harney

Bug Description

I tried to extend a cloned volume and failed on permissions issues.
working with glusterfs (so might be related to gluster)

[root@XXXXXX ~(keystone_admin)]# cinder create 5 --source-volid d6b190a3-a2a3-4b24-82c2-7c9db520d32c --display-name one_clone
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2013-11-25T15:20:46.503042 |
| display_description | None |
| display_name | one_clone |
| id | f49b4e6c-ae6d-41e4-8161-7dc8ffb2f4e1 |
| metadata | {} |
| size | 5 |
| snapshot_id | None |
| source_volid | d6b190a3-a2a3-4b24-82c2-7c9db520d32c |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+
[root@xxxxxxx ~(keystone_admin)]# cinder list
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+
| 128681f1-8af2-44fc-bcd6-e3075687f67a | available | vol1 | 12 | None | true | |
| 188d5e9f-7bb3-4e4a-95e9-6ba964f5a52a | available | new8 | 10 | None | false | |
| 292e6a93-922f-4370-806a-33fbf1ef48c7 | available | vol5 | 9 | None | false | |
| 49088941-73f8-48a4-a906-dc7bf024f0ea | available | new3 | 10 | None | true | |
| 4ee66206-1ce4-442c-8dfb-d7f2d50d32f1 | available | upload1 | 10 | None | false | |
| 684bdfe8-1f73-405b-ad71-d8c2b67af8de | available | upload | 10 | None | false | |
| 79f6dbb3-4897-427e-9ad6-7acc21e1d12b | available | baba1 | 10 | None | true | |
| 7e3df44e-14e1-4a92-b612-b0dd7731a4e2 | available | new4 | 10 | None | true | |
| 82045366-538e-41d5-8a7f-632e0c8e3550 | available | new2 | 10 | None | true | |
| 928dc8d9-9658-4df0-93a1-20a1bd245f4f | available | new7 | 10 | None | false | |
| a142d020-1fec-4b39-967c-c171696920a5 | available | vol7 | 10 | None | true | |
| b9e99855-dd4a-4268-a342-90312ff2adf8 | available | new5 | 10 | None | true | |
| bd2c6980-1f9b-4271-9675-0fcae037744f | available | new1 | 10 | None | true | |
| cc5405cb-5024-4215-ab2b-be80aa7f1ccf | available | baba2 | 10 | None | true | |
| d6b190a3-a2a3-4b24-82c2-7c9db520d32c | available | one | 5 | None | false | |
| dcc6f500-ac93-40c5-ab8e-fac5854daa31 | error_extending | ext | 7 | None | false | |
| df17e52b-c153-4d51-b4a0-9e53b8b02745 | available | baba | 10 | None | true | |
| e2fc5cc7-dca4-4470-a995-7ad92f85d283 | available | baba3 | 10 | None | true | |
| f49b4e6c-ae6d-41e4-8161-7dc8ffb2f4e1 | creating | one_clone | 5 | None | false | |
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+

[root@xxxxxxx ~(keystone_admin)]# cinder extend f49b4e6c-ae6d-41e4-8161-7dc8ffb2f4e1 6
[root@xxxxxxx ~(keystone_admin)]# cinder list
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+
| 128681f1-8af2-44fc-bcd6-e3075687f67a | available | vol1 | 12 | None | true | |
| 188d5e9f-7bb3-4e4a-95e9-6ba964f5a52a | available | new8 | 10 | None | false | |
| 292e6a93-922f-4370-806a-33fbf1ef48c7 | available | vol5 | 9 | None | false | |
| 49088941-73f8-48a4-a906-dc7bf024f0ea | available | new3 | 10 | None | true | |
| 4ee66206-1ce4-442c-8dfb-d7f2d50d32f1 | available | upload1 | 10 | None | false | |
| 684bdfe8-1f73-405b-ad71-d8c2b67af8de | available | upload | 10 | None | false | |
| 79f6dbb3-4897-427e-9ad6-7acc21e1d12b | available | baba1 | 10 | None | true | |
| 7e3df44e-14e1-4a92-b612-b0dd7731a4e2 | available | new4 | 10 | None | true | |
| 82045366-538e-41d5-8a7f-632e0c8e3550 | available | new2 | 10 | None | true | |
| 928dc8d9-9658-4df0-93a1-20a1bd245f4f | available | new7 | 10 | None | false | |
| a142d020-1fec-4b39-967c-c171696920a5 | available | vol7 | 10 | None | true | |
| b9e99855-dd4a-4268-a342-90312ff2adf8 | available | new5 | 10 | None | true | |
| bd2c6980-1f9b-4271-9675-0fcae037744f | available | new1 | 10 | None | true | |
| cc5405cb-5024-4215-ab2b-be80aa7f1ccf | available | baba2 | 10 | None | true | |
| d6b190a3-a2a3-4b24-82c2-7c9db520d32c | available | one | 5 | None | false | |
| dcc6f500-ac93-40c5-ab8e-fac5854daa31 | available | ext | 7 | None | false | |
| df17e52b-c153-4d51-b4a0-9e53b8b02745 | available | baba | 10 | None | true | |
| e2fc5cc7-dca4-4470-a995-7ad92f85d283 | available | baba3 | 10 | None | true | |
| f49b4e6c-ae6d-41e4-8161-7dc8ffb2f4e1 | error_extending | one_clone | 5 | None | false | |
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+

2013-11-25 17:39:19.850 14458 ERROR cinder.volume.manager [req-5e4650e5-eb6f-44a8-821e-39ace389d00e 24b77982be8049ee9cd5ad7bed913565 7eb59aa89e8944d098554ff6f5a4cf88] volume f49b4e6c-ae6d-41e4-8161-7dc8ffb2f4e1: Error trying to extend volume
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager Traceback (most recent call last):
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 875, in extend_volume
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager self.driver.extend_volume(volume, new_size)
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/glusterfs.py", line 927, in extend_volume
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager image_utils.resize_image(volume_path, size_gb)
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager File "/usr/lib/python2.6/site-packages/cinder/image/image_utils.py", line 204, in resize_image
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager utils.execute(*cmd, run_as_root=False)
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager File "/usr/lib/python2.6/site-packages/cinder/utils.py", line 142, in execute
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager return processutils.execute(*cmd, **kwargs)
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager File "/usr/lib/python2.6/site-packages/cinder/openstack/common/processutils.py", line 173, in execute
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager cmd=' '.join(cmd))
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager ProcessExecutionError: Unexpected error while running command.
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager Command: qemu-img resize /var/lib/cinder/mnt/92ce777f40909398918e29a4128dfce0/volume-f49b4e6c-ae6d-41e4-8161-7dc8ffb2f4e1 6G
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager Exit code: 1
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager Stdout: ''
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager Stderr: "Could not open '/var/lib/cinder/mnt/92ce777f40909398918e29a4128dfce0/volume-f49b4e6c-ae6d-41e4-8161-7dc8ffb2f4e1': Permission denied\n"
2013-11-25 17:39:19.850 14458 TRACE cinder.volume.manager
(END)

Eric Harney (eharney) on 2013-11-25
tags: added: drivers glusterfs
Changed in cinder:
assignee: nobody → Eric Harney (eharney)

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

Changed in cinder:
status: New → In Progress

Reviewed: https://review.openstack.org/58393
Committed: http://github.com/openstack/cinder/commit/9c816aa0cf20ff0200831f58d8f14efb5e9e288e
Submitter: Jenkins
Branch: master

commit 9c816aa0cf20ff0200831f58d8f14efb5e9e288e
Author: Eric Harney <email address hidden>
Date: Mon Nov 25 16:39:03 2013 -0500

    GlusterFS: Set correct permissions for volume file created via clone

    This is currently done when creating a new volume from scratch,
    but not when cloning a new volume.

    Closes-Bug: #1254768
    Change-Id: I8506dc0824bacdb6cc42b4cadd41c2cad3a74b5b

Changed in cinder:
status: In Progress → Fix Committed
Eric Harney (eharney) on 2013-11-26
tags: added: havana-backport-potential
Eric Harney (eharney) on 2013-11-27
summary: - fail to extend a cloned volume on permissions issues
+ GlusterFS: cloned volume has incorrect permissions
Thierry Carrez (ttx) on 2013-12-04
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Eric Harney (eharney) on 2013-12-04
Changed in cinder:
importance: Undecided → High

Reviewed: https://review.openstack.org/58821
Committed: http://github.com/openstack/cinder/commit/b408850cee1b64370321ee6103f2176956afeef3
Submitter: Jenkins
Branch: stable/havana

commit b408850cee1b64370321ee6103f2176956afeef3
Author: Eric Harney <email address hidden>
Date: Mon Nov 25 16:39:03 2013 -0500

    GlusterFS: Set correct permissions for volume file created via clone

    This is currently done when creating a new volume from scratch,
    but not when cloning a new volume.

    (cherry picked from commit 9c816aa0cf20ff0200831f58d8f14efb5e9e288e)
    Closes-Bug: #1254768
    Change-Id: I8506dc0824bacdb6cc42b4cadd41c2cad3a74b5b

tags: added: in-stable-havana
Alan Pevec (apevec) on 2013-12-09
tags: removed: havana-backport-potential in-stable-havana
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers