Description of problem: List the gear groups of the app with RESTAPI, the result is taking region name as zone name. Version-Release number of selected component (if applicable): devenv_4932 How reproducible: Always Steps to Reproduce: 1. Create regions and zones, the region, zone and node info is as follows: {"_id"=>"53b3a911dc993e0ea1000001", "active_servers_size"=>2, "available_capacity"=>5998, "available_uids"=>"<5998 uids hidden>", "created_at"=>2014-07-02 06:39:13 UTC, "gear_size"=>"small", "max_capacity"=>6000, "max_uid"=>6999, "name"=>"test", "platform"=>"linux", "servers"=> [{"_id"=>"53b3eac3349fb2aff3000001", "active"=>true, "name"=>"ip-10-231-164-224", "region_id"=>"53b3ea61e87db106ec000001", "region_name"=>"region_1", "unresponsive"=>false, "zone_id"=>"53b3ea8cc62d3e424a000001", "zone_name"=>"zone_1"}, {"_id"=>"53b3eb86225b06d704000001", "active"=>true, "name"=>"ip-10-203-169-242", "unresponsive"=>false, "region_name"=>"region_2", "region_id"=>"53b3eaf35523d76d28000001", "zone_name"=>"zone_2", "zone_id"=>"53b3eb1b8a64363d64000001"}], "updated_at"=>2014-07-02 06:39:13 UTC, "uuid"=>"53b3a910dc993e0001000001"} 2. Create an application with region curl -s -k -H 'Content-Type: Application/json' --user jhou:xxx https://ec2-54-196-70-231.compute-1.amazonaws.com/broker/rest/domains/jhou/applications/ -X POST -d '{"name":"php1s", "cartridge":"php-5.3", "scale":"true", "region":"region_1"}' 3. Show gear groups of the app: curl -k -H 'Content-Type: Application/json' --user jhou:xxx https://ec2-54-196-70-231.compute-1.amazonaws.com/broker/rest/domains/jhou/applications/php1s/gear_groups Actual results: After step 3: The value of zone is incorrect, should be zone_1 instead of region_1 "gears": [ { "id": "53b3f3ac209dc52e83000001", "state": "started", "ssh_url": "ssh://53b3f3ac209dc52e83000001.rhcloud.com", "region": "region_1", "zone": "region_1" } ], Expected results: The value of zone should be zone_1 instead of region_1 Additional info:
Fixed in https://github.com/openshift/li/pull/2733
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/e29b2f9cd8637c4953ed8e2efb76b7139ac86b5f Bug 1115321 - Fix zone name in gear_groups rest api responsew
Verified on devenv_4940, this not works properly "data": [ { "additional_gear_storage": 0, "base_gear_storage": 1, "cartridges": [ { "name": "diy-0.1", "display_name": "Do-It-Yourself 0.1", "tags": [ "web_framework", "experimental" ] } ], "gear_profile": "small", "gears": [ { "id": "53ba45187d67f9d4c800001f", "state": "started", "ssh_url": "ssh://53ba45187d67f9d4c800001f.rhcloud.com", "region": "region_1", "zone": "zone_1" } ], "id": "53ba45187d67f9d4c8000021", "name": "53ba45187d67f9d4c8000021", "scales_from": 1, "scales_to": 1 } ],