Skip to content
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

VixDiskLib: Use a well-known IO to pass the URI #4318

Closed
wants to merge 1 commit into from

Conversation

matthewd
Copy link
Contributor

As we can be more confident it's the right thing now, we can lose the 'URI:' prefix.

In passing, also fix retries: previously, we would've attempted to re-read the URI upon retry, when it had already been consumed. That clearly wasn't going to work.


@jerryk55 this is entirely untested, mostly because I wouldn't know where to start. Feel free to use/ignore as you see fit...

If it were just some existing isolated code I may not have bothered, but as it sounds like we're about to replicate the pattern, it seemed worth a mention. (Also, I really don't see how that retry could possibly work.)

As we can be more confident it's the right thing now, we can lose the
'URI:' prefix.

In passing, also fix retries: previously, we would've attempted to
re-read the URI upon retry, when it had already been consumed. That
clearly wasn't going to work.
@miq-bot
Copy link
Member

miq-bot commented Sep 11, 2015

Checked commit matthewd@523f601 with ruby 1.9.3, rubocop 0.33.0, and haml-lint 0.13.0
2 files checked, 0 offenses detected
Everything looks good. 🍰

jerryk55 added a commit to jerryk55/manageiq that referenced this pull request Sep 17, 2015
Added a thread to the VixDiskLibServer to read one end of a pipe that
the SmartProxyWorker has opened.  When the read returns the worker process
has exited so the VixDiskLibServer shuts down.

This fixes the BZ https://bugzilla.redhat.com/show_bug.cgi?id=1258985

This fix was implemented in lieu of previous PR ManageIQ#4277 -
ManageIQ#4277 which passed SIGTERM
from the worker process to the server process.  The new implementation
will handle any signal that has caused the worker to exit including
SIGKILL. The previous PR will be closed.

Instead of using an environment variable to let VixDiskLibServer know which
FD contains the pipe we are using a known FD.  In addition we have changed
the previous logic for the other pipe being used by these two
processes which is used to hand the DRb URI back to the worker so that it
also uses a known FD.

Finally we have fixed the retry logic in the worker to read the URI before
attempting to establish the DRb connection.

The "known FD" and retry logic code come from PR ManageIQ#4318 by @matthewd which
will be closed in lieu of this new one.
@jerryk55
Copy link
Member

@matthewd I have implemented most of this logic by way of PR #4411 so I believe this one can be closed.

@matthewd matthewd closed this Sep 17, 2015
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.

3 participants