Diagnostics

Automatic Upgrade Autonomous Health Framework

Das Mittel der Wahl, um Informationen wie Healthchecks oder Diagnostic Collections zu bekommen, ist das Autonomous Health Framework (AHF)

Neben der Dokumentation und wichtigen FAQs findet sich auch die Software in dieser MOS Note.

Autonomous Health Framework (AHF) – Including TFA and ORAchk/EXAchk (Doc ID 2550798.1)

Mit wenigen Schritten lässt sich das Autonomous Health Framework (AHF) automatisch auf die neueste Version aktualisieren:

  1. Autoupgrade konfigurieren
  2. Neue AHF Version in ein Stage Verzeichnis laden.
  3. AHF wird die neue Version erkennen und den Upgrade automatisch durchführen.

Aktuell ist die AHF Version 23.2 auf dem System installiert.

[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         |
'-------------+---------------+--------+------+------------+----------------------+------------------'

Die neue zip-Datei in ein Staging Verzeichnis auf dem Server ablegen.

[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.zip

Mittels ahctl setupgrade ist es möglich verschiedene Einstellungen für das Upgrade vorzunehmen.

[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 Script

Die Einstellungen können entweder interaktiv vorgenommen werden

[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 configuration

Oder die Einstellungen werden direkt als Parameter mitgegeben.

Für mein Beispiel habe die Frequenz auf einmal täglich gesetzt. Jeden Tag um 18:30 wird geprüft, ob sich eine neue Datei im Verzeichnis befindet.

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

Mit dem Befehl ahfctl getupgrade lassen sich die aktuellen Einstellungen anzeigen.

[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 : 1830

Alle Tätigkeiten und laufenden Aktionen werden selbstverständlich mit protokolliert. Die logfiles dazu liegen in diesem Verzeichnis:

/u01/app/oracle/oracle.ahf/data/ra01dbadm01/diag/ahf

Mit dem Konfigurieren des Autoupgrades startet regelmäßig ein Prozess, der den Upgrade startet, sobald ein neues zip-Datei im Staging Verzeichnis befindet. Im ahfctl.log lässt sich der Upgrade verfolgen.

[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

Zusätzlich wird auch ein Logfile zu dieser Aktion geschrieben: 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.

Den Status zeigt an, dass der Upgrade erfolgreich ist.

[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         |
'-------------+---------------+--------+------+------------+----------------------+------------------'

Leave a Reply

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert