
Automatic Upgrade Autonomous Health Framework
The Autonomous Health Framework (AHF) is the tool of choice for obtaining information such as health checks or diagnostic collections.
In addition to the documentation and important FAQs, the software can also be found in this MOS Note:
Autonomous Health Framework (AHF) – Including TFA and ORAchk/EXAchk (Doc ID 2550798.1)
With a simple configuration, the AHF can be regularly and automatically upgraded to the latest version:
- Configure Autoupgrade
- Load new AHF version into a stage directory
- AHF will detect the new version and upgrade automatically
Currently, AHF version 23.2 is installed on the system.
[root@ra01dbadm01 sw_stage]# ahfctl statusahf
.----------------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+-------------+---------------+--------+------+------------+----------------------+------------------+
| ra01dbadm01 | RUNNING | 197092 | 5000 | 23.2.0.0.0 | 23200020230302111526 | COMPLETE |
| ra01dbadm02 | RUNNING | 297700 | 5000 | 23.2.0.0.0 | 23200020230302111526 | COMPLETE |
'-------------+---------------+--------+------+------------+----------------------+------------------'Place the new zip file in a staging directory on the server.
[root@ra01dbadm01 AHF]# mv AHF-LINUX_v23.3.0.zip /u01/AHF/sw_stage/
[root@ra01dbadm01 AHF]# cd sw_stage/
[root@ra01dbadm01 sw_stage]# ls -ltr
total 374896
-rw-r--r-- 1 root root 383886732 Apr 19 09:27 AHF-LINUX_v23.3.0.zipUsing ahctl setupgrade it is possible to make various settings for the upgrade.
[root@ra01dbadm01 sw_stage]# ahfctl setupgrade -h
usage: ahfctl setupgrade [-h] [-all] [-swstage SWSTAGE] [-autoupgrade AUTOUPGRADE] [-upgradetime UPGRADETIME] [-fstype FSTYPE] [-tmp_loc TMP_LOC] [-remove_installer REMOVE_INSTALLER] [-servicename SERVICENAME] [-frequency FREQUENCY] [-debug]
Set upgrade parameters
options:
-h, --help show this help message and exit
-all All the parameters
-swstage SWSTAGE Software stage location, Example: /opt/oracle.ahf
-autoupgrade AUTOUPGRADE
Autoupgrade flag, Example: ON/OFF
-upgradetime UPGRADETIME
Enter the upgradetime time [H], [HH] or [HH:MM].
-fstype FSTYPE Stage location file system type, Example: nfs/acfs/local
-tmp_loc TMP_LOC Temporary location directory for AHF to extract the install archive to (must exist) (Default /tmp)
-remove_installer REMOVE_INSTALLER
Flag to removes AHF installer zip at stage location after auto upgrade, Example: yes/no (By default AHF does not remove AHF installer zip)
-servicename SERVICENAME
Name of REST download service, Default name is: ahf_upgrade_loc
-frequency FREQUENCY Autoupgrade frequency in the range (1,30), Example: 15
-debug Debug ScriptThe settings can either be made interactively.
[root@ra01dbadm01 sw_stage]# ahfctl setupgrade -all
Enter autoupgrade flag <on/off> : on
Enter software stage location : /u01/AHF/sw_stage
Enter auto upgrade frequency : 1
AHF autoupgrade parameters successfully updated
Successfully synced AHF configurationOr the settings are given directly as parameters.
For my example, I set the frequency to once a day. Every day at 18:30, the system will check whether there is a new file in the directory.
[root@ra01dbadm01 sw_stage]# ahfctl setupgrade -swstage /u01/AHF/sw_stage -autoupgrade on -frequency 1 -upgradetime 1830
Upgrade time set to 1830.
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration
refreshConfig() completed successfully.The command ahfctl getupgrade can be used to display the current settings.
[root@ra01dbadm01 sw_stage]# ahfctl getupgrade -all
autoupgrade : on
autoupgrade.swstage : /u01/AHF/sw_stage
autoupgrade.frequency : 1
autoupgrade.servicename : [not set]
autoupgrade.fstype : [not set]
autoupgrade.tmp_loc : [not set]
autoupgrade.remove_installer : [not set]
autoupgrade.upgradetime : 1830All activities and ongoing actions are of course logged. The log files are located in this directory:
/u01/app/oracle/oracle.ahf/data/ra01dbadm01/diag/ahf
When configuring the autoupgrade, a process starts regularly which starts the upgrade as soon as a new zip file is in the staging directory. The upgrade can be followed in the ahfctl.log.
[2023-04-21 19:15:16 CEST] [MainProcess 236527] [ahfupgrade] [upgrade_main] [940] [INFO] - Initiating Autonomous Health Framework (AHF) auto upgrade
[2023-04-21 19:15:16 CEST] [MainProcess 236527] [ahfupgrade] [extract_ahf] [337] [INFO] - File locked: /u01/AHF/sw_stage/ahf_zip_loc
[2023-04-21 19:15:18 CEST] [MainProcess 236527] [ahfupgrade] [extract_ahf] [368] [INFO] - /u01/stage/AHF/sw_stage/AHF-LINUX_v23.3.0.zip successfully extracted at /u01/AHF/sw_stage
[2023-04-21 19:15:18 CEST] [MainProcess 236527] [ahfupgrade] [validate_software_signature] [284] [INFO] - Verification command: /usr/bin/openssl dgst -sha256 -verify /u01/AHF/sw_stage/oracle-tfa.pub -signature /u01/AHF/sw_stage/ahf_setup.dat /u01/AHF/sw_stage/ahf_setup
[2023-04-21 19:15:19 CEST] [MainProcess 236527] [ahfupgrade] [validate_software_signature] [292] [INFO] - AHF software signature has been validated successfully
[2023-04-21 19:16:01 CEST] [MainProcess 236527] [ahfupgrade] [install_ahf] [1329] [INFO] - Starting to upgrade Autonomous Health Framework (AHF) from 232000_202303021115 to 233000_202304052152
Initiating Autonomous Health Framework (AHF) auto upgrade
/u01/AHF/sw_stage/AHF-LINUX_v23.3.0.zip successfully extracted at /u01/AHF/sw_stage
AHF software signature has been validated successfully
Starting to upgrade Autonomous Health Framework (AHF) from 232000_202303021115 to 233000_202304052152
[2023-04-21 19:19:29 CEST] - Autonomous Health Framework (AHF) successfully upgraded from 232000_202303021115 to 233000_202304052152
[2023-04-21 19:19:29 CEST] - Autonomous Health Framework (AHF) auto upgrade successfully completed
In addition, a log file is also written for this action: ahf_auto_upgrade_console_352470.log
Wed Apr 21 19:15:06 CEST 2023
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_233000_352496_2023_04_21-19_15_06.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 23.3.0 Build Date: 202304052152
AHF is already installed at /opt/oracle.ahf
Installed AHF Version: 23.2.0 Build Date: 202303021115
Upgrading /opt/oracle.ahf
Shutting down AHF Services
Upgrading AHF Services
Starting AHF Services
No new directories were added to TFA
Directory /u01/app/oracle/crsdata/ra01dbadm01/trace/chad was already added to TFA Directories.The status indicates that the upgrade is successful.
[root@ra01dbadm01 sw_stage]# tfactl status
.----------------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+-------------+---------------+--------+------+------------+----------------------+------------------+
| ra01dbadm01 | RUNNING | 266645 | 5000 | 23.3.0.0.0 | 23300020230405215257 | COMPLETE |
| ra01dbadm02 | RUNNING | 370840 | 5000 | 23.3.0.0.0 | 23300020230405215257 | COMPLETE |
'-------------+---------------+--------+------+------------+----------------------+------------------'


