Bug 1167625
Summary: | Fail to start openshift-routing-daemon service when no port is specified for ACTIVEMQ_HOST. | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Johnny Liu <jialiu> |
Component: | Node | Assignee: | chris alfonso <calfonso> |
Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | high | ||
Version: | 2.2.0 | CC: | adellape, bleanhar, hbrock, jokerman, libra-onpremise-devel, mmccomas |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rubygem-openshift-origin-routing-daemon-0.20.2.3-1.el6op | Doc Type: | Bug Fix |
Doc Text: |
In OpenShift Enterprise environments using the routing daemon, when multiple hosts were specified in the ACTIVEMQ_HOST parameter in the /etc/openshift/routing-daemon.conf file, the routing daemon failed to start if ports were not specified along with the hosts. This was due to a bug in the routing daemon. This bug fix updates the routing daemon to define the ports for multiple ActiveMQ hosts whether specified on in the ACTIVEMQ_HOST parameter or the ACTIVE_MQ_PORT parameter. As a result, the routing daemon now restarts successfully in this scenario.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2014-12-10 13:25:25 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: |
Description
Johnny Liu
2014-11-25 07:59:25 UTC
After added more debug info, found the workaround for issue #2 actually did not work either, because @port is also is nil in the instance_eval block, so here is updated workaround: Replace the follwoing code @user = @cfg['ACTIVEMQ_USER'] || 'routinginfo' @password = @cfg['ACTIVEMQ_PASSWORD'] || 'routinginfopasswd' @port = (@cfg['ACTIVEMQ_PORT'] || 61613).to_i @hosts = (@cfg['ACTIVEMQ_HOST'] || 'activemq.example.com').split(',').map do |hp| hp.split(":").instance_eval do |h,p| { :host => h, # Originally, ACTIVEMQ_HOST allowed specifying only one host, with # the port specified separately in ACTIVEMQ_PORT. :port => p || @cfg['ACTIVEMQ_PORT'] || '61613', } end end to @user = @cfg['ACTIVEMQ_USER'] || 'routinginfo' @password = @cfg['ACTIVEMQ_PASSWORD'] || 'routinginfopasswd' cfgcfg = @cfg @hosts = (@cfg['ACTIVEMQ_HOST'] || 'activemq.example.com').split(',').map do |hp| hp.split(":").instance_eval do |h,p| { :host => h, # Originally, ACTIVEMQ_HOST allowed specifying only one host, with # the port specified separately in ACTIVEMQ_PORT. :port => p || cfgcfg['ACTIVEMQ_PORT'] || '61613', } end end The instance_eval is reseting the instance variable @cfg. I'll fix that issue. Good find! Opened PR upstream. Will merge to enterprise-server after it makes it upstream. https://github.com/openshift/origin-server/pull/5976 Verified this bug with rubygem-openshift-origin-routing-daemon-0.20.2.3-1.el6op.noarch, and PASS. When the following config value is set in /etc/openshift/routing-daemon.conf ACTIVEMQ_HOST=10.66.79.157,10.66.79.143 ACTIVEMQ_USER=routinginfo ACTIVEMQ_PASSWORD=routinginfopasswd ACTIVEMQ_PORT=61613 ACTIVEMQ_DESTINATION=/topic/routinginfo restart routing-daemon service successfully. When the following config value is set in /etc/openshift/routing-daemon.conf ACTIVEMQ_HOST=10.66.79.157,10.66.79.143:61614 ACTIVEMQ_USER=routinginfo ACTIVEMQ_PASSWORD=routinginfopasswd ACTIVEMQ_PORT=61613 ACTIVEMQ_DESTINATION=/topic/routinginfo restart routing-daemon service successfully. 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-2014-1979.html |