Skip to content

Conversation

xuruidong
Copy link
Contributor

@xuruidong xuruidong commented May 29, 2025

Description

I use docker image apache/apisix:3.11.0-redhat , and get an error from the log: "sh: /bin/hostname: No such file or directory"
image

Which issue(s) this PR fixes:

Fixes #12270

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels May 29, 2025
@Baoyuantop
Copy link
Contributor

Hi @xuruidong, can you create an issue first and include minimal steps to reproduce it?

@xuruidong
Copy link
Contributor Author

Hi @xuruidong, can you create an issue first and include minimal steps to reproduce it?

done

bzp2010
bzp2010 previously approved these changes Jun 9, 2025
@bzp2010 bzp2010 self-requested a review June 9, 2025 08:04
@Baoyuantop
Copy link
Contributor

Hi @xuruidong, please fix failed ci

Copy link
Contributor

@Baoyuantop Baoyuantop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging the master branch can make the failed CI pass.

t/core/utils.t Outdated
ngx.say("hostname: ", hostname)
local hostname2 = core.utils.gethostname()
ngx.say("hostname cached: ", hostname == hostname2)
ngx.say("hostname valid: ", hostname ~= "" and (hostname ~= "unknown" or true))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(hostname ~= "unknown" or true) always evaluates to true.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @xuruidong, please have a look.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Baoyuantop ,please review this. Thank you.

@Baoyuantop Baoyuantop added the wait for update wait for the author's response in this issue/PR label Jul 24, 2025
@Baoyuantop Baoyuantop removed the wait for update wait for the author's response in this issue/PR label Jul 29, 2025
Baoyuantop
Baoyuantop previously approved these changes Jul 31, 2025
membphis
membphis previously approved these changes Jul 31, 2025
Copy link
Member

@membphis membphis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xuruidong xuruidong dismissed stale reviews from membphis and Baoyuantop via ac6504b August 1, 2025 03:28
@Baoyuantop Baoyuantop merged commit e90570a into apache:master Aug 1, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in ⚡️ Apache APISIX Roadmap Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

bug: can not get hostname in redhat
4 participants