Skip to content
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

--channel-id vs --channelID in version 2.3.3 #1089

Open
gqqnbig opened this issue Sep 23, 2023 · 1 comment
Open

--channel-id vs --channelID in version 2.3.3 #1089

gqqnbig opened this issue Sep 23, 2023 · 1 comment

Comments

@gqqnbig
Copy link
Contributor

gqqnbig commented Sep 23, 2023

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 hyperledger/fabric#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.

@linhnt31
Copy link

linhnt31 commented Oct 6, 2023

I also face the same issue!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants