Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the invalid ip #89

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: the invalid ip #89

wants to merge 1 commit into from

Conversation

luohoufu
Copy link
Contributor

What does this PR do

This pull request includes several changes to the modules/agent/api/elasticsearch.go file, primarily focusing on the import statements and the bindInstanceToCluster function.

Import statement changes:

  • Reorganized the import statements by moving net/http, runtime, sync/atomic, and time to the top section.
  • Removed the same imports from the lower section to avoid redundancy.

Function modification:

  • Updated the bindInstanceToCluster function to handle IP addresses containing an asterisk ('*') by replacing them with 127.0.0.1.

Rationale for this change

Standards checklist

  • The PR title is descriptive
  • The commit messages are semantic
  • Necessary tests are added
  • Updated the release notes
  • Necessary documents have been added if this is a new feature
  • Performance tests checked, no obvious performance degradation

@@ -603,6 +604,11 @@ func (h *APIHandler) bindInstanceToCluster(clusterInfo ClusterInfo, nodes *elast
if util.ContainStr(ip, "::") {
ip = fmt.Sprintf("[%s]", ip)
}

if util.ContainStr(ip, "*") {
Copy link
Member

Choose a reason for hiding this comment

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

what's the case for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i my case which agent erolled failed by the ip *

@luohoufu luohoufu requested a review from medcl January 22, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants