Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1049566 - Gear ID is not available in routing events
Gear ID is not available in routing events
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.0.0
Unspecified Unspecified
urgent Severity high
: ---
: ---
Assigned To: chris alfonso
libra bugs
:
Depends On: 1049565
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-07 14:04 EST by Brenton Leanhardt
Modified: 2017-03-08 12 EST (History)
7 users (show)

See Also:
Fixed In Version: rubygem-openshift-origin-controller-1.17.9-1.el6op, rubygem-openshift-origin-routing-activemq-0.2.2-1.el6op
Doc Type: Enhancement
Doc Text:
Routing SPI messages are now updated to include gear UUIDs, which allows administrators to address specific gears within an application. This is useful, for example, for adding dynamic DNS entries or adding gears to a load balancing pool. These updates, along with other changes pertaining to the sample ActiveMQ routing plug-in, are now documented in the OpenShift Enterprise Deployment Guide.
Story Points: ---
Clone Of: 1049565
Environment:
Last Closed: 2014-01-28 11:39:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0102 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.2 bug fix and enhancement update 2014-01-28 16:38:01 EST

  None (edit)
Description Brenton Leanhardt 2014-01-07 14:04:55 EST
+++ This bug was initially created as a clone of Bug #1049565 +++

Routing SPI events do not contain the gear id.  This means that a consumer can't construct gear DNS entries (<gear_id>-<domain>.<domain_suffix>) nor associate an endpoint with gear ids.

This is a critical issue for at least one customer and should be targeted for OSE 2.0.2

--- Additional comment from Clayton Coleman on 2014-01-07 14:02:57 EST ---

Fixed in https://github.com/openshift/origin-server/pull/4419
Comment 3 Brenton Leanhardt 2014-01-08 11:18:37 EST
This script could be used to verify the new message format:

https://github.com/openshift/openshift-extras/blob/enterprise-2.0/admin/routing-listeners/echo.rb
Comment 4 chris alfonso 2014-01-08 13:20:03 EST
Merged into enterprise-2.0 
https://github.com/openshift/enterprise-server/pull/187
Comment 7 Nan Wei 2014-01-09 01:07:50 EST
Enter prise puddle: 2014-01-08.1

step 1: install openshift-origin-routing-activemq-0.0.gem
yum install rubygem-openshift-origin-routing-activemq.noarch
step 2: Put the following contents in /etc/openshift/plugins.d/openshift-origin-routing-activemq.conf 
cat /etc/openshift/plugins.d/openshift-origin-routing-activemq.conf
ACTIVEMQ_TOPIC='/topic/routinginfo'
ACTIVEMQ_USERNAME='routinginfo'
ACTIVEMQ_PASSWORD='routinginfopasswd'
ACTIVEMQ_HOST='localhost.localdomain'
ACTIVEMQ_PORT='61613'
step 3: Edit /etc/activemq/activemq.xml and add the following lines in the user auth section
<authenticationUser username="routinginfo" password="routinginfopasswd" groups="routinginfo,everyone"/>
Also around line 113, these two lines :
<authorizationEntry topic="routinginfo.>" write="routinginfo" read="routinginfo" admin="routinginfo" />
<authorizationEntry queue="routinginfo.>" write="routinginfo" read="routinginfo" admin="routinginfo" />
step 4: Restart activemq and broker
step 5: create a listener to the topic_listener.rb
step 6: Run the routing listener on instance, please refer to the "Setup" section
ruby  topic_listener.rb
step 8: Create an app
rhc app create phps php-5.3 -s --no-git
output:
:action: :add_gear
:app_name: phps
:namespace: nweidomain
:gear_id: 52ce39fb6892df1b06000044
:public_port_name: php-5.3
:public_address: 192.168.59.137
:public_port: 38061
:protocols:
- http
- ws
:types:
- web_framework
:mappings:
- frontend: ''
  backend: ''
- frontend: /health
  backend: ''
:deprecated: use add_public_endpoint.
When delete the scale app, output result is correct.
Comment 8 Nan Wei 2014-01-09 01:22:03 EST
And when scale-up and scalue-down, output result is also correct messages.
Comment 9 Nan Wei 2014-01-09 02:11:17 EST
when scale-up app and it shows some message as follow:
:action: :add_gear
:app_name: phps
:namespace: nweid
:gear_id: 52ce49d76892df1b060000fe
:public_port_name: php-5.3
:public_address: 192.168.59.137
:public_port: 38066
:protocols:

when scale-down app and it shows some message as follow:
:action: :delete_gear
:app_name: phps
:namespace: nweid
:gear_id: 52ce49d76892df1b060000fe
:public_address: 192.168.59.137
:public_port: 38066
:deprecated: use remove_public_endpoint

when delete app and ti shows some message as follow:
:action: :delete_gear
:app_name: phps
:namespace: nweidomain
:gear_id: 52ce39fb6892df1b06000044
:public_address: 192.168.59.137
:public_port: 38062
:deprecated: use remove_public_endpoint
---
:action: :remove_public_endpoint
:app_name: phps
:namespace: nweid
:gear_id: 52ce39fb6892df1b06000044
:public_address: 192.168.59.137
:public_port: 38061
---
:action: :delete_gear
:app_name: phps
:namespace: nweid
:gear_id: 52ce39fb6892df1b06000044
:public_address: 192.168.59.137
:public_port: 38061
:deprecated: use remove_public_endpoint
---
:action: :delete_application
:app_name: phps
:namespace: nweidomain
:scalable: true
:ha: false
Comment 11 errata-xmlrpc 2014-01-28 11:39:28 EST
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-2014-0102.html

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