Bug 699116

Summary: wicd shuts down when started by systemd
Product: [Fedora] Fedora Reporter: Guillaume Pasquet <etenil>
Component: wicdAssignee: David Cantrell <dcantrell>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: andrey.henneberg, bug, dcantrell, dswegen, fabio.dieguez, me, oxyfodu, perchibald
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: wicd-1.7.0-9.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-23 04:34:02 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:

Description Guillaume Pasquet 2011-04-23 09:15:54 UTC
Description of problem:
When starting the wicd daemon with systemd, the daemon starts and then shuts down almost immediately. No particular error messages logged.

However, when starting the daemon manually (su -c 'wicd'), it works well.

I have disabled SElinux.


Version-Release number of selected component (if applicable):
1.7.0-6.fc15

How reproducible:
Always

Steps to Reproduce:
1. su -c 'systemctl start wicd.service', or boot the machine (if service is enabled)
2. check wicd daemon doesn't run: the applet can't connect, the daemon doesn't appear in the task manager.
  
Actual results:
The wicd daemon doesn't run.

Expected results:
The wicd daemon runs.

Additional info:
Here's the wicd log when I start wicd from systemd:
2011/04/23 09:24:41 :: ---------------------------
2011/04/23 09:24:41 :: wicd initializing...
2011/04/23 09:24:41 :: ---------------------------
2011/04/23 09:24:41 :: wicd is version 1.7.0 552
2011/04/23 09:24:41 :: setting backend to external
2011/04/23 09:24:41 :: trying to load backend external
2011/04/23 09:24:41 :: successfully loaded backend external
2011/04/23 09:24:41 :: trying to load backend external
2011/04/23 09:24:41 :: successfully loaded backend external
2011/04/23 09:24:41 :: Automatically detected wireless interface wlan0
2011/04/23 09:24:41 :: setting wireless interface wlan0
2011/04/23 09:24:41 :: automatically detected wired interface em1
2011/04/23 09:24:41 :: setting wired interface em1
2011/04/23 09:24:41 :: setting wpa driver wext
2011/04/23 09:24:41 :: setting use global dns to False
2011/04/23 09:24:41 :: setting global dns
2011/04/23 09:24:41 :: global dns servers are None None None
2011/04/23 09:24:41 :: domain is None
2011/04/23 09:24:41 :: search domain is None
2011/04/23 09:24:41 :: setting automatically reconnect when connection drops True
2011/04/23 09:24:41 :: Setting dhcp client to 0
2011/04/23 09:24:41 :: Wireless configuration file found...
2011/04/23 09:24:41 :: Wired configuration file found...
2011/04/23 09:24:41 :: chmoding configuration files 0600...
2011/04/23 09:24:41 :: chowning configuration files root:root...
2011/04/23 09:24:41 :: Using wireless interface...wlan0
2011/04/23 09:24:41 :: Using wired interface...em1
2011/04/23 09:24:42 :: attempting to set hostname with dhclient
2011/04/23 09:24:42 :: using dhcpcd or another supported client may work better
2011/04/23 09:24:42 :: attempting to set hostname with dhclient
2011/04/23 09:24:42 :: using dhcpcd or another supported client may work better
2011/04/23 09:24:42 :: Daemon going down, killing wicd-monitor...
2011/04/23 09:24:42 :: Removing PID file...
2011/04/23 09:24:42 :: Shutting down...
2011/04/23 09:24:42 :: Exception KeyError: KeyError(-1216629056,) in <module 'threading' from '/usr/lib/python2.7/threading.pyo'> ignored

Comment 1 David Cantrell 2011-08-05 15:22:48 UTC
Can you try this as a /lib/systemd/system/wicd.service unit file:

[Unit]
Description=Wicd a wireless and wired network manager for Linux
Requires=syslog.target
After=syslog.target
Conflicts=NetworkManager-wait-online.service NetworkManager.service

[Service]
Type=dbus
BusName=org.wicd.daemon
ExecStart=/usr/sbin/wicd
ExecStop=/usr/sbin/wicd -k

[Install]
WantedBy=multi-user.target

Then try 'systemctl start wicd.servce' and see if wicd starts up.

Comment 2 Alex Pepper 2011-08-05 17:43:45 UTC
does not work
daemon starts but connection fails

wicd 1.7.0
systemd 26-8

Comment 3 David Cantrell 2011-08-11 21:17:19 UTC
I'm currently building a test update to fix this problem.  Looks the systemd unit file for wicd was basically broken.  I fixed that up so that systemd properly starts wicd and controls it.  I think you'll have to enable it if you want it started up at each boot.  I modeled it after the NetworkManager unit files.

Also missing was the D-Bus path or property or bus name definition file, whatever D-Bus calls it.  Again, modeled after NetworkManager so I think the wicd package fulfills the need there.

Lastly, the D-Bus connection policy for wicd was not exactly ideal.  wicd seems to encourage you to set up a group specifically for users who can control wicd.  I changed this to allow users who meet the at_console requirement for D-Bus to have full control of wicd.  I'm open to suggestions here.  If you guys think a special wicd group is better, I'll do that.  But I think at_console is sufficient.

There will be a notice here once I push the test update.  Please give it a try and let me know if wicd successfully starts, if the clients can connect (wicd-gtk and wicd-curses), and so on.

The work here will flow in to a wicd update for F-16 as the package there is identical to the one in F-15 right now, but it won't go out in the main release for F-16.

Comment 4 Fedora Update System 2011-08-11 21:24:40 UTC
wicd-1.7.0-9.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/wicd-1.7.0-9.fc15

Comment 5 Fedora Update System 2011-08-12 18:27:34 UTC
Package wicd-1.7.0-9.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing wicd-1.7.0-9.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/wicd-1.7.0-9.fc15
then log in and leave karma (feedback).

Comment 6 Alex Pepper 2011-08-14 18:39:48 UTC
it works
thanks

Comment 7 David Cantrell 2011-08-19 19:27:39 UTC
*** Bug 723554 has been marked as a duplicate of this bug. ***

Comment 8 David Cantrell 2011-08-19 19:43:25 UTC
*** Bug 712936 has been marked as a duplicate of this bug. ***

Comment 9 Fedora Update System 2011-08-23 04:33:57 UTC
wicd-1.7.0-9.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Raphael Campos 2012-01-18 20:12:39 UTC
It seems like the x86_64 package from Fedora 16 repository is still affected by this bug. Was it supposed to be updated aswell?

I'm running the installed version is 1.7.0-9.fc16. I've followed the instructions in this report, but the problem persists. There's also no update candidate on updates-testing.