Bug 849074
Summary: | Got "database does not exist" error when restoring a scalable application with postgresql embedded | ||||||
---|---|---|---|---|---|---|---|
Product: | OKD | Reporter: | Jianwei Hou <jhou> | ||||
Component: | Containers | Assignee: | Rob Millner <rmillner> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2.x | CC: | mfisher | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | libra_ami #2039 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-09-17 21:29:41 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Pull request: https://github.com/openshift/crankcase/pull/402 Fixed both backup and restore to properly get the UUID from the db gear. Pull request merged. Verified on devenv_2029 The snapshot problem is gone, but when trying to restore, there were still errors: Steps to reproduce: 1.Create scabable app with postgresql embedded. 2.ssh into app, connect to postgresql and make some change. 3.Take snapshot for this app 4.ssh into app again and delete some data 5.Restore app from snapshot 6.ssh into app and check deleted data is back Result: in step 5, when trying to restore: WARNING: This ssh terminal was started without a tty. It is highly recommended to login with: ssh -t PostgreSQL server instance already running ERROR: role "fcc0d8a304df4e42a516bf2ce5dfdc34" does not exist \connect: FATAL: database "perl1s" does not exist in step 6, try to connect to database: [perl1s-jhou.dev.rhcloud.com ~]\> set -x [perl1s-jhou.dev.rhcloud.com ~]\> psql + psql + PGDATABASE=perl1s + PGHOST=a70c81cc9b-jhou.dev.rhcloud.com + PGPORT=35696 + PGUSER=admin + PGPASSWORD=Ceux16jwWtLa + /usr/bin/psql --set 'HISTFILE=~/app-root/data/.psql_history' psql: FATAL: database "perl1s" does not exist Pull request: https://github.com/openshift/crankcase/pull/410 Pull request merged. Verified on devenv_2402 Steps: 1.Create scabable app with postgresql embedded. 2.ssh into app, connect to postgresql and make some change. 3.Take snapshot for this app 4.ssh into app again and delete some data 5.Restore app from snapshot 6.ssh into app and check deleted data is back Result: Restore was successful, ssh into app and connect to postgresql, the deleted data is back (In reply to comment #6) > Verified on devenv_2402 > > Steps: > 1.Create scabable app with postgresql embedded. > 2.ssh into app, connect to postgresql and make some change. > 3.Take snapshot for this app > 4.ssh into app again and delete some data > 5.Restore app from snapshot > 6.ssh into app and check deleted data is back > > Result: > Restore was successful, ssh into app and connect to postgresql, the deleted > data is back A typo, verified on devenv_2042 |
Created attachment 605128 [details] snapshot output Description of problem: Try to snapshot a scalable app having postgresql embedded, there were messages showing " Could not dump PostgreSQL databases" Version-Release number of selected component (if applicable): on devenv_2009, int cli: rhc-0.97.11 How reproducible: Always Steps to Reproduce: 1.Create a scalable application and embed postgresql rhc app create -a ps1 -t php-5.3 -s rhc app cartridge add -a ps1 -c postgresql-8.4 2.ssh into app and create some data in postgresql database 3.take snapshot for the app rhc app snapshot save ./ps1.tar.gz -a ps1 Actual results: in the output, there are messages like : pg_dumpall: could not connect to database "template1": could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 0.0% WARNING! Could not dump PostgreSQL databases! Continuing anyway Expected results: Snapshot should be successful. Additional info: Delete some data from postgresql db, and restore from previous snapshot, data is not back. for full infomation, please see attachment.