Sorry, I couldn't find any place to report this issue.
Please correct me if there is more suitable resource for Azure bugs.
Preconditions
We have Azure PostgreSQL server X with replica server Y.
In case of emergency with Azure PostgreSQL server X we want to:
- Restore backup via Point-In-Time to new server X2;
- Recreate replica server with the same name Y from X2 server.
Expected result
The PostgreSQL replica server should be create successfully.
Actual result
Creation process fails with timeout after 1 hour:
Restore server...
{- Finished ..
"administratorLogin": "dbadmin",
"byokEnforcement": "Disabled",
"earliestRestoreDate": "2020-10-21T18:39:56.803000+00:00",
"fullyQualifiedDomainName": "psql-server-restored.postgres.database.azure.com",
"id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.DBforPostgreSQL/servers/psql-server-restored",
"identity": null,
"infrastructureEncryption": "Disabled",
"location": "westus",
"masterServerId": "",
"minimalTlsVersion": "TLSEnforcementDisabled",
"name": "psql-server-restored",
"privateEndpointConnections": [],
"publicNetworkAccess": "Enabled",
"replicaCapacity": 5,
"replicationRole": "None",
"resourceGroup": "...",
"sku": {
"capacity": 2,
"family": "Gen5",
"name": "GP_Gen5_2",
"size": null,
"tier": "GeneralPurpose"
},
"sslEnforcement": "Enabled",
"storageProfile": {
"backupRetentionDays": 7,
"geoRedundantBackup": "Disabled",
"storageAutogrow": "Enabled",
"storageMb": 102400
},
"tags": null,
"type": "Microsoft.DBforPostgreSQL/servers",
"userVisibleState": "Ready",
"version": "11"
}
Create replica...
- Running ..
Long-running operation wait cancelled.
Steps to reproduce
#!/bin/bash
set -o errexit
# PLEASE put your subscription id, resource group and server name to reproduce bug
subscriptionId=""
resourceGroup="myResourceGroup"
sourceServerName="psql-server"
sourceServerId="/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/${sourceServerName}"
restoredServerId="/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/${sourceServerName}-restored"
echo "Restore server..."
az postgres server restore \
--resource-group "$resourceGroup" --subscription "$subscriptionId" \
--name "${sourceServerName}-restored" --source-server "${sourceServerName}" \
--restore-point-in-time "2020-10-22T01:00:00+07:00"
echo "Create replica..."
az postgres server replica create \
--resource-group "$resourceGroup" --subscription "$subscriptionId" \
--name "${sourceServerName}-replica" --source-server "$restoredServerId"
Additional context
This bug can be reproduced via Azure REST API.
I can't find info about replica server on Azure Portal.
Status of this operation is "Started" in "Activity log".
Workaround
Wait 5 minutes after that source server is restored.
Environment
Windows 10, WSL, Ubuntu 18.04
Azure CLI version
$ az version
{
"azure-cli": "2.12.1",
"azure-cli-core": "2.12.1",
"azure-cli-telemetry": "1.0.6",
"extensions": {}
}