Uninstalling HAF
The HAF service can be uninstalled only after being approved by customers.
The haf_uninstaller script is provided to uninstall HAF. The haf_uninstaller script calls the haf-tool CLI interface.
- Host node
A host node is deployed with the service as a database. Therefore, no independent uninstallation script is provided. To uninstall HAF on a host node, run the following commands:
- Scripts are used to overwrite key files and password files to prevent information leakage.
#Securely delete key files and password files. file_list=("/home/omm/haf-install/haf-host/omnidata/service.prvk" "/home/omm/haf-install/haf-host/omnidata/service.ksfa" "/home/omm/haf-install/haf-host/omnidata/service.ksfb" "/home/omm/haf-install/haf-host/omnidata/service.pw") for file in ${file_list[*]}; do if [ -f "$file" ]; then file_length=$(stat -c %s ${file}) file_k_length=$(expr ${file_length} / 1024 + 1) if [ ${file_k_length} -gt 5000 ];then echo "${file} content size too big to handle" ${file_k_length}=-1 fi dd if=/dev/zero of="${file}" bs=1k count="${file_k_length}" &> /dev/null tr '\0' '\377' < /dev/zero | dd of="${file}" bs=1k count="${file_k_length}" &> /dev/null dd if=/dev/random of="${file}" bs=1k count="${file_k_length}" &> /dev/null fi done - Uninstall HAF.
chmod u+w -R /home/omm/haf-install/haf-host/
rm -rf /home/omm/haf-install/haf-host/
- Scripts are used to overwrite key files and password files to prevent information leakage.
- Offload node
cd /home/omm/haf-install/haf-target/tools/
./haf_uninstaller
haf-tool provides the following uninstall interface:
- Select Command Execution and click Add a Task.
- Edit the task content and click Save.
The following uses uninstalling HAF on the offload node as an example.
Parameter
Description
Task Name
Uninstalling HAF
Run Directory
/home/omm/haf-install/haf-target/tools
Run Command
./haf_uninstaller
