Skip to content

Commit

Permalink
[RDBMS] az postgres flexible-server fabric-mirroring: BUG FIX, Spac…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
nasc17 authored Mar 12, 2025
1 parent 3a2c33a commit 1952665
Show file tree
Hide file tree
Showing 2 changed files with 368 additions and 520 deletions.
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

0 comments on commit 1952665

Please sign in to comment.