Bug 991617 - Can't upgrade PostgreSQL cartridge from 8.4 to 9.2
Summary: Can't upgrade PostgreSQL cartridge from 8.4 to 9.2
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fotios Lindiakos
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-03 00:12 UTC by a00131524
Modified: 2015-05-14 23:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-05 21:23:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
OPML file imported into my app. (30.86 KB, text/xml)
2013-08-03 00:12 UTC, a00131524
no flags Details

Description a00131524 2013-08-03 00:12:15 UTC
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-05 02:35:52 UTC
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 21:23:19 UTC
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 22:04:01 UTC
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.