CloudEon uses Kubernetes to install and deploy open-source big data components, enabling the containerized operation of an open-source big data platform. This allows you to reduce your focus on underlying resource management and maintenance.
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;
}
}
……
Describe the bug HDFS初始化journalnode时候日志卡在“Pod hdfs-zkfc-format-xxxxx is Pending……”,查看pod运行状态,实际已经执行完毕,但是并没有创建出journalnode的pod
To Reproduce 安装HDFS,执行到”初始化NameNode“步骤
Expected behavior 应该会继续创建journalnode的pod
Environment
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; } } ……