Add functionality to remove a specific scale gear under an application.

Solution In Progress - Updated -

Environment

  • Openshift Enterprise 2.0

Issue

  • Create one scaled app
rhc app create  -a jbossews -t jbossews-1.0 -s
  • Scale it up manually
rhc scale-cartridge jbossews -a jbossews 3
  • List out the urls
rhc app show jbossews --gears

DEBUG: Request GET https://micro.dmp.example.com/broker/rest/domains/svc/applications/jbossews/gear_groups
DEBUG:    code 200  212 ms
ID                       State   Cartridges               Size   SSH URL

< gear uuid1 > started jbossews-1.0 haproxy-1.4 medium < gear uuid1 >@jbossews-svc.dmp.example.com
< gear uuid2 > started jbossews-1.0 haproxy-1.4 medium < gear uuid2 >-svc.dmp.example.com
< gear uuid3 > started jbossews-1.0 haproxy-1.4 medium < gear uuid3 >-svc.dmp.example.com
  • Currently its not possible to remove < gear uuid2 >-svc.dmp.example.com. Add this functionality to remove a specific scale gear.

  • The issue is that there may be some background pending operation within gear, so we cannot rely on HAProxy to disable/remove gears if there is no web traffic.

Scenario where this functionality is needed-

  • Gear A run job A and after scaling to Gear B, it is running job B.
  • Gear A may be finished and idled, so Gear A will be chosen to scale down first and left Gear B to continue to run even if it is the newest created one.

Resolution

  • it seems unlikely we'll get to this feature on 2.x. It's already a feature of 3.x.

  • Currently there is no such functionality but a gear can be scaled down using the following command-
    ssh $UUID@$APP-$DOMAIN.rhcloud.com rhcsh "haproxy_ctld -d"

  • This functionality is present in PEP(Project Enhancement Proposal) as per the following link.

  • A RFE(Request for feature enhancement) is filed and the engineering is working on it.

  • Additional Info:
    In automated scaling you can modify the behaviour of scaling as per the guide

Root Cause

  • Whether it's automated scaling or manual scaling, the haproxy cartridge is just sending a request to the broker to tell it to scale the application down and the broker will decide which gear to delete. it will choose the most recently created gear to delete.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.