Bug 46072 - bind9 upgrade failed due to dlz_bind9_9.so: incorrect driver API version 2, requires 3
bind9 upgrade failed due to dlz_bind9_9.so: incorrect driver API version 2, r...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: DNS
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Arvid Requate
Stefan Gohmann
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-18 07:01 CET by Stefan Gohmann
Modified: 2018-03-14 14:37 CET (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
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
daemon.log (1.84 MB, text/plain)
2018-01-18 07:02 CET, Stefan Gohmann
Details
updater.log (3.20 MB, text/plain)
2018-01-18 07:02 CET, Stefan Gohmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2018-01-18 07:01:15 CET
The upgrade to UCS 4.3 fails in some Samba 4 environments.

Setting up bind9 (1:9.10.3.dfsg.P4-12.3+deb9u3A~4.3.0.201801041423) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.named ...
Installing new version of config file /etc/bind/bind.keys ...
Installing new version of config file /etc/bind/db.root ...
Installing new version of config file /etc/init.d/bind9.debian ...
Job for bind9.service failed because the control process exited with error code.
See "systemctl status bind9.service" and "journalctl -xe" for details.
invoke-rc.d: initscript bind9, action "start" failed.
â— bind9.service - LSB: bind9 Domain Name Server (DNS)
   Loaded: loaded (/etc/init.d/bind9; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-01-17 19:33:20 EST; 47ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5590 ExecStart=/etc/init.d/bind9 start (code=exited, status=1/FAILURE)
      CPU: 577ms

Jan 17 19:33:12 master071 systemd[1]: Starting LSB: bind9 Domain Name Serve…)...
Jan 17 19:33:20 master071 systemd[1]: bind9.service: Control process exited…us=1
Jan 17 19:33:20 master071 systemd[1]: Failed to start LSB: bind9 Domain Nam…NS).
Jan 17 19:33:20 master071 systemd[1]: bind9.service: Unit entered failed state.
Jan 17 19:33:20 master071 systemd[1]: bind9.service: Failed with result 'ex…de'.
Jan 17 19:33:20 master071 bind9[5590]: Starting bind9 Domain Name Server (D…led!
Hint: Some lines were ellipsized, use -l to show in full.
[1mdpkg:[0m error processing package bind9 (--configure):
 subprocess installed post-installation script returned error exit status 1
[1mdpkg:[0m dependency problems prevent configuration of univention-bind:
 univention-bind depends on bind9 (>= 1:9.8.0.P4); however:
  Package bind9 is not configured yet.

[1mdpkg:[0m error processing package univention-bind (--configure):
 dependency problems - leaving unconfigured
[1mdpkg:[0m dependency problems prevent configuration of univention-server-master:
 univention-server-master depends on univention-bind; however:
  Package univention-bind is not configured yet.

[1mdpkg:[0m error processing package univention-server-master (--configure):
 dependency problems - leaving unconfigured

From daemon.log:
[...]
Jan 17 19:33:26 master071 named[5989]: listening on IPv6 interfaces, port 53
Jan 17 19:33:26 master071 named[5989]: listening on IPv4 interface lo, 127.0.0.1#53
Jan 17 19:33:26 master071 named[5989]: listening on IPv4 interface eth0, 10.210.138.192#53
Jan 17 19:33:26 master071 named[5989]: listening on IPv4 interface docker0, 172.17.42.1#53
Jan 17 19:33:26 master071 named[5989]: generating session key for dynamic DNS
Jan 17 19:33:26 master071 named[5989]: sizing zone task pool based on 1 zones
Jan 17 19:33:26 master071 named[5989]: Loading 'samba4.zone' using driver dlopen
Jan 17 19:33:26 master071 named[5989]: dlz_dlopen: /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_9.so: incorrect driver API version 2, requires 3
Jan 17 19:33:26 master071 named[5989]: dlz_dlopen of 'samba4.zone' failed
Jan 17 19:33:26 master071 named[5989]: SDLZ driver failed to load.
Jan 17 19:33:26 master071 named[5989]: DLZ driver failed to load.
Jan 17 19:33:26 master071 named[5989]: loading configuration: failure
[...]
Comment 1 Stefan Gohmann univentionstaff 2018-01-18 07:02:15 CET
Created attachment 9348 [details]
daemon.log
Comment 2 Stefan Gohmann univentionstaff 2018-01-18 07:02:32 CET
Created attachment 9349 [details]
updater.log
Comment 3 Philipp Hahn univentionstaff 2018-01-18 10:22:05 CET
(In reply to Stefan Gohmann from comment #0)
> Jan 17 19:33:26 master071 named[5989]: dlz_dlopen: /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_9.so: incorrect driver API version 2, requires 3

Should have been fixed by git:a72b56a1ade for Bug #45326 in univention-bind_12.0.0-3

But as 2 packages are involved with the upgrade (bind9, univention-bind9), there is a time period where the configuration is broken:
- bind9 < univention-bind: new BIND9 will not restart with the old UCR template
- univention-bind < bind9: old BIND9 will not restart with the new UCR template
Comment 4 Arvid Requate univentionstaff 2018-01-18 13:59:07 CET
We had this already for Bug #43200 ,fixed by commit e171efe07881a49150842b8c8fd6a72bb1b5585f , but apparently this doesn't cut it this time.

Stefan suggested patching bin9.postinst like
==============================================
--- bind9.postinst.orig 2017-08-25 19:41:38.933454000 +0200
+++ bind9.postinst      2017-08-25 19:41:41.885454000 +0200
@@ -158,9 +158,9 @@
     fi
 
     if pidof /usr/sbin/named >/dev/null 2>&1; then
-       [ -x /etc/init.d/bind9 ] && invoke-rc.d bind9 restart
+       [ -x /etc/init.d/bind9 ] && invoke-rc.d bind9 restart || true
     else
-       [ -x /etc/init.d/bind9 ] && invoke-rc.d bind9 start
+       [ -x /etc/init.d/bind9 ] && invoke-rc.d bind9 start || true
     fi
 fi
 
==============================================
Comment 5 Arvid Requate univentionstaff 2018-01-18 19:05:08 CET
I've committed the bind9 patch as
* 0015-Bug-46072-Tolerate-restart-failure-in-postinst.patch

The package has bee rebuilt, let's wait for the verdict of Jenkins.
Comment 6 Stefan Gohmann univentionstaff 2018-01-30 15:29:14 CET
It looks much better now.
Comment 7 Stefan Gohmann univentionstaff 2018-03-14 14:37:49 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

If this error occurs again, please use "Clone This Bug".