Skip to content

Conversation

@wllenyj
Copy link
Contributor

@wllenyj wllenyj commented May 8, 2022

As we know, shim starts twice. The first time we execute the shim with the
start arguments, the -debug argument is passed to the shim
process correctly. But the second time we execute shim, the debug flag
is ignored.

Signed-off-by: wllenyj [email protected]

@k8s-ci-robot
Copy link

Hi @wllenyj. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sbuckfelder
Copy link

LGTM. Looks like it is plumbed through - just curious how did you test it?

@wllenyj
Copy link
Contributor Author

wllenyj commented May 9, 2022

LGTM. Looks like it is plumbed through - just curious how did you test it?

When I run contained with sudo ./containerd -c config.toml -l debug, the shim log:

time="2022-05-10T01:23:32.634382069+08:00" level=info msg="loading plugin \"io.containerd.internal.v1.shutdown\"..." runtime=io.containerd.runc.v2 type=io.containerd.internal.v1             
time="2022-05-10T01:23:32.634400666+08:00" level=info msg="loading plugin \"io.containerd.ttrpc.v1.pause\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1                      
time="2022-05-10T01:23:32.634422154+08:00" level=debug msg="registering ttrpc service" id=io.containerd.ttrpc.v1.pause                                                                        
time="2022-05-10T01:23:32.634437034+08:00" level=info msg="loading plugin \"io.containerd.event.v1.publisher\"..." runtime=io.containerd.runc.v2 type=io.containerd.event.v1                  
time="2022-05-10T01:23:32.634449009+08:00" level=info msg="loading plugin \"io.containerd.ttrpc.v1.task\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1                       
time="2022-05-10T01:23:32.634544405+08:00" level=debug msg="registering ttrpc service" id=io.containerd.ttrpc.v1.task                                                                         
time="2022-05-10T01:23:32.634699592+08:00" level=debug msg="serving api on socket" socket="[inherited from parent]"                                                                           
time="2022-05-10T01:23:32.634779031+08:00" level=info msg="starting signal loop" namespace=k8s.io path=/home/xxxx/io.containerd.runtime.v2.task/k8s.io/b8931f1f5ec7a9a139414120972b965f27e586dd9d485f39d6cb9f6e2ee2361f pid=18403 runtime=io.containerd.runc.v2  

and without the -l debug:

time="2022-05-10T01:23:08.376071939+08:00" level=info msg="loading plugin \"io.containerd.internal.v1.shutdown\"..." runtime=io.containerd.runc.v2 type=io.containerd.internal.v1             
time="2022-05-10T01:23:08.376092423+08:00" level=info msg="loading plugin \"io.containerd.ttrpc.v1.pause\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1                      
time="2022-05-10T01:23:08.376113255+08:00" level=info msg="loading plugin \"io.containerd.event.v1.publisher\"..." runtime=io.containerd.runc.v2 type=io.containerd.event.v1                  
time="2022-05-10T01:23:08.376126788+08:00" level=info msg="loading plugin \"io.containerd.ttrpc.v1.task\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1                       
time="2022-05-10T01:23:08.376291530+08:00" level=info msg="starting signal loop" namespace=k8s.io path=/home/xxxx/io.containerd.runtime.v2.task/k8s.io/750d22f223c4ec4567c557e2e719e08b8f77472a96f6909bf51456a0824d49b2 pid=17422 runtime=io.containerd.runc.v2  

@estesp
Copy link
Member

estesp commented May 10, 2022

Can you rebase on latest main commit to pick up a CI fix for Vagrant?

@wllenyj wllenyj force-pushed the debug branch 3 times, most recently from 59970d1 to 9bd5134 Compare May 11, 2022 14:08
As we know, shim starts twice. The first time we execute the shim with the
`start` arguments, the `-debug` argument is passed to the shim
process correctly. But the second time we execute shim, the debug flag
is ignored.

Signed-off-by: wllenyj <[email protected]>
@wllenyj
Copy link
Contributor Author

wllenyj commented May 11, 2022

Can you rebase on latest main commit to pick up a CI fix for Vagrant?

rebased.

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpuguy83
Copy link
Member

Opened backport to 1.6 here: #8288

@fuweid fuweid added cherry-pick/1.6.x cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch and removed cherry-pick/1.6.x labels Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch needs-ok-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants