Re: [ovirt-users] User permission error in add new disk using API

On 03/31/2016 07:00 AM, Vishal Panchal wrote:
I send the following request:
{"name":"vishaltestdisk","storage_domains":{"storage_domain":[{"name":"s1eu"}]},"provisioned_size":"512000000","size":"512000000","interface":"virtio","format":"cow","sparse":true,"bootable":true}
That request is syntactically correct. But as explained by Ondra Machacek there is a bug that makes this fail: assign DiskProfileUser role to Everyone group to newly added storagedomain's profile https://bugzilla.redhat.com/1209505 That can affect you if you are trying to perform this operation with an user that doesn't have the permission. Are you? Or are you using the adminstrator? Ondra, do you know if there is a workaround for this? Can the permission be added manually? How?
On Wed, Mar 30, 2016 at 8:04 PM, Juan Hernández <jhernand@redhat.com <mailto:jhernand@redhat.com>> wrote:
On 03/30/2016 01:31 PM, Vishal Panchal wrote: > Hello, > > I got following error during add new disk using API but on other side > from admin panel I can create new disk. > > *Error :* > Cannot add Virtual Machine Disk. The user doesn't have permissions to > attach Disk Profile to the Disk.* > *
What version of the engine? How are you creating the disk? Can you share the request that you are sending to the server?
-- Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3ºD, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.

On 03/31/2016 03:38 PM, Juan Hernández wrote:
On 03/31/2016 07:00 AM, Vishal Panchal wrote:
I send the following request:
{"name":"vishaltestdisk","storage_domains":{"storage_domain":[{"name":"s1eu"}]},"provisioned_size":"512000000","size":"512000000","interface":"virtio","format":"cow","sparse":true,"bootable":true}
That request is syntactically correct. But as explained by Ondra Machacek there is a bug that makes this fail:
assign DiskProfileUser role to Everyone group to newly added storagedomain's profile https://bugzilla.redhat.com/1209505
That can affect you if you are trying to perform this operation with an user that doesn't have the permission. Are you? Or are you using the adminstrator?
Ondra, do you know if there is a workaround for this? Can the permission be added manually? How?
Yes, the permission can be added manually. You have to do these steps to fix it: 1) In webadmin - select 'storage domains' tab 2) Choose storage domain which fail for you 3) Select 'Disk Profiles' subtab 4) Click 'add' in permission window 5) Select 'Everyone' radio button. 6) Click OK.
On Wed, Mar 30, 2016 at 8:04 PM, Juan Hernández <jhernand@redhat.com <mailto:jhernand@redhat.com>> wrote:
On 03/30/2016 01:31 PM, Vishal Panchal wrote: > Hello, > > I got following error during add new disk using API but on other side > from admin panel I can create new disk. > > *Error :* > Cannot add Virtual Machine Disk. The user doesn't have permissions to > attach Disk Profile to the Disk.* > *
What version of the engine? How are you creating the disk? Can you share the request that you are sending to the server?
participants (2)
-
Juan Hernández
-
Ondra Machacek