This section compares the pre/post-upgrade operational state using the CLI.

For software upgrade operations, the Avi Load Balancer Controller provides visibility into the pre-operation and post-operation states of the system, summarizing and highlighting the significant differences in the state or health of the system caused by the performed operation.

When performing a software upgrade, the Avi Load Balancer Controller will take an operational state snapshot pre-upgrade and another post-upgrade to allow the admin to perform a quick validation of the current state of their environment compared to the state before the upgrade.

The operational snapshots are taken for the following objects:

  • Virtual Services

  • Service Engines

  • Pools

  • GSLB Services

The operational snapshots are taken during the following software operations:

  • Upgrade

  • Patch

  • Rollback Patch

Compare Pre/Post Upgrade Operational State using the CLI

The following are the steps to compare pre/ post upgrade operational state using the CLI:

  1. Check if all the state-diff operations exists in the system.

     > show statediff
     +----------------------------------------------------+----------------+
     | Name                                               | Status         |
     +----------------------------------------------------+----------------+
     | upgrade_controller_fitb_2021-06-22-08:20:40.957288 | FB_IN_COMPLETED|
     +----------------------------------------------------+----------------+
  2. Check if the summarized state changes for a particular operation from the above listed operations.

    > 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              |
     +----------------+----------------+
  3. Check for the detailed state changes for all entities.

    > 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       |
     |               |                                                     |                                                |                                                |
     +---------------+-----------------------------------------------------+------------------------------------------------+------------------------------------------------+
  4. Check for the summary of state changes for all the objects of a particular type (virtual service in this example).

     > 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 |
     +------+-----------------------------------------------------+--------------+----------------------+
  5. Check for the detailed state changes for desired objects.

    > 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 |
     |        |                                                     |                                          |                                          |
     +--------+-----------------------------------------------------+------------------------------------------+------------------------------------------+
  6. Check for the state changes for all objects under a particular serviceenginegroup(parent obj) object.

    > 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 |
     |        |                                                     |                                          |                                          |
     +--------+-----------------------------------------------------+------------------------------------------+------------------------------------------+
  7. Clean up the changes, if required, using the following command.

     > delete statediff upgrade_controller_fitb_2021-06-22-08:20:40.957288