Long-Term Supported Versions

    Innovation Versions

      Dynamically Loading the Kernel Module

      Function Description

      Services in a container may depend on some kernel modules. You can set environment variables to dynamically load the kernel modules required by services in the container to the host before the system container starts. This feature must be used together with isulad-hooks. For details, see Dynamically Managing Container Resources (syscontainer-tools).

      Parameter Description

      Command

      Parameter

      Value Description

      isula create/run

      -e KERNEL_MODULES=module_name1,module_name

      • Variable of the string type.
      • This parameter can be set to multiple modules. Use commas (,) to separate module names.

      Constraints

      • If loaded kernel modules are not verified or conflict with existing modules on the host, an unpredictable error may occur on the host. Therefore, exercise caution when loading kernel modules.
      • Dynamic kernel module loading transfers kernel modules to be loaded to containers. This function is implemented by capturing environment variables for container startup using isulad-tools. Therefore, this function relies on the proper installation and deployment of isulad-tools.
      • Loaded kernel modules need to be manually deleted.

      Example

      When starting a system container, specify the -e KERNEL_MODULES parameter. After the system container is started, the ip_vs module is successfully loaded to the kernel.

      [root@localhost ~]# lsmod | grep ip_vs
      [root@localhost ~]# isula run -tid -e KERNEL_MODULES=ip_vs,ip_vs_wrr --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/myrootfs none init
      ae18c4281d5755a1e153a7bff6b3b4881f36c8e528b9baba8a3278416a5d0980
      [root@localhost ~]# lsmod | grep ip_vs
      ip_vs_wrr              16384  0
      ip_vs                 176128  2 ip_vs_wrr
      nf_conntrack          172032  7 xt_conntrack,nf_nat,nf_nat_ipv6,ipt_MASQUERADE,nf_nat_ipv4,nf_conntrack_netlink,ip_vs
      nf_defrag_ipv6         20480  2 nf_conntrack,ip_vs
      libcrc32c              16384  3 nf_conntrack,nf_nat,ip_vs
      

      NOTE:

      • isulad-tools must be installed on the host.
      • --hooks-spec must be set to isulad hooks.

      Bug Catching

      Buggy Content

      Bug Description

      Submit As Issue

      It's a little complicated....

      I'd like to ask someone.

      PR

      Just a small problem.

      I can fix it online!

      Bug Type
      Specifications and Common Mistakes

      ● Misspellings or punctuation mistakes;

      ● Incorrect links, empty cells, or wrong formats;

      ● Chinese characters in English context;

      ● Minor inconsistencies between the UI and descriptions;

      ● Low writing fluency that does not affect understanding;

      ● Incorrect version numbers, including software package names and version numbers on the UI.

      Usability

      ● Incorrect or missing key steps;

      ● Missing prerequisites or precautions;

      ● Ambiguous figures, tables, or texts;

      ● Unclear logic, such as missing classifications, items, and steps.

      Correctness

      ● Technical principles, function descriptions, or specifications inconsistent with those of the software;

      ● Incorrect schematic or architecture diagrams;

      ● Incorrect commands or command parameters;

      ● Incorrect code;

      ● Commands inconsistent with the functions;

      ● Wrong screenshots.

      Risk Warnings

      ● Lack of risk warnings for operations that may damage the system or important data.

      Content Compliance

      ● Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions;

      ● Copyright infringement.

      How satisfied are you with this document

      Not satisfied at all
      Very satisfied
      Submit
      Click to create an issue. An issue template will be automatically generated based on your feedback.
      Bug Catching
      编组 3备份