Bug 975530

Summary: Amount of messages returned by broker staggering in number
Product: OKD Reporter: Clayton Coleman <ccoleman>
Component: PodAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: dmcphers, jhou
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: 2013-08-07 22:52:52 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 Clayton Coleman 2013-06-18 17:25:06 UTC
When adding a jenkins cartridge, the broker returns the following output.  There is a ton of duplication and unnecessary info that clients have no way to simplify.  The broker and node should agree on what data to return, and simplify.

I would recommend the node *not* display a message about the cart being added, only the info the cart generates.  I would recommend the broker be the one to provide the message about the cart being added:

----------- output of rhc add-cartridge jenkins -a foo --------------

Added jenkins-client-1.4 to application foo


jenkins-client-1.4: Job URL: https://jenkins-abc.dev.rhcloud.com/job/foo-build/

Associated with job 'foo-build' in Jenkins server.
Job URL: https://jenkins-abc.dev.rhcloud.com/job/foo-build/
Jenkins client 1.4 has been added to: foo


---------------------------------------------------------------------

If node only returned

  Associated with job 'foo-build' in Jenkins server.
  Job URL: https://jenkins-abc.dev.rhcloud.com/job/foo-build/

And broker only returned

  Added jenkins-client-1.4 to application foo

then we'd be much better off.

Comment 1 Clayton Coleman 2013-06-18 17:35:59 UTC
Also applies to remove cartridge for Jenkins:

Removed jenkins-client-1.4 from application foo
The corresponding job 'foo-build' in Jenkins has been disabled.
You can re-enable or delete as desired.
Job URL: https://jenkins-abc.dev.rhcloud.com/job/foo-build/
Jenkins client 1.4 has been removed from: foo

The broker should be responsible for messaging about cart removal, the cart should only report about jobs.

Comment 3 Dan McPherson 2013-07-23 17:03:25 UTC
https://github.com/openshift/origin-server/pull/3142

Comment 4 Jianwei Hou 2013-07-24 06:07:15 UTC
Verified on devenv_3545
The duplicate messages are now removed.

Adding jenkins-client:
jenkins-client-1.4 (Jenkins Client 1.4)
---------------------------------------
  Gears:   Located with diy-0.1
  Job URL: https://jks-jhou1.dev.rhcloud.com/job/d1-build/

Associated with job 'd1-build' in Jenkins server.


Removing jenkins-client:
The corresponding job 'd1-build' in Jenkins has been disabled.
You can re-enable or delete as desired.
Job URL: https://jks-jhou1.dev.rhcloud.com/job/d1-build/