Hi Andreas, If for ANY reason winbind service is not startable APT will be broken - that's the regression this ticket must address.
The samba-winbind package has introduced hard dependency on external systems during installation process. 1. systemd - a failure to start service will breaks apt package manager. 2. PDC/BDC - a timeout or connect reset breaks apt package manager. 3. Network availability There is no debate - the reactive manifesto is clear that samba-winbind should be designed per best practice. https://www.reactivemanifesto.org/glossary#Non-Blocking A non-blocking API to a resource allows the caller the option to do other work rather than be blocked waiting on the resource to become available. https://www.reactivemanifesto.org/glossary#Message-Driven Responding to the failure of a component in order to restore its proper function, on the other hand, requires a treatment of these failures that is not tied to ephemeral client requests, but that responds to the overall component health state Please fix samba-winbind package to send non-blocking request systemd start winbind. Breaking apt is irresponsible (and legally unwise I imagine). Start winbind service in not-blocking fashion so system can continue to function. best regards, Noel On Mon, Mar 11, 2019 at 8:50 PM Andreas Hasenack <andr...@canonical.com> wrote: > About the package vs system managers debate, I'll just comment that it's > not that simple, and that a package that is yet to be installed might > need a service running already, and if that service failed to start, > what should it do? apt stopped (it didn't "break"), so that the admin > could figure out what is wrong. > > Regarding the steps you took, I can't troubleshoot your deployment system, > but I do see that you are starting services several times, and updating > config files in between. I would suggest the following: > - install packages you need > - update config files as you need them > - join domain if needed > - then (re)start services > > What you are doing, but I don't have your config files at hand to > confirm, is restart the services with a configuration that is not yet > valid. In particular, winbind is expecting to be joined to a domain > already in the config you give it, but when it looks for the secret, it > can't find it. > > Perhaps another option for you is to use policy-rc.d where you can > create a policy of when services should be (re)started. See the "INIT > SCRIPT POLICY" section in invoke-rc.d(8) manpage, or the /usr/share/doc > /init-system-helpers/README.policy-rc.d.gz file (installed by the init- > system-helpers package). > > -- > You received this bug notification because you are subscribed to the bug > report. > https://bugs.launchpad.net/bugs/1818431 > > Title: > Winbind failing to start leads to postinst erroring out > > Status in samba package in Ubuntu: > Incomplete > > Bug description: > Ubuntu 16.04 just works: Winbind was a smooth experience. We install > `winbind`, `libnss-winbind`, and `libpam-winbind` using APT > successfully, join the Domain/Realm, and start winbind with systemd! > > Ubuntu 18.04 is regression: The `winbind` package breaks APT/DPGK > package manager because `/var/lib/dpkg/info/winbind.postinst` is > trying to start the service - that's bad regression. > > I need package-manager (apt/dpkg) to handle packages, and service- > manager (systemd/upstart) to manage services. Can the winbind package > maintainer do anything to reverse the regression? > > I have been reading up on debhelper but cannot find a way to prevent > breaking apt. > > ``` > ~$ dpkg-query --list | grep winbind > iU libnss-winbind:amd64 > 2:4.7.6+dfsg~ubuntu-0ubuntu2.6 amd64 Samba nameservice > integration plugins > iU libpam-winbind:amd64 > 2:4.7.6+dfsg~ubuntu-0ubuntu2.6 amd64 Windows domain > authentication integration plugin > ii libwbclient0:amd64 > 2:4.7.6+dfsg~ubuntu-0ubuntu2.6 amd64 Samba winbind client > library > iF winbind > 2:4.7.6+dfsg~ubuntu-0ubuntu2.6 amd64 service to resolve user > and gro > > ... trace ... > > Active: failed (Result: exit-code) since Sun 2019-03-03 11:30:11 MST; > 19ms ago > Docs: man:winbindd(8) > man:samba(7) > man:smb.conf(5) > Process: 43699 ExecStart=/usr/sbin/winbindd --foreground > --no-process-group $WINBINDOPTIONS (code=exited, status=1/FAILURE) > Main PID: 43699 (code=exited, status=1/FAILURE) > > Mar 03 11:30:11 myhost1 systemd[1]: Starting Samba Winbind Daemon... > Mar 03 11:30:11 myhost1 winbindd[43699]: [2019/03/03 11:30:11.597251, > 0] ../source3/winbindd/winbindd_cache.c:3170(initialize_winbindd_cache) > Mar 03 11:30:11 myhost1 winbindd[43699]: initialize_winbindd_cache: > clearing cache and re-creating with version number 2 > Mar 03 11:30:11 myhost1 winbindd[43699]: [2019/03/03 11:30:11.600710, > 0] ../source3/winbindd/winbindd_util.c:891(init_domain_list) > Mar 03 11:30:11 myhost1 winbindd[43699]: Could not fetch our SID - did > we join? > Mar 03 11:30:11 myhost1 winbindd[43699]: [2019/03/03 11:30:11.600854, > 0] ../source3/winbindd/winbindd.c:1366(winbindd_register_handlers) > Mar 03 11:30:11 myhost1 winbindd[43699]: unable to initialize domain > list > Mar 03 11:30:11 myhost1 systemd[1]: winbind.service: Main process > exited, code=exited, status=1/FAILURE > Mar 03 11:30:11 myhost1 systemd[1]: winbind.service: Failed with result > 'exit-code'. > Mar 03 11:30:11 myhost1 systemd[1]: Failed to start Samba Winbind Daemon. > dpkg: error processing package winbind (--configure): > installed winbind package post-installation script subprocess returned > error exit status 1 > dpkg: dependency problems prevent configuration of libpam-winbind:amd64: > libpam-winbind:amd64 depends on winbind (= > 2:4.7.6+dfsg~ubuntu-0ubuntu2.6); however: > Package winbind is not configured yet. > > dpkg: error processing package libpam-winbind:amd64 (--configure): > dependency problems - leaving unconfigured > dpkg: dependency problems prevent configuration of libnss-winbind:amd64: > libnss-winbind:amd64 depends on winbind (= > 2:4.7.6+dfsg~ubuntu-0ubuntu2.6); however: > Package winbind is not configured yet. > > dpkg: error processing package libnss-winbind:amd64 (--configure): > dependency problems - leaving unconfigured > Processing triggers for libc-bin (2.27-3ubuntu1) ... > Errors were encountered while processing: > winbind > libpam-winbind:amd64 > libnss-winbind:amd64 > ``` > > To manage notifications about this bug go to: > https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1818431/+subscriptions > -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1818431 Title: Winbind failing to start leads to postinst erroring out To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1818431/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs