Appendix

Edge Container Log Output Guidelines

Background

Due to the limited storage space on edge devices (such as the Atlas 500 A2 edge station), and because these devices typically use flash storage media like eMMC, which has a limited lifespan, users are advised to follow the log output recommendations for edge containers in this chapter. This will help ensure that edge containers output logs in an appropriate manner, preventing storage space from being filled too quickly—which could impact services—and avoiding premature exhaustion of the storage medium's lifespan.

Output Methods

Edge container applications running on Atlas hardware are generally managed through Kubernetes-compatible edge management platforms, such as Huawei Cloud IEF or third-party edge platforms built on KubeEdge. On such platforms, container log output methods are mainly divided into the following three types:

  • Container console standard output (STDOUT and STDERR)
  • (Recommended) Mounting to a host directory
  • Outputting container logs directly to a log service

Note

If a log server exists in the system, it is recommended to output logs directly to the log service within the container. Otherwise, it is recommended to output logs by mounting them to a host directory, thereby reducing the risk of logs impacting the hardware or other services.

Container Console Standard Output

In this method, the application outputs the container log to standard output. By default, the Docker engine captures the standard output of all containers, writes it to a file in JSON format, and saves the file to the host's /var/lib/docker/containers/{containerid} directory, as shown in Figure 1.

Figure 1 Path example for the {containerid}-json.log file

Note

If the edge management platform does not support log rotation for log files in this directory or the log rotation configuration is incorrect, it may cause /var/lib/docker to become full, thereby affecting the deployment of new containers and the normal operation of other container services. Therefore, this method is not recommended.

(Recommended) Mounting Logs to Host Directory

In this method, the collection of edge platform logs is illustrated in Figure 2.

Figure 2 Solution architecture

Applications mount container logs to the edge host. The edge management platform provides log collection capabilities on the host and performs log rotation for host file logs.

Note

  • Applications can mount container logs to non-critical, high-capacity directories on the host. It is recommended not to mount them to storage media such as eMMC to avoid affecting the overall hardware lifespan.
  • Edge container management platforms generally support this capability to reduce the impact on the system directory /var/lib/docker. For security reasons, this configuration must comply with the security requirements of your organization.

Outputting Container Logs Directly to a Log Service

As shown in Figure 3, if a log server exists in the application environment, container logs can be directly output to the external log server, preventing logs from persisting to disk in the edge environment and minimizing the impact on hardware and other services.

Figure 3 Solution architecture

Content Mounted by Ascend Docker Runtime

Ascend Docker Runtime mounts the following directories and files into containers in read-only mode by default based on the actual environment. The mounted files must not grant write permissions for other users, nor for others in the same group.

Table 1 Default mount directories and files (Atlas 200 AI accelerator module (RC))

Path Description
/dev/davinciX NPU device, where X is the ID number. For example: davinci0.
/dev/davinci_manager Device manager.
/usr/local/Ascend/driver/tools Directory containing the tool package provided by the driver.
/usr/local/Ascend/driver/lib64 Directory containing the user-mode libraries provided by the driver.
/usr/local/sbin/npu-smi The npu-smi tool
/etc/hdcBasic.cfg The hdc base file.
/etc/sys_version.conf The driver version information.
/dev/dvpp_cmdlist Device file, supporting inference services.
/var/queue_schedule FlowGW scheduling framework.
NOTE:

Mounting this directory requires the following conditions to be met simultaneously:

  • MindCluster ≥ 6.0.0.
  • HDK ≥ 24.1.RC2

Table 2 Default mount directory and file (Atlas 200I SoC A1 core board)

Path Description
/dev/davinciX NPU device, where X is the ID number. For example: davinci0.
/dev/davinci_manager Da Vinci-related device manager.
/usr/local/bin/npu-smi The npu-smi tool.
/etc/hdcBasic.cfg The hdc base file.
/etc/sys_version.conf The driver version information.
/dev/dvpp_cmdlist Device file, supporting inference services.
/var/queue_schedule FlowGW scheduling framework.
NOTE:

Mounting this directory requires the following conditions to be met simultaneously:

  • MindCluster ≥ 6.0.0.
  • HDK ≥ 24.1.RC2

Table 3 Default mount directories and files (Atlas 200I A2 acceleration module and Atlas 200I DK A2)

Path

Description

/dev/davinciX

NPU device, where *X* is the ID number. For example: davinci0.

/dev/davinci_manager

Da Vinci-related device manager.

/dev/svm0

Memory management device.

/dev/ts_aisle

