fabric-samples
fabric-samples copied to clipboard
`--channel-id` vs `--channelID` in version 2.3.3
I install fabric-sample using the latest method install-fabric.sh. I run it with ./install-fabric.sh -f 2.3.3 -c 1.5.2
$ ~/fabric-samples/bin #v2.3.3 $ ./osnadmin --help
usage: osnadmin --orderer-address=ORDERER-ADDRESS [<flags>] <command> [<args> ...]
Orderer Service Node (OSN) administration
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
-o, --orderer-address=ORDERER-ADDRESS
Admin endpoint of the OSN
--ca-file=CA-FILE Path to file containing PEM-encoded TLS CA certificate(s) for the OSN
--client-cert=CLIENT-CERT Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the OSN
--client-key=CLIENT-KEY Path to file containing PEM-encoded private key to use for mutual TLS communication with the OSN
Commands:
help [<command>...]
Show help.
channel join --channelID=CHANNELID --config-block=CONFIG-BLOCK
Join an Ordering Service Node (OSN) to a channel. If the channel does not yet exist, it will be created.
channel list [<flags>]
List channel information for an Ordering Service Node (OSN). If the channelID flag is set, more detailed information will be provided for that
channel.
channel remove --channelID=CHANNELID
Remove an Ordering Service Node (OSN) from a channel.
...
$ ~/fabric-samples/bin #v2.3.3 $ grep -r -F -- --channel-id ~/fabric-samples/test-network/scripts
/home/vm/fabric-samples/test-network/scripts/createChannel.sh: osnadmin channel join --channel-id $CHANNEL_NAME
--config-block ./channel-artifacts/${CHANNEL_NAME}.block -o localhost:7053 --ca-file "$ORDERER_CA"
--client-cert "$ORDERER_ADMIN_TLS_SIGN_CERT" --client-key "$ORDERER_ADMIN_TLS_PRIVATE_KEY" >&log.txt
It turns out osnadmin installed by install-fabric.sh accepts --channelID
, whereas createChannel.sh sends out --channel-id
. If I proceed with ./network.sh up createChannel
, a failure shows up.
The old install script bootstrap.sh
causes the same error.
My investigation
The renaming from --channel-id
to --channelID
is in https://github.com/hyperledger/fabric/pull/2315, the commits were backported to fabric release-2.3.
The install script downloads fabric binary from https://github.com/hyperledger/fabric/releases/tag/v2.3.3, which was created on Sep 9, 2021. It includes the renaming.
The install script checks out the fabric-samples repo with tag v2.3.3. This tag was created on Feb 1, 2021. It doesn't have the renaming change.
Impact
I bet anyone who runs either install script with argument v2.3.3 will fail following the tutorial.
My company has assets on version 2.3.3 and prefer to stay on this version.
Please advise.
I also face the same issue!!!