Skip to content

Commit

Permalink
chain-initiator.sh: piping to head loses error status
Browse files Browse the repository at this point in the history
  • Loading branch information
elric1 committed May 10, 2022
1 parent 29ad7c3 commit 9e9517c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/tezos/scripts/chain-initiator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ $CLIENT -d /var/tezos/client --block \
{{ .Values.activation.protocol_hash }} \
with fitness -1 and key \
$( cat /etc/tezos/activation_account_name ) \
and parameters /etc/tezos/parameters.json 2>&1 | head -200
and parameters /etc/tezos/parameters.json
2 changes: 1 addition & 1 deletion test/charts/private-chain.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ spec:
Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A \
with fitness -1 and key \
$( cat /etc/tezos/activation_account_name ) \
and parameters /etc/tezos/parameters.json 2>&1 | head -200
and parameters /etc/tezos/parameters.json
envFrom:
env:
Expand Down

3 comments on commit 9e9517c

@nicolasochem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elric1 are you sure? There is a set -o pipefail earlier in the file.

With this change, I can no longer debug activation failures on dailynet, because all commitments are printed out and the log buffer is full.

@elric1
Copy link
Contributor Author

@elric1 elric1 commented on 9e9517c May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I do remember seeing a problem. I can look into it again, though, maybe my solution wasn't appropriate. As you point out, pipefail is set.

@elric1
Copy link
Contributor Author

@elric1 elric1 commented on 9e9517c May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I've had a look. I clearly remember running into the problem where I set invalid parameters after changing protocols and the script exiting successfully and the cluster not activating the chain. But, I can't reproduce it. I think that what must have happened was that I was on a branch or something where the pipefail was lost.
In any case, please see PR #455 which reverts the change.

Please sign in to comment.