Bug 1212020 - routing daemon can not delete monitor due to improper configuration usage.
Summary: routing daemon can not delete monitor due to improper configuration usage.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Miciah Dashiel Butler Masters
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1212040
TreeView+ depends on / blocked
 
Reported: 2015-04-15 12:21 UTC by Eric Rich
Modified: 2019-07-11 08:56 UTC (History)
10 users (show)

Fixed In Version: rubygem-openshift-origin-routing-daemon-0.24.1.1-1.el6op
Doc Type: Bug Fix
Doc Text:
In the /etc/openshift/routing-daemon.conf file, if the MONITOR_TYPE parameter for the F5 routing daemon listener is set to 'https', an 'https-ecv' type monitor was created. When the monitor was to be deleted, a type of 'https' was expected when the type was actually 'https-ecv', returning a 400 error. This bug fix updates the routing daemon such that when 'https' is specified as the MONITOR_TYPE, it expects the monitor to be deleted to have a type of 'https-ecv'. As a result, monitors created with a configured MONITOR_TYPE of 'https' or any other type can be successfully deleted.
Clone Of:
: 1212040 (view as bug list)
Environment:
Last Closed: 2015-07-21 19:12:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1415103 0 None None None Never
Red Hat Product Errata RHBA-2015:1463 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.6 bug fix and enhancement update 2015-07-21 23:11:33 UTC

Description Eric Rich 2015-04-15 12:21:40 UTC
Description of problem:

With the [creation of the monitor](https://github.com/openshift/origin-server/blob/master/routing-daemon/lib/openshift/routing/models/f5-icontrol-rest.rb#L114-L116), we select (https, or http) based on the value of MONITOR_TYPE, however upon the [deletion](https://github.com/openshift/origin-server/blob/master/routing-daemon/lib/openshift/routing/models/f5-icontrol-rest.rb#L127-L129), we use the MONITOR_TYPE value. 

If the value is, HTTP or https, an http monitor type is created, but this type can not be deleted because when we try and delete this TYPE (HTTP, https) the monitor does not exist on the F5, and results in a 400 message. 


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

How reproducible: 100%

Steps to Reproduce:
1. set 'HTTP,https,xyz,XYZ' for the MONITOR_TYPE in /etc/openshift/routing-daemon.conf

Actual results:

W, [2015-04-09T14:08:14.507206 #5768]  WARN -- : Got an exception: got RestClient::BadRequest exception: 400 Bad Request (Found unexpected json pair at module /ltm/monitor. The json pair is "HTTP":{"monitor_ose_APPNAME_NAMESPACE":null}.)
D, [2015-04-09T14:08:14.507297 #5768] DEBUG -- : Backtrace:
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-routing-daemon-0.23.2.0/lib/openshift/routing/models/f5-icontrol-rest.rb:54:in `rescue in rest_request'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-routing-daemon-0.23.2.0/lib/openshift/routing/models/f5-icontrol-rest.rb:40:in `rest_request'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-routing-daemon-0.23.2.0/lib/openshift/routing/models/f5-icontrol-rest.rb:88:in `delete'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-routing-daemon-0.23.2.0/lib/openshift/routing/models/f5-icontrol-rest.rb:128:in `delete_monitor'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-routing-daemon-0.23.2.0/lib/openshift/routing/controllers/simple.rb:130:in `delete_monitor'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-routing-daemon-0.23.2.0/lib/openshift/routing/daemon.rb:339:in `delete_application'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-routing-daemon-0.23.2.0/lib/openshift/routing/daemon.rb:252:in `handle'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-routing-daemon-0.23.2.0/lib/openshift/routing/daemon.rb:226:in `listen'

Expected results:

Should delete with out error. 

Additional info:

This situation can be avoided, or workaround by supplying only http to the configuration, all others cause a conflict, due to the way we create the monitor.

Comment 9 Johnny Liu 2015-05-07 10:39:44 UTC
Verified this bug with rubygem-openshift-origin-routing-daemon-0.24.1.1-1.el6op.noarch, and PASS.

Could reproduce this bug with rubygem-openshift-origin-routing-daemon-0.23.2.0-1.el6op.noarch, and set MONITOR_TYPE=HTTP in /etc/openshift/routing-daemon.conf.

After update package to rubygem-openshift-origin-routing-daemon-0.24.1.1-1.el6op.noarch, no error is seen.

Also verified when MONITOR_TYPE=[http|HTTP|https|HTTPS|https-ecv|http-ecv|xyz], all passed.

Comment 11 errata-xmlrpc 2015-07-21 19:12:14 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.

https://rhn.redhat.com/errata/RHBA-2015-1463.html


Note You need to log in before you can comment on or make changes to this bug.