**Problem:**When editing a host in Foreman, a reproducible error occurs as soon as a subnet is assigned to an additional interface.
Error message:
“Unable to save – Failed to render template ‘xyz’, undefined method mask for NilClass”
Reproduction:
-
Add a new additional interface without a subnet → saving works
-
Assign a subnet afterwards → saving fails with the error
Additionally:
-
Deleting the affected interface is also not possible (same error)
-
The issue is resolved if the host is set to Unmanaged and then back to Managed
Setup:
-
Host with multiple interfaces
-
Provisioning interface exists and remains unchanged
-
Subnet is correctly configured (network, netmask, organization, location)
-
No VLAN configured
Observation:
The error occurs during template rendering and indicates that .mask is being called on a nil object. The issue only appears when a subnet is assigned to the additional interface.
Foreman and Proxy versions: 3.18.1
Foreman and Proxy plugin versions: 3.18.1
Distribution and version: RHEL 9.7
Other relevant data: