Skip to content

Commit 18ce69d

Browse files
committed
bug fix for fabric mirroring
1 parent 2e0117c commit 18ce69d

File tree

2 files changed

+368
-520
lines changed

2 files changed

+368
-520
lines changed

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

+2-6
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)