Bug 498959

Summary: SELinux prevents postgresql initdb on a clean install
Product: [Fedora] Fedora Reporter: Merlin Hughes <redhat>
Component: postgresqlAssignee: Tom Lane <tgl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 11CC: hhorak, kylepablo, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.3.8-2.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-12 00:58:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Merlin Hughes 2009-05-04 15:32:48 UTC
Description of problem:

SELinux prevents postgresql initdb on a clean install, leaving database installation in unknown state.

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

Fedora 11 Beta
Postgreql.x86_64 0:8.3.7-1.fc11

How reproducible:

Always

Steps to Reproduce:
1. yum install postgresql postgresql-server
2. service postgresql initdb
3.
  
Actual results:

SELinux alert: "SELinux denied access requested by initdb. /var/lib/pgsql/pgstartup.log may be a mislabeled. /var/lib/pgsql/pgstartup.log default SELinux type is postgresql_log_t, but its current type is var_lib_t. Changing this file back to the default type, may fix your problem. "


Expected results:

initdb should succeed

Additional info:

Comment 1 Tom Lane 2009-05-04 17:02:03 UTC
Hmm, that's a bug all right, but so far as I can tell it's pretty much cosmetic ---  the database gets initialized anyway.  Can't you start the service afterwards?

Comment 2 Merlin Hughes 2009-05-04 17:33:10 UTC
You're right. I did not have confidence that the initialization process had run to completion, so I wiped the data directory, ran restorecon on the logfile and then reinitialized the database. I tried again from clean and despite the SELinux warning on initdb and service start, everything worked fine.

Comment 3 Tom Lane 2009-05-04 17:55:49 UTC
OK.  I'll fix it when the F11 freeze lifts, but it doesn't seem urgent enough to try to get it in before that.

Comment 4 Bug Zapper 2009-06-09 15:07:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Fedora Update System 2009-10-24 21:15:59 UTC
postgresql-8.3.8-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/postgresql-8.3.8-2.fc11

Comment 6 Fedora Update System 2009-10-24 21:16:05 UTC
postgresql-8.3.8-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/postgresql-8.3.8-2.fc10

Comment 7 Tom Lane 2009-10-24 21:17:37 UTC
I fixed this some time ago in HEAD, but forgot to push it into the back branches :-(.  Sorry about the delay.

Comment 8 Fedora Update System 2009-10-27 06:32:08 UTC
postgresql-8.3.8-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update postgresql'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10731

Comment 9 Fedora Update System 2009-10-27 06:50:24 UTC
postgresql-8.3.8-2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update postgresql'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-10776

Comment 10 Fedora Update System 2009-11-12 00:58:33 UTC
postgresql-8.3.8-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2009-11-12 01:00:50 UTC
postgresql-8.3.8-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.