Closed fernandohackbart closed 3 weeks ago
The procedure I am using is
kubectl exec -it -n regulators -c peer r-timestamp-1peer01-6f9cb874ff-pxcq8 -- peer channel fetch config /tmp/usage_latest.pb -o r-timestamp-1orderer.regulators:7050 --ordererTLSHostnameOverride r-timestamp-1orderer.regulators -c usage --tls --cafile /var/hyperledger/tls/client/cert/cert.pem
kubectl cp -nregulators -c peer r-timestamp-1peer01-6f9cb874ff-pxcq8:/tmp/usage_latest.pb /tmp/usage_latest.pb
configtxlator proto_decode --input /tmp/usage_latest.pb --type common.Block --output /tmp/usage-add-orderer-01-full.json
jq .data.data[0].payload.data.config /tmp/usage-add-orderer-01-full.json > /tmp/usage-add-orderer-01.json
kubectl hlf ordnode join --block=/hyperledger/channels/usage.block --name=r-timestamp-1orderer-01 --identity=/hyperledger/config/r-timestamp-1/admin-tlsca-certs.yaml --namespace=regulators
cat /tmp/usage-add-orderer-01.json | jq '.channel_group.groups.Orderer.groups."r-timestamp-1msp".values.Endpoints'
cat /tmp/usage-add-orderer-01.json | jq '.channel_group.groups.Orderer.policies.BlockValidation.policy.value.identities'
cat /tmp/usage-add-orderer-01.json | jq '.channel_group.groups.Orderer.policies.BlockValidation.policy.value.rule'
cat /tmp/usage-add-orderer-01.json | jq '.channel_group.groups.Orderer.values.Orderers.value.consenter_mapping'
vi /tmp/usage-add-orderer-01.json
### adjust the file
configtxlator proto_encode --input=/tmp/usage-add-orderer-01.json --type=common.ConfigUpdate --output=/tmp/usage-add-orderer-01.pb
When executing the configtxlator proto_encode
command it fails with configtxlator: error: Error decoding: error decoding input: *commonext.ConfigUpdate: unknown field "channel_group" in common.ConfigUpdate
error.
I was executing the wrong procedure
What happened?
I am trying to add a new orderer of on existing ordering organization to a channel by following the documentation available at https://hyperledger-fabric.readthedocs.io/en/latest/create_channel/add_orderer.html, we already have a channel deployed using HLF operator. I the procedure is required to
get the last config block
and is suggested to use thepeer channel fetch config
command.I would like to know how to do this with the operator.
What did you expect to happen?
To have a
kubectl hlf
command to get the last configuration block for the channel.How can we reproduce it (as minimally and precisely as possible)?
This is not an operation issue but a how to question.
Anything else we need to know?
No response
Kubernetes version