Arista EOS Rollback

Arista EOS Rollback

Certified
Enterprise Edition

Roll an EOS switch back to its previous image

Checks that the image booted before the upgrade (from the snapshot) is still on flash, runs boot system on it, saves the configuration, then reloads the switch with the same once-only guard as Reload: nothing is sent when the switch already runs the snapshot version (alreadyReloaded). Follow it with WaitForReturn, only when alreadyReloaded is false, passing previousBootupTimestamp: "{{ outputs.<task id>.bootupTimestamp }}", and a POST Check, which must find the previous version.

Any failure raises RollbackFailed, there is no automatic second attempt. Do not set a task level retry.

yaml
type: io.kestra.plugin.ee.arista.eos.Rollback

Roll back to the image captured in the pre-check snapshot

yaml
id: arista_rollback
namespace: company.network

inputs:
  - id: snapshot
    type: URI

tasks:
  - id: rollback
    type: io.kestra.plugin.ee.arista.eos.Rollback
    host: leaf1.lab.example.com
    username: "{{ secret('ARISTA_USERNAME') }}"
    password: "{{ secret('ARISTA_PASSWORD') }}"
    snapshot: "{{ inputs.snapshot }}"

  - id: wait_gate
    type: io.kestra.plugin.core.flow.If
    condition: "{{ outputs.rollback.alreadyReloaded == false }}"
    then:
      - id: wait
        type: io.kestra.plugin.ee.arista.eos.WaitForReturn
        host: leaf1.lab.example.com
        username: "{{ secret('ARISTA_USERNAME') }}"
        password: "{{ secret('ARISTA_PASSWORD') }}"
        previousBootupTimestamp: "{{ outputs.rollback.bootupTimestamp }}"

  - id: post
    type: io.kestra.plugin.ee.arista.eos.Check
    host: leaf1.lab.example.com
    username: "{{ secret('ARISTA_USERNAME') }}"
    password: "{{ secret('ARISTA_PASSWORD') }}"
    phase: POST
    snapshot: "{{ inputs.snapshot }}"
Installation

This Enterprise plugin requires an Enterprise image and access to the plugin registry. Install it with the following command:

kestractl plugins get io.kestra.plugin.ee:plugin-ee-arista --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.

Properties

Switch host

Host name or IP address of the switch management interface serving eAPI.

Password

Use {{ secret('ARISTA_PASSWORD') }}. The value is never logged nor returned in outputs.

Snapshot

Internal storage URI of the PRE check snapshot, which holds the previous boot image and version.

Username

Account allowed to run privileged commands over eAPI.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

CA certificate

PEM encoded CA certificate(s) used to validate the switch certificate. When set, only this CA is trusted. When empty, the JVM trust store is used.

Connect timeout

Maximum time to open the connection. Defaults to 10 seconds.

Trust any certificate

Disables certificate and host name validation. Only for labs with self-signed certificates. Defaults to false.

eAPI port

Defaults to 443.

Request timeout

Maximum time to wait for one eAPI answer. Defaults to 60 seconds. Tasks that run slow commands (image copy, checksum) expose their own timeout.

Already reloaded

True when the switch already ran the previous version, so no reload was sent.

Boot timestamp before the reload

Epoch seconds of the boot the switch was on when the rollback started. Pass it as previousBootupTimestamp to the following WaitForReturn, which is not needed when alreadyReloaded is true.

Previous image

File name of the image booted by the rollback.