Description of problem: With drop-in configuration directory support, it's useful to be able to see what the daemon actually uses, by adding an option to dump that after parsing. See also bug 1826679.
This is a great idea solving several problems at once: - Debugging configuration on user machine - we can ask to provide the output of "ovirt-imageio --show-config". - Other programs like vdsm and engine can have access to ovirt-imageio configuration without implementing configuration file lookup and parsing. Here are some examples of the new feature: ## Output on host: $ ovirt-imageio --show-config { "control": { "port": -1, "socket": "/run/ovirt-imageio/sock", "transport": "unix" }, "daemon": { "buffer_size": 8388608, "drop_privileges": true, "group_name": "ovirtimg", "poll_interval": 1.0, "run_dir": "/run/ovirt-imageio", "user_name": "ovirtimg" }, "formatter_long": { "format": "%(asctime)s %(levelname)-7s (%(threadName)s) [%(name)s] %(message)s" }, "formatters": { "keys": "long" }, "handler_logfile": { "args": "(\"/var/log/ovirt-imageio/daemon.log\",)", "formatter": "long", "class": "logging.handlers.RotatingFileHandler", "kwargs": "{\"maxBytes\": 20971520, \"backupCount\": 10}", "level": "DEBUG" }, "handler_stderr": { "formatter": "long", "class": "logging.StreamHandler", "level": "DEBUG" }, "handlers": { "keys": "logfile" }, "local": { "enable": true, "socket": "\u0000/org/ovirt/imageio" }, "logger_root": { "handlers": "logfile", "level": "INFO", "propagate": 0 }, "loggers": { "keys": "root" }, "profile": { "filename": "/run/ovirt-imageio/profile" }, "remote": { "host": "", "port": 54322 }, "tls": { "ca_file": "/etc/pki/vdsm/certs/cacert.pem", "cert_file": "/etc/pki/vdsm/certs/vdsmcert.pem", "enable": true, "enable_tls1_1": false, "key_file": "/etc/pki/vdsm/keys/vdsmkey.pem" } } ## Output on engine $ ovirt-imageio --show-config { "control": { "port": 54324, "socket": "/run/ovirt-imageio/sock", "transport": "tcp" }, "daemon": { "buffer_size": 8388608, "drop_privileges": true, "group_name": "ovirtimg", "poll_interval": 1.0, "run_dir": "/run/ovirt-imageio", "user_name": "ovirtimg" }, "formatter_long": { "format": "%(asctime)s %(levelname)-7s (%(threadName)s) [%(name)s] %(message)s" }, "formatters": { "keys": "long" }, "handler_logfile": { "args": "(\"/var/log/ovirt-imageio/daemon.log\",)", "formatter": "long", "class": "logging.handlers.RotatingFileHandler", "kwargs": "{\"maxBytes\": 20971520, \"backupCount\": 10}", "level": "DEBUG" }, "handler_stderr": { "formatter": "long", "class": "logging.StreamHandler", "level": "DEBUG" }, "handlers": { "keys": "logfile" }, "local": { "enable": false, "socket": "\u0000/org/ovirt/imageio" }, "logger_root": { "handlers": "logfile", "level": "INFO", "propagate": 0 }, "loggers": { "keys": "root" }, "profile": { "filename": "/run/ovirt-imageio/profile" }, "remote": { "host": "", "port": 54323 }, "tls": { "ca_file": "/etc/pki/ovirt-engine/apache-ca.pem", "cert_file": "/etc/pki/ovirt-engine/certs/apache.cer", "enable": true, "enable_tls1_1": false, "key_file": "/etc/pki/ovirt-engine/keys/apache.key.nopass" } } ## Fetching specific sections or options $ sudo dnf install jq $ ovirt-imageio --show-config | jq .control { "port": 54324, "socket": "/run/ovirt-imageio/sock", "transport": "tcp" } $ ovirt-imageio --show-config | jq .control.port 54324
This is not included in current imageio release (2.0.6). We should move this to ON_QA when we release 2.0.7.
Verified in ovirt-imageio-daemon-2.0.8-1.el8ev.x86_64 also checked changing configuration which is correctly reflected in the output # ovirt-imageio --show-config { "control": { "port": 54324, "socket": "/run/ovirt-imageio/sock", "transport": "tcp" }, "daemon": { "buffer_size": 8388608, "drop_privileges": true, "group_name": "ovirtimg", "max_connections": 8, "poll_interval": 1.0, "run_dir": "/run/ovirt-imageio", "user_name": "ovirtimg" }, "formatter_long": { "format": "%(asctime)s %(levelname)-7s (%(threadName)s) [%(name)s] %(message)s" }, "formatters": { "keys": "long" }, "handler_logfile": { "args": "(\"/var/log/ovirt-imageio/daemon.log\",)", "formatter": "long", "class": "logging.handlers.RotatingFileHandler", "kwargs": "{\"maxBytes\": 20971520, \"backupCount\": 10}", "level": "DEBUG" }, "handler_stderr": { "formatter": "long", "class": "logging.StreamHandler", "level": "DEBUG" }, "handlers": { "keys": "logfile" }, "local": { "enable": false, "socket": "\u0000/org/ovirt/imageio" }, "logger_root": { "handlers": "logfile", "level": "INFO", "propagate": 0 }, "loggers": { "keys": "root" }, "profile": { "filename": "/run/ovirt-imageio/profile" }, "remote": { "host": "::", "port": 54323 }, "tls": { "ca_file": "/etc/pki/ovirt-engine/apache-ca.pem", "cert_file": "/etc/pki/ovirt-engine/certs/apache.cer", "enable": true, "enable_tls1_1": false, "key_file": "/etc/pki/ovirt-engine/keys/apache.key.nopass" } }
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.