Suppress error message when /proc/sys/vm/max_map_count is not exists.#35933
Suppress error message when /proc/sys/vm/max_map_count is not exists.#35933dliappis merged 2 commits intoelastic:masterfrom Milly:suppress-error-no-max_map_count
/proc/sys/vm/max_map_count is not exists.#35933Conversation
|
Pinging @elastic/es-core-infra |
|
Thank you for the PR and sorry for the time taken to review. I can see the issue here since vs your suggestion: Normally we'd like to have some tests to ensure this is working as expected, as shown e.g. here: https://github.com/elastic/elasticsearch/pull/31285/files. However, I think that it will be rather hard to mock @danielmitterdorfer are we ok to contain the complexity here by not seeking a way to test this? |
dliappis
left a comment
There was a problem hiding this comment.
LGTM from me, I left a comment on why I think adding a test, albeit useful, would be a complicated thing, hence, this can be merge as is.
|
@elasticmachine test this please |
|
@Milly would it be possible that you merge master into the branch of your fork used for this PR (and push to the same) so that we can resolve some CI failures? |
Yes, I agree with your reasoning. |
|
@elasticmachine test this please |
|
The packaging tests failed while starting a Windows Vagrant box which seems unrelated to me. @elasticmachine run elasticsearch-ci/packaging |
|
Thanks @danielmitterdorfer, all CI is green now, so will merge. |
…5933) Currently init scripts fail when `/proc/sys/vm/max_map_count` is not present with `-bash: [: too many arguments`. Fix conditional logic to avoid trying to set the `max_map_count` sysctl if not present. Relates elastic#27236
…5933) Currently init scripts fail when `/proc/sys/vm/max_map_count` is not present with `-bash: [: too many arguments`. Fix conditional logic to avoid trying to set the `max_map_count` sysctl if not present. Relates elastic#27236
* master: Remove _type term filters from cluster alert watches (elastic#38819) Adjust log and unmute testFailOverOnFollower (elastic#38762) Fix line separators in JSON logging tests (elastic#38771) Fix synchronization in LocalCheckpointTracker#contains (elastic#38755) muted test Remove TLSv1.2 pinning in ssl reload tests (elastic#38651) Don't fail init script if `/proc/.../max_map_count` absent (elastic#35933) Format Watcher.status.lastChecked and lastMetCondition (elastic#38626) SQL: Implement `::` cast operator (elastic#38774) Ignore failing test
If
/proc/sys/vm/max_map_countis not exists,Before patch:
$(cat /proc/sys/vm/max_map_count)is evaluated before test, and show error message likecat: /proc/sys/vm/max_map_count: No such file or directory.After patch: Separate a file exists test and call cat.