pod下 serverlog日志:
touch: /data0/logs/server.log: No such file or directory
2022/5/13 19:03:59 tail: can’t open ‘/data0/logs/server.log’: No such file or directory
pod下errorlog日志:
touch: /data0/logs/error.log: No such file or directory
2022/5/13 19:03:59 tail: can’t open ‘/data0/logs/error.log’: No such file or directory
pod下clusterlog日志:
touch: /data0/logs/flash_cluster_manager.log: No such file or directory
2022/5/13 19:04:00 tail: can’t open ‘/data0/logs/flash_cluster_manager.log’: No such file or directory
pod下init的日志:
echo basic-tiflash-2
2022/5/13 19:03:58 + awk -F- {print $NF}
2022/5/13 19:03:58 + ordinal=2
2022/5/13 19:03:58 + sed s/POD_NUM/2/g /etc/tiflash/config_templ.toml
2022/5/13 19:03:58 + sed s/POD_NUM/2/g /etc/tiflash/proxy_templ.toml
存储加载状态:
struct rlimit rlim;
if (getrlimit(RLIMIT_CORE, &rlim))
throw Poco::Exception("Cannot getrlimit");
/// 1 GiB by default. If more - it writes to disk too long.
rlim.rlim_cur = config().getUInt64("core_dump.size_limit", 1024 * 1024 * 1024);
if (setrlimit(RLIMIT_CORE, &rlim))
{
std::string message = "Cannot set max size of core file to " + std::to_string(rlim.rlim_cur);
#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && !defined(SANITIZER)
throw Poco::Exception(message);
#else
/// It doesn't work under address/thread sanitizer. http://lists.llvm.org/pipermail/llvm-bugs/2013-April/027880.html
std::cerr << message << std::endl;
#endif
}
看到这明白了,这是设置 core dump file的时候,设置过大。
首先查找宿主机系统设置:
[root@host ~]# ulimit -c
unlimited
发现是无限制,那应该是pod中是否设置不正确,翻找dockerfile:
FROM hub.pingcap.net/tiflash/centos:7.9.2009-amd64
COPY misc /misc
RUN sh /misc/bake_llvm_base_amd64.sh
ENV PATH="/opt/cmake/bin:/usr/local/bin/:${PATH}:/usr/local/go/bin:/root/.cargo/bin" \
LIBRARY_PATH="/usr/local/lib/x86_64-unknown-linux-gnu/:${LIBRARY_PATH}" \
LD_LIBRARY_PATH="/usr/local/lib/x86_64-unknown-linux-gnu/:${LD_LIBRARY_PATH}" \
CPLUS_INCLUDE_PATH="/usr/local/include/x86_64-unknown-linux-gnu/c++/v1/:${CPLUS_INCLUDE_PATH}" \
CC=clang \
CXX=clang++ \
LD=ld.lld
USER root
WORKDIR /root/
ENV HOME /root/
ENV TZ Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone