Bug 1746387

Summary: Pre-upgrade validation fail with "/home/validations/stackrc: No such file or directory"
Product: Red Hat OpenStack Reporter: Jose Luis Franco <jfrancoa>
Component: openstack-tripleo-validationsAssignee: Carlos Camacho <ccamacho>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: low Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: ccamacho, gchamoul, jjoyce, jschluet, slinaber, tvignaud
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-validations-5.1.4-4.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-16 09:41:06 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:

Description Jose Luis Franco 2019-08-28 10:37:57 UTC
Description of problem:

When executing the pre-upgrade validation group via Mistral, we obtain the following results:

[stack@jfrancoa-undercloud-0 ~]$ mistral task-get-result 451fc2a4-922d-4c5b-908a-c7ae2244c5d5
[
    {
        "status": "SUCCESS", 
        "stderr": "[DEPRECATION WARNING]: DEFAULT_SUDO_FLAGS option, In favor of become which is a\n generic framework . This feature will be removed in version 2.8. Deprecation \nwarnings can be disabled by setting deprecation_warnings=False in ansible.cfg.\n", 
        "__task_execution": {
            "id": "3c5f4beb-1f72-4a90-aa68-f38441eba9e6", 
            "name": "send_message"
        }, 
        "stdout": "Success! The validation passed for all hosts.\n"
    }, 
    {
        "status": "FAILED", 
        "stderr": "[DEPRECATION WARNING]: DEFAULT_SUDO_FLAGS option, In favor of become which is a\n generic framework . This feature will be removed in version 2.8. Deprecation \nwarnings can be disabled by setting deprecation_warnings=False in ansible.cfg.\n", 
        "__task_execution": {
            "id": "3e8e4155-9a03-4dca-8772-2bcb63e77bc6", 
            "name": "send_message"
        }, 
        "stdout": "Task 'Check if the Overcloud stack name has underscores' failed:\nHost: localhost\nMessage: Command `source ~/stackrc\n overcloud_name=$(openstack stack list -f json | jq -r '.[][\"Stack Name\"]' | grep -Po \"_\")\n if [[ ! -z \"$overcloud_name\" ]]; then\n naming_error='Underscore_Not_Allowed';\n fi\n echo $naming_error;` exited with code: 1: non-zero return code\n\nstderr:\n    /bin/sh: /home/validations/stackrc: No such file or directory\n\nFailure! The validation failed for the following hosts:\n* localhost\n"
    }
]

The second validation executed, which was included in this patch https://github.com/openstack/tripleo-validations/commit/b7631b7818359f83ce7eaae09885904e744704da fails because it can't locate the the stackrc file under validation user's home directory.

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


How reproducible:


Steps to Reproduce:
1. Deploy an OSP10 environment
2. openstack workflow execution create -f value -c ID tripleo.validations.v1.run_groups '{"group_names": ["pre-upgrade"]}'
3. mistral task-list <id-returned>
4. mistral task-get-result <id_from_run_validation_group_task>

Actual results:


Expected results:


Additional info:

Comment 10 errata-xmlrpc 2019-10-16 09:41:06 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, 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-2019:3122