Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When registering a host with virtual NICs that do not follow the most common NIC naming patterns, host registration with `subscription-manager` fails to parse NIC facts and results in 422 Unprocesable Entity error by foreman.
Version-Release number of selected component (if applicable):
foreman-2.3.1.24-1.el7sat.noarch
How reproducible:
Every time given the "right" conditions i.e. the "right" NIC names on a host.
Steps to Reproduce:
1. Have a host with a bridge named something other than br0, br1, etc. E.g. my-br.
2. Add a VLAN-tagged vNIC to this host, e.g. my-br.42.
3. Try to register this host to Satellite with `subscription-manager register`.
Actual results:
Registration fails and the client receives an error message:
"HTTP error (422 - Unknown): Validation failed: Attached to can't be blank"
Expected results:
Registration would succeed.
Additional info:
Satellite logs this to production.log while processing the NIC::Managed events:
2021-10-15T10:18:44 [E|kat|a0a5a5bf] <Class> ActiveRecord::RecordInvalid
2021-10-15T10:18:44 [E|kat|a0a5a5bf] attached_to: ["can't be blank"]
2021-10-15T10:18:44 [I|app|a0a5a5bf] Completed 422 Unprocessable Entity in 13967ms (Views: 0.2ms | ActiveRecord: 3529.9ms | Allocations: 2509109)
If I rename the bridge from `my-br` to e.g. `br2` and the respective VLAN-tagged vNIC from `my-br.42` to `br2.42` then the registration succeeds.
I've investigated the issue and the problem is in the regexes used to identify virtual interfaces while foreman tries to locate the physical interface to mark as primary for the newly-registered host. I have a PR ready and will be submitting it soon and linking it here.
Hi,
in that case I suggest close the BZ as not a bug, as for the comment [0] in github:
> I think if this is causing any pains, the proper solution is to make contribution into Facter so it actually reports some usable information from linux netlink kernel API - e.g. interface types and relationship (master-slave).
> Then we could utilize it in Foreman and avoid "guessing".