Bug 981528 - Can not reload postgresql-8.4/postgresql-9.2 after stopping DB cartridge with non-scablable app
Can not reload postgresql-8.4/postgresql-9.2 after stopping DB cartridge with...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Hiro Asari
libra bugs
:
Depends On: 981780
Blocks: 980739 1010846
  Show dependency treegraph
 
Reported: 2013-07-05 00:48 EDT by Wei Sun
Modified: 2015-05-14 19:23 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1010846 (view as bug list)
Environment:
Last Closed: 2013-07-22 11:21:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wei Sun 2013-07-05 00:48:12 EDT
Description of problem:
After stopping postgresql-8.4/postgresql-9.2 cartridge,tried to reload them,but it failed.It returned some error messages,like
Unable to complete the requested operation due to: Failed to correctly execute all parallel operations

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

How reproducible:
Always

Steps to Reproduce:
1.Create an application 
2.Add postgresql-8.4/postgresql-9.2
3.Stop postgresql-8.4/postgresql-9.2
4.Reload postgresql-8.4/postgresql-9.2

Actual results:
openshift@openshift-ubuntu:~$ rhc reload-cartridge postgresql-9.2 -a eapt
Unable to complete the requested operation due to: Failed to correctly execute all parallel operations - --DEBUG--
Failed to execute: 'control reload' for /var/lib/openshift/41d9221ce51e11e28abc22000aa43651/postgresql

pg_ctl: PID file "/var/lib/openshift/41d9221ce51e11e28abc22000aa43651/postgresql/data/postmaster.pid" does not exist
Is server running?

--RESULT--

--MESSAGE--

--ERROR--

--APP INFO--

--CART COMMANDS--

--CART PROPERTIES--
{}
--DATA--

--EXIT CODE--
1
--USER ACTIONABLE--
false
.
Reference ID: cd54f321c881dcadfcccd1ad019eaaf6


Expected results:
openshift@openshift-ubuntu:~$ rhc reload-cartridge postgresql-9.2 -a eapt
RESULT:
postgresql-9.2 reloaded


Additional info:
If db cartridge is started,can reload the db cartridge
Comment 1 Yan Du 2013-07-05 02:01:30 EDT
it is ok with scalable app

[root@Daphne test]# rhc cartridge stop -a j2s -c postgresql-9.2
RESULT:
postgresql-9.2 stopped

[root@Daphne test]# rhc cartridge reload -a j2s -c postgresql-9.2
RESULT:
postgresql-9.2 reloaded
Comment 2 Hiro Asari 2013-07-05 15:29:43 EDT
The fact that the scalable app case returns the "success" message is actually a bug in CLI. (See https://bugzilla.redhat.com/show_bug.cgi?id=981780)
Comment 3 Hiro Asari 2013-07-05 15:32:49 EDT
'pg_ctl reload' will fail when postgresql is not running, so we need to avoid doing that. This is addressed by https://github.com/openshift/origin-server/pull/2993.

However, the PR won't address this bug entirely, since due to a couple of issues indicated above.
Comment 4 openshift-github-bot 2013-07-05 16:01:41 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/ee8816e280c1aeead2351943cce7b8d2e3884f06
Bug 981528

PostgreSQL can reload the config only when it's running.
Comment 5 Hiro Asari 2013-07-09 17:36:27 EDT
*** Bug 979442 has been marked as a duplicate of this bug. ***
Comment 6 openshift-github-bot 2013-07-10 10:04:32 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/3273645be4a4455e733f629369a933a12a127c76
Bug 981528

When the cartridge is down, it will be sent 'force-reload', not
'reload'.
Respond to that, and communicate with the user that it is invalid.

Use client_result for now, so that the user can see the message

See https://bugzilla.redhat.com/show_bug.cgi?id=981780
Comment 7 Hiro Asari 2013-07-10 13:25:59 EDT
bx bin/rhc app create rack ruby-1.9 postgresql-9.2
bx bin/rhc cartridge stop postgresql-9.2 -a rack
bx bin/rhc cartridge reload postgresql-9.2 -a rack


bx bin/rhc app stop postgresql-9.2 -a rack
bx bin/rhc cartridge reload postgresql-9.2 -a rack

both 'reload' should result in:

$ bx bin/rhc cartridge reload postgresql-9.2 -a rack
Reloading postgresql-9.2 ... done

'reload' is valid only when the database is running
Comment 8 Hiro Asari 2013-07-10 13:27:13 EDT
https://github.com/openshift/origin-server/pull/3042 should do this for good.
Comment 9 openshift-github-bot 2013-07-10 14:35:51 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/187bae81024adcb4bd53b7334bc126152b7626d3
Bug 981528

reload/force-reload depends on application status, so both can be sent
to the cartridge
Comment 10 Wei Sun 2013-07-10 22:56:22 EDT
Verified on INT(devenv_3481)

Result:
1.for postgresql-8.4
[sunwei@dhcp-8-229 ~]$ rhc stop-cartridge postgresql-8.4 -a perlt
Stopping postgresql-8.4 ... done
[sunwei@dhcp-8-229 ~]$ rhc reload-cartridge postgresql-8.4 -a perlt
Reloading postgresql-8.4 ... done

'reload' is valid only when the database is running
[sunwei@dhcp-8-229 ~]$ rhc status-cartridge postgresql-8.4 -a perlt
RESULT:
Postgres is stopped

2.for postgresql-9.2
[sunwei@dhcp-8-229 ~]$ rhc stop-cartridge postgresql-9.2 -a perlt
Stopping postgresql-9.2 ... done
[sunwei@dhcp-8-229 ~]$ rhc status-cartridge postgresql-9.2 -a perlt
RESULT:
Postgres is stopped
[sunwei@dhcp-8-229 ~]$ rhc reload-cartridge postgresql-9.2 -a perlt
Reloading postgresql-9.2 ... done

'reload' is valid only when the database is running
[sunwei@dhcp-8-229 ~]$ rhc status-cartridge postgresql-9.2 -a perlt
RESULT:
Postgres is stopped

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