Description of problem: ovirt-log-collector says in multiple places, including at least '--help' and comments in the default conf file, that the default for 'pg-user' is 'postgres'. This might have been true in very old versions (3.1 or so) but is wrong and misleading now. We should clarify everywhere that the default is not hard-coded but is taken from the configuration created by 'engine-setup', and should normally never need to be changed/set/passed. TODO: 1. Consider updating the documentation - create a doc bug if needed 2. Consider checking this in engine-setup and warn the user - create a bug on engine-setup, if needed
Reviewed the code and: - added a note in the configuration file as suggested - the --help provides as default the value of engine_config.get('ENGINE_DB_USER') so if ovirt-log-collector is executed on the engine host, it should already show the right user.
Updated the PR after first round of reviews.
During HE deployment, the latest ovirt-engine-setup-4.5.0.2-0.7.el8ev.noarch being used and it still reports an old defaults as appears bellow: PostgreSQL Database Configuration: The log collector will connect to the oVirt Engine PostgreSQL database and dump the data for inclusion in the log report unless --no- postgresql is specified. The PostgreSQL user ID and database name can be specified if they are different from the defaults. If the PostgreSQL database is not on the localhost set pg-dbhost, provide a pg-ssh-user, and optionally supply pg-host-key and the log collector will gather remote PostgreSQL logs. The PostgreSQL SOS plug-in must be installed on pg-dbhost for successful remote log collection. --no-postgresql This option causes the tool to skip the postgresql collection (default=false) --pg-user=postgres PostgreSQL database user name (default=postgres) --pg-dbname=engine PostgreSQL database name (default=engine) --pg-dbhost=localhost PostgreSQL database hostname or IP address (default=localhost) --pg-dbport=5432 PostgreSQL server port number (default=5432) --pg-ssh-user=root the SSH user that will be used to connect to the server upon which the remote PostgreSQL database lives. (default=root) --pg-host-key=none the identity file (private key) to be used for accessing the host upon which the PostgreSQL database lives (default=not needed if using localhost) Return values: 0: The program ran to completion with no errors. 1: The program encountered a critical failure and stopped. 2: The program encountered a problem gathering data but was able to continue. ovirt-log-collector-4.4.5-1.el8ev.noarch
(In reply to Nikolai Sednev from comment #3) > During HE deployment, the latest ovirt-engine-setup-4.5.0.2-0.7.el8ev.noarch > being used and it still reports an old defaults as appears bellow: please open separate bz for engine-setup, thanks
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.0 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.
If you don't use no-postgresql, the log collector will connect to the oVirt 4.5.0 Engine PostgreSQL database and dump the data for the log report. If they differ from the defaults, you can specify the PostgreSQL user ID and database name. In my opinion, it would also be beneficial to have #c1 (private and blank) automatically reserved in every bug and to let RH alter that. Things like the acceptance criteria and bug summary might be added there. I'm seeing more and more spam that includes bug reports. For instance: https://snake-io.io For public pre-production testing, this modification has been posted to https://partner-bugzilla.redhat.com