-
Notifications
You must be signed in to change notification settings - Fork 617
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
cannot open /proc/sys/kernel/ns_last_pid #1199
Comments
I just tested this for a different program running on the host, that program changes the value of ns_last_pid on the host kernel. |
@adrianreber ? help pls. |
can you please tell how criu is doing it? |
This is unrelated to CRIU if the file is read-only. Your container is probably mounting it as read-only. See |
Wait don't close it, I did gone through read only path section in config. json and removed /proc/sys line from there but still it was giving the error of read only file system. |
And if my file was read only then how come criu is able to edit it to restore same pids? |
(Sorry, I forgot to press "send".) The reason this isn't working is that If you're using Docker you can disable these things by doing
|
I'm using |
Add |
still the same error, is it because when the process joins the container namespace, it joins every other namespace except user one, for that it shows |
@cyphar ?? |
I tested with docker too with same above commands :
gives below error:
|
@ashwani29 docker run --cap-add=SYS_ADMIN --rm -it ubuntu bash -c 'echo 999 > /proc/sys/kernel/ns_last_pid' |
@avagin still same error |
@ashwani29 you may need to add docker run --privileged --cap-add=SYS_ADMIN --rm -it ubuntu bash -c 'echo 999 > /proc/sys/kernel/ns_last_pid' |
@rst0git It worked, thanks. |
@ashwani29 Does your container have the necessary capabilities to write to Please show the capabilities you defined in What do you mean with this:
|
Yes @adrianreber
I removed options like I mean to say I don't know docker that much and never
|
this is what I'm trying to do.
|
Works for me:
Not sure why it does not work for you. |
This is what I'm getting now:
can you share the filesystem you are using for the container? I want to know more about these environments |
Why is it mentioning user namespace there? There is no user namespace mentioned in |
Oh sorry, in between I made some changes again to the config.json. let me revert back and try again. |
and that is what a busy box or a ubuntu image?
|
Then you probably have another shell in your container. You need to know what is in your container. It is not like there are thousand types of different shells. The content of the container is not really relevant for this exercise, but my container is running RHEL 7. |
I've found that there is |
It does not hang. Just type something. |
@adrianreber a process joining |
I'm experimenting with a restored container which includes reading and changing the
ns_last_pid
value. the container is paused and I'm changing/writing a new value tons_last_pid
, but it gives me an error ofRead-only file system
. How criu is able to achieve this to do PID dance?I did exactly as explained in this tutorial: https://criu.org/Pid_restore , i.e same way of opening and writing the file.
The text was updated successfully, but these errors were encountered: