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

Modify resources restore-time using CRIT daemon #59

Open
xemul opened this issue Sep 24, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@xemul
Copy link
Member

commented Sep 24, 2015

Sometimes it might make sense to tune the objects from images on restore. E.g. change the IP address of sockets from task above or fix file paths to be "chroot-ed". The best solution seems to be in launching CRIT in daemon mode, telling it what images and how to modify and teaching CRIU to "filter" the pb objects read from images through this daemon.

Pulled from criu.org/Todo

@k-artem

This comment has been minimized.

Copy link
Contributor

commented Oct 8, 2015

Also will be good if we'll have a possibility(using this idea) to change PID's for a avoiding this problem http://criu.org/When_C/R_fails.

@avagin

This comment has been minimized.

Copy link
Member

commented Oct 8, 2015

It's already possible. It's maybe inconvenient, but it works.

./crit decode -i pstree.img | sed "s/\"pid\": 32486/\"pid\": 9999/" | ./crit encode > pstree.img.new
mv pstree.img.new pstree.img
@xemul

This comment has been minimized.

Copy link
Member Author

commented Oct 8, 2015

Changing pids is not possible, sorry guys. Glibc caches the result of getpid() call and uses it widely. If the actual pid changes, then thing can get broken inside glibc with weird diagnostics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.