Project

General

Profile

Actions

Bug #38742

open

unable to choose a fixed ip openstack neutron

Added by Loumy Cyril 2 months ago. Updated about 1 month ago.

Status:
Ready For Testing
Priority:
Normal
Assignee:
-
Category:
Compute resources - OpenStack
Target version:
-
Difficulty:
medium
Triaged:
No

Description

When you assign a static IP address to the interface, OpenStack doesn't use it and instead takes a random IP. Additionally, the fixed IP address isn't visible in the request to OpenStack.

POST /v2.1/servers HTTP/1.1
Host: zzzzzzzz:8774
User-Agent: fog-core/2.3.0
Content-Type: application/json
Accept: application/json
X-Auth-Token: zzzzzzzzz
X-OpenStack-Nova-API-Version: 2.15
Content-Length: 311

{"server":{"flavorRef":"1","name":"wilma-tierman.novalocal","imageRef":"0685fb05-91bc-4dd5-8812-6a81bccbe4f1","metadata":{},"availability_zone":"nova","key_name":"foreman-24bc1c7d6-7856-4987-83b3-895651c47e49","security_groups":[{"name":"default"}],"networks":[{"uuid":"012df8bc-72ed-4a7a-9196-af21104f4bb5"}]}}

Here the workflow :
I am able to connect Foreman to one project and provision new instances with the right flavor , on the right network. We use standard cloud images RHEL 9.6 + Katello. Everything works as expected.
However , the IP address of the network port attached to the instance is always allocated by (I guess) Openstack .
Since we manage our IP pool upstream , I want now to be able to specify one static IP address at the instance creation on Foreman side.

This features seems to be available in Foreman, and I have played with parameters in two sections :

in the Infrastructure → subnet definition->
IPAM field to “None” or “Internal DB”
Boot mode to “Static” vs DHCP
in the Host creation wizard → Interfaces Tab → edit :
choose the IPV4 subnet
entered a fixed IP in the subnet in the IPV4 Address field
check or uncheck the Managed box
and on Openstack side :

enable or disable DHCP in the subnet details
In all cases, the port IP address is still allocated by Openstack .

I would expect Foreman to reproduce what I can do by hand on Openstack side :

allocate a port in the subnet with one fixed IP address
create an instance with this port attached.

Following https://projects.theforeman.org/issues/25553 and https://community.theforeman.org/t/foreman-fails-to-provision-openstack-instances-with-fixed-ip-address/44301

Actions

Also available in: Atom PDF