Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: Even in case of No-Op for upgrade_retry, the device sends an Info message to the controller to update its baseos_upgrade_retry_.counter.

EVE Support

  1. Eve Needs to store the status of each partition ( Success / Failure ) - This is done currently
  2. If the currently configured image is in FAILED state in the other partition, retry the image upgrade. ( Intended Use Case )ELSE Do nothing. Just update the baseos_upgrade.counter != local_baseos_upgrade_counter in the Info message and send an Info message to the Controller.

One way to think about this is:

  1. :
    1.  Initiate
    If the Counter is different from what is stored - Initiate
    1. Upgrade State Machine.
    2. Let the State Machine determine if an upgrade is needed or not
      1. For Example, the configured image is already the active image
      2. An upgrade is already in progress.
    3. BaseOs Upgrade Statemachine update the local_baseos_upgrade_counter at the end of the StateMachine sequence.

Another way to think about this - the end result must be:

  1. If Configured Active Image == Currently running image - do nothing.

...

  1. Just update local_baseos_upgrade_counter
  2. If Upgrade currently in progress:
    1. If Target image == Currently configured image - wait for upgrade to complete and update local_baseos_upgrade_counter
    2. If Target Image != Currently Configured Image - Abort upgrade if possible. Restart Upgrade process to upgrade to Currently Configured Image.
  3. If Currently Configured Image in Error state - restart the upgrade process.

Note: Currently - Eve automatically retries Download / verify / install errors

...

  1. Device Currently running 6.1.0 ( Partition IMGA ) ( baseos_upgrade_retry_.counter = 1 )
  2. Controller configured 6.4.0 as the active image. ( baseos_upgrade_retry_.counter = 1 )
  3. Eve receives new config, downloads and verifies the Image, and starts upgrading to 6.4.0 ( IMGB)
  4. Even boots up 6.4.0 and enters the Testing Phase.
  5. Testing for 6.4.0 Fails and Eve Falls back to running 6.1.0
  6. User triggers retry ( baseos_upgrade_retry_.counter = 2 )
  7. As indicated in Control Flow section, this triggers booting into 6.4.0 again

...

Currently, BaseOsConfig is an array ( We limit it to 2 entries ). Instead, with volume support, this can be limited to just a reference to a volume. the volume and their details are specified separately. BaseOsConfig will just point to the volume reference for the Active Baseos Version. It might download multiple volumes ( images ), but there can only be ONE ACTIVE EVE IMAGE VOLUME.

BaseOs Using Volumes with Current Partition Scheme:

...