Bug 750626

Summary: create_db.sh uses hardcoded path for uuid-ossp.sql
Product: [Retired] oVirt Reporter: Jon Choate <jchoate>
Component: ovirt-engine-coreAssignee: Doron Fediuck <dfediuck>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dfediuck, iheim, johney2008, lpeer, mkalinin, roxenham, ykaul
Target Milestone: ---   
Target Release: 3.1   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-09 07:59:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Change regular expression for matching all psql 9.X version none

Description Jon Choate 2011-11-01 19:39:01 UTC
Description of problem:

The create_db.sh script expects to find the file uuid-ossp.sql in a hardcoded location of /usr/share/pgsql/contrib/uuid-ossp.sql. The problem is that this file is not always installed in that location.

Depending on the OS and the way the the postgresql components were installed, the file uuid-ossp.sql could be found in one of several locations.  Two I know of are:

/usr/share/postgresql/8.4/contrib/uuid-ossp.sql
/usr/local/pgsql/share/contrib/uuid-ossp.sql

How reproducible:
whenever uuid-ossp.sql is not installed in the hardcoded path

  
Actual results:
The message:
"The file /usr/share/pgsql/contrib/uuid-ossp.sql does not exist. It is possible the postgresql-contrib package was not installed
In order to install the package please perform:

yum provides postgresql-contrib
This will determine which package should be installed. For example, for fedora 14 it should be: postgresql-contrib-8.4.7-1.fc14.x86_64

yum install package-name
For example, for fedora 14 it should be: yum install postgresql-contrib-8.4.7-1.fc14.x86_64
After installation is done, please run create_db.sh script again"


Expected results:
The script finds or asks for the location of the file so that the script can continue.

Comment 1 Rhys Oxenham 2011-11-10 18:53:12 UTC
Created a patch for this, let me know what you think...

Change-Id: I101338cc8cb685583277049a08f1aad06f37ad97

http://gerrit.ovirt.org/#change,162

Comment 2 Itamar Heim 2011-11-10 20:10:29 UTC
when a patch has been posted, bugzilla can be moved to POST status:
"POST: A patch or solution believed to resolve this matter has been proposed"

Comment 4 Johney Lee 2012-04-21 05:00:19 UTC
my uuid-ossp.sql is in the default location /usr/share/pgsql/contrib/, but Istill encountered this problem. I don't know why. then I use 
./create_db_devel.sh -u postgres -f /usr/share/pgsql/contrib/uuid-ossp.sql
and still failed.

psql:/usr/share/pgsql/contrib/uuid-ossp.sql:9: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:14: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:19: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:24: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:29: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:34: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:39: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:44: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:49: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录
psql:/usr/share/pgsql/contrib/uuid-ossp.sql:54: ERROR:  could not access file "$libdir/uuid-ossp": 没有那个文件或目录

Comment 5 Marina Kalinin 2012-06-15 06:48:52 UTC
I have Fedora17 clean install;  postgresql-contrib-9.1.3-3.fc17.x86_64 installed, but no uuid-ossp.sql file on my file system. The whole /usr/share/pgsql/contrib dir is empty execpt one file sepgqsl.sql.
And of course, I fail to run create_db.sh script.

Comment 6 Itamar Heim 2012-08-09 07:59:03 UTC
closing ON_QA bugs as oVirt 3.1 was released:
http://www.ovirt.org/get-ovirt/

Comment 7 Pavel Zhukov 2013-01-08 15:09:53 UTC
Created attachment 674891 [details]
Change regular expression for matching all psql 9.X version