Bug 716304 - Launching deployment causes error: "invalid attribute name 'ami-id'"
Summary: Launching deployment causes error: "invalid attribute name 'ami-id'"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 0.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Angus Thomas
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-23 21:59 UTC by Richard Su
Modified: 2011-12-08 14:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-19 15:18:34 UTC


Attachments (Terms of Use)

Description Richard Su 2011-06-23 21:59:19 UTC
Description of problem:
Unable to launch a deployment for either RHEV-M or ec2.

Scott says ruby chokes on the dash in 'ami-id'. The back history is that although the ami-id attribute is no longer used in conductor, it is still being used by iwhd and imagefactory to check progress of pushes, notably the auto push to RHEV-M.

Scott suggests some possible solutions are 
1. sanitize attr names (i.e. replace '-' with something else) 
2. ignore names that have invalid chars for ruby attributes

Version-Release number of selected component (if applicable):
current conductor build (I'm on commit d5167e0b8c649687361854cdbd5f4da027458caf)
imagefactory-0.2.0_15_g14c6294-1.fc14.noarch or 0.2.2
iwhd-0.96.1.9e86-1.fc14.x86_64

How reproducible:

all the time

Steps to Reproduce:

1. Build and push a new ec2 (or RHEV-M) image with aeolus-image
2. Create a new deployment to use the image and launch it
  
Actual results:

Conductor UI shows: invalid attribute name `ami-id'

rails.log:

Processing DeploymentsController#create (for 10.3.113.69 at 2011-06-23 14:04:37) [POST]
  Parameters: {"commit"=>"Launch", "action"=>"create", "controller"=>"deployments", "deployment"=>{"name"=>"rhev2", "frontend_realm_id"=>"1", "deployable_xml
"=>"<deployable name=\"rhev2-deploy\">\r\n<description>rhev2</description>\r\n<assemblies>\r\n<assembly name=\"rhev2-assembly\" hwp=\"hwp-rhevm\">\r\n<image 
id=\"166ac2f7-571a-43f1-8611-b84783051d25\" build=\"30164f36-1be3-4592-8a58-4b7351eff7aa\">\r\n</image>\r\n</assembly>\r\n</assemblies>\r\n</deployable>", "p
ool_id"=>"1"}}
invalid attribute name `ami-id'
/usr/share/aeolus-conductor/app/models/target_image.rb:11:in `attr_accessor'
    /usr/share/aeolus-conductor/app/models/target_image.rb:11:in `send'
    /usr/share/aeolus-conductor/app/models/target_image.rb:11:in `initialize'
    /usr/share/aeolus-conductor/app/models/target_image.rb:5:in `each'
    /usr/share/aeolus-conductor/app/models/target_image.rb:5:in `initialize'
    /usr/share/aeolus-conductor/lib/warehouse_model.rb:53:in `new'
    /usr/share/aeolus-conductor/lib/warehouse_model.rb:53:in `all'
    /usr/share/aeolus-conductor/lib/warehouse_model.rb:52:in `map'
    /usr/share/aeolus-conductor/lib/warehouse_model.rb:52:in `all'
    /usr/share/aeolus-conductor/app/models/image_build.rb:30:in `target_images'
    /usr/share/aeolus-conductor/app/models/image_build.rb:34:in `provider_images'
    /usr/share/aeolus-conductor/app/util/condormatic.rb:44:in `match'
    /usr/share/aeolus-conductor/app/util/condormatic.rb:38:in `each'
    /usr/share/aeolus-conductor/app/util/condormatic.rb:38:in `match'
    /usr/share/aeolus-conductor/app/util/condormatic.rb:107:in `condormatic_instance_create'
    /usr/share/aeolus-conductor/app/models/deployment.rb:147:in `launch'
    /usr/share/aeolus-conductor/app/models/deployment.rb:124:in `each'
    /usr/share/aeolus-conductor/app/models/deployment.rb:124:in `launch'
    /usr/share/aeolus-conductor/app/controllers/deployments_controller.rb:57:in `create'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/mime_responds.rb:106:in `call'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/mime_responds.rb:106:in `respond_to'
    /usr/share/aeolus-conductor/app/controllers/deployments_controller.rb:55:in `create'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/base.rb:1331:in `send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/filters.rb:617:in `call_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/benchmark.rb:17:in `ms'


Expected results:

Deployment launches successfully.

Comment 1 Matt Wagner 2011-06-23 22:49:22 UTC
I have an ultra-simplistic patch on the list: https://fedorahosted.org/pipermail/aeolus-devel/2011-June/002604.html

It doesn't attempt to do full validation, because I don't know that the right approach is to throw away bad attribute names, but it's something to get us unblocked, at least.

Comment 2 Richard Su 2011-09-19 15:18:34 UTC
Fixed awhile ago. Closing.

Comment 3 wes hayutin 2011-12-08 14:09:47 UTC
perm close


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