On April 23, 2025, OS Management reaches end of life (EOL). Effective now, the service is no longer available to you in regions where you are not already using OS Management, or to new users with new tenancies. Before the EOL date, we recommend that you migrate your managed instances to the OS Management Hub service. If you are an Oracle Autonomous Linux user, see Important Maintenance Event. For more information, see the Service Change Announcement.
Describes how to manage OS Management scheduled jobs and work requests.
Scheduled Jobs
When you use the OS Management service to manage updates on
a managed instance or managed instance group, you have full control over when
actions takes place.
If you specify that an action take place immediately, the OS Management service creates a work request.
If you specify that an action is to take place at a particular date and time, the
OS Management service creates a scheduled job. There
are two basic modes for scheduled jobs:
A scheduled job in which the job executes once.
You can schedule one-time jobs for tasks such as installing an update or a set
of updates. These tasks represent activities that are specific to a one-time
event. For example, you can schedule a one-time job installing a specific
package version, like Python, to support an application. When scheduling these
actions, you have the option to perform the action immediately or to choose a
Custom Schedule where you can select the Date and Time on
which to schedule a one-time job.
A scheduled job in which the job recurs at a specified interval.
You can schedule recurring jobs for tasks such as installing all available
updates for a managed instance group. For example, you can schedule a job to
install all security updates every week at a certain time. When scheduling these
actions, you have the option to perform the action immediately or to choose a
Custom Schedule where you can select the Date and Time to
initially run the job and then optionally set the job to Repeat at a
specified interval (Hourly, Daily, Weekly, or
Monthly).
When the scheduled date and time are reached, one or more work requests are created
to perform the action. You have full control over scheduled jobs, to run them
immediately, to delete them, or to skip a recurring job. The OS Management service maintains a complete history of scheduled
jobs and their associated work requests.
Actions such as installing or removing updates are asynchronous and initiate work
requests. You can use the work request to track the status of these operations,
including the ability to see why an action failed. The OS Management service maintains a complete history of work
requests on managed instances or managed instance groups.
Work Request States 🔗
The work request states are:
Accepted
The request is in the work request queue to be processed.
In Progress
The work request is being processed.
Succeeded
The work request has been processed successfully.
Failed
The work request has not been processed successfully. You can look at the work request logs to identify the issues, and then troubleshoot it.
Canceling
The work request is being canceled.
Canceled
The work request has been canceled.
Note
The OS Management service cleans up work requests that are
older than 2 weeks, which have completed successfully or failed. Any work request that
has not started or is in progress is not cleaned up.
For a full list of API operations available for the OS Management service, see OS Management API.
Using the Python SDK to Generate Compliance Reports 🔗
This section shows how to run a security compliance report using an example Python script
(compliance_report.py) that
leverages the OS Management APIs. The example Python script
generates a security compliance report, either across a tenancy or per compartment, for
all managed instances that are missing security updates.
Note
The Python SDK enables you to write code to manage Oracle Cloud Infrastructure
resources. For more information, see Python SDK.
Run the script to generate a security compliance report.
To see the options available for running the script, run the
compliance_report.py script with
--help option.
# python3 compliance_report.py --help
usage: compliance_report.py [-h] --compartment-ocid COMPARTMENT_ID
[--region REGION] [--use-instance-principles]
[--managed-instance-group-ocid MANAGED_INSTANCE_GROUP_ID]
[--oci-config CONFIG_FILE]
[--oci-config-profile CONFIG_PROFILE]
[--show-details] [--recursive] [--verbose]
[--version]
OS Management Reporting
optional arguments:
-h, --help show this help message and exit
--compartment-ocid COMPARTMENT_ID, -c COMPARTMENT_ID
Compartment to run query against, defaults to the root
compartment
--region REGION, -r REGION
Region to run query against
--use-instance-principles, -I
Authenticate using Instance Principles
--managed-instance-group-ocid MANAGED_INSTANCE_GROUP_ID, -g MANAGED_INSTANCE_GROUP_ID
Managed Instance Group to query
--oci-config CONFIG_FILE, -C CONFIG_FILE
Oracle Cloud Infrastructure config file
--oci-config-profile CONFIG_PROFILE, -P CONFIG_PROFILE
Oracle Cloud Infrastructure config profile to use
--show-details, -d Show detailed report
--recursive, -R Recursively scan sub-compartments
--verbose, -v Enable verbose mode
--version show program's version number and exit
Important
When using the compliance_report.py script, note the
following usage guidelines:
You must have the proper permissions to read and query the
compartment to successfully run this example script.
The --compartment-ocid option is required. For
Compartment_ID, specify either the tenancy
OCID (the root compartment) or the OCID for a compartment in the
tenancy.
The --use-instance-principles option sets the
script to authenticate using Oracle Cloud Infrastructure instance
principles. If you do not use this option, you must have a profile
set up in ~/.oci/config.
The --recursive option generates the report for the
compartment and any subcompartments within that region. You cannot
use the --recursive option with managed instance
groups. If you are running the report at the compartment level, do
not use the --recursive option.
When using the --show details option, the output
displays a detailed listing of the specific security patches that
are missing for each managed instance. If you run the script without
this option, the output highlights only which managed instances are
missing updates and how many updates are missing.
The --region option is optional.
If you have specified a specific region in
~/.oci/config, you can use the
--region option to override this region
with the one that you specify for this parameter.
If you are using instance principles, you can run the script
in one region and use the --region option
to target a different region.
The following example shows how to generate a sample report using the
compliance_report.py script:
# python3 compliance_report.py --use-instance-principles --compartment-ocid=ocid1.tenancy.oc1..<unique_ID> --recursive --show-details --region=eu-zurich-1
Patch Compliance Report Sample
==============================
Detected out of 7 managed instances, 7 are missing security patches!
Managed Instance sqa-test-prod-zurich-win2019srvstd (ocid1.instance.oc1.eu-zurich-1..<unique_ID>)
has the following outstanding security patches:
2020-04 Cumulative Update for Windows Server 2019 (1809) for x64-based Systems (KB4549949)
Managed Instance sqa-test-prod-zurich-win2016srvstd (ocid1.instance.oc1.eu-zurich-1..<unique_ID>)
has the following outstanding security patches:
Security Intelligence Update for Windows Defender Antivirus - KB2267602 (Version 1.315.54.0)
2020-04 Servicing Stack Update for Windows Server 2016 for x64-based Systems (KB4550994)
Managed Instance sqa-test-prod-zurich-win2012srvstd (ocid1.instance.oc1.eu-zurich-1..<unique_ID>)
has the following outstanding security patches:
2020-04 Security Monthly Quality Rollup for Windows Server 2012 R2 for x64-based Systems (KB4550961)
Managed Instance sqatest-ol6-0 (ocid1.instance.oc1.eu-zurich-1..<unique_ID>)
has the following outstanding security patches:
libcurl
CVEs: CVE-2019-5482
python
CVEs: CVE-2018-20852
kernel-uek-firmware
CVEs: CVE-2018-5953, CVE-2019-18806, CVE-2020-10942
python-libs
CVEs: CVE-2018-20852
sudo
CVEs: CVE-2019-18634
curl
CVEs: CVE-2019-5482
kernel-uek
CVEs: CVE-2018-5953, CVE-2019-18806, CVE-2020-10942
kernel
CVEs: CVE-2017-1000371, CVE-2019-17666
libicu
CVEs: CVE-2020-10531
Managed Instance sqatest-ol7-0 (ocid1.instance.oc1.eu-zurich-1..<unique_ID>)
has the following outstanding security patches:
kernel-tools-libs
CVEs: CVE-2015-9289, CVE-2017-17807, CVE-2018-19985, CVE-2018-20169,
CVE-2018-7191, CVE-2019-10207, CVE-2019-10638, CVE-2019-10639,
CVE-2019-11190, CVE-2019-11884, CVE-2019-12382, CVE-2019-13233,
CVE-2019-13648, CVE-2019-14283, CVE-2019-15916, CVE-2019-16746,
CVE-2019-18660, CVE-2019-3901, CVE-2019-9503
sqlite
CVEs: CVE-2019-13734
python
CVEs: CVE-2018-20852, CVE-2019-16056
kernel-uek
CVEs: CVE-2018-5953, CVE-2019-18806, CVE-2019-18809, CVE-2020-10942
python-libs
CVEs: CVE-2018-20852, CVE-2019-16056
file
CVEs: CVE-2018-10360
file-libs
CVEs: CVE-2018-10360
curl
CVEs: CVE-2019-5436
libcurl
CVEs: CVE-2019-5436
mariadb-libs
CVEs: CVE-2019-2737, CVE-2019-2739, CVE-2019-2740, CVE-2019-2805
kernel-tools
CVEs: CVE-2015-9289, CVE-2017-17807, CVE-2018-19985, CVE-2018-20169,
CVE-2018-7191, CVE-2019-10207, CVE-2019-10638, CVE-2019-10639,
CVE-2019-11190, CVE-2019-11884, CVE-2019-12382, CVE-2019-13233,
CVE-2019-13648, CVE-2019-14283, CVE-2019-15916, CVE-2019-16746,
CVE-2019-18660, CVE-2019-3901, CVE-2019-9503
Managed Instance sqatest-ol8-0 (ocid1.instance.oc1.eu-zurich-1..<unique_ID>)
has the following outstanding security patches:
sudo
CVEs: CVE-2019-18634
grub2-pc
CVEs: CVE-2019-14865
kernel
CVEs: CVE-2019-15030, CVE-2019-15031, CVE-2019-18660, CVE-2019-19527
grub2-pc-modules
CVEs: CVE-2019-14865
sqlite-libs
CVEs: CVE-2019-13734
grub2-tools
CVEs: CVE-2019-14865
grub2-tools-minimal
CVEs: CVE-2019-14865
grub2-common
CVEs: CVE-2019-14865
bpftool
CVEs: CVE-2019-15030, CVE-2019-15031, CVE-2019-18660, CVE-2019-19527
nss
CVEs: CVE-2019-11745
kernel-modules
CVEs: CVE-2019-15030, CVE-2019-15031, CVE-2019-18660, CVE-2019-19527
libarchive
CVEs: CVE-2019-18408
grub2-tools-extra
CVEs: CVE-2019-14865
kernel-tools
CVEs: CVE-2019-15030, CVE-2019-15031, CVE-2019-18660, CVE-2019-19527
nss-util
CVEs: CVE-2019-11745
kernel-tools-libs
CVEs: CVE-2019-15030, CVE-2019-15031, CVE-2019-18660, CVE-2019-19527
nss-sysinit
CVEs: CVE-2019-11745
Managed Instance wb-zrh-cli-test (ocid1.instance.oc1.eu-zurich-1..<unique_ID>)
has the following outstanding security patches:
Security Intelligence Update for Windows Defender Antivirus - KB2267602 (Version 1.315.38.0)
2020-04 Cumulative Update for Windows Server 2019 (1809) for x64-based Systems (KB4549949)