Skip to content

Add dumb-init to service containers - #785

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
amartyasinha:fix/dumb-init-sigterm
Nov 6, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
amartyasinha:fix/dumb-init-sigterm

Conversation

@amartyasinha

@amartyasinha amartyasinha commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

When a pod is deleted before the service is ready to handle SIGTERM, the service can keep running until terminationGracePeriodSeconds expires, delaying pod termination. Run the service under dumb-init so SIGTERM is handled and forwarded even during early startup.

Wrap Heat API, CFN API, and engine processes with dumb-init to forward SIGTERM to the service process. Add functional assertions and update KUTTL expectations for the wrapped commands.

Assisted-by: Codex codex@openai.com

Jira: https://redhat.atlassian.net/browse/OSPRH-40307

When a pod is deleted before the service is ready to handle SIGTERM,
the service can keep running until terminationGracePeriodSeconds
expires, delaying pod termination. Run the service under dumb-init
so SIGTERM is handled and forwarded even during early startup.

Wrap Heat API, CFN API, and engine processes with dumb-init to forward
SIGTERM to the service process. Add functional assertions and update
KUTTL expectations for the wrapped commands.

Assisted-by: Codex <codex@openai.com>
Signed-off-by: Amartya Sinha <amsinha@redhat.com>
@openshift-ci
openshift-ci Bot requested review from abays and rabi November 5, 2026 07:11
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7b96ba7f-e163-47a9-a9ec-c59d82251f3b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@amartyasinha

Copy link
Copy Markdown
Contributor Author

/test heat-operator-build-deploy-kuttl

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/00a58d5c9ad9419d8d342927e280f989

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 02m 47s
❌ heat-operator-tempest-multinode FAILURE in 21m 25s
✔️ heat-s2i-content-provider SUCCESS in 1h 02m 29s (non-voting)
❌ heat-s2i-test FAILURE in 18m 44s (non-voting)

Warning:
File .ssh/config found in build home directory during playbook github.com/openstack-k8s-operators/s2i-openstack-containers/playbooks/container-ci/zuul/pre.yaml for job heat-s2i-content-provider. Add to preserve-home-paths if safe, or otherwise remove.

@amartyasinha

Copy link
Copy Markdown
Contributor Author

recheck

@amartyasinha

Copy link
Copy Markdown
Contributor Author

/test heat-operator-build-deploy-kuttl

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build succeeded (check pipeline).
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/b533a94e31a2426dbbbd888799c76f90

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 05m 47s
✔️ heat-operator-tempest-multinode SUCCESS in 1h 18m 51s
✔️ heat-s2i-content-provider SUCCESS in 4h 26m 48s (non-voting)
❌ heat-s2i-test FAILURE in 19m 45s (non-voting)

Warning:
File .ssh/config found in build home directory during playbook github.com/openstack-k8s-operators/s2i-openstack-containers/playbooks/container-ci/zuul/pre.yaml for job heat-s2i-content-provider. Add to preserve-home-paths if safe, or otherwise remove.

@amartyasinha

Copy link
Copy Markdown
Contributor Author

/test heat-operator-build-deploy-kuttl

{
Name: heat.ServiceName + "-" + heat.APIComponent,
Command: []string{
"/usr/bin/dumb-init",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As I understand we don't need Command here. Setting only Args: ["/usr/sbin/httpd", "-DFOREGROUND"] keeps the image ENTRYPOINT and replaces CMD.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that’s true. We set both Command and Args so the pod spec shows the full process invocation without needing to check the Containerfile.

The behavior should be the same either way. If you want to drop the Command part, I can do that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's duplication and something that does not have to repeated in all services as base image has it. But I see it's repeated in every operator, so we can leave it here too. Is there a jira reference you can add to the PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ack! updated the jira ref in the description

@openshift-ci openshift-ci Bot added the lgtm label Nov 6, 2026
@openshift-ci

openshift-ci Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amartyasinha, rabi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Nov 6, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit a313bd4 into openstack-k8s-operators:main Nov 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants