After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784468 - [review] lr/dns-mode-multiple: allow multiple DNS handlers
[review] lr/dns-mode-multiple: allow multiple DNS handlers
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: nm-review
 
 
Reported: 2017-07-03 07:21 UTC by Lubomir Rintel
Modified: 2020-11-12 14:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lubomir Rintel 2017-07-03 07:21:27 UTC
This branch essentially allows keeping systemd-resolved up to date even though it is not configured to be used by the system resolver.

https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=lr/dns-mode-multiple
Comment 1 Beniamino Galvani 2017-07-04 08:29:06 UTC
> dns: move rate limiting to NMDnsPlugin

+       /* Lets the subclass know * when the nameserver subprocess

Extra '*'.


> dns: replace the FAILED and CHILD_QUIT signals with a STATE property

+       g_object_class_install_property (object_class, PROP_STATE,
+           g_param_spec_boolean (NM_DNS_PLUGIN_STATE, "", "", FALSE,
+                                 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

g_param_spec_uint ?


		_LOGD ("update-dns: updating plugin %s", plugin_name);
+               g_signal_handlers_block_by_func (plugin, plugin_state_changed, self);
		if (!nm_dns_plugin_update (plugin,
                                           priv->configs,
                                           global_config,
                                           priv->hostname)) {

Why do we need to temporarily block the signal handler? It seems to me
that ->update() doesn't directly trigger a state change, and it
shouldn't matter whether an asynchronous signal is handled in
nm_dns_plugin_update() or just after.
Comment 2 Lubomir Rintel 2017-07-07 12:37:06 UTC
(In reply to Beniamino Galvani from comment #1)
> > dns: move rate limiting to NMDnsPlugin
> 
> +       /* Lets the subclass know * when the nameserver subprocess
> 
> Extra '*'.

Fixed.

> > dns: replace the FAILED and CHILD_QUIT signals with a STATE property
> 
> +       g_object_class_install_property (object_class, PROP_STATE,
> +           g_param_spec_boolean (NM_DNS_PLUGIN_STATE, "", "", FALSE,
> +                                 G_PARAM_READABLE |
> G_PARAM_STATIC_STRINGS));
> 
> g_param_spec_uint ?

Fixed.

> 		_LOGD ("update-dns: updating plugin %s", plugin_name);
> +               g_signal_handlers_block_by_func (plugin,
> plugin_state_changed, self);
> 		if (!nm_dns_plugin_update (plugin,
>                                            priv->configs,
>                                            global_config,
>                                            priv->hostname)) {
> 
> Why do we need to temporarily block the signal handler? It seems to me
> that ->update() doesn't directly trigger a state change,

NMDnsUnbound's update() does trigger a state change.

> and it
> shouldn't matter whether an asynchronous signal is handled in
> nm_dns_plugin_update() or just after.

The signal emitted during update() is not handled after unblocking it; it's simply dropped. Which is good, we don't want to do anything about it, we just inspect the state below the update() call.

Pushed an updated branch.
Comment 3 Thomas Haller 2017-07-07 13:43:46 UTC
> dns: move rate limiting to NMDnsPlugin
    
when watch_cb() ratelimites the restart, it pretends the plugin is still running. That seems ugly. Now that you add states, can there be a special state RATE_LIMITED.



pushed some fixups.



Previously, NMDnsManager had a detection of resolved (_resolvconf_resolved_managed), but it would only enable resolved, when "dns" configuration was unspecified and it was detected.

Now, it enables resolved, when the "dns" configuration is unspecified. Don't you yet errors in the logfiles when running without resolved now?

If somebody configures "dns" explicitly, and updating the DNS fails, there should be errors in the logfile. If somebody does not configure resolved, then there should be no errors.

I think, the default should be the same as before: "default" or (if detected) "systemd-resolved", and resurrect _resolvconf_resolved_managed().
Comment 4 André Klapper 2020-11-12 14:30:15 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).