Bug 610210 - perl doesn't know where to find the socket - bugzilla assumes it does
perl doesn't know where to find the socket - bugzilla assumes it does
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: bugzilla (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Emmanuel Seyman
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-01 14:44 EDT by Brian LaMere
Modified: 2010-08-27 02:55 EDT (History)
2 users (show)

See Also:
Fixed In Version: bugzilla-3.4.8-2.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-26 23:07:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brian LaMere 2010-07-01 14:44:38 EDT
Description of problem:

default install can't connect to database (perl issue, but a simple workaround is avail)

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


How reproducible:

every time

Steps to Reproduce:
1. install bugzilla rpm
2. run checksetup.pl

 
Actual results:

errors, complaining that the connection parameters are incorrect or that there's a problem with perl/dbi


Expected results:

successful db connection

Additional info:

I created a simple /etc/profile.d/mysql-perl.sh script that had the following line in it:
export MYSQL_UNIX_PORT="/var/lib/mysql/mysqld.sock"

That made the install work, but then going to the bugzilla webpage (http://localhost/bugzilla) gave the same connect error.  So, I changed the /etc/bugzilla/localconfig file to connect to 127.0.0.1 instead of mysqld.sock 

Thus, the default install doesn't work; it would work, however, if a common cgi in /usr/share/bugzilla had the following line added to it somewhere:

$ENV{MYSQL_UNIX_PORT} = "/var/lib/mysql/mysqld.sock";

Obviously, that would "hard code" it to a particular spot, so having the value be set by something in localconfig would be preferable.

Thanks!
Comment 1 Emmanuel Seyman 2010-07-21 10:51:41 EDT
(In reply to comment #0)
>
> Obviously, that would "hard code" it to a particular spot, so having the value
> be set by something in localconfig would be preferable.

This sounds exactly like localconfig's $db_sock variable to me.
Comment 2 Brian LaMere 2010-07-21 12:38:07 EDT
(In reply to comment #1)
> (In reply to comment #0)
> >
> > Obviously, that would "hard code" it to a particular spot, so having the value
> > be set by something in localconfig would be preferable.
> 
> This sounds exactly like localconfig's $db_sock variable to me.    

true!  Then the install should be using that, instead of how it is now; take a fresh install of fedora, type "yum install bugzilla", and the install hangs/doesn't work.  Since it did the same every time, and since the packages involved are all made for fedora, the installed packages should probably have that defined at installation.
Comment 3 Emmanuel Seyman 2010-07-21 20:02:31 EDT
(In reply to comment #2)
> take a fresh install of fedora, type "yum install bugzilla", and the install
> hangs/doesn't work.

Bugzilla will never work out of the box. You need a database and a
login/password combo to access it. There's no way we can guess this.
Comment 4 Brian LaMere 2010-07-21 20:27:29 EDT
I agree to a point - first, as I noted in bug #610198 the install hangs.  If it is known that the install will not work "out of the box" then the checksetup.pl script should not be run.  Second, setting db/password is a normal thing, and could even be prompted for in the post-install section of the rpm (prompt for connect info, try it, if it doesn't work prompt for root info, try it, then stop running checksetup and tell the user to configure it).  If everyone will need a particular setting, it seems odd to not just set the setting to such in the default config; other things are set there, yes?

In the end though, the report is just a user-experience improvement suggestion.  It didn't stop me from having bugzilla running, it's just something that might make things easier for others.
Comment 5 Emmanuel Seyman 2010-07-21 21:41:21 EDT
(In reply to comment #4)
> I agree to a point - first, as I noted in bug #610198 the install hangs.

Bug #610198 is definitely a bug and should be fixed.
I'll investigate as soon as I have time.

> If it is known that the install will not work "out of the box" then the
> checksetup.pl script should not be run.

Running checksetup.pl once will create a default localconfig file and that's
why we run the command in %post. Running it a second time will cause it to
complain that the database cannot be accessed.

> Second, setting db/password is a normal thing, and could even be prompted for in the post-install section of the rpm

RPM-based installations are non-interactive.

> If everyone will need a particular setting, it seems odd to not just set
> the setting to such in the default config; other things are set there, yes?

This assumes that everybody uses a local mysql database to run bugzilla,
which isn't the case. Some people will use postgresql or oracle, others will
use mysql on a remote server.

We ship the default configuration that upstream ships so that upstream documentation applies to Fedora's package. If the default configuration
works for you, great. If not, feel free to change it.
Comment 6 Emmanuel Seyman 2010-08-18 17:33:08 EDT
Taking.
Comment 7 Fedora Update System 2010-08-18 18:20:45 EDT
bugzilla-3.6.2-1.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/bugzilla-3.6.2-1.fc14
Comment 8 Fedora Update System 2010-08-18 18:24:05 EDT
bugzilla-3.4.8-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/bugzilla-3.4.8-2.fc13
Comment 9 Fedora Update System 2010-08-18 18:24:24 EDT
bugzilla-3.4.8-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/bugzilla-3.4.8-1.fc12
Comment 10 Brian LaMere 2010-08-19 02:07:41 EDT
I agree completely that rpm installations should always be non-interactive.  I had in the past made some that were interactive, despite this.  I also agree completely that people will use various backends.  I only submitted this as a bug report because doing a fresh install of bugzilla on a fresh install of fedora gives an error.  Regardless whether the database backend may change, the rpm installation should complete on a fresh install without errors, and then should alert the user that they should run the checksetup.pl after they've actually configured the system.  Apologies if I was unclear in my intention :)
Comment 11 Emmanuel Seyman 2010-08-19 06:17:04 EDT
(In reply to comment #10)
>
> I only submitted this as a bug report because doing a fresh install of
> bugzilla on a fresh install of fedora gives an error.

From your description of the problem, I was under the impression that you were installing bugzilla with a /etc/bugzilla/localconfig file already present on
your system. The update I released last night tests the existence of the file and does not run checksetup if it exists.

Thus, the installation should always be non-interactive and complete without errors.
Comment 12 Fedora Update System 2010-08-19 21:29:29 EDT
bugzilla-3.4.8-1.fc12 has been pushed to the Fedora 12 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 bugzilla'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/bugzilla-3.4.8-1.fc12
Comment 13 Fedora Update System 2010-08-26 23:07:04 EDT
bugzilla-3.6.2-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2010-08-27 02:51:48 EDT
bugzilla-3.4.8-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2010-08-27 02:54:49 EDT
bugzilla-3.4.8-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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