aicpudrv driver, providing an event-driven channel interface for task scheduling.

/dev/upgrade

Drivers.

/dev/sys

/dev/vdec

Device files that support inference services.

/dev/vpc

/dev/pngd

/dev/venc

/dev/dvpp_cmdlist

/dev/log_drv

Log driver.

/etc/sys_version.conf

File containing driver version information.

/etc/hdcBasic.cfg

The hdc base file.

/usr/local/sbin/npu-smi

The npu-smi tool.

/usr/local/Ascend/driver/lib64

Directories containing user-mode libraries provided by the driver.

/usr/lib64/aicpu_kernels/

/var/slogd

File; log component.

/var/dmp_daemon

File; dmp daemon.

/usr/lib64/libcrypto.so.1.1

Files; dynamic libraries required by the driver.

Required by openEuler 22.03.

/usr/lib64/libyaml-0.so.2

/usr/lib/aarch64-linux-gnu/libcrypto.so.1.1

Files; dynamic libraries required by the driver.

Required by Ubuntu 22.04.

/usr/lib/aarch64-linux-gnu/libyaml-0.so.2

/usr/lib64/libaicpu_processer.so

Files, dynamic libraries required by the driver.

/usr/lib64/libaicpu_prof.so

/usr/lib64/libaicpu_sharder.so

/usr/lib64/libadump.so

/usr/lib64/libtsd_eventclient.so

/usr/lib64/libaicpu_scheduler.so

/usr/lib64/libdcmi.so

/usr/lib64/libmpi_dvpp_adapter.so

/usr/lib64/libstackcore.so

/var/queue_schedule

FlowGW scheduling framework.

Mounting this directory requires the following conditions to be met simultaneously:

  • MindCluster ≥ 6.0.0.
  • HDK ≥ 24.1.RC2

Table 4 Default mount directories and files (Atlas 500 intelligent station (model 3000))

Path Description
/dev/davinciX NPU device, where X is the ID number. For example: davinci0.
/dev/davinci_manager Device manager.
/dev/hisi_hdc Device manager.
/dev/devmm_svm Device manager.
/home/data/miniD/driver/lib64 Directory; user-mode libraries provided by the driver.
/usr/local/dcmi Directory; DCMI header files and libraries.
/usr/local/lib/libdcmi.so File; DCMI dynamic library.
/usr/local/bin/npu-smi File; npu-smi tool.
/dev/dvpp_cmdlist Device file, supports inference services.
/var/queue_schedule FlowGW scheduling framework.
NOTE:

Mounting this directory requires the following conditions to be met simultaneously:

  • MindCluster ≥ 6.0.0.
  • HDK ≥ 24.1.RC2

Table 5 Default mount directories and files (Atlas 500 A2 intelligent station)

Path

Description

/dev/davinciX

NPU device, where *X* is the ID number. For example: davinci0.

/dev/davinci_manager

Da Vinci-related device manager.

/dev/svm0

Memory management device.

/dev/ts_aisle

aicpudrv driver, providing an event-driven channel interface for task scheduling.

/dev/upgrade

Drivers.

/dev/sys

/dev/vdec

Device files that support inference services.

/dev/vpc

/dev/pngd

/dev/venc

/dev/dvpp_cmdlist

/dev/log_drv

Log driver.

/usr/local/Ascend/driver/lib64

Directories containing user-mode libraries provided by the driver.

/usr/lib64/aicpu_kernels

/usr/local/sbin/npu-smi

File; npu-smi tool.

/etc/sys_version.conf

File; driver version information.

/etc/ld.so.conf.d/mind_so.conf

Driver dynamic library path configuration file

/etc/hdcBasic.cfg

The hdc base file.

/var/dmp_daemon

File; dmp daemon.

/var/slogd

File; log component.

/usr/lib64/libcrypto.so.1.1

Files, dynamic libraries required by the driver.

Required by openEuler 22.03 or EulerOS 2.11 and later.

/usr/lib64/libyaml-0.so.2

/usr/lib/aarch64-linux-gnu/libcrypto.so.1.1

Files, dynamic libraries required by the driver.

Required by Ubuntu 22.04.

/usr/lib/aarch64-linux-gnu/libyaml-0.so.2

/usr/lib64/libsemanage.so.2

Files, dynamic libraries required by the driver.

/usr/lib64/libmmpa.so

/usr/lib64/libdrvdsmi.so

/usr/lib64/libdcmi.so

/usr/lib64/libstackcore.so

/usr/lib64/libmpi_dvpp_adapter.so

/usr/lib64/libaicpu_scheduler.so

/usr/lib64/libaicpu_processer.so

/usr/lib64/libaicpu_prof.so

/usr/lib64/libaicpu_sharder.so

/usr/lib64/libadump.so

/usr/lib64/libtsd_eventclient.so

/var/queue_schedule

FlowGW scheduling framework.

Mounting this directory requires the following conditions to be met simultaneously:

  • MindCluster ≥ 6.0.0.
  • HDK ≥ 24.1.RC2

Table 6 Default mount directories and files (Atlas 350 PCIe card)

Path Description
/dev/davinciX NPU device, where X is the ID number. For example: davinci0.
/dev/davinci_manager Device manager.
/dev/hisi_hdc Device manager.
/dev/uburma Device manager that supports the UB protocol. This device is not mounted when the UB protocol is not supported.
/dev/ummu Device manager that supports the UB protocol. This device is not mounted when the UB protocol is not supported.
/usr/local/Ascend/driver/lib64 Directory containing user-mode libraries provided by the driver.
/usr/local/Ascend/driver/include Directory containing header files provided by the driver.
/usr/local/dcmi Directory containing DCMI header files and libraries.
/usr/local/bin/npu-smi File, the npi-smi tool.
/etc/hccl_rootinfo.json rootinfo file generated by mindcluster-tools. This file is optional.
/usr/local/Ascend/driver/topo Topology directory.

Table 7 Default mount directories and files (other devices)

Path Description
/dev/davinciX NPU device, where X is the ID number. For example: davinci0.
/dev/davinci_manager Device manager.
/dev/hisi_hdc Device manager.
/dev/devmm_svm Device manager.
/usr/local/Ascend/driver/lib64 Directory containing user-mode libraries provided by the driver.
/usr/local/Ascend/driver/include Directory containing header files provided by the driver.
/usr/local/dcmi Directory containing DCMI header files and libraries.
/usr/local/bin/npu-smi File, the npu-smi tool.
/dev/dvpp_cmdlist Device file that supports digital vision pre-processing functions.
/var/queue_schedule FlowGW scheduling framework.
NOTE:

Mounting this directory requires the following conditions to be met simultaneously:

  • MindCluster ≥ 6.0.0.
  • HDK ≥ 24.1.RC2

Default Mount Whitelist of Ascend Docker Runtime

Ascend Docker Runtime supports custom mounting via ASCEND_RUNTIME_MOUNTS. For details, see (Optional) Configuring Custom Mounted Content. The default mount whitelists of Ascend Docker Runtime are restriced, as shown in Table 1.

Table 1 Default mount whitelists

Path Description
/usr/local/Ascend/driver/lib64 Directory, user-mode library provided by the driver.
/usr/local/Ascend/driver/include Directory, header file provided by the driver.
/usr/local/dcmi Directory, DCMI header file and library.
/usr/local/bin/npu-smi File, the npu-smi tool.
/home/data/miniD/driver/lib64 Directory, user-mode library provided by the driver.
/usr/lib64/aicpu_kernels
/usr/local/sbin/npu-smi File, the npu-smi tool.
/usr/local/Ascend/driver/tools Directory, tool package provided by the tool.
/etc/hdcBasic.cfg File, HDC base file.
/etc/sys_version.conf File, driver version information.
/etc/ld.so.conf.d/mind_so.conf Configurtion file of driver dynamic library.
/etc/slog.conf Log configuration file.
/var/dmp_daemon File, dmp daemon.
/var/slogd File, log component.
/usr/lib64/libsemanage.so.2 File, dynamic library required by the driver.
/usr/lib64/libmmpa.so
/usr/lib64/libcrypto.so.1.1
/usr/lib64/libdrvdsmi.so
/usr/lib64/libdcmi.so
/usr/lib64/libstackcore.so
/usr/lib64/libmpi_dvpp_adapter.so
/usr/lib64/libaicpu_scheduler.so
/usr/lib64/libaicpu_processer.so
/usr/lib64/libaicpu_prof.so
/usr/lib64/libaicpu_sharder.so
/usr/lib64/libadump.so
/usr/lib64/libtsd_eventclient.so
/usr/lib64/libyaml-0.so.2
/usr/lib/aarch64-linux-gnu/libyaml-0.so.2
/usr/lib/aarch64-linux-gnu/libcrypto.so.1.1
/var/queue_schedule FlowGW scheduling framework.
/etc/hccl_rootinfo.json rootinfo file generated by mindcluster-tools
/usr/local/Ascend/driver/topo Topology

