Bug 1911303

Summary: host deploy fails when parameters are set with the value null
Product: [oVirt] ovirt-engine Reporter: Dana <delfassy>
Component: ovirt-host-deploy-ansibleAssignee: Dana <delfassy>
Status: CLOSED CURRENTRELEASE QA Contact: Qin Yuan <qiyuan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4.4CC: bugs, gdeolive, mavital, mperina
Target Milestone: ovirt-4.4.5Flags: pm-rhel: ovirt-4.4+
gdeolive: testing_ack+
Target Release: 4.4.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.5 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-18 15:14:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dana 2020-12-28 16:36:27 UTC
Description of problem:
Parameters which are set with the value null aren't parsed correctly, thus causing host deploy to fail. This issue happened with tuned profile and kernel (fips params) roles 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Guilherme Santos 2021-01-31 18:09:36 UTC
Hi Dana, just confirming the verification steps. We basically need to check if enabling FIPS and having kernel cmd lines empty (null) won't break the host deploy? Thanks

Comment 2 Dana 2021-02-01 07:14:19 UTC
yes, exactly

Comment 3 Qin Yuan 2021-03-17 06:23:54 UTC
Verified with:
ovirt-engine-4.4.5.9-0.1.el8ev.noarch
ansible-2.9.17-1.el8ae.noarch

Steps:
1. Switch a host to maintenance
2. Reinstall the host via UI(using default settings)

Results:
1. host_deploy_kernel_cmdline_new, host_deploy_tuned_profile are null.
See /usr/share/ovirt-engine/ansible-runner-service-project/artifacts/29d2432c-86e4-11eb-954a-001a4a161065/env/extravars:

{"host_deploy_cluster_name": "golden_env_mixed_1", ..., "host_deploy_virt_enabled": true, ..., "host_deploy_tuned_profile": null, ..., "host_deploy_kernel_cmdline_new": null, ...}

2. Set tuned profile, ovirt-host-deploy-kernel tasks doesn't fail.
See /var/log/ovirt-engine/host-deploy/ovirt-host-deploy-ansible-20210317074647-ocelot06.qa.lab.tlv.redhat.com-5a198760-b490-4220-a48d-0e87d0bde7da.log:

2021-03-17 07:49:00 IST - TASK [ovirt-host-deploy-misc : Set profile] ************************************
2021-03-17 07:49:00 IST - ok: [ocelot06.qa.lab.tlv.redhat.com]
2021-03-17 07:49:00 IST - {
  "status" : "OK",
  "msg" : "",
  "data" : {
    ...
    "event_data" : {
      "playbook" : "ovirt-host-deploy.yml",
      "playbook_uuid" : "abd01ccf-5377-44b3-a052-ac8067234b7e",
      "play" : "all",
      "play_uuid" : "001a4a16-1065-e577-953f-00000000000a",
      "play_pattern" : "all",
      "task" : "Set profile",
      "task_uuid" : "001a4a16-1065-e577-953f-0000000002eb",
      "task_action" : "set_fact",
      "task_args" : "",
      "task_path" : "/usr/share/ovirt-engine/ansible-runner-service-project/project/roles/ovirt-host-deploy-misc/tasks/tuned_profile.yml:2",
      "role" : "ovirt-host-deploy-misc",
      "host" : "ocelot06.qa.lab.tlv.redhat.com",
      "remote_addr" : "ocelot06.qa.lab.tlv.redhat.com",
      "res" : {
        "changed" : false,
        "ansible_facts" : {
          "profile" : "\"virtual-host\"\n"
        },
        "_ansible_no_log" : false
      },
      "start" : "2021-03-17T05:48:58.045918",
      "end" : "2021-03-17T05:48:58.065891",
      "duration" : 0.019973,
      "event_loop" : null,
      "uuid" : "b393a49b-a7a6-4343-b2df-efd2ce536596"
    }
  }
}
2021-03-17 07:49:37 IST - TASK [ovirt-host-deploy-kernel : Detect if boot parameter is set when FIPS support is enabled] ***
2021-03-17 07:49:37 IST - TASK [ovirt-host-deploy-kernel : Fetch boot drive UUID] ************************
2021-03-17 07:49:37 IST - TASK [ovirt-host-deploy-kernel : Add boot parameter to kernel parameters] ******
2021-03-17 07:49:37 IST - TASK [ovirt-host-deploy-kernel : Removing old kernel arguments] ****************
2021-03-17 07:49:40 IST - TASK [ovirt-host-deploy-kernel : Adding new kernel arguments] ******************

3. Reinstall host successfully.

According to the above tests, when host_deploy_kernel_cmdline_new, host_deploy_tuned_profile are null, it doesn't break host deploy.

Comment 4 Sandro Bonazzola 2021-03-18 15:14:11 UTC
This bugzilla is included in oVirt 4.4.5 release, published on March 18th 2021.

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