Unable register host with bonds and VLANs

Problem:
Registration of physical host with network bonds and VLANs fails.

# subscription-manager register --org="dummy" --activationkey="dummy"
Validation failed: Attached to can't be blank (HTTP error code 422: Unprocessable Entity)

Expected outcome:
Host will be succesfully registered.

Foreman and Proxy versions:
foreman-3.9.1-1.el8.noarch
katello-4.11.0-1.el8.noarch

Same problem was also observed in foreman 3.7

Foreman and Proxy plugin versions:

Distribution and version:
RHEL 8.9

Other relevant data:

foreman_production.log (18.0 KB)
subscription_manager_facts.log (10.4 KB)

1 Like

Hi @mdedek ,

I found a potentially-related KCS article from Red Hat: Registering a machine with Red Hat Satellite 6 fails with error "Validation failed: Attached to can't be blank" - Red Hat Customer Portal. You can access it with a free subscription I think.

If you cannot access it, the pertinent information is that the bond or vlan-tagged interface cannot have a hypen or underscore. It also used to error out with uppercase characters, but this was fixed in 3.9 via Bug #36934: Host registration fails with error "Attached to can't be blank" when the VLAN name includes UPPERCASE letters - Foreman

In the logs you sent, I saw:

2024-01-11T14:34:54 [I|aud|63c35f03] Nic::Managed (2343) update event on identifier , nm-bond.260

If you remove that hyphen I think the issue should clear up.

1 Like

I have made some naming experiments and problem jumps out when interface name contains both hyphen and dot.
These characters are not forbidden in general. Is any chance that katello/foreman will be one day able register hosts with these interface names? It is not trivial to change network setting on production systems (downtime must be scheduled etc).

That’s a great question, @Marek_Hulan do you know who from the Foreman side might be able to help answer this?

Ensure that you are providing the correct organization and activation key during the registration process. Double-check that the organization and activation key are valid in your Foreman/Katello setup.
subscription-manager register --org=“your_organization” --activationkey=“your_activation_key”

If your hosts use VLANs and network bonds, make sure that the VLAN and bonding configurations are correct. Check if the network interfaces, VLANs, and bonds are properly configured on the host.

422 often means the subnet is not in the correct location or something similar to do with associations in Foreman, it can also mean the OS version does not have the media, partition table assigned to it.

Activation keys are valid.
Network configuration is functional.
Problem makes complex names of network interfaces which is Foreman unable to deal with.

To get more eyes on this I’d recommend creating a bug request here: Foreman

The Network category for the issue should work.