Description of problem: Currently it's not possible to enable verbose mode of ansible-playbook execution. It's handy when there is a failure to specify the verbosity of execution. Version-Release number of selected component (if applicable): 4.2 How reproducible: always Steps to Reproduce: 1. Create new configuration value to change verbosity of ansible-playbook execution. Actual results: Not possible to change verbosity of ansible-playbook execution. Expected results: Possible to change verbosity of ansible-playbook execution. Additional info: Create a variable in engine.conf like: ANSIBLE_VERBOSITY={0,1,2,3,4}
s/Create a variable in engine.conf/Edit a variable in engine.conf/ put that in with default value 0 as well please.
I've used information from: https://github.com/oVirt/ovirt-engine/blob/master/packaging/services/ovirt- engine/ovirt-engine.conf.in#L573 " # Specify the ansible-playbook command verbose level. It's used for any task, which executes AnsibleExecutor class. # To change the value permanentaly create a conf file 99-ansible-playbook-verbose-level.conf in # /etc/ovirt-engine/engine.conf.d/ # # Following values are supported: # # 0 - standard output, no verbosity # 1 - more verbose, corresponds to -v # 2 - even more verbose, corresponds to -vv # 3 - even more verbose with basic debugging, corresponds to -vvv # 4 - super verbose mode with connection debugging, corresponds to -vvvv ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL=1" I've tried to change for each type 0-4 in /etc/ovirt-engine/engine.conf.d/99-ansible-playbook-verbose-level.conf manually and then restarted the engine and verbosity stayed the same: cat /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL=1 ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL=1: 2018-03-21 13:19:07,630+02 INFO [org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor] (EE-ManagedThreadFactory -engine-Thread-826) [765ccbbd] Executing Ansible command: [/usr/bin/ansible-playbook, -v, --private-key=/etc/pki/ovir t-engine/keys/engine_id_rsa, --inventory=/tmp/ansible-inventory8888542212484402744, --extra-vars=host_deploy_cluster_v ersion=4.2, --extra-vars=host_deploy_cluster_name=Default, --extra-vars=host_deploy_gluster_enabled=false, --extra-var s=host_deploy_virt_enabled=true, --extra-vars=host_deploy_vdsm_port=54321, --extra-vars=host_deploy_override_firewall= true, --extra-vars=host_deploy_firewall_type=FIREWALLD, --extra-vars=ansible_port=22, --extra-vars=host_deploy_post_ta sks=/etc/ovirt-engine/ansible/ovirt-host-deploy-post-tasks.yml, --extra-vars=host_deploy_ovn_tunneling_interface=10.35 .92.3, --extra-vars=host_deploy_ovn_central=127.0.0.1, /usr/share/ovirt-engine/playbooks/ovirt-host-deploy.yml] [Logfi le: /var/log/ovirt-engine/host-deploy/ovirt-host-deploy-ansible-20180321131907-alma03.qa.lab.tlv.redhat.com-765ccbbd.l og] You may see "-v" that is relevant for verbosity 1. Tested on these components: ovirt-hosted-engine-ha-2.2.7-1.el7ev.noarch ovirt-hosted-engine-setup-2.2.13-1.el7ev.noarch rhvm-appliance-4.2-20180202.0.el7.noarch Linux 3.10.0-861.el7.x86_64 #1 SMP Wed Mar 14 10:21:01 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux Red Hat Enterprise Linux Server release 7.5 (Maipo) As engine-restart doesn't change a thing in /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf, after changing /etc/ovirt-engine/engine.conf.d/99-ansible-playbook-verbose-level.conf, I'm returning this bug back to assigned. Reproduction should be as follows: 1.Create /etc/ovirt-engine/engine.conf.d/99-ansible-playbook-verbose-level.conf. 2.Write single line e.g. ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL=1 3.systemctl restart ovirt-engine 4.Add additional ha-host to environment. 5.Check in /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf, thatANSIBLE_PLAYBOOK_VERBOSITY_LEVEL=1. 6.Check that in /var/log/ovirt-engine/engine.log verbosity level matches for set verbosity level in step 2. 7.Return to steps 1-6, while changing verbosity values 0-4.
Tested on engine ovirt-engine-setup-4.2.1.5-0.1.el7.noarch
It's not suppose to be changed in cat /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf. It's supposed to be loaded from 99-ansible-playbook-verbose-level.conf, that's why you did create it. You are suppose to see that correct value in engine.log. So step 5 is incorrect only step 6 is correct. Please re-check.
(In reply to Nikolai Sednev from comment #7) > Tested on engine ovirt-engine-setup-4.2.1.5-0.1.el7.noarch Also this has nothing todo with engine-setup or hosted engine. This option is used only for ansible playbooks executed from the engine (for example Add/Reinstall host or Upgrade host).
(In reply to Ondra Machacek from comment #8) > It's not suppose to be changed in cat > /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf. It's > supposed to be loaded from 99-ansible-playbook-verbose-level.conf, that's > why you did create it. You are suppose to see that correct value in > engine.log. So step 5 is incorrect only step 6 is correct. Please re-check. And this is what I did, changed it in 99-ansible-playbook-verbose-level.conf manually, then I expected to see it the same value in /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf, right after engine restart. (In reply to Martin Perina from comment #9) > (In reply to Nikolai Sednev from comment #7) > > Tested on engine ovirt-engine-setup-4.2.1.5-0.1.el7.noarch > > Also this has nothing todo with engine-setup or hosted engine. This option > is used only for ansible playbooks executed from the engine (for example > Add/Reinstall host or Upgrade host). Of course its not SHE specific, but I'm testing it on SHE environment, hence adding ha-host also logged with proper verbosity, regardless of environment type.
(In reply to Nikolai Sednev from comment #10) > (In reply to Ondra Machacek from comment #8) > > It's not suppose to be changed in cat > > /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf. It's > > supposed to be loaded from 99-ansible-playbook-verbose-level.conf, that's > > why you did create it. You are suppose to see that correct value in > > engine.log. So step 5 is incorrect only step 6 is correct. Please re-check. > > And this is what I did, changed it in 99-ansible-playbook-verbose-level.conf > manually, then I expected to see it the same value in > /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf, right after > engine restart. Why did you expect it? That's not anyhow related. We don't merge those configuration files since ever. It override those values, same for any other linux system app configuration (firewall/ssh/....). You just need to check if it's properly loaded by engine and properly used.
Works for me on these components: ovirt-hosted-engine-ha-2.2.9-1.el7ev.noarch ovirt-hosted-engine-setup-2.2.15-1.el7ev.noarch Linux 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux Red Hat Enterprise Linux Server release 7.5 (Maipo) For verbosity level 0: 2018-04-01 17:57:50,124+03 INFO [org.ovirt.engine.core.uutils.config.ShellLikeConfd] (ServerService Thread Pool -- 42 ) [] Loaded file '/etc/ovirt-engine/engine.conf.d/99-ansible-playbook-verbose-level.conf'. 2018-04-01 17:57:50,157+03 INFO [org.ovirt.engine.core.uutils.config.ShellLikeConfd] (ServerService Thread Pool -- 42 ) [] Value of property 'ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL' is '0'. For verbosity level 1: 2018-04-01 17:44:22,939+03 INFO [org.ovirt.engine.core.uutils.config.ShellLikeConfd] (ServerService Thread Pool -- 50 ) [] Value of property 'ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL' is '1'. For verbosity level 2: 2018-04-01 18:04:42,343+03 INFO [org.ovirt.engine.core.uutils.config.ShellLikeConfd] (ServerService Thread Pool -- 56 ) [] Value of property 'ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL' is '2'. For verbosity level 3: 2018-04-01 18:05:51,273+03 INFO [org.ovirt.engine.core.uutils.config.ShellLikeConfd] (ServerService Thread Pool -- 52 ) [] Value of property 'ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL' is '3'. For verbosity level 4: 2018-04-01 18:06:56,380+03 INFO [org.ovirt.engine.core.uutils.config.ShellLikeConfd] (ServerService Thread Pool -- 57 ) [] Value of property 'ANSIBLE_PLAYBOOK_VERBOSITY_LEVEL' is '4'.
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.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.