Bug 31289 - init script does not always restart winbind properly
init script does not always restart winbind properly
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Arvid Requate
Stefan Gohmann
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-06 12:06 CEST by Janis Meybohm
Modified: 2013-05-28 12:18 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Meybohm univentionstaff 2013-05-06 12:06:18 CEST
Ticket#: 2013041521001883
Ticket#: 2013041521001721

It looks like the winbind restart does not always work properly. On the customer systems, the winbind process was shut down by the server password change and not restarted.

I guess this happens if winbind does not shut down within 2 seconds as the init script calls "start-stop-daemon" with "--oknodo" (even return exit 0 if no actions are taken) and, in case of stop, without "--retry".

restart is implemented as a simple "$0 stop && sleep 2 && $0 start"
Comment 1 Janis Meybohm univentionstaff 2013-05-06 12:08:41 CEST
Ticket#: 2013050621002996
Comment 2 Stefan Gohmann univentionstaff 2013-05-06 15:37:06 CEST
I've added a test case for this issue:
 /usr/share/ucs-test/50_samba/31winbind-restart

We should not change the default return value because this could change the upgrade behavior. For example:
Setting up libpam-winbind (2:3.6.8-1.563.201305061252) ...
Setting up libnss-winbind (2:3.6.8-1.563.201305061252) ...
Setting up winbind (2:3.6.8-1.563.201305061252) ...
Installing new version of config file /etc/init.d/winbind ...
Starting the Winbind daemon: winbind failed!
invoke-rc.d: initscript winbind, action "start" failed.
dpkg: error processing winbind (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 winbind
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@member622:~#
Comment 3 Arvid Requate univentionstaff 2013-05-06 21:02:24 CEST
start-stop-daemon --start is now run without --oknodo.
start-stop-daemon --stop is now run with --retry 2 --oknodo.

Advisory: 2013-05-02-samba.yaml
Comment 4 Stefan Gohmann univentionstaff 2013-05-07 07:02:05 CEST
OK, tests were successful. I've merged the latest patch to UCS 3.1-2 and copied the YAML text to the 3.1-2 changelog.
Comment 5 Janek Walkenhorst univentionstaff 2013-05-08 12:34:47 CEST
http://errata.univention.de/ucs/3.1/92.html
Comment 6 Arvid Requate univentionstaff 2013-05-28 12:18:41 CEST
*** Bug 30621 has been marked as a duplicate of this bug. ***