Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1698888

Summary: Update task "Get bastion ssh public key" to use ansible module other then command
Product: [oVirt] ovirt-engine-metrics Reporter: Shirly Radco <sradco>
Component: GenericAssignee: Evgeny Slutsky <eslutsky>
Status: CLOSED CURRENTRELEASE QA Contact: Ivana Saranova <isaranov>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.2.1.3CC: bugs, isaranov, jzmeskal, lleistne, lsvaty
Target Milestone: ovirt-4.3.5-1Flags: sradco: ovirt-4.3?
Target Release: 1.3.3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-metrics-1.3.3.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-31 10:57:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shirly Radco 2019-04-11 12:40:07 UTC
Description of problem:
In task "Get bastion ssh public key" in /usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/tasks/main.yml update the task to use ansible module instead of command.


Version-Release number of selected component (if applicable):
ovirt-engine-4.3.3.1-0.1.el7.noarch
ovirt-engine-metrics-1.2.1.3-1.el7ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Check /usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/tasks/main.yml
2.
3.

Actual results:
Task uses command ansible module


Expected results:
Task will use dedicated ansible module

Additional info:

Comment 1 Evgeny Slutsky 2019-07-03 15:12:38 UTC
replacing command with ansible fetch module with delegation to the bastion-machine.

Comment 2 Lucie Leistnerova 2019-07-16 12:59:24 UTC
We don't have capacity now to verify metrics bugs. Moving to async 4.3.5-1.

Comment 3 Jan Zmeskal 2019-07-17 14:39:49 UTC
I ran ovirt-metrics-store-installation.yml playbook as specified here: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html/metrics_store_installation_guide/installing_metrics_store#Creating_the_metrics_store_virtual_machines and there was no error related to missing public key, therefore I conclude that the fix works.

Verified on ovirt-engine-metrics-1.3.3.2-1.el7ev.noarch

Comment 4 Jan Zmeskal 2019-07-22 11:34:59 UTC
I also should mention that during verification of this bug, I needed to apply a workaround for this issue in ovirt-vm-infra role: https://github.com/oVirt/ovirt-ansible-vm-infra/issues/104
The only thing I needed to do was to open /usr/share/ansible/roles/ovirt-vm-infra/tasks/manage_state.yml and comment out the following line with sysprep:

- name: "Manage VM '{{ current_vm.name }}' state"
  ovirt_vm:
    auth: "{{ ovirt_auth }}"
    state: "{{ current_vm.state | default(current_vm.profile.state) | default('present') }}"
    name: "{{ current_vm.name }}"
    # sysprep: "{{ sysprep | default(omit) }}"
    cloud_init: "{{ (cloud_init | length > 0) | ternary(cloud_init, omit) }}"
    cloud_init_persist: "{{ current_vm.cloud_init_persist | default(current_vm.profile.cloud_init_persist) | default(omit) }}"
    cloud_init_nics: "{{ current_vm.cloud_init_nics | default(current_vm.profile.cloud_init_nics)  | default(omit) }}"
    timeout: "{{ vm_infra_create_single_timeout }}"
  changed_when: false
  async: "{{ vm_infra_create_single_timeout }}"
  poll: 0
  register: started_vm

If you don't do this, metrics installation does not complete successfully until release for this bug has been released.

Comment 5 Sandro Bonazzola 2019-07-31 10:57:52 UTC
This bugzilla is included in oVirt 4.3.5 first async release, published on July 31th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.5 first async 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.