Ascend Docker Runtime Command Description

After Ascend Docker Runtime is installed, executable tools are generated in the installation directory. The commands involved are internal commands and should not be used directly by users. The relevant commands are shown in Table 1.

Table 1 Command description

Tool Name

Short Command

Long Command

Other Parameter Type

Other Parameter Position

ascend-docker-cli

p

pid

-

-

r

rootfs

-

-

o

options

-

-

f

mount-file

-

-

l

allow-link

-

-

i

mount-dir

-

-

ascend-docker-plugin-install-helper

-

add

-

1

-

rm

-

1

h

-

-

-

-

-

destPath

2

-

-

srcPath

3

-

-

installPath

4 during installation

-

-

reserveDefault

5 during installation, 4 during uninstallation

-

-

installScene

6 during installation, 5 during uninstallation

ascend-docker-runtime

0

create

-

-

b

bundle

-

-

ascend-docker-destroy

-

-

cardId

1

-

-

-

deviceId

2

-

-

-

vDeviceId

3

Note

  • Because Ascend Docker Runtime passes input parameters directly to runc or docker-runc, parameters related to runc/docker-runc are also accepted by Ascend Docker Runtime. Refer to the command-line options of runc/docker-runc in your environment for usage.
  • The ascend-docker-hook tool ignores parameters when running and accepts standard input during runtime.

Differences Between Image and Binary Deployments

Table 1 Differences between the two installation methods

Installation Method Difference
Binary
  • Deployment on a physical machine as a system service.
  • After Capability is configured, it can run as a regular user (hwMindX).
Image Kubernetes serves as the scheduling management platform, requiring privileged containers and the root user.

Differences Between Using ServiceAccount and KubeConfig

Table 1 Differences in Kubernetes authentication and authorization methods

Authentication Credential Component Difference
ServiceAccount
  • Ascend Operator
  • Ascend Device Plugin
  • NodeD
  • Volcano
  • ClusterD
The token file content of the ServiceAccount is mounted to the physical machine in plain text, posing a risk of exposure.
Imported KubeConfig File Resilience Controller After being imported using the encryption tool provided by the cluster scheduling component, it is persisted to disk as ciphertext. The tool does not provide a decryption and export function, offering higher security. If both a ServiceAccount is configured and a KubeConfig file is imported, the latter takes higher priority.

Scheduling Components in High-Availability Clusters

In a production environment, Kubernetes clusters typically deploy multiple management nodes to prevent the entire cluster from becoming unavailable due to a single management node failure. Kubernetes officially provides two high-availability cluster setup solutions. For details, see the high-availability topology options in the Kubernetes documentation. The cluster scheduling components have been verified based on the official Stacked etcd topology solution. Each component can run normally in scenarios with multiple management nodes, and all functions operate correctly.

In a multi-management node scenario, you must ensure that the configurations of all management nodes are consistent, such as the cluster scheduling component images, log directories, running users, and node labels. For the installation of cluster scheduling components in a multi-management node scenario, see Installation and Deployment. For the installation of multiple management nodes, see the Kubernetes official documentation Creating Highly Available Clusters with kubeadm.

Cluster Scheduling Components Using Containerd

For Kubernetes > 1.20, using Docker as the CRI (container runtime interface) will no longer be supported. In a production environment, if a higher version of Kubernetes is required, you need to consider switching to another CRI. The cluster scheduling components have been installed and verified based on Containerd version 1.4.4, a mainstream CRI. Each component can run normally in the Containerd + Kubernetes scenario, and all functions operate correctly.

For the Containerd installation process, see the official documentation. Ascend Docker Runtime is used by default during installation. You can configure Containerd to use Ascend Docker Runtime instead of runc to automatically mount devices when starting containers. For the configuration required for Containerd, see the section on installing Ascend Docker Runtime in the Containerd scenario in Installation and Deployment.

Model Training Job Description

The table below lists constraints on training jobs based on server type when schedulers other than Volcano are used. When Volcano is used, these constraints are already satisfied during job scheduling.

Table 1 Training job instructions

Product Name

Training Scenario

Usage Instructions

Atlas 800 Training Server (Full NPU Configuration)

Single-server Scenario

The number of NPUs that can be requested is 1, 2, 4, or 8.

When the requested number of NPUs is 2 or 4, the allocated NPUs must be on the same server and within the same ring (NPUs 0–3 form one ring, and NPUs 4–7 form another ring) due to affinity constraints.

For example, if 2 NPUs are requested for training, the allocated 2 NPUs must either both be among NPUs 0–3 of the same server or both be among NPUs 4–7. It is not allowed for one to be among NPUs 0–3 and the other among NPUs 4–7.

Distributed Scenario

The number of NPUs that can be requested is 1N, 2N, 4N, or 8N.

N represents the number of nodes, and the NPU scheduling constraints for each node are the same as those in the single-server scenario.

Atlas 800 Training Server (Half NPU Configuration)

Single-server Scenario

The number of NPUs that can be requested is 1, 2, or 4.

Distributed Scenario

The number of NPUs that can be requested is 1N, 2N, or 4N. N represents the number of nodes.

Atlas 200T A2 Box16 Heterogeneous Subrack

Single-server Scenario

The number of NPUs that can be requested is 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, or 16.

  • When the requested number of NPUs is fewer than 8, the allocated NPUs must be on the same server and within the same ring (NPUs 0–7 form one ring, and NPUs 8–16 form another ring) due to affinity constraints.
  • When the requested number of NPUs is 10, 12, or 14, the required NPUs must be evenly distributed across the two rings, and the corresponding physical addresses must also be consistent. For example, if 2 NPUs are requested for training, the allocated 2 NPUs must either both be among NPUs 0–7 of the same server or both be among NPUs 8–16. It is not allowed for one to be among NPUs 0–7 and the other among NPUs 8–16.

Distributed Scenario

The number of NPUs that can be requested is 1N, 2N, 3N, 4N, 5N, 6N, 7N, 8N, 10N, 12N, 14N, or 16N.

  • N represents the number of nodes, and the NPU scheduling constraints for each node are the same as those in the single-server scenario.
  • When the requested number of NPUs is 10N, 12N, or 14N, the required NPUs must be evenly distributed across the two rings, but the corresponding physical addresses do not need to be consistent.

Atlas 800T A2 Training Server or Atlas 900 A2 PoD Cluster Base Unit

Single-server Scenario

The number of NPUs that can be requested is 1, 2, 3, 4, 5, 6, 7, or 8.

Distributed Scenario

The number of NPUs that can be requested is 1N, 2N, 3N, 4N, 5N, 6N, 7N, 8N, or 16N. N represents the number of nodes.

Atlas 900 A3 SuperPoD

Single-server Scenario

The number of NPUs that can be requested is 1, 2, 4, 6, 8, 10, 12, 14, or 16.

Distributed Scenario

The number of NPUs that can be requested is 2, 4, 6, 8, 10, 12, 14, or 16. If it is a logical SuperPoD affinity task, meaning the sp-block field in the task YAML configures the logical SuperPoD size, the number of NPUs that can be requested can only be 16.

NOTE:

For pods that do not use NPUs, there is no requirement on the number of NPUs.

Ascend Device Plugin Communication Files

Socket Files

In Ascend Device Plugin, sock files used for communication are generated. The types of sock files are as follows.

  • npu.sock
  • Ascend910.sock
  • Ascend310.sock
  • Ascend310P.sock
  • davinci-mini.sock
  • Ascend910-X.sock: X can be 2c, 4c, 8c, 16c, 12c.3cpu.32g, 12c.3cpu.32g.dvpp, 12c.3cpu.32g.ndvpp, 6c.1cpu.16g, 3c.0.5cpu.8g, 10c.3cpu.16g, 10c.3cpu.16g.dvpp, 10c.3cpu.16g.ndvpp, 5c.1cpu.8g, 4c.1cpu.5g, 10c.3cpu.32g, 10c.3cpu.32g.dvpp, 10c.3cpu.32g.ndvpp, and 5c.1cpu.16g
  • Ascend310P-X.sock: X can be 1c, 2c, 4c, 2c.1cpu, 4c.3cpu, 4c.3cpu.ndvpp, and 4c.4cpu.dvpp

The preceding sock files are only used for communication with the local Kubernetes.

Chip Fault Code References

For detailed descriptions of chip fault codes for each product, see Table 1.

Table 1 Fault code referencs

Product Reference Document
Atlas Training Series Products
  • Atlas Center Training Server 26.0.RC1 Health Management Fault Definition
  • Atlas Center Training Server 26.0.RC1 Black Box Error Code List
Atlas A2 Training Series Products
  • Atlas A2 Center Inference and Training Hardware 26.0.RC1 Health Management Fault Definition
  • Atlas A2 Center Inference and Training Hardware 26.0.RC1 Black Box Error Code List
