Opened 7 years ago

Closed 6 years ago

#2947 closed defect (fixed)

Old static DS breaks loading of other zones

Reported by: vorner Owned by: muks
Priority: high Milestone: Sprint-20130625
Component: b10-auth Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Very High
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 3 Add Hours to Ticket: 0
Total Hours: 0.79 Internal?: no

Description

I upgraded by

git pull
make
make install

I did not remove the previous installation. This upgrade left the old static_ds.so in place, as the new one no longer exists.

I also did not upgrade the configuration (because it didn't cross my mind first). The server started, but it turns out no zones at all are loaded or served. If I try to change the configuration, I get this:

> config set data_sources/classes/IN[0]/cache-enable false
> config commit
Error: dlopen failed for /usr/local/libexec/bind10/backends/static_ds.so: /usr/local/libexec/bind10/backends/static_ds.so: undefined symbol: _ZN3isc7datasrc14InMemoryClient7addZoneEN5boost10shared_ptrINS0_10ZoneFinderEEE
Configuration not committed
> 

I believe we generally wanted to serve whatever zones we are able to, so if CH zone is not available, it should not disturb any IN zones. Bus as the file is there and fails to load, it seems we don't catch all the possible exceptions.

Subtickets

Attachments (1)

b10-config.db (585 bytes) - added by vorner 6 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 7 years ago by jreed

  • Defect Severity changed from N/A to Very High
  • Priority changed from medium to high

I see I have same problem. I didn't have any automated existing run of bind10 using previous install directory to test this. (Even though I had planned too.)

When restarting:

2013-05-09 11:10:18.308 ERROR [b10-auth.auth/24610] AUTH_DATASRC_CLIENTS_BUILDER
_RECONFIGURE_DATASRC_ERROR Error setting up data source: dlopen failed for /home
/reed/opt/bind10/libexec/bind10/backends/static_ds.so: /home/reed/opt/bind10/lib
exec/bind10/backends/static_ds.so: Undefined PLT symbol "_ZN3isc7datasrc6memory1
6ZoneTableSegment6createERKNS_4data7ElementERKNS_3dns7RRClassE" (symnum = 35)

(On the systems I did run, I used packages that removed existing files first, so didn't notice.)

This is a severe issue and we shouldn't do next release without this fixed or workaround that checks for it during install time. For the beta2, we could consider documenting the problem in release notes.

comment:2 Changed 7 years ago by jreed

I didn't realize from the Changelog 598 entry that fixing the CH static type entry would also fix the IN sqlite3 zones. So this issue is not severe as I suggested.

comment:3 Changed 7 years ago by muks

  • Estimated Difficulty changed from 0 to 3

comment:4 Changed 7 years ago by muks

  • Milestone changed from New Tasks to Sprint-20130611

comment:5 Changed 7 years ago by muks

  • Owner set to muks
  • Status changed from new to assigned

Picking

comment:6 Changed 7 years ago by muks

  • Owner changed from muks to UnAssigned

comment:7 Changed 7 years ago by muks

  • Owner changed from UnAssigned to muks

Picking again.

comment:8 Changed 6 years ago by muks

  • Owner changed from muks to vorner
  • Status changed from assigned to reviewing

Michal: Are you able to reproduce this issue with current master? I'm not able to. If you can reproduce, please can you attach your b10-config.db ?

comment:9 Changed 6 years ago by vorner

Hello

Yes, I can reproduce. I did this:

  • Checked out some old version, before the removal of the static data source (I tried with 119eed9938b17cbad3a74c823aa9eddb7cd337c2).
  • Enabled the auth server.
  • Committed configuration.
  • Shut down bind10.
  • Compiled current master, installed.
  • Started it.

This is in the logs.

2013-06-17 12:42:36.438 INFO  [b10-auth.auth/4765] AUTH_SERVER_CREATED server created
2013-06-17 12:42:36.439 INFO  [b10-auth.auth/4765] AUTH_DATASRC_CLIENTS_BUILDER_STARTED data source builder thread started
2013-06-17 12:42:36.441 INFO  [b10-init.init/4755] BIND10_SOCKET_GET requesting socket [::]:5300 of type TCP from the creator
2013-06-17 12:42:36.441 INFO  [b10-init.init/4755] BIND10_SOCKET_CREATED successfully created socket 22
2013-06-17 12:42:36.442 INFO  [b10-init.init/4755] BIND10_SOCKET_GET requesting socket [::]:5300 of type UDP from the creator
2013-06-17 12:42:36.442 INFO  [b10-init.init/4755] BIND10_SOCKET_CREATED successfully created socket 23
2013-06-17 12:42:36.443 INFO  [b10-init.init/4755] BIND10_SOCKET_GET requesting socket [0.0.0.0]:5300 of type TCP from the creator
2013-06-17 12:42:36.443 INFO  [b10-init.init/4755] BIND10_SOCKET_CREATED successfully created socket 24
2013-06-17 12:42:36.443 INFO  [b10-init.init/4755] BIND10_SOCKET_GET requesting socket [0.0.0.0]:5300 of type UDP from the creator
2013-06-17 12:42:36.443 INFO  [b10-init.init/4755] BIND10_SOCKET_CREATED successfully created socket 25
2013-06-17 12:42:36.446 INFO  [b10-auth.auth/4765] AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_STARTED data source reconfiguration started
2013-06-17 12:42:36.446 INFO  [b10-auth.auth/4765] AUTH_SERVER_STARTED server started
2013-06-17 12:42:36.472 ERROR [b10-auth.auth/4765] AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_DATASRC_ERROR Error setting up data source: dlopen failed for /home/vorner/testing/bind10/libexec/bind10/backends/static_ds.so: /home/vorner/testing/bind10/libexec/bind10/backends/static_ds.so: undefined symbol: _ZN3isc7datasrc6memory16ZoneTableSegment6createERKNS_4data7ElementERKNS_3dns7RRClassE
2013-06-17 12:42:36.497 INFO  [b10-stats.stats/4767] STATS_STARTING starting

Changed 6 years ago by vorner

comment:10 Changed 6 years ago by vorner

  • Owner changed from vorner to muks

comment:11 Changed 6 years ago by muks

I am able to reproduce this issue now. Working on it.

comment:12 Changed 6 years ago by muks

  • Owner changed from muks to UnAssigned

Up for review.

comment:13 Changed 6 years ago by muks

I pushed some more commits up to cea931d3c7650054666885e3eed563d0de597e06 to the branch.

comment:14 Changed 6 years ago by muks

Apart from the added ListTest and the lettuce query test updates, I have checked that b10-auth fails to serve a zone without this branch when a broken library exists, and correctly serves the zone with this branch.

comment:15 Changed 6 years ago by muks

I just realised this would need a ChangeLog entry. Will add one soon.

comment:16 Changed 6 years ago by vorner

  • Owner changed from UnAssigned to vorner

comment:17 follow-up: Changed 6 years ago by vorner

  • Owner changed from vorner to muks

Hello

I'm looking forward to the changelog entry ;-).

May I ask if there was some reason to branch from different branch and not from master?

Also, two small suggestions:

  • I believe the correct log level is ERROR since we know something is definitely wrong here.
  • Can the lettuce check also check the error is actually reported?

comment:18 in reply to: ↑ 17 Changed 6 years ago by muks

  • Owner changed from muks to vorner

Hi Michal

Replying to vorner:

Hello

I'm looking forward to the changelog entry ;-).

Here it is. :)

+XYZ.   [bug]           muks
+       If there is a problem loading the backend module for a type of
+       data source, b10-auth would not serve any zones. This behaviour
+       has been changed now so that we serve zones from all other usable
+       data sources that were configured.
+       (Trac #2947, git ...)

May I ask if there was some reason to branch from different branch and not from master?

It was not intentional. This has been fixed and a new branch on top of current master was created as trac2947_2. The commits are the same.

Also, two small suggestions:

  • I believe the correct log level is ERROR since we know something is definitely wrong here.

Updated.

  • Can the lettuce check also check the error is actually reported?

This check has also been added.

comment:19 Changed 6 years ago by vorner

  • Owner changed from vorner to muks
  • Total Hours changed from 0 to 0.79

The code looks OK to merge. However, I'd recommend not talking in first person
about serving the zones (I was once told by someone that it is not good
practice in changelog, because it may be confusing ‒ is „us“ the server, ISC,
or who).

comment:20 Changed 6 years ago by muks

Good point.

I'll change it to "... so that it serves zones from all other...".

comment:21 Changed 6 years ago by muks

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged to master branch in commit 9a3ddf1e2bfa2546bfcc7df6d9b11bfbdb5cf35f:

* 348d7dc [2947] Check in lettuce test that the appropriate log message is generated
* 19e016e [2947] Change severity of log message to ERROR
* c730f9a [2947] Extend lettuce query test config to include broken datasource type
* 253803e [2947] Remove another obsolete testcase
* 9df9a67 [2947] Remove an obsolete testcase
* ced15db [2947] Add testcase to check that library errors don't cause rest of data sources to be skipped
* db2f7c5 [2947] Update exception hierarchy
* f57669e [2947] Continue configuring other data sources even if there is a DataSourceLibraryError
* c7115f5 [2947] Delete trailing whitespace

Also pushed the following commits to master branch after the merge:

* 18155a6 [master] Add ChangeLog entry for #2947
* d1da93e [master] Delete trailing whitespace from ChangeLog
* 5f57054 [master] Comment lettuce feature about checking for DATASRC_LIBRARY_ERROR

Resolving as fixed. Thank you for the reviews Michal.

Note: See TracTickets for help on using tickets.