removing floating ip from server does not check the server

Bug #2060812 reported by Josephine Seifert
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned
neutron
Opinion
Undecided
Unassigned

Bug Description

A floating Ip can be removed from a server with the following CLI command:
openstack server remove floating IP <server> <floating IP>

The documentation says, it will remove the floating IP from the given server:
https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/server.html#server-remove-floating-ip

When nova was responsible for associating/dissociating floating IPs from servers this was also checked:
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/floating_ips.py#L294

As a user I would expect a check, that the given pair of server and floating IP is correct and I would like to see an Error, if I made a mistake in providing a wrong server or Floating IP.

But the server is not checked at all.
Steps to reproduce:
1. Have a server with an associated floating IP
2. Remove the floating IP with the command, but give a non-existing server name:
openstack server remove floating IP <non-existing-server> <floating IP>
3. floating IP is removed

Example:
stack@devstack:~/devstack$ openstack floating ip list
+------------------------------------+---------------------+------------------+------------------------------------+------------------------------------+----------------------------------+
| ID | Floating IP Address | Fixed IP Address | Port | Floating Network | Project |
+------------------------------------+---------------------+------------------+------------------------------------+------------------------------------+----------------------------------+
| 0f340eb1-74c7-4cc0-8495- | 172.24.4.155 | 10.0.0.45 | d8387e3b-3b19-444a-9983- | 73edb86b-d7ab-4db3-82b7- | f58edaee60ad484facd2436d31d9caff |
| 8f648ff7bc61 | | | 42b61b3d19c1 | 25fa8b012e40 | |
| 1875754d-7b9f-47c2-9c0d- | 172.24.4.210 | 10.0.0.41 | 2a7a9f37-99ce-48e5-aaad- | 73edb86b-d7ab-4db3-82b7- | 15f2ab0eaa5b4372b759bde609e86224 |
| 83eafd1a0a76 | | | 416368438c52 | 25fa8b012e40 | |
| 3978a1f6-3af8-432f-978a- | 172.24.4.222 | None | None | 73edb86b-d7ab-4db3-82b7- | 15f2ab0eaa5b4372b759bde609e86224 |
| c7feafd88057 | | | | 25fa8b012e40 | |
| 9e193d33-17f9-400b-b639- | 172.24.4.107 | None | None | 73edb86b-d7ab-4db3-82b7- | 15f2ab0eaa5b4372b759bde609e86224 |
| b51750d41bc0 | | | | 25fa8b012e40 | |
+------------------------------------+---------------------+------------------+------------------------------------+------------------------------------+----------------------------------+
stack@devstack:~/devstack$ openstack server list
+--------------------------------------+---------------+--------+-----------------------------------------------------------------------+--------------------------+----------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+---------------+--------+-----------------------------------------------------------------------+--------------------------+----------+
| 66f8f821-ec26-4264-807e-36ec016d51f9 | my-new-server | ACTIVE | private=10.0.0.41, 172.24.4.210, fd13:d046:e727:0:f816:3eff:fe98:3e70 | N/A (booted from volume) | m1.small |
| e7c7d615-8abc-4657-a334-953d5c6a95e1 | test-server | ACTIVE | private=10.0.0.45, 172.24.4.155, fd13:d046:e727:0:f816:3eff:febf:840b | N/A (booted from volume) | m1.small |
+--------------------------------------+---------------+--------+-----------------------------------------------------------------------+--------------------------+----------+
stack@devstack:~/devstack$ openstack server remove floating ip my-new-server 172.24.4.155
stack@devstack:~/devstack$ openstack server list
+--------------------------------------+---------------+--------+-----------------------------------------------------------------------+--------------------------+----------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+---------------+--------+-----------------------------------------------------------------------+--------------------------+----------+
| 66f8f821-ec26-4264-807e-36ec016d51f9 | my-new-server | ACTIVE | private=10.0.0.41, 172.24.4.210, fd13:d046:e727:0:f816:3eff:fe98:3e70 | N/A (booted from volume) | m1.small |
| e7c7d615-8abc-4657-a334-953d5c6a95e1 | test-server | ACTIVE | private=10.0.0.45, fd13:d046:e727:0:f816:3eff:febf:840b | N/A (booted from volume) | m1.small |
+--------------------------------------+---------------+--------+-----------------------------------------------------------------------+--------------------------+----------+
stack@devstack:~/devstack$ openstack floating ip list
+------------------------------------+---------------------+------------------+------------------------------------+------------------------------------+----------------------------------+
| ID | Floating IP Address | Fixed IP Address | Port | Floating Network | Project |
+------------------------------------+---------------------+------------------+------------------------------------+------------------------------------+----------------------------------+
| 0f340eb1-74c7-4cc0-8495- | 172.24.4.155 | None | None | 73edb86b-d7ab-4db3-82b7- | f58edaee60ad484facd2436d31d9caff |
| 8f648ff7bc61 | | | | 25fa8b012e40 | |
| 1875754d-7b9f-47c2-9c0d- | 172.24.4.210 | 10.0.0.41 | 2a7a9f37-99ce-48e5-aaad- | 73edb86b-d7ab-4db3-82b7- | 15f2ab0eaa5b4372b759bde609e86224 |
| 83eafd1a0a76 | | | 416368438c52 | 25fa8b012e40 | |
| 3978a1f6-3af8-432f-978a- | 172.24.4.222 | None | None | 73edb86b-d7ab-4db3-82b7- | 15f2ab0eaa5b4372b759bde609e86224 |
| c7feafd88057 | | | | 25fa8b012e40 | |
| 9e193d33-17f9-400b-b639- | 172.24.4.107 | None | None | 73edb86b-d7ab-4db3-82b7- | 15f2ab0eaa5b4372b759bde609e86224 |
| b51750d41bc0 | | | | 25fa8b012e40 | |
+------------------------------------+---------------------+------------------+------------------------------------+------------------------------------+----------------------------------+
stack@devstack:~/devstack$ openstack server remove floating ip this-server-does-not-exist 172.24.4.210 --debug
START with options: server remove floating ip this-server-does-not-exist 172.24.4.210 --debug
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='', 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='', os_identity_api_version='3', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_volume_api_version='3', os_dns_api_version='2', os_placement_api_version='1', os_key_manager_api_version='1', auth_type='password', auth_url='http://192.168.23.238/identity', system_scope='', domain_id='', domain_name='', project_id='', project_name='admin', project_domain_id='default', project_domain_name='', trust_id='', identity_provider='', protocol='', client_id='', client_secret='***', openid_scope='', access_token_endpoint='', discovery_endpoint='', access_token_type='', access_token='***', default_domain_id='', default_domain_name='', token='***', identity_provider_url='', service_provider_endpoint='', service_provider_entity_id='', username='admin', password='***', oauth2_endpoint='', oauth2_client_id='', oauth2_client_secret='***', user_id='', user_domain_id='default', user_domain_name='', endpoint='', redirect_uri='', code='', application_credential_secret='***', application_credential_id='', application_credential_name='', passcode='', device_authorization_endpoint='', code_challenge_method='', auth_methods='', consumer_key='', consumer_secret='***', access_key='', access_secret='***', 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_id': 'default', 'project_domain_id': 'default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'auth_url': 'http://192.168.23.238/identity', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'volume_api_version': '3', 'dns_api_version': '2', 'placement_api_version': '1', 'key_manager_api_version': '1', 'auth_type': 'password', ': []}
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': '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'}
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_id': 'default', 'project_domain_id': 'default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'auth_url': 'http://192.168.23.238/identity', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'volume_api_version': '3', 'dns_api_version': '2', 'placement_api_version': '1', 'key_manager_api_version': '1', 'auth_type': 'password', ': []}
compute API version 2.1, 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
dns API version 2, cmd group openstack.dns.v2
placement API version 1, cmd group openstack.placement.v1
key_manager API version 1, cmd group openstack.key_manager.v1
command: server remove floating ip -> openstackclient.compute.v2.server.RemoveFloatingIP (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_id': 'default', 'project_domain_id': 'default', 'project_name': 'admin'}, 'additional_user_agent': [('osc-lib', '3.0.0')], 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'auth_url': 'http://192.168.23.238/identity', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'volume_api_version': '3', 'dns_api_version': '2', 'placement_api_version': '1', 'key_manager_api_version': '1', 'auth_type': 'password', ': []}
Using auth plugin: password
Using parameters {'auth_url': 'http://192.168.23.238/identity', 'project_name': 'admin', 'project_domain_id': 'default', 'username': 'admin', 'user_domain_id': 'default', 'password': '***'}
Get auth_ref
REQ: curl -g -i -X GET http://192.168.23.238/identity -H "Accept: application/json" -H "User-Agent: openstacksdk/2.1.0 keystoneauth1/5.5.0 python-requests/2.31.0 CPython/3.10.12"
Starting new HTTP connection (1): 192.168.23.238:80
http://192.168.23.238:80 "GET /identity HTTP/1.1" 300 273
RESP: [300] Connection: close Content-Length: 273 Content-Type: application/json Date: Wed, 10 Apr 2024 12:50:26 GMT Location: http://192.168.23.238/identity/v3/ Server: Apache/2.4.52 (Ubuntu) Vary: X-Auth-Token x-openstack-request-id: req-c4276516-3d65-4dea-b305-ec2984e27ffa
RESP BODY: {"versions": {"values": [{"id": "v3.14", "status": "stable", "updated": "2020-04-07T00:00:00Z", "links": [{"rel": "self", "href": "http://192.168.23.238/identity/v3/"}], "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}]}]}}
GET call to http://192.168.23.238/identity used request id req-c4276516-3d65-4dea-b305-ec2984e27ffa
Making authentication request to http://192.168.23.238/identity/v3/auth/tokens
Resetting dropped connection: 192.168.23.238
http://192.168.23.238:80 "POST /identity/v3/auth/tokens HTTP/1.1" 201 3469
{"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "6cf194afebb6469e8423f50500b5c3fc", "name": "admin", "password_expires_at": null}, "audit_ids": ["Ut2bfNpBQNaKKbnkA922bA"], "expires_at": "2024-04-10T13:50:27.000000Z", "issued_at": "2024-04-10T12:50:27.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "15f2ab0eaa5b4372b759bde609e86224", "name": "admin"}, "is_domain": false, "roles": [{"id": "516ea3653eb7463e816fc5a3ee5042e8", "name": "manager"}, {"id": "8d64c40ff3ad45d3977e8b2fb2edee5f", "name": "member"}, {"id": "361b94f7a2884974bd4abd935a18dcde", "name": "admin"}, {"id": "d8c7c4eb2f42426a946d6988207af29a", "name": "reader"}], "catalog": [{"endpoints": [{"id": "4b01cdbd8cfa4a97b6204321495f8ddb", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238:9696/networking", "region": "RegionOne"}], "id": "08c8d312e77b44b8a7194351a2c32207", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "b5269d2bbce445e7b8dbf3f1c5f08598", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238/volume/v3/15f2ab0eaa5b4372b759bde609e86224", "region": "RegionOne"}], "id": "1116eaaf6d1d43868c7bddefbef96dcb", "type": "block-storage", "name": "cinder"}, {"endpoints": [{"id": "9c302e038ce1420fad7273c4cc7f6366", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238/identity", "region": "RegionOne"}], "id": "1dbd7ef92355476fa1a992c718ace24c", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "92072f1115a24c41b5f9a0892ecf40aa", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238/placement", "region": "RegionOne"}], "id": "28c0a8eb33314a96aa5fd7945cd42e24", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "3a553972ba8d4f61bb947c93a30ff3e6", "interface": "admin", "region_id": "RegionOne", "url": "http://192.168.23.238/key-manager", "region": "RegionOne"}, {"id": "b8aa5e3fdb02414b9bdcf4e39634a180", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238/key-manager", "region": "RegionOne"}, {"id": "e9298bef1ac84385a52cb70fdf40ce53", "interface": "internal", "region_id": "RegionOne", "url": "http://192.168.23.238/key-manager", "region": "RegionOne"}], "id": "36aa21dd25e244c49f4885989e3bac6a", "type": "key-manager", "name": "barbican"}, {"endpoints": [{"id": "869649bc451e407ead58e930671ec7b8", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238/compute/v2/15f2ab0eaa5b4372b759bde609e86224", "region": "RegionOne"}], "id": "5434067a7ee74c648087eda6e3c74ab8", "type": "compute_legacy", "name": "nova_legacy"}, {"endpoints": [{"id": "4267b32aae4e4ccca1caecadd495b9b6", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238/compute/v2.1", "region": "RegionOne"}], "id": "94d6e172207642cebadaa383112ee69d", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "6038adcb92494e1c9a1c23eb8647478c", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238/volume/v3/15f2ab0eaa5b4372b759bde609e86224", "region": "RegionOne"}], "id": "cdd03520aa414d07a082c22942bbe4d5", "type": "volumev3", "name": "cinderv3"}, {"endpoints": [{"id": "3376975f7aab4e9081fdd60100a6ae3f", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.23.238/image", "region": "RegionOne"}], "id": "cf8f2e4ac7af482fabd484a700b9c599", "type": "image", "name": "glance"}]}}
get_parser(openstack server remove floating ip)
common parser: ArgumentParser(prog='openstack server remove floating ip', usage=None, description='Remove floating IP address from server', formatter_class=<class 'cliff._argparse.SmartHelpFormatter'>, conflict_handler='ignore', add_help=True)
network endpoint in service catalog
run(Namespace(server='this-server-does-not-exist', ip_address='172.24.4.210'))
Network client initialized using OpenStack SDK: <openstack.network.v2._proxy.Proxy object at 0x7f01f65f8580>
REQ: curl -g -i -X GET http://192.168.23.238:9696/networking/v2.0/floatingips/172.24.4.210 -H "User-Agent: openstacksdk/2.1.0 keystoneauth1/5.5.0 python-requests/2.31.0 CPython/3.10.12" -H "X-Auth-Token: {SHA256}0a700c37c671e6db91aeedb072e78557eef6b22c40d5d97765aa217d93c3c290"
Starting new HTTP connection (1): 192.168.23.238:9696
http://192.168.23.238:9696 "GET /networking/v2.0/floatingips/172.24.4.210 HTTP/1.1" 404 120
RESP: [404] Connection: keep-alive Content-Length: 120 Content-Type: application/json Date: Wed, 10 Apr 2024 12:50:27 GMT X-Openstack-Request-Id: req-fd99294d-976b-4a1f-a262-68bdd470b599
RESP BODY: {"NeutronError": {"type": "FloatingIPNotFound", "message": "Floating IP 172.24.4.210 could not be found", "detail": ""}}
GET call to network for http://192.168.23.238:9696/networking/v2.0/floatingips/172.24.4.210 used request id req-fd99294d-976b-4a1f-a262-68bdd470b599
REQ: curl -g -i -X GET http://192.168.23.238:9696/networking/v2.0/floatingips -H "Accept: application/json" -H "User-Agent: openstacksdk/2.1.0 keystoneauth1/5.5.0 python-requests/2.31.0 CPython/3.10.12" -H "X-Auth-Token: {SHA256}0a700c37c671e6db91aeedb072e78557eef6b22c40d5d97765aa217d93c3c290"
http://192.168.23.238:9696 "GET /networking/v2.0/floatingips HTTP/1.1" 200 2377
RESP: [200] Connection: keep-alive Content-Length: 2377 Content-Type: application/json Date: Wed, 10 Apr 2024 12:50:27 GMT X-Openstack-Request-Id: req-c5a51208-e080-4470-b97c-0d11b4af6010
RESP BODY: {"floatingips": [{"id": "0f340eb1-74c7-4cc0-8495-8f648ff7bc61", "tenant_id": "f58edaee60ad484facd2436d31d9caff", "floating_ip_address": "172.24.4.155", "floating_network_id": "73edb86b-d7ab-4db3-82b7-25fa8b012e40", "router_id": null, "port_id": null, "fixed_ip_address": null, "status": "DOWN", "description": "", "port_details": null, "dns_domain": "", "dns_name": "", "tags": [], "created_at": "2024-03-13T08:49:51Z", "updated_at": "2024-04-10T12:49:36Z", "revision_number": 4, "project_id": "f58edaee60ad484facd2436d31d9caff"}, {"id": "1875754d-7b9f-47c2-9c0d-83eafd1a0a76", "tenant_id": "15f2ab0eaa5b4372b759bde609e86224", "floating_ip_address": "172.24.4.210", "floating_network_id": "73edb86b-d7ab-4db3-82b7-25fa8b012e40", "router_id": "5c5c792e-c4d9-4077-97d1-6d8a9108f39f", "port_id": "2a7a9f37-99ce-48e5-aaad-416368438c52", "fixed_ip_address": "10.0.0.41", "status": "ACTIVE", "description": "", "port_details": {"name": "", "network_id": "9f8b7b77-3a81-4484-bf8a-563027c663e1", "mac_address": "fa:16:3e:98:3e:70", "admin_state_up": true, "status": "ACTIVE", "device_id": "66f8f821-ec26-4264-807e-36ec016d51f9", "device_owner": "compute:nova"}, "dns_domain": "", "dns_name": "", "tags": [], "created_at": "2024-02-19T07:14:18Z", "updated_at": "2024-04-10T09:10:53Z", "revision_number": 4, "project_id": "15f2ab0eaa5b4372b759bde609e86224"}, {"id": "3978a1f6-3af8-432f-978a-c7feafd88057", "tenant_id": "15f2ab0eaa5b4372b759bde609e86224", "floating_ip_address": "172.24.4.222", "floating_network_id": "73edb86b-d7ab-4db3-82b7-25fa8b012e40", "router_id": null, "port_id": null, "fixed_ip_address": null, "status": "DOWN", "description": "", "port_details": null, "dns_domain": "", "dns_name": "", "tags": [], "created_at": "2024-03-13T08:48:54Z", "updated_at": "2024-03-13T08:48:54Z", "revision_number": 0, "project_id": "15f2ab0eaa5b4372b759bde609e86224"}, {"id": "9e193d33-17f9-400b-b639-b51750d41bc0", "tenant_id": "15f2ab0eaa5b4372b759bde609e86224", "floating_ip_address": "172.24.4.107", "floating_network_id": "73edb86b-d7ab-4db3-82b7-25fa8b012e40", "router_id": null, "port_id": null, "fixed_ip_address": null, "status": "DOWN", "description": "", "port_details": null, "dns_domain": "", "dns_name": "", "tags": [], "created_at": "2024-03-27T13:35:59Z", "updated_at": "2024-03-27T13:35:59Z", "revision_number": 0, "project_id": "15f2ab0eaa5b4372b759bde609e86224"}]}
GET call to network for http://192.168.23.238:9696/networking/v2.0/floatingips used request id req-c5a51208-e080-4470-b97c-0d11b4af6010
REQ: curl -g -i -X PUT http://192.168.23.238:9696/networking/v2.0/floatingips/1875754d-7b9f-47c2-9c0d-83eafd1a0a76 -H "Content-Type: application/json" -H "User-Agent: openstacksdk/2.1.0 keystoneauth1/5.5.0 python-requests/2.31.0 CPython/3.10.12" -H "X-Auth-Token: {SHA256}0a700c37c671e6db91aeedb072e78557eef6b22c40d5d97765aa217d93c3c290" -d '{"floatingip": {"port_id": null}}'
http://192.168.23.238:9696 "PUT /networking/v2.0/floatingips/1875754d-7b9f-47c2-9c0d-83eafd1a0a76 HTTP/1.1" 200 530
RESP: [200] Connection: keep-alive Content-Length: 530 Content-Type: application/json Date: Wed, 10 Apr 2024 12:50:27 GMT X-Openstack-Request-Id: req-23564a76-3e4c-4539-a53e-dd47c8e81f3f
RESP BODY: {"floatingip": {"id": "1875754d-7b9f-47c2-9c0d-83eafd1a0a76", "tenant_id": "15f2ab0eaa5b4372b759bde609e86224", "floating_ip_address": "172.24.4.210", "floating_network_id": "73edb86b-d7ab-4db3-82b7-25fa8b012e40", "router_id": null, "port_id": null, "fixed_ip_address": null, "status": "ACTIVE", "description": "", "port_details": null, "dns_domain": "", "dns_name": "", "tags": [], "created_at": "2024-02-19T07:14:18Z", "updated_at": "2024-04-10T12:50:27Z", "revision_number": 5, "project_id": "15f2ab0eaa5b4372b759bde609e86224"}}
PUT call to network for http://192.168.23.238:9696/networking/v2.0/floatingips/1875754d-7b9f-47c2-9c0d-83eafd1a0a76 used request id req-23564a76-3e4c-4539-a53e-dd47c8e81f3f
clean_up RemoveFloatingIP:
END return value: 0

In the debug output there is no call to nova at all, to check, whether the server exists or not.
But that is only the Client Side. The server side also does not seem to perform a check for the server.

This makes the command in CLI completely confusing, because a user will expect that the specified server will be checked.

Revision history for this message
Brian Haley (brian-haley) wrote :

The Neutron API is only associating a floating IP with an internal port [0], there is no check for a server as that is under the purview of Nova.

Neutron will only raise a 409 on a 'create' call if the floating IP is already in-use, but not on a call to update it - either clearing or moving to another port.

I am curious to see what the Nova team thinks as it as according to their API the server add floating IP code has been deprecated [1].

[0] https://docs.openstack.org/api-ref/network/v2/index.html#floating-ips-floatingips
[1] https://docs.openstack.org/api-ref/compute/#add-associate-floating-ip-addfloatingip-action-deprecated

Changed in neutron:
status: New → Opinion
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.