hyperledger / hyperledger/fabric-samples

`--channel-id` vs `--channelID` in version 2.3.3

Open
#1,089 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
3.5k
Avg merge
3d 20h
Merged PRs (30d)
6

Description

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`

```console
$ ~/fabric-samples/bin #v2.3.3 $ ./osnadmin --help
usage: osnadmin --orderer-address=ORDERER-ADDRESS [] [ ...]

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 [...]
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 []
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`](https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.