Skip to content

Conversation

@little-engineer-2025
Copy link

Description of the change:

The change proposed run the last command using exec ... so
the last command in the chain is assigned the pid 1 in the container,
so when the container is stopped, that last process receive directly the
SIGTERM signal.

In my environment, I have observed a difference about 60 seconds
between run make test-e2e for the master branch, and the branch
with this changes, more specific (could be more, as one test is failing
on my environment):

  • Running without the change: 172.88s
  • Running with the change: 116.88s

I am sure about the impact of the first commit, but unsure about the impact
of the second commit, but I have added to keep consistency. If I were missing
additional places where similar scenario could happens, I am happy to add additional
commits.

Motivation for the change:

It was observed the command for two containers are executed as
child of the shell interpreter. When the container receive the SIGTERM
the signal would no be propagated to the child process by the shell
interpreter. This would evoke a delay until the grace termination
timeout is reached when those containers are stopped.

Checklist

If the pull request includes user-facing changes, extra documentation is required:

The shell script does not propagate the SIGTERM signal that is sent to
the pod when it is terminated; to avoid this, we run the last command to
substitute the shell process, so that the pod stop immediately instead of
waiting the 30 default seconds of the grace period when an user uninstall
the operator by using 'operator-sdk cleanup ...' command.

Signed-off-by: Alejandro Visiedo <learning.little.engineer.2025.1@gmail.com>
Make registry-server run with pid 1, after initialization
so when the container is stopped, the process is gracefully
terminated.

Signed-off-by: Alejandro Visiedo <learning.little.engineer.2025.1@gmail.com>
@openshift-ci openshift-ci bot requested review from anik120 and oceanc80 December 29, 2025 12:45
@little-engineer-2025
Copy link
Author

Related: #5866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant