Bug 467871

Summary: s-c-s GUI remains grey if pure-ftpd is installed
Product: [Fedora] Fedora Reporter: Michal Schmidt <mschmidt>
Component: system-config-servicesAssignee: Nils Philippsen <nphilipp>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: 17083525, ea6825, jefferyjohnson1969, jrodary, nphilipp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-25 09:08:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 446451    

Description Michal Schmidt 2008-10-21 13:13:30 UTC
Description of problem:
system-config-services starts, but the GUI elements remain grey indefinitely.

Version-Release number of selected component (if applicable):
system-config-services-0.99.24-1.fc10.noarch
pure-ftpd-1.0.21-16.fc10.x86_64

How reproducible:
100%

Steps to Reproduce:
1. install pure-ftpd
2. run system-config-services
  
Actual results:
system-config-services starts but remains grey forever.

Expected results:
The GUI should start working after a few seconds.

Additional info:
pure-ftpd is special in that it install both a SysV service and a xinetd service:
/etc/init.d/xinetd
/etc/xinetd.d/pure-ftpd

Let's look at /usr/lib/python2.5/site-packages/scservices/core/services.py, line 412, function _async_load. It assumes that 'chkconfig --list pure-ftpd' will output a string corresponding to the status of the pure-ftpd service in xinetd.d, but instead it gets the SysV service line:
pure-ftpd      	0:off	1:off	2:off	3:off	4:off	5:off	6:off
This does not match the regular expression it expects and the services-mechanism gets stuck somehow.

There are two issues:
1. s-c-s should fail more gracefully, just skip the service it can't parse.

2. See also a related chkconfig bug 467863. Unless that one is solved, s-c-s should have a workaround (perhaps parse xinetd configuration files by itself?).

Comment 1 Bug Zapper 2008-11-26 04:05:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

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

Comment 2 Jacques Rodary 2008-12-15 12:13:48 UTC
I have the same problem with this output:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/scservices/core/asynccmd.py", line 96, in on_fd
    self._finish ()
  File "/usr/lib/python2.5/site-packages/scservices/core/asynccmd.py", line 108, in _finish
    self.ready_cb (self, *self.ready_args, **self.ready_kwargs)
  File "/usr/lib/python2.5/site-packages/scservices/core/asynccmd.py", line 153, in _ready_cb
    ready_cb (cmd, *p, **k)
  File "/usr/lib/python2.5/site-packages/scservices/core/services.py", line 101, in _async_load_ready
    self._async_load_process (cmd)
  File "/usr/lib/python2.5/site-packages/scservices/core/services.py", line 436, in _async_load_process
    raise output
pure-ftpd      	0:off	1:off	2:off	3:off	4:off	5:off	6:off

Comment 3 Jacques Rodary 2008-12-15 12:31:32 UTC
I don't quite understand what happened: closing s-c-s and then sending ^C gives:

^CTraceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/gamin.py", line 107, in _internal_callback
    self.callback (path, event, self.data)
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 61, in on_dir_changed
    self.on_dir_changed (path, action, dir)
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 284, in on_dir_changed
    self.create_service_delayed (path)
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 295, in create_service_delayed
    self.create_service_cb (name)
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 302, in create_service_cb
    self.create_service (name)
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 113, in create_service
    serviceobj = self.service_class (name, self.mon, self)
  File "/usr/lib/python2.5/site-packages/scservices/core/services.py", line 408, in __init__
    self.load ()
  File "/usr/lib/python2.5/site-packages/scservices/core/services.py", line 82, in load
    mainloop.run ()
KeyboardInterrupt
/usr/sbin/system-config-services:580: GtkWarning: gtk_tree_view_scroll_to_cell: assertion `tree_view->priv->model != NULL' failed
  self.servicesTreeView.scroll_to_cell (path)
/usr/sbin/system-config-services:677: GtkWarning: gtk_tree_selection_select_iter: assertion `selection->tree_view != NULL' failed
  self.servicesTreeView.selection.select_iter (iter)
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/gamin.py", line 107, in _internal_callback
    self.callback (path, event, self.data)
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 61, in on_dir_changed
    self.on_dir_changed (path, action, dir)
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 275, in on_dir_changed
    self.set_ready ()
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 267, in set_ready
    super (XinetdServiceHerder, self).set_ready ()
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 98, in set_ready
    self.notify (SVC_HERDER_READY)
  File "/usr/lib/python2.5/site-packages/scservices/core/serviceherders.py", line 149, in notify
    change = change, *subscriber.p, **k)
  File "/usr/sbin/system-config-services", line 557, in on_services_changed
    self.on_service_herder_ready (herder)
  File "/usr/sbin/system-config-services", line 666, in on_service_herder_ready
    self.enable ()
  File "/usr/sbin/system-config-services", line 680, in enable
    self.mainWindow.window.set_cursor (None)
AttributeError: 'NoneType' object has no attribute 'set_cursor'

sending ^C without closing the s-c-s window gets s-c-s to start!!

Comment 4 Nils Philippsen 2009-02-17 11:34:14 UTC
*** Bug 484915 has been marked as a duplicate of this bug. ***

Comment 5 Nils Philippsen 2009-02-17 11:34:43 UTC
*** Bug 479577 has been marked as a duplicate of this bug. ***

Comment 6 Nils Philippsen 2009-02-17 11:55:40 UTC
Bug #467867 which covers the chkconfig side of this is closed, i.e. with chkconfig >= 1.3.40, you can request information about a specific service type which would let system-config-services query about both sysv and xinetd types of the pure-ftpd service explicitly.

I intend to fix this in two steps:

1. Let s-c-services cope better with unexpected output from chkconfig (or other tools it uses). Don't simply raise an expection (which doesn't get caught and in consequence frustrates users), but e.g. flag the service configuration as "unknown".

2. If chkconfig >= 1.3.40 is available, use the "--type <sysv|xinetd>" parameter to explicitly request information about the specific type of a service.

Comment 7 Nils Philippsen 2009-02-18 15:23:18 UTC
*** Bug 486004 has been marked as a duplicate of this bug. ***

Comment 8 Nils Philippsen 2009-02-19 16:40:49 UTC
Fixed #1 in system-config-services-0.99.31-1.fc11 in Rawhide.

Comment 9 Fedora Update System 2009-08-11 13:47:38 UTC
system-config-services-0.99.34-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/system-config-services-0.99.34-1.fc10

Comment 10 Fedora Update System 2009-08-25 04:27:18 UTC
system-config-services-0.99.35-1.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-08-25 04:36:41 UTC
system-config-services-0.99.35-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Nils Philippsen 2009-08-25 09:08:45 UTC
(In reply to comment #6)
> Bug #467867 which covers the chkconfig side of this is closed, i.e. with
> chkconfig >= 1.3.40, you can request information about a specific service type
> which would let system-config-services query about both sysv and xinetd types
> of the pure-ftpd service explicitly.

Actually, I meant bug #467863. With the above updates and chkconfig >= 1.3.40, system-config-services should show you two instances of pure-ftpd, one for the SysV and one for the Xinetd service. Take care that you just enable one of them at a time ;-).