[BUG] Azure SQL FOG subsume fails with "Must provide values for all import parameters: azure_primary_db_id, azure_secondary_db_id, azure_fog_id" even though provided
claassen opened this issue · 4 comments
For example when running:
cf create-service csb-azure-mssql-db-failover-group subsume test-subsume-fog -c '{ "azure_primary_db_id": "/subscriptions/957108b5-005f-4b11-bae1-9e62ba39e857/resourceGroups/MFC-CAC-PCF-PSB/providers/Microsoft.Sql/servers/azugessqlprod/databases/indexnowserverdb-uat", "azure_secondary_db_id": "/subscriptions/957108b5-005f-4b11-bae1-9e62ba39e857/resourceGroups/MFC-CAE-PCF-PSB/providers/Microsoft.Sql/servers/azugessqlprodcae/databases/indexnowserverdb-uat", "auzure_fog_id": "/subscriptions/957108b5-005f-4b11-bae1-9e62ba39e857/resourceGroups/MFC-CAC-PCF-PSB/providers/Microsoft.Sql/servers/azugessqlprod/failoverGroups/indexnowserverdb-uat-failover" }'
it fails with error message:
Service broker error: Must provide values for all import parameters: azure_primary_db_id, azure_secondary_db_id, azure_fog_id
FAILED
This happens for any DB+FOG we try to subsume.
Broker version: 0.2.3
Brokerpak version: 1.0.0-rc.34
Subsuming non-FOG databases works as expected.
We ran the exact same process for subsuming successfully using prior versions of the broker/brokerpak.
@claassen I am unable to reproduce this issue. What can you share regarding configuration? And how is the server_pair
parameter set (its missing from the cf create-service
example above) - have you set a default?
Our broker uses config.yml with:
mssql_db_server_creds: '{
"primary": {
"admin_username": "gessqladmin",
"admin_password": "[redacted]",
"server_name": "azugessqlprod",
"server_resource_group": "mfc-cac-pcf-psb"
}
}'
mssql_db_fog_server_pair_creds: '{
"pair1": {
"admin_username": "gessqladmin",
"admin_password": "[redacted]",
"primary": {
"server_name": "azugessqlprod",
"resource_group": "mfc-cac-pcf-psb"
},
"secondary": {
"server_name": "azugessqlprodcae",
"resource_group": "mfc-cae-pcf-psb"
}
}
}'
Plan configs look like:
csb-azure-mssql-db-failover-group:
provision:
defaults: '{
"skip_provider_registration": true,
"server_pair": "pair1",
"short_term_retention_days": 35
}'
plans: '[
{
"name": "Basic",
"id": "d219369e-9a0d-481b-b6ae-dc57ea5f204e",
"description": "Basic DTU based plan",
"sku_name": "Basic",
"max_storage_gb": 2,
"short_term_retention_days": 7
},
...
'
I tried also with including 'server_pair' as part of the params in -c when creating subsume instance and it failed with the same error.
Also to add we tested subsume of FOGs previously (older broker version before the refactor for rotating SQL admin credentials) with identical broker configuration and it worked without issues.
So I found the issue. We actually just had a typo in one of the parameter names.