Project

General

Profile

Actions

Bug #37711

closed

nic_managed factory can create an IP outside of its subnet

Added by Ewoud Kohl van Wijngaarden 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Tests
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

A test has been failing intermittently recently. This is using the `nic_managed` factory:
https://github.com/theforeman/foreman/blob/6aac916fb183f47596e8d543756faac27750a21e/test/factories/host_related.rb#L80-L92

Critical line is that it tries to add an IP from a the subnet as a sequence. My theory is that we have enough tests that sometimes it creates an IP outside of the range. IP in question is `10.10.11.39` which is indeed outside of `10.10.10.0/24`. It somehow needs to take that into account. Probably with a modulo.

Actions

Also available in: Atom PDF