Bug 819993

Summary: Domain alter with scalable JBoss app leaves haproxy.cfg with outdated gear names
Product: OKD Reporter: Dan Mace <dmace>
Component: PodAssignee: Krishna Raman <kraman>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.xCC: mfisher, pruan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-09 15:03:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Mace 2012-05-08 19:55:57 UTC
Description of problem:

Altering the domain for an account containing a scalable jbossas-7 application results in incorrect values in haproxy.cfg within the haproxy-1.4 cart.

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


How reproducible:

Steps to Reproduce:


1. Create a new dev instance

    build/devenv launch dmace-dev --verbose


2. Create a new domain/namespace on the dev instance

    rhc domain create -n dmace4 -l dmace4 -p none


3. Create a new scalable jbossas-7 app on the new domain

    rhc-create-app -a jbscale -t jbossas-7 -s -l dmace4 -p none


At this point, the single-node app is running behind haproxy and is accessible via https://jbscale-dmace4.dev.rhcloud.com/app. Here is what I see in /var/lib/stickshift/jbscale-dmace4/haproxy-1.4/conf/haproxy.cfg on the dev instance:

listen express 127.0.250.129:8080
    cookie GEAR insert indirect nocache
    option httpchk GET /
    balance leastconn
    server  filler 127.0.250.130:8080 backup
    server gear-6cd84ba7d3-dmace4 10.118.202.198:35531 check fall 2 rise 3 inter 2000 cookie 6cd84ba7d3-dmace4


This seems consistent with the current configuration. Next, I alter the domain:

    rhc domain alter -n dmace4mod1 -l dmace4 -p none


This all succeeds, and all the gear directories in /var/lib/stickshift have been updated to reflect the new namespace (dmace4 => dmace4mod1). The application is now accessible from https://jbscale-dmace4mod1.dev.rhcloud.com/app.

Problem: the haproxy.cfg has NOT been rewritten, and still contains the server directive line:

    server gear-6cd84ba7d3-dmace4 10.118.202.198:35531 check fall 2 rise 3 inter 2000 cookie 6cd84ba7d3-dmace4 
  
Actual results:

The haproxy.cfg should have been updated with the new gear name:

    server gear-6cd84ba7d3-dmace4mod1 10.118.202.198:35531 check fall 2 rise 3 inter 2000 cookie 6cd84ba7d3-dmace4mod1 

Expected results:


Additional info:

Comment 1 Krishna Raman 2012-05-09 15:03:51 UTC

*** This bug has been marked as a duplicate of bug 819984 ***

Comment 2 Peter Ruan 2012-05-10 22:56:23 UTC
verified with devenv-stg_189