Bug 1288815 - sphinx systemd service file references mysqld still
Summary: sphinx systemd service file references mysqld still
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sphinx
Version: 24
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Gerald Cox
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-06 08:59 UTC by Trevor Cordes
Modified: 2016-08-05 20:55 UTC (History)
2 users (show)

Fixed In Version: sphinx-2.2.11-1.fc23 sphinx-2.2.11-1.fc24
Clone Of:
Environment:
Last Closed: 2016-08-05 20:50:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Trevor Cordes 2015-12-06 08:59:24 UTC
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 17:16:18 UTC
Investigating...

Comment 2 Gerald Cox 2015-12-06 18:21:32 UTC
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 22:07:42 UTC
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-07 02:14:37 UTC
(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 15:07:53 UTC
Changing to F24 since that is current.  Awaiting next release to incorporate this change.

Comment 6 Gerald Cox 2016-07-26 19:16:45 UTC
Upstream bugfix release 2.2.11 is available.

Comment 7 Fedora Update System 2016-07-26 21:11:39 UTC
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 21:12:44 UTC
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 04:18:04 UTC
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 05:59:13 UTC
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 20:50:19 UTC
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 20:55:33 UTC
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.