Skip to content

Commit 11e9425

Browse files
authored
{Elastic-SAN} az elastic-san volume-group create/update: Add warning for CRC data integration check (#8910)
* Add warning for CRC data integration check * update to preview version
1 parent 8e19b75 commit 11e9425

8 files changed

+1402
-1740
lines changed

src/elastic-san/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
33
Release History
44
===============
5+
1.3.1b1
6+
++++++
7+
* `az elastic-san volume-group create/update`: Add warning for CRC data integration check
8+
59
1.3.0
610
++++++
711
* `az elastic-san create`: Make `--base-size-tib` and `--extended-capacity-size-tib` optional with default value of 20 and 0

src/elastic-san/azext_elastic_san/custom.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,28 @@ def pre_operations(self):
4242
args.identity["user_assigned_identities"] = {
4343
uai_id: {}}
4444
del args.identity.user_assigned_identity_id
45+
if has_value(args.EnforceDataIntegrityCheckForIscsi) and args.EnforceDataIntegrityCheckForIscsi:
46+
logger.warning("CRC protection feature is not supported for Azure VMware solution (AVS) yet. "
47+
"Do not enable this flag if you plan to use the volumes within this volume group as "
48+
"datastores for AVS, as the datastore creation will fail. For Azure Virtual Machines, "
49+
"enabling this flag would need CRC32C to be set on iSCSI header and data digests on the "
50+
"client for all the connections from the client to the volumes in this volume group. "
51+
"You can achieve that by disconnecting the volumes from the client and reconnecting using "
52+
"multi-session scripts generated in portal connect flow or from documentation, which "
53+
"contain steps to set CRC32C on header and data digests. Do not enable CRC protection on "
54+
"the volume group if you are using Fedora or its downstream Linux distributions such as "
55+
"RHEL, CentOS etc. as data digests are not supported on them. "
56+
"If you enable this flag for those distributions, connectivity to the volumes will fail. "
57+
"Learn more: https://go.microsoft.com/fwlink/?LinkId=2294733&id=Microsoft_Azure_ElasticSan")
58+
else:
59+
logger.warning("CRC protection is recommended if you plan to connect the volumes in this volume group to "
60+
"Azure Virtual Machines. Do not enable it if you are using Fedora or its downstream Linux "
61+
"distributions such as RHEL, CentOS etc. on your VM, as data digests are not supported on "
62+
"them. If you enable this flag for those distributions, connectivity to the volumes will "
63+
"fail. Also, do not enable this flag if you plan to use the volumes within this volume "
64+
"group as datastores for Azure VMware Solution (AVS), as this feature is not supported for "
65+
"AVS yet and the datastore creation will fail. "
66+
"Learn more: https://go.microsoft.com/fwlink/?LinkId=2294733&id=Microsoft_Azure_ElasticSan")
4567

4668

4769
class VolumeGroupUpdate(_VolumeGroupUpdate):
@@ -69,6 +91,28 @@ def pre_operations(self):
6991
args.identity["user_assigned_identities"] = {
7092
uai_id: {}}
7193
del args.identity.user_assigned_identity_id
94+
if has_value(args.EnforceDataIntegrityCheckForIscsi) and args.EnforceDataIntegrityCheckForIscsi:
95+
logger.warning("CRC protection feature is not supported for Azure VMware solution (AVS) yet. "
96+
"Do not enable this flag if you plan to use the volumes within this volume group as "
97+
"datastores for AVS, as the datastore creation will fail. For Azure Virtual Machines, "
98+
"enabling this flag would need CRC32C to be set on iSCSI header and data digests on the "
99+
"client for all the connections from the client to the volumes in this volume group. "
100+
"You can achieve that by disconnecting the volumes from the client and reconnecting using "
101+
"multi-session scripts generated in portal connect flow or from documentation, which "
102+
"contain steps to set CRC32C on header and data digests. Do not enable CRC protection on "
103+
"the volume group if you are using Fedora or its downstream Linux distributions such as "
104+
"RHEL, CentOS etc. as data digests are not supported on them. "
105+
"If you enable this flag for those distributions, connectivity to the volumes will fail. "
106+
"Learn more: https://go.microsoft.com/fwlink/?LinkId=2294733&id=Microsoft_Azure_ElasticSan")
107+
else:
108+
logger.warning("CRC protection is recommended if you plan to connect the volumes in this volume group to "
109+
"Azure Virtual Machines. Do not enable it if you are using Fedora or its downstream Linux "
110+
"distributions such as RHEL, CentOS etc. on your VM, as data digests are not supported on "
111+
"them. If you enable this flag for those distributions, connectivity to the volumes will "
112+
"fail. Also, do not enable this flag if you plan to use the volumes within this volume "
113+
"group as datastores for Azure VMware Solution (AVS), as this feature is not supported for "
114+
"AVS yet and the datastore creation will fail. "
115+
"Learn more: https://go.microsoft.com/fwlink/?LinkId=2294733&id=Microsoft_Azure_ElasticSan")
72116

73117
def pre_instance_update(self, instance):
74118
from azure.cli.core.aaz import has_value

0 commit comments

Comments
 (0)