2.5.3.1 Running AHFCTL Update Commands to Automatically Patch Oracle Autonomous Health Framework

You need AHF install user privileges to run the update, setupdate, getupdate, and unsetupdate commands.

2.5.3.1.1 ahfctl update

Use the ahfctl update command to apply AHF updates automatically.

Note:

You need AHF install user privileges to run the ahfctl update command.

Caution:

Make sure to test the metadata on a pre-production system before copying the downloaded file to the production-mounted filesystem.
  1. Configure automatic download on a staging server.
  2. Test the downloaded metadata on a pre-production system.
  3. Configure auto-update on all production systems.
  4. Copy the test metadata zip on production mounted file systems to automatically apply the update.

Syntax

ahfctl update 
[-h] 
[-nomos] 
[-debug]

Parameters

Table 2-1 ahfctl update Command Parameters

Parameter Description

-nomos

Specify not to configure MOS.

-debug

Specify the -debug option to enable debugging.

Example 2-15 New AHF metadate update is available at software stage location

ahfctl update
Updated file /opt/oracle.ahf/exachk/.cgrep/versions.dat
Updated file /opt/oracle.ahf/exachk/rules.dat
Updated file /opt/oracle.ahf/exachk/.cgrep/collections.dat
Updated file /opt/oracle.ahf/exachk/messages/check_messages.json
Data files updated to 20220607 from 20220516
Please copy ahf_data_20220607.zip and run the command 'ahfctl applyupdate -updatefile ahf_data_20220607.zip' on the below mentioned nodes
scao05adm08

Example 2-16 REST Endpoints parameters are configured and a new AHF metadata update is available at the REST Endpoint

ahfctl update
Applying AHF metedata update...
AHF update zip is not available at stage location /opt/rajeev
Upload configuration check for: ahf_update_loc.
Parameters are configured correctly to upload.
ahf_data_20220607.zip successfully downloaded at /opt/rajeev
Updated file /opt/oracle.ahf/exachk/.cgrep/versions.dat
Updated file /opt/oracle.ahf/exachk/rules.dat
Updated file /opt/oracle.ahf/exachk/.cgrep/collections.dat
Updated file /opt/oracle.ahf/exachk/messages/check_messages.json
Data files updated to 20220607 from 20220601
Please copy ahf_data_20220607.zip and run the command 'ahfctl applyupdate -updatefile ahf_data_20220607.zip' on the below mentioned nodes
scao05adm08

2.5.3.1.2 ahfctl setupdate

Use the ahfctl setupdate command to set update parameters.

Note:

You need AHF install user privileges to run the ahfctl setupdate command.

Syntax

ahfctl setupdate 
[-h] 
[-all] 
[-swstage SWSTAGE] 
[-autoupdate AUTOUPDATE] 
[-servicename SERVICENAME] 
[-fstype FSTYPE] 
[-frequency FREQUENCY]

Parameters

Table 2-2 ahfctl setupdate Command Parameters

Parameter Description

-all

Specify to configure all parameters.

-swstage SWSTAGE

Specify the software stage location, for example, /opt/oracle.ahf.

-autoupdate AUTOUPDATE

Specify to enable or disable autoupdate. Default: on. Valid values: on|off.

-servicename SERVICENAME

Specify the name of the REST download service. Default: ahf_update_loc.

-fstype FSTYPE

Specify the stage location file system type, for example, nfs/acfs/local.

-frequency FREQUENCY

Specify the autoupdate frequency in days in the range (1,30), for example, 15.

-debug

Specify the -debug option to enable debugging.

Example 2-17 Set update configuration

ahfctl setupdate -swstage /opt/oracle.ahf -autoupdate on

Example 2-18 Set all update parameters

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

Example 2-19 Disable autoupdate

ahfctl setupdate -autoupdate off
AHF autoupdate parameters successfully updated
Successfully synced AHF configuration

2.5.3.1.3 ahfctl getupdate

Use the ahfctl getupdate command to get update parameters.

Note:

You need AHF install user privileges to run the ahfctl getupdate command.

Syntax

ahfctl getupdate 
[-h] 
[-all] 
[-debug]

Parameters

Table 2-3 ahfctl getupdate Command Parameters

Parameter Description

-all

Specify to get all parameters.

-debug

Specify the -debug option to enable debugging.

Example 2-20 Get all update parameters

ahfctl getupdate -all
autoupdate : on
autoupdate.swstage : /opt/oracle.ahf
autoupdate.frequency : 30
autoupdate.servicename : [not set]
autoupdate.fstype : [not set]

2.5.3.1.4 ahfctl unsetupdate

Use the ahfctl unsetupdate command to unset update parameters.

Note:

You need AHF install user privileges to run the ahfctl unsetupdate command.

Syntax

ahfctl setupdate 
[-h] 
[-all] 
[-swstage SWSTAGE] 
[-autoupdate AUTOUPDATE] 
[-servicename SERVICENAME] 
[-fstype FSTYPE] 
[-frequency FREQUENCY]

Parameters

Table 2-4 ahfctl setupdate Command Parameters

Parameter Description

-all

Specify to unset all parameters.

-swstage SWSTAGE

Specify to unset the software stage location.

-autoupdate AUTOUPDATE

Specify to unset the autoupdate flag.

-servicename SERVICENAME

Specify to uset the REST download service name.

-fstype FSTYPE

Specify to unset the stage location file system type.

-frequency FREQUENCY

Specify to unser the autoupdate frequency.

-debug

Specify the -debug option to enable debugging.

Example 2-21 Unset a single update parameter

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

Example 2-22 Unset all update configuration

ahfctl unsetupdate -all
AHF update parameters successfully removed
Successfully synced AHF configuration

2.5.3.1.5 How to Apply an Update

Configure AHF to automatically download new compliance checks and SRDCs from MOS (My Oracle Support) or a REST Endpoint.

  1. Configure MOS credentials.

    For example:

    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
  2. Configure auto update.

    For example:

    ahfctl setupdate -autoupdate on -swstage /my/staging/path -frequency 1
  3. Apply update when you're ready.
    ahfctl update