Description of problem: Launch a single node with default config, the node profile is small. [root@ip-10-144-74-67 ~]# mco facts node_profile Report for fact: node_profile small found 1 times Finished processing 1 / 1 hosts in 212.54 ms Try to create medium size gear on this node via CLI will get successful. And check the app info the gear size is "medium". "app_url": "http://php2-bmengdev5.dev.rhcloud.com/", "creation_time": "2012-07-04T05:30:30-04:00", "domain_id": "bmengdev5", "embedded": {}, "framework": "php-5.3", "gear_count": 1, "gear_profile": "medium", Check the app disk and memory info via cgsnapshot and quota, it is actually small sepcification. #cgsnapshot memory { memory.memsw.failcnt="0"; memory.memsw.limit_in_bytes="641728512"; memory.memsw.max_usage_in_bytes="10756096"; memory.move_charge_at_immigrate="0"; memory.swappiness="60"; memory.use_hierarchy="0"; memory.failcnt="0"; memory.soft_limit_in_bytes="9223372036854775807"; memory.limit_in_bytes="536870912"; memory.max_usage_in_bytes="10756096"; } [php2-bmengdev5.dev.rhcloud.com ~]\> quota -s Disk quotas for user 2e112557fd9440539cb1266d28314c71 (uid 537): Filesystem blocks quota limit grace files quota limit grace /dev/xvde2 628 0 1024M 159 0 40000 Version-Release number of selected component (if applicable): devenv_1874 How reproducible: always Steps to Reproduce: 1.Since the bug 837574, it should add the medium gear size to user to create medium gear on node. #rhc-admin-ctl-user -l bmeng --addgearsize medium 2.Create medium size gear on small node #rhc app create -a php2 -t php-5.3 -g medium 3. Actual results: App creation successfully, but the app specification actually is small. Expected results: User should not be allowed to create medium size gear on a small node. Error message like ‘No node available’ should come out. Additional info:
First - the gearchanger options in Rails configuration should be corrected before testing this bug. File-> /var/www/stickshift/broker/config/environments/test.rb (or development.rb) Option-> :node_profile_enabled should be set to "true" Once the above is done, the fix can be tested. pull request#192 in crankcase
fixed with crankcase rev#6d745d4da971c42e472530691872e350717fb9aa
Verified it on devenv_1879, set node_profile_enable = true in development.rb Add medium gear size for the user And try to create medium size app on small node , It will return: Unable to create gear on node