Bug 807236

Summary: node profile is not respected.
Product: OKD Reporter: Johnny Liu <jialiu>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 1.xCC: mpatel
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-13 18:32:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Johnny Liu 2012-03-27 10:44:02 UTC
Description of problem:
User can create a "medium" app on a "small" profile, it should not.

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

How reproducible:
Always

Steps to Reproduce:
1. Log into instance, set user to be vip using rhc-admin-user-vip.
2. Create an app with medium gear size
3.
  
Actual results:
App is created successfully.

Expected results:
App should be not created with error message - "No nodes available".

Additional info:
# mc-facts node_profile
Report for fact: node_profile

        small                                   found 1 times


Log message:
Started POST "/broker/cartridge" for 203.114.244.88 at Tue Mar 27 06:39:58 -0400 2012
  Processing by LegacyBrokerController#cartridge_post as 
  Parameters: {"json_data"=>"{\"cartridge\":\"php-5.3\",\"api\":\"1.1.3\",\"action\":\"configure\",\"node_profile\":\"medium\",\"app_name\":\"myapp\",\"rhlogin\":\"jialiu\"}", "password"=>"[FILTERED]"}
User-Agent = ''
Adding user jialiu...inside login
MongoDataStore.find(CloudUser, jialiu, jialiu)

MongoDataStore.find(CloudUser, jialiu, jialiu)

Checking to see if application name is black listed
Creating application myapp
Auto-merging group @@app/cart-php-5.3 into @@app
Creating gears
DEBUG: rpc_get_fact: fact=active_capacity
DEBUG: rpc_exec: rpc_client=#<MCollective::RPC::Client:0x7fead5a2c980>
Next server: ip-10-224-115-96 active capacity: 0.0
Current server: ip-10-224-115-96 active capacity: 0.0
CURRENT SERVER: ip-10-224-115-96
DEBUG: find_available_impl: current_server: ip-10-224-115-96: 0.0
DEBUG: rpc_exec_direct: rpc_client=#<MCollective::RPC::Client:0x7fead5eedc08>

Comment 1 Rajat Chopra 2012-03-28 00:45:59 UTC
fixed with rev#c31c5d6bb5558d46152ae40fca7082d2ca739d8a

Comment 2 Rajat Chopra 2012-03-28 03:11:47 UTC
This fix did not make it devenv_1677. It will be there in the next valid build.

Comment 3 Johnny Liu 2012-03-29 02:47:01 UTC
Verified this bug with devenv_1679, and PASS.

$ rhc-create-app -a myapp -t ruby-1.8 -p xx -g medium
Creating application: myapp in jialiu
Problem reported from server. Response code was 500.
Re-run with -d for more information.

RESULT:
No nodes available.  If the problem persists please contact Red Hat support.