Fixes #38973 - SSH API of BMC now resolves FQDN to IP#933
Open
sakasusu0919 wants to merge 1 commit intotheforeman:developfrom
Open
Fixes #38973 - SSH API of BMC now resolves FQDN to IP#933sakasusu0919 wants to merge 1 commit intotheforeman:developfrom
sakasusu0919 wants to merge 1 commit intotheforeman:developfrom
Conversation
ekohl
reviewed
Jan 30, 2026
Member
ekohl
left a comment
There was a problem hiding this comment.
From a quick read this looks correct.
4ffff7a to
b58b5b4
Compare
Previously, Smart Proxy's ip() method for SSH API of BMC directly returned the :host parameter to Foreman. Now, if :host is an FQDN, it is resolved to an IP address before being returned. If :host is already an IP, it's returned directly. Co-Authored-By: Yusuke Hirota <hirota.yusuke@fujitsu.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR is a prerequisite for Foreman PR #10842 which fixes #38972. Applying #10842 without this accompanying PR will lead to issue #38973. Therefore, both PRs must be applied simultaneously.
Bug #38973 is caused by the following:
When Foreman specified an FQDN in the :host parameter for the Smart Proxy's BMC API, the smart-proxy's SSH API of BMC returned the FQDN itself directly to Foreman during IP address acquisition.
This resulted in a bug where the FQDN was displayed in the "IP" field within the Foreman UI.
This PR fixes this item.
Modifications in this PR
Fixed an issue where IP addresses could not be obtained when using SSH API of BMC if an FQDN was specified for the :host parameter in the BMC API.
When Foreman uses Fixed an issue where IP addresses could not be obtained when using SSH API of BMC if an FQDN was specified for the :host parameter in the BMC API.
To obtain an IP address, the
ip()method inmodules/bmc/ssh.rb, executed by smart-proxy, was implemented to directly return the:hostspecified in the BMC API's:hostparameter to Foreman.This has been corrected. Now,
:hostis returned directly to Foreman only if it is an IP address. Otherwise,:hostis treated as an FQDN, resolved to an IP address, and then returned to Foreman.Verification Contents:
After configuring the FQDN and SSH in the BMC interface settings via the Foreman Web UI, I verified that the IP address was displayed in the IP field by accessing the BMC tab in the Host Details (Legacy UI).