can not create a server with IPv4 and IPv6 fixed ip

Bug #2152032 reported by do3meli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Invalid
Undecided
Unassigned

Bug Description

i can not create a server with a fixed IPv4 and IPv6 in the same network but different subnets. I get the following error when using:

openstack server create --flavor x --image y --boot-from-volume 10 --nic net-id=<uuid-of-network>,v4-fixed-ip=<fixed-ipv4>,v6-fixed-ip=<fixed-ipv6> --key-name z --availability-zone a test-vm-name

i get the following error:
openstack server create: error: argument --nic: Invalid argument net-id=<uuid-of-network>,v4-fixed-ip=<fixed-ipv4>,v6-fixed-ip=<fixed-ipv6>; either 'v4-fixed-ip' or 'v6-fixed-ip' should be specified but not both

this seems to be hardcoded here: https://github.com/openstack/python-openstackclient/blob/902fb783424725434c20857d1dd1fef31ed4180e/openstackclient/compute/v2/server.py#L999

therefore it is not possible to create a vm with a dual stack directly. as a work around one would have to create the port before and attach it or leave the ipv6 address away and add it after creation.

Kim Taewoo (ktw030313)
Changed in python-openstackclient:
assignee: nobody → Kim Taewoo (ktw030313)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)
Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
sean mooney (sean-k-mooney) wrote :

nova does not accpate muliple fixed ips per network obejct

so regardless of if its ipv4 or ipv6 or dual stack if you are using nova to create the neutron prot you can only specify at most 1 fixed ip per --nic or network request object in the servier request.

so the limitation is the client is correct.

it woudl need a nova api microverion to chnage the filed form a sting to a list of adresses to supprot this which is not a bug its a new nova api feature.

setting this to invalid as a result

Changed in python-openstackclient:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-openstackclient (master)

Change abandoned by "Kim Taewoo <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/python-openstackclient/+/995003
Reason: Nova API's fixed_ip expects single string, so abandon this patch.

Kim Taewoo (ktw030313)
Changed in python-openstackclient:
assignee: Kim Taewoo (ktw030313) → nobody
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.