Bug 10382 - sphinx user not present
Summary: sphinx user not present
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 3
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA3-32-OK MGA3-64-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2013-05-31 23:48 CEST by Pavel Kreuzt
Modified: 2014-05-08 18:05 CEST (History)
3 users (show)

See Also:
Source RPM: sphinx
CVE:
Status comment:


Attachments

Description Pavel Kreuzt 2013-05-31 23:48:03 CEST
When systemd-tmpfiles-setup is executed, it complains about /usr/lib/tmpfiles.d/sphinx.conf, telling that the user "sphinx" is unknown


Version: sphinx-2.0.6-3.mga3


Steps to Reproduce:
1. Install sphinx
2. Reboot computer or execute systemctl start systemd-tmpfiles-setup.service

Reproducible: 

Steps to Reproduce:
Comment 1 Barry Jackson 2013-06-01 11:50:06 CEST
Confirmed

Status: NEW => ASSIGNED
CC: (none) => zen25000
Assignee: bugsquad => zen25000
Source RPM: (none) => sphinx
Whiteboard: (none) => OK

Comment 2 Barry Jackson 2013-06-22 01:02:51 CEST
Update Advisory

Updated package sphinx-2.0.6-4.mga3 has been submitted to /3/core/updates_testing
which hopefully fixes this bug and other issues related to file permissions.

rpms:-
lib64sphinxclient-devel-2.0.6-4.mga3
lib64sphinxclient1-2.0.6-4.mga3
sphinx-debuginfo-2.0.6-4.mga3
sphinx-2.0.6-4.mga3

srpm:-
sphinx-2.0.6-4.mga3.src.rpm

Testing
Here I admit to being somewhat lost.
I have checked that the the sphinx-searchd service is enabled on install OK,
and that the service starts on re-boot.
The service can be stopped, started and status looks OK using systemctl.
The log files now have the correct perms, are created on install and are preserved on update and deleted on uninstall.
Beyond that I can't test as I don't have time to learn mysql and sphinx at the moment.

Note that if sphinx from the previous package was installed, then it should be uninstalled not updated so that the old log files with root ownership are removed. If that fails then:
sudo rm -rf /var/log/sphinx ;)

Assignee: zen25000 => qa-bugs
Whiteboard: OK => (none)

Comment 3 William Kenney 2013-06-24 17:05:14 CEST
I installed sphinx-2.0.6-3.mga3 executed systemctl start systemd-tmpfiles-setup.service

In MCC -> System -> Manage system services -> start sphinx-searchd

The following error is reported

Job for sphinx-searched.service failed. See 'systemctl status sphinx-searchd.service' and 'journalctl -n' for details.

In MCC I deleted sphinx-2.0.6-3.mga3 and installed sphinx-2.0.6-4.mga3 from updates_testing

I then executed systemctl start systemd-tmpfiles-setup.services

The following error is reported

Job for sphinx-searched.service failed. See 'systemctl status sphinx-searchd.service' and 'journalctl -n' for details.

The same error is reported.

CC: (none) => wilcal.int

Comment 4 Barry Jackson 2013-06-24 23:28:30 CEST
William,
Please do:-

$ su
# rm -rf /var/log/sphinx

after uninstalling the old version and before installing the new one.

It can't function with the old log files in place which are owned by root.

