I am writing this blog as I could not find how to reinstall correct supported version of AHF on ExaCC.
Recently I upgraded AHF to latest version on ExaCC, i.e. 23.8.0.0.0
[root@exacc1db2 AHF23.8]# ahfctl statusahf
.--------------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+-----------+---------------+--------+------+------------+----------------------+------------------+
| exacc1db2 | RUNNING | 258898 | 5000 | 23.8.0.0.0 | 23800020230830021106 | COMPLETE |
| exacc1db1 | RUNNING | 282299 | 5000 | 23.8.0.0.0 | 23800020230830021106 | COMPLETE |
'-----------+---------------+--------+------+------------+----------------------+------------------'
Later, I realized as per the below document the latest certified version on ExaCC is 23.5.2
Autonomous Health Framework (AHF) – Including TFA and ORAchk/EXAchk (Doc ID 2550798.1)
So I have to Reinstall the approved version.
1. Uninstall the current version
[root@exacc1db1 u02]# ahfctl uninstall -local -silent
AHF Uninstallation Log : /tmp/ahf_uninstall_377829_2023_10_16-11_35_18.log
Starting AHF Uninstall
NOTE : Uninstalling does not return all the space used by the AHF repository
AHF will be uninstalled on: exacc1db1
Stopping AHF service on local node exacc1db1...
Sleeping for 10 seconds...
Stopping TFA Support Tools...
Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
Stopping exachk scheduler ...
Removing exachk cache discovery....
Successfully completed exachk cache discovery removal.
Unable to send message to TFA
Removed exachk from inittab
Removing AHF setup on exacc1db1:
Removing /etc/rc.d/rc0.d/K17init.tfa
Removing /etc/rc.d/rc1.d/K17init.tfa
Removing /etc/rc.d/rc2.d/K17init.tfa
Removing /etc/rc.d/rc4.d/K17init.tfa
Removing /etc/rc.d/rc6.d/K17init.tfa
Removing /etc/init.d/init.tfa...
Removing /etc/systemd/system/oracle-tfa.service...
Removing /opt/oracle.ahf/rpms
Removing /opt/oracle.ahf/jre
Removing /opt/oracle.ahf/common
Removing /opt/oracle.ahf/bin
Removing /opt/oracle.ahf/python
Removing /opt/oracle.ahf/analyzer
Removing /opt/oracle.ahf/tfa
Removing /opt/oracle.ahf/chm
Removing /opt/oracle.ahf/ahf
Removing /opt/oracle.ahf/exachk
Removing /opt/oracle.ahf/ahfscope
Removing /opt/oracle.ahf/chadiag
Removing /opt/oracle.ahf/iwa
Removing /opt/oracle.ahf/cha
Removing /u02/oracle.ahf/data/exacc1db1
Removing /opt/oracle.ahf/install.properties
Removing update backup directories from /u02/oracle.ahf/data/work
Removing /sys/fs/cgroup/cpu/oratfagroup/
[root@exacc1db1 u02]#
2. Change Ownership of /u02 from Oracle to Root
[root@exacc1db1 /]# chown root /u02
if we don’t do step 2, we will get this error.
[ERROR] : AHF-00014: AHF Data Location /u02/oracle.ahf/data is not owned by root in the directory hierarchy
3. Install Supported Version:
On ExaCC, we already have AHF binaries of the supported version, we just need to install it.
/var/opt/oracle/misc/ahf/ahf_setup ===>> This is the default AHF location from cloud downloads.
[root@exacc1db1 /]# /var/opt/oracle/misc/ahf/ahf_setup -local -silent
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_235200_16158_2023_10_16-11_41_18.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 23.5.2 Build Date: 202307172132
AHF Location : /opt/oracle.ahf
AHF Data Directory : /u02/oracle.ahf/data
Extracting AHF to /opt/oracle.ahf
Configuring TFA Services
Discovering Nodes and Oracle Resources
Not generating certificates as GI discovered
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 |
+-----------+---------------+-------+------+------------+----------------------+
| exacc1db1 | RUNNING | 32033 | 5000 | 23.5.2.0.0 | 23520020230717213218 |
'-----------+---------------+-------+------+------------+----------------------'
Running TFA Inventory...
Could not add action to TFA server
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 | /u02/oracle.ahf/data |
| Repository | /u02/oracle.ahf/data/repository |
| Diag Directory | /u02/oracle.ahf/data/exacc1db1/diag |
'-----------------+-------------------------------------'
Starting Orachk Scheduler from AHF
Setting up AHF CLI and SDK
AHF binaries are available in /opt/oracle.ahf/bin
AHF is successfully installed
Moving /tmp/ahf_install_235200_16158_2023_10_16-11_41_18.log to /u02/oracle.ahf/data/exacc1db1/diag/ahf/
[root@exacc1db1 /]#
4. Change ownership of /u02 back to Oracle
[root@exacc1db1 /]# chown oracle /u02
5. Repeat the above 4 steps on the 2nd node of the cluster as well and then check the AHF status
[root@exacc1db1 u02]# ahfctl statusahf -all
.--------------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+-----------+---------------+--------+------+------------+----------------------+------------------+
| exacc1db1 | RUNNING | 190368 | 5000 | 23.5.2.0.0 | 23520020230717213218 | COMPLETE |
| exacc1db2 | RUNNING | 146942 | 5000 | 23.5.2.0.0 | 23520020230717213218 | COMPLETE |
'-----------+---------------+--------+------+------------+----------------------+------------------'
This looks good and now we are on the supported AHF version.
Note: As per the above AHF note, for the cloud, the AHF upgrade is taken care of by DBAAS tools.