Bug 1210489 - Enable-HA registers routing appliaction DNS twice, breaking functionality for some custom DNS plugins
Summary: Enable-HA registers routing appliaction DNS twice, breaking functionality for...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.2.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Timothy Williams
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-09 20:47 UTC by Timothy Williams
Modified: 2019-07-11 08:55 UTC (History)
11 users (show)

Fixed In Version: rubygem-openshift-origin-controller-1.36.2.2-1
Doc Type: Bug Fix
Doc Text:
A feature was previously added, but never fully implemented, to allow an application to be made highly-available (HA) at creation. When an application is made HA and MANAGE_HA_DNS=true in the /etc/openshift/broker.conf file, the HA routing DNS is created twice. Then, it is created again whenever another HAProxy instance is added. This works without issue when the nsupdate DNS plug-in is used. This is because nsupdate has no problem updating an existing record to the same existing record. Other DNS plug-ins however, such as a plug-in that makes HTTP requests to manage DNS, attempting to add the same entry twice can cause an error to be returned. Since the feature to allow an application to be made HA on creation was never fully implemented, the addition of a routing DNS during gear creation has been removed and disabled. As a result, the routing DNS is only registered once, when the application is made HA through the appropriate API call workflow.
Clone Of:
Environment:
Last Closed: 2015-07-21 19:12:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
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 Timothy Williams 2015-04-09 20:47:23 UTC
Description of problem:
When an application is made HA and MANAGE_HA_DNS=true in the broker.conf, the HA routing DNS is created twice. Then, it is created again whenever another haproxy instance is added.

This is due to the following patch:

  https://github.com/openshift/origin-server/commit/d15a9d2aad33cd3ae0723ee9ac2c126c1ab1966e

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

How reproducible:
Always

Steps to Reproduce:
1. In an HA environment, create a scaled application
2. Make the application HA with the API call or `rhc app enable-ha APP_NAME`
3. Review the /var/log/openshift/broker/production.log

Actual results:
The `RegisterRoutingDnsOp` pending operation is run twice during the make-ha process:

2015-04-08 17:53:53.929 [DEBUG] Execute SetHaOp (pid:10517)
[...]
2015-04-08 17:53:53.990 [DEBUG] Execute RegisterRoutingDnsOp (pid:10517)
[...]
2015-04-08 17:54:05.938 [DEBUG] Execute RegisterRoutingDnsOp (pid:10517)

Expected results:
The routing DNS is registered once.

Additional info:
This works without issue when the nsupdate dns plugin is used. This is because nsupdate has no problem updating an existing record to the same existing record. 

In some DNS plugins, such as a plugin that makes HTTP requests to manage DNS, attempting to add the same entry twice can cause an error to be returned.

Comment 3 openshift-github-bot 2015-05-15 21:47:16 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b818cc793dfa78602cdd37adc3f792a0da3c8201
BZ1210489 -  Enable-HA registers routing appliaction DNS twice, breaking functionality for some custom DNS plugins

Bug 1210489
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1210489
The routing dns entry is added twice. This addition, added in d15a9d2aad33cd3ae0723ee9ac2c126c1ab1966e, is not needed as a method to create an HA application in a single API call is not used except for in tests.

Comment 6 Ma xiaoqiang 2015-05-19 09:07:05 UTC
Check on puddle [2.2.6/2015-05-18.1]

1. create an app
# rhc app create xiaom1 php-5.4 -s
2. enable ha the app
rhc app anable-ha xiaom1
3. check the log
#grep -r RegisterRoutingDnsOp /var/log/openshift/broker/development.log 
2015-05-19 17:04:00.659 [DEBUG] Execute RegisterRoutingDnsOp (pid:12219)

The routing DNS is registered once.

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