Bug 1020169

Summary: [origin_runtime_282]Failed to notify ssl certificates removing operation
Product: OpenShift Online Reporter: chunchen <chunchen>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: rchopra, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:24:46 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:
Attachments:
Description Flags
development log none

Description chunchen 2013-10-17 07:54:07 UTC
Created attachment 813222 [details]
development log

Description of problem:
It's failed to notify ssl certificates removing operation, will meet "Unable to complete the requested operation due to: wrong number of arguments (2 for 5)" errors, but the ssl cert can be removed successfully.

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

How reproducible:
always

Steps to Reproduce:
1. SSH into a instance and configure the routing plugin
1) build rubygem-openshift-origin-routing-activemq package
2) gem install the openshift-origin-routing-activemq package
3) add this gem to the rhc-broker Gemfile
4) Put the following contents in /etc/openshift/plugins.d/openshift-origin-routing-activemq.conf 
ACTIVEMQ_TOPIC='/topic/routinginfo'
ACTIVEMQ_USERNAME='***'
ACTIVEMQ_PASSWORD='***'
ACTIVEMQ_HOST='localhost.localdomain'
ACTIVEMQ_PORT='***'
5) Edit /etc/activemq/activemq.xml and add the following lines in the user auth section (roughly around line 102) 
<authenticationUser username="***" password="***" groups="***"/>
Also around line 113, these two lines :
<authorizationEntry topic="***.>" write="***" read="***" admin="***" />
<authorizationEntry queue="***.>" write="***" read="***" admin="***" />
6) Restart activemq and broker
7) Create a listener to the topic,
and run this file on a new terminal so that you can see it spew messages as they arrive
. Write the following to a new file (say topic_listener.rb) -
require 'rubygems'
require 'stomp'
c = Stomp::Client.new("routinginfo", "routinginfopasswd", "localhost", 6163, true)
c.subscribe('/topic/routinginfo') { |msg|
  puts
  puts msg
}
c.join

2. Create an app
rhc app create cpy27 python-2.7 --no-git
3. Add alias to this app
rhc alias add cpy27 c.c3.com
4. Generate the ssl cert file(server.crt) and private key file(server.key)
5. Add the ssl cert for this alias
rhc alias update-cert cpy27 c.c3.com --certificate server.crt  --private-key server.key
6. Delete the ssl cert from this alias
rhc alias delete-cert cpy27 c.c3.com
7. List this alias of the app
rhc alias list -a cpy27
8. Check the ssl_cert_remove notification in step 1.7

Actual results:
at step 6:
Unable to complete the requested operation due to: wrong number of arguments (2 for 5).
Reference ID: 9e419a76b95b10471284920b6b7093b7
at step 7:
Alias    Has Certificate? Certificate Added
-------- ---------------- -----------------
c.c3.com no    
at step 8: do not get the ssl_cert_remove notification

Expected results:
Notifying ssl certificates removing operation should be successfully

Additional info:
the attachment are some development logs.

Comment 2 chunchen 2013-10-21 02:07:38 UTC
It's fixed, verified on devenv_3921, please refer to the following results:

<Stomp::Message headers={"content-type"=>"text/plain; charset=UTF-8", "message-id"=>"ID:ip-10-191-57-158.ec2.internal-22660-1382320652687-3:3:-1:1:6", "destination"=>"/topic/routinginfo", "timestamp"=>"1382320934487", "expires"=>"0", "content-length"=>"76", "priority"=>"4"} body='---
:action: :remove_ssl
:app_name: cpy27s
:namespace: ccy
:alias: c.py.com
' command='MESSAGE' >