Atlas A3 Training Series Products
  • Atlas A3 Center Inference and Training Hardware 26.0.RC1 Health Management Fault Definition
  • Atlas A3 Center Inference and Training Hardware 26.0.RC1 Black Box Error Code List
Inference Server (with Atlas 300I Inference Card) Atlas 300I Inference Card Black Box Error Code List (Models 3000, 3010)
Atlas 200I SoC A1 Core Board
  • Atlas 200I SoC A1 Core Board Health Management Fault Definition
  • Atlas 200I SoC A1 Core Board Black Box Error Code List
Atlas Inference Series Products (Excluding Atlas 200I SoC A1 Core Board)
  • Atlas Center Inference Card 26.0.RC1 Health Management Fault Definition
  • Atlas Center Inference Card 26.0.RC1 Black Box Error Code List

Node Fault Code References

For detailed descriptions of node fault codes for each product, see Table 1.

Table 1 Node fault code reference documentation

Product Reference
Atlas 800T A2 Training Server Atlas 800T A2 Training Server iBMC Alarm Handling
Atlas 900 A2 PoD Cluster Base Unit Atlas 900 RCK A2 Compute Node iBMC Alarm Handling

Note

For iBMC alarms of other products, please query them from the Support website, select the corresponding product, and find the iBMC alarm handling reference for that product.

Terms

This section introduces some terms in the cluster scheduling component user guide to help you better understand the document content and steps. The term descriptions are shown in Table 1.

Table 1 Terms

Term Description
Multi-server multi-device training Distributed training that simultaneously uses multiple chips on multiple training servers.
Single-server single-device training Training that uses one chip on one training server.

Note

For more details on the products supported by cluster scheduling components, see Supported Product Forms and OS List.

Public Network Address

Table 1 Description of non-public network addresses in the cluster scheduling component code

URL Description
huawei.com/Ascend910 Resource name for Atlas training series products, not a URL, cannot be accessed.
huawei.com/Ascend310P Resource name for Atlas inference series products, not a URL, cannot be accessed.
huawei.com/Ascend310 Resource name for Atlas 200/300/500 inference products, not a URL, cannot be accessed.
huawei.com/Ascend* Resource name for Ascend* partitioned chips, not a URL, cannot be accessed.
https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3 Comment reference cannot be accessed.
huawei.com/Ascend310P-V Resource name for Atlas inference series products in mixed insertion mode: Atlas 300V video analysis card, not a URL, cannot be accessed.
huawei.com/Ascend310P-VPro Resource name for Atlas inference series products in mixed insertion mode: Atlas 300V Pro video analysis card, not a URL, cannot be accessed.
huawei.com/Ascend310P-IPro Resource name for Atlas inference series products in mixed insertion mode: Atlas 300I Pro inference card, not a URL, cannot be accessed.
huawei.com/npu Resource name for Atlas 350/850/950 series products, not a URL, cannot be accessed.

Security Statement

The code displayed for resumable training is open-source code, and the scripts involved (Python and shell) need to be set with the same user and user group. For security reasons, it is recommended that you validate input parameters, file directories, file paths, and other information.

Input parameter validation items include but are not limited to:

  • Strict parameter validation and injection prevention measures are implemented for any use of external variables as part of commands.
  • External variables obtained from environment variables must undergo strict validation and injection prevention measures before being used in command concatenation.
  • All processes should follow the principle of least privilege to avoid severe consequences caused by injection.
  • No external variables are directly used as commands in the code.
  • Comply with the security specifications of various programming languages.

File path validation items include but are not limited to:

  • Path length is restricted.
  • There are special character filtering and anti-bypass mechanisms on paths.
  • No command injection exists.
  • Processes adhere to the principle of least privilege.
  • No high-risk paths exist in the trustlist.
  • File path authenticity is verified, and exception handling is implemented.
  • Command injection is an unexpected behavior caused by controllable external variables.
  • The recovery policy only supports Python 3.7 and Python 3.9.
  • During script adaptation, you need to catch exceptions and handle them according to business logic.

User Information List

Update passwords periodically to avoid the risks associated with using the same password for a long time.

System Users

User Description Initial Password Password Change Method
root - user-defined Use the passwd command to change.
HwHiAiUser The running user of the driver run package. user-defined Use the passwd command to change.
hwMindX The default running user of the cluster scheduling components; set to nologin by default. None -
HwBaseUser The running user for driver-related devices on the Atlas 200I SoC A1 core board, created by the driver run package or the user during driver installation; set to nologin by default. None -
HwDmUser The running user for driver-related devices on the Atlas 200I SoC A1 core board, created by the driver run package or the user during driver installation; set to nologin by default. None -

