您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

ChaosParametersChaosParameters

定义所有参数以配置混乱的运行。Defines all the parameters to configure a Chaos run.

属性Properties

名称Name 类型Type 必须Required
TimeToRunInSeconds stringstring No
MaxClusterStabilizationTimeoutInSeconds 整数 (int64) integer (int64) No
MaxConcurrentFaults 整数 (int64) integer (int64) No
EnableMoveReplicaFaults booleanboolean No
WaitTimeBetweenFaultsInSeconds 整数 (int64) integer (int64) No
WaitTimeBetweenIterationsInSeconds 整数 (int64) integer (int64) No
ClusterHealthPolicy ClusterHealthPolicyClusterHealthPolicy No
Context ChaosContextChaosContext No
ChaosTargetFilter ChaosTargetFilterChaosTargetFilter No

TimeToRunInSeconds

类型 : stringType : string
是否 必需 :否Required : No
默认4294967295Default : 4294967295

Chaos 在自动停止之前要运行的总时间(以秒为单位)。Total time (in seconds) for which Chaos will run before automatically stopping. 最大允许值为 4,294,967,295 (System.UInt32.MaxValue)。The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue).


MaxClusterStabilizationTimeoutInSeconds

类型 :整数 (int64) Type : integer (int64)
是否 必需 :否Required : No
默认60Default : 60
InclusiveMaximum4294967295InclusiveMaximum : 4294967295
InclusiveMinimum0InclusiveMinimum : 0

等待所有群集实体变稳定和正常运行的最长时间。The maximum amount of time to wait for all cluster entities to become stable and healthy. 在每次迭代开始时它的验证群集实体的运行状况和混沌在迭代中执行。Chaos executes in iterations and at the start of each iteration it validates the health of cluster entities. 在验证期间是否群集实体不稳定状态并且正常内 MaxClusterStabilizationTimeoutInSeconds,混沌会生成验证失败的事件。During validation if a cluster entity is not stable and healthy within MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event.


MaxConcurrentFaults

类型 :整数 (int64) Type : integer (int64)
是否 必需 :否Required : No
默认1Default : 1
InclusiveMaximum4294967295InclusiveMaximum : 4294967295
InclusiveMinimum0InclusiveMinimum : 0

MaxConcurrentFaults 是每次迭代引发的最大并发故障数。MaxConcurrentFaults is the maximum number of concurrent faults induced per iteration. 混沌执行在迭代中,并验证阶段用分隔两个连续的迭代。Chaos executes in iterations and two consecutive iterations are separated by a validation phase. 并发性越高,故障注入越简单,导致引入更复杂的状态序列来发现 bug。The higher the concurrency, the more aggressive the injection of faults, leading to inducing more complex series of states to uncover bugs. 建议是以开头的值为 2 或 3 并向上移动时请务必小心。The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up.


EnableMoveReplicaFaults

类型 :布尔值Type : boolean
是否 必需 :否Required : No
默认trueDefault : true

启用或禁用移动主节点和移动辅助故障。Enables or disables the move primary and move secondary faults.


WaitTimeBetweenFaultsInSeconds

类型 :整数 (int64) Type : integer (int64)
是否 必需 :否Required : No
默认20Default : 20
InclusiveMaximum4294967295InclusiveMaximum : 4294967295
InclusiveMinimum0InclusiveMinimum : 0

单次迭代中发生连续错误的间隔等待时间(以秒为单位)。Wait time (in seconds) between consecutive faults within a single iteration. 值越大越低错误和更简单之间重叠的状态的序列转换群集内通过。The larger the value, the lower the overlapping between faults and the simpler the sequence of state transitions that the cluster goes through. 建议是从开始向上移动时的 1 和 5 和练习请小心之间的值。The recommendation is to start with a value between 1 and 5 and exercise caution while moving up.


WaitTimeBetweenIterationsInSeconds

类型 :整数 (int64) Type : integer (int64)
是否 必需 :否Required : No
默认30Default : 30
InclusiveMaximum4294967295InclusiveMaximum : 4294967295
InclusiveMinimum0InclusiveMinimum : 0

Chaos 的每两次连续迭代的间隔时间(以秒为单位)。Time-separation (in seconds) between two consecutive iterations of Chaos. 值越大,故障注入率越低。The larger the value, the lower the fault injection rate.


ClusterHealthPolicy

类型ClusterHealthPolicyType : ClusterHealthPolicy
是否 必需 :否Required : No

传入的群集运行状况策略用于在混乱迭代之间验证群集的运行状况。Passed-in cluster health policy is used to validate health of the cluster in between Chaos iterations. 如果群集运行状况错误,或者在执行错误的过程中出现意外的异常,则要向群集提供一段时间来留出,将在下一次运行状况检查之前等待30分钟。If the cluster health is in error or if an unexpected exception happens during fault execution--to provide the cluster with some time to recuperate--Chaos will wait for 30 minutes before the next health-check.


Context

类型ChaosContextType : ChaosContext
是否 必需 :否Required : No

描述一个映射,该映射是 (字符串,string) 类型键值对的集合。Describes a map, which is a collection of (string, string) type key-value pairs. 此映射可用于记录混沌测试的相关运行信息。The map can be used to record information about the Chaos run. 这种键值对不能超过 100 个,并且每个字符串(键或值)的长度不能超过 4095 个字符。There cannot be more than 100 such pairs and each string (key or value) can be at most 4095 characters long. 此映射由混沌测试运行的启动程序设置为根据需要存储特定运行的相关上下文。This map is set by the starter of the Chaos run to optionally store the context about the specific run.


ChaosTargetFilter

类型ChaosTargetFilterType : ChaosTargetFilter
是否 必需 :否Required : No

用于应对混乱错误的群集实体的列表。List of cluster entities to target for Chaos faults. 此筛选器可指定混沌测试故障仅面向特定节点类型或特定应用程序实例。This filter can be used to target Chaos faults only to certain node types or only to certain application instances. 如未使用 ChaosTargetFilter,混沌测试会使所有群集实体故障。If ChaosTargetFilter is not used, Chaos faults all cluster entities. 如果使用 ChaosTargetFilter,混沌测试仅使满足 ChaosTargetFilter 规定的实体故障。If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter specification.