Skip to content

Latest commit

 

History

History
83 lines (46 loc) · 4.25 KB

File metadata and controls

83 lines (46 loc) · 4.25 KB

Workshop Exercise - Run Rollback Job

Table of Contents

Objectives

  • Demonstrate using an Ansible playbook for rolling back a RHEL upgrade
  • Verify the RHEL major version is reverted back

Guide

In this exercise, we will demonstrate rolling back one of our pet app servers, just as we would if the RHEL upgrade had failed or if we had found the upgrade caused unexpected impact to the application.

We are now here in our exploration of the RHEL in-place automation workflow:

Automation approach workflow diagram with rollback playbook highlighted

After rolling back, the pet app server will be restored to as it was just before entering the upgrade phase of the workflow.

Step 1 - Launch the Rollback Job Template

In this step, we will be rolling back the RHEL in-place upgrade on one of our pet application servers.

  • Return to the AAP Web UI tab in your web browser. Navigate to Resources > Templates and then open the "AUTO / 03 Rollback" job template. Here is what it looks like:

    AAP Web UI showing the rollback job template details view

  • Click the "Launch" button which will bring up the prompts for submitting the job starting with the limit and variables prompts. We only want to do a rollback of one server. To do this, enter the hostname of your chosen pet app server under the "Limit" prompt. For example:

    AAP Web UI showing the rollback job limit and variables prompts

    Click the "Next" button to proceed.

    AAP Web UI showing the rollback job survey prompt

  • Next we see the job template survey prompt asking us to select an inventory group. We already limited the job to one server, so just choose the "ALL_rhel" option and click the "Next" button. This will bring you to the preview of the selected job options and variable settings, for example:

    AAP Web UI showing the rollback job preview prompt

    If everything looks good, use the "Launch" button to start the playbook job.

Step 2 - Observe the Rollback Job Output

After launching the rollback playbook job, the AAP Web UI will navigate automatically to the job output page.

  • The automated rollback takes only a few minutes to run. You can monitor the log output as the playbook run progresses.

  • When the job has finished running, scroll to the bottom of the job output. If it finished successfully, you should see "failed=0" status in the job summary like this example:

    Rollback job "PLAY RECAP" as seen at the end of the job output

    Notice in the example above, we see the job completed in just under 3 minutes. However, most of that time was spent in the final "Wait for the snapshot to drain" task which holds the job until the snapshot merges finish in the background. The instance was actually rolled back and service ready in just under a minute. Impressive, right?

Step 3 - Check the RHEL Version

Repeat the steps you followed with Exercise 2.3: Step 2, this time to verify that the RHEL version is reverted back.

  • For example, if the pet app host you rolled back had been upgraded from RHEL7 to RHEL8, you should now see it is back to RHEL7:

    command output showing the host is back to RHEL7 installed

Conclusion

In this exercise, we used automation to quickly reverse the RHEL in-place upgrade and restore the app server back to its original state.

In the next exercise, we'll dig deeper to validate that all changes and impacts caused by the upgrade are now undone.


Navigation

Previous Exercise - Next Exercise

Home