[libvirt] [PATCH 0/2] rpc: cleanup some misc cruft

Daniel P. Berrangé (2): rpc: remove remains of obsolete log_buffer_size config parameter rpc: avoid duplicating config in virtlockd/virtlogd augeas tests src/locking/test_virtlockd.aug.in | 15 ++++----------- src/locking/virtlockd.aug | 1 - src/locking/virtlockd.conf | 15 +++------------ src/logging/test_virtlogd.aug.in | 15 ++++----------- src/logging/virtlogd.aug | 1 - src/logging/virtlogd.conf | 5 ++++- src/remote/libvirtd.aug | 1 - src/remote/libvirtd.conf | 7 ------- src/remote/test_libvirtd.aug.in | 1 - 9 files changed, 15 insertions(+), 46 deletions(-) -- 2.14.3

The global log buffer feature was deleted in: commit c0c8c1d7bb53e0420f8573ea961ef7e19b7fff85 Author: Daniel P. Berrange <berrange@redhat.com> Date: Mon Mar 3 14:54:33 2014 +0000 Remove global log buffer feature entirely A earlier commit changed the global log buffer so that it only records messages that are explicitly requested via the log filters setting. This removes the performance burden, and improves the signal/noise ratio for messages in the global buffer. At the same time though, it is somewhat pointless, since all the recorded log messages are already going to be sent to an explicit log output like syslog, stderr or the journal. The global log buffer is thus just duplicating this data on stderr upon crash. The log_buffer_size config parameter is left in the augeas lens to prevent breakage for users on upgrade. It is however completely ignored hereafter. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> This was in the 1.2.3 release, and 4 years is sufficient time for a graceful upgrade path for augeas, so all remaining traces are now removed. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- src/locking/test_virtlockd.aug.in | 2 -- src/locking/virtlockd.aug | 1 - src/locking/virtlockd.conf | 7 ------- src/logging/virtlogd.aug | 1 - src/remote/libvirtd.aug | 1 - src/remote/libvirtd.conf | 7 ------- src/remote/test_libvirtd.aug.in | 1 - 7 files changed, 20 deletions(-) diff --git a/src/locking/test_virtlockd.aug.in b/src/locking/test_virtlockd.aug.in index 1d0cdbeeb2..35095b403c 100644 --- a/src/locking/test_virtlockd.aug.in +++ b/src/locking/test_virtlockd.aug.in @@ -2,7 +2,6 @@ module Test_virtlockd = let conf = "log_level = 3 log_filters=\"3:remote 4:event\" log_outputs=\"3:syslog:libvirtd\" -log_buffer_size = 64 max_clients = 10 admin_max_clients = 10 " @@ -11,6 +10,5 @@ admin_max_clients = 10 { "log_level" = "3" } { "log_filters" = "3:remote 4:event" } { "log_outputs" = "3:syslog:libvirtd" } - { "log_buffer_size" = "64" } { "max_clients" = "10" } { "admin_max_clients" = "10" } diff --git a/src/locking/virtlockd.aug b/src/locking/virtlockd.aug index 7b152ed407..06d508e6e5 100644 --- a/src/locking/virtlockd.aug +++ b/src/locking/virtlockd.aug @@ -27,7 +27,6 @@ module Virtlockd = let logging_entry = int_entry "log_level" | str_entry "log_filters" | str_entry "log_outputs" - | int_entry "log_buffer_size" | int_entry "max_clients" | int_entry "admin_max_clients" diff --git a/src/locking/virtlockd.conf b/src/locking/virtlockd.conf index 24b69aa425..1b89797344 100644 --- a/src/locking/virtlockd.conf +++ b/src/locking/virtlockd.conf @@ -52,13 +52,6 @@ #log_outputs="3:syslog:virtlockd" # -# Log debug buffer size: -# -# This configuration option is no longer used, since the global -# log buffer functionality has been removed. Please configure -# suitable log_outputs/log_filters settings to obtain logs. -#log_buffer_size = 64 - # The maximum number of concurrent client connections to allow # over all sockets combined. # Each running virtual machine will require one open connection diff --git a/src/logging/virtlogd.aug b/src/logging/virtlogd.aug index 4fdcba72af..04580734d6 100644 --- a/src/logging/virtlogd.aug +++ b/src/logging/virtlogd.aug @@ -27,7 +27,6 @@ module Virtlogd = let logging_entry = int_entry "log_level" | str_entry "log_filters" | str_entry "log_outputs" - | int_entry "log_buffer_size" | int_entry "max_clients" | int_entry "admin_max_clients" | int_entry "max_size" diff --git a/src/remote/libvirtd.aug b/src/remote/libvirtd.aug index df310d8763..13333448a4 100644 --- a/src/remote/libvirtd.aug +++ b/src/remote/libvirtd.aug @@ -72,7 +72,6 @@ module Libvirtd = let logging_entry = int_entry "log_level" | str_entry "log_filters" | str_entry "log_outputs" - | int_entry "log_buffer_size" let auditing_entry = int_entry "audit_level" | bool_entry "audit_logging" diff --git a/src/remote/libvirtd.conf b/src/remote/libvirtd.conf index 91b3f47dec..4aed7e7469 100644 --- a/src/remote/libvirtd.conf +++ b/src/remote/libvirtd.conf @@ -394,13 +394,6 @@ #log_outputs="3:syslog:libvirtd" # -# Log debug buffer size: -# -# This configuration option is no longer used, since the global -# log buffer functionality has been removed. Please configure -# suitable log_outputs/log_filters settings to obtain logs. -#log_buffer_size = 64 - ################################################################## # diff --git a/src/remote/test_libvirtd.aug.in b/src/remote/test_libvirtd.aug.in index b24b32e33d..2bd7ec1bd6 100644 --- a/src/remote/test_libvirtd.aug.in +++ b/src/remote/test_libvirtd.aug.in @@ -51,7 +51,6 @@ module Test_libvirtd = { "log_level" = "3" } { "log_filters" = "3:remote 4:event" } { "log_outputs" = "3:syslog:libvirtd" } - { "log_buffer_size" = "64" } { "audit_level" = "2" } { "audit_logging" = "1" } { "host_uuid" = "00000000-0000-0000-0000-000000000000" } -- 2.14.3

Most of the augeas test files use ::CONFIG:: to pull in the master config file for testing. This ensures that entries added to the config file are actually tested by augeas. This identified the missing admin_max_clients example in the virtlogd config file, which in turn prompted a change in description of the max_clients parameter, since these daemon's don't have separate readonly & readwrite sockets. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- src/locking/test_virtlockd.aug.in | 13 ++++--------- src/locking/virtlockd.conf | 8 +++----- src/logging/test_virtlogd.aug.in | 15 ++++----------- src/logging/virtlogd.conf | 5 ++++- 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/src/locking/test_virtlockd.aug.in b/src/locking/test_virtlockd.aug.in index 35095b403c..ad75286be6 100644 --- a/src/locking/test_virtlockd.aug.in +++ b/src/locking/test_virtlockd.aug.in @@ -1,14 +1,9 @@ module Test_virtlockd = - let conf = "log_level = 3 -log_filters=\"3:remote 4:event\" -log_outputs=\"3:syslog:libvirtd\" -max_clients = 10 -admin_max_clients = 10 -" + ::CONFIG:: test Virtlockd.lns get conf = { "log_level" = "3" } { "log_filters" = "3:remote 4:event" } - { "log_outputs" = "3:syslog:libvirtd" } - { "max_clients" = "10" } - { "admin_max_clients" = "10" } + { "log_outputs" = "3:syslog:virtlockd" } + { "max_clients" = "1024" } + { "admin_max_clients" = "5" } diff --git a/src/locking/virtlockd.conf b/src/locking/virtlockd.conf index 1b89797344..1a2b27d0b9 100644 --- a/src/locking/virtlockd.conf +++ b/src/locking/virtlockd.conf @@ -53,14 +53,12 @@ # # The maximum number of concurrent client connections to allow -# over all sockets combined. +# on primary socket # Each running virtual machine will require one open connection # to virtlockd. So 'max_clients' will affect how many VMs can # be run on a host #max_clients = 1024 -# Same processing controls, but this time for the admin interface. -# For description of each option, be so kind to scroll few lines -# upwards. - +# The maximum number of concurrent client connections to allow +# on administrative socket #admin_max_clients = 5 diff --git a/src/logging/test_virtlogd.aug.in b/src/logging/test_virtlogd.aug.in index 1eaab7be9f..744f3246af 100644 --- a/src/logging/test_virtlogd.aug.in +++ b/src/logging/test_virtlogd.aug.in @@ -1,18 +1,11 @@ module Test_virtlogd = - let conf = "log_level = 3 -log_filters=\"3:remote 4:event\" -log_outputs=\"3:syslog:virtlogd\" -max_clients = 10 -admin_max_clients = 10 -max_size = 131072 -max_backups = 3 -" + ::CONFIG:: test Virtlogd.lns get conf = { "log_level" = "3" } { "log_filters" = "3:remote 4:event" } { "log_outputs" = "3:syslog:virtlogd" } - { "max_clients" = "10" } - { "admin_max_clients" = "10" } - { "max_size" = "131072" } + { "max_clients" = "1024" } + { "admin_max_clients" = "5" } + { "max_size" = "2097152" } { "max_backups" = "3" } diff --git a/src/logging/virtlogd.conf b/src/logging/virtlogd.conf index 7ef1ac324f..c22b7737ef 100644 --- a/src/logging/virtlogd.conf +++ b/src/logging/virtlogd.conf @@ -55,9 +55,12 @@ # # The maximum number of concurrent client connections to allow -# over all sockets combined. +# on primary socket #max_clients = 1024 +# The maximum number of concurrent client connections to allow +# on administrative socket +#admin_max_clients = 5 # Maximum file size before rolling over. Defaults to 2 MB #max_size = 2097152 -- 2.14.3

