Tidy up error handling
This commit is contained in:
parent
0b0222f41c
commit
a69d65f481
@ -58,9 +58,13 @@ _dns_gcloud_start_tr() {
|
||||
gcloud dns record-sets transaction start \
|
||||
--transaction-file="$tr" \
|
||||
--zone="$managedZone"
|
||||
|
||||
rc=$?
|
||||
if $rc != 0; then
|
||||
_err "_dns_gcloud_start_tr: RC= $rc failed to execute transaction"
|
||||
return 0
|
||||
fi
|
||||
|
||||
return $rc
|
||||
}
|
||||
|
||||
_dns_gcloud_execute_tr() {
|
||||
@ -68,9 +72,13 @@ _dns_gcloud_execute_tr() {
|
||||
--transaction-file="$tr" \
|
||||
--zone="$managedZone"
|
||||
rc=$?
|
||||
|
||||
if $rc != 0; then
|
||||
_debug tr "$(cat "$tr")"
|
||||
_err "_dns_gcloud_execute_tr: RC= $rc failed to execute transaction"
|
||||
|
||||
return $rc
|
||||
fi
|
||||
|
||||
for i in $(seq 1 120); do
|
||||
if gcloud dns record-sets changes list \
|
||||
@ -107,10 +115,14 @@ _dns_gcloud_add_rrs() {
|
||||
--type=TXT \
|
||||
--zone="$managedZone" \
|
||||
--transaction-file="$tr"
|
||||
|
||||
rc=$?
|
||||
if $rc != 0; then
|
||||
_debug tr "$(cat "$tr")"
|
||||
_err "_dns_gcloud_add_rrs: rc=$rc failed to add RRs"
|
||||
return 0
|
||||
fi
|
||||
|
||||
return $rc
|
||||
}
|
||||
|
||||
_dns_gcloud_find_zone() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user