Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1147960 - Templates not listed when creating VM
Templates not listed when creating VM
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: Documentation (Show other bugs)
3.5.0
Unspecified Unspecified
high Severity low
: ---
: 3.5.3
Assigned To: Julie
Lucy Bopf
virt
:
Depends On:
Blocks: 1234671
  Show dependency treegraph
 
Reported: 2014-09-30 08:07 EDT by Tomas Jamrisko
Modified: 2015-09-23 21:38 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-23 21:38:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Jamrisko 2014-09-30 08:07:16 EDT
Description of problem:
Templates don't get listed in the New VM dialog window unless the user already has an existing VM created from a template.

The user is a member of a group with "PowerUserRole" permissions

Version-Release number of selected component (if applicable):
Version 3.5.0-0.13.beta (vt4)

How reproducible:
Always

Steps to Reproduce:
1. Import a few templates
2. Make sure the user has correct permissions
3. Connect as the user into user portal
4. Try creating a VM from one of the imported templates

Actual results:
No templates visible

Expected results:
The templates are listed

Additional info:
A template gets listed for a user after being used for creating a VM adding the user as manager.
Comment 1 Michal Skrivanek 2014-10-30 11:49:24 EDT
final decision needs to be made, for now won't make 3.5 GA
Comment 2 Omer Frenkel 2014-11-10 08:36:27 EST
in short, description of the problem:
PowerUserRole is used to allow users to create vms, therefore it is given on cluster/data-center.
since we give this to users, and not to admins, we don't want them to see all object (like vms/templates/pools) that belong to this cluster/dc by default, so PowerUserRole on DC is good for creating vms in that dc, but it doesn't allow seeing other vms/templates, this is by design.
so if we want this users also to see templates, another 'viewing' permission is needed, like user_role on that dc.
Comment 3 Michal Skrivanek 2014-11-12 04:25:03 EST
Can you please double check the documentation is clear? We get a lot of confused people so maybe it needs to be stressed out a bit more
Comment 5 Tomas Jamrisko 2014-11-12 05:16:19 EST
(In reply to Omer Frenkel from comment #2)
> in short, description of the problem:
> PowerUserRole is used to allow users to create vms, therefore it is given on
> cluster/data-center.
> since we give this to users, and not to admins, we don't want them to see
> all object (like vms/templates/pools) that belong to this cluster/dc by
> default, so PowerUserRole on DC is good for creating vms in that dc, but it
> doesn't allow seeing other vms/templates, this is by design.
> so if we want this users also to see templates, another 'viewing' permission
> is needed, like user_role on that dc.

Tried adding UserRole to the DC as you suggested. It does not do what's expected. Yes, it shows templates, but also grants the user access to all vms in the dc.

Permissions related to templates only seem to be: TemplateOwner, TemplateAdmin, TemplateCreator.

What combination of permissions allows a user to create vms from templates in dc, without giving him any control over creating/maintaining them and also giving him access exclusively to his vms? Because as of now I have to manually add UserRole to the template, even though PowerUserRole on the template is already inherited by System.

This appears to be a bug to me.
Comment 6 Julie 2014-11-18 02:50:41 EST
Can the user portal team assess if this is a bug? There has been more comments from the bug reporter. If this bug has documentation impact, be specific on what needs to be updated. Documentation can be improved in a more effective way if the engineering team is familiar with the documentation and can tell us what exactly is not clear. Please need_info me if this bug indeed had documentation impact and I can clone the bug.

Many thanks,
Julie
Comment 7 Omer Frenkel 2014-12-02 10:25:18 EST
it was expected that the user will be able to see all the vms in the dc, this is what user-role allow.
unfortunately, there is no general way to allow user see all templates but not to see vms. also there is no way to have a "view only" permission.. 
instead, i can suggest giving permission with UserTemplateBasedVm on the templates you want the user to see (or to everyone, so its public), or you can make templates 'public' when creating the template..

let me know if this helps better
Comment 8 Tomas Jamrisko 2014-12-02 11:14:34 EST
Should have mentioned this concerns mostly import of templates instead of creation... (my bad, sorry). 

The thing is, we had a bunch of templates, that were stored on a specific storage, which was used for import/export. The templates were created by an earlier version of RHEVM and they were visible to all users (preconfigured systems). Importing these templates no longer results in them being immediately visible to the intended user (adding UserTemplateBasedVm in 3.5?).

So, if this is really working as intended the only thing required is documentation.
Comment 9 Michal Skrivanek 2014-12-18 06:17:45 EST
(In reply to Tomas Jamrisko from comment #8)
> So, if this is really working as intended the only thing required is
> documentation.

anything specific you want to mention? I'm a bit confused here:)
Comment 10 Tomas Jamrisko 2015-01-13 08:26:00 EST
Sorry for the delay, haven't been in the office for a while... 

Anything specific? -- that comment was written when it seemed it worked as expected. Which it kinda does. At least it works perfectly fine for newly created templates. The issue I have is with templates that were exported to a domain by an older version (not sure about which one) and later imported by 3.5. These old imported templates have their permissions messed up and it results in the described behaviour.
Comment 11 Michal Skrivanek 2015-01-14 07:02:22 EST
can you specify versions so we can check?
if it is a problem of importing templates exported from previous RHEV versions we may have something to fix
Comment 12 Tomas Jamrisko 2015-01-14 11:28:17 EST
I believe the templates were exported by RHEV3.2, and the issue has not been happening before we installed 3.5 (not sure about the exact build (definitely back in September) and tried now on rhevm-3.5.0-0.29, which behaves different from .22. It lists more templates, but still not all, at least not for some users.
Comment 13 Eyal Edri 2015-02-25 03:39:33 EST
3.5.1 is already full with bugs (over 80), and since none of these bugs were added as urgent for 3.5.1 release in the tracker bug, moving to 3.5.2
Comment 14 Eyal Edri 2015-04-28 07:23:20 EDT
moving to 3.5.4 due to capacity planning for 3.5.3.
if you believe this should remain in 3.5.3, please sync with pm/dev/qe and a full triple ack for it. also - ensure priority is set accordingly to the bug status.
Comment 15 Omer Frenkel 2015-06-01 10:50:36 EDT
Documentation update needed (looking at [1]):
when importing vm or template, no permissions are set on the imported vm/template, user need to manually set the right permissions that suitable to the new setup in order to use the imported vm/template. (as clusters/datacentes/users might be (probably are) different from the source setup the vm/template had been exported from)

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Administration_Guide/sect-Exporting_and_Importing_Virtual_Machines_and_Templates.html

then, there is no fix needed here.
please note i opened 
Bug 1226968 - [RFE] Allow making templates public on import
to allow making template public during the import process instead this manual step for users that use public templates.
Comment 20 Lucy Bopf 2015-06-03 02:21:07 EDT
Reviewed in cs22765.

The content has been updated as requested. I made two minor changes in my QA pass. Updated revision numbers as appropriate.

Updated in production spec cs23027:

Exporting and Importing Virtual Machines and Templates[8771-760188]
Graphical Overview for Exporting and Importing Virtual Machines and Templates [7514-760175]
Exporting a Virtual Machine to the Export Domain [7515-760366]
Importing a Virtual Machine into the Destination Data Center [7516-760368]
Revision History [34613-760376]


Moving to VERIFIED.

Note You need to log in before you can comment on or make changes to this bug.