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:
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
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>
Fixed in https://github.com/openshift/origin-server/pull/3337
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
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
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