Unable to update fixed IP on the same port

Bug #2095208 reported by Jakub Libosvar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

A port can have multiple fixed IPs assigned from different subnets. If a FIP is associated with the port, it should be possible to update what fixed IP should the FIP be associated with. When updating the fixed IP the port-id is not sent to the Neutron server:

Example:
openstack --debug floating ip set --port 18fa9d0d-f648-4ad6-a59f-7879ad21160f --fixed-ip 10.0.0.78 172.24.4.79

fails in Neutron server:
openstack.exceptions.BadRequestException: BadRequestException: 400: Client Error for url: http://192.168.121.113:9696/networking/v2.0/floatingips/5b65da16-b2b6-451b-b2a5-4e5b29a12ffd, Bad floatingip request: fixed_ip_address cannot be specified without a port_id.

because the request body doesn't send the port ID:
REQ: curl -g -i -X PUT http://192.168.121.113:9696/networking/v2.0/floatingips/5b65da16-b2b6-451b-b2a5-4e5b29a12ffd -H "Content-Type: application/json" -H "User-Agent: openstacksdk/4.2.0 keystoneauth1/5.9.1 python-requests/2.32.3 CPython/3.10.12" -H "X-Auth-Token: {SHA256}993c237d31c1cfda4cfff84886282cb8ab021eebfe3d5cac5e7127317f694a24" -d '{"floatingip": {"fixed_ip_address": "10.0.0.78"}}'

Compared to an update when changing only the port id that works:
 openstack floating ip set --port 7207d782-7b04-4310-bc75-85cd433c33d1 172.24.4.79

REQ: curl -g -i -X PUT http://192.168.121.113:9696/networking/v2.0/floatingips/5b65da16-b2b6-451b-b2a5-4e5b29a12ffd -H "Content-Type: application/json" -H "User-Agent: openstacksdk/4.2.0 keystoneauth1/5.9.1 python-requests/2.32.3 CPython/3.10.12" -H "X-Auth-Token: {SHA256}1557c854ea315e6d33bf5ba502cf5cd2ebf2fe5a0171c305fe69c9e210fd1d10" -d '{"floatingip": {"port_id": "7207d782-7b04-4310-bc75-85cd433c33d1"}}'

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.