Upgrade AHF and TFA at ODA

Recently I made a post about how to upgrade the TFA to AHF at Oracle Exadata. For today, the post is about how to upgrade AHF at ODA. The procedure is quite simple, but you need to check where to up it and if everything is up and running.

Here I am upgrading the AHF at ODA running version 19.8 (that I already showed how to patch). One important detail is that, for ODA patch/upgrade, the AHF and ORACHK are requirements (to be operational). So, you need to guarantee that they are running correctly at the end.

Here I am already running AHF version 20.2.1.0.0 and will upgrade it to 21.1.4.0.0:

[root@odas1 ~]# /opt/oracle/dcs/oracle.ahf/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 |
+-------+---------------+-------+------+------------+----------------------+------------------+
| odas1 | RUNNING       | 16093 | 5000 | 20.2.1.0.0 | 20210020200706165623 | COMPLETE         |
| odas2 | RUNNING       | 12219 | 5000 | 20.2.1.0.0 | 20210020200706165623 | COMPLETE         |
'-------+---------------+-------+------+------------+----------------------+------------------'
[root@odas1 ~]#

Since ODA has built-in AHF you can discover where it is installed checking the file /etc/oracle.ahf.loc. The location is important to upgrade it correctly and use the correct path when calling the procedure:

[root@odas1 ~]# cat /etc/oracle.ahf.loc
/opt/oracle/dcs/oracle.ahf
[root@odas1 ~]#

With that information, we can unzip the new AHF in one location and call the ahf_setup to do the upgrade. Check that the parameters ahf_loc and data_dir have the path where AHF is installed:

[root@odas1 ~]# cd /u01/patches 
[root@odas1 patches]# unzip -qa AHF-LINUX_v21.1.4.zip
[root@odas1 patches]#
[root@odas1 patches]# ./ahf_setup -ahf_loc /opt/oracle/dcs -data_dir /opt/oracle/dcs

AHF Installer for Platform Linux Architecture x86_64

AHF Installation Log : /tmp/ahf_install_211400_94398_2021_07_27-18_32_33.log

Starting Autonomous Health Framework (AHF) Installation

AHF Version: 21.1.4 Build Date: 202106281226

AHF is already installed at /opt/oracle/dcs/oracle.ahf

Installed AHF Version: 20.2.1 Build Date: 202007061656

Do you want to upgrade AHF [Y]|N :

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

1. odas2

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

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

Upgrading /opt/oracle/dcs/oracle.ahf
TFA-00002 Oracle Trace File Analyzer (TFA) is not running

Shutting down AHF Services
Nothing to do !
Shutting down TFA
Nothing to do !
TFA Stopped Successfully
. . . . .
. . .
Successfully shutdown TFA..


Starting AHF Services
Starting TFA..
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.
Waiting up to 100 seconds for TFA to be started..
. . . . .
Successfully started TFA Process..
. . . . .
TFA Started and listening for commands


AHF upgrade completed on odas1

Upgrading AHF on Remote Nodes :

AHF will be installed on odas2, Please wait.

Upgrading AHF on odas2 :

[odas2] Copying AHF Installer

[odas2] Running AHF Installer

AHF is successfully upgraded to latest version

.-------------------------------------------------------------.
| Host  | TFA Version | TFA Build ID         | Upgrade Status |
+-------+-------------+----------------------+----------------+
| odas1 |  21.1.4.0.0 | 21140020210628122659 | UPGRADED       |
| odas2 |  21.1.4.0.0 | 21140020210628122659 | UPGRADED       |
'-------+-------------+----------------------+----------------'

Adding rpm Metadata to rpm database on ODA system

RPM File /opt/oracle/dcs/oracle.ahf/rpms/oracle-ahf-211400-20210628122659.x86_64.rpm
Preparing...                          ################################# [100%]
Using Dummy RPM Installer for oracle-ahf
Tool Install Base /opt/oracle.ahf

Updating / installing...
   1:oracle-ahf-211400-20210628122659 ################################# [ 50%]
Upgrading oracle-ahf
Cleaning up / removing...
   2:oracle-ahf-202100-20200706165623 ################################# [100%]

Moving /tmp/ahf_install_211400_94398_2021_07_27-18_32_33.log to /opt/oracle/dcs/oracle.ahf/data/odas1/diag/ahf/

You have new mail in /var/spool/mail/root
[root@odas1 patches]#

During the process, it will detect the place where the AHF is installed (in case that you specified the wrong location), and ask you if you want to upgrade it. The upgrade will be done at all nodes of the cluster.

After that you can restart it to check if everything is/was fine (in both nodes):

