Skip to content

Commit 1952665

Browse files
authored
[RDBMS] az postgres flexible-server fabric-mirroring: BUG FIX, Space separate list of databases was only picking up first name (#31000)
* add to ignore * Fix bug when updating cmk geo * Revert "add to ignore" This reverts commit ee1192c. * Updates to not create password if pasword is disabled * Revert "Updates to not create password if pasword is disabled" This reverts commit 3b1d20b. * bug fix for fabric mirroring
1 parent 3a2c33a commit 1952665

2 files changed

Lines changed: 368 additions & 520 deletions

File tree

src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_postgres.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ def flexible_server_fabric_mirroring_start(cmd, client, resource_group_name, ser
15371537
# disable fabric mirroring on HA server
15381538
raise CLIError("Fabric mirroring is not supported on servers with high availability enabled.")
15391539

1540-
databases = ','.join(database_names[0].split())
1540+
databases = ','.join(database_names)
15411541
user_confirmation("Are you sure you want to prepare and enable your server" +
15421542
" '{0}' in resource group '{1}' for mirroring of databases '{2}'.".format(server_name, resource_group_name, databases) +
15431543
" This requires restart.", yes=yes)
@@ -1546,10 +1546,6 @@ def flexible_server_fabric_mirroring_start(cmd, client, resource_group_name, ser
15461546
logger.warning('Enabling system assigned managed identity on the server.')
15471547
flexible_server_identity_update(cmd, flexible_servers_client, resource_group_name, server_name, 'Enabled')
15481548

1549-
logger.warning('Restarting server.')
1550-
parameters = postgresql_flexibleservers.models.RestartParameter(restart_with_failover=False)
1551-
resolve_poller(flexible_servers_client.begin_restart(resource_group_name, server_name, parameters), cmd.cli_ctx, 'PostgreSQL Server Restart')
1552-
15531549
logger.warning('Updating necessary server parameters.')
15541550
source = "user-override"
15551551
configuration_name = "azure.fabric_mirror_enabled"
@@ -1593,7 +1589,7 @@ def flexible_server_fabric_mirroring_update_databases(cmd, client, resource_grou
15931589
# disable fabric mirroring on HA server
15941590
raise CLIError("Fabric mirroring is not supported on servers with high availability enabled.")
15951591

1596-
databases = ','.join(database_names[0].split())
1592+
databases = ','.join(database_names)
15971593
user_confirmation("Are you sure for server '{0}' in resource group '{1}' you want to update the databases being mirrored to be '{2}'"
15981594
.format(server_name, resource_group_name, databases), yes=yes)
15991595

0 commit comments

Comments
 (0)