2.5.2 Upgrading Oracle Autonomous Health Framework

Learn to upgrade Oracle Autonomous Health Framework on Linux, Unix, and Microsoft Windows operating systems.

Note:

Starting in AHF version 23.7.0, AHF full installers are shipped with Java 11.

2.5.2.1 Maintaining Oracle Autonomous Health Framework to the Latest Version

Oracle releases a new version of Oracle Autonomous Health Framework every month.

Applying standard Release Update Revisions (RURs) automatically updates Oracle Autonomous Health Framework. However, the Release Update Revisions (RURs) do not contain the rest of the Oracle Database support tools bundle updates. Download the latest version of Oracle Autonomous Health Framework with Oracle Database support tools bundle from My Oracle Support note 2550798.1.

Upgrading is similar to first-time installation. As root, use the ahf_setup script. If Oracle Autonomous Health Framework is already installed, then the installer updates the existing installation. When already installed, a cluster upgrade does not need SSH. The cluster upgrade uses the existing daemon secure socket communication between hosts.

$ ahf_setup

2.5.2.2 Automatically Upgrading Oracle Autonomous Health Framework to the Latest Version

AHF Automatic Upgrade enables you to upgrade AHF on the fly without manually downloading ahf_setup and upgrading it.

Note:

You need AHF installed user privileges to run the upgrade commands.

Autoupgrade Support Matrix

Autoupgrade is supported on:
  • Linux
  • Solaris
  • AIX

Note:

  • openssl is needed for all platforms to support autoupgrade. If openssl is not present, then autoupgrade exits gracefully.
  • If you are not using the default port (443), then you must configure a custom port using the ahfctl setupload command to upgrade AHF successfully.
Autoupgrade is NOT supported on:
  • HP-UX
  • Microsoft Windows
  • Standalone (Extract) installations of AHF (except Exadata dom0)

Autoupgrade of AHF by non-root user is supported only if the existing installation was done by the same user and the installation type is typical (full). For example, if user "X" has installed AHF, then autoupgrade cannot be performed by user "Y".

Upgrade AHF Automatically:

Oracle Trace File Analyzer scheduler automatically upgrades AHF if it finds a new version of AHF either at Software stage location or at Rest Endpoints (Object Store).

Oracle Trace File Analyzer scheduler is scheduled to run on a weekly time interval to check if a new version of AHF is present at AHF Software stage or at Rest Endpoints (Object Store). If a new version of AHF is found, then Oracle Trace File Analyzer scheduler will automatically upgrade AHF to the latest version without changing any of the saved configurations.

Upgrade AHF with upgrade option:

With this option, you can upgrade AHF irrespective of number of old days. If a new version of AHF is present either at Software stage location or at Rest Endpoints (Object Store), then AHF will be upgraded. If a new version of AHF is not found at these two places, then download AHF from MOS to Software stage, and then upgrade.
ahfctl upgrade
Set the following attributes in the ahf.properties file using command-line options:
ahfctl setupgrade -autoupgrade <on/off> -swstage path
To disable autoupgrade:
ahfctl setupgrade -autoupgrade off
Or
ahfctl unsetupgrade -autoupgrade
To unset autoupgrade parameters:
ahfctl unsetupgrade 
[-all] 
[-swstage] 
[-autoupgrade] 
[-servicename] 
[-frequency]
To get autoupgrade configurations parameters:
ahfctl getupgrade -all

Note:

To get best results out of autoupgrade, run the latest AHF version.

Example 2-1 Set autoupgrade parameters with valid inputs

ahfctl setupgrade -swstage /scratch/ahf_stage -autoupgrade on -frequency 21
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration

Example 2-2 Set all autoupgrade parameters with valid inputs

ahfctl setupgrade -all
Enter autoupgrade flag <on/off> : on
Enter software stage location : /scratch/ahf_stage
Enter auto upgrade frequency : 30
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration

Example 2-3 Turn off autoupgrade

Oracle Trace File Analyzer scheduler will not run automatic upgrade.

ahfctl setupgrade -autoupgrade off
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration

Example 2-4 Print upgrade entries

ahfctl getupgrade -all
autoupgrade : off
autoupgrade.swstage : /scratch/ahf_stage
autoupgrade.frequency : 30
autoupgrade.servicename : [not set]

Example 2-5 Unset all upgrade parameters

ahfctl unsetupgrade -all
AHF upgrade parameters successfully removed
Successfully synced AHF configuration

Example 2-6 Unset a single parameter

ahfctl unsetupgrade -swstage
Software stage location successfully removed
Successfully synced AHF configuration

Example 2-7 Invalid Frequency

ahfctl setupgrade -frequency 0
Invalid autoupgrade frequency. Use frequency between 1 and 30

Example 2-8 AHF is older than 180 days

ahfctl getupload
Autonomous Health Framework is older than 180 days. please use "ahfctl upgrade" to upgrade to latest version of AHF
continue running original command ...
ahfctl upgrade
Starting download of Autonomous Health Framework from: https://updates.oracle.com/Orion/Services/download/AHF-LINUX_v20.2.3.zip?aru=23858854&patch_file=AHF-LINUX_v20.2.3.zip
...
Upgrading Autonomous Health Framework
...

Example 2-9 AHF is older than 365 days

ahfctl getupload
Autonomous Health Framework is older than 360 days. please use "ahfctl upgrade" to latest version of AHF
ahfctl upgrade
Starting download of Autonomous Health Framework from: https://updates.oracle.com/Orion/Services/download/AHF-LINUX_v20.2.3.zip?aru=23858854&patch_file=AHF-LINUX_v20.2.3.zip
...
Upgrading Autonomous Health Framework
...

Example 2-10 New version of AHF is available at software stage location

ahfctl upgrade
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_211000_31931_2021_03_29-06_54_58.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 21.1.0 Build Date: 202103290252
AHF is already installed at /opt/oracle.ahf
Installed AHF Version: 21.1.0 Build Date: 202103290200
Upgrading /opt/oracle.ahf
Shutting down AHF Services
Shutting down TFA
. . . . .
. . .
Successfully shutdown TFA..
Starting AHF Services
Starting TFA..
Waiting up to 100 seconds for TFA to be started..
. . . . .
. . . . .
Successfully started TFA Process..
. . . . .
TFA Started and listening for commands
No new directories were added to TFA
INFO: Starting exachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/busm01client01/diag/exachk/compliance_start_290321_065650.log
AHF is sucessfully upgraded to latest version
.----------------------------------------------------------------------.
| Host | TFA Version | TFA Build ID | Upgrade Status |
+----------------+-------------+----------------------+----------------+
| node01 	 | 21.1.0.0.0 | 21100020210329025257 | UPGRADED |
| node02	  | 21.1.0.0.0 | 21100020210329020041 | UPGRADED |
'----------------+-------------+----------------------+----------------'
Moving /tmp/ahf_install_211000_31931_2021_03_29-06_54_58.log to /u01/app/grid/oracle.ahf/data/busm01client01/diag/ahf/
Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
node02

Example 2-11 Set REST endpoints using setupload command

ahfctl setupload -name ahf_upgrade_loc -type https -url 'https://IP Address/rest/tfa-processor/download?osName=LINUX&ahfVersion=%2720.2%27' 
-https_token "X-TFA-Authorization: <>" 
-header Content-Type:application/json

Note:

The name of config must always be ahf_upgrade_loc. This name indicates that the config is for AHF download.

You can ovewrite ahf_upgrade_loc using ahfctl setupgrade -autoupgrade_servicename new name

At rest endpoints, AHF downloads the AHF installer zip if newer version is available.

Example 2-12 Set REST endpoints with a custom port using setupload command

ahfctl setupload -name ahf_upgrade_loc -type https -url 'https://IP Address/rest/tfa-processor/download?osName=LINUX&ahfVersion=%2720.2%27' 
-https_token "X-TFA-Authorization: <>" 
-header Content-Type:application/json -port <port number>

Example 2-13 Set REST endpoints (Object Store's) using setupload command

ahfctl setupload 
-name ahf_upgrade_loc 
-type https 
-user testuser 
-url https://host.domain/v1/id5igemtjzlt/tfa_bucket -password

At Object store, you can keep either ahf_setup or zip. First, AHF tries to download ahf_setup. If ahf_setup is not available, then AHF searches for AHF installer zip.

  1. Configure object storage endpoint:
    ahfctl setupload -name upload_end_point -type https
    Enter upload_end_point.https.user: john.doe@acme.com
    Enter upload_end_point.https.password:
    Enter upload_end_point.https.url: https://swiftobjectstorage.acme.com/v1/dbaasimage/CAIPING
    Successfully synced AHF configuration
  2. Configure setupgrade with the name of your upload configuration:
    ahfctl setupgrade -servicename upload_end_point
    Successfully synced AHF configuration
    AHF autoupgrade parameters successfully updated
  3. Run the ahfctl upgrade command:
    ahfctl upgrade
    Upload configuration check for: upload_end_point.
    Parameters are configured correctly to upload.
    
    AHF-LINUX_v21.1.0.zip successfully downloaded at /opt/oracle.ahf
    /opt/oracle.ahf/AHF-LINUX_v21.1.0.zip successfully extracted at /opt/oracle.ahf
    
    AHF software signature has been validated successfully

Example 2-14 Set mos upload configuration

ahfctl setupload -name mosconf1 -type https
Enter mosconf1.https.user : john.doe@acme.com
Enter mosconf1.https.password :
Enter mosconf1.https.url : https://transport.oracle.com/upload/issue
Successfully synced AHF configuration
Upload configuration set for: mosconf1
type: https
mosconf1.https.user: john.doe@acme.com
mosconf1.https.password: ******
mosconf1.https.url: https://transport.oracle.com/upload/issue
Service upload parameters successfully stored.
AHF will continue to upload the collections to the Service until unset using tfactl unsetserviceupload [-all]

2.5.2.3 Upgrading AHF on Local File System, ACFS, and NFS

You can upgrade AHF on local file system, Oracle Advanced Cluster File System (Oracle ACFS), and Network File System (NFS).

Local File System

If the stage location is a local file system and if the AHF installer zip file exists in the stage location, then after upgrading, the installer removes the AHF installer zip file and all the extracted items from the stage location.

  1. Configure the auto upgrade parameters.
    ahfctl setupgrade -all
    
    Enter autoupgrade flag <on/off> : on
    Enter software stage location : /opt/local
    Enter auto upgrade frequency : 30
    AHF autoupgrade parameters successfully updated
    Successfully synced AHF configuration
    refreshConfig() completed successfully.
  2. Check if the AHF installer zip file exists in the stage location.
    ls /opt/local
    AHF-LINUX_v22.1.0.zip

    Note:

    Oracle Trace File Analyzer scheduler calls ahfctl upgrade -nomos at a given frequency, in this example, auto-upgrade will happen every 30 days at 3 AM. You can also initiate automatic upgrade from the command-line using the ahfctl upgrade command.

  3. Run the upgrade command.
    ahfctl upgrade
    AHF Installer for Platform Linux Architecture x86_64
    AHF Installation Log : /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log
    Starting Autonomous Health Framework (AHF) Installation
    AHF Version: 22.1.0 Build Date: 202203081742
    AHF is already installed at /opt/oracle.ahf
    Installed AHF Version: 22.1.0 Build Date: 202203081714
    Upgrading /opt/oracle.ahf
    Shutting down AHF Services
    Nothing to do !
    Shutting down TFA
    Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
    Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
    Successfully shutdown TFA..
    Starting AHF Services
    Starting TFA..
    Waiting up to 100 seconds for TFA to be started..
    . . . . .
    Successfully started TFA Process..
    . . . . .
    TFA Started and listening for commands
    No new directories were added to TFA
    Directory /u01/app/grid/crsdata/scao05adm07/trace/chad was already added to TFA Directories.
    INFO: Starting exachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/scao05adm07/diag/exachk/compliance_start_090322_021151.log
    AHF is successfully upgraded to latest version
    .-------------------------------------------------------------------.
    | Host        | TFA Version | TFA Build ID         | Upgrade Status |
    +-------------+-------------+----------------------+----------------+
    | scao05adm07 |  22.1.0.0.0 | 22100020220308174218 | UPGRADED       |
    | scao05adm08 |  22.1.0.0.0 | 22100020220308171448 | UPGRADED       |
    '-------------+-------------+----------------------+----------------'
    Moving /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log to /u01/app/grid/oracle.ahf/data/scao05adm07/diag/ahf/
    Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
    scao05adm08
  4. Validate if AHF installer zip and the extracted files are removed from the stage location.
    ls -lart /opt/local
    drwxr-xr-x   2 root     root           2 Mar  9 02:32 .
    drwxr-xr-x  25 root     sys           28 Mar  9 02:32 ..

Oracle Advanced Cluster File System (Oracle ACFS)

If the stage location is ACFS and if the AHF installer zip file exists in the stage location, then after upgrading, the installer removes the AHF installer zip file and retains all the extracted binaries in the stage location so that the other nodes can consume them.

  1. Configure the auto upgrade parameters.
    ahfctl setupgrade -all
    Enter autoupgrade flag <on/off> : on
    Enter software stage location : /acfs01
    Enter auto upgrade frequency : 30
    AHF autoupgrade parameters successfully updated
    Successfully synced AHF configuration
    refreshConfig() completed successfully.
  2. Check if the AHF installer zip file exists in the stage location.
    ls -lart /acfs01
    total 387862
    -rw-r--r--+  1 root root       1520 Apr 30  2020 README.txt
    -rw-r--r--+  1 root root        625 Nov  1 15:15 oracle-tfa.pub
    -rw-r--r--+  1 root root        384 Jan  4 22:45 ahf_setup.dat
    -rwxr-xr-x+  1 root root  392587026 Mar  9 01:55 ahf_setup
  3. Run the upgrade command.
    ahfctl upgrade
    AHF Installer for Platform Linux Architecture x86_64
    AHF Installation Log : /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log
    Starting Autonomous Health Framework (AHF) Installation
    AHF Version: 22.1.0 Build Date: 202203081742
    AHF is already installed at /opt/oracle.ahf
    Installed AHF Version: 22.1.0 Build Date: 202203081714
    Upgrading /opt/oracle.ahf
    Shutting down AHF Services
    Nothing to do !
    Shutting down TFA
    Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
    Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
    Successfully shutdown TFA..
    Starting AHF Services
    Starting TFA..
    Waiting up to 100 seconds for TFA to be started..
    . . . . .
    Successfully started TFA Process..
    . . . . .
    TFA Started and listening for commands
    No new directories were added to TFA
    Directory /u01/app/grid/crsdata/scao05adm07/trace/chad was already added to TFA Directories.
    INFO: Starting exachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/scao05adm07/diag/exachk/compliance_start_090322_021151.log
    AHF is successfully upgraded to latest version
    .-------------------------------------------------------------------.
    | Host        | TFA Version | TFA Build ID         | Upgrade Status |
    +-------------+-------------+----------------------+----------------+
    | scao05adm07 |  22.1.0.0.0 | 22100020220308174218 | UPGRADED       |
    | scao05adm08 |  22.1.0.0.0 | 22100020220308171448 | UPGRADED       |
    '-------------+-------------+----------------------+----------------'
    Moving /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log to /u01/app/grid/oracle.ahf/data/scao05adm07/diag/ahf/
    Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
    scao05adm08
  4. Validate the AHF installer zip is removed and the extracted binaries are retained.
    ls -lart /acfs01
    -rw-r--r--+  1 root root       1520 Apr 30  2020 README.txt
    -rw-r--r--+  1 root root        625 Nov  1 15:15 oracle-tfa.pub
    -rw-r--r--+  1 root root        384 Jan  4 22:45 ahf_setup.dat
    -rwxr-xr-x+  1 root root  392587026 Mar  9 01:55 ahf_setup
    

Network File System (NFS)

  • If the stage location is NFS and if the AHF installer zip file exists in the stage location, then the installer asks the user to extract it.
  • If the stage location has AHF binaries in the extracted form, then after upgrading, the installer retains the extracted AHF binaries as is.
  • If the stage location has AHF installer zip file, then after upgrading, the installer removes the AHF installer zip file.
  1. Configure the auto upgrade parameters.
    ahfctl setupgrade -all
    Enter autoupgrade flag <on/off> : on
    Enter software stage location : /export/sheisey_R/ahf_stage
    Stage location /export/sheisey_R/ahf_stage file system type is NFS. User needs to unzip AHF zip placed at NFS file system.
    Enter auto upgrade frequency : 30
    AHF autoupgrade parameters successfully updated
    Successfully synced AHF configuration
    refreshConfig() completed successfully.
  2. Check if the AHF installer zip file or AHF binaries in the extracted form exists in the stage location.
    ls -lart /export/sheisey_R/ahf_stage
    -rw-r--r--    1 root root  389105013 Feb  3 06:08 AHF-LINUX_v22.1.0.zip
    -rw-r--r--+  1 root root       1520 Apr 30  2020 README.txt
    -rw-r--r--+  1 root root        625 Nov  1 15:15 oracle-tfa.pub
    -rw-r--r--+  1 root root        384 Jan  4 22:45 ahf_setup.dat
    -rwxr-xr-x+  1 root root  392587026 Mar  9 01:55 ahf_setup
  3. Run the upgrade command.
    ahfctl upgrade
    AHF Installer for Platform Linux Architecture x86_64
    AHF Installation Log : /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log
    Starting Autonomous Health Framework (AHF) Installation
    AHF Version: 22.1.0 Build Date: 202203081742
    AHF is already installed at /opt/oracle.ahf
    Installed AHF Version: 22.1.0 Build Date: 202203081714
    Upgrading /opt/oracle.ahf
    Shutting down AHF Services
    Nothing to do !
    Shutting down TFA
    Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
    Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
    Successfully shutdown TFA..
    Starting AHF Services
    Starting TFA..
    Waiting up to 100 seconds for TFA to be started..
    . . . . .
    Successfully started TFA Process..
    . . . . .
    TFA Started and listening for commands
    No new directories were added to TFA
    Directory /u01/app/grid/crsdata/scao05adm07/trace/chad was already added to TFA Directories.
    INFO: Starting exachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/scao05adm07/diag/exachk/compliance_start_090322_021151.log
    AHF is successfully upgraded to latest version
    .-------------------------------------------------------------------.
    | Host        | TFA Version | TFA Build ID         | Upgrade Status |
    +-------------+-------------+----------------------+----------------+
    | scao05adm07 |  22.1.0.0.0 | 22100020220308174218 | UPGRADED       |
    | scao05adm08 |  22.1.0.0.0 | 22100020220308171448 | UPGRADED       |
    '-------------+-------------+----------------------+----------------'
    Moving /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log to /u01/app/grid/oracle.ahf/data/scao05adm07/diag/ahf/
    Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
    scao05adm08
  4. Validate if the AHF installer zip is removed and the extracted binaries are retained.
    ls -lart /export/sheisey_R/ahf_stage
    -rw-r--r--+  1 root root       1520 Apr 30  2020 README.txt
    -rw-r--r--+  1 root root        625 Nov  1 15:15 oracle-tfa.pub
    -rw-r--r--+  1 root root        384 Jan  4 22:45 ahf_setup.dat
    -rwxr-xr-x+  1 root root  392587026 Mar  9 01:55 ahf_setup