Bug 789081 - should error out on duplicate instance names
Summary: should error out on duplicate instance names
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-configure
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
Assignee: Mo Morsi
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-09 17:55 UTC by Dave Johnson
Modified: 2013-08-14 18:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-14 18:40:11 UTC


Attachments (Terms of Use)

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


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