Skip to content

Commit

Permalink
[FAB-4424] Clarify configtx flag and error
Browse files Browse the repository at this point in the history
The configtxgen tool has a flag "-asOrg" which takes an organization's
name, and performs a config update as that org (useful for updating
anchor peers only, today).

Apparently this flag can be interpretted as requiring the organization's
MSP ID, and not name.

This CR adds a clarifying "(by name)" to the parameter help, and
additionally changes the error message when the org name is not found,
to refer to the organization name, and not simply the org.

Change-Id: I7c3dfc215d7efbf731ce0fb2464b9bafbd0572cb
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Jun 7, 2017
1 parent 52853f8 commit 0d864c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/configtx/tool/configtxgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func doOutputAnchorPeersUpdate(conf *genesisconfig.Profile, channelID string, ou
}

if org == nil {
return fmt.Errorf("No org matching: %s", asOrg)
return fmt.Errorf("No organization name matching: %s", asOrg)
}

anchorPeers := make([]*pb.AnchorPeer, len(org.AnchorPeers))
Expand Down Expand Up @@ -335,7 +335,7 @@ func main() {
flag.StringVar(&inspectBlock, "inspectBlock", "", "Prints the configuration contained in the block at the specified path")
flag.StringVar(&inspectChannelCreateTx, "inspectChannelCreateTx", "", "Prints the configuration contained in the transaction at the specified path")
flag.StringVar(&outputAnchorPeersUpdate, "outputAnchorPeersUpdate", "", "Creates an config update to update an anchor peer (works only with the default channel creation, and only for the first update)")
flag.StringVar(&asOrg, "asOrg", "", "Performs the config generation as a particular organization, only including values in the write set that org (likely) has privilege to set")
flag.StringVar(&asOrg, "asOrg", "", "Performs the config generation as a particular organization (by name), only including values in the write set that org (likely) has privilege to set")

flag.Parse()

Expand Down

0 comments on commit 0d864c6

Please sign in to comment.