LogoLogo
What's New?Connect Agent ReleasesBook a DemoPricing
  • Documentation
  • Developers
  • Administration
  • OVERVIEW
    • JFrog Connect Overview
      • Architecture Overview
        • Connect Agent
        • Connect & JFrog Platform
      • Plan Your Update Strategy
        • Software Update Objectives & Concepts
        • Software Update Process & Procedures
  • Get Started
    • Create JFrog Connect Account
    • Log in to JFrog Connect
    • Network Requirements
    • Register Device
  • Manage your Fleet
    • Register Devices at Scale
      • Freeze Image on Device
      • Build Image with Agent
    • Register & Update Device at Once
    • Organize Your Fleet
      • Create Project
      • Move Device between Projects
      • Create Groups
        • Add Device to Group
        • Add Many Devices to Group
        • Change Group Name
        • Delete Group
      • Tag Devices
        • Remove a Tag
      • Remove Many Devices
  • Devices
    • Fleet Overview
      • Filter Devices
      • Locate Devices
    • Device Details
      • Delete a Device
      • Block Updates with Update Trigger
    • Update Connect Agent
    • Delete Many Devices
  • Deployment
    • Create Update Flow
      • Actions
        • Run Command
        • Run Script
        • Deploy File
        • Deploy Docker
          • Use Docker Image
          • Use Docker Compose
          • Get Artifactory Parameters
        • Clone Git Repository
        • Download Artifact
          • Get Artifactory Path
        • Download Release Bundle
          • Get Artifactory Parameters for Release Bundle
        • Update Image
        • Install Debian Package
          • Get Artifactory Parameters for Debian
      • Use Update Parameters
      • On Failure & Rollback
      • Vulnerability Scans
      • Sample Use Case: Build Update Flow for Reuse
    • Deploy Software
      • Set Application & Version
      • Set Alert upon Failure
      • Set Phased Rollout
      • View Deployment Progress
        • Detailed Deployment Information
        • Abort a Deployment
      • Deploy in Groups
      • Sample Use Case: Deploy Docker Images to Devices
  • Tools
    • Remote Tools
      • Use Terminal
      • Open Port Tunnel Session
        • Access with VNC
        • Connect with SSH
        • Access Device Web Applications
      • Run Commands Remotely
        • Run Command as Non-Root User
      • Get Device Files (Fetch Files)
    • Alerts
      • Create Channel
      • Set Webhook
    • Monitor
      • Resource Monitor
      • Process Monitor
  • Releases
    • What's New?
    • Connect Agent Release Notes
  • Troubleshooting
    • Connect Server Status
    • Troubleshoot Topics
      • Device Registration
      • Terminal Troubleshooting
Powered by GitBook
On this page
  • Control and Stability
  • Configure General Rollback
  • Configure On Failure Policy
  • Execute Customized Action
  • What’s Next?

Was this helpful?

Export as PDF
  1. Deployment
  2. Create Update Flow

On Failure & Rollback

You can define what will happen if an action fails, and if a rollback is needed, how the rollback will take place. This will ensure that your devices are left in a stable and known state.

PreviousUse Update ParametersNextVulnerability Scans

Last updated 4 months ago

Was this helpful?

Control and Stability

If a failure occurs during a software update, it is important to return your device to a stable and known state. When an action fails, the default behavior of JFrog Connect is to run a general rollback. However, you can have more control over the process by configuring On Failure instructions in each action block in the flow and defining the rollback actions to be taken per action block.

For each action, you can decide what kind of rollback is triggered (if any), and trigger actions such as a command or a custom script to run. When an update deployment ends, either successfully or due to a failure in the update flow, the outcome will be that your device is left in a stable state and you will have full knowledge of that state.

Configure General Rollback

The purpose of the general rollback is to ensure that your application will always be able to return to a stable and running state. A general rollback is a rollback of all the actions that have been wholly or partially completed so far. This includes deleting any files that have been delivered, returning the directory structure to its previous state, and undoing any commands and scripts that have run so far. After a general rollback, your previously running versions will be running again.

Running the general rollback is the default On-Failure action marked in all of the actions. Although you can opt not to run a general rollback, we highly recommend including general rollback in each update flow.

If you chose Run General Rollback in any of your actions, you need to enable and configure the Rollback action. This includes entering the command or script that will perform the rollback.

  1. In the Create Update Flow page, click Rollback.

  1. Mark Enable General Update Rollback.

  1. Choose to run either a command or a script that will perform the rollback. If you choose Command, include the values for all required parameters. If you choose Script, you will need to prepare the script in advance.

  2. Save your rollback configuration.

Configure On Failure Policy

In the Configure Action panel, click On Failure.

The On Failure policy determines which action(s) to be taken if the action fails. You can choose from the following.

  • Continue Update Flow: The update flow will continue to the next action block as if the action succeeded (i.e., the error is ignored). If there are no more action blocks, the software update will go to completion. In the deployment output, you will see that the action failed and the error that caused the failure.

  • Run General Rollback: When this is marked, the general rollback will run. (This is marked by default, but you can unmark it.) You can choose to run both the general rollback and an additional “Do Action” which is defined specifically per action. The general rollback will run only after all the action-specific rollback instructions have run.

Tip: If you mark Run General Rollback, you must also enable general rollback in the Rollback action block.

Execute Customized Action

When you mark Execute Customized Action, a rollback action (e.g., a command or a script) specific to that action will run. You can choose to run only a customized action to roll back the action, or run it in addition to the general rollback.

The action is triggered as described below.

Trigger when:

  • Whole update fails: If this actionor a subsequent action fails, then the rollback action specified will be triggered. If a subsequent action fails and has Continue Update Flow defined, then the action will not be triggered. (This option requires Connect Agent version 6.0 or later.)

  • Only this action fails: The rollback action will run only if the current action fails.

Order of Rollback Actions

When there are several actions in an update flow, the rollback actions take place in the following order:

  1. The customized actions of the current action that failed.

  2. The customized actions that are triggered in any of the previous actions.

  3. General Rollback (if enabled).

Actions Available in Rollback Actions

Different rollback actions to run are available for the different update flow actions.

Rollback Action to Run
Description
In Update Flow Actions...

Command

Enter the command to run in the box along with all necessary parameter values.

Run Command, Run Script

Script

Drop your script file to run or browse to select the file and enter it in the box.

Run Command, Run Script

Revert All Files

Deletes any files that were delivered to the devices in this action and reverts to the files of the previously running version.

Deploy Files, Deploy Artifacts, Release Bundle

Revert Docker Compose File

Reverts to the previous Docker Compose file that was on the device.

Deploy Container, when you choose Docker Compose as the Deployment Type

Restart Previous Container

Restarts the previous container version that was running.

Deploy Container, when you choose Single Container as the Deployment Type

What’s Next?

Learn more about .

Update Deployments