Bug 1855360

Summary: [OSP16] OVS to OVN migration playbooks trying to issue docker commands in RHEL8
Product: Red Hat OpenStack Reporter: Mauro Oddi <moddi>
Component: python-networking-ovnAssignee: Jakub Libosvar <jlibosva>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: apevec, jlibosva, jpretori, lhh, majopela, msufiyan, rsafrono, scohen, tkajinam
Target Milestone: z2Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-networking-ovn-7.2.0-1.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-28 15:38:25 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 Mauro Oddi 2020-07-09 16:30:26 UTC
Description of problem:
OVN migration tool playbooks do not seem to be properly ported to RHEL8 and it fails issuing docker commands where it should be podman.

Version-Release number of selected component (if applicable):
16.1
python3-networking-ovn-migration-tool-7.2.1-0.20200611111150.18fabca.el8ost.noarch


How reproducible:
always

Steps to Reproduce:
1. Follow https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1-beta/html/networking_with_open_virtual_network/migrating-ml2ovs-to-ovn
2. Execute step 3.2.11 - ovn_migration.sh setup-mtu-t1
3.

Actual results:
Playbook bails out trying to execute docker restart on a controller

Expected results:
Playbook should succeed

Additional info:

(overcloud) [stack@undercloud ~]$ ovn_migration.sh setup-mtu-t1                                                                                            
ansible-playbook 2.9.10                                                                                                                                    
  config file = /home/stack/ansible.cfg                                                                                                                    
  configured module search path = ['/home/stack/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']                                           
  ansible python module location = /usr/lib/python3.6/site-packages/ansible                                                                                
  executable location = /usr/bin/ansible-playbook                                                                                                          
  python version = 3.6.8 (default, Dec  5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]                                                           
Using /home/stack/ansible.cfg as config file                                                                                                               
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details                                                         
                                                                                                                                                          
PLAYBOOK: reduce-dhcp-renewal-time.yml ********************************************************************************************************************
1 plays in /home/stack/playbooks/reduce-dhcp-renewal-time.yml
                                                                                                                                                           
PLAY [overcloud-controllers] ******************************************************************************************************************************
                                                          
TASK [Gathering Facts] ************************************************************************************************************************************
task path: /home/stack/playbooks/reduce-dhcp-renewal-time.yml:3                                                                                            
Thursday 09 July 2020  12:13:08 -0400 (0:00:00.086)       0:00:00.086 *********             
[DEPRECATION WARNING]: Distribution redhat 8.2 on host overcloud-controller-0 should use /usr/libexec/platform-python, but is using /usr/bin/python for 
backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See 
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. 
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.     

ok: [overcloud-controller-0]                                                                                                                               
META: ran handlers                                                                                                                                         
                                                                                                                                                           
TASK [Update dhcp_agent configuration file option 'dhcp_renewal_time'] ************************************************************************************
task path: /home/stack/playbooks/reduce-dhcp-renewal-time.yml:5                                                                                            
Thursday 09 July 2020  12:13:12 -0400 (0:00:04.283)       0:00:04.369 *********                                                                            
changed: [overcloud-controller-0] => {"backup_file": "/var/lib/config-data/puppet-generated/neutron/etc/neutron/dhcp_agent.ini.379749.2020-07-09@18:13:14~"
, "changed": true, "gid": 42435, "group": "42435", "mode": "0640", "msg": "option added", "owner": "root", "path": "/var/lib/config-data/puppet-generated/n
eutron/etc/neutron/dhcp_agent.ini", "secontext": "unconfined_u:object_r:container_file_t:s0", "size": 6921, "state": "file", "uid": 0}                     
                                                                                                                                                           
TASK [Get the neutron dhcp agent docker id] ***************************************************************************************************************
task path: /home/stack/playbooks/reduce-dhcp-renewal-time.yml:16                                                                                           
Thursday 09 July 2020  12:13:13 -0400 (0:00:01.015)       0:00:05.385 *********                                                                            
changed: [overcloud-controller-0] => {"changed": true, "cmd": "docker ps | grep neutron_dhcp | awk '{print $1}'", "delta": "0:00:00.008336", "end": "2020-0
7-09 18:13:15.124203", "rc": 0, "start": "2020-07-09 18:13:15.115867", "stderr": "/bin/sh: docker: command not found", "stderr_lines": ["/bin/sh: docker: c
ommand not found"], "stdout": "", "stdout_lines": []}                                                                                                      
                                                                                                                                                           
TASK [Restart neutron dhcp agent] *************************************************************************************************************************
task path: /home/stack/playbooks/reduce-dhcp-renewal-time.yml:22                                                                                           
Thursday 09 July 2020  12:13:14 -0400 (0:00:00.853)       0:00:06.238 *********                                                                           
fatal: [overcloud-controller-0]: FAILED! => {"changed": false, "cmd": "docker restart", "msg": "[Errno 2] No such file or directory: b'docker': b'docker'",
 "rc": 2}                                                
...ignoring                                                                                                                                                
META: ran handlers    
META: ran handlers                                        

PLAY RECAP ************************************************************************************************************************************************
overcloud-controller-0     : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=1   

Thursday 09 July 2020  12:13:14 -0400 (0:00:00.608)       0:00:06.846 *********
===============================================================================

Comment 3 Jakub Libosvar 2020-07-14 12:09:15 UTC
We already have a fix upstream for this: https://review.opendev.org/#/c/737928/

Comment 6 Jakub Libosvar 2020-07-14 12:10:42 UTC
*** Bug 1856471 has been marked as a duplicate of this bug. ***

Comment 7 Jakub Libosvar 2020-08-26 07:59:21 UTC
*** Bug 1872590 has been marked as a duplicate of this bug. ***

Comment 8 Jakub Libosvar 2020-09-15 13:10:08 UTC
*** Bug 1878511 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2020-10-28 15:38:25 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