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

Code-5.4报错:Stale file handle #83

Open
JasonkayZK opened this issue Sep 20, 2021 · 3 comments
Open

Code-5.4报错:Stale file handle #83

JasonkayZK opened this issue Sep 20, 2021 · 3 comments

Comments

@JasonkayZK
Copy link

其他的Namespace都挂载上了,只有mnt报错:

root@jasonkay:~/workspace/my_docker/chapter5_detach/5_4_exec# ./my_docker exec test sh
missing my_docker_pid env, skip ns-enter
{"level":"info","msg":"exec container real pid: 2725","time":"2021-09-20T14:26:42Z"}
{"level":"info","msg":"exec command: sh","time":"2021-09-20T14:26:42Z"}
got my_docker_pid=2725
got my_docker_cmd=sh
setns on ipc namespace succeeded
setns on uts namespace succeeded
setns on net namespace succeeded
setns on pid namespace succeeded
setns on mnt namespace failed: Stale file handle
# 
@JasonkayZK
Copy link
Author

并且即使PID Namespace设置成功,top的PID还不是1;

@MajLuu
Copy link

MajLuu commented Jan 21, 2022

在当前5.4章节,需要暂时把AUFS挂载函数部分移除,cmd.Dir设置为 busybox 目录才能达到书中的效果

@JasonkayZK
Copy link
Author

好的好的,我再试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants