Bug 987773 - HAProxy instance could be scaled up to more than max number defined in manifest.yml
Summary: HAProxy instance could be scaled up to more than max number defined in manife...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-24 07:02 UTC by Jianwei Hou
Modified: 2015-05-15 00:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-07 22:56:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jianwei Hou 2013-07-24 07:02:51 UTC
Description of problem:
Edit manifest.yml of haproxy, set the value of max to 2. Then create a scalable application and scale it up 7 times. Check each gear, and found 3 gears have haproxy added, which exceeds to be greater than the value of "max"

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

How reproducible:
Always

Steps to Reproduce:
1. Edit /var/lib/openshift/.cartridge_repository/redhat-haproxy/0.0.3/metadata/manifest.yml, update with following:
    Scaling:
      Min: 1
      Max: 2
      Multiplier: 2
2. Clear broker cache and restart broker
3. Create a scalable application, scale it up 7 times
rhc app create php1s php-5.3 -s
rhc cartridge-scale php-5.3 -a php1s --min 7 --max -1
4. Check whether haproxy got created under expected gears

Actual results:
After step 4:
haproxy is created under 1st, 3rd and 5th gear, there are in total 3 gears associated with haproxy.

Expected results:
Should have 2 gears with haproxy, which is set be the value of "Max"

Additional info:

Comment 1 Rajat Chopra 2013-07-24 17:18:01 UTC
Fixed in pull request : https://github.com/openshift/origin-server/pull/3154

Comment 2 Jianwei Hou 2013-07-26 02:17:39 UTC
Tested on devenv_3562, still reproduced this issue, still got one more haproxy gear

Here is the manifest.yml of haproxy
    Scaling:
      Min: 1
      Max: 2
      Multiplier: 2

