-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start rsync daemon in the foreground to prevent zombie processes #9939
Conversation
@bparees ptal |
if err == nil { | ||
break | ||
} | ||
if s.daemonErr != nil { |
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.
do you need to wrap a mutex around this to ensure you're getting the current value?
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.
and should this check come before running the checkScript?
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.
I don't think the order matters since we are looping. Also, not sure that a mutex is needed ... if we don't catch it immediately, we'll just catch it the next time we come around.
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.
the ordering was a minor optimization.
as for the mutex, i'm wondering if you're going to get race warnings from docker. or the general non-guaranteed outcome of reading shared variables w/o a memory barrier.
Updated to use a channel for the error |
lgtm [merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6566/) (Image: devenv-rhel7_4632) |
Evaluated for origin merge up to 39e65ab |
[Test]ing while waiting on the merge queue |
Flake #8571 |
[test] |
Evaluated for origin test up to 39e65ab |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6566/) |
For the rsync-daemon strategy starts the rsync daemon in the foreground, checks that it has been started by verifying that a pid file exists for it, and then proceeds with the copy.
The foreground exec is later terminated when the daemon process is killed.
Fixes #9882