背景
CVM 网络重复故障是一个较为罕见但仍然可能出现的问题。网络重复故障可能是由硬件故障、网络配置不当、网络设备故障等原因引起,会导致 CVM 在网络通信过程中出现重复的数据包传输,从而影响网络性能,增加网络拥堵,甚至导致业务运行出现异常。
为了提高 CVM 的网络可靠性和稳定性,需要进行网络重复故障动作演练。通过演练,可以验证系统在网络重复的情况下是否能够正常运行,提前暴露在网络重复故障场景下的一系列问题,以便优化系统架构和做好应急预案。
演练实施
步骤一:演练准备
准备若干可以演练的 CVM 实例。
步骤二:演练编排
1. 查看故障注入前的网络状态。使用 ping 命令向目标机器发送报文,可以看到,没有相同序列号的报文,说明当前不存在网络重复问题。![](https://qcloudimg.tencent-cloud.cn/image/document/687e1a76c357d505c1fae3f542ea21b1.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/687e1a76c357d505c1fae3f542ea21b1.png)
2. 单击新建演练,填写演练信息,添加目标 CVM 实例。![](https://qcloudimg.tencent-cloud.cn/image/document/5e08cb41102cd315a5e76e01b314564d.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/5e08cb41102cd315a5e76e01b314564d.png)
3. 点击立即添加,选择网络资源,单击主机内网络重复,然后单击下一步。
![](https://qcloudimg.tencent-cloud.cn/image/document/8f43b9f083e7cdd00324f5706ee44e64.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/8f43b9f083e7cdd00324f5706ee44e64.png)
4. 配置故障动作参数,然后单击确定。
![](https://qcloudimg.tencent-cloud.cn/image/document/acd06118dd499bb1d5f0b1955a48bf91.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/acd06118dd499bb1d5f0b1955a48bf91.png)
5. 动作参数配置完成之后,单击下一步。根据实际情况配置护栏策略和监控指标,最后单击提交,完成演练创建。
![](https://qcloudimg.tencent-cloud.cn/image/document/3bfebbe4317e24a1ceb524a7a4aa963b.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/3bfebbe4317e24a1ceb524a7a4aa963b.png)
步骤三:执行演练
1. 进入演练详情,单击前往动作组执行。
![](https://qcloudimg.tencent-cloud.cn/image/document/9836c601f034e939bc88ccb0fa929d81.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/9836c601f034e939bc88ccb0fa929d81.png)
2. 点击执行,开始演练。![](https://qcloudimg.tencent-cloud.cn/image/document/82aedd3a3570ca8b013cae5963b81a52.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/82aedd3a3570ca8b013cae5963b81a52.png)
3. 点击动作卡片,查看动作执行结果详情。![](https://qcloudimg.tencent-cloud.cn/image/document/93798f7b33112e9d6fb583df2c4149cf.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/93798f7b33112e9d6fb583df2c4149cf.png)
4. 查看故障注入后主机网络状态。再次 Ping 目标机器时可以发现,返回的网络包已出现重复。![](https://qcloudimg.tencent-cloud.cn/image/document/3be236e4f5bfd59c187b34f47e8d3878.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/3be236e4f5bfd59c187b34f47e8d3878.png)
5. 执行恢复动作,查看恢复动作详情。![](https://qcloudimg.tencent-cloud.cn/image/document/0566c4bc25ed16da891ad439db605f86.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/0566c4bc25ed16da891ad439db605f86.png)
6. 查看故障恢复效果。再次 Ping 目标机器可以看到,网络传输恢复正常,故障已经清除。![](https://qcloudimg.tencent-cloud.cn/image/document/25b7cacfc6654c0bd2fb4cb20c2dc400.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/25b7cacfc6654c0bd2fb4cb20c2dc400.png)