Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Conversation

@mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Apr 26, 2022

What does this PR do?

It uses an empty string ("0.0.0.0") instead of the null value for network.host in the elasticsearch confioguration.

Why is it important?

We detected that 8.3-SNAPSHOT is not able to start because of that:

Exception in thread "main" org.elasticsearch.ElasticsearchParseException: null-valued setting found for key [network.host] found at line number [5], column number [14]
	at org.elasticsearch.common.settings.Settings.validateValue(Settings.java:767)
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:743)
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:687)
	at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1189)
	at org.elasticsearch.node.InternalSettingsPreparer.loadOverrides(InternalSettingsPreparer.java:143)
	at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:53)
	at org.elasticsearch.common.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:109)
	at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:53)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:94)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
	at org.elasticsearch.cli.Command.main(Command.java:87)
	at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:57)

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the Unit tests (make unit-test), and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

Author's Checklist

  • [ ]

How to test this PR locally

From the main branch, run this command to start the stack:

TAGS="badabumnightly" TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE DEVELOPER_MODE=true ELASTIC_APM_ACTIVE=false  make -C e2e/_suites/fleet functional-test

Related issues

@mdelapenya mdelapenya added Team:Automation Label for the Observability productivity team backport-v7.17.0 Automated backport with mergify backport-v8.1.0 Automated backport with mergify backport-v8.2.0 Automated backport with mergify labels Apr 26, 2022
@mdelapenya mdelapenya self-assigned this Apr 26, 2022
@mdelapenya mdelapenya requested a review from a team April 26, 2022 10:50
Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

The description/title does not match with the implementation, changes are about 0.0.0.0 instead ""

In case, it will add a regression

@mdelapenya
Copy link
Contributor Author

The description/title does not match with the implementation, changes are about 0.0.0.0 instead ""

In case, it will add a regression

Ah yes, sorry, I did a rebase interactive while sending the PR 🤦 I first used the elastic-agent folks' implementation after searching for the elasticsearch issues

@mdelapenya mdelapenya changed the title fix: use empty string instead of null for ES' network.host fix: use "0.0.0.0" string instead of null for ES' network.host Apr 26, 2022
@mdelapenya mdelapenya requested a review from v1v April 26, 2022 10:59
@mdelapenya
Copy link
Contributor Author

I verified that the docker container for ES is starting:

  • SSH into the machine
  • login as root
  • docker ps && docker logs

Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

Do you think this particular change should be backported only in >=8.2 ?

@mdelapenya
Copy link
Contributor Author

mdelapenya commented Apr 26, 2022

Do you think this particular change should be backported only in >=8.2 ?

Indeed. Because the container is able to start in 8.1, 8.2 and 7.17, we may keep it in main branch.

I took a look at the elastic-package code and checked they use the same for 8_x than for main: https://github.com/elastic/elastic-package/tree/main/internal/profile/_static, that's why I added the other backport labels.

I'm going to remove them all, so that no backport is need. Thanks for the suggestion!

@mdelapenya mdelapenya removed backport-v8.1.0 Automated backport with mergify backport-v8.2.0 Automated backport with mergify backport-v7.17.0 Automated backport with mergify labels Apr 26, 2022
@mergify
Copy link
Contributor

mergify bot commented Apr 26, 2022

This pull request does not have a backport label. Could you fix it @mdelapenya? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Apr 26, 2022
@amannocci amannocci self-requested a review April 26, 2022 11:45
@mdelapenya mdelapenya merged commit 5fbacb1 into elastic:main Apr 26, 2022
@elasticmachine
Copy link
Contributor

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-04-26T10:50:14.473+0000

  • Duration: 81 min 17 sec

Test stats 🧪

Test Results
Failed 5
Passed 310
Skipped 0
Total 315

Test errors 5

Expand to view the tests failures

Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from running pod – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.pod.name:a-pod": context deadline exceeded 
    

  • no stacktrace
Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from a pod with an init container – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.container.name:container-in-pod" 
    

  • no stacktrace
Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from short-living cronjobs – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.container.name:cronjob-container": context deadline exceeded 
    

  • no stacktrace
Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from failing pod – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.pod.name:a-failing-pod": context deadline exceeded 
    

  • no stacktrace
Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Metrics collection configured from targeted Redis Pod – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.pod.name:redis": context deadline exceeded 
    

  • no stacktrace

Steps errors 2

Expand to view the steps failures

Shell Script
  • Took 45 min 17 sec . View more details here
  • Description: ssh -tt -o TCPKeepAlive=yes -o ServerAliveInterval=60 -o ServerAliveCountMax=10 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /var/lib/jenkins/workspace/PR-2429-1-d05631d2-eca4-4904-b830-fd9198e9241d/e2essh [email protected] -- 'sudo bash /home/admin/e2e-testing/.ci/scripts/functional-test.sh "elastic-agent && ~@nightly" '
Archive the artifacts
  • Took 0 min 1 sec . View more details here
  • Description: [2022-04-26T12:11:18.998Z] Archiving artifacts script returned exit code 2

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 5

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from running pod – elastic-agent standalone
  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from a pod with an init container – elastic-agent standalone
  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from short-living cronjobs – elastic-agent standalone
  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from failing pod – elastic-agent standalone
  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Metrics collection configured from targeted Redis Pod – elastic-agent standalone

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 26, 2022
* main:
  fix: use empty string instead of null for ES' network.host (elastic#2429)
  ci: transform branch to allow the Google Labels naming (elastic#2419)
  Add metadata tags (elastic#2407)
  Add link to the users used to SSH into the Cloud EC2s (elastic#2392)
  fix: add EOF (elastic#2387)
@mdelapenya mdelapenya deleted the fix-networkhost-es branch July 13, 2022 09:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport-skip Skip notification from the automated backport with mergify Team:Automation Label for the Observability productivity team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants