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.
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.
- Configure automatic download on a staging server.
- Test the downloaded metadata on a pre-production system.
- Configure auto-update on all production systems.
- Copy the test metadata zip on production mounted file systems to automatically apply the update.
Syntax
ahfctl update
[-h]
[-nomos]
[-debug]
Parameters
ahfctl update Command Parameters
| Parameter | Description |
|---|---|
-nomos | Specify not to configure MOS. |
-debug | Specify the -debug option to enable debugging. |
Example 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 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
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
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 Set update configuration
ahfctl setupdate -swstage /opt/oracle.ahf -autoupdate on
Example Set all update parameters
ahfctl setupdate -all
Enter autoupdate flag : on
Enter software stage location : /scratch/ahf_stage
Enter auto update frequency : 30
AHF autoupdate parameters successfully updated
Successfully synced AHF configuration
Example Disable autoupdate
ahfctl setupdate -autoupdate off
AHF autoupdate parameters successfully updated
Successfully synced AHF configuration
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 9-8 ahfctl getupdate Command Parameters
| Parameter | Description |
|---|---|
-all | Specify to get all parameters. |
-debug | Specify the -debug option to enable debugging. |
Example 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]
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
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 Unset a single update parameter
ahfctl unsetupdate -swstage
Software stage location successfully removed
Successfully synced AHF configuration
Example Unset all update configuration
ahfctl unsetupdate -all
AHF update parameters successfully removed
Successfully synced AHF configuration
How to Apply an Update
Configure AHF to automatically download new compliance checks and SRDCs from MOS (My Oracle Support) or a REST Endpoint.
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/issueConfigure auto update.
For example:
ahfctl setupdate -autoupdate on -swstage /my/staging/path -frequency 1Apply update when you're ready.
ahfctl update