kubernetes 孙子奥芬进程通过kubectl exec启动,但未被pid 1接受,

kxkpmulp  于 3个月前  发布在  Kubernetes
关注(0)|答案(3)|浏览(36)

发生了什么?

kubectl exec -- sh

sh-4.2# nohup  sh -c 'sleep 10000' &
sh-4.2# exit

kubectl exec -- sh
sh-4.2# ps -efH
UID         PID   PPID  C STIME TTY          TIME CMD
root        623      0  0 09:51 pts/0    00:00:00 sh -l
root        641    623  0 09:51 pts/0    00:00:00   ps -efH
root        621      0  0 09:50 ?        00:00:00 sleep 1000
root          1      0  0 09:07 ?        00:00:00 /usr/local/bin/dumb-init

睡眠进程的ppid总是0

你期望会发生什么?

ppid应该是1(类似于dumb-init)

我们如何尽可能精确地重现它?

只需运行上面的命令

我们需要了解其他信息吗?

  • 无响应*

Kubernetes版本

$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.2", GitCommit:"7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647", GitTreeState:"clean", BuildDate:"2023-05-17T14:20:07Z", GoVersion:"go1.20.4", Compiler:"gc", Platform:"darwin/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.0", GitCommit:"ab69524f795c42094a6630298ff53f3c3ebab7f4", GitTreeState:"clean", BuildDate:"2021-12-07T18:09:57Z", GoVersion:"go1.17.3", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.27) and server (1.23) exceeds the supported minor version skew of +/-1

云提供商

OS版本

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

安装工具

容器运行时(CRI)和版本(如果适用)

相关插件(CNI,CSI,...)和版本(如果适用)

c9x0cxw0

c9x0cxw01#

这个问题目前正在等待分类。
如果SIG或子项目确定这是一个相关的问题,他们将通过应用triage/accepted标签并提供进一步的指导来接受它。
组织成员可以通过在评论中写入/triage accepted来添加triage/accepted标签。
有关使用PR评论与我互动的说明,请查看here。如果您对我的行为有任何问题或建议,请针对kubernetes/test-infra仓库提出一个问题。

rqqzpn5f

rqqzpn5f3#

Kubernetes项目目前缺乏足够的贡献者来充分应对所有问题。
此机器人根据以下规则对未分类的问题进行分级处理:

  • lifecycle/stale应用后的90天内无活动,将应用lifecycle/stale
  • lifecycle/stale应用后的30天内无活动,将应用lifecycle/rotten
  • lifecycle/rotten应用后的30天内无活动,将关闭该问题

您可以:

  • 使用/remove-lifecycle stale标记此问题为新鲜
  • 使用/close关闭此问题
  • 提供帮助,使用Issue Triage

请将反馈发送至sig-contributor-experience@kubernetes/community
/lifecycle stale

相关问题