2.5.2 Oracle Autonomous Health Frameworkのアップグレード

Linux、UNIXおよびMicrosoft Windowsオペレーティング・システムにOracle Autonomous Health Frameworkをアップグレードする方法を学習します。

ノート:

AHFバージョン23.7.0以降、AHFフル・インストーラはJava 11に付属しています。

2.5.2.1 Oracle Autonomous Health Frameworkの最新バージョンへの保守

Oracle Autonomous Health Frameworkの新しいバージョンは、毎月リリースされます。

標準リリース更新リビジョン(RUR)を適用すると、Oracle Autonomous Health Frameworkが自動的に更新されます。ただし、リリース更新リビジョン(RUR)には、他のOracle Databaseサポート・ツール・バンドルの更新が含まれていません。My Oracle Supportノート2550798.1から、Oracle Databaseサポート・ツール・バンドルを含むOracle Autonomous Health Frameworkの最新バージョンをダウンロードしてください。

アップグレードは、初回インストールと似ています。rootとして、ahf_setupスクリプトを使用します。Oracle Autonomous Health Frameworkがすでにインストールされている場合、インストーラによって既存のインストールが更新されます。すでにインストールされている場合、クラスタのアップグレードにSSHは必要ありません。クラスタのアップグレードでは、ホスト間で既存のデーモン・セキュア・ソケット通信が使用されます。

$ ahf_setup

2.5.2.2 Oracle Autonomous Health Frameworkの最新バージョンへの自動アップグレード

AHF自動アップグレードでは、ahf_setupを手動でダウンロードしてアップグレードしなくても、AHFをオンザフライでアップグレードできます。

ノート:

アップグレード・コマンドを実行するには、AHFをインストールしたユーザー権限が必要です。

自動アップグレード・サポート・マトリックス

自動アップグレードは次でサポートされています。
  • Linux
  • Solaris
  • AIX

ノート:

  • autoupgradeをサポートするには、すべてのプラットフォームでopensslが必要です。opensslが存在しない場合、autoupgradeは正常に終了します。
  • デフォルト・ポート(443)を使用していない場合、AHFを正常にアップグレードするには、ahfctl setuploadコマンドを使用してカスタム・ポートを構成する必要があります。
自動アップグレードは次ではサポートされていません。
  • HP-UX
  • Microsoft Windows
  • AHF (Exadata dom0を除く)のスタンドアロン(抽出)インストール

root以外のユーザーによるAHFの自動アップグレードは、既存のインストールが同じユーザーによって実行され、インストール・タイプが標準(フル)である場合にのみサポートされます。たとえば、ユーザーXがAHFをインストールした場合、ユーザーYは自動アップグレードを実行できません。

AHFの自動アップグレード:

Oracle Trace File Analyzerスケジューラは、ソフトウェア・ステージングの場所またはRESTエンドポイント(オブジェクト・ストア)のいずれかで新しいバージョンのAHFを検出すると、自動的にAHFをアップグレードします。

Oracle Trace File Analyzerスケジューラは、新しいバージョンのAHFがAHFソフトウェア・ステージングまたはRESTエンドポイント(オブジェクト・ストア)に存在するかどうかを確認するために、毎週の時間間隔で実行されるようスケジュールされています。新しいバージョンのAHFが検出されると、Oracle Trace File Analyzerスケジューラは、保存されている構成を変更せずに、自動的にAHFを最新バージョンにアップグレードします。

upgradeオプションを使用したAHFのアップグレード:

このオプションを使用すると、経過日数に関係なくAHFをアップグレードできます。新しいバージョンのAHFがソフトウェア・ステージングの場所またはRESTエンドポイント(オブジェクト・ストア)のいずれかに存在する場合、AHFはアップグレードされます。新しいバージョンのAHFがこれら2つの場所で検出されない場合は、AHFをMOSからソフトウェア・ステージングにダウンロードしてアップグレードします。
ahfctl upgrade
コマンドライン・オプションを使用して、ahf.propertiesファイルに次の属性を設定します。
ahfctl setupgrade -autoupgrade <on/off> -swstage path
自動アップグレードを無効にするには、次のようにします:
ahfctl setupgrade -autoupgrade off
または
ahfctl unsetupgrade -autoupgrade
自動アップグレード・パラメータの設定を解除するには、次のようにします。
ahfctl unsetupgrade 
[-all] 
[-swstage] 
[-autoupgrade] 
[-servicename] 
[-frequency]
自動アップグレードの構成パラメータを取得するには、次のようにします。
ahfctl getupgrade -all

ノート:

自動アップグレードで最適な結果を得るには、最新バージョンのAHFを実行します。

例2-1 有効な入力による自動アップグレード・パラメータの設定

ahfctl setupgrade -swstage /scratch/ahf_stage -autoupgrade on -frequency 21
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration

例2-2 有効な入力によるすべての自動アップグレード・パラメータの設定

ahfctl setupgrade -all
Enter autoupgrade flag <on/off> : on
Enter software stage location : /scratch/ahf_stage
Enter auto upgrade frequency : 30
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration

例2-3 自動アップグレードの無効化

Oracle Trace File Analyzerスケジューラは自動アップグレードを実行しません。

ahfctl setupgrade -autoupgrade off
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration

例2-4 アップグレード・エントリの出力

ahfctl getupgrade -all
autoupgrade : off
autoupgrade.swstage : /scratch/ahf_stage
autoupgrade.frequency : 30
autoupgrade.servicename : [not set]

例2-5 すべてのアップグレード・パラメータの設定解除

ahfctl unsetupgrade -all
AHF upgrade parameters successfully removed
Successfully synced AHF configuration

例2-6 単一パラメータの設定解除

ahfctl unsetupgrade -swstage
Software stage location successfully removed
Successfully synced AHF configuration

例2-7 無効な頻度

ahfctl setupgrade -frequency 0
Invalid autoupgrade frequency. Use frequency between 1 and 30

例2-8 AHFが180日以上経過している場合

ahfctl getupload
Autonomous Health Framework is older than 180 days. please use "ahfctl upgrade" to upgrade to latest version of AHF
continue running original command ...
ahfctl upgrade
Starting download of Autonomous Health Framework from: https://updates.oracle.com/Orion/Services/download/AHF-LINUX_v20.2.3.zip?aru=23858854&patch_file=AHF-LINUX_v20.2.3.zip
...
Upgrading Autonomous Health Framework
...

例2-9 AHFが365日以上経過している場合

ahfctl getupload
Autonomous Health Framework is older than 360 days. please use "ahfctl upgrade" to latest version of AHF
ahfctl upgrade
Starting download of Autonomous Health Framework from: https://updates.oracle.com/Orion/Services/download/AHF-LINUX_v20.2.3.zip?aru=23858854&patch_file=AHF-LINUX_v20.2.3.zip
...
Upgrading Autonomous Health Framework
...

例2-10 新しいバージョンのAHFがソフトウェア・ステージングの場所で使用可能な場合

ahfctl upgrade
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_211000_31931_2021_03_29-06_54_58.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 21.1.0 Build Date: 202103290252
AHF is already installed at /opt/oracle.ahf
Installed AHF Version: 21.1.0 Build Date: 202103290200
Upgrading /opt/oracle.ahf
Shutting down AHF Services
Shutting down TFA
. . . . .
. . .
Successfully shutdown TFA..
Starting AHF Services
Starting TFA..
Waiting up to 100 seconds for TFA to be started..
. . . . .
. . . . .
Successfully started TFA Process..
. . . . .
TFA Started and listening for commands
No new directories were added to TFA
INFO: Starting exachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/busm01client01/diag/exachk/compliance_start_290321_065650.log
AHF is sucessfully upgraded to latest version
.----------------------------------------------------------------------.
| Host | TFA Version | TFA Build ID | Upgrade Status |
+----------------+-------------+----------------------+----------------+
| node01 	 | 21.1.0.0.0 | 21100020210329025257 | UPGRADED |
| node02	  | 21.1.0.0.0 | 21100020210329020041 | UPGRADED |
'----------------+-------------+----------------------+----------------'
Moving /tmp/ahf_install_211000_31931_2021_03_29-06_54_58.log to /u01/app/grid/oracle.ahf/data/busm01client01/diag/ahf/
Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
node02

例2-11 setuploadコマンドを使用したRESTエンドポイントの設定

ahfctl setupload -name ahf_upgrade_loc -type https -url 'https://IP Address/rest/tfa-processor/download?osName=LINUX&ahfVersion=%2720.2%27' 
-https_token "X-TFA-Authorization: <>" 
-header Content-Type:application/json

ノート:

構成の名前は常にahf_upgrade_locである必要があります。この名前は、構成がAHFダウンロード用であることを示します。

ahfctl setupgrade -autoupgrade_servicename new nameを使用してahf_upgrade_locを上書きできます

RESTエンドポイントで、新しいバージョンが使用可能な場合、AHFはAHFインストーラzipをダウンロードします。

例2-12 setuploadコマンドの使用によるカスタム・ポートを指定したRESTエンドポイントの設定

ahfctl setupload -name ahf_upgrade_loc -type https -url 'https://IP Address/rest/tfa-processor/download?osName=LINUX&ahfVersion=%2720.2%27' 
-https_token "X-TFA-Authorization: <>" 
-header Content-Type:application/json -port <port number>

例2-13 setuploadコマンドを使用したRESTエンドポイント(オブジェクト・ストア)の設定

ahfctl setupload 
-name ahf_upgrade_loc 
-type https 
-user testuser 
-url https://host.domain/v1/id5igemtjzlt/tfa_bucket -password

オブジェクト・ストアでは、ahf_setupまたはzipを保持できます。まず、AHFはahf_setupのダウンロードを試みます。ahf_setupを使用できない場合、AHFはAHFインストーラzipを検索します。

  1. オブジェクト・ストレージのエンドポイントを構成します。
    ahfctl setupload -name upload_end_point -type https
    Enter upload_end_point.https.user: john.doe@acme.com
    Enter upload_end_point.https.password:
    Enter upload_end_point.https.url: https://swiftobjectstorage.acme.com/v1/dbaasimage/CAIPING
    Successfully synced AHF configuration
  2. アップロード構成の名前を使用してsetupgradeを構成します。
    ahfctl setupgrade -servicename upload_end_point
    Successfully synced AHF configuration
    AHF autoupgrade parameters successfully updated
  3. ahfctl upgradeコマンドを実行します。
    ahfctl upgrade
    Upload configuration check for: upload_end_point.
    Parameters are configured correctly to upload.
    
    AHF-LINUX_v21.1.0.zip successfully downloaded at /opt/oracle.ahf
    /opt/oracle.ahf/AHF-LINUX_v21.1.0.zip successfully extracted at /opt/oracle.ahf
    
    AHF software signature has been validated successfully

例2-14 mosアップロード構成の設定

ahfctl setupload -name mosconf1 -type https
Enter mosconf1.https.user : john.doe@acme.com
Enter mosconf1.https.password :
Enter mosconf1.https.url : https://transport.oracle.com/upload/issue
Successfully synced AHF configuration
Upload configuration set for: mosconf1
type: https
mosconf1.https.user: john.doe@acme.com
mosconf1.https.password: ******
mosconf1.https.url: https://transport.oracle.com/upload/issue
Service upload parameters successfully stored.
AHF will continue to upload the collections to the Service until unset using tfactl unsetserviceupload [-all]

2.5.2.3 ローカル・ファイル・システム、ACFSおよびNFS上のAHFのアップグレード

ローカル・ファイル・システム、Oracle Advanced Cluster File System (Oracle ACFS)およびネットワーク・ファイル・システム(NFS)上のAHFをアップグレードできます。

ローカル・ファイル・システム

ステージングの場所がローカル・ファイル・システムで、AHFインストーラのzipファイルがステージングの場所に存在する場合は、アップグレード後、インストーラによってAHFインストーラのzipファイルおよび抽出したすべての項目がステージングの場所から削除されます。

  1. 自動アップグレード・パラメータを構成します。
    ahfctl setupgrade -all
    
    Enter autoupgrade flag <on/off> : on
    Enter software stage location : /opt/local
    Enter auto upgrade frequency : 30
    AHF autoupgrade parameters successfully updated
    Successfully synced AHF configuration
    refreshConfig() completed successfully.
  2. AHFインストーラのzipファイルがステージの場所に存在するかどうかを確認します。
    ls /opt/local
    AHF-LINUX_v22.1.0.zip

    ノート:

    Oracle Trace File Analyzerスケジューラは、指定された頻度でahfctl upgrade -nomosをコールします。この例では、自動アップグレードは30日ごとに午前3時に実行されます。ahfctl upgradeコマンドを使用して、コマンドラインから自動アップグレードを開始することもできます。

  3. upgradeコマンドを実行します。
    ahfctl upgrade
    AHF Installer for Platform Linux Architecture x86_64
    AHF Installation Log : /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log
    Starting Autonomous Health Framework (AHF) Installation
    AHF Version: 22.1.0 Build Date: 202203081742
    AHF is already installed at /opt/oracle.ahf
    Installed AHF Version: 22.1.0 Build Date: 202203081714
    Upgrading /opt/oracle.ahf
    Shutting down AHF Services
    Nothing to do !
    Shutting down TFA
    Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
    Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
    Successfully shutdown TFA..
    Starting AHF Services
    Starting TFA..
    Waiting up to 100 seconds for TFA to be started..
    . . . . .
    Successfully started TFA Process..
    . . . . .
    TFA Started and listening for commands
    No new directories were added to TFA
    Directory /u01/app/grid/crsdata/scao05adm07/trace/chad was already added to TFA Directories.
    INFO: Starting exachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/scao05adm07/diag/exachk/compliance_start_090322_021151.log
    AHF is successfully upgraded to latest version
    .-------------------------------------------------------------------.
    | Host        | TFA Version | TFA Build ID         | Upgrade Status |
    +-------------+-------------+----------------------+----------------+
    | scao05adm07 |  22.1.0.0.0 | 22100020220308174218 | UPGRADED       |
    | scao05adm08 |  22.1.0.0.0 | 22100020220308171448 | UPGRADED       |
    '-------------+-------------+----------------------+----------------'
    Moving /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log to /u01/app/grid/oracle.ahf/data/scao05adm07/diag/ahf/
    Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
    scao05adm08
  4. AHFインストーラのzipおよび抽出されたファイルがステージングの場所から削除されたかどうかを検証します。
    ls -lart /opt/local
    drwxr-xr-x   2 root     root           2 Mar  9 02:32 .
    drwxr-xr-x  25 root     sys           28 Mar  9 02:32 ..

Oracle Advanced Cluster File System (Oracle ACFS)

ステージングの場所がACFSで、AHFインストーラのzipファイルがステージングの場所に存在する場合、アップグレード後、インストーラによってAHFインストーラのzipファイルが削除され、他のノードが使用できるようにステージングの場所に抽出されたすべてのバイナリが保持されます。

  1. 自動アップグレード・パラメータを構成します。
    ahfctl setupgrade -all
    Enter autoupgrade flag <on/off> : on
    Enter software stage location : /acfs01
    Enter auto upgrade frequency : 30
    AHF autoupgrade parameters successfully updated
    Successfully synced AHF configuration
    refreshConfig() completed successfully.
  2. AHFインストーラのzipファイルがステージの場所に存在するかどうかを確認します。
    ls -lart /acfs01
    total 387862
    -rw-r--r--+  1 root root       1520 Apr 30  2020 README.txt
    -rw-r--r--+  1 root root        625 Nov  1 15:15 oracle-tfa.pub
    -rw-r--r--+  1 root root        384 Jan  4 22:45 ahf_setup.dat
    -rwxr-xr-x+  1 root root  392587026 Mar  9 01:55 ahf_setup
  3. upgradeコマンドを実行します。
    ahfctl upgrade
    AHF Installer for Platform Linux Architecture x86_64
    AHF Installation Log : /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log
    Starting Autonomous Health Framework (AHF) Installation
    AHF Version: 22.1.0 Build Date: 202203081742
    AHF is already installed at /opt/oracle.ahf
    Installed AHF Version: 22.1.0 Build Date: 202203081714
    Upgrading /opt/oracle.ahf
    Shutting down AHF Services
    Nothing to do !
    Shutting down TFA
    Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
    Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
    Successfully shutdown TFA..
    Starting AHF Services
    Starting TFA..
    Waiting up to 100 seconds for TFA to be started..
    . . . . .
    Successfully started TFA Process..
    . . . . .
    TFA Started and listening for commands
    No new directories were added to TFA
    Directory /u01/app/grid/crsdata/scao05adm07/trace/chad was already added to TFA Directories.
    INFO: Starting exachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/scao05adm07/diag/exachk/compliance_start_090322_021151.log
    AHF is successfully upgraded to latest version
    .-------------------------------------------------------------------.
    | Host        | TFA Version | TFA Build ID         | Upgrade Status |
    +-------------+-------------+----------------------+----------------+
    | scao05adm07 |  22.1.0.0.0 | 22100020220308174218 | UPGRADED       |
    | scao05adm08 |  22.1.0.0.0 | 22100020220308171448 | UPGRADED       |
    '-------------+-------------+----------------------+----------------'
    Moving /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log to /u01/app/grid/oracle.ahf/data/scao05adm07/diag/ahf/
    Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
    scao05adm08
  4. AHFインストーラのzipが削除され、抽出されたバイナリが保持されていることを検証します。
    ls -lart /acfs01
    -rw-r--r--+  1 root root       1520 Apr 30  2020 README.txt
    -rw-r--r--+  1 root root        625 Nov  1 15:15 oracle-tfa.pub
    -rw-r--r--+  1 root root        384 Jan  4 22:45 ahf_setup.dat
    -rwxr-xr-x+  1 root root  392587026 Mar  9 01:55 ahf_setup
    

ネットワーク・ファイル・システム(NFS)

  • ステージングの場所がNFSで、AHFインストーラzipファイルがステージングの場所に存在する場合は、インストーラはそれを抽出するようユーザーに要求します。
  • ステージングの場所に抽出された形式のAHFバイナリがある場合は、アップグレード後、インストーラは抽出されたAHFバイナリをそのまま保持します。
  • ステージングの場所にAHFインストーラのzipファイルがある場合、アップグレード後、インストーラによってAHFインストーラのzipファイルが削除されます。
  1. 自動アップグレード・パラメータを構成します。
    ahfctl setupgrade -all
    Enter autoupgrade flag <on/off> : on
    Enter software stage location : /export/sheisey_R/ahf_stage
    Stage location /export/sheisey_R/ahf_stage file system type is NFS. User needs to unzip AHF zip placed at NFS file system.
    Enter auto upgrade frequency : 30
    AHF autoupgrade parameters successfully updated
    Successfully synced AHF configuration
    refreshConfig() completed successfully.
  2. 抽出されたフォームのAHFインストーラのzipファイルまたはAHFバイナリがステージングの場所に存在するかどうかをチェックします。
    ls -lart /export/sheisey_R/ahf_stage
    -rw-r--r--    1 root root  389105013 Feb  3 06:08 AHF-LINUX_v22.1.0.zip
    -rw-r--r--+  1 root root       1520 Apr 30  2020 README.txt
    -rw-r--r--+  1 root root        625 Nov  1 15:15 oracle-tfa.pub
    -rw-r--r--+  1 root root        384 Jan  4 22:45 ahf_setup.dat
    -rwxr-xr-x+  1 root root  392587026 Mar  9 01:55 ahf_setup
  3. upgradeコマンドを実行します。
    ahfctl upgrade
    AHF Installer for Platform Linux Architecture x86_64
    AHF Installation Log : /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log
    Starting Autonomous Health Framework (AHF) Installation
    AHF Version: 22.1.0 Build Date: 202203081742
    AHF is already installed at /opt/oracle.ahf
    Installed AHF Version: 22.1.0 Build Date: 202203081714
    Upgrading /opt/oracle.ahf
    Shutting down AHF Services
    Nothing to do !
    Shutting down TFA
    Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
    Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
    Successfully shutdown TFA..
    Starting AHF Services
    Starting TFA..
    Waiting up to 100 seconds for TFA to be started..
    . . . . .
    Successfully started TFA Process..
    . . . . .
    TFA Started and listening for commands
    No new directories were added to TFA
    Directory /u01/app/grid/crsdata/scao05adm07/trace/chad was already added to TFA Directories.
    INFO: Starting exachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/scao05adm07/diag/exachk/compliance_start_090322_021151.log
    AHF is successfully upgraded to latest version
    .-------------------------------------------------------------------.
    | Host        | TFA Version | TFA Build ID         | Upgrade Status |
    +-------------+-------------+----------------------+----------------+
    | scao05adm07 |  22.1.0.0.0 | 22100020220308174218 | UPGRADED       |
    | scao05adm08 |  22.1.0.0.0 | 22100020220308171448 | UPGRADED       |
    '-------------+-------------+----------------------+----------------'
    Moving /tmp/ahf_install_221000_139332_2022_03_09-02_09_42.log to /u01/app/grid/oracle.ahf/data/scao05adm07/diag/ahf/
    Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
    scao05adm08
  4. AHFインストーラのzipが削除され、抽出されたバイナリが保持されているかどうかを検証します。
    ls -lart /export/sheisey_R/ahf_stage
    -rw-r--r--+  1 root root       1520 Apr 30  2020 README.txt
    -rw-r--r--+  1 root root        625 Nov  1 15:15 oracle-tfa.pub
    -rw-r--r--+  1 root root        384 Jan  4 22:45 ahf_setup.dat
    -rwxr-xr-x+  1 root root  392587026 Mar  9 01:55 ahf_setup