Foreman Internal DB assigned ip space issue

I've noticed a bug in foreman when assigning IP space using the "Internal DB". We currently want both ipv4 and ipv6 space to match when assigned. Something like this.

10.0.0.230
XXXX:XXX:XXX:5::0:230

If you set the range of ipv4 space to 10.0.0.230 to 10.0.0.250 and XXXX:XXX:XXX:5::0:230 to XXXX:XXX:XXX:5::0:250 when you build a VM you'll get these 2 assigned if building a VM.

10.0.0.230
XXXX:XXX:XXX:5::0:231

(v4 is .230, v6 is :231)

Now, if you build baremetal it works (10.0.0.230 XXXX:XXX:XXX:5::0:230).

Since we're not building a lot of baremetal machines I set the ipv4 value to 10.0.0.231 to 10.0.0.250 and it allows us to work around it (it assigns in proper sequence). HOWEVER this breaks baremetal and you have to manually correct it. Same for "clone" versions of host creations.

This seems to be an issue with 1.15 and 1.16 (probably earlier also).
Hello,

there is no contract that you are getting same numbers for IPv4 and 6. This is not a bug, feel free to send RFE or patch to do this.

We have new Random IPAM generator that returns pseudo random IPs seeded by MAC address of the device. Basically it will always return you same IP address for same physical NIC. This will not work for VMs tho.

LZ


··· On Thu, Dec 7, 2017 at 6:49 PM, Mike Wilson <uce.mikew@gmail.com> wrote:
I've noticed a bug in foreman when assigning IP space using the "Internal
DB". We currently want both ipv4 and ipv6 space to match when assigned.
Something like this.

10.0.0.230
XXXX:XXX:XXX:5::0:230

If you set the range of ipv4 space to 10.0.0.230 to 10.0.0.250 and
XXXX:XXX:XXX:5::0:230 to XXXX:XXX:XXX:5::0:250 when you build a VM you'll
get these 2 assigned if building a VM.

10.0.0.230
XXXX:XXX:XXX:5::0:231

(v4 is .230, v6 is :231)

Now, if you build baremetal it works (10.0.0.230 XXXX:XXX:XXX:5::0:230).

Since we're not building a lot of baremetal machines I set the ipv4 value to
10.0.0.231 to 10.0.0.250 and it allows us to work around it (it assigns in
proper sequence). HOWEVER this breaks baremetal and you have to manually
correct it. Same for "clone" versions of host creations.

This seems to be an issue with 1.15 and 1.16 (probably earlier also).

--
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


--
Later,
  Lukas @lzap Zapletal