← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1949202] [NEW] ovn-controllers are listed as agents but cannot be disabled

 

Public bug reported:

We added recently the possibility to delete ovn agents [a] but we would
also need to disable them which is apparently not supported.


[1] neutron api logs
[2] output of: openstack --debug network agent set 1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf --disable
[3] neutron agent-update output


[a] https://review.opendev.org/c/openstack/neutron/+/752795

[1]
~~~
2021-10-28 00:31:23.850 17 DEBUG neutron.api.v2.base [req-8fb69095-22f5-413f-87d3-3230bd9beca6 bdd63425ae7140f7b40ff3fea3f0fb02 79443079d65a45b5952e79b4fb434769 - default default] Request body: {'agent': {'admin_state_up': False}} prepare_request_body /usr/lib/python3.9/site-packages/neutron/api/v2/base.py:729
2021-10-28 00:31:23.851 17 INFO neutron.api.v2.resource [req-8fb69095-22f5-413f-87d3-3230bd9beca6 bdd63425ae7140f7b40ff3fea3f0fb02 79443079d65a45b5952e79b4fb434769 - default default] update failed (client error): The server could not comply with the request since it is either malformed or otherwise incorrect.
2021-10-28 00:31:23.852 17 INFO neutron.wsgi [req-8fb69095-22f5-413f-87d3-3230bd9beca6 bdd63425ae7140f7b40ff3fea3f0fb02 79443079d65a45b5952e79b4fb434769 - default default] 172.17.0.189,::1 "PUT /v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf HTTP/1.1" status: 400  len: 331 time: 0.0053201
~~~

