mirror of
https://github.com/clearlinux/rkt.git
synced 2026-09-05 13:21:30 +00:00
stage1: remove --pid-file patches from systemd-nspawn
Instead of asking systemd-nspawn to write its "pid" file, rkt can write the parent pid "ppid". Then, update getPID() to get the pid file from /proc/$ppid/task/$ppid/children. In this way, we don't need to patch systemd-nspawn. getPID() is able to read both the "pid" file and the "ppid" file, in order to work with alternative stage1s which choose to implement one or the other method. coreos/rkt#910
This commit is contained in:
@@ -52,5 +52,6 @@ for link in ${BUSYBOX_LINKS}; do
|
||||
done
|
||||
|
||||
echo "Busybox installed. Use the following command to enter pod's stage1:"
|
||||
SYSTEMD_PID=$(sudo cat "${RKT_RUN_DIR}/${UUID}/pid")
|
||||
SYSTEMD_PPID=$(sudo cat "${RKT_RUN_DIR}/${UUID}/ppid")
|
||||
SYSTEMD_PID=$(sudo cat /proc/$SYSTEMD_PPID/task/$SYSTEMD_PPID/children)
|
||||
echo sudo nsenter -m -u -i -p -t ${SYSTEMD_PID}
|
||||
|
||||
Reference in New Issue
Block a user