Skip to content

Commit 0e89582

Browse files
committed
Update howto-use-commit-workflow-v2.md
1 parent 256eb6e commit 0e89582

File tree

1 file changed

+53
-14
lines changed

1 file changed

+53
-14
lines changed

articles/operator-nexus/howto-use-commit-workflow-v2.md

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.custom: template-how-to, devx-track-azurecli
1111

1212
# How to use Commit Workflow v2 in Azure Operator Nexus
1313

14-
The **Commit Workflow v2** ensures that device-impacting changes to a Network Fabric instance are explicitly acknowledged and committed before being applied to the underlying infrastructure. This structured workflow increases reliability and control over configuration changes.
14+
This article describes how to use Commit Workflow Version 2 (Commit V2) in Azure Operator Nexus to safely stage, review, commit, or discard configuration changes across supported resources. Commit V2 provides a more efficient and robust method of applying changes to Nexus fabric resources compared to the earlier commit model.
1515

1616
## Prerequisites
1717

@@ -27,14 +27,39 @@ The **Commit Workflow v2** ensures that device-impacting changes to a Network Fa
2727

2828
## Commit Workflow v2 overview
2929

30-
Any `patch` operation on parent resources or `Create`/`Update`/`Delete` (CUD) operation on connected child resources now requires an explicit commit step. Changes are **batched** until you lock, validate (optional), and commit them.
30+
Commit V2 enables you to update supported resources in a draft state, validate configuration changes, view configuration differences, and explicitly commit or discard the changes. It ensures atomicity, operational control, and improved user experience for complex network fabric operations.
3131

32-
### Step 1: Update resources
32+
### Benefits of Commit V2
3333

34-
Make patch or CUD operations via Azure CLI, Portal, or ARM template.
35-
Once these changes are made, the fabric's configuration state changes to `Accepted (Pending Commit)`.
34+
- Faster commit operations: Reduces the time to apply configuration changes.
3635

37-
#### Example scenarios
36+
- Review pending configuration: View and validate configuration differences before committing.
37+
38+
- Discard commit batch: Revert staged changes if necessary.
39+
40+
- Lock configuration: Prevent conflicting changes during staging and review.
41+
42+
- Foundation for advanced scenarios: Enables A/B commit strategy and multi-user sessions in future releases.
43+
44+
### Workflow summary
45+
46+
The Commit V2 workflow includes the following steps:
47+
48+
- Update supported resources in draft mode using PATCH operations.
49+
50+
- Lock the fabric configuration to review or discard staged changes.
51+
52+
- Optionally, view configuration differences for each device.
53+
54+
- Either commit or discard the changes.
55+
56+
- After commit/discard, the fabric and all related resources return to a Provisioned state.
57+
58+
### Step 1: Update resources in draft mode
59+
60+
Resources can be updated using PATCH operations that leave the resource in a draft (ConfigurationState: `Accepted`) until explicitly committed. These changes are not applied to the data plane until committed.
61+
62+
#### Example scenario
3863

3964
* Create a new **Route Policy** and attach it to **Internal Network 1**
4065

@@ -43,7 +68,9 @@ Once these changes are made, the fabric's configuration state changes to `Accept
4368
All these changes are **batched**, but **not applied** to devices yet.
4469

4570

46-
### Step 2: Lock Configuration (Mandatory)
71+
### Step 2: Lock fabric configuration
72+
73+
Before you can view the configuration diff or discard the commit, the fabric must be locked in configuration mode.
4774

4875
Lock the configuration to signal that all intended updates are completed. After this lock, **no further updates** can be made to any fabric-related resources until you unlock.
4976

@@ -57,17 +84,21 @@ az networkfabric fabric lock-fabric \
5784
--resource-group "example-rg"
5885
```
5986

60-
- Successful execution transitions the fabric to a **locked state**.
61-
62-
- Check CLI output for success or failure status.
63-
87+
> [!Note]
88+
> Ensure fabric configuration state is Accepted.<br>
89+
> Fabric is not under maintenance due to unrelated (non-commit) operations.<br>
90+
> Network Fabric version is >= 5.0.1.<br>
91+
> Fabric is in ProvisioningState: Succeeded.<br>
6492
6593
### Step 3: Validate updates (Optional but recommended)
6694

95+
Another key functionality commit V2 provides is to view the pending commit configuration and last committed configuration for each device (except NPB devices) so that users can compare them to validate the intended configuration. In case of any discrepancy, users can unlock the fabric, make necessary change, lock fabric, review pending commit followed by commit operation.
96+
6797
Validate the configuration using the `view-device-configuration` post-action. This step provides insight into the expected configuration outcomes.
6898

6999
> [!Important]
70-
> BYOS must be configured on the Network Fabric.
100+
> The fabric must be locked in configuration mode.<br>
101+
> [BYOS](/articles/operator-nexus/howto-configure-bring-your-own-storage-network-fabric.md) must be configured on the Network Fabric.
71102
72103
#### Azure CLI Command
73104

@@ -78,19 +109,27 @@ az networkfabric fabric view-device-configuration \
78109
--resource-group "example-rg"
79110
```
80111

81-
- **Pre-Device Changes**: Current config for all devices (CE, TOR, Management Switches)
112+
#### Configuration diff location
113+
114+
Configuration diff files are stored in the customer-provided storage account in the following format:
115+
116+
```Location
117+
https://<storageAccountName>.blob.core.windows.net/<NF_name>/CommitOperations/DeviceConfigDiff/<CommitBatchId>
118+
```
82119

83-
- **Post-Device Changes**: Preview of what will be applied after commit
120+
Additionally, to retrieve the current CommitBatchId, perform a GET request on the fabric resource using API version `2024-06-15-preview` or above.
84121

85122
### Step 3a: Discard commit batch (Optional)
86123

124+
Commit Discard is a POST action on NetworkFabric, allowed before a commit is performed. This operation allows a user to revert the changes made to the resources via PATCH operations for a specific commit session.
87125
After validating with ViewDeviceConfiguration, users may choose to discard pending configuration updates if issues are found. This operation restores the ARM resource state to its last known good configuration and resets the fabric state from Accepted & Locked to Succeeded.
88126

89127

90128
```Azure CLI
91129
az networkfabric fabric discard-commit-batch \
92130
--resource-group "example-rg" \
93131
--network-fabric-name "example-fabric"
132+
--commit-id "commit-guid"
94133
```
95134

96135
> [!Note]

0 commit comments

Comments
 (0)