Bug 1043588

Summary: build_update_cluster_args needs to find the first web_framework port interface, not just use the first port interface
Product: OpenShift Online Reporter: Andy Goldstein <agoldste>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: jhou, rchopra, xtian
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: 2014-01-30 00:53:32 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:

Description Andy Goldstein 2013-12-16 18:01:46 UTC
Description of problem: update_cluster will fail for older apps where a gear's first port interface entry is not a web framework


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


How reproducible: 100% for the affected gears


Steps to Reproduce:
1. Find or create a scaled application where at least 1 of the gear's port_interfaces array has the haproxy port_interface first, followed by the web_framework port_interface
2. Attempt to scale up/down or run oo-admin-ctl-app -c update-cluster

Actual results: update_cluster mcollective call to the node will fail with `rescue in with_container_from_args' proxy_port is required


Expected results: update_cluster should succeed


Additional info:
This line (https://github.com/openshift/origin-server/blob/master/plugins/msg-broker/mcollective/lib/openshift/mcollective_application_container_proxy.rb#L1732) should change to get the first port_interface that has a web_framework type, instead of just using the first port_interface in the array

Comment 1 Rajat Chopra 2013-12-16 23:25:14 UTC
Fixed with https://github.com/openshift/origin-server/pull/4350

Comment 2 Jianwei Hou 2013-12-18 05:51:22 UTC
Verified on devenv_4148 and devenv-stage_619

Steps:
1. Create a scalable application, set min scale to 2
2. Reverse the order of port_interfaces of the app so that the haproxy is 1st port_interface of the application
3. Scale up this application

Result: 
No exception was caught, this problem should be fixed