Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1062321 - All db cartridge reports 'started' status after being stopped
Summary: All db cartridge reports 'started' status after being stopped
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-06 16:25 UTC by Jordan Liggitt
Modified: 2015-05-15 00:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-26 19:11:11 UTC


Attachments (Terms of Use)

Description Jordan Liggitt 2014-02-06 16:25:03 UTC
Description of problem:

rhc_extended started failing on Jan 29, 2014 5:05:29 PM

The failing test makes sure cartridges report the correct status after being stopped. The mysql cartridge is reporting "started" status after having been stopped.

To recreate:


$ rhc app create test php-5.3 mysql-5.1
...

$ rhc cartridge status -a test mysql-5.1
RESULT:
MySQL is running

$ rhc cartridge stop -a test mysql-5.1
Stopping mysql-5.1 ... done

$ rhc cartridge status -a test mysql-5.1
RESULT:
MySQL is running

Comment 1 Jordan Liggitt 2014-02-06 16:25:26 UTC
Example row: | running | stopped | stopped |

Message:

    expected "RESULT:\nMySQL is running\n" to match "(.+) stopped"
Diff:
@@ -1,2 +1,3 @@
-(.+) stopped
+RESULT:
+MySQL is running
 (RSpec::Expectations::ExpectationNotMetError)
./cucumber/step_definitions/cartridge_steps.rb:43:in `/^the (.+) cartridge should be (.*)$/'
cucumber/cartridge.feature:18:in `Then the mysql cartridge should be <status>'

Comment 2 Jordan Liggitt 2014-02-06 16:41:53 UTC
API output from stop call:

{
    "api_version": 1.6,
    "data": {
        "aliases": [],
        "app_url": "http://test-bob1.dev.rhcloud.com/",
        "auto_deploy": true,
        "build_job_url": null,
        "building_app": null,
        "building_with": null,
        "creation_time": "2014-02-06T16:36:16Z",
        "deployment_branch": "master",
        "deployment_type": "git",
        "domain_id": "bob1",
        "embedded": {
            "mysql-5.1": {
                "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/",
                "database_name": "test",
                "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/",
                "password": "...",
                "username": "..."
            }
        },
        "framework": "php-5.3",
        "gear_count": 1,
        "gear_profile": "small",
        "git_url": "ssh://52f3ba0092e91454c0000007@test-bob1.dev.rhcloud.com/~/git/test.git/",
        "health_check_path": "health_check.php",
        "id": "52f3ba0092e91454c0000007",
        "initial_git_url": null,
        "keep_deployments": 1,
        "members": [
            {
                "explicit_role": null,
                "from": [
                    {
                        "role": "admin",
                        "type": "domain"
                    }
                ],
                "id": "52f3b9ed92e91454c0000001",
                "login": "bob",
                "owner": true,
                "role": "admin",
                "type": "user"
            }
        ],
        "name": "test",
        "scalable": false,
        "ssh_url": "ssh://52f3ba0092e91454c0000007@test-bob1.dev.rhcloud.com"
    },
    "messages": [
        {
            "exit_code": 0,
            "field": null,
            "index": null,
            "severity": "info",
            "text": "Stopped mysql-5.1 on test"
        }
    ],
    "status": "ok",
    "supported_api_versions": [
        1.0,
        1.1,
        1.2,
        1.3,
        1.4,
        1.5,
        1.6
    ],
    "type": "application",
    "version": "1.6"
}

Comment 3 Ben Parees 2014-02-06 20:33:21 UTC
The stop operation is actually stopping the php cartridge and not the mysql cartridge.  investigating.

Comment 4 Lei Zhang 2014-02-07 07:58:04 UTC
Test on devenv_4342, all db cartridge have met this issue

[lijun@ray Work]$ rhc cartridge status -a mypython26 -c mysql-5.1 
RESULT:
MySQL is running
[lijun@ray Work]$ rhc cartridge stop -a mypython26 -c mysql-5.1 
Stopping mysql-5.1 ... done
[lijun@ray Work]$ rhc cartridge status -a mypython26 -c mysql-5.1 
RESULT:
MySQL is running


[lijun@ray Work]$ rhc cartridge status -a mypython26 -c mongodb-2.4
RESULT:
MongoDB is running
[lijun@ray Work]$ rhc cartridge stop -a mypython26 -c mongodb-2.4
Stopping mongodb-2.4 ... done
[lijun@ray Work]$ rhc cartridge status -a mypython26 -c mongodb-2.4
RESULT:
MongoDB is running


[lijun@ray Work]$ rhc cartridge status -a mypython26 -c postgresql-9.2
RESULT:
Postgres is running
[lijun@ray Work]$ rhc cartridge stop -a mypython26 -c postgresql-9.2
Stopping postgresql-9.2 ... done
[lijun@ray Work]$ rhc cartridge status -a mypython26 -c postgresql-9.2
RESULT:
Postgres is running

Comment 5 Clayton Coleman 2014-02-07 16:49:59 UTC
Fixed in https://github.com/openshift/origin-server/pull/4680

Comment 6 Jianwei Hou 2014-02-08 02:22:27 UTC
Verified on devenv_4346

Tested scaled/non-scaled apps with all db cartridges, the status can be reported correctly now.


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