Thanks,
Barry
Comment 5 William Kenney 2013-06-25 00:44:52 CEST
(In reply to Barry Jackson from comment #4)
> William,
> Please do:-
> 
> $ su
> # rm -rf /var/log/sphinx
> 
> after uninstalling the old version and before installing the new one.
> 
> It can't function with the old log files in place which are owned by root.

So I have confirmed the bug so if I just install sphinx-2.0.6-4.mga3.src.rpm
on a system that it has not been installed on it should not error out?
Comment 6 Barry Jackson 2013-06-25 00:58:35 CEST
(In reply to William Kenney from comment #5)

> So I have confirmed the bug so if I just install sphinx-2.0.6-4.mga3.src.rpm
> on a system that it has not been installed on it should not error out?

Yes, there should be no problem in a clean system without it previously installed, or where it has been installed then either removing the logs as I mentioned in #2 and #4 OR changing their ownership to sphinx:-
# chown -R sphinx:sphinx /var/log/sphinx 
will allow the update to install correctly.

Whether this should be tested for and incorporated in the spec I am not sure, as it's a one-off situation.

If QA feel this is needed then let me know.
Comment 7 William Kenney 2013-06-25 04:57:22 CEST
(In reply to Barry Jackson from comment #6)

> Yes, there should be no problem in a clean system....
> If QA feel this is needed then let me know.

Thanks, I'm gonna tinker with this tomorrow ( 25 June )
California time.
Comment 8 claire robinson 2013-06-25 08:29:32 CEST
It's preferable Barry. Updates shouldn't require user interaction where we can prevent it.
Comment 9 Barry Jackson 2013-06-25 15:52:07 CEST
(In reply to claire robinson from comment #8)
> It's preferable Barry. Updates shouldn't require user interaction where we
> can prevent it.

Yes thought so ;)

OK it's fixed in sphinx-2.0.6-6.mga3 in 3/updates_testing

@ William

You should now be able to just update directly from the version in core to this new version without any issues as it's handled by the package.

installing sphinx-2.0.6-6.mga3.i586.rpm from /var/cache/urpmi/rpms
Preparing...                     ############################################################################
      1/1: sphinx                ############################################################################
      1/1: removing sphinx-2.0.6-3.mga3.i586
                                 ############################################################################
[root@localhost baz]# systemctl start systemd-tmpfiles-setup.service
[root@localhost baz]# systemctl start sphinx-searchd.service
[root@localhost baz]# systemctl status sphinx-searchd.service
sphinx-searchd.service - Sphinx - SQL Full Text Search Engine
          Loaded: loaded (/usr/lib/systemd/system/sphinx-searchd.service; disabled)
          Active: active (running) since Tue, 2013-06-25 14:39:52 BST; 18s ago
         Process: 10121 ExecStart=/usr/sbin/sphinx-searchd --config /etc/sphinx/sphinx.conf (code=exited, status=0/SUCCESS)
        Main PID: 10124 (sphinx-searchd)
          CGroup: name=systemd:/system/sphinx-searchd.service
                  â 10123 /usr/sbin/sphinx-searchd --config /etc/sphinx/sphinx.conf
                  â 10124 /usr/sbin/sphinx-searchd --config /etc/sphinx/sphinx.conf

Jun 25 14:39:52 localhost sphinx-searchd[10121]: Copyright (c) 2008-2012, Sphinx Technologies Inc (http:...com)
Jun 25 14:39:52 localhost sphinx-searchd[10121]: precaching index 'test1'
Jun 25 14:39:52 localhost sphinx-searchd[10121]: WARNING: index 'test1': preload: failed to open /var/li...VING
Jun 25 14:39:52 localhost sphinx-searchd[10121]: precaching index 'test1stemmed'
Jun 25 14:39:52 localhost sphinx-searchd[10121]: WARNING: index 'test1stemmed': preload: failed to open ...VING
Jun 25 14:39:52 localhost sphinx-searchd[10121]: precaching index 'rt'
Jun 25 14:39:52 localhost sphinx-searchd[10121]: Sphinx 2.0.6-release (r3473)
Jun 25 14:39:52 localhost sphinx-searchd[10121]: Copyright (c) 2001-2012, Andrew Aksyonoff
Jun 25 14:39:52 localhost sphinx-searchd[10121]: Copyright (c) 2008-2012, Sphinx Technologies Inc (http:...com)
Jun 25 14:39:52 localhost systemd[1]: Started Sphinx - SQL Full Text Search Engine.
Comment 10 William Kenney 2013-06-25 18:13:23 CEST
Yes, I have been successful to update from sphinx-2.0.6-3.mga3.i586
to sphinx-2.0.6-6.mga3.i586. And then in:

MCC -> System -> Manage system services -> start sphinx-searchd

when I start that service there is no longer an error message.
If I check the start on boot box and reboot the system then
sphinx-2.0.6-6.mga3.i586 is activated and running after boot.
So in the stricktest sense this bug, on i586, has been resolved
and I have so indicated that in the Whiteboard. I have been
testing this in Vbox and will now create an x86_64 version
and test it there.

Thanks for the help understanding this process.

Whiteboard: (none) => MGA3-32-OK

Comment 11 William Kenney 2013-06-25 19:32:52 CEST
We're good to go in MGA3-64-OK
So noted in the Whiteboard.

Whiteboard: MGA3-32-OK => MGA3-32-OK MGA3-64-OK

Comment 12 claire robinson 2013-06-25 20:12:23 CEST
This looks like it's ready for validating now Bill, tested on both arch's on mga3 as it's an update just for mga3, have a go at it. You just have to follow the rest of the validation procedure, through to the end.
Comment 13 William Kenney 2013-06-25 20:49:46 CEST
Update validated

Advisory:
=================================
This update corrects the sphinx application erroring in that the user "sphinx" is unknown.


Updated packages in core/updates_testing:
========================

sphinx-2.0.6-6.mga3.i586.rpm
sphinx-2.0.6-6.mga3.x86_64.rpm

from SRPMS:
sphinx-2.0.6-6.mga3.src.rpm


Could sysadmin please push from core/updates_testing to core/updates.


Thank you!

CC: (none) => sysadmin-bugs

William Kenney 2013-06-25 20:50:12 CEST

Keywords: (none) => validated_update

Comment 14 William Kenney 2013-06-25 20:50:34 CEST
Hopefully that should do it.
Comment 15 claire robinson 2013-06-25 20:59:38 CEST
Great stuff, well done :)

Actually, bugzilla currently adds sysadmin into CC automatically when you add the validated_update keyword, it's worth checking it does though when you see the email on qa-bugs.
Comment 16 claire robinson 2013-06-26 08:27:36 CEST
Advisory uploaded
Comment 17 Nicolas Vigier 2013-06-26 20:23:19 CEST
http://advisories.mageia.org/MGAA-2013-0038.html

Status: ASSIGNED => RESOLVED
CC: (none) => boklm
Resolution: (none) => FIXED

Nicolas Vigier 2014-05-08 18:05:30 CEST

CC: boklm => (none)


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