12
net/gce.sh
12
net/gce.sh
@ -575,6 +575,14 @@ delete() {
|
|||||||
$metricsWriteDatapoint "testnet-deploy net-delete-complete=1"
|
$metricsWriteDatapoint "testnet-deploy net-delete-complete=1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_error_cleanup() {
|
||||||
|
declare RC=$?
|
||||||
|
if [[ "$RC" -ne 0 ]]; then
|
||||||
|
delete
|
||||||
|
fi
|
||||||
|
exit $RC
|
||||||
|
}
|
||||||
|
|
||||||
case $command in
|
case $command in
|
||||||
delete)
|
delete)
|
||||||
delete
|
delete
|
||||||
@ -587,6 +595,10 @@ create)
|
|||||||
|
|
||||||
$metricsWriteDatapoint "testnet-deploy net-create-begin=1"
|
$metricsWriteDatapoint "testnet-deploy net-create-begin=1"
|
||||||
|
|
||||||
|
if $failOnValidatorBootupFailure; then
|
||||||
|
trap create_error_cleanup EXIT
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "$sshPrivateKey"{,.pub}
|
rm -rf "$sshPrivateKey"{,.pub}
|
||||||
|
|
||||||
# Note: using rsa because |aws ec2 import-key-pair| seems to fail for ecdsa
|
# Note: using rsa because |aws ec2 import-key-pair| seems to fail for ecdsa
|
||||||
|
Reference in New Issue
Block a user