fix: use headPeer.address in anchor peer update instead of hardcoded peer0#756
Open
Slambot01 wants to merge 2 commits into
Open
fix: use headPeer.address in anchor peer update instead of hardcoded peer0#756Slambot01 wants to merge 2 commits into
Slambot01 wants to merge 2 commits into
Conversation
…peer0 Fixes hyperledger-labs#751 Signed-off-by: Ritesh Pandit <riteshpandit1708@gmail.com>
3a132ed to
cb0e2c5
Compare
Fixes hyperledger-labs#751 Signed-off-by: Ritesh Pandit <riteshpandit1708@gmail.com>
Contributor
Author
|
test-02-raft failure is unrelated to this PR and was already present before these changes. The CI logs show the failure happens during Java chaincode (chaincode2) installation, where build.sh crashes with "cd: null directory" even though the Gradle build completes successfully. This points to a fragile issue in the sample chaincode build script itself.The anchor peer fix in this PR only changes updateAnchorPeers inside commands-generated.sh. The channel creation logs also confirm the fix is working correctly, as my-channel2 is successfully created and joined by Org1/peer1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
notifyOrgAboutNewChannelandnotifyOrgAboutNewChannelTlsincommands-generated.shwere hardcodingpeer0.<org.domain>as the peer address instead of respecting thepeer.prefixconfig field. If you set a custom prefix like"prefix": "node", everything else in the generated file picks it up and usesnode0.org1.example.com, but the anchor peer update was still pointing atpeer0.org1.example.comwhich doesn't exist as a container. Docker DNS silently fails with no obvious indication that the prefix config is being ignored.Fix
Switched to
org.headPeer.addresswhich already handles the prefix correctly.headPeeris justpeers[0]from the prefix-aware peer list built inextendOrgsConfig.ts:258, and the same pattern is already used inchaincode-install-v2.shandchaincode-dev-v2.sh. All 17 unit tests pass.Fixes #751