[root@odas1 patches]# /opt/oracle/dcs/oracle.ahf/bin/ahfctl stop
Stopping TFA from the Command Line
Stopped OSWatcher
Nothing to do !
Please wait while TFA stops
TFA-00104 Cannot establish connection with TFA Server. Please check TFA Certificates
Killing TFA running with pid 1967 gracefully
. . . . .
. . .
Successfully stopped TFA..
[root@odas1 patches]#
[root@odas1 patches]#
[root@odas1 patches]# /opt/oracle/dcs/oracle.ahf/bin/ahfctl start
Starting TFA..
Waiting up to 100 seconds for TFA to be started..
. . . . .
. . . . .
. . . . .
Successfully started TFA Process..
. . . . .
TFA Started and listening for commands
[root@odas1 patches]#

################################################
# At other(s) node of the cluster
################################################

[root@odas2 ~]#
[root@odas2 ~]# /opt/oracle/dcs/oracle.ahf/bin/ahfctl stop
Stopping TFA from the Command Line
Stopped OSWatcher
Nothing to do !
TFA-00518 Oracle Trace File Analyzer (TFA) is not running (stopped)
TFA Stopped Successfully
Successfully stopped TFA..
[root@odas2 ~]#
[root@odas2 ~]#
[root@odas2 ~]# /opt/oracle/dcs/oracle.ahf/bin/ahfctl start
Starting TFA..
Waiting up to 100 seconds for TFA to be started..
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
Successfully started TFA Process..
. . . . .
TFA Started and listening for commands
[root@odas2 ~]#

One detail that I passed was related to nodes not synced. This means that they can’t send/accept commands from others of the cluster. To solve this the command syncnodes helps to fix.

The best way to check the error is by executing a simple ahfctl status and you will notice that just one node is listed:

[root@odas1 patches]# /opt/oracle/dcs/oracle.ahf/bin/ahfctl status

.-------------------------------------------------------------------------------------------.
| Host  | Status of TFA | PID | Port | Version    | Build ID             | Inventory Status |
+-------+---------------+-----+------+------------+----------------------+------------------+
| odas1 | RUNNING       | 964 | 5000 | 21.1.4.0.0 | 21140020210628122659 | COMPLETE         |
'-------+---------------+-----+------+------------+----------------------+------------------'
[root@odas1 patches]#

To fix, just call the syncnodes that will fix the certificates between all nodes:

[root@odas1 patches]# /opt/oracle/dcs/oracle.ahf/bin/ahfctl syncnodes

Current Node List in TFA :
1. odas1
2. odas2

Node List in Cluster :
1. odas1
2. odas2

Node List to sync TFA Certificates :
     1  odas2

Do you want to update this node list? [Y|N] [N]:

Syncing TFA Certificates on odas2 :

TFA_HOME on odas2 : /opt/oracle/dcs/oracle.ahf/tfa

DATA_DIR on odas2 : /opt/oracle/dcs/oracle.ahf/data/odas2/tfa

Shutting down TFA on odas2...
Copying TFA Certificates to odas2...
Copying SSL Properties to odas2...
Sleeping for 5 seconds...
Starting TFA on odas2...


.---------------------------------------------------------------------------------------------.
| Host  | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+-------+---------------+-------+------+------------+----------------------+------------------+
| odas1 | RUNNING       |   964 | 5000 | 21.1.4.0.0 | 21140020210628122659 | COMPLETE         |
| odas2 | RUNNING       | 42285 | 5000 | 21.1.4.0.0 | 21140020210628122659 | COMPLETE         |
'-------+---------------+-------+------+------------+----------------------+------------------'

[root@odas1 patches]#

You can call from which node you want, but I recommend calling from the first node of your cluster. And after that, you can see that status will report information from both nodes:

[root@odas1 patches]# /opt/oracle/dcs/oracle.ahf/bin/tfactl status

.---------------------------------------------------------------------------------------------.
| Host  | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+-------+---------------+-------+------+------------+----------------------+------------------+
| odas1 | RUNNING       |   964 | 5000 | 21.1.4.0.0 | 21140020210628122659 | COMPLETE         |
| odas2 | RUNNING       | 42285 | 5000 | 21.1.4.0.0 | 21140020210628122659 | COMPLETE         |
'-------+---------------+-------+------+------------+----------------------+------------------'
[root@odas1 patches]#

And if you do from the other node, if is fine too:

[root@odas2 ~]# /opt/oracle/dcs/oracle.ahf/bin/ahfctl status
WARNING - AHF Software is older than 180 days. Please consider upgrading AHF to the latest version using ahfctl upgrade.

.---------------------------------------------------------------------------------------------.
| Host  | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+-------+---------------+-------+------+------------+----------------------+------------------+
| odas2 | RUNNING       | 42285 | 5000 | 21.1.4.0.0 | 21140020210628122659 | COMPLETE         |
| odas1 | RUNNING       |   964 | 5000 | 21.1.4.0.0 | 21140020210628122659 | COMPLETE         |
'-------+---------------+-------+------+------------+----------------------+------------------'
[root@odas2 ~]#

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.”

Leave a Reply

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