On Thu, Mar 22, 2018 at 02:22:16PM +0000, Daniel P. Berrangé wrote:
Most of the augeas test files use ::CONFIG:: to pull in the master config file for testing. This ensures that entries added to the config file are actually tested by augeas.
This identified the missing admin_max_clients example in the virtlogd config file, which in turn prompted a change in description of the max_clients parameter, since these daemon's don't have separate
s/daemon's/daemons/ Jan
readonly & readwrite sockets.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- src/locking/test_virtlockd.aug.in | 13 ++++--------- src/locking/virtlockd.conf | 8 +++----- src/logging/test_virtlogd.aug.in | 15 ++++----------- src/logging/virtlogd.conf | 5 ++++- 4 files changed, 15 insertions(+), 26 deletions(-)

On Thu, Mar 22, 2018 at 02:22:14PM +0000, Daniel P. Berrangé wrote:
Daniel P. Berrangé (2): rpc: remove remains of obsolete log_buffer_size config parameter rpc: avoid duplicating config in virtlockd/virtlogd augeas tests
src/locking/test_virtlockd.aug.in | 15 ++++----------- src/locking/virtlockd.aug | 1 - src/locking/virtlockd.conf | 15 +++------------ src/logging/test_virtlogd.aug.in | 15 ++++----------- src/logging/virtlogd.aug | 1 - src/logging/virtlogd.conf | 5 ++++- src/remote/libvirtd.aug | 1 - src/remote/libvirtd.conf | 7 ------- src/remote/test_libvirtd.aug.in | 1 - 9 files changed, 15 insertions(+), 46 deletions(-)
ACK series Jan
participants (2)
-
Daniel P. Berrangé
-
Ján Tomko