Users of Cluster Scheduling Component Containers

User Description Initial Password Password Change Method
root - None -
HwHiAiUser The running user of the driver run package. On non-Atlas 200I SoC A1 core boards, the default user is nologin, and this user cannot be used for login. None -
hwMindX The default running user inside the cluster scheduling component containers; set to nologin by default. None -
HwBaseUser The running user for driver-related devices on the Atlas 200I SoC A1 core board. Inside the cluster scheduling component containers, this user is created by the user. None -
HwDmUser The running user for driver-related devices on the Atlas 200I SoC A1 core board. Inside the cluster scheduling component containers, this user is created by the user. None -

User in the nginx Container (Not Applicable in Non-security Hardening Scenarios)

User Description Initial Password Password Change Method
nginx The running account for the nginx container None -

Alpha Base Image Users in the Dockerfile Example

User Initial Password Password Change Method
root None -
bin None -
daemon None -
adm None -
lp None -
sync None -
shutdown None -
halt None -
mail None -
news None -
uucp None -
operator None -
man None -
postmaster None -
cron None -
ftp None -
sshd None -
at None -
squid None -
xfs None -
games None -
cyrus None -
vpopmail None -
ntp None -
smmsp None -
guest None -
nobody None -

Ubuntu Base Image Users in the Dockerfile Example

User Initial Password Password Change Method
root None -
daemon None -
bin None -
sys None -
sync None -
games None -
man None -
lp None -
mail None -
news None -
uucp None -
proxy None -
www-data None -
backup None -
list None -
irc None -
gnats None -
nobody None -
_apt None -

ServiceAccount of Kubernetes

Table 1 List of ServiceAccounts created by components in Kubernetes

Account Name Description
volcano-controllers User created in Kubernetes by the controller component of open-source Volcano.
volcano-scheduler User created in Kubernetes by the scheduler component of open-source Volcano.
ascend-device-plugin-sa-910 When starting the service using YAML, this user will be created in Kubernetes. The account name varies depending on the device model.
ascend-device-plugin-sa-310p When starting the service using YAML, this user will be created in Kubernetes. The account name varies depending on the device model.
ascend-device-plugin-sa-310 When starting the service using YAML, this user will be created in Kubernetes. The account name varies depending on the device model.
ascend-operator-manager When starting the service using YAML, this user will be created in Kubernetes, for example: ascend-operator-v{version}.yaml.
resilience-controller It is recommended to enable security hardening and start the service using the YAML file with without-token. The resilience-controller account is created and used in Kubernetes, and appropriate permissions are granted to this account.
noded When starting the service using YAML, this user will be created in Kubernetes, for example: noded-v{version}.yaml.
clusterd When starting the service using YAML, this user will be created in Kubernetes, for example: clusterd-v{version}.yaml.
default User automatically created in Kubernetes when deploying the MindCluster components or open-source Volcano.

mindcluster-deploy Open-Source Repository Version Description

mindcluster-deploy is the open-source repository for the MindCluster cluster scheduling components. The repository provides MindCluster sample code and scripts for reference only and cannot be used in a production environment.

The table below describes the version compatibility.

Table 1 Version compatibility of the mindcluster-deploy repository

MindCluster Version mindcluster-deploy Branch
26.0.0 branch_v26.0.0
7.3.0 branch_v7.3.0
7.2.RC1 branch_v7.2.RC1
7.1.RC1 branch_v7.1.RC1
7.0.RC1 branch_v7.0.0-RC1
6.0.0 branch_v6.0.0
6.0.RC3 branch_v6.0.0-RC3
6.0.RC2 branch_v6.0.0-RC2
6.0.RC1, 5.0.1, 5.0.0, 3.0.0 branch_v6.0.0-RC1

Kubernetes Cluster Basic Performance Tuning

The MindCluster is a functional component based on the Kubernetes ecosystem. Therefore, resumable training is supported only when the Kubernetes platform is deployed. The Kubernetes versions supported for this feature are the same as those for MindCluster cluster scheduling components, currently 1.17.x to 1.34.x (1.19.x or later is recommended).

Note

The following configurations are recommended for a 10,000-card cluster. Adjust the configurations based on the actual cluster scale.

Table 1 Configuration description

Configuration Item

Description

Recommended Configuration

Reference File Path

Startup Parameters of API Server

The --max-request-inflight and --max-mutating-requests-inflight parameters indicate the maximum number of parallel read and write requests allowed within a given time.

