本节介绍了如何使用 CLI 比较升级前/后的运行状态。
对于软件升级操作,NSX Advanced Load Balancer 控制器 可显示系统的操作前和操作后状态,其中汇总并突出显示了执行的操作所导致的系统状态或运行状况的显著差异。
执行软件升级时,NSX Advanced Load Balancer 控制器 将在升级前创建运行状态快照,并在升级后再创建一个快照,以便管理员快速验证其环境的当前状态(与升级前的状态相比)。
将为以下对象创建运行快照:
虚拟服务
服务引擎
池
GSLB 服务
运行快照是在以下软件操作期间创建的:
升级
修补
回滚修补程序
使用 CLI 比较升级前/后的运行状态
以下是使用 CLI 比较升级前/后运行状态的步骤:
检查系统中是否存在所有状态差异操作。
> show statediff +----------------------------------------------------+----------------+ | Name | Status | +----------------------------------------------------+----------------+ | upgrade_controller_fitb_2021-06-22-08:20:40.957288 | FB_IN_COMPLETED| +----------------------------------------------------+----------------+
检查上述操作中特定操作的汇总状态是否发生了更改。
> show statediff upgrade_controller_fitb_2021-06-22-08:20:40.957288 +----------------+----------------+ | Object | States Changed | +----------------+----------------+ | SERVICEENGINE | 0 | | VIRTUALSERVICE | 1 | // Indicates 1 VS changed state for the queried operation | GSLBSERVICE | 0 | | POOL | 0 | +----------------+----------------+
检查所有实体的详细状态更改。
> show statediff upgrade_controller_fitb_2021-06-22-08:20:40.957288 filter detail +---------------+-----------------------------------------------------+------------------------------------------------+------------------------------------------------+ | Name | Uuid | PreSnapshot | PostSnapshot | +---------------+-----------------------------------------------------+------------------------------------------------+------------------------------------------------+ | 10.79.168.138 | se-005056812adc | | | | | | state: OPER_UP, | state: OPER_UP, | | | | reason: [ | reason: [ | | | | Service Engine connected to controller | Service Engine connected to controller | | | | ], | ], | | | | reason_code: 0, | reason_code: 0, | | | | last_changed_time: 21-06-22-08:16:02 | last_changed_time: 21-06-22-08:16:02 | | | | | | | vs-2 | virtualservice-7e22eec4-fc6b-40d9-9306-84259f54948a | | | | | | state: OPER_UP, | state: OPER_UP, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | | vs-1 | virtualservice-1aa470fa-e43f-47f3-b720-0836bf87bad8 | | | | | | state: OPER_UP, | state: OPER_DOWN, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | | pool-1 | pool-fb65d17e-c28a-413c-a44e-17bdb705fd1b | | | | | | state: OPER_UP, | state: OPER_UP, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | | gslb-svc1 | gslbservice-b3fed408-fa96-40a0-b240-df8e8c524dfb | | | | | | state: OPER_UP, | state: OPER_UP, | | | | last_changed_time: 21-06-12-17:55:33 | last_changed_time: 21-06-12-17:55:33 | | | | | | +---------------+-----------------------------------------------------+------------------------------------------------+------------------------------------------------+
检查特定类型的所有对象(在本例中为虚拟服务)的状态更改摘要。
> show statediff upgrade_controller_fitb_2021-06-22-08:20:40.957288 filter obj_type fb_virtualservice +------+-----------------------------------------------------+--------------+----------------------+ | Name | Uuid | State Change | Summary | +------+-----------------------------------------------------+--------------+----------------------+ | vs-2 | virtualservice-7e22eec4-fc6b-40d9-9306-84259f54948a | NO | - | | vs-1 | virtualservice-1aa470fa-e43f-47f3-b720-0836bf87bad8 | YES | OPER_UP -> OPER_DOWN | +------+-----------------------------------------------------+--------------+----------------------+
检查所需对象的详细状态更改。
> show statediff upgrade_controller_fitb_2021-06-22-08:20:40.957288 filter virtualservice vs-1,vs-2 pool pool-1 +--------+-----------------------------------------------------+------------------------------------------+------------------------------------------+ | Name | Uuid | PreSnapshot | PostSnapshot | +--------+-----------------------------------------------------+------------------------------------------+------------------------------------------+ | vs-2 | virtualservice-7e22eec4-fc6b-40d9-9306-84259f54948a | | | | | | state: OPER_UP, | state: OPER_UP, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | | vs-1 | virtualservice-1aa470fa-e43f-47f3-b720-0836bf87bad8 | | | | | | state: OPER_UP, | state: OPER_DOWN, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | | pool-1 | pool-fb65d17e-c28a-413c-a44e-17bdb705fd1b | | | | | | state: OPER_UP, | state: OPER_UP, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | +--------+-----------------------------------------------------+------------------------------------------+------------------------------------------+
检查特定 serviceenginegroup(parent obj) 对象下的所有对象的状态更改。
> show statediff upgrade_controller_fitb_2021-06-22-08:20:40.957288 filter virtualservice vs-1,vs-2 pool pool-1 +--------+-----------------------------------------------------+------------------------------------------+------------------------------------------+ | Name | Uuid | PreSnapshot | PostSnapshot | +--------+-----------------------------------------------------+------------------------------------------+------------------------------------------+ | vs-2 | virtualservice-7e22eec4-fc6b-40d9-9306-84259f54948a | | | | | | state: OPER_UP, | state: OPER_UP, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | | vs-1 | virtualservice-1aa470fa-e43f-47f3-b720-0836bf87bad8 | | | | | | state: OPER_UP, | state: OPER_DOWN, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | | pool-1 | pool-fb65d17e-c28a-413c-a44e-17bdb705fd1b | | | | | | state: OPER_UP, | state: OPER_UP, | | | | last_changed_time: 21-06-12-17:45:27 | last_changed_time: 21-06-12-17:45:27 | | | | | | +--------+-----------------------------------------------------+------------------------------------------+------------------------------------------+
如果需要,使用以下命令清理更改。
> delete statediff upgrade_controller_fitb_2021-06-22-08:20:40.957288