Bug 983014 - Unnecessary message shows when start mongodb again or restart it from stop
Summary: Unnecessary message shows when start mongodb again or restart it from stop
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-10 09:52 UTC by Lei Zhang
Modified: 2015-05-14 23:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-29 12:48:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lei Zhang 2013-07-10 09:52:49 UTC
Description of problem:
Given a app embeded with mongodb(e.g myruby18), execue "rhc cartridge start -a myruby18 -c mongodb-2.2" from running status, or execute "rhc cartridge restart -a myruby18 -c mongodb-2.2" from stop status. Unnecessary message like "MongoDB already..." shows. For mysql and postgresql work well.

[rayzhang@rayzhang Work]$ rhc cartridge status -a myruby18 -c mongodb-2.2
RESULT:
MongoDB is running
[rayzhang@rayzhang Work]$ rhc cartridge start -a myruby18 -c mongodb-2.2
Starting mongodb-2.2 ... done
MongoDB already running
[rayzhang@rayzhang Work]$ rhc cartridge stop -a myruby18 -c mongodb-2.2
Stopping mongodb-2.2 ... done
[rayzhang@rayzhang Work]$ rhc cartridge restart -a myruby18 -c mongodb-2.2
Restarting mongodb-2.2 ... done
MongoDB already stopped

Version-Release number of selected component (if applicable):
INT(devenv_3470)
rhc-1.11.3.gem

How reproducible:
always

Steps to Reproduce:
1. Start cartridge when it is running.
   . rhc cartridge start -a myruby18 -c mongodb-2.2
   . rhc cartridge start -a myruby18 -c mongodb-2.2
2. Restart cartridge when it is stop.
   . rhc cartridge stop -a myruby18 -c mongodb-2.2
   . rhc cartridge restart -a myruby18 -c mongodb-2.2

Actual results:
Unnecessary message like "MongoDB already ..." shows. 

Expected results:
No unnecessary message should display, except "... mongodb-2.2 ... done"

Additional info:

Comment 1 Clayton Coleman 2013-07-10 15:31:15 UTC
MongoDB is returning a client_result in these cases, which is not necessary.  The UI is showing client result messages.

Given that the information doesn't help the user materially, there's no reason to return it, and MongoDB should be consistent with PostgreSQL and MySQL

Comment 2 Yan Du 2013-08-09 08:01:57 UTC
test on devenv_3632, issue can be reproduced with restapi

after stop mongodb, then try to restart by restapi, will got below message in result:

      <severity>info</severity>
      <text>Added restart on mongodb-2.2 for application j2</text>
      <exit-code>0</exit-code>
      <field nil="true"></field>
    </message>
    <message>
      <severity>result</severity>
      <text>MongoDB already stopped
</text>
      <exit-code>0</exit-code>
      <field nil="true"></field>
    </message>
  </messages>
  <version>1.6</version>
  <api-version>1.6</api-version>

Comment 3 Jhon Honce 2013-08-12 23:59:09 UTC
Fixed in https://github.com/openshift/origin-server/pull/3337

Comment 4 Lei Zhang 2013-08-15 05:22:51 UTC
Retest on devenv_3653, this issue still exists, when I start mongodb again from start status or restart from stop status, the unnecessary message shows "MongoDB already ..."

[lijun@rayzhang Work]$ rhc cartridge start -a myruby18 -c mysql-5.1
Starting mysql-5.1 ... done
[lijun@rayzhang Work]$ rhc cartridge start -a myruby18 -c mongodb-2.2
Starting mongodb-2.2 ... done

MongoDB already running
[lijun@rayzhang Work]$ rhc cartridge stop -a myruby18 -c mongodb-2.2
Stopping mongodb-2.2 ... done
[lijun@rayzhang Work]$ rhc cartridge restart -a myruby18 -c mongodb-2.2
Restarting mongodb-2.2 ... done

MongoDB already stopped

Comment 5 Jhon Honce 2013-08-15 17:29:01 UTC
Using devenv_3656 I was not able recreate this issue.

# rhc cartridge stop mongodb-2.2 -a perl001 
Stopping mongodb-2.2 ... done
# rhc cartridge restart mongodb-2.2 -a perl001 
Restarting mongodb-2.2 ... done

Comment 6 Lei Zhang 2013-08-16 01:38:08 UTC
Verified on devenv_3658.

[rayzhang@rayzhang Work]$ rhc cartridge start -a myruby18 -c mongodb-2.2
Starting mongodb-2.2 ... done
[rayzhang@rayzhang Work]$ rhc cartridge start -a myruby18 -c mongodb-2.2
Starting mongodb-2.2 ... done
[rayzhang@rayzhang Work]$ rhc cartridge stop -a myruby18 -c mongodb-2.2
Stopping mongodb-2.2 ... done
[rayzhang@rayzhang Work]$ rhc cartridge restart -a myruby18 -c mongodb-2.2
Restarting mongodb-2.2 ... done


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