如何解决Azure 存储帐户 - 故障转移:当前正在此存储帐户上执行需要独占访问权限的操作
我在美国西部有一个 Azure 存储帐户,启用了地理复制以与美国东部同步,我正在按需使用 bash 脚本执行故障转移。作为 bash 脚本的一部分,以下函数用于设置 Azure STORAGE ACCOUNT SKU
_SET_STORAGE_ACCOUNT_SKU () {
while true
do
for val in "${StroageAccounts[@]}"; do
echo "Checking the Storage Account: $val"
temp=("${StroageAccounts[@]}")
shouldBreak=false
status=$(az storage account show -n $val --query failoverInProgress)
if [ ! $status ]; then
echo "Storage Account: $val is failed over"
count=${#StroageAccounts[@]}
for ((i=0;i<count;i++));
do
if [[ "${StroageAccounts[i]}" == $val ]]; then
az storage account update --name $val --resource-group $WEST_RESOURCE_GROUP --sku Standard_RAGRS
echo "Configured Standard_RAGRS for : $val}"
unset temp[$i]
shouldBreak=true
break
fi
done
fi
if [[ "${shouldBreak}" == "true" ]]; then
break
fi
done
StroageAccounts=("${temp[@]}")
if [ ${#StroageAccounts[@]} -eq 0 ]; then
echo "All the Stroage Accounts are Failedover"
break
else
echo "Wait for the Failover to complete"
sleep 2m
fi
done
}
并且它因以下错误而失败
ERROR: (ResourceCollectionRequestsThrottled) Operation 'Microsoft.Storage/storageAccounts/read' failed as server encountered too many requests. Please try after '17' seconds. Tracking Id is '909bf1da-abcd-4ef9-8795-a52383a83678'.
ERROR: (StorageAccountOperationInProgress) An operation is currently performing on this storage account that requires exclusive access.
看起来是以下行导致了问题
status=$(az storage account show -n $val --query failoverInProgress)
我该如何解决这个问题?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。