Bug 991617 - Can't upgrade PostgreSQL cartridge from 8.4 to 9.2
Can't upgrade PostgreSQL cartridge from 8.4 to 9.2
Status: CLOSED NOTABUG
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fotios Lindiakos
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-02 20:12 EDT by a00131524
Modified: 2015-05-14 19:25 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-05 17:23:19 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)
OPML file imported into my app. (30.86 KB, text/xml)
2013-08-02 20:12 EDT, a00131524
no flags Details

  None (edit)
Description a00131524 2013-08-02 20:12:15 EDT
Created attachment 782200 [details]
OPML file imported into my app.

Description: 

I removed PostgreSQL 8.4 cartridge from my app with the intention to upgrade to 9.2, but it refuses to add either PostgreSQL cartridge after removing the original 8.4 cartridge.

How reproducible: 

Reproduced successfully - see http://testttrss-stephennealon.rhcloud.com/

Unexpected error: Failed to create the following private endpoints due to existing process bindings: OPENSHIFT_POSTGRESQL_DB_HOST(5432)=127.9.18.130

I have left the default credentials on this test app, see the git repo.  Apologies for the sloppy merging causing the car-crash interface in the test app, it was quite late when I started submitting this bug report.  Note that the interface is NOT an issue in my own application.

Steps to Reproduce:
1. Deploy a new application - small gear, PHP 5.3, PostgreSQL 8.4 and Cron 1.4 cartridge using web interface.
2. Use git repo in Additional Info section as the application git repo.
2. Import OPML file into the deployed TinyTinyRSS application.
3. Remove the PostgreSQL 8.4 cartridge using rhc client tools.
4. Attempt to add PostgreSQL 9.2 cartridge using the web interface.

Actual results:

Refuses to add any PostgreSQL cartridge, throws error - 

Unexpected error: Failed to create the following private endpoints due to existing process bindings: OPENSHIFT_POSTGRESQL_DB_HOST(5432)=127.9.163.130


Expected results:

Add PostgreSQL cartridge to app without any errors.


Additional info:

App URL: http://tinytinyrss-stephennealon.rhcloud.com/

App UUID: 51f85a9b4382ec8f13000025

Original forum thread: https://www.openshift.com/forums/openshift/cant-upgrade-postgresql-cartridge-from-84-to-92

Quickstart git repo: https://github.com/fabianofranz/tiny_tiny_rss-openshift-quickstart.git

Document URL: 

Section Number and Name: 

Describe the issue: 

Suggestions for improvement: 

Additional information: 


Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


Document URL: 

Section Number and Name: 

Describe the issue: 

Suggestions for improvement: 

Additional information: 


Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


Document URL: 

Section Number and Name: 

Describe the issue: 

Suggestions for improvement: 

Additional information: 


Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


Document URL: 

Section Number and Name: 

Describe the issue: 

Suggestions for improvement: 

Additional information: 


Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 chunchen 2013-08-04 22:35:52 EDT
1. The issue can be reproduced as below:
1) Create an app with quichstart: https://github.com/fabianofranz/tiny_tiny_rss-openshift-quickstart
2) Remove PostgreSQL 8.4 cartridge
3) Add PostgreSQL 9.2

2. But the issue can not be reproduced as below:
1) Create an app with Postgresql 8.4
rhc app create cphp00 php-5.3 postgresql-8.4 cron-1.4
2) Remove PostgreSQL 8.4 cartridge
3) Add PostgreSQL 9.2
Comment 2 Fotios Lindiakos 2013-08-05 17:23:19 EDT
After further investigation, this really had nothing to do with upgrading from postgres 8 to 9.

This was a result of the tiny_tiny_rss quickstart running a php process in the background (outside of the normal httpd process). This was keeping the postgres socket connection open, despite the postgres cartridge being removed.

If you were to force-stop the application, it would kill that php process

Fabiano is changing the way the quickstart operates in order to not keep that process open. I'll ask him to document the quickstart PR here when it's submitted.
Comment 3 Fabiano Franz 2013-08-05 18:04:01 EDT
The tiny_tiny_rss quickstart was updated in order to use cron instead of a daemon for feeds update:

https://github.com/fabianofranz/tiny_tiny_rss-openshift-quickstart/commit/71da79302369f0319ec0fb191503a0187d0ff1c3

Please rebase your repository in order to get the latest changes.

Also, please note that when removing/replacing the PostgreSQL cartridge it's important to re-run the deploy step in order to have the database recreated:

1) rm $OPENSHIFT_DATA_DIR/.schema_deployed
2) sh $OPENSHIFT_REPO_DIR/.openshift/action_hooks/post_deploy

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