22.1.5 Unbound MVC rework - loss of existing config - aliases can't be added

Started by Remington, April 09, 2022, 03:41:31 PM

Previous topic - Next topic
Hi,

updated from 22.1.4 to  22.2.5 with the Unbound MVC rework.

First the existing overwrites got lost and the new overwrites dialogue was completely empty.

Recreating the overwrites manually I found the I can't add aliases.
See attached screenshot.
The list of hosts is not filled correctly, instead of the hostname or FQDN only the domain is show, which doesn't help a lot to pick the right one.

But even if I fill the dialogue and click save, no alias is show sown in the overview. Unfortunately there is also no error message or such.

Not sure how to troubleshoot further, which logs I should look at.

Bye
  Thomas

Diged a little bit deeper and compared the config backups before the update and after.

Seems that the config for the overwrites has been moved from <opnsense><unbound> to <opnsense><OPNsense><unboundplus>

My tries to create an alias did made it into the config backup:

      <aliases>
        <alias uuid="be93fc19-0ae6-43ae-b43c-2e8bb2627f68">
          <enabled>1</enabled>
          <host>73272ebc-54a3-47cf-8ce0-a7a81c8a2a1c</host>
          <hostname>signalcli-api</hostname>
          <domain>wupp</domain>
        </alias>
        <alias uuid="19a41d16-d2a5-4b8f-814b-f39a995fe6c1">
          <enabled>1</enabled>
          <host>9f748e34-fd1a-44a0-a0f7-4357d31c6b1e</host>
          <hostname>signalcli-api</hostname>
          <domain>wupp</domain>
        </alias>
        [...]


But the don't show up in the UI. The uuids for the host exist as host entries.

Just found that a restore from backup limited to "Unbound DNS" is not writing the <unboundplus> part.
The docs already telling that partial restor is something that may get dropped.
May be this need to be removed from the list then to avoid confusion.

A `configctl unbound restart` or a restart of unbound from the WebUI seems to trigger some old code an generate the config from the old entries.

While `opnsene-shell reload` and "Apply" from the UI creates it in the right manner

I found the logic behind

The alias are only displayed for the host selected above.
I the same manner you can create an alias, be selecting the host and clicking the + button down in Aliases the right entry gets preselected and the alias is created as expected.

I am unsure if this works as designed, because is it very hard to keep an overview which aliases are configured at all.

Just wanted to add what I have observed which seems to be the same/similar issue:

  • My original alias configuration (prior to update) persists in the config.xml file under the unboundplus node (as described by op)
  • The alias configuration in config.xml is reflected in the unbound configuration file /var/unbound/host_entries.conf so everything is working normally
  • I can add new alias entries via the web UI and these appear in the unbound config and resolve fine
  • No alias entries (either the pre-existing ones or newly created entries) appear in the table in the web UI
The problem appears to only be cosmetic, the functionality of existing/new alias configuration still seems to work fine in unbound. Hopefully this helps clarify.

We haven't been able to reproduce but are aware of the problem due to multiple reports of this exact behaviour. Could be a client-side hiccup? Specific browser? Specific data? Specific language setting?


Cheers,
Franco

I can reproduce the not-working-add-an-alias in 22.1.6 (tried with firefox). Tried to add an entry, and because the list was empty afterwards in the "view" I added it a second time.
Downloaded the backup xml and found the entry twice.


if I restart unbound:

2022-04-28T20:30:22 Notice unbound dhcpd entry changed checkmk.suter.team @ x.x.x.x.
2022-04-28T20:30:22 Notice unbound dhcpd entry changed checkmk.ccintra.domain @ x.x.x.x.
2022-04-28T20:30:22 Notice unbound dhcpd entry changed bookmark.suter.team @ x.x.x.x.