Upgrade AHF and TFA at Exadata

Quick post for today. Recently needed to upgrade to the last version of Autonomous Health Framework (AHF) from an Exadata running GI 19.5. In this particular case the GI was not even running AHF, but still using the standalone TFA that comes with it. So, here I will show how to upgrade to the last version of AHF and replacing the TFA as well.

The current environment is Exadata, a two-node cluster running GI 19.5. The TFA resides inside of the GI (as default):

[root@exadb0101 ~]# cd /u01/patches/ahf/
[root@exadb0101 ahf]#
[root@exadb0101 ahf]# ls -l /u01/app/grid
total 44
drwxr-x---  6 grid oinstall 4096 Aug  3  2018 admin
drwxr-x---  2 grid oinstall 4096 Jan 20  2017 audit
drwxrwxr-x 10 grid oinstall 4096 Jan 17  2020 cfgtoollogs
drwxr-xr-x  2 grid oinstall 4096 Jan 17  2020 checkpoints
drwxrwxr-x  6 grid oinstall 4096 Aug  3  2018 crsdata
drwxrwxr-x 23 grid oinstall 4096 Aug  3  2018 diag
drwxr-xr-x  3 grid oinstall 4096 Jul  5  2018 diagsnap
drwxr-xr-x  3 grid oinstall 4096 Jan 20  2017 exadb0101
drwxr-xr-x  3 grid oinstall 4096 Jul 12  2017 log
drwxr-xr-x  3 grid oinstall 4096 Jan 20  2017 Oeda
drwxr-x--x  4 root root     4096 Jan 20  2017 tfa
[root@exadb0101 ahf]#

The next is to check if TFA is running correctly. If TFA is not running correctly in all nodes, pleased don’t continue. One option (if the keys are wrong) is to call syncnodes (from the node where TFA is running) to sync the keys and made the nodes be up and running properly.

[root@exadb0101 ahf]# /u01/app/19.0.0.0/grid/bin/tfactl status
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

.-------------------------------------------------------------------------------------------------.
| Host      | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+-----------+---------------+-------+------+------------+----------------------+------------------+
| exadb0101 | RUNNING       | 38561 | 5000 | 19.2.0.0.0 | 19200020190426041420 | COMPLETE         |
| exadb0201 | RUNNING       | 15134 | 5000 | 19.2.0.0.0 | 19200020190426041420 | COMPLETE         |
'-----------+---------------+-------+------+------------+----------------------+------------------'
[root@exadb0101 ahf]# /u01/app/19.0.0.0/grid/tfa/exadb0101/tfa_home/bin/tfactl status
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

.-------------------------------------------------------------------------------------------------.
| Host      | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+-----------+---------------+-------+------+------------+----------------------+------------------+
| exadb0101 | RUNNING       | 38561 | 5000 | 19.2.0.0.0 | 19200020190426041420 | COMPLETE         |
| exadb0201 | RUNNING       | 15134 | 5000 | 19.2.0.0.0 | 19200020190426041420 | COMPLETE         |
'-----------+---------------+-------+------+------------+----------------------+------------------'
[root@exadb0101 ahf]#

The next is to unzip the downloaded version of AHF in one folder:

[root@exadb0101 ahf]# unzip AHF-LINUX_v21.1.4.zip
Archive:  AHF-LINUX_v21.1.4.zip
  inflating: README.txt
  inflating: ahf_setup
 extracting: ahf_setup.dat
  inflating: oracle-tfa.pub
[root@exadb0101 ahf]#

Next is to call the install process. The detail is pointing the ahf_loc to a separate folder than the current one. Here I put at default one (at /opt).

[root@exadb0101 ahf]# ./ahf_setup -ahf_loc /opt -data_dir /u01/app/grid/

AHF Installer for Platform Linux Architecture x86_64

AHF Installation Log : /tmp/ahf_install_211400_126426_2021_07_23-11_31_16.log

Starting Autonomous Health Framework (AHF) Installation

AHF Version: 21.1.4 Build Date: 202106281226

TFA is already installed at : /u01/app/19.0.0.0/grid/tfa/exadb0101/tfa_home

Installed TFA Version : 192000 Build ID : 20190426041420

AHF Location : /opt/oracle.ahf

AHF Data Directory : /u01/app/grid/oracle.ahf/data

Shutting down TFA : /u01/app/19.0.0.0/grid/tfa/exadb0101/tfa_home

Copying TFA Data Files from /u01/app/19.0.0.0/grid/tfa/exadb0101/tfa_home

Uninstalling TFA : /u01/app/19.0.0.0/grid/tfa/exadb0101/tfa_home

Do you want to add AHF Notification Email IDs ? [Y]|N : N

AHF will also be installed/upgraded on these Cluster Nodes :

1. exadb0201

The AHF Location and AHF Data Directory must exist on the above nodes
AHF Location : /opt/oracle.ahf
AHF Data Directory : /u01/app/grid/oracle.ahf/data

Do you want to install/upgrade AHF on Cluster Nodes ? [Y]|N : Y

Extracting AHF to /opt/oracle.ahf

Configuring TFA Services

Copying TFA Data Files to AHF

Discovering Nodes and Oracle Resources

Cells are not configured via SSH. Do you want us to store the Password for Cells in Oracle Wallet: [Y]|N N

Password for Cells are not stored in Oracle Wallet.
This can be configured later using "tfactl cell configure".

Starting TFA Services
Created symlink from /etc/systemd/system/multi-user.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service.
Created symlink from /etc/systemd/system/graphical.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service.

.-------------------------------------------------------------------------------.
| Host      | Status of TFA | PID    | Port | Version    | Build ID             |
+-----------+---------------+--------+------+------------+----------------------+
| exadb0101 | RUNNING       | 148002 | 5000 | 21.1.4.0.0 | 21140020210628122659 |
'-----------+---------------+--------+------+------------+----------------------'

Running TFA Inventory...

Adding default users to TFA Access list...

.----------------------------------------------------------------.
|                  Summary of AHF Configuration                  |
+-----------------+----------------------------------------------+
| Parameter       | Value                                        |
+-----------------+----------------------------------------------+
| AHF Location    | /opt/oracle.ahf                              |
| TFA Location    | /opt/oracle.ahf/tfa                          |
| Exachk Location | /opt/oracle.ahf/exachk                       |
| Data Directory  | /u01/app/grid/oracle.ahf/data                |
| Repository      | /u01/app/grid/oracle.ahf/data/repository     |
| Diag Directory  | /u01/app/grid/oracle.ahf/data/exadb0101/diag |
'-----------------+----------------------------------------------'


Starting exachk scheduler from AHF ...

AHF install completed on exadb0101

Installing AHF on Remote Nodes :

AHF will be installed on exadb0201, Please wait.

Installing AHF on exadb0201 :

[exadb0201] Copying AHF Installer

[exadb0201] Running AHF Installer

AHF binaries are available in /opt/oracle.ahf/bin

AHF is successfully installed

Moving /tmp/ahf_install_211400_126426_2021_07_23-11_31_16.log to /u01/app/grid/oracle.ahf/data/exadb0101/diag/ahf/

[root@exadb0101 ahf]#

As you can see above the update process will check everything or you, where (and what) is running. It will detect that TFA is already running and upgrade it. And will upgrade the systemd as well:

[root@exadb0101 ahf]# systemctl status oracle-tfa.service
● oracle-tfa.service - Oracle Trace File Analyzer
   Loaded: loaded (/etc/systemd/system/oracle-tfa.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-07-23 11:34:26 CEST; 13min ago
 Main PID: 147818 (init.tfa)
   CGroup: /system.slice/oracle-tfa.service
           ├─147818 /bin/sh /etc/init.d/init.tfa run >/dev/null 2>&1 </dev/null
           ├─148002 /opt/oracle.ahf/jre/bin/java -server -Xms256m -Xmx512m -Djava.awt.headless=true -Ddisable.checkForUpdate=true -XX:HeapDumpPath=/u01/app/grid/oracle.ahf/data/exadb0101/diag/tfa -XX:ParallelGCThreads=5 oracle.ra...
           ├─150615 /opt/oracle.ahf/jre/bin/java -server -Xms64m -Xmx128m -XX:HeapDumpPath=/u01/app/grid/oracle.ahf/data/exadb0101/diag/tfa -DtfaHome=/opt/oracle.ahf/tfa -DcrsHome=/u01/app/19.0.0.0/grid oracle.tfa.managedprocs.Tf...
           └─231442 /bin/sleep 30

Jul 23 11:39:59 exadb0101.mynt.simon.net su[186055]: (to oracle) root on none
Jul 23 11:39:59 exadb0101.mynt.simon.net su[186056]: (to grid) root on none
Jul 23 11:39:59 exadb0101.mynt.simon.net su[186079]: (to root) root on none
Jul 23 11:39:59 exadb0101.mynt.simon.net su[186091]: (to oracle) root on none
Jul 23 11:39:59 exadb0101.mynt.simon.net su[186099]: (to oracle) root on none
Jul 23 11:39:59 exadb0101.mynt.simon.net su[186118]: (to root) root on none
Jul 23 11:39:59 exadb0101.mynt.simon.net su[186124]: (to root) root on none
Jul 23 11:39:59 exadb0101.mynt.simon.net su[186133]: (to root) root on none
Jul 23 11:40:00 exadb0101.mynt.simon.net su[186175]: (to grid) root on none
Jul 23 11:40:01 exadb0101.mynt.simon.net su[186405]: (to oracle) root on none
[root@exadb0101 ahf]#

The installation process will ask if want to monitor Exadata cells but in this case I did not select because this is a VM machine and does not monitor storage cells. The other question will be to upgrade all the nodes of the cluster (you answer Yes). And as you can see, the old TFA does not exist anymore at GI home:

[root@exadb0101 ahf]# exachk -d status
exachk is using TFA Scheduler. TFA PID: 148002

[root@exadb0101 ahf]#
[root@exadb0101 ahf]# ls -l /usr/bin/exachk
lrwxrwxrwx 1 root root 29 Jul 23 11:35 /usr/bin/exachk -> /opt/oracle.ahf/exachk/exachk
[root@exadb0101 ahf]#

This post cover just the upgrade process, the second post will show some checks and details to take care of AHF.

Disclaimer: “The postings on this site are my own and don’t necessarily represent my actual employer positions, strategies or opinions. The information here was edited to be useful for general purpose, specific data and identifications were removed to allow reach the generic audience and to be useful for the community. Post protected by copyright.”

3 thoughts on “Upgrade AHF and TFA at Exadata

  1. Pingback: 21c Grid Infrastructure Upgrade | Fernando Simon

  2. Pingback: Upgrade AHF and TFA at ODA - Fernando Simon

  3. Pingback: AHF and TFA Management - Fernando Simon

Leave a Reply

Your email address will not be published. Required fields are marked *