Skip to content

Cmdlets for ClusterTestFailover, ClusterTestFailoverCleanup, ClusterUnplannedFailover, ClusterApplyRecoveryPoint, ClusterCommitFailover - #39

Merged
vidyadharijami merged 2 commits into
dev/vijami/SharedDiskFinalChangesfrom
dev/riyanshpal/SharedDisk
Mar 19, 2025
Merged

vidyadharijami merged 2 commits into
dev/vijami/SharedDiskFinalChangesfrom
dev/riyanshpal/SharedDisk

Conversation

@riyanshpal

Copy link
Copy Markdown

Description

Checklist

  • SHOULD select appropriate branch. Cmdlets from Autorest.PowerShell should go to generation branch.
  • SHOULD make the title of PR clear and informative, and in the present imperative tense.
  • SHOULD update ChangeLog.md file(s) appropriately
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense. Add changelog in description section if PR goes into generation branch.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD have approved design review for the changes in this repository (Microsoft internal only) with following situations
    • Create new module from scratch
    • Create new resource types which are not easy to conform to Azure PowerShell Design Guidelines
    • Create new resource type which name doesn't use module name as prefix
    • Have design question before implementation
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT introduce breaking changes in Az minor release except preview version.
  • SHOULD NOT adjust version of module manually in pull request

@riyanshpal
riyanshpal force-pushed the dev/riyanshpal/SharedDisk branch from 77ba91e to bb860c8 Compare March 17, 2025 10:15
[Parameter(
ParameterSetName = ASRParameterSets.ByObject,
Mandatory = false)]
public List<string> NodeRecoveryPoints { get; set; }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add validation to check nodeRecoveryPoints.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the null check, will add ArmId validations in next release.

}

/// <summary>
/// Starts Unplanned Failover

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cluster Unplanned.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.

}

/// <summary>
/// Starts Test Failover

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cluster Test Failover. Similarly for Input as well

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.

}

/// <summary>
/// Starts Test Failover Cleanup

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change across all calls

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.

ProviderSpecificDetails = new ApplyClusterRecoveryPointProviderSpecificInput()
};

if (LatestProcessedRecoveryPoints && ClusterRecoveryPoint == null)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this. for all parameter inputs across this file

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.

/// <returns> List of node recovery points.</returns>
private List<string> UpdateNodeRecoveryPoints()
{
List<string> clusterProtectedItemIds = ReplicationProtectionCluster.ClusterProtectedItemIds.ToList();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a null check for ReplicationProtectionCluster.ClusterProtectedItemIds

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it is even possible that cluster has no nodes?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we create cluster and then user need to use this cluster for enable protection

node =>
{
List<RecoveryPoint> recoveryPoints = this.RecoveryServicesClient.GetAzureSiteRecoveryRecoveryPoint(
fabricName,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct indentation

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.

Comment on lines +26 to +27
/// <summary>
/// Starts a test failover operation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cluster test failover

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.


List<string> nodeRecoveryPointsList = nodeRecoveryPoints.ToList();
return nodeRecoveryPointsList;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move these to Utilities class as it's used in 3 different cmdlets

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.

{

/// <summary>
/// Starts a unplanned failover operation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cluster unplanned

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.

}

/// <summary>
/// Starts replication protected clustrer unplanned failover.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.



List<string> nodeRecoveryPointsList = nodeRecoveryPoints.ToList();
return nodeRecoveryPointsList;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as other comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updating in next revision.

@riyanshpal
riyanshpal force-pushed the dev/riyanshpal/SharedDisk branch from b2c0fb0 to 898fc48 Compare March 19, 2025 11:56
{
return null;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove as per latest merge

# Start-AzRecoveryServicesAsrApplyClusterRecoveryPoint

## SYNOPSIS
Changes a recovery point for a failed over repliction protection cluster before committing the failover operation

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replication

@vidyadharijami
vidyadharijami merged commit ebc6ed3 into dev/vijami/SharedDiskFinalChanges Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants