fail collect-logs playbook when fetch overcloud node names and IPs tasks fails

Bug #1944416 reported by chandan kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
In Progress
High
Ananya Banerjee

Bug Description

logs are not getting collected from overcloud nodes in fs01 jobs as it does not able to find out
the overcloud nodes ip and collect-logs playbook is passing without it.

So the job is passing. Which is not good.
The job needs to fail with proper error

fatal: [undercloud]: FAILED! => {
    "changed": true,
    "cmd": "source /home/zuul/stackrc; $(command -v python3 || command -v python2) /home/zuul/get-overcloud-nodes.py \n",
    "delta": "0:00:01.252658",
    "end": "2021-09-20 16:39:01.165735",
    "invocation": {
        "module_args": {
            "_raw_params": "source /home/zuul/stackrc; $(command -v python3 || command -v python2) /home/zuul/get-overcloud-nodes.py \n",
            "_uses_shell": true,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": false
        }
    },
    "rc": 1,
    "start": "2021-09-20 16:38:59.913077"
}

STDERR:

Traceback (most recent call last):
  File "/home/zuul/get-overcloud-nodes.py", line 60, in <module>
    servers_list = provisioner.list_instances()
  File "/usr/lib/python3.6/site-packages/metalsmith/_provisioner.py", line 621, in list_instances
    nodes = self.connection.baremetal.nodes(associated=True, details=True)
  File "/usr/lib/python3.6/site-packages/openstack/service_description.py", line 87, in __get__
    proxy = self._make_proxy(instance)
  File "/usr/lib/python3.6/site-packages/openstack/service_description.py", line 271, in _make_proxy
    region_name=region_name))
openstack.exceptions.NotSupported: The baremetal service for :None exists but does not have any supported versions.

MSG:

non-zero return code
...ignoring

TASK [tripleo-inventory : list the overcloud nodes] ****************************
task path: /home/zuul/src/opendev.org/openstack/tripleo-quickstart/roles/tripleo-inventory/tasks/inventory.yml:22
Monday 20 September 2021 16:39:01 +0000 (0:00:01.851) 0:00:17.146 ******
ok: [undercloud] => {
    "registered_overcloud_nodes.stdout": ""
}

https://logserver.rdoproject.org/82/809982/2/openstack-check/tripleo-ci-centos-8-ovb-3ctlr_1comp-featureset001/999a6b8/logs/quickstart_collect_logs.log

Reason:
https://opendev.org/openstack/tripleo-quickstart/src/branch/master/roles/tripleo-inventory/tasks/inventory.yml#L23

```
    - name: list the overcloud nodes
      debug: var=registered_overcloud_nodes.stdout

```
We should first check the exit status of above task before listing the nodes ip and if above command fails then fail it.

Tags: alert ci
tags: added: alert ci
Changed in tripleo:
assignee: nobody → Ananya Banerjee (frenzyfriday)
Changed in tripleo:
status: New → In Progress
Changed in tripleo:
importance: Undecided → High
Revision history for this message
Sandeep Yadav (sandeepyadav93) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-quickstart (master)

Change abandoned by "chandan kumar <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-quickstart/+/810175

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-quickstart (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-quickstart/+/810546
Committed: https://opendev.org/openstack/tripleo-quickstart/commit/b68aefbb695f575e9cecadb02e8a9ccd52f8ce9c
Submitter: "Zuul (22348)"
Branch: master

commit b68aefbb695f575e9cecadb02e8a9ccd52f8ce9c
Author: rabi <email address hidden>
Date: Thu Sep 23 11:54:47 2021 +0530

    Fix get-overcloud-nodes.py

    Now that we don't use keystone in the undercloud, we need to set
    the connection object for the provisioner for it to work

    Closes-Bug: #1944617
    Related-Bug: #1944416
    Change-Id: I0a67f9fb26fda9aec161e4593c75a8110b64b05d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-quickstart (master)

Change abandoned by "Ananya <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-quickstart/+/810175

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.