Bug 1436268

Summary: crash when server_id is not present in named.conf
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Krizek <tkrizek>
Component: bind-dyndb-ldapAssignee: Tomas Krizek <tkrizek>
Status: CLOSED ERRATA QA Contact: Nikhil Dehadrai <ndehadra>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: ksiddiqu, ndehadra, pspacek, pvoborni
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bind-dyndb-ldap-11.1-3.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:27:49 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 Tomas Krizek 2017-03-27 14:17:33 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/bind-dyndb-ldap/issue/172

### Problem
#### What does not work as expected?
When `server_id` is not specified in the configuration file, bind-dyndb-ldap will crash when it's trying to parse the configuration:

```
named-pkcs11[19546]: cannot parse settings for 'named.conf for database dns-ldap': not found
named-pkcs11[19546]: dynamic database 'dns-ldap' configuration failed: not found
named-pkcs11[19546]: loading configuration: not found
named-pkcs11[19546]: exiting (due to fatal error)
```

This is most likely a regression caused by the API changes. The bug is *not* present for bind-dyndb-ldap-10.1-1.fc24.x86_64.

### Steps to Reproduce

* remove `server_id` from `/etc/named.conf`
* `systemctl restart named-pkcs11`

### Environment
* Plugin version: bind-dyndb-ldap-11.1-1.fc27.x86_64

* Version of BIND: bind-9.11.0-6.P2.fc25.x86_64

* Do you use bind-dyndb-ldap as part of FreeIPA installation? 
This issue happens when using bind-dyndb-ldap standalone, because FreeIPA does specify `server_id` in the default template.

### Workaround

* specify `server_Id "";` in `/etc/named.conf`
* `systemctl start named-pkcs11`

Comment 5 Tomas Krizek 2017-04-26 11:37:53 UTC
Fixed upstream

master

- https://pagure.io/bind-dyndb-ldap/c/41461fc444170ffd9b5459e2f0b2480f3288cc1d

Comment 7 Nikhil Dehadrai 2017-05-02 08:22:24 UTC
ipa server version: ipa-server-4.5.0-9.el7.x86_64
bind-dyndb-ldap version: bind-dyndb-ldap-11.1-3.el7.x86_64

Tested the bug with following observations:
1. IPA upgrade from RHEL 7.2.z to RHEL 7.4 is successful.
2. IPA upgrade from RHEL 7.1.z to RHEL 7.4 FAILS.

Thus from above observation, changing the status of bug to "ASSIGNED".

Comment 10 Tomas Krizek 2017-05-02 10:11:15 UTC
The IPA upgrade from RHEL 7.1.z is a different issue, see bug 1447284.

This bug is fixed, otherwise the upgrade from 7.2.z would fail as well. I'm changing state back to ON_QA.

Comment 11 Nikhil Dehadrai 2017-05-02 10:53:35 UTC
Based on observations in above comment#7 and Comment#10, marking the status of bug to "VERIFIED".

For the IPA upgrade issue wth RHEL 7.1.z to RHEL 7.4, a separate bug BZ#1447284 is logged.

Comment 12 errata-xmlrpc 2017-08-01 19:27:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2120