Here is the app info in mongo
"group_instances" : [
		{
			"_id" : ObjectId("51f1d77d6d0846283e00000c"),
			"gears" : [
				{
					"_id" : ObjectId("51f1d77c6d0846283e000001"),
					"app_dns" : true,
					"host_singletons" : true,
					"name" : "php1s",
					"quarantined" : false,
					"server_identity" : "ip-10-236-151-86",
					"sparse_carts" : [
						ObjectId("51f1d78c6d0846283e00001c")
					],
					"uid" : null,
					"uuid" : "51f1d77c6d084615ad000001"
				},
				{
					"_id" : ObjectId("51f1d7f56d0846283e000065"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "fac8d82af59611e29f4522000aec9756",
					"quarantined" : false,
					"server_identity" : "ip-10-236-151-86",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "fac8d82af59611e29f4522000aec9756"
				},
				{
					"_id" : ObjectId("51f1d7f56d0846283e000066"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "fae30df8f59611e29f4522000aec9756",
					"quarantined" : false,
					"server_identity" : "ip-10-236-151-86",
					"sparse_carts" : [
						ObjectId("51f1d78c6d0846283e00001c")
					],
					"uid" : null,
					"uuid" : "fae30df8f59611e29f4522000aec9756"
				},
				{
					"_id" : ObjectId("51f1d7f56d0846283e000067"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "fae6128cf59611e29f4522000aec9756",
					"quarantined" : false,
					"server_identity" : "ip-10-236-151-86",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "fae6128cf59611e29f4522000aec9756"
				},
				{
					"_id" : ObjectId("51f1d7f56d0846283e000068"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "51f1d7f56d084615ad000004",
					"quarantined" : false,
					"server_identity" : "ip-10-236-151-86",
					"sparse_carts" : [
						ObjectId("51f1d78c6d0846283e00001c")
					],
					"uid" : null,
					"uuid" : "51f1d7f56d084615ad000004"
				},
				{
					"_id" : ObjectId("51f1d7f56d0846283e000069"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "972113199135732225015808",
					"quarantined" : false,
					"server_identity" : "ip-10-236-151-86",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "972113199135732225015808"
				},
				{
					"_id" : ObjectId("51f1d7f56d0846283e00006a"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "407885918745554298339328",
					"quarantined" : false,
					"server_identity" : "ip-10-236-151-86",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "407885918745554298339328"
				}
			]
		}
	],

Here is the gear details
[root@ip-10-236-151-86 openshift]# ls 51f1d77c6d084615ad000001
app-root  git  haproxy  php
[root@ip-10-236-151-86 openshift]# ls fac8d82af59611e29f4522000aec9756
app-root  git  php
[root@ip-10-236-151-86 openshift]# ls fae30df8f59611e29f4522000aec9756
app-root  git  haproxy  php
[root@ip-10-236-151-86 openshift]# ls fae6128cf59611e29f4522000aec9756
app-root  git  php
[root@ip-10-236-151-86 openshift]# ls 51f1d7f56d084615ad000004
app-root  git  haproxy  php
[root@ip-10-236-151-86 openshift]# ls 972113199135732225015808
app-root  git  php
[root@ip-10-236-151-86 openshift]# ls 407885918745554298339328
app-root  git  php

Comment 3 Jianwei Hou 2013-07-29 10:25:55 UTC
Teseted on devenv_3574, this bug should be fixed now, following comment 2, now the haproxy is created every 2nd gear and in total 2 gears. This bug can be verified once it's on_qa

"group_instances" : [
		{
			"_id" : ObjectId("51f63d904fa22cd16e00000c"),
			"gears" : [
				{
					"_id" : ObjectId("51f63d904fa22cd16e000001"),
					"app_dns" : true,
					"host_singletons" : true,
					"name" : "php1s",
					"quarantined" : false,
					"server_identity" : "ip-10-139-36-104",
					"sparse_carts" : [
						ObjectId("51f63d9f4fa22cd16e00001c")
					],
					"uid" : null,
					"uuid" : "51f63d904fa22c42fb000001"
				},
				{
					"_id" : ObjectId("51f63eb74fa22cd16e000063"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "94738596f83611e28cc722000a8b2468",
					"quarantined" : false,
					"server_identity" : "ip-10-139-36-104",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "94738596f83611e28cc722000a8b2468"
				},
				{
					"_id" : ObjectId("51f63eb74fa22cd16e000064"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "94936fdcf83611e28cc722000a8b2468",
					"quarantined" : false,
					"server_identity" : "ip-10-139-36-104",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "94936fdcf83611e28cc722000a8b2468"
				},
				{
					"_id" : ObjectId("51f63eb74fa22cd16e000065"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "525633959247542856187904",
					"quarantined" : false,
					"server_identity" : "ip-10-139-36-104",
					"sparse_carts" : [
						ObjectId("51f63d9f4fa22cd16e00001c")
					],
					"uid" : null,
					"uuid" : "525633959247542856187904"
				},
				{
					"_id" : ObjectId("51f63eb74fa22cd16e000066"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "51f63eb74fa22c42fb000004",
					"quarantined" : false,
					"server_identity" : "ip-10-139-36-104",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "51f63eb74fa22c42fb000004"
				},
				{
					"_id" : ObjectId("51f63eb74fa22cd16e000067"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "51f63eb74fa22c42fb000005",
					"quarantined" : false,
					"server_identity" : "ip-10-139-36-104",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "51f63eb74fa22c42fb000005"
				},
				{
					"_id" : ObjectId("51f63eb74fa22cd16e000068"),
					"app_dns" : false,
					"host_singletons" : false,
					"name" : "51f63eb74fa22c42fb000006",
					"quarantined" : false,
					"server_identity" : "ip-10-139-36-104",
					"sparse_carts" : [ ],
					"uid" : null,
					"uuid" : "51f63eb74fa22c42fb000006"
				}
			]
		}
	],


[root@ip-10-139-36-104 openshift]# ls 51f63d904fa22c42fb000001
app-root  git  haproxy  php
[root@ip-10-139-36-104 openshift]# ls 94738596f83611e28cc722000a8b2468
app-root  git  php
[root@ip-10-139-36-104 openshift]# ls 94936fdcf83611e28cc722000a8b2468
app-root  git  php
[root@ip-10-139-36-104 openshift]# ls 525633959247542856187904
app-root  git  haproxy  php
[root@ip-10-139-36-104 openshift]# ls 51f63eb74fa22c42fb000004
app-root  git  php
[root@ip-10-139-36-104 openshift]# ls 51f63eb74fa22c42fb000005
app-root  git  php
[root@ip-10-139-36-104 openshift]# ls 51f63eb74fa22c42fb000006
app-root  git  php

Comment 4 Rajat Chopra 2013-07-29 19:08:48 UTC
Fixed with rev#0bc92a9d4b75514bf667eacdf356581b055d6b6c

Comment 5 Jianwei Hou 2013-07-30 02:10:21 UTC
This bug could be verified according to comment 3


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