Bug 1883536

Summary: Octavia update failing because of typo in octavia-controller-check / octavia_controller_check
Product: Red Hat OpenStack Reporter: Bruna Bonguardo <bbonguar>
Component: tripleo-ansibleAssignee: Brent Eagles <beagles>
Status: CLOSED ERRATA QA Contact: Bruna Bonguardo <bbonguar>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 16.1 (Train)CC: beagles, bhaley, cgoncalves, gthiemon, oschwart, spower
Target Milestone: z2Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tripleo-ansible-0.5.1-1.20200914163925.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-28 15:39:38 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: 1623977, 1778766, 1856835, 1860658, 1881362    

Description Bruna Bonguardo 2020-09-29 14:01:00 UTC
Octavia deployment update failing with

2020-09-24 05:04:00,324 p=62323 u=mistral n=ansible | fatal: [undercloud]: FAILED! => {"changed": true, "cmd": "ANSIBLE_CONFIG=\"/var/lib/mistral/overcloud/ansible.cfg\" ansible-playbook -i \"/var/lib/mistral/overcloud/octavia-ansible/inventory.yaml\" --extra-vars @/var/lib/mistral/overcloud/octavia-ansible/group_vars/octavia_vars.yaml --private-key /var/lib/mistral/overcloud/ssh_private_key /usr/share/ansible/tripleo-playbooks/octavia-files.yaml", "delta": "0:00:32.725300", "end": "2020-09-24 05:04:00.281225", "msg": "non-zero return code", "rc": 2, "start": "2020-09-24 05:03:27.555925", "stderr": "[WARNING]: Failure using method (v2_runner_on_start) in callback plugin\n(<ansible.plugins.callback.tripleo.CallbackModule object at 0x7fac73bb7240>):\n'show_per_host_start'\nERROR! the role 'octavia-controller-check' was not found in /usr/share/ansible/tripleo-playbooks/roles:/var/lib/mistral/overcloud/roles:/root/.ansible/roles:/usr/share/ansible/tripleo-roles:/usr/share/ansible/roles:/etc/ansible/roles:/usr/share/openstack-tripleo-validations/roles:/var/lib/mistral/overcloud:/usr/share/ansible/tripleo-playbooks\n\nThe error appears to be in '/usr/share/ansible/tripleo-playbooks/octavia-files.yaml': line 40, column 15, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n    - include_role:\n        name: octavia-controller-check\n              ^ here", "stderr_lines": ["[WARNING]: Failure using method (v2_runner_on_start) in callback plugin", "(<ansible.plugins.callback.tripleo.CallbackModule object at 0x7fac73bb7240>):", "'show_per_host_start'", "ERROR! the role 'octavia-controller-check' was not found in /usr/share/ansible/tripleo-playbooks/roles:/var/lib/mistral/overcloud/roles:/root/.ansible/roles:/usr/share/ansible/tripleo-roles:/usr/share/ansible/roles:/etc/ansible/roles:/usr/share/openstack-tripleo-validations/roles:/var/lib/mistral/overcloud:/usr/share/ansible/tripleo-playbooks", "", "The error appears to be in '/usr/share/ansible/tripleo-playbooks/octavia-files.yaml': line 40, column 15, but may", "be elsewhere in the file depending on the exact syntax problem.", "", "The offending line appears to be:", "", "    - include_role:", "        name: octavia-controller-check", "              ^ here"], "stdout": "\nPLAY [Undercloud[0]]



Reason = typo:

In /usr/share/ansible/tripleo-playbooks/octavia-files.yaml, "octavia-controller-check" should be "octavia_controller_check".

The Octavia Controller check detects existing certificates in the controller and it is included only during an update, that's why the error happens only when running overcloud_deploy.sh file (update).


Manual fix - to run the following on undercloud:

sudo sed -i 's/name: octavia-controller-check/name: octavia_controller_check/g' /usr/share/ansible/tripleo-playbooks/octavia-files.yaml

Comment 2 Bruna Bonguardo 2020-10-01 11:43:02 UTC
*** Bug 1856835 has been marked as a duplicate of this bug. ***

Comment 6 Bruna Bonguardo 2020-10-05 23:18:34 UTC
Version verified:
16.1  -p RHOS-16.1-RHEL-8-20201005.n.0


1) Adding octavia yaml to overcloud_deploy.sh and re-running overcloud_deploy.sh (update) - Successful without errors:

Ansible passed.
Overcloud configuration completed.
Overcloud Endpoint: http://10.0.0.119:5000
Overcloud Horizon Dashboard URL: http://10.0.0.119:80/dashboard
Overcloud rc file: /home/stack/overcloudrc
Overcloud Deployed without error


2) Checking the string in octavia-files.yaml - it is indeed correct.

(undercloud) [stack@undercloud-0 ~]$ cat /usr/share/ansible/tripleo-playbooks/octavia-files.yaml | grep octavia-controller-check
(undercloud) [stack@undercloud-0 ~]$ 
(undercloud) [stack@undercloud-0 ~]$ cat /usr/share/ansible/tripleo-playbooks/octavia-files.yaml | grep octavia_controller_check
        name: octavia_controller_check
(undercloud) [stack@undercloud-0 ~]$ 
(undercloud) [stack@undercloud-0 ~]$ 


Moving the bug to VERIFIED.

Comment 11 errata-xmlrpc 2020-10-28 15:39:38 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 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/RHEA-2020:4284