If the value is too low, request throttling errors will occur. If it is too high, excessive memory will be consumed.

--max-request-inflight=20000
--max-mutating-requests-inflight=2000

/etc/kubernetes/manifests/kube-apiserver.yaml

The --watch-cache and --watch-cache-sizes parameters indicate the cache size of the API Server.

When the API Server retrieves etcd objects, it accesses the local cache first. If the required information is not in the cache, it accesses etcd and stores the etcd data in the cache. If the cache reaches its limit, it overwrites the cache. Configuring a reasonable cache size can improve etcd retrieval efficiency.

--watch-cache=true
--watch-cache-sizes=node#1000,pod#2000,event#200,namespace#100,service#200

/etc/kubernetes/manifests/kube-apiserver.yaml

Resources of API Server

The CPU resources configured for the API Server will affect its processing capability.

Adjust the CPU resource limit for API Server requests to 35 cores.

resources:
  requests:
    cpu: 35000m
[!NOTE] NOTE

The overall CPU usage of the API Server is not limited by this parameter.

/etc/kubernetes/manifests/kube-apiserver.yaml

etcd Startup Parameters

The --quota-backend-bytes parameter is the storage limit for etcd, which defaults to 2G.

Modify to 8G.

--quota-backend-bytes=8589934592

/etc/kubernetes/manifests/etcd.yaml

--auto-compaction-retention: Performs automatic compaction to reduce resource usage.

Performs defragmentation to reduce resource usage.

--auto-compaction-retention
[!NOTE] NOTE

--auto-compaction-retention does not actually release space. You need to manually use etcdctl compact and etcdctl defrag to clean up space.

etcd Resources

The CPU and memory resources configured for etcd will affect its processing capability.

Adjust the CPU resource limit for etcd requests to 20 cores and the memory resource limit to 10000Mi.

resources:
  requests:
    cpu: 20000m
    memory: 10000Mi

/etc/kubernetes/manifests/etcd.yaml

Volcano Resources

The CPU and memory resources configured for Volcano will affect its processing capability.

Adjust the CPU resource limit for Volcano requests to 20 cores and the memory resource limit to 8Gi.

resources:
  requests:
    cpu: 20000m
    memory: 8Gi
Reference configuration command:
kubectl edit deployment -n volcano-system volcano-scheduler

Custom Metric Development

For details, see Developer Guide - Custom Metric Development.

Preparing the Installation Environment

Notes on Installing Kubernetes

  • When Kubernetes uses Calico as the cluster network plugin, the default network configuration is node-to-node mesh. In large-scale clusters, this configuration may cause excessive network load on service switches. It is recommended to configure it to reflector mode. For details, see the Calico official documentation.
  • When installing Kubernetes on CentOS 7.6 and using Calico v3.24 as the cluster network plugin, the installation may fail. For related constraints, see System Requirements.
  • Starting from Kubernetes 1.24, Dockershim has been removed from the Kubernetes project. If you still want to use Docker as the container engine for Kubernetes, you need to install cri-dockerd. For details, see the Docker Usage Failure When Using Kubernetes 1.24 or Later section.
  • Kubernetes 1.25.10 and later versions do not support the recovery feature of virtualized NPUs.

Installing the Open-Source System

Before installing the cluster scheduling components, ensure that the following basic environment preparations are complete:

  • Install Docker. Versions 18.09.x to 28.5.1 are supported. For details, see Install Docker.

  • Install Containerd. Versions 1.4.x to 2.1.4 are supported. For details, see Install Containerd.

  • Install Kubernetes. Kubernetes versions 1.17.x to 1.34.x are supported (version 1.19.x or later is recommended). For details, see Install Kubernetes. It is recommended to create a cluster using Kubeadm. For some issues during cluster initialization, see Kubernetes Initialization Failure. Also, you need to de-isolate the management node. The command example is as follows.

    • Kubernetes < 1.24

      • De-isolate a single node.

        kubectl taint nodes <hostname> node-role.kubernetes.io/master-
        
      • De-isolate all nodes.

        kubectl taint nodes --all node-role.kubernetes.io/master-
        
    • Kubernetes ≥ 1.24

      • De-isolate a single node.

        kubectl taint nodes <hostname> node-role.kubernetes.io/control-plane:NoSchedule-
        
      • De-isolate all nodes.

        kubectl taint nodes --all node-role.kubernetes.io/control-plane:NoSchedule-
        

    Note

    De-isolating the management node removes the taint from the master node, allowing pods to be scheduled onto the master node.