Bug 1963879

Summary: [OSP16.1][Validation] nova-status not working in FFWD 13 to 16.1: [Errno 2] No such file or directory
Product: Red Hat OpenStack Reporter: Jose Luis Franco <jfrancoa>
Component: openstack-tripleo-validationsAssignee: Martin Schuppert <mschuppe>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: dvd, gchamoul, jjoyce, jschluet, mschuppe, mvalsecc, slinaber, tvignaud
Target Milestone: z7Keywords: Patch, Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-validations-11.3.2-1.20210531133305.4db92ba.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1966409 (view as bug list) Environment:
Last Closed: 2021-12-09 20:19:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1966409    

Description Jose Luis Franco 2021-05-24 10:07:41 UTC
Description of problem:

The nova-status validation was initially created for deployed environments and as such, it relies on the container_cli parameter. However, during FFWD wokflow, the validation gets triggered as part of the pre-upgrade group. The moment in which it gets triggered, the environment is in a unusual state where the Undercloud has been upgrade to OSP16.1 (container engine is podman) but the Overcloud nodes are still on OSP13 (container engine is still docker).

As the validation relies on container_cli parameter, and the Undercloud has been upgraded, the container_cli parameter indicates to use podman. But the Overcloud nodes do not know anything about Podman yet, so the validation fails in all controller nodes with:

{
    "hosts": {
        "controller-2": {
            "_ansible_no_log": false,
            "action": "command",
            "changed": false,
            "cmd": "exec -u root nova_api nova-status upgrade check",
            "failed": true,
            "invocation": {
                "module_args": {
                    "_raw_params": " exec -u root nova_api nova-status upgrade check",
                    "_uses_shell": false,
                    "argv": null,
                    "chdir": null,
                    "creates": null,
                    "executable": null,
                    "removes": null,
                    "stdin": null,
                    "stdin_add_newline": true,
                    "strip_empty_ends": true,
                    "warn": true
                }
            },
            "msg": "[Errno 2] No such file or directory",
            "rc": 2
        }
    },
    "name": "Check nova upgrade status",
    "status": "FAILED"
}

One solution is doing something similar to what is being performed in the ceph validation (ceph-health):
https://github.com/openstack/tripleo-validations/blob/master/roles/ceph/tasks/ceph-health.yaml#L13-L26

    - name: Check for docker cli
      stat:
        path: "/var/run/docker.sock"
      register: check_docker_cli
      check_mode: false

    - name: Set container_client fact
      set_fact:
        container_client: |-
          {% set container_client = 'podman' %}
          {%   if check_docker_cli.stat.exists|bool %}
          {%     set container_client = 'docker' %}
          {%   endif %}
          {{ container_client }}

Instead of relying on container_cli.

If required, a reproducer can be deployed.

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


How reproducible:


Steps to Reproduce:
1. Run FFWD 13 to 16.1. Upgrade first the Undercloud
2. Once upgraded, run the pre-upgrade group to check the Overcloud's status
3. See the container-status validation fail.

Actual results:


Expected results:


Additional info:

Comment 3 Gaƫl Chamoulaud 2021-05-31 09:30:54 UTC
*** Bug 1965242 has been marked as a duplicate of this bug. ***

Comment 20 errata-xmlrpc 2021-12-09 20:19:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.7 (Train) bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:3762