zoukankan      html  css  js  c++  java
  • katacontainer debug

      touch /etc/docker/daemon.json
     dockerd --config-file /etc/docker/daemon.json
    cat /etc/docker/daemon.json

    root@ubuntu:~/kata# cat /etc/docker/daemon.json
    { 
             "debug": true
    }
    root@ubuntu:~/kata# 
     sed -i 's/#enable_debug/enable_debug/g' /usr/share/defaults/kata-containers/configuration.toml
    root@ubuntu:~/kata# systemctl restart docker
    Job for docker.service failed because the control process exited with error code.
    See "systemctl status docker.service" and "journalctl -xe" for details.
    root@ubuntu:~/kata#
    调试 kata-runtime
    # docker 开启 debug: /etc/docker/daemon.json 添加参数 (需重启服务)
    { "debug": true }
    # kata配置文件/etc/kata-containers/configuration.toml,开启 enable_debug
    
    # 查看日志
    $ journalctl -ft kata-runtime
    Enable full debug
    Enable full debug as follows:
    
    $ sudo mkdir -p /etc/kata-containers/
    $ sudo install -o root -g root -m 0640 /usr/share/defaults/kata-containers/configuration.toml /etc/kata-containers
    $ sudo sed -i -e 's/^# *(enable_debug).*=.*$/1 = true/g' /etc/kata-containers/configuration.toml
    $ sudo sed -i -e 's/^kernel_params = "(.*)"/kernel_params = "1 agent.log=debug initcall_debug"/g' /etc/kata-containers/configuration.toml
    debug logs and shimv2
    If you are using containerd and the Kata containerd-shimv2 to launch Kata Containers, and wish to enable Kata debug logging, there are two ways this can be enabled via the containerd configuration file, detailed below.
    
    The Kata logs appear in the containerd log files, along with logs from containerd itself.
    
    For more information about containerd debug, please see the containerd documentation.
    
    Enabling full containerd debug
    Enabling full containerd debug also enables the shimv2 debug. Edit the containerd configuration file to include the top level debug option such as:
    
    [debug]
            level = "debug"
    Enabling just containerd shim debug
    If you only wish to enable debug for the containerd shims themselves, just enable the debug option in the plugins.linux section of the containerd configuration file, such as:
    
      [plugins.linux]
        shim_debug = true
    Enabling CRI-O and shimv2 debug
    Depending on the CRI-O version being used one of the following configuration files can be found: /etc/crio/crio.conf or /etc/crio/crio.conf.d/00-default.
    
    If the latter is found, the change must be done there as it'll take precedence, overriding /etc/crio/crio.conf.
    
    # Changes the verbosity of the logs based on the level it is set to. Options
    # are fatal, panic, error, warn, info, debug and trace. This option supports
    # live configuration reload.
    log_level = "info"
    Switching the default log_level from info to debug enables shimv2 debug logs. CRI-O logs can be found by using the crio identifier, and Kata specific logs can be found by using the kata identifier.
  • 相关阅读:
    android学习---Gallery画廊视图
    王立平--查看SQLite中的数据信息
    java中CyclicBarrier简单入门使用
    [ExtJS5学习笔记]第三十三节 sencha extjs 5 grid表格导出excel
    使用target打开的iframe 获取src的问题
    读《暗时间》的思考
    hdfs
    编译最新的SQLite 3.8.4.3为一个DLL
    使用Highcharts生成折线图_at last
    CentOS7 安装EFK(elasticsearch、fluent、kibana)进行Docker下日志搜集
  • 原文地址:https://www.cnblogs.com/dream397/p/13784384.html
Copyright © 2011-2022 走看看