Bug 1071217

Summary: Misleading error message when user with ClusterAdmin role on cluster tries to add a disk to a VM without permissions on any storage domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Julio Entrena Perez <jentrena>
Component: ovirt-engineAssignee: Maor <mlipchuk>
Status: CLOSED ERRATA QA Contact: Ori Gofen <ogofen>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.0CC: acanan, amureini, flo_bugzilla, gklein, iheim, lpeer, mlipchuk, ogofen, rbalakri, Rhev-m-bugs, scohen, tnisan, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: All   
OS: Linux   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_alpha1.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 17:59:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1142923, 1156165    

Description Julio Entrena Perez 2014-02-28 10:09:16 UTC
Description of problem:
When a user with ClusterAdmin role at cluster level but no permissions on the storage domains tries to add a disk to a VM the following error message is displayed on the "Add Virtual Disk" dialogue:

"There are no active Storage Domains in the relevant Data Center"

That's false since:

- There are storage domains in the relevant datacenter and those are active.
- The reason user can't see/choose any storage domain is because he has no permissions on those.

Version-Release number of selected component (if applicable):
rhevm-backend-3.2.5-0.49.el6ev

How reproducible:
Always.

Steps to Reproduce:
1. Grant ClusterAdmin role to a user on a specific datacenter.
2. Login to webadmin portal as that user and try to add a disk to a guest in that cluster.
3.

Actual results:
User is presented with following error message:
"There are no active Storage Domains in the relevant Data-Center."

Expected results:
User is presented with an error message similar to the following one:
"Insufficient privileges. You need to have [role] permissions in order to add new virtual disks"

Additional info:
    Datacenter
        /\
       /  \
      /    \
 Cluster  Storage
          domain

User has ClusterAdmin role on the cluster but no permissions on the storage domains.

webadmin portal only displays active and accessible storage domains to the user in the Add Virtual Disk dialogue.

webadmin portal wrongly assumes that the reason for no storage domains being available is that they are not active.

Comment 1 Maor 2014-03-18 12:38:02 UTC
If we will have two different messages then the user can be aware when there are active storage domains in the Data Center and when there not any active storage domains.

I suggest to rephrase the message to also indicate permissions, as so:
"There are no authorized active Storage Domains in the relevant Data-Center."

Comment 2 Maor 2014-03-19 12:12:20 UTC
Eventually changed the message to be:
There are no active Storage Domains that you have permissions to create a disk on in the relevant Data-Center.

Comment 4 Ori Gofen 2014-08-07 13:43:41 UTC
User with cluster permissions has by default the ability to add disks to vm, can you please provide more detailed steps to reproduce, because right now,the result of the current one is successful

Comment 5 Maor 2014-08-09 18:04:16 UTC
Have you tried to add a new user and assign it *only* the ClusterAdmin role?

Comment 6 Ori Gofen 2014-08-10 12:48:41 UTC
yep,Ok now the error message is: 

"There are no active Storage Domains that you have permissions to create a disk on in the relevant Data-Center."

verified on rc1

Comment 8 errata-xmlrpc 2015-02-11 17:59:07 UTC
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://rhn.redhat.com/errata/RHSA-2015-0158.html