This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Create pidfile and "bpm pid" command #11
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some drain scripts send signals directly to the process via the PID from the pidfile (because bpm doesn't have a mechanism to send e.g. a USR1 signal). This obviously only works when the drain runs inside the same container as the process itself. This commit maintains a pid file at the /var/vcap/sys/run/bpm/$JOB/$PORC.pid location and also implements the `bpm pid` command to access it. Signed-off-by: Jan Dubois <[email protected]>
Signed-off-by: Jan Dubois <[email protected]>
The pid is unused by the rest of the tests, so for now just set it to 0. Signed-off-by: Jan Dubois <[email protected]>
I have looked at most of the tests that were failing (other than the path issues) and we need to change the tests to "Expect" Pid function to called. Most of the tests have Expects for "Wait" but it will also need "Expects" for "Pid" to be called. I can add that and I know how and where to add it but none of the tests will work until the hard coding of the paths is fixed |
manno
approved these changes
May 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
manno
pushed a commit
to cloudfoundry-incubator/quarks-operator
that referenced
this pull request
May 20, 2021
Also fix the version of container-run and use newer Go version to build it. References cloudfoundry-incubator/quarks-container-run#11
manno
pushed a commit
to cloudfoundry-incubator/quarks-operator
that referenced
this pull request
May 21, 2021
Also fix the version of container-run and use newer Go version to build it. References cloudfoundry-incubator/quarks-container-run#11
manno
pushed a commit
to cloudfoundry-incubator/quarks-operator
that referenced
this pull request
May 21, 2021
Also fix the version of container-run and use newer Go version to build it. References cloudfoundry-incubator/quarks-container-run#11
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some drain scripts send signals directly to the process via the PID from the pidfile (because bpm doesn't have a mechanism to send e.g. a USR1 signal). This obviously only works when the drain runs inside the same container as the process itself.
This commit maintains a pid file at the
/var/vcap/sys/run/bpm/$JOB/$PROCESS.pid
location and also implements thebpm pid
command to access it. This is an extension to the changes in #10 and should enable some of the drain scripts mentioned in cloudfoundry-incubator/kubecf#1728 to work without any local patches.Manual testing
Start the new
container-run
as before (main.sh
from #10):Then run from a different terminal:
And verify it has the expected effect: