Bug 1003505

Summary: Undefined method `remove_httpd_proxy' error was shown when rolling back gear during move operation
Product: OpenShift Container Platform Reporter: Gaoyun Pei <gpei>
Component: NodeAssignee: Miciah Dashiel Butler Masters <mmasters>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 2.2.0CC: baulakh, bleanhar, libra-onpremise-devel, mmasters
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-openshift-origin-msg-broker-mcollective-1.9.10-1 Doc Type: Bug Fix
Doc Text:
Previously an incompatible API call in the Broker Mcollective plug-in displayed error messages when rolling back gears during a move operation. With this fix those error messages are no longer displayed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-25 15:30:58 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 Gaoyun Pei 2013-09-02 08:38:04 UTC
Description of problem:
When exception appears during moving gear operation, it would roll back the gear. But " undefined method `remove_httpd_proxy' " error was shown on the target node when rolling back.

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

How reproducible:
Always

Steps to Reproduce:
1. Move a gear within district using a short timeout to make exception.
[root@broker ~]# oo-admin-move --gear_uuid 52206347aeb905bf6b000048 -i node1.my-ose.com.cn --timeout 1
URL: http://app6-1234.my-ose.com.cn
Login: gpei
App UUID: 52206347aeb905bf6b000048
Gear UUID: 52206347aeb905bf6b000048
DEBUG: Source district uuid: 521c7341aeb905b3e6000001
DEBUG: Destination district uuid: 521c7341aeb905b3e6000001
DEBUG: Getting existing app 'app6' status before moving
DEBUG: Gear component 'php-5.3' was running
DEBUG: Stopping existing app cartridge 'php-5.3' before moving
DEBUG: Error performing stop on existing app on try 1: Node execution failure (error getting result from node).  If the problem persists please contact Red Hat support.
DEBUG: Error performing stop on existing app on try 2: Node execution failure (error getting result from node).  If the problem persists please contact Red Hat support.
DEBUG: Force stopping existing app cartridge 'php-5.3' before moving
DEBUG: Creating new account for gear 'app6' on node1.my-ose.com.cn
DEBUG: Moving failed.  Rolling back gear 'app6' 'app6' with remove-httpd-proxy on 'node1.my-ose.com.cn'
DEBUG: Remove httpd proxy with cart 'php-5.3' failed on 'node1.my-ose.com.cn'  - gear: 'app6', app: 'app6'
DEBUG: Moving failed.  Rolling back gear 'app6' in 'app6' with destroy on 'node1.my-ose.com.cn'
Node execution failure (error getting result from node).  If the problem persists please contact Red Hat support.

2. Check the mcollective.log on node1, get the error log below:
...
I, [2013-09-02T00:35:16.082031 #10708]  INFO -- : openshift.rb:91:in `execute_action' Executing action [remove-httpd-proxy] using method oo_remove_httpd_proxy with args [{"--with-app-uuid"=>"52206347aeb905bf6b000048", "--with-app-name"=>"app6", "--with-container-uuid"=>"52206347aeb905bf6b000048", "--with-container-name"=>"app6", "--with-namespace"=>"1234", "--with-uid"=>2699, "--with-request-id"=>nil, "--cart-name"=>"php-5.3", "--component-name"=>"php-5.3", "--with-software-version"=>"5.3", "--cartridge-vendor"=>"redhat"}]
E, [2013-09-02T00:35:16.084128 #10708] ERROR -- : openshift.rb:170:in `rescue in with_container_from_args' undefined method `remove_httpd_proxy' for #<OpenShift::V2CartridgeModel:0x000000033e4718>
E, [2013-09-02T00:35:16.084332 #10708] ERROR -- : openshift.rb:171:in `rescue in with_container_from_args' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.14.3/lib/openshift-origin-node/model/application_container.rb:427:in `remove_httpd_proxy'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/agent/openshift.rb:628:in `block in oo_remove_httpd_proxy'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/agent/openshift.rb:166:in `with_container_from_args'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/agent/openshift.rb:627:in `oo_remove_httpd_proxy'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/agent/openshift.rb:93:in `execute_action'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/agent/openshift.rb:65:in `cartridge_do_action'
/opt/rh/ruby193/root/usr/share/ruby/mcollective/rpc/agent.rb:86:in `handlemsg'
/opt/rh/ruby193/root/usr/share/ruby/mcollective/agents.rb:126:in `block (2 levels) in dispatch'
/opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout'
/opt/rh/ruby193/root/usr/share/ruby/mcollective/agents.rb:125:in `block in dispatch'
I, [2013-09-02T00:35:16.085063 #10708]  INFO -- : openshift.rb:100:in `execute_action' Finished executing action [remove-httpd-proxy] (-1)
I, [2013-09-02T00:35:16.085454 #10708]  INFO -- : openshift.rb:73:in `cartridge_do_action' cartridge_do_action failed (-1)
------
undefined method `remove_httpd_proxy' for #<OpenShift::V2CartridgeModel:0x000000033e4718>
------)
...


Actual results:

Expected results:
Should not have this error

Additional info:

Comment 2 Miciah Dashiel Butler Masters 2013-09-03 12:22:21 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=987218 for the bug report against Origin.

Here's the fix for origin-server:  https://github.com/openshift/origin-server/pull/3140

Comment 3 Miciah Dashiel Butler Masters 2013-09-09 13:39:18 UTC
Pull request: https://github.com/openshift/enterprise-server/pull/133

Comment 5 Gaoyun Pei 2013-09-11 11:42:36 UTC
Checked this bug on puddle: 1.2/2013-09-10.2 with package rubygem-openshift-origin-msg-broker-mcollective-1.9.9-1.1.el6op.noarch.

The problem is still there. And it seems the code was not merged in.

Thanks!

Comment 6 Brenton Leanhardt 2013-09-11 13:05:39 UTC
Apologies, I see now the pull request was never merged.

Comment 8 Gaoyun Pei 2013-09-12 02:43:28 UTC
Verify this bug with rubygem-openshift-origin-msg-broker-mcollective-1.9.10-1.el6op.noarch

When rolling back gear during move operation, no error logs in the mcollective.log

Comment 9 Miciah Dashiel Butler Masters 2013-09-16 20:50:02 UTC
Because the erroneous method call was in a begin/rescue block, it should not have prevented the rollback from completing; it only logged an error message for the bogus method call.

Comment 12 errata-xmlrpc 2013-09-25 15:30:58 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-2013-1275.html