Bug 1288815 - sphinx systemd service file references mysqld still
sphinx systemd service file references mysqld still
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: sphinx (Show other bugs)
24
All Linux
low Severity low
: ---
: ---
Assigned To: Gerald Cox
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-06 03:59 EST by Trevor Cordes
Modified: 2016-08-05 16:55 EDT (History)
2 users (show)

See Also:
Fixed In Version: sphinx-2.2.11-1.fc23 sphinx-2.2.11-1.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-05 16:50:22 EDT
Type: Bug
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 Trevor Cordes 2015-12-06 03:59:24 EST
Description of problem:
Sphinx's systemd .service file references mysqld.service in its After= line, when F22 has renamed mysqld.service to mariadb.service.  This can cause (in a race condition way) sphinx to start before mariadb, and hence fail.


Version-Release number of selected component (if applicable):
sphinx-2.2.10-1.fc22.x86_64
mariadb-10.0.21-1.fc22.x86_64


How reproducible:
always


Steps to Reproduce:
1. grep -i after /usr/lib/systemd/system/searchd.service

Actual results:
After=local-fs.target network.target mysqld.service

Expected results:
After=local-fs.target network.target mariadb.service

Additional info:
There may be other rpms with systemd service files with the same bug, but I can't think (or find) any off the top of my head.
Comment 1 Gerald Cox 2015-12-06 12:16:18 EST
Investigating...
Comment 2 Gerald Cox 2015-12-06 13:21:32 EST
Still investigating, but don't believe this will cause an issue because it doesn't appear that mysql/mariadb is required.  In my system, I am running neither... instead I'm using postgresql - and I haven't experienced any issues.  I will however continue to research before I update the searchd.service file.
Comment 3 Trevor Cordes 2015-12-06 17:07:42 EST
Good point.  I haven't actually had sphinx fail because of this, I only came across it when I had another .service file that did fail because it referenced mysqld and in that case the order did matter.

If sphinx doesn't need maria alive when it starts, if it waits for connections from client programs before calling the db, then I guess it wouldn't matter.  However, say you have another .service file that had After=searchd.service and started to make sphinx calls right away.  If sphinx wasn't waiting for maria then in that case things would start failing.  Pathological, but possible?

I don't think systemd and rpm give an easy way to say "if our db choice is pg then After=pg; if our db choice is maria then After=maria".  So it might be hopeless until someone programs such an option.  (That said, most people will be using maria instead of pg(? maybe?) so perhaps a default still helps.  In any case, After=mysqld.service is no longer useful.)

Thanks
Comment 4 Gerald Cox 2015-12-06 21:14:37 EST
(In reply to Trevor Cordes from comment #3)
> I don't think systemd and rpm give an easy way to say "if our db choice is
> pg then After=pg; if our db choice is maria then After=maria".  So it might
> be hopeless until someone programs such an option.  (That said, most people
> will be using maria instead of pg(? maybe?) so perhaps a default still
> helps.  In any case, After=mysqld.service is no longer useful.)

Agreed, mysqld.service should be removed.  I'll continue looking, but at this point appears it was really never needed.  I'll keep this bug open as a reminder to me to remove it during the next update.  Thanks for taking the time to report it.
Comment 5 Gerald Cox 2016-06-20 11:07:53 EDT
Changing to F24 since that is current.  Awaiting next release to incorporate this change.
Comment 6 Gerald Cox 2016-07-26 15:16:45 EDT
Upstream bugfix release 2.2.11 is available.
Comment 7 Fedora Update System 2016-07-26 17:11:39 EDT
sphinx-2.2.11-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bca02f997b
Comment 8 Fedora Update System 2016-07-26 17:12:44 EDT
sphinx-2.2.11-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-29846306eb
Comment 9 Fedora Update System 2016-07-28 00:18:04 EDT
sphinx-2.2.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-29846306eb
Comment 10 Fedora Update System 2016-07-28 01:59:13 EDT
sphinx-2.2.11-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-bca02f997b
Comment 11 Fedora Update System 2016-08-05 16:50:19 EDT
sphinx-2.2.11-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-08-05 16:55:33 EDT
sphinx-2.2.11-1.fc24 has been pushed to the Fedora 24 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.