singularity icon indicating copy to clipboard operation
singularity copied to clipboard

oci kill signals, need more context

Open jscook2345 opened this issue 5 years ago • 7 comments

Version of Singularity:

3.1.0

Why are there two signals for oci kill?

Both the --signal option and the argument signal at the end.

Also, why does kill not work unless I use the KILL argument?

sudo singularity oci kill myc # does not work sudo singularity oci kill myc KILL # does work

jscook2345 avatar Mar 25 '19 05:03 jscook2345

@jscook2345 There is two way thanks to https://github.com/opencontainers/runtime-tools/blob/7125f1d443b030fde561b45bd0f81528f396e0dc/validation/util/container.go#L173. If you run a shell a PID 1 or args like /bin/sh -c "sleep infinity", termination signals are ignored and KILL is the only one which kill PID 1 process, this is a known issue encountered by all runtimes. Some details here https://hynek.me/articles/docker-signals/

cclerget avatar Mar 25 '19 09:03 cclerget

Do these materials provide enough info to fortify the help @jscook2345?

GodloveD avatar Mar 26 '19 00:03 GodloveD

It looks like (from the code) they are just two ways to do the same thing.

sudo singularity oci kill myc KILL is the same as sudo singularity oci kill --signal KILL myc

where the --signal option is used over the argument option if they are both set.

sudo singularity oci kill --signal TERM myc KILL will send the TERM signal.

Is what I stated above correct you think @cclerget ?

jscook2345 avatar Mar 26 '19 02:03 jscook2345

@jscook2345 Checking the code, KILL take precedence over TERM for the last syntax

cclerget avatar Mar 26 '19 07:03 cclerget

Hello,

This is a templated response that is being sent out to all open issues. We are working hard on 'rebuilding' the Singularity community, and a major task on the agenda is finding out what issues are still outstanding.

Please consider the following:

  1. Is this issue a duplicate, or has it been fixed/implemented since being added?
  2. Is the issue still relevant to the current state of Singularity's functionality?
  3. Would you like to continue discussing this issue or feature request?

Thanks, Carter

carterpeel avatar May 15 '21 16:05 carterpeel

This issue has been automatically marked as stale because it has not had activity in over 60 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 14 '21 16:07 stale[bot]

@jscook2345 @cclerget Still getting this problem ? Have this been solved already ? If yes, what work around have you followed and applied ?

We're looking into the issue carefully, soon will bring to community and discuss ways to better solve as well address this. Thankyou for keeping the interest in the subject.

pedroalvesbatista avatar Jul 15 '21 06:07 pedroalvesbatista

Clarity on the OCI KILL options are already captured in this thread so going ahead and closing this issue.

kmuriki avatar Mar 06 '23 04:03 kmuriki