[ Agent ] [ Base ] - nfs-server nfs

This commit is contained in:
zeaslity
2023-11-21 17:30:25 +08:00
parent 55d0772d50
commit 86be29cb74
6 changed files with 25 additions and 13 deletions

View File

@@ -312,6 +312,13 @@ func (op *AgentOsOperator) deployNFS(funcArgs []string) (bool, []string) {
return false, strings
}
// check running status
if !CheckDeploymentStatusTimeout("nfs-client-provisioner", "kube-system", 60) {
return false, []string{
"[deployNFS] - nfs running error !",
}
}
// 成功启动
return true, []string{
"NFS部署成功!",
@@ -354,14 +361,19 @@ func (op *AgentOsOperator) deployTestNFS(funcArgs []string) (bool, []string) {
}
// 测试文件是否存在
if !BasicFileExists(nfsDataPath + "/test-pod*/NFS-CREATE-SUCCESS") {
result = append(result, "NFS 测试功能 异常!!")
return false, result
if !BasicFileExists(nfsDataPath + "/default-test-claim-pvc*/NFS-CREATE-SUCCESS") {
result = append(result, "NFS 文件写入 异常!!")
}
if !CheckPodStatusTimeout("test-pod ", "default", 30) {
return false, []string{
"[deployTestNFS] - test pod create failed !",
}
}
// 成功启动
return true, []string{
"NFS 测试功能正常!",
"[deployTestNFS] - NFS 测试功能正常!",
}
}