Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RDBMS] az postgres flexible-server fabric-mirroring: BUG FIX, Space separate list of databases was only picking up first name #31000

Merged
merged 11 commits into from
Mar 12, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ def flexible_server_fabric_mirroring_start(cmd, client, resource_group_name, ser
# disable fabric mirroring on HA server
raise CLIError("Fabric mirroring is not supported on servers with high availability enabled.")

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

logger.warning('Restarting server.')
parameters = postgresql_flexibleservers.models.RestartParameter(restart_with_failover=False)
resolve_poller(flexible_servers_client.begin_restart(resource_group_name, server_name, parameters), cmd.cli_ctx, 'PostgreSQL Server Restart')

logger.warning('Updating necessary server parameters.')
source = "user-override"
configuration_name = "azure.fabric_mirror_enabled"
Expand Down Expand Up @@ -1593,7 +1589,7 @@ def flexible_server_fabric_mirroring_update_databases(cmd, client, resource_grou
# disable fabric mirroring on HA server
raise CLIError("Fabric mirroring is not supported on servers with high availability enabled.")

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

Expand Down
Loading