Command from official documentation
https://docs.openstack.org/install-guide/launch-instance-selfservice.html
https://docs.openstack.org/python-openstackclient/pike/cli/command-objects/server.html
not working:
root@ctrl00:~# openstack server add floating ip b25132a4-ccfe-4611-90f4-1a55e5c3b83a 192.168.11.21
add_floating_ip
root@ctrl00:~# openstack server list
+--------------------------------------+-------+--------+--------------------+--------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------+--------+--------------------+--------+---------+
| b25132a4-ccfe-4611-90f4-1a55e5c3b83a | demo1 | ACTIVE | demo-net=10.0.0.13 | cirros | m1.tiny |
+--------------------------------------+-------+--------+--------------------+--------+---------+
but when i do that other way:
root@ctrl00:~# openstack port list
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
| 1e9638d9-0f4d-4407-88e1-2d1732880a8b | | fa:16:3e:eb:e8:a0 | ip_address='192.168.11.11', subnet_id='0f00f9a7-515f-417f-a513-364bd23db358' | N/A |
| 377e5328-b9d2-4be0-93bc-0582d7db2c3c | | fa:16:3e:3d:35:c1 | ip_address='192.168.11.21', subnet_id='0f00f9a7-515f-417f-a513-364bd23db358' | N/A |
| 4db697ee-01f9-413e-96cc-20f31d010631 | | fa:16:3e:5c:64:29 | ip_address='192.168.11.19', subnet_id='0f00f9a7-515f-417f-a513-364bd23db358' | ACTIVE |
| 526cc85c-5711-4b42-8110-02858305c7a9 | | fa:16:3e:b9:c2:d8 | ip_address='192.168.11.18', subnet_id='0f00f9a7-515f-417f-a513-364bd23db358' | ACTIVE |
| 67473834-58ac-493f-a65d-766ef96c8a98 | | fa:16:3e:b2:53:85 | ip_address='10.0.0.12', subnet_id='4027d517-da45-483d-b2a2-4276acfb0d5d' | ACTIVE |
| 844cfd77-82b2-4d80-a247-c2a7cb5dcac7 | | fa:16:3e:f8:72:1c | ip_address='10.0.0.2', subnet_id='4027d517-da45-483d-b2a2-4276acfb0d5d' | ACTIVE |
| 896d8e09-12e5-4d7b-a091-b258fad4bcfb | | fa:16:3e:30:cd:cf | ip_address='10.0.0.1', subnet_id='4027d517-da45-483d-b2a2-4276acfb0d5d' | ACTIVE |
| a00b6bae-05d5-4abd-9111-39e1473ac5df | | fa:16:3e:ae:45:d0 | ip_address='192.168.11.15', subnet_id='0f00f9a7-515f-417f-a513-364bd23db358' | ACTIVE |
| cb3d05ef-a93e-4b59-81bf-53b4409aee85 | | fa:16:3e:51:0a:62 | ip_address='10.0.0.13', subnet_id='4027d517-da45-483d-b2a2-4276acfb0d5d' | ACTIVE |
| e8544e87-e931-4062-839b-01b5e2bd8922 | | fa:16:3e:29:8b:ff | ip_address='192.168.11.20', subnet_id='0f00f9a7-515f-417f-a513-364bd23db358' | N/A |
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
root@ctrl00:~# openstack server add floating ip b25132a4-ccfe-4611-90f4-1a55e5c3b83a 192.168.11.21
add_floating_ip
root@ctrl00:~# openstack server list
+--------------------------------------+-------+--------+--------------------+--------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------+--------+--------------------+--------+---------+
| b25132a4-ccfe-4611-90f4-1a55e5c3b83a | demo1 | ACTIVE | demo-net=10.0.0.13 | cirros | m1.tiny |
+--------------------------------------+-------+--------+--------------------+--------+---------+
root@ctrl00:~# openstack floating ip set --port cb3d05ef-a93e-4b59-81bf-53b4409aee85 --fixed-ip-address 10.0.0.13 192.168.11.21
root@ctrl00:~# openstack server list
+--------------------------------------+-------+--------+-----------------------------------+--------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------+--------+-----------------------------------+--------+---------+
| b25132a4-ccfe-4611-90f4-1a55e5c3b83a | demo1 | ACTIVE | demo-net=10.0.0.13, 192.168.11.21 | cirros | m1.tiny |
+--------------------------------------+-------+--------+-----------------------------------+--------+---------+
root@ctrl00:~#
is working without problem. Here are --debug outputs:
with instance id: http://pastebin.pl/view/9cf23fff
with instance name: http://pastebin.pl/view/acf1f580
Same problem: https:/ /bugs.launchpad .net/python- openstackclient /+bug/1701079