Bug 770912

Summary: Unique Name validation required for images
Product: [Retired] CloudForms Cloud Engine Reporter: Shveta <ssachdev>
Component: aeolus-conductorAssignee: wes hayutin <whayutin>
Status: CLOSED NOTABUG QA Contact: wes hayutin <whayutin>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: akarol, deltacloud-maint, jprovazn, ssachdev
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-16 13:54:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 744194    
Attachments:
Description Flags
name
none
same_name none

Description Shveta 2011-12-30 05:55:03 UTC
Created attachment 550029 [details]
name

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Multiple images with same name can be created .
2. Shouldn't there be validation on image name to be unique ?
3. Name comes from template .

<template>
  <name>RHEL_westest01</name>
  <os>
    <name>RHEL-6</name>
    <version>1</version>
    <arch>x86_64</arch>
    <rootpw>dog8code</rootpw>
    <install type="url">
      <url>http://download.devel.redhat.com/released/RHEL-6-Server/6.1/x86_64/os/</url>
    </install>
  </os>
  <description>RHEL61 x86_64 </description>
</template>

If i use the same template again and again it creates multiple images with same name as in screenshot. 

4. We can use the "Name" field while creating image which is not mandatory 
and is of no use now .
  
Actual results:


Expected results:


Additional info:

rpm -qa|grep aeolus
aeolus-conductor-doc-0.8.0-0.20111222233342gitd98cb57.el6.noarch
rubygem-aeolus-image-0.3.0-0.20111222173411gitc13b654.el6.noarch
rubygem-aeolus-cli-0.3.0-0.20111222173356git3cd6277.el6.noarch
aeolus-conductor-0.8.0-0.20111222233342gitd98cb57.el6.noarch
aeolus-configure-2.5.0-0.20111222173430git17b704a.el6.noarch
aeolus-all-0.8.0-0.20111222233342gitd98cb57.el6.noarch
aeolus-conductor-daemons-0.8.0-0.20111222233342gitd98cb57.el6.noarch

Comment 1 Shveta 2011-12-30 05:55:36 UTC
Created attachment 550030 [details]
same_name

Comment 2 Jan Provaznik 2012-01-02 15:18:14 UTC
It's not simple to add unique name validation:
- image is saved only in warehouse, adding uniquness check means fetching&parsing of all images in warehouse ('name' is saved only in xml body, not as metadata
- image object can be created both by imagefactory or aeolus-image-rubygem lib (used by cli and UI), none of them checks uniqueness ATM

Comment 3 wes hayutin 2012-01-10 17:10:10 UTC
adding to ce-sprint-next

Comment 4 wes hayutin 2012-01-10 17:12:32 UTC
adding to ce-sprint-next

Comment 5 wes hayutin 2012-01-12 16:34:32 UTC
adding to ce-sprint

Comment 6 wes hayutin 2012-01-12 16:40:50 UTC
removing ce-sprint-next tracker

Comment 7 Angus Thomas 2012-01-13 13:32:29 UTC
Whilst it is possible to have identically named images, they're stll uniquely identifiable by the UUID, which is the handle by which they are referenced in deployable definitions etc.

Given the complexity of the underlying changes required to change current behaviour, as described in Jan's comment above, the current behaviour won't change in the scope of 1.0

Comment 8 wes hayutin 2012-01-16 13:54:12 UTC
ack.. 

You could check for unique template names for just the WEBUI.. but a user could still create a dupe via the cli.. pushing the check for uniqueness to warehouse..

which is a whole other ball of wax

Lets revisit this next release... closing this.. things will change too much I suspect to bother leaving it open