Skip to content

Update grpcio to 1.53 #144

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

Closed
wants to merge 2 commits into from
Closed

Conversation

mpozniak95
Copy link
Contributor

No description provided.

@mpozniak95 mpozniak95 changed the base branch from master to upgrade-packages-2 April 27, 2023 10:19
@mpozniak95 mpozniak95 changed the base branch from upgrade-packages-2 to master April 27, 2023 10:19
@Jongy Jongy mentioned this pull request Jun 21, 2023
path = "unix://" + ns.resolve_host_root_links(path)
if self._is_cri_available(path):
self._runtimes[rt] = path
if os.path.exists(path):
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what better we can do about it.
It seems reasonable to put this check here, and prevent grpc from retrying connection to unavailable unix socket.

@marcin-ol
Copy link
Contributor

Did some research on grpcio, tried versions as recent as 1.56.2.

Without the condition added by Marcin, grpcio seems to retry connection to unavailable unix socket and occupy grpc thread.

Here's a fragment of GRPC trace:

I0809 10:20:47.309468319 1277687 subchannel.cc:707]                    subchannel 0x55d9d6b7acb0 {address=unix:/proc/1/root/run/crio/crio.sock, 
grpc.primary_user_agent=grpc-python/1.56.2, grpc.resource_quota=0x55d9d6a85910, grpc.server_uri=unix:///proc/1/root/run/crio/crio.sock}}:
connect failed (UNKNOWN:No such file or directory {created_time:"2023-08-09T10:20:47.309356824+00:00",   
errno:2, os_error:"No such file or directory", syscall:"connect", target_address:"unix:/proc/1/root/run/crio/crio.sock"}),   
backing off for 1000 ms

The issue will only surface if we actually attempt to send a grpc Version request in method _is_cri_available().

Playing with grpc options found the following to help with some cases, but not eliminate the problem of hanging-processes completely:

self._channel = grpc.insecure_channel(path, options=[
    ('grpc.initial_reconnect_backoff_ms', 100,),
    ('grpc.min_reconnect_backoff_ms', 100,),
    ('grpc.max_reconnect_backoff_ms', 100,),
])

@Jongy
Copy link
Contributor

Jongy commented Jan 2, 2024

Closing in favor of #139

@Jongy Jongy closed this Jan 2, 2024
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