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

block tmp dir for inotify #1967

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option(BUILD_LOGTAIL_SHARED_LIBRARY "Build Logtail shared library")
option(ENABLE_ENTERPRISE "enable enterprise feature")
cmake_dependent_option(ENABLE_COMPATIBLE_MODE "Build Logtail in compatible mode (for low version Linux)" OFF "LINUX" OFF)
cmake_dependent_option(ENABLE_STATIC_LINK_CRT "Build Logtail by linking CRT statically" OFF "LINUX" OFF)
cmake_dependent_option(ENABLE_CORP_FEATURE "Enable corp feature" OFF "ENABLE_ENTERPRISE" OFF)
option(WITHOUTGDB "Build Logtail without gdb")
option(WITHSPL "Build Logtail and UT with SPL" ON)
option(BUILD_LOGTAIL_UT "Build unit test for Logtail")
Expand All @@ -46,6 +47,10 @@ if (ENABLE_ENTERPRISE)
message(STATUS "Enable Enterprise Feature.")
add_definitions(-D__ENTERPRISE__)
include(${CMAKE_CURRENT_SOURCE_DIR}/enterprise_options.cmake)
if (ENABLE_CORP_FEATURE)
message(STATUS "Enable Corp Feature.")
add_definitions(-D__CORP__)
endif ()
else ()
include(${CMAKE_CURRENT_SOURCE_DIR}/options.cmake)
endif ()
Expand Down
6 changes: 5 additions & 1 deletion core/app_config/AppConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,11 @@ AppConfig::AppConfig() {
mNoInotify = false;
mSendDataPort = 80;
mShennongSocket = true;
// mInotifyBlackList.insert("/tmp");
#ifdef __CORP__
mInotifyBlackList.insert("/tmp"); // The constant creation and deletion of files in the /tmp directory by Pangu 2.0
// may lead to increased resource consumption and system fluctuations for iLogtail
// which rely on inotify_add_watch and inotify_rm_watch for filesystem monitoring.
#endif

mPurageContainerMode = false;
mForceQuitReadTimeout = 7200;
Expand Down
Loading