Bug 1049566 - Gear ID is not available in routing events
Summary: Gear ID is not available in routing events
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: ---
Assignee: chris alfonso
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1049565
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-07 19:04 UTC by Brenton Leanhardt
Modified: 2017-03-08 17:36 UTC (History)
7 users (show)

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.
Clone Of: 1049565
Environment:
Last Closed: 2014-01-28 16:39:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0102 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.2 bug fix and enhancement update 2014-01-28 21:38:01 UTC

Description Brenton Leanhardt 2014-01-07 19:04:55 UTC
+++ 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 16:18:37 UTC
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 18:20:03 UTC
Merged into enterprise-2.0 
https://github.com/openshift/enterprise-server/pull/187

Comment 7 Nan Wei 2014-01-09 06:07:50 UTC
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 06:22:03 UTC
And when scale-up and scalue-down, output result is also correct messages.

Comment 9 Nan Wei 2014-01-09 07:11:17 UTC
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 16:39:28 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-2014-0102.html


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