Skip to content

daemon: Catch SIGTERM and ignore it if we're doing an update - #477

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
cgwalters:mcd-sigterm
Feb 22, 2019
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
cgwalters:mcd-sigterm

Conversation

@cgwalters

Copy link
Copy Markdown
Member

Ref: #407

The MCD is not ready to be killed at any arbitrary point. Bump
the termination timeout to 5 minutes, and ignore SIGTERM if we're
in the middle of performing an update.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2019
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 22, 2019
@cgwalters

Copy link
Copy Markdown
Member Author

Tested this lightly locally as far as verifying we caught SIGTERM; added a time.Sleep() there to verify I got the log message.

@cgwalters

Copy link
Copy Markdown
Member Author

Though a better way to do this is to install the SIGTERM handler only when we go to do an update; that way the kernel can still kill us directly when idle rather than jumping into the process only to immediately exit.

Comment thread pkg/daemon/daemon.go Resolved
Comment thread pkg/daemon/update.go Resolved
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 22, 2019
@cgwalters

Copy link
Copy Markdown
Member Author

I reworked this entirely per #477 (comment)

But only compile tested.

Comment thread pkg/daemon/update.go Resolved
Ref: openshift#407

The MCD is not ready to be killed at any arbitrary point.  Bump
the termination timeout to 5 minutes, and ignore `SIGTERM` if we're
in the middle of performing an update.
@rphillips

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 22, 2019
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, rphillips

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-merge-robot
openshift-merge-robot merged commit 96e0766 into openshift:master Feb 22, 2019
ptalgulk01 pushed a commit to ptalgulk01/machine-config-operator that referenced this pull request May 15, 2026
daemon: Catch SIGTERM and ignore it if we're doing an update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants