Bug 789081

Summary: should error out on duplicate instance names
Product: [Retired] CloudForms Cloud Engine Reporter: Dave Johnson <dajohnso>
Component: aeolus-configureAssignee: Mo Morsi <mmorsi>
Status: CLOSED WONTFIX QA Contact: wes hayutin <whayutin>
Severity: low Docs Contact:
Priority: low    
Version: 1.0.0CC: akarol, cpelland, deltacloud-maint, morazi, ssachdev
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-14 18:40:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dave Johnson 2012-02-09 17:55:04 UTC
Description of problem:
================================
running configure when you have duplicate instance names does not result in a error and thus over writes previous config.  We should probably be checking for this and erroring out on it


for example, rhevm_configure...
---
parameters:
  enable_https: true
  enable_security: false
  package_provider: rpm
classes:
  aeolus::conductor:
  aeolus::image-factory:
  aeolus::iwhd:
  aeolus::deltacloud::core:
  aeolus::profiles::rhevm:
    instances:
      default:
        nfs_server: server.com
        nfs_export: /home/blade27_export
        nfs_mount_point: /mnt/rhevm-nfs
        deltacloud_username: admin@internal
        deltacloud_password: password
        deltacloud_api: https://server.com:8443/api
        deltacloud_data_center: 4051216f-a778-488f-8ae4-5a2541b009ff
        push_timeout: 1800
      default:
        nfs_server: server.com
        nfs_export: /home/dl2x_expt
        nfs_mount_point: /mnt/rhevm-detroit
        deltacloud_username: admin@internal
        deltacloud_password: password
        deltacloud_api: https://server.com:8443/api
        deltacloud_data_center: f18d2159-a484-4450-95b7-e6ccb8738dcb
        push_timeout: 1800

Comment 1 Mo Morsi 2012-02-23 00:33:27 UTC
This can't be done given the nature of YAML and the current ruby implementation.

http://yaml.org/spec/1.2/spec.html#id2764044

From the document "The content of a mapping node is an unordered set of key: value node pairs, with the restriction that each of the keys is unique"

When the ruby yaml parser (which puppet depends on to parse these nodes) encounters duplicate keys, it will override the first node w/ the second.

Comment 2 Mike Orazi 2012-04-04 15:31:17 UTC
There is currently discussion on the list suggesting that we'll open up an API to allow for creation of provider/provider accounts, remove the functionality, and advise that the API should be used.

Comment 3 Dave Johnson 2012-08-01 21:42:24 UTC
So based on comment 2, the APIs are currently being implemented...  letting this sit in v1.1.0 for now for future consideration

Comment 4 Mo Morsi 2013-08-14 18:40:11 UTC
aeolus is no longer in development