[2]
~~~
START with options: --debug network agent set 1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf --disable
options: Namespace(verbose_level=3, log_file=None, deferred_help=False, debug=True, cloud='', region_name='regionOne', cacert=None, cert='', key='', verify=None, insecure=None, default_domain='default', interface='public', service_provider='', remote_project_name='', remote_project_id='', remote_project_domain_name='', remote_project_domain_id='', timing=False, os_beta_command=False, profile='', os_compute_api_version='2.latest', os_identity_api_version='3', os_image_api_version='2', os_network_api_version='', os_object_api_version='', os_volume_api_version='3', os_orchestration_api_version='1', os_queues_api_version='2', inspector_api_version='1', inspector_url=None, os_workflow_api_version='2', os_share_api_version='2.63', os_dns_api_version='2', os_container_infra_api_version='1', os_key_manager_api_version='1', os_alarming_api_version='2', os_baremetal_api_version='1.77', os_loadbalancer_api_version='2.0', os_data_processing_api_version='1.1', os_data_processing_url='', os_database_api_version='1', os_tripleoclient_api_version='2', os_metrics_api_version='1', os_placement_api_version='1', auth_type='password', endpoint='', token='***', auth_url='https://overcloud.localdomain:13000', system_scope='', domain_id='', domain_name='', project_id='', project_name='admin', project_domain_id='', project_domain_name='Default', trust_id='', identity_provider='', protocol='', access_token='***', client_id='', client_secret='***', openid_scope='', access_token_endpoint='', discovery_endpoint='', access_token_type='', redirect_uri='', code='', auth_methods='', identity_provider_url='', username='admin', password='***', user_id='', user_domain_id='', user_domain_name='Default', service_provider_endpoint='', service_provider_entity_id='', application_credential_secret='***', application_credential_id='', application_credential_name='', roles='', user='', passcode='', aodh_endpoint='', default_domain_id='', default_domain_name='', os_project_name=None, os_project_id=None)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'regionOne', 'default_domain': 'default', 'timing': False, 'inspector_api_version': '1', 'auth_url': 'https://overcloud.localdomain:13000', 'username': 'admin', 'password': '***', 'beta_command': False, 'compute_api_version': '2.latest', 'identity_api_version': '3', 'image_api_version': '2', 'volume_api_version': '3', 'orchestration_api_version': '1', 'queues_api_version': '2', 'workflow_api_version': '2', 'share_api_version': '2.63', 'dns_api_version': '2', 'container_infra_api_version': '1', 'key_manager_api_version': '1', 'alarming_api_version': '2', 'baremetal_api_version': '1.77', 'loadbalancer_api_version': '2.0', 'data_processing_api_version': '1.1', 'database_api_version': '1', 'tripleoclient_api_version': '2', 'metrics_api_version': '1', 'placement_api_version': '1', 'auth_type': 'password', 'networks': []}
defaults: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'auth_type': 'password', 'baremetal_status_code_retries': 5, 'baremetal_introspection_status_code_retries': 5, 'image_status_code_retries': 5, 'disable_vendor_agent': {}, 'interface': None, 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active'}
cloud cfg: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'regionOne', 'default_domain': 'default', 'timing': False, 'inspector_api_version': '1', 'auth_url': 'https://overcloud.localdomain:13000', 'username': 'admin', 'password': '***', 'beta_command': False, 'compute_api_version': '2.latest', 'identity_api_version': '3', 'image_api_version': '2', 'volume_api_version': '3', 'orchestration_api_version': '1', 'queues_api_version': '2', 'workflow_api_version': '2', 'share_api_version': '2.63', 'dns_api_version': '2', 'container_infra_api_version': '1', 'key_manager_api_version': '1', 'alarming_api_version': '2', 'baremetal_api_version': '1.77', 'loadbalancer_api_version': '2.0', 'data_processing_api_version': '1.1', 'database_api_version': '1', 'tripleoclient_api_version': '2', 'metrics_api_version': '1', 'placement_api_version': '1', 'auth_type': 'password', 'networks': []}
compute API version 2.latest, cmd group openstack.compute.v2
identity API version 3, cmd group openstack.identity.v3
image API version 2, cmd group openstack.image.v2
network API version 2, cmd group openstack.network.v2
object_store API version 1, cmd group openstack.object_store.v1
volume API version 3, cmd group openstack.volume.v3
neutronclient API version 2, cmd group openstack.neutronclient.v2
orchestration API version 1, cmd group openstack.orchestration.v1
messaging API version 2, cmd group openstack.messaging.v2
baremetal_introspection API version 1, cmd group openstack.baremetal_introspection.v1
workflow_engine API version 2, cmd group openstack.workflow_engine.v2
share API version 2.63, cmd group openstack.share.v2
dns API version 2, cmd group openstack.dns.v2
container_infra API version 1, cmd group openstack.container_infra.v1
/usr/lib/python3.9/site-packages/barbicanclient/__init__.py:57: UserWarning: The secrets module is moved to barbicanclient/v1 directory, direct import of barbicanclient.secrets will be deprecated. Please import barbicanclient.v1.secrets instead.
  warnings.warn("The %s module is moved to barbicanclient/v1 "
key_manager API version 1, cmd group openstack.key_manager.v1
alarming API version 2, cmd group openstack.alarming.v2
baremetal API version 1.77, cmd group openstack.baremetal.v1
load_balancer API version 2.0, cmd group openstack.load_balancer.v2
data_processing API version 1.1, cmd group openstack.data_processing.v1
database API version 1, cmd group openstack.database.v1
Popen(['git', 'version'], cwd=/home/stack, universal_newlines=False, shell=None, istream=None)
Popen(['git', 'version'], cwd=/home/stack, universal_newlines=False, shell=None, istream=None)
tripleoclient API version 2, cmd group openstack.tripleoclient.v2
metric API version 1, cmd group openstack.metric.v1
placement API version 1, cmd group openstack.placement.v1
command: network agent set -> openstackclient.network.v2.network_agent.SetNetworkAgent (auth=True)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'additional_user_agent': [('osc-lib', '2.4.2')], 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'regionOne', 'default_domain': 'default', 'timing': False, 'inspector_api_version': '1', 'auth_url': 'https://overcloud.localdomain:13000', 'username': 'admin', 'password': '***', 'beta_command': False, 'compute_api_version': '2.latest', 'identity_api_version': '3', 'image_api_version': '2', 'volume_api_version': '3', 'orchestration_api_version': '1', 'queues_api_version': '2', 'workflow_api_version': '2', 'share_api_version': '2.63', 'dns_api_version': '2', 'container_infra_api_version': '1', 'key_manager_api_version': '1', 'alarming_api_version': '2', 'baremetal_api_version': '1.77', 'loadbalancer_api_version': '2.0', 'data_processing_api_version': '1.1', 'database_api_version': '1', 'tripleoclient_api_version': '2', 'metrics_api_version': '1', 'placement_api_version': '1', 'auth_type': 'password', 'networks': []}
Using auth plugin: password
Using parameters {'auth_url': 'https://overcloud.localdomain:13000', 'project_name': 'admin', 'project_domain_name': 'Default', 'username': 'admin', 'user_domain_name': 'Default', 'password': '***'}
Get auth_ref
REQ: curl -g -i -X GET https://overcloud.localdomain:13000 -H "Accept: application/json" -H "User-Agent: openstacksdk/0.59.0 keystoneauth1/4.4.0 python-requests/2.25.1 CPython/3.9.7"
Starting new HTTPS connection (1): overcloud.localdomain:13000
https://overcloud.localdomain:13000 "GET / HTTP/1.1" 300 278
RESP: [300] content-length: 278 content-type: application/json date: Thu, 28 Oct 2021 00:40:07 GMT location: https://overcloud.localdomain:13000/v3/ server: Apache vary: X-Auth-Token x-openstack-request-id: req-d83e1d8a-1fad-4e00-ab56-9ceae908fb65
RESP BODY: {"versions": {"values": [{"id": "v3.14", "status": "stable", "updated": "2020-04-07T00:00:00Z", "links": [{"rel": "self", "href": "https://overcloud.localdomain:13000/v3/"}], "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}]}]}}
GET call to https://overcloud.localdomain:13000/ used request id req-d83e1d8a-1fad-4e00-ab56-9ceae908fb65
Making authentication request to https://overcloud.localdomain:13000/v3/auth/tokens
https://overcloud.localdomain:13000 "POST /v3/auth/tokens HTTP/1.1" 201 6473
{"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "bdd63425ae7140f7b40ff3fea3f0fb02", "name": "admin", "password_expires_at": null}, "audit_ids": ["hV-Nusz8QpqwFfOtDemPkA"], "expires_at": "2021-10-28T01:40:08.000000Z", "issued_at": "2021-10-28T00:40:08.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "79443079d65a45b5952e79b4fb434769", "name": "admin"}, "is_domain": false, "roles": [{"id": "b54ba53d07d14e689a1aa15c6b3611f9", "name": "member"}, {"id": "0e8188a1d42c40818bd7414ce4951826", "name": "admin"}, {"id": "ec854daf2f544f848e3bf1b81d0cdc44", "name": "reader"}], "catalog": [{"endpoints": [{"id": "471d876423bb48dd9cb3aa235aed646d", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13004/v1/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "b187093d1a7545198289530aed1f7dd8", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8004/v1/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "c42964843c35410f9999e48175639083", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8004/v1/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}], "id": "1e18795f681d44968d71c16a880b68e3", "type": "orchestration", "name": "heat"}, {"endpoints": [{"id": "5396cc12367344a8864d43af5c76a7dd", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13696";, "region": "regionOne"}, {"id": "db08cf4f3fa546ddadaaacd51f73c3aa", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:9696";, "region": "regionOne"}, {"id": "fc3ad0c156e448a48817d193e89bb5c8", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:9696";, "region": "regionOne"}], "id": "54bcd636cc3f45e8830493ee7c101535", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "68972a99eda149418406d500dfdc0435", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13776/v3/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "b161744633d24f38bd589264e8daa55a", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8776/v3/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "ed76389060514a0eacfe82ab5dd61743", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8776/v3/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}], "id": "7f6968d1800340308395ca94d52a9ad3", "type": "volumev3", "name": "cinderv3"}, {"endpoints": [{"id": "15f573d2877948a1b52b9e1aea5b0662", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13774/v2.1";, "region": "regionOne"}, {"id": "ce7715027b0447d29fc52179abe7b3a0", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8774/v2.1";, "region": "regionOne"}, {"id": "ec59c7bea1504f00bb38a2b9a02fd346", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8774/v2.1";, "region": "regionOne"}], "id": "b8a0a5cf10424be7a4891c641a122930", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "09ac78ea2b784be5a7fe1b6067f791cc", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.ctlplane.localdomain:35357";, "region": "regionOne"}, {"id": "8e6bb333506b4175b2d4bc2a702e3004", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:5000";, "region": "regionOne"}, {"id": "c87c86be2ad7435a82795bf6fcf604ac", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13000";, "region": "regionOne"}], "id": "cc365c9f4dc94dc1bc0efda6d9a46567", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "1b2ddf2629b247e1b20c34a01199f42c", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.storage.localdomain:8080";, "region": "regionOne"}, {"id": "26c3d4e4ff08475eaa0a9f4a91076a60", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13808/v1/AUTH_79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "3c291cca9df44518bd6e613a4a8193cb", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.storage.localdomain:8080/v1/AUTH_79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}], "id": "cd326ad376994c0ea1a784f91c10d97f", "type": "object-store", "name": "swift"}, {"endpoints": [{"id": "2cf3bb3dca644293a34cc5a62b5f4374", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8778/placement";, "region": "regionOne"}, {"id": "74ebbf3e6cbe48f2b884122e196647ae", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8778/placement";, "region": "regionOne"}, {"id": "8892dc0e1dfc420686b3fdb6c4883c4b", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13778/placement";, "region": "regionOne"}], "id": "dfabd68e2b6b474db722baad43936348", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "15b412051e114052b513ad5763addcb7", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:9292";, "region": "regionOne"}, {"id": "a5fff1ad390b43e6ad256555396e8d73", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13292";, "region": "regionOne"}, {"id": "b5fc3a6645104f9c9c49cbf0e60823d7", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:9292";, "region": "regionOne"}], "id": "e6eb24e6dffc40c5a02247c1b79300ac", "type": "image", "name": "glance"}, {"endpoints": [{"id": "1d7a29007cfc4b4ab117fd076a2c1274", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8000/v1";, "region": "regionOne"}, {"id": "a4b17305a9d143ed90029e066da8352c", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13005/v1";, "region": "regionOne"}, {"id": "da6deefd75b54226bb0e706f2c67b072", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8000/v1";, "region": "regionOne"}], "id": "fad49abe356a4a428b1cf90f9b3d47bf", "type": "cloudformation", "name": "heat-cfn"}]}}
run(Namespace(network_agent='1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf', description=None, enable=False, disable=True))
Network client initialized using OpenStack SDK: <openstack.network.v2._proxy.Proxy object at 0x7f8090adb1f0>
REQ: curl -g -i -X GET https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf -H "User-Agent: openstacksdk/0.59.0 keystoneauth1/4.4.0 python-requests/2.25.1 CPython/3.9.7" -H "X-Auth-Token: {SHA256}5e301cec1d5e0140d198af0f542d3280ea35f868947b1a67fdc1fb08e2502071"
Starting new HTTPS connection (1): overcloud.localdomain:13696
https://overcloud.localdomain:13696 "GET /v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf HTTP/1.1" 200 279
RESP: [200] content-encoding: gzip content-length: 279 content-type: application/json date: Thu, 28 Oct 2021 00:40:08 GMT server: Apache vary: Accept-Encoding via: 1.1 controller-2.internalapi.home.arpa:13696 x-openstack-request-id: req-fc0b6eda-4b65-47b6-acbd-734e5a855f8a
RESP BODY: {"agent": {"binary": "ovn-controller", "host": "compute-1.home.arpa", "heartbeat_timestamp": "2021-10-28 00:40:08.674985", "availability_zone": "", "topic": "n/a", "description": "", "configurations": {"chassis_name": "1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf", "bridge-mappings": "datacentre:br-ex"}, "agent_type": "OVN Controller agent", "id": "1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf", "alive": true, "admin_state_up": true}}
GET call to network for https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf used request id req-fc0b6eda-4b65-47b6-acbd-734e5a855f8a
REQ: curl -g -i -X PUT https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf -H "Content-Type: application/json" -H "User-Agent: openstacksdk/0.59.0 keystoneauth1/4.4.0 python-requests/2.25.1 CPython/3.9.7" -H "X-Auth-Token: {SHA256}5e301cec1d5e0140d198af0f542d3280ea35f868947b1a67fdc1fb08e2502071" -d '{"agent": {"admin_state_up": false}}'
https://overcloud.localdomain:13696 "PUT /v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf HTTP/1.1" 400 123
RESP: [400] content-length: 123 content-type: application/json date: Thu, 28 Oct 2021 00:40:08 GMT server: Apache via: 1.1 controller-2.internalapi.home.arpa:13696 x-openstack-request-id: req-84c51d15-8cf6-481c-84e2-f5cec54a008e
RESP BODY: {"NeutronError": {"type": "BadRequest", "message": "Bad agent request: OVN agent status cannot be updated.", "detail": ""}}
PUT call to network for https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf used request id req-84c51d15-8cf6-481c-84e2-f5cec54a008e
BadRequestException: 400: Client Error for url: https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf, Bad agent request: OVN agent status cannot be updated.
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/cliff/app.py", line 407, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python3.9/site-packages/osc_lib/command/command.py", line 39, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.9/site-packages/cliff/command.py", line 186, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.9/site-packages/openstackclient/network/v2/network_agent.py", line 366, in take_action
    client.update_agent(obj, **attrs)
  File "/usr/lib/python3.9/site-packages/openstack/network/v2/_proxy.py", line 348, in update_agent
    return self._update(_agent.Agent, agent, **attrs)
  File "/usr/lib/python3.9/site-packages/openstack/proxy.py", line 48, in check
    return method(self, expected, actual, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/openstack/network/v2/_proxy.py", line 71, in _update
    return res.commit(self, base_path=base_path, if_revision=if_revision)
  File "/usr/lib/python3.9/site-packages/openstack/resource.py", line 1562, in commit
    return self._commit(session, request, self.commit_method, microversion,
  File "/usr/lib/python3.9/site-packages/openstack/resource.py", line 1590, in _commit
    self._translate_response(response, has_body=has_body)
  File "/usr/lib/python3.9/site-packages/openstack/resource.py", line 1177, in _translate_response
    exceptions.raise_from_response(response, error_message=error_message)
  File "/usr/lib/python3.9/site-packages/openstack/exceptions.py", line 236, in raise_from_response
    raise cls(
openstack.exceptions.BadRequestException: BadRequestException: 400: Client Error for url: https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf, Bad agent request: OVN agent status cannot be updated.
clean_up SetNetworkAgent: BadRequestException: 400: Client Error for url: https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf, Bad agent request: OVN agent status cannot be updated.
END return value: 1
~~~

[3]
~~~
(overcloud) [stack@undercloud-0 ~]$ neutron agent-update 2e224307-eae5-56cc-8646-95e80432c55e --admin-state-down
neutron CLI is deprecated and will be removed in the Z cycle. Use openstack CLI instead.
Bad agent request: OVN agent status cannot be updated.
Neutron server returns request_ids: ['req-dd67baa1-7adc-41f6-88d9-78b604af209e']
~~~

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1949202

Title:
   ovn-controllers are listed as agents but cannot be disabled

Status in neutron:
  New

Bug description:
  We added recently the possibility to delete ovn agents [a] but we
  would also need to disable them which is apparently not supported.


  [1] neutron api logs
  [2] output of: openstack --debug network agent set 1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf --disable
  [3] neutron agent-update output

  
  [a] https://review.opendev.org/c/openstack/neutron/+/752795

  [1]
  ~~~
  2021-10-28 00:31:23.850 17 DEBUG neutron.api.v2.base [req-8fb69095-22f5-413f-87d3-3230bd9beca6 bdd63425ae7140f7b40ff3fea3f0fb02 79443079d65a45b5952e79b4fb434769 - default default] Request body: {'agent': {'admin_state_up': False}} prepare_request_body /usr/lib/python3.9/site-packages/neutron/api/v2/base.py:729
  2021-10-28 00:31:23.851 17 INFO neutron.api.v2.resource [req-8fb69095-22f5-413f-87d3-3230bd9beca6 bdd63425ae7140f7b40ff3fea3f0fb02 79443079d65a45b5952e79b4fb434769 - default default] update failed (client error): The server could not comply with the request since it is either malformed or otherwise incorrect.
  2021-10-28 00:31:23.852 17 INFO neutron.wsgi [req-8fb69095-22f5-413f-87d3-3230bd9beca6 bdd63425ae7140f7b40ff3fea3f0fb02 79443079d65a45b5952e79b4fb434769 - default default] 172.17.0.189,::1 "PUT /v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf HTTP/1.1" status: 400  len: 331 time: 0.0053201
  ~~~

  [2]
  ~~~
  START with options: --debug network agent set 1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf --disable
  options: Namespace(verbose_level=3, log_file=None, deferred_help=False, debug=True, cloud='', region_name='regionOne', cacert=None, cert='', key='', verify=None, insecure=None, default_domain='default', interface='public', service_provider='', remote_project_name='', remote_project_id='', remote_project_domain_name='', remote_project_domain_id='', timing=False, os_beta_command=False, profile='', os_compute_api_version='2.latest', os_identity_api_version='3', os_image_api_version='2', os_network_api_version='', os_object_api_version='', os_volume_api_version='3', os_orchestration_api_version='1', os_queues_api_version='2', inspector_api_version='1', inspector_url=None, os_workflow_api_version='2', os_share_api_version='2.63', os_dns_api_version='2', os_container_infra_api_version='1', os_key_manager_api_version='1', os_alarming_api_version='2', os_baremetal_api_version='1.77', os_loadbalancer_api_version='2.0', os_data_processing_api_version='1.1', os_data_processing_url='', os_database_api_version='1', os_tripleoclient_api_version='2', os_metrics_api_version='1', os_placement_api_version='1', auth_type='password', endpoint='', token='***', auth_url='https://overcloud.localdomain:13000', system_scope='', domain_id='', domain_name='', project_id='', project_name='admin', project_domain_id='', project_domain_name='Default', trust_id='', identity_provider='', protocol='', access_token='***', client_id='', client_secret='***', openid_scope='', access_token_endpoint='', discovery_endpoint='', access_token_type='', redirect_uri='', code='', auth_methods='', identity_provider_url='', username='admin', password='***', user_id='', user_domain_id='', user_domain_name='Default', service_provider_endpoint='', service_provider_entity_id='', application_credential_secret='***', application_credential_id='', application_credential_name='', roles='', user='', passcode='', aodh_endpoint='', default_domain_id='', default_domain_name='', os_project_name=None, os_project_id=None)
  Auth plugin password selected
  auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'regionOne', 'default_domain': 'default', 'timing': False, 'inspector_api_version': '1', 'auth_url': 'https://overcloud.localdomain:13000', 'username': 'admin', 'password': '***', 'beta_command': False, 'compute_api_version': '2.latest', 'identity_api_version': '3', 'image_api_version': '2', 'volume_api_version': '3', 'orchestration_api_version': '1', 'queues_api_version': '2', 'workflow_api_version': '2', 'share_api_version': '2.63', 'dns_api_version': '2', 'container_infra_api_version': '1', 'key_manager_api_version': '1', 'alarming_api_version': '2', 'baremetal_api_version': '1.77', 'loadbalancer_api_version': '2.0', 'data_processing_api_version': '1.1', 'database_api_version': '1', 'tripleoclient_api_version': '2', 'metrics_api_version': '1', 'placement_api_version': '1', 'auth_type': 'password', 'networks': []}
  defaults: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'auth_type': 'password', 'baremetal_status_code_retries': 5, 'baremetal_introspection_status_code_retries': 5, 'image_status_code_retries': 5, 'disable_vendor_agent': {}, 'interface': None, 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active'}
  cloud cfg: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'regionOne', 'default_domain': 'default', 'timing': False, 'inspector_api_version': '1', 'auth_url': 'https://overcloud.localdomain:13000', 'username': 'admin', 'password': '***', 'beta_command': False, 'compute_api_version': '2.latest', 'identity_api_version': '3', 'image_api_version': '2', 'volume_api_version': '3', 'orchestration_api_version': '1', 'queues_api_version': '2', 'workflow_api_version': '2', 'share_api_version': '2.63', 'dns_api_version': '2', 'container_infra_api_version': '1', 'key_manager_api_version': '1', 'alarming_api_version': '2', 'baremetal_api_version': '1.77', 'loadbalancer_api_version': '2.0', 'data_processing_api_version': '1.1', 'database_api_version': '1', 'tripleoclient_api_version': '2', 'metrics_api_version': '1', 'placement_api_version': '1', 'auth_type': 'password', 'networks': []}
  compute API version 2.latest, cmd group openstack.compute.v2
  identity API version 3, cmd group openstack.identity.v3
  image API version 2, cmd group openstack.image.v2
  network API version 2, cmd group openstack.network.v2
  object_store API version 1, cmd group openstack.object_store.v1
  volume API version 3, cmd group openstack.volume.v3
  neutronclient API version 2, cmd group openstack.neutronclient.v2
  orchestration API version 1, cmd group openstack.orchestration.v1
  messaging API version 2, cmd group openstack.messaging.v2
  baremetal_introspection API version 1, cmd group openstack.baremetal_introspection.v1
  workflow_engine API version 2, cmd group openstack.workflow_engine.v2
  share API version 2.63, cmd group openstack.share.v2
  dns API version 2, cmd group openstack.dns.v2
  container_infra API version 1, cmd group openstack.container_infra.v1
  /usr/lib/python3.9/site-packages/barbicanclient/__init__.py:57: UserWarning: The secrets module is moved to barbicanclient/v1 directory, direct import of barbicanclient.secrets will be deprecated. Please import barbicanclient.v1.secrets instead.
    warnings.warn("The %s module is moved to barbicanclient/v1 "
  key_manager API version 1, cmd group openstack.key_manager.v1
  alarming API version 2, cmd group openstack.alarming.v2
  baremetal API version 1.77, cmd group openstack.baremetal.v1
  load_balancer API version 2.0, cmd group openstack.load_balancer.v2
  data_processing API version 1.1, cmd group openstack.data_processing.v1
  database API version 1, cmd group openstack.database.v1
  Popen(['git', 'version'], cwd=/home/stack, universal_newlines=False, shell=None, istream=None)
  Popen(['git', 'version'], cwd=/home/stack, universal_newlines=False, shell=None, istream=None)
  tripleoclient API version 2, cmd group openstack.tripleoclient.v2
  metric API version 1, cmd group openstack.metric.v1
  placement API version 1, cmd group openstack.placement.v1
  command: network agent set -> openstackclient.network.v2.network_agent.SetNetworkAgent (auth=True)
  Auth plugin password selected
  auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'additional_user_agent': [('osc-lib', '2.4.2')], 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'regionOne', 'default_domain': 'default', 'timing': False, 'inspector_api_version': '1', 'auth_url': 'https://overcloud.localdomain:13000', 'username': 'admin', 'password': '***', 'beta_command': False, 'compute_api_version': '2.latest', 'identity_api_version': '3', 'image_api_version': '2', 'volume_api_version': '3', 'orchestration_api_version': '1', 'queues_api_version': '2', 'workflow_api_version': '2', 'share_api_version': '2.63', 'dns_api_version': '2', 'container_infra_api_version': '1', 'key_manager_api_version': '1', 'alarming_api_version': '2', 'baremetal_api_version': '1.77', 'loadbalancer_api_version': '2.0', 'data_processing_api_version': '1.1', 'database_api_version': '1', 'tripleoclient_api_version': '2', 'metrics_api_version': '1', 'placement_api_version': '1', 'auth_type': 'password', 'networks': []}
  Using auth plugin: password
  Using parameters {'auth_url': 'https://overcloud.localdomain:13000', 'project_name': 'admin', 'project_domain_name': 'Default', 'username': 'admin', 'user_domain_name': 'Default', 'password': '***'}
  Get auth_ref
  REQ: curl -g -i -X GET https://overcloud.localdomain:13000 -H "Accept: application/json" -H "User-Agent: openstacksdk/0.59.0 keystoneauth1/4.4.0 python-requests/2.25.1 CPython/3.9.7"
  Starting new HTTPS connection (1): overcloud.localdomain:13000
  https://overcloud.localdomain:13000 "GET / HTTP/1.1" 300 278
  RESP: [300] content-length: 278 content-type: application/json date: Thu, 28 Oct 2021 00:40:07 GMT location: https://overcloud.localdomain:13000/v3/ server: Apache vary: X-Auth-Token x-openstack-request-id: req-d83e1d8a-1fad-4e00-ab56-9ceae908fb65
  RESP BODY: {"versions": {"values": [{"id": "v3.14", "status": "stable", "updated": "2020-04-07T00:00:00Z", "links": [{"rel": "self", "href": "https://overcloud.localdomain:13000/v3/"}], "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}]}]}}
  GET call to https://overcloud.localdomain:13000/ used request id req-d83e1d8a-1fad-4e00-ab56-9ceae908fb65
  Making authentication request to https://overcloud.localdomain:13000/v3/auth/tokens
  https://overcloud.localdomain:13000 "POST /v3/auth/tokens HTTP/1.1" 201 6473
  {"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "bdd63425ae7140f7b40ff3fea3f0fb02", "name": "admin", "password_expires_at": null}, "audit_ids": ["hV-Nusz8QpqwFfOtDemPkA"], "expires_at": "2021-10-28T01:40:08.000000Z", "issued_at": "2021-10-28T00:40:08.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "79443079d65a45b5952e79b4fb434769", "name": "admin"}, "is_domain": false, "roles": [{"id": "b54ba53d07d14e689a1aa15c6b3611f9", "name": "member"}, {"id": "0e8188a1d42c40818bd7414ce4951826", "name": "admin"}, {"id": "ec854daf2f544f848e3bf1b81d0cdc44", "name": "reader"}], "catalog": [{"endpoints": [{"id": "471d876423bb48dd9cb3aa235aed646d", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13004/v1/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "b187093d1a7545198289530aed1f7dd8", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8004/v1/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "c42964843c35410f9999e48175639083", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8004/v1/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}], "id": "1e18795f681d44968d71c16a880b68e3", "type": "orchestration", "name": "heat"}, {"endpoints": [{"id": "5396cc12367344a8864d43af5c76a7dd", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13696";, "region": "regionOne"}, {"id": "db08cf4f3fa546ddadaaacd51f73c3aa", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:9696";, "region": "regionOne"}, {"id": "fc3ad0c156e448a48817d193e89bb5c8", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:9696";, "region": "regionOne"}], "id": "54bcd636cc3f45e8830493ee7c101535", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "68972a99eda149418406d500dfdc0435", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13776/v3/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "b161744633d24f38bd589264e8daa55a", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8776/v3/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "ed76389060514a0eacfe82ab5dd61743", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8776/v3/79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}], "id": "7f6968d1800340308395ca94d52a9ad3", "type": "volumev3", "name": "cinderv3"}, {"endpoints": [{"id": "15f573d2877948a1b52b9e1aea5b0662", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13774/v2.1";, "region": "regionOne"}, {"id": "ce7715027b0447d29fc52179abe7b3a0", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8774/v2.1";, "region": "regionOne"}, {"id": "ec59c7bea1504f00bb38a2b9a02fd346", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8774/v2.1";, "region": "regionOne"}], "id": "b8a0a5cf10424be7a4891c641a122930", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "09ac78ea2b784be5a7fe1b6067f791cc", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.ctlplane.localdomain:35357";, "region": "regionOne"}, {"id": "8e6bb333506b4175b2d4bc2a702e3004", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:5000";, "region": "regionOne"}, {"id": "c87c86be2ad7435a82795bf6fcf604ac", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13000";, "region": "regionOne"}], "id": "cc365c9f4dc94dc1bc0efda6d9a46567", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "1b2ddf2629b247e1b20c34a01199f42c", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.storage.localdomain:8080";, "region": "regionOne"}, {"id": "26c3d4e4ff08475eaa0a9f4a91076a60", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13808/v1/AUTH_79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}, {"id": "3c291cca9df44518bd6e613a4a8193cb", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.storage.localdomain:8080/v1/AUTH_79443079d65a45b5952e79b4fb434769";, "region": "regionOne"}], "id": "cd326ad376994c0ea1a784f91c10d97f", "type": "object-store", "name": "swift"}, {"endpoints": [{"id": "2cf3bb3dca644293a34cc5a62b5f4374", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8778/placement";, "region": "regionOne"}, {"id": "74ebbf3e6cbe48f2b884122e196647ae", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8778/placement";, "region": "regionOne"}, {"id": "8892dc0e1dfc420686b3fdb6c4883c4b", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13778/placement";, "region": "regionOne"}], "id": "dfabd68e2b6b474db722baad43936348", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "15b412051e114052b513ad5763addcb7", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:9292";, "region": "regionOne"}, {"id": "a5fff1ad390b43e6ad256555396e8d73", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13292";, "region": "regionOne"}, {"id": "b5fc3a6645104f9c9c49cbf0e60823d7", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:9292";, "region": "regionOne"}], "id": "e6eb24e6dffc40c5a02247c1b79300ac", "type": "image", "name": "glance"}, {"endpoints": [{"id": "1d7a29007cfc4b4ab117fd076a2c1274", "interface": "internal", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8000/v1";, "region": "regionOne"}, {"id": "a4b17305a9d143ed90029e066da8352c", "interface": "public", "region_id": "regionOne", "url": "https://overcloud.localdomain:13005/v1";, "region": "regionOne"}, {"id": "da6deefd75b54226bb0e706f2c67b072", "interface": "admin", "region_id": "regionOne", "url": "https://overcloud.internalapi.localdomain:8000/v1";, "region": "regionOne"}], "id": "fad49abe356a4a428b1cf90f9b3d47bf", "type": "cloudformation", "name": "heat-cfn"}]}}
  run(Namespace(network_agent='1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf', description=None, enable=False, disable=True))
  Network client initialized using OpenStack SDK: <openstack.network.v2._proxy.Proxy object at 0x7f8090adb1f0>
  REQ: curl -g -i -X GET https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf -H "User-Agent: openstacksdk/0.59.0 keystoneauth1/4.4.0 python-requests/2.25.1 CPython/3.9.7" -H "X-Auth-Token: {SHA256}5e301cec1d5e0140d198af0f542d3280ea35f868947b1a67fdc1fb08e2502071"
  Starting new HTTPS connection (1): overcloud.localdomain:13696
  https://overcloud.localdomain:13696 "GET /v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf HTTP/1.1" 200 279
  RESP: [200] content-encoding: gzip content-length: 279 content-type: application/json date: Thu, 28 Oct 2021 00:40:08 GMT server: Apache vary: Accept-Encoding via: 1.1 controller-2.internalapi.home.arpa:13696 x-openstack-request-id: req-fc0b6eda-4b65-47b6-acbd-734e5a855f8a
  RESP BODY: {"agent": {"binary": "ovn-controller", "host": "compute-1.home.arpa", "heartbeat_timestamp": "2021-10-28 00:40:08.674985", "availability_zone": "", "topic": "n/a", "description": "", "configurations": {"chassis_name": "1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf", "bridge-mappings": "datacentre:br-ex"}, "agent_type": "OVN Controller agent", "id": "1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf", "alive": true, "admin_state_up": true}}
  GET call to network for https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf used request id req-fc0b6eda-4b65-47b6-acbd-734e5a855f8a
  REQ: curl -g -i -X PUT https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf -H "Content-Type: application/json" -H "User-Agent: openstacksdk/0.59.0 keystoneauth1/4.4.0 python-requests/2.25.1 CPython/3.9.7" -H "X-Auth-Token: {SHA256}5e301cec1d5e0140d198af0f542d3280ea35f868947b1a67fdc1fb08e2502071" -d '{"agent": {"admin_state_up": false}}'
  https://overcloud.localdomain:13696 "PUT /v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf HTTP/1.1" 400 123
  RESP: [400] content-length: 123 content-type: application/json date: Thu, 28 Oct 2021 00:40:08 GMT server: Apache via: 1.1 controller-2.internalapi.home.arpa:13696 x-openstack-request-id: req-84c51d15-8cf6-481c-84e2-f5cec54a008e
  RESP BODY: {"NeutronError": {"type": "BadRequest", "message": "Bad agent request: OVN agent status cannot be updated.", "detail": ""}}
  PUT call to network for https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf used request id req-84c51d15-8cf6-481c-84e2-f5cec54a008e
  BadRequestException: 400: Client Error for url: https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf, Bad agent request: OVN agent status cannot be updated.
  Traceback (most recent call last):
    File "/usr/lib/python3.9/site-packages/cliff/app.py", line 407, in run_subcommand
      result = cmd.run(parsed_args)
    File "/usr/lib/python3.9/site-packages/osc_lib/command/command.py", line 39, in run
      return super(Command, self).run(parsed_args)
    File "/usr/lib/python3.9/site-packages/cliff/command.py", line 186, in run
      return_code = self.take_action(parsed_args) or 0
    File "/usr/lib/python3.9/site-packages/openstackclient/network/v2/network_agent.py", line 366, in take_action
      client.update_agent(obj, **attrs)
    File "/usr/lib/python3.9/site-packages/openstack/network/v2/_proxy.py", line 348, in update_agent
      return self._update(_agent.Agent, agent, **attrs)
    File "/usr/lib/python3.9/site-packages/openstack/proxy.py", line 48, in check
      return method(self, expected, actual, *args, **kwargs)
    File "/usr/lib/python3.9/site-packages/openstack/network/v2/_proxy.py", line 71, in _update
      return res.commit(self, base_path=base_path, if_revision=if_revision)
    File "/usr/lib/python3.9/site-packages/openstack/resource.py", line 1562, in commit
      return self._commit(session, request, self.commit_method, microversion,
    File "/usr/lib/python3.9/site-packages/openstack/resource.py", line 1590, in _commit
      self._translate_response(response, has_body=has_body)
    File "/usr/lib/python3.9/site-packages/openstack/resource.py", line 1177, in _translate_response
      exceptions.raise_from_response(response, error_message=error_message)
    File "/usr/lib/python3.9/site-packages/openstack/exceptions.py", line 236, in raise_from_response
      raise cls(
  openstack.exceptions.BadRequestException: BadRequestException: 400: Client Error for url: https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf, Bad agent request: OVN agent status cannot be updated.
  clean_up SetNetworkAgent: BadRequestException: 400: Client Error for url: https://overcloud.localdomain:13696/v2.0/agents/1dc65f6b-d1ba-4d06-9ad6-4500bea8b9cf, Bad agent request: OVN agent status cannot be updated.
  END return value: 1
  ~~~

  [3]
  ~~~
  (overcloud) [stack@undercloud-0 ~]$ neutron agent-update 2e224307-eae5-56cc-8646-95e80432c55e --admin-state-down
  neutron CLI is deprecated and will be removed in the Z cycle. Use openstack CLI instead.
  Bad agent request: OVN agent status cannot be updated.
  Neutron server returns request_ids: ['req-dd67baa1-7adc-41f6-88d9-78b604af209e']
  ~~~

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1949202/+subscriptions



Follow ups