Uninstallation Process
- Refer to Uninstalling Ascend Docker Runtime to uninstall Ascend Docker Runtime.
- Refer to Uninstalling Container Manager to uninstall Container Manager.
- Refer to Uninstalling Other Components to uninstall NPU Exporter, Ascend Device Plugin, Volcano, ClusterD, Ascend Operator, NodeD, and Resilience Controller.
Uninstalling Ascend Docker Runtime
- Scenario 1: different installation paths.
When uninstalling Ascend Docker Runtime, you need to uninstall it twice based on Step 2 for different container engines. Each time you uninstall Ascend Docker Runtime, you need to specify the corresponding installation path, that is, the --install-path parameter.
- Scenario 2: identical installation path.
When uninstalling Ascend Docker Runtime, you need to uninstall it once based on Step 2. After the uninstallation is complete, you need to manually restore the daemon.json file of the other engine to the content before Ascend Docker Runtime is installed.
If you want to retain one of the container engines, you need to uninstall Ascend Docker Runtime and reinstall it based on scenario requirements.
- (Optional) Disable pingmesh UnifiedBus network detection.
- Log in to the environment and go to the directory generated after NodeD decompression.
- Run the following commands to edit the pingmesh-config file:
kubectl edit cm -n cluster-system pingmesh-config
- Change the value of activate.
- If the SuperPoD ID exists in the pingmesh-config file, change the value of activate under the SuperPoD ID to off.
- If the SuperPoD ID does not exist in the pingmesh-config file, change the value of activate in either of the following ways:
- Add the SuperPoD information to the configuration file and set activate to off.
- Delete all SuperPoD information from the pingmesh-config file and set activate under global to off.
- Use either of the following methods to uninstall Ascend Docker Runtime.
- Method 1: (Recommended) using a software package
- Go to the path where the installation package (RUN package) is stored.
cd <path to run package>
- Run the following command to uninstall Ascend Docker Runtime in the default installation path.
- Docker (or Docker integrated with Kubernetes)
./Ascend-docker-runtime_{version}_linux-{arch}.run --uninstall - containerd (or Kubernetes integrated with containerd)
./Ascend-docker-runtime_{version}_linux-{arch}.run --uninstall --install-scene=containerd
- If the Docker configuration filepath is not the default /etc/docker/daemon.json, add the --config-file-path parameter to specify the configuration filepath.
- If the containerd configuration filepath is not the default /etc/containerd/config.toml, add the --config-file-path parameter to specify the configuration filepath.
- To uninstall Ascend Docker Runtime in a specified installation path, add the --install-path=<path> parameter to the uninstallation command.
If the following information is displayed, the uninstallation is successful:1 2 3
Uncompressing ascend-docker-runtime 100% ... [INFO] ascend-docker-runtime uninstall success
- Docker (or Docker integrated with Kubernetes)
- Go to the path where the installation package (RUN package) is stored.
- Method 2: using a script
- Go to the script directory in the Ascend Docker Runtime installation path. The default installation path is /usr/local/Ascend/Ascend-Docker-Runtime.
cd /usr/local/Ascend/Ascend-Docker-Runtime/script
- Run the uninstallation script to uninstall the component.
- Docker (or Docker integrated with Kubernetes)
uninstall.sh docker docker <daemon.json file path>
- containerd (or Kubernetes integrated with containerd)
uninstall.sh containerd containerd <config.toml file path>
- You do not need to specify the path of the daemon.json configuration file of Docker. If the path is not specified, /etc/docker/daemon.json is used by default.
- You do not need to specify the path of the daemon.json configuration file of containerd. If the path is not specified, /etc/containerd/config.toml is used by default.
- Docker (or Docker integrated with Kubernetes)
If the following information is displayed, the uninstallation is successful:
1 2 3
[INFO]: You will recover Docker's daemon ... [INFO] uninstall.sh exec success
- Go to the script directory in the Ascend Docker Runtime installation path. The default installation path is /usr/local/Ascend/Ascend-Docker-Runtime.
- Method 1: (Recommended) using a software package
- (Optional) If you need to restore the modified kubeadm-flags.env file only in Containerd with Kubernetes integrated, refer to Step 6. In other scenarios, skip this step.
- Restart the service.
- Docker (or Docker integrated with Kubernetes)
systemctl daemon-reload && systemctl restart docker
- containerd (or Kubernetes integrated with containerd)
systemctl daemon-reload && systemctl restart containerd
- Docker (or Docker integrated with Kubernetes)
Uninstalling Container Manager
- Log in to the node where Container Manager is deployed as the root user.
- Run the following commands in sequence to uninstall the Container Manager service.
# Stop the Container Manager service. systemctl stop container-manager.timer systemctl disable container-manager.timer systemctl stop container-manager.service systemctl disable container-manager.service # Delete the Container Manager service. rm -f /etc/systemd/system/container-manager.service rm -f /etc/systemd/system/container-manager.timer systemctl daemon-reload systemctl reset-failed # Delete the corresponding Container Manager binary file. chattr -i /usr/local/bin/container-manager rm -f /usr/local/bin/container-manager
- Delete the log file. Confirm the actual path before deleting the log file.
rm -rf /var/log/mindx-dl/container-manager
Uninstalling Other Components
You can uninstall other cluster scheduling components and install them of the latest version. Specifically, uninstall the components one by one, delete the corresponding namespaces, log directories, and configuration files, and select an uninstallation mode based on the installation mode.
- (Optional) Disable pingmesh UnifiedBus network detection.
- Log in to the environment and go to the directory generated after NodeD decompression.
- Run the following commands to edit the pingmesh-config file:
kubectl edit cm -n cluster-system pingmesh-config
- Change the value of activate.
- If the SuperPoD ID exists in the pingmesh-config file, change the value of activate under the SuperPoD ID to off.
- If the SuperPoD ID does not exist in the pingmesh-config file, change the value of activate in either of the following ways:
- Add the SuperPoD information to the configuration file and set activate to off.
- Delete all SuperPoD information from the pingmesh-config file and set activate under global to off.
- Uninstall components. Select an uninstallation mode based on the component installation mode.
- Uninstall components in container mode. The uninstallation methods of all components are similar. That is, go to the directory where the YAML configuration file of a component is located and delete the component. This operation needs to be performed on the Kubernetes management node. The following uses Ascend Device Plugin as an example to describe how to uninstall a component. Uninstall other components by yourself.
- Log in to the management node as the root user.
- Go to the directory where the YAML configuration file of Ascend Device Plugin is stored, for example, /home/ascend-device-plugin.
cd /home/ascend-device-plugin
- In the Ascend Device Plugin installation environment, run the following command to uninstall it.
kubectl delete -f device-plugin-volcano-v{version}.yamlCommand output:1 2 3 4
serviceaccount "ascend-device-plugin-sa-910" deleted clusterrole.rbac.authorization.k8s.io "pods-node-ascend-device-plugin-role-910" deleted clusterrolebinding.rbac.authorization.k8s.io "pods-node-ascend-device-plugin-rolebinding-910" deleted deployment.apps "ascend-device-plugin-daemonset-910" deleted
When Ascend Device Plugin is used together with Volcano, a ConfigMap is created. Run the following command to delete it:
kubectl delete cm mindx-dl-deviceinfo-<node-name> -n kube-system
- Uninstall components in binary mode. The following uses NPU Exporter as an example to describe how to uninstall a component. Uninstall other components by yourself.
- Log in to the node where the component is deployed as the root user.
- In the NPU Exporter installation environment, run the following commands in sequence to uninstall it.
systemctl stop npu-exporter.service systemctl disable npu-exporter.service chattr -i /etc/systemd/system/npu-exporter.service rm -f /etc/systemd/system/npu-exporter.service systemctl daemon-reload systemctl reset-failed chattr -i /usr/local/bin/npu-exporter rm -f /usr/local/bin/npu-exporter
- Uninstall components in container mode. The uninstallation methods of all components are similar. That is, go to the directory where the YAML configuration file of a component is located and delete the component. This operation needs to be performed on the Kubernetes management node. The following uses Ascend Device Plugin as an example to describe how to uninstall a component. Uninstall other components by yourself.
- Delete the namespace. The npu-exporter namespace of NPU Exporter and the volcano-system namespace of Volcano have been deleted when the components are uninstalled.
Run the following command to uninstall the namespace created during the installation of other cluster scheduling components. Deleting the namespace will delete all resources in the namespace. Exercise caution when performing this operation.
kubectl delete ns mindx-dl
Command output:1namespace "mindx-dl" deleted
- Delete log files. Delete the log directories of cluster scheduling components on the corresponding nodes by referring to section Creating a Log Directory. The following uses ClusterD as an example. Confirm the information before deleting it.
rm -rf /var/log/mindx-dl/clusterd
- (Optional) If the certificate and KubeConfig file are imported, delete them after confirmation when uninstalling Resilience Controller.
rm -rf /etc/mindx-dl/resilience-controller