Bug 833019 - Gear's 'size/profile' from the group is not changed when move a non-scalable app across districts of different profile
Gear's 'size/profile' from the group is not changed when move a non-scalable ...
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-06-18 08:03 EDT by Johnny Liu
Modified: 2015-05-14 21:58 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-25 14:26:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Johnny Liu 2012-06-18 08:03:41 EDT
Description of problem:
Acctually this is a known issue, the following is email discussion from Rajat

Changing the gear's size is supported by the code, though I have not personally tested this.
Changing districts will be smooth though.

The only disconnect I foresee is for scalable apps. The gear gets its 'size/profile' from the group that it belongs to. And while moving we change the gear's size, but we do not change the group's specification. So, if there is a scale-up/scale-down event, do not expect the new size to be remembered.

In email it mainly talk about the risk for scalable app, but for non-scalable app, this issue is also existing, so I open this bug for tracking it.

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

How reproducible:

Steps to Reproduce:
1. set up two distrcit, one is small, another is medium
2. create a non-scalable app of medium gear size
3. move this gear from medium district to small district.
Actual results:
Use rest api (gear_groups) to get gear size, it still is "medium".

Expected results:
Rest api should retrun "small".

Additional info:
Comment 1 Rajat Chopra 2012-06-18 14:17:22 EDT
Fixed with rev#b8f16b81b84fc756c338ec6e4ee257acc5e0805e in li.repo
Comment 2 Rony Gong 2012-06-19 02:57:23 EDT
This issue still exist on devenv_1857
Comment 3 Rajat Chopra 2012-06-19 10:24:56 EDT
Well, the gear's profile did change, but the app's profile did not. The behaviour is debatable. Soon, we will have nothing on the app saying its 'small'/'medium'. That REST call info should go away.

Anyhow, meanwhile, the required fix is in place. rev#bb4b082a5ed54337c806b3e94552a5a50aeea6b0
Comment 4 Johnny Liu 2012-06-20 04:00:52 EDT
Re-test this bug on devenv_1589, looks like still have some issues.

There are two endpoints that mentioned profile, one of them is fixed, but gear_groups endpoint is not fixed, still saying it is "small"

After move app from 'small' district to 'medium' district, run the following commands:

[jialiu@jialiu-laptop ~]$ rest_api_app phptest |grep profile
+ '[' X1 == X0 ']'
+ curl -k -X GET -H 'Accept: application/xml' --user jialiu@redhat.com:214214 https://ec2-23-22-247-24.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/phptest/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0      <gear-profile>medium</gear-profile>
100 10294    0 10294    0     0   5380      0 --:--:--  0:00:01 --:--:--  7722
+ set +x

[jialiu@jialiu-laptop ~]$ rest_api_app_resource phptest gear_groups|grep profile
+ curl -k -X GET -H 'Accept: application/xml' --user jialiu@redhat.com:214214 https://ec2-23-22-247-24.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/phptest/gear_groups
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   649    0   649    0     0    330      0 --:--:--  0:00:01 --:--:--   480
+ set +x
Comment 5 Rajat Chopra 2012-06-20 11:44:33 EDT
the other endpoint is also fixed now. li.repo rev#06bb60c09d6e2408a9f77735ef5eee75db697859
Comment 6 Rony Gong 2012-06-21 01:12:35 EDT
fixed on devenv_stg220

<?xml version="1.0" encoding="UTF-8"?>

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