Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDFS初始化journalnode时候日志卡在“Pod hdfs-zkfc-format-xxxxx is Pending……” #119

Open
dafumiao opened this issue Nov 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dafumiao
Copy link

Describe the bug
HDFS初始化journalnode时候日志卡在“Pod hdfs-zkfc-format-xxxxx is Pending……”,查看pod运行状态,实际已经执行完毕,但是并没有创建出journalnode的pod

To Reproduce
安装HDFS,执行到”初始化NameNode“步骤

Expected behavior
应该会继续创建journalnode的pod

Environment

  • CloudEon Version: [e.g. 1.2.0]
  • Java Version: [e.g. OpenJDK 8]
  • OS: [e.g. CentOS 7.8]
  • Kubernetes: [e.g. 1.23.5]

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
……
if (!pods.isEmpty()) {
Pod pod = pods.get(0);
podName = pod.getMetadata().getName();
// 检查pod是否正在创建
String phase = pod.getStatus().getPhase();
if (phase.equals("Pending")) {
logger.info("Pod {} is pending, waiting for it to be running...", podName);
} else if (phase.equals("Running")) {
logger.info("Pod {} is running.", podName);
break;
}
}
……
查看代码后,此问题发生在K8SUtil.java的第161行,debug到这里时我的phase实际是”Succeeded“状态,所以无法跳出循环,添加分支后,HDFS可以创建成功
……
if (!pods.isEmpty()) {
Pod pod = pods.get(0);
podName = pod.getMetadata().getName();
// 检查pod是否正在创建
String phase = pod.getStatus().getPhase();
if (phase.equals("Pending")) {
logger.info("Pod {} is pending, waiting for it to be running...", podName);
} else if (phase.equals("Running")) {
logger.info("Pod {} is running.", podName);
break;
} else if (phase.equals("Succeeded")) {
logger.info("Pod {} is Completed.", podName);
break;
}
}
……

@dafumiao dafumiao added the bug Something isn't working label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant