Bug 1117949

Summary: Scalable app will keep using the customized haproxy_ctld.rb even the action hook has been removed from app git repo
Product: OpenShift Container Platform Reporter: Brenton Leanhardt <bleanhar>
Component: ImageStreamsAssignee: Jason DeTiberus <jdetiber>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 2.1.0CC: adellape, bmeng, bparees, bperkins, gpei, jialiu, jokerman, libra-bugs, libra-onpremise-devel, mmccomas
Target Milestone: ---Keywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-origin-cartridge-haproxy-1.23.5.5-1.el6op Doc Type: Bug Fix
Doc Text:
After adding a customized haproxy_ctld.rb file to a scalable application, the application continued to use the customized file for automatic scaling even after the file had been removed from the application's Git repository. This was due to a bug in the HAProxy cartridge. This bug fix updates the HAProxy cartridge control script to handle the removal of customized haproxy_ctld.rb files, and applications now return to using the default file for automatic scaling after a customized file has been removed. A cartridge upgrade is required after applying this fix.
Story Points: ---
Clone Of: 1117769 Environment:
Last Closed: 2014-08-26 13:52:44 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:
Bug Depends On: 1117769    
Bug Blocks:    

Description Brenton Leanhardt 2014-07-09 16:59:18 UTC
+++ This bug was initially created as a clone of Bug #1117769 +++

Description of problem:
Create scalable app and add the customized haproxy_ctld.rb to the app git repo and push to server. The app will use the customized haproxy_ctld.rb for auto scaling. But after user remove the file from .openshift/action_hook and push the change to server, the gear will keep using the customized haproxy_ctld.rb, restart app cannot fix the issue.

The process of the custom haproxy_ctld will not be killed in gear.

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

How reproducible:
always

Steps to Reproduce:
1. Create scalable app
2. Add a custom haproxy_ctld.rb to the .openshift/action_hooks and git push
3. Remove the custom haproxy_ctld.rb and push it again

Actual results:
The app will still using the custom haproxy_ctld.rb and the process still leaves there even restart the app.

Expected results:
Should use the default haproxy_ctld.rb when user removed the custom one.

Additional info:

Comment 1 Brenton Leanhardt 2014-08-01 13:24:57 UTC
Upstream commits:

commit b5d182d29ee9b0e1ab4fd8bdeb38a122da1ea957
Author: Ben Parees <bparees>
Date:   Wed Jul 9 11:21:40 2014 -0400

    Scalable app will keep using the customized haproxy_ctld.rb even the
    action hook has been removed from app git repo
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1117769

commit 9e48cb9fafb523b29d28fe6373b7fd327a8a4887
Author: Ben Parees <bparees>
Date:   Thu Jul 10 08:07:52 2014 -0400

    Wrong message when starting catridge haproxy_ctld.rb
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1117769

Comment 4 Gaoyun Pei 2014-08-04 06:32:12 UTC
verify this bug with openshift-origin-cartridge-haproxy-1.23.5.5-1.el6op.noarch

After removing custom haproxy_ctld.rb action_hook, the customized haproxy_ctld.rb process was gone. And the default haproxy_ctld.rb was running.

1. Create a scalable app
2. Add a custom haproxy_ctld.rb to the .openshift/action_hooks and git push
3. Remove the custom haproxy_ctld.rb and push it again

ssh into the app, check the running haproxy_ctld.rb process, it is 
"ruby /var/lib/openshift/<gear_uuid>/haproxy/usr/bin/haproxy_ctld.rb" ,
and there's no any other running haproxy_ctld.rb process like 
"ruby /var/lib/openshift/<gear_uuid>/app-root/runtime/repo//.openshift/action_hooks/haproxy_ctld.rb"

Comment 6 errata-xmlrpc 2014-08-26 13:52:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1095.html