This repository has been archived by the owner on Feb 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 886
rkt: initial run working #1
Milestone
Comments
w00t, this is done. |
@philips I ran into
Here's some system info:
|
ah, Ubuntu 14.04 doesn't come with systemd... nvm |
perfect. thanks! |
@thebyrd Just install libseccomp as a workaround until we get the static or chrooted nspawn working. I tested it on ubuntu and it works fine after that. |
@thebyrd To be very specific simply: |
Thx |
alban
added a commit
to alban/rkt
that referenced
this issue
May 21, 2015
Move the pid logic back to stage1/rootfs/enter/enter.c (revert part of rkt#826), so the pid logic is an implementation detail of stage1, as it does not appear in Documentation/devel/stage1-implementors-guide.md See rkt#910 and rkt#826 Tests: there are no functional tests to check that the race in rkt#826 is correctly fixed. However, I tested manually in the following way: * Test rkt#1: 1. Start a pod: sudo bin/rkt --debug --insecure-skip-verify run --interactive docker://busybox 2. Pretend that rkt is slow and the ppid file is not yet written: cd /var/lib/rkt/pods/run/$uuid && mv ppid ppid-disabled 3. Enter the pod: sudo bin/rkt enter abbc9f3d /bin/sh 4. Notice that the enter command is waiting (without taking much cpu) 5. Pretend that rkt finished its job: cd /var/lib/rkt/pods/run/$uuid && mv ppid-disabled ppid 6. Notice that the enter command succeeds * Test rkt#2: 1. Repeat steps 1-4 from test rkt#1 2. Stop the pod: ^]^]^] 3. Notice that the enter command stops too * Test rkt#3: 1. patch stage1/init/init.go: + ioutil.WriteFile("/tmp/rkt-waiting", []byte(""), 0644) + for { + if _, err := os.Stat("/tmp/rkt-waiting"); os.IsNotExist(err) { + break + } + time.Sleep(100 * time.Millisecond) + } 2. Start a pod 3. Enter the pod 4. Notice that the enter command is waiting (without taking much cpu) 5. Let nspawn start: rm /tmp/rkt-waiting 6. Notice that the enter command succeeds
alban
added a commit
to alban/rkt
that referenced
this issue
May 21, 2015
Move the pid logic back to stage1/rootfs/enter/enter.c (revert part of rkt#826), so the pid logic is an implementation detail of stage1, as it does not appear in Documentation/devel/stage1-implementors-guide.md Some stage1 might not have pid: stage1 based on virtual machines. See rkt#910 and rkt#826 Tests: there are no functional tests to check that the race in rkt#826 is correctly fixed. However, I tested manually in the following way: * Test rkt#1: 1. Start a pod: sudo bin/rkt --debug --insecure-skip-verify run --interactive docker://busybox 2. Pretend that rkt is slow and the ppid file is not yet written: cd /var/lib/rkt/pods/run/$uuid && mv ppid ppid-disabled 3. Enter the pod: sudo bin/rkt enter abbc9f3d /bin/sh 4. Notice that the enter command is waiting (without taking much cpu) 5. Pretend that rkt finished its job: cd /var/lib/rkt/pods/run/$uuid && mv ppid-disabled ppid 6. Notice that the enter command succeeds * Test rkt#2: 1. Repeat steps 1-4 from test rkt#1 2. Stop the pod: ^]^]^] 3. Notice that the enter command stops too FIXME: does not work yet * Test rkt#3: 1. patch stage1/init/init.go: + ioutil.WriteFile("/tmp/rkt-waiting", []byte(""), 0644) + for { + if _, err := os.Stat("/tmp/rkt-waiting"); os.IsNotExist(err) { + break + } + time.Sleep(100 * time.Millisecond) + } 2. Start a pod 3. Enter the pod 4. Notice that the enter command is waiting (without taking much cpu) 5. Let nspawn start: rm /tmp/rkt-waiting 6. Notice that the enter command succeeds
alban
referenced
this issue
in endocode/rkt
May 21, 2015
Move the pid logic back to stage1/rootfs/enter/enter.c (revert part of rkt#826), so the pid logic is an implementation detail of stage1, as it does not appear in Documentation/devel/stage1-implementors-guide.md Some stage1 might not have pid: stage1 based on virtual machines. See rkt#910 and rkt#826. Tests: there are no functional tests to check that the race in rkt#826 is correctly fixed. However, I tested manually in the following way: * Test #1: 1. Start a pod: sudo bin/rkt --debug --insecure-skip-verify run --interactive docker://busybox 2. Pretend that rkt is slow and the ppid file is not yet written: cd /var/lib/rkt/pods/run/$uuid && mv ppid ppid-disabled 3. Enter the pod: sudo bin/rkt enter abbc9f3d /bin/sh 4. Notice that the enter command is waiting (without taking much cpu) 5. Pretend that rkt finished its job: cd /var/lib/rkt/pods/run/$uuid && mv ppid-disabled ppid 6. Notice that the enter command succeeds * Test rkt#2: 1. Repeat steps 1-4 from test #1 2. Stop the pod: ^]^]^] 3. Notice that the enter command stops too FIXME: does not work yet * Test rkt#3: 1. patch stage1/init/init.go: + ioutil.WriteFile("/tmp/rkt-waiting", []byte(""), 0644) + for { + if _, err := os.Stat("/tmp/rkt-waiting"); os.IsNotExist(err) { + break + } + time.Sleep(100 * time.Millisecond) + } 2. Start a pod 3. Enter the pod 4. Notice that the enter command is waiting (without taking much cpu) 5. Let nspawn start: rm /tmp/rkt-waiting 6. Notice that the enter command succeeds
alban
referenced
this issue
in endocode/rkt
May 29, 2015
Move the pid logic back to stage1/rootfs/enter/enter.c (revert part of rkt#826), so the pid logic is an implementation detail of stage1, as it does not appear in Documentation/devel/stage1-implementors-guide.md Some stage1 might not have pid: stage1 based on virtual machines. See rkt#910 and rkt#826. Tests: there are no functional tests to check that the race in rkt#826 is correctly fixed. However, I tested manually in the following way: * Test #1: 1. Start a pod: sudo bin/rkt --debug --insecure-skip-verify run --interactive docker://busybox 2. Pretend that rkt is slow and the ppid file is not yet written: cd /var/lib/rkt/pods/run/$uuid && mv ppid ppid-disabled 3. Enter the pod: sudo bin/rkt enter abbc9f3d /bin/sh 4. Notice that the enter command is waiting (without taking much cpu) 5. Pretend that rkt finished its job: cd /var/lib/rkt/pods/run/$uuid && mv ppid-disabled ppid 6. Notice that the enter command succeeds * Test rkt#2: 1. Repeat steps 1-4 from test #1 2. Stop the pod: ^]^]^] 3. Notice that the enter command stops too FIXME: does not work yet * Test rkt#3: 1. patch stage1/init/init.go: + ioutil.WriteFile("/tmp/rkt-waiting", []byte(""), 0644) + for { + if _, err := os.Stat("/tmp/rkt-waiting"); os.IsNotExist(err) { + break + } + time.Sleep(100 * time.Millisecond) + } 2. Start a pod 3. Enter the pod 4. Notice that the enter command is waiting (without taking much cpu) 5. Let nspawn start: rm /tmp/rkt-waiting 6. Notice that the enter command succeeds
This was referenced Jul 1, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Take an already mounted and setup stage1 and stage2 filesystem and run it. The basic steps involve:
This should all work as a service file and be cleaned up.
The text was updated successfully, but these errors were encountered: