Bug 812800 - [Rest API] no useful info is printed out when calling show-port event
Summary: [Rest API] no useful info is printed out when calling show-port event
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 1.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-16 09:31 UTC by Johnny Liu
Modified: 2012-07-13 23:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-13 23:43:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Johnny Liu 2012-04-16 09:31:48 UTC
Description of problem:
When trigger show-port event, there is no any useful info is printed out.

$ curl -k -X POST -H 'Accept: application/xml' -d event=show-port --user jialiu:214214 https://ec2-107-22-102-43.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/phptest/events
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <type>application</type>
  <version>1.0</version>
  <messages>
    <message>
      <severity>INFO</severity>
      <field nil="true"></field>
      <exit-code nil="true"></exit-code>
      <text>Added show-port to application phptest</text>
    </message>
  </messages>
  <data>
    <application>
       ...
       ...
    </application>
  </data>
</response>


In mcollective log, there is some useful info:
D, [2012-04-16T04:33:04.082513 #1015] DEBUG -- : libra.rb:60:in `cartridge_do_action' cartridge_do_action call / request = #<MCollective::RPC::Request:0x7f6b6b746ea8
 @action="cartridge_do",
 @agent="libra",
 @caller="cert=mcollective-public",
 @data=
  {:action=>"show-port",
   :process_results=>true,
   :args=>"'phptest' 'jialiu' '7895502c5dcd4851a46ac0fc858c29b3'",
   :cartridge=>"php-5.3"},
 @sender="ip-10-62-7-53",
 @time=1334565184,
 @uniqid="e3a2e7e1b6b47c49bb802312ff702f12">

D, [2012-04-16T04:33:04.082745 #1015] DEBUG -- : libra.rb:61:in `cartridge_do_action' cartridge_do_action validation = php-5.3 show-port 'phptest' 'jialiu' '7895502c5dcd4851a46ac0fc858c29b3'
D, [2012-04-16T04:33:05.024331 #1015] DEBUG -- : libra.rb:102:in `cartridge_do_action' cartridge_do_action (0)
------
CLIENT_RESULT: No proxy ports defined

------)

I think some similar output should be printed out, e.g: "No proxy ports defined".

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

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Ravi Sankar 2012-06-28 23:36:48 UTC
Fixed in git rev 1bc7c64f397ab7

Comment 2 Rony Gong 🔥 2012-07-02 05:01:39 UTC
Verified on devenv_1869, rhc0.95.5
[rony@localhost mytest]$ curl -k -X POST -H 'Accept: application/xml' -d event=show-port --user qgong:xx https://ec2-23-20-41-56.compute-1.amazonaws.com/broker/rest/domains/qgong/applications/qsruby18/events
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <type>application</type>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
  </supported-api-versions>
  <data>
    <application>
      <git-url>ssh://a3674c5bae5c4ef49364f95d9f2ad32f.rhcloud.com/~/git/qsruby18.git/</git-url>
      <gear-profile>small</gear-profile>
      <embedded>
        <haproxy-1.4>
          <info></info>

......
.....
  </data>
  <version>1.0</version>
  <status>ok</status>
  <messages>
    <message>
      <severity>INFO</severity>
      <exit-code nil="true"></exit-code>
      <text>Application qsruby18 called show port</text>
      <field nil="true"></field>
    </message>
  </messages>
</response>


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