-
Notifications
You must be signed in to change notification settings - Fork 69
Join channel fails with imported ordering service #819
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
Comments
After further investigation, it looks like the following change introduced the issue: The change above seems to resolve an issue with filtering the peers that belong to MSPs on the channel. However, when the ordering service is imported and managed outside of the console instance (i.e. by another organization), there will be no admin identities of the ordering service available in the wallet. Therefore the getChannelConfigBlock of OrdererRestApi will fail (internally it gets the cert/private key of the ordering node associated admin identity). There are 2 paths of joining peer to channel that are affected: (2) Trigger the join to channel from the channels page Proposed solution:
I am available to contribute a fix once the proposed solution has been reviewed and accepted by the maintainers. |
@TsvetanG Thank you for investigating. |
Yes, from a functional perspective, it restores the way it worked, considering also the functionality that was added (and unfortunately introduced the regression issue). |
@TsvetanG From my assessment the bug may have been introduced even further back than the commit you mentioned. This is a potential culprit: I haven't tested my theory, but it looks like in this commit OrdererRestApi.js was changed to remove the passed identityInfo:
And instead it always uses the orderer mspid, cert, and private key (which is not found when joining a peer from a different console than the ordering service console). Can you assess if that is indeed the issue, and potentially revert to the old code that used to work. |
Yes it was kind of broken before but it worked as the error was just logged but not propagated. The identityInfo might be useful in case the user selects the MSP to be used to fetch the config block. However, this is a new functionality and needs to be looked at in details. If we revert to the older code we will revert also the filter peer logic that still make sense and is useful in case the ordering service admin identity is available in the console. The fix I am proposing is about keeping the current logic of filtering peers if the ordering admin identity is available and skipping it if the identity is not available. In both cases the end user should be anyways well aware of what MPS are on the channel and make the correct selection of peers to join the channel. |
@TsvetanG Whichever approach you like should be fine, go ahead and open the pull request so that we can start reviews and testing. Thanks again! |
There is an issue (seems to be a regression as it works with earlier console images - i.e. v1.0.8-18) joining a peer on a channel using an imported ordering service.
The error is:
_An unexpected error occurred.
Hide error details
{"details":{"function_name":"getChannelBlockFromOrderer","error":true,"msp_id":"orderingsrvmsp","stitch_msg":"["Missing an argument - client certificate (\"client_cert_b64pem\"). Provide a ECDSA signed certificate that is a base 64 encoded PEM file.","Missing an argument - client private key (\"client_prv_key_b64pem\"). Provide a ECDSA private key that is a base 64 encoded PEM file."]","grpc_resp":null,"orderer_host":"https://demo-hlf-console-console.texas.demo.senofi.net:443/grpcwp/https%3A%2F%2Fdemo-orderingsrvnode1-_
The setup:
The same error appears when the join channel is triggered from the Peer page.
Expected result:
The console should list the peers to join the channels and allow the user to finish the process.
The text was updated successfully, but these errors were encountered: