Bug #90579 please document how to configure the dragnet 8.0 logging non-interactively
Submitted: 23 Apr 16:52 Modified: 11 May 10:58
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:8.0.11 OS:Any
Assigned to: CPU Architecture:Any
Tags: 8.0.11, dragnet, logging, non-interactive configuration

[23 Apr 16:52] Simon Mudd
Description:
There are instructions for interactively doing this here. https://dev.mysql.com/doc/refman/8.0/en/error-log-filtering.html so I tried to add the following into /etc/my.cnf (CentOS 7)

# Add log filtering to 8.0 in /etc/my.cnf, [mysqld] section
plugin-load-add='file://component_log_filter_dragnet'
log_error_services='log_filter_dragnet; log_sink_internal'
dragnet.log_error_filter_rules='IF err_code == 10927 or err_code == 10914 then drop.'

However, this gives an error:

2018-04-23T16:45:43.944595Z 0 [ERROR] [MY-011071] [Server] unknown variable 'dragnet.log_error_filter_rules=IF err_code == 10927 or err_code == 10914 then drop.'
2018-04-23T16:45:43.944616Z 0 [Warning] [MY-010952] [Server] The privilege system failed to initialize correctly. If you have upgraded your server, make sure you're executi
ng mysql_upgrade to correct the issue.

If you've first done the  INSTALL COMPONENT ... thing it all works.

How to repeat:
See: above.

Suggested fix:
I want to be able to configure a server non-interactively to enable (for example) the indicated filter.

Please ensure that the documentation explains how to configure the server to do this (via /etc/my.cnf) and perhaps explain what's necessary here too.
[23 Apr 19:24] Simon Mudd
adjust tags (as I'd made a spelling mistake
[23 Apr 19:27] Simon Mudd
Also notice there's no mention made here about this: https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html (or not that I could understand) and probably there should be as referencing to variables is here but not to the component subsystem and how components should be configured.

I also suspect there might be a desire to no longer use /etc/my.cnf except for basic settings and only to use the new persistent settings but don't see that mentioned either.

So some clarity on "best practices" for configuring 8.0 given there are many ways to do this would be most helpful.
[23 Apr 19:32] Thomas Johansson
The same issue affects the validate password-component, and any given component I assume.
https://dev.mysql.com/doc/refman/8.0/en/validate-password.html
[24 Apr 4:14] Umesh Shastry
Hello Simon,

Thank you for the report and feedback!

Thanks,
Umesh
[10 May 16:50] Paul Dubois
Posted by developer:
 
Not a docs bug. We don't really have a way to install components noninteractively at server startup.

--init-file might be a possibility, but across multiple startups, INSTALL COMPONENT in an init file really needs an IF NOT INSTALLED clause so as not to provoke warnings or errors past the first startup.
[11 May 10:46] Simon Mudd
Ok, then change this to a normal bug.

I need to be able to configure logging so that it works on the first startup. I don't want to have to do manual things to get the server working. So I need a way to be able to configure the logging so that from initial startup the configuration works as expected. Not doing that means that I may miss things which I do not want to.

The makes the issue worst. You provide a feature which is nuisance to use as unlike pretty much all other settings you can't configure it in one go.  More steps requires more complexity to manage this.
[19 Jun 15:24] Paul Dubois
Changing category to server bug. Devs need to decide whether and how they want to support this.