Bug 2082323

Summary: Changes required to support grpc 1.45.0 and later
Product: [Fedora] Fedora Reporter: Ben Beasley <code>
Component: perl-grpc-xsAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: perl-maint, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-grpc-xs-0.37-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-12 07:26:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2024386    

Description Ben Beasley 2022-05-05 19:39:16 UTC
In grpc version 1.45.0 and later, “Eliminate gRPC insecure build” (https://github.com/grpc/grpc/pull/25586) is implemented.

This affects channel creation:

ext/channel.xs:

> if (creds == NULL) { 
>   ctx->wrapped = grpc_insecure_channel_create(target, &args, NULL); 
> } else { 
>   gpr_log(GPR_DEBUG, "Initialized secure channel"); 
>   ctx->wrapped = 
>       grpc_secure_channel_create(creds->wrapped, target, &args, NULL); 
> }
https://github.com/joyrex2001/grpc-perl/blob/6c7324502525cf44247f80c5989c8492e6c83b29/ext/channel.xs#L39-L45

The grpc_insecure_channel_create function is removed, and grpc_secure_channel_create becomes grpc_channel_create:

> /** Creates a secure channel using the passed-in credentials. Additional
>     channel level configuration MAY be provided by grpc_channel_args, though
>     the expectation is that most clients will want to simply pass NULL. The
>     user data in 'args' need only live through the invocation of this function.
>     However, if any args of the 'pointer' type are passed, then the referenced
>     vtable must be maintained by the caller until grpc_channel_destroy
>     terminates. See grpc_channel_args definition for more on this. */
> GRPCAPI grpc_channel* grpc_channel_create(const char* target,
>                                           grpc_channel_credentials* creds,
>                                           const grpc_channel_args* args);

I think it should still be possible to create an insecure channel by using the experimental API function grpc_insecure_credentials_create from grpc/grpc_security.h:

> /**
>  * EXPERIMENTAL API - Subject to change
>  *
>  * This method creates an insecure channel credentials object.
>  */
> GRPCAPI grpc_channel_credentials* grpc_insecure_credentials_create();

A COPR is available for testing at https://copr.fedorainfracloud.org/coprs/music/grpc/packages/.

I’m hoping to sort out this and the python-google-cloud-bigquery failure pretty soon so I can get grpc up to date in Rawhide.

I opened a report upstream at https://github.com/joyrex2001/grpc-perl/issues/23.

Comment 1 Ben Beasley 2022-05-05 19:41:01 UTC
There is a similar problem with grpc_server_add_secure_http2_port/grpc_server_add_insecure_http2_port.

Comment 2 Petr Pisar 2022-05-06 07:04:54 UTC
Thanks for the notification. I will look at it later. I don't think we can count with upstream's help. If it turns out difficult to port perl-grpc-xs to the new grpc, then I will remove it from Fedora. I have no personal use of it, nothing uses it in Fedora, and I believe that perl-grpc-xs actually departed to far from grpc and many parts of it does not work anymore.

Comment 4 Fedora Update System 2022-05-12 07:18:05 UTC
FEDORA-2022-d91d2847c4 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d91d2847c4

Comment 5 Fedora Update System 2022-05-12 07:26:25 UTC
FEDORA-2022-d91d2847c4 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.