Bug 1738554

Summary: [OSP15] cannot delete OVN Controller agent after controller replacement
Product: Red Hat OpenStack Reporter: Artem Hrechanychenko <ahrechan>
Component: python-networking-ovnAssignee: Terry Wilson <twilson>
Status: CLOSED DUPLICATE QA Contact: Eran Kuris <ekuris>
Severity: high Docs Contact:
Priority: high    
Version: 15.0 (Stein)CC: apevec, ebarrera, jlibosva, lhh, majopela, mkrcmari, scohen
Target Milestone: ---Keywords: AutomationBlocker, Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-18 09:11: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:

Description Artem Hrechanychenko 2019-08-07 12:51:49 UTC
Description of problem:
According to beta documentation
https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/15-beta/html-single/director_installation_and_usage/index#cleaning-up-after-the-controller-node-replacement


Check the network agents in your overcloud environment: 



openstack network agent list                                                                                                                                                                             │
+--------------------------------------+----------------------+--------------------------+-------------------+-------+-------+-------------------------------+                                                                               │
| ID                                   | Agent Type           | Host                     | Availability Zone | Alive | State | Binary                        |                                                                               │
+--------------------------------------+----------------------+--------------------------+-------------------+-------+-------+-------------------------------+                                                                               │
| 7a600908-a776-485a-87fa-96a890d44085 | OVN Controller agent | controller-1.localdomain | n/a               | XXX   | UP    | ovn-controller                |                                                                               │
| 4a12c7ad-db64-41b6-8554-a8ad70ce9c05 | OVN Controller agent | compute-0.localdomain    | n/a               | :-)   | UP    | ovn-controller                |                                                                               │
| 483f4214-09cb-426c-abcb-87785b79cd0e | OVN Metadata agent   | compute-0.localdomain    | n/a               | :-)   | UP    | networking-ovn-metadata-agent |                                                                               │
| f8eba4ad-9952-4424-94fb-e0d8395f0891 | OVN Controller agent | controller-2.localdomain | n/a               | XXX   | UP    | ovn-controller                |                                                                               │
| f7373a7a-ec6c-4314-8ed9-3129d83cd439 | OVN Controller agent | controller-0.localdomain | n/a               | :-)   | UP    | ovn-controller                |                                                                               │
| 86a2f09b-297a-458d-a31e-c2478d6b4d24 | OVN Controller agent | controller-3.localdomain | n/a               | :-)   | UP    | ovn-controller                |                                                                               │
| 9675b44e-4cc0-44f2-b657-78c20f500178 | OVN Controller agent | controller-4.localdomain | n/a               | :-)   | UP    | ovn-controller                |                                                                               │
+--------------------------------------+----------------------+--------------------------+-------------------+-------+-------+-------------------------------+   



If any agents appear for the old node, remove them: 
(overcloud) [stack@undercloud-0 ~]$ openstack network agent delete f8eba4ad-9952-4424-94fb-e0d8395f0891                                                                                                                                      │
Failed to delete network agent with ID 'f8eba4ad-9952-4424-94fb-e0d8395f0891': BadRequestException: 400: Client Error for url: https://10.0.0.101:13696/v2.0/agents/f8eba4ad-9952-4424-94fb-e0d8395f0891, Bad agent request: OVN agents canno│
t be deleted.                                                                                                                                                                                                                                │
1 of 1 network agents failed to delete. 


Version-Release number of selected component (if applicable):
OSP15
RHOS_TRUNK-15.0-RHEL-8-20190725.n.1


How reproducible:


Steps to Reproduce:
1.Deploy OSP15 with 3 contoller
2.Try to replace controller using official documentation
3. Try to clean network agent related to removed controller

Actual results:
Bad agent request: OVN agents canno│
t be deleted

Expected results:
agent deleted

Additional info:

Comment 6 Jakub Libosvar 2020-09-18 09:11:38 UTC

*** This bug has been marked as a duplicate of bug 1828889 ***