Bug 766884

Summary: exception being improperly caught from bad configs post
Product: [Retired] CloudForms Cloud Engine Reporter: Dan Radez <dradez>
Component: aeolus-configserverAssignee: Dan Radez <dradez>
Status: CLOSED CURRENTRELEASE QA Contact: dgao
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: akarol, deltacloud-maint, gblomqui
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-08-30 17:13:20 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 Dan Radez 2011-12-12 18:49:06 UTC
Description of problem:
When a bad config is posted to configserver ConfigServer::Model::InvalidInstanceConfigError is raised, but the code is trying to catch ConfigServer::InvalidInstanceConfigError

Instead of returning a 400 as the code suggests should happen, a stack is thrown.

Unit Test:
Config Server should return 400 from post /configs/:version/:uuid
Failure/Error: post '/configs/1/aFailUUID', {:data=>'Not Real Data'}
ConfigServer::Model::InvalidInstanceConfigError:

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

How reproducible:
this fails everytime I run the test

Steps to Reproduce:
1. post bad data to /configs/1/aFailUUID
2.
3.
  
Actual results:
stack

Expected results:
http 400

Additional info:

Comment 2 dgao 2012-01-18 23:24:22 UTC
  <instance-config bad_id='585500025950546337488934' bad_name='Test_Instance_1' open_secret='4arN1BIwBoLZyKLXBpnReSTqBO1dyZ7nZcwsye3KVBoNShpn'>
     <deployable name='' id='test_instance_uuid_1' />
     <services>
       <service name='proxy'>
         <executable url='http://www.aeolusproject.org/redmine/attachments/download/169/start_simple.sh' />
         <files>  
           <file url='http://example.com/path/to/proxy_conf_file_2' />
           <file url='http://example.com/path/to/proxy_conf_file_2' />
         </files> 
         <parameters>
           <parameter name='foo'>
             <value>bar</value>
           </parameter>
         </parameters>
       </service>
     </services>
   </instance-config> 


Receiving response: HTTP/1.1 400 Bad Request