Skip to content

Commit 1015236

Browse files
Az.StorageSync HotFix | Turn EnableMIChecking false in Az.StorageSync (#25956)
* Turn EnableMIChecking false in Az.StorageSync * Update ChangeLog.md
1 parent fd06c6e commit 1015236

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/StorageSync/StorageSync.Test/Common/MockSyncServerRegistrationClientBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace Commands.StorageSync.Interop.Clients
3636
/// <seealso cref="Commands.StorageSync.Interop.Interfaces.ISyncServerRegistration" />
3737
public abstract class MockSyncServerRegistrationClientBase : ISyncServerRegistration
3838
{
39-
public bool EnableMIChecking { get; protected set; } = false; // enable it in v19 azure file sync agent
39+
public bool EnableMIChecking { get; protected set; } = false; // enable it in v20 azure file sync agent
4040

4141
/// <summary>
4242
/// The m is disposed

src/StorageSync/StorageSync/ChangeLog.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed the bug in server registration
22+
* Improved the error message for Set-AzStorageSyncServiceIdentity cmdlet
2123

2224
## Version 2.3.0
2325
* Fixed the Register-AzStorageSyncServer with Azure FileSync Agent v17

src/StorageSync/StorageSync/Interop/ManagedIdentity/ServerManagedIdentityProvider.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class ServerManagedIdentityProvider : IServerManagedIdentityProvider , ID
2323

2424
public ServerManagedIdentityProvider(Action<string, EventLevel> traceLog = null)
2525
{
26-
EnableMIChecking = true;
26+
EnableMIChecking = false;
2727
this.TraceLog = new Action<string, EventLevel>((message, e) => {
2828
if (traceLog != null)
2929
{
@@ -43,7 +43,7 @@ public LocalServerType GetServerType(IEcsManagement ecsManagement)
4343
{
4444
TraceLog($"{nameof(EnableMIChecking)} is {EnableMIChecking}.", EventLevel.Informational);
4545

46-
// TODO: this should be removed once MI is fullly functional
46+
// TODO: this should be removed once MI is fully functional
4747
if (!EnableMIChecking)
4848
{
4949
return LocalServerType.HybridServer;

src/StorageSync/StorageSync/StorageSyncService/SetStorageSyncServiceIdentityCommand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public override void ExecuteCmdlet()
189189

190190
if(candidateServersLookup.Count == 0)
191191
{
192-
throw new PSArgumentException("No server found which is available for migration.");
192+
throw new PSArgumentException("No server found which can be configured to use a managed identity.");
193193
}
194194

195195
StorageSyncClientWrapper.VerboseLogger.Invoke($"Found {candidateServersLookup.Count} servers out of {registeredServers.Count(s => s.ServerRole != ServerRoleType.ClusterName.ToString())} total servers to migrate");

0 commit comments

Comments
 (0)