Scheduled O&M

Scheduled Job

What is Scheduled O&M?

ZStack Cloud provides two types of scheduled O&M resources: scheduled jobs and schedulers. These two types of resources are independent from each other. You can create schedulers and scheduled jobs based on different rules, and associate or disassociate scheduled jobs with or from schedulers.

Concepts

  • A scheduled job defines that a specific action be implemented at a specified time based on a scheduler.
    • You can associate any available scheduled job with a scheduler.
    • You can select Disable, Enable, Attach, and Detach actions for a scheduled job based on your actual production environments.
    • If you delete a scheduler, the scheduled jobs associated with the scheduler will be disassociated. You can associate the scheduled jobs with other schedulers.
    • Operations triggered by scheduled jobs are all recorded by the Audit feature.
  • A scheduler is used to schedule jobs. It is suitable for business scenarios that last for a long time.
    • A scheduler defines the implementation rules for a scheduled job.
    • A scheduler can be used for long-term operations, for example, creating snapshots at a specified interval for a VM instance.
    • If you delete a scheduler, the scheduled jobs associated with the scheduler will be disassociated. You can associate the scheduled jobs with other schedulers.
    • Operations triggered by schedulers are all recorded by the Audit feature.

Considerations

In the production environment, we recommend that you create a maximum of five snapshots for a volume and do not configure frequent scheduled snapshotting. Creating an excessive number of snapshots will lower I/O performance of VM instances or volumes, increase data security risks, and occupy the storage space of primary storage. To back up data for the long term, you can use Backup Service.

Create a Scheduled Job

On the main menu of ZStack Cloud, choose Platform O&M > Scheduled O&M > Scheduled Job. On the Scheduled Job page, click Create Scheduled Job. Then, the Create Scheduled Job page appears.

On the displayed page, set the following parameters:
  • Name: Enter a name for the job.
  • Description: Optional. Enter a description for the job.
  • Job: Select a job type. Valid values: Start VM Instance, Stop VM Instance, Reboot VM Instance, Create VM Snapshot, and Create Volume Snapshot.
    Note: If you choose Stop VM Instance, note that the VM instances with HA enabled does not automatically reboot after they are stopped through this scheduled job.
  • Snapshot Type: When you set the job type as Create Snapshot for VM instance, select a snapshot type for the job. You can create single snapshots or snapshot groups. A single snapshot is the snapshot of the VM root volume. A snapshot group consists snapshots of both the VM root volume and data volumes attached to the VM instances.
    Note:
    • A snapshot group created by a scheduled job does not contain a memory snapshot.
    • To create snapshot groups, make sure that the VM root volume and data volumes are on Ceph primary storage. If you migrate VM/volumes to another-type storage or attach the VM instance with new data volumes that are not on Ceph primary storage after you create the scheduled job, it fails to create snapshot groups after the migrations or attachments.
    • To create snapshot groups, make sure that the VM instance does not have a shared volume attached. If you attach a shared volume to a VM instance after you create the scheduled job, it fails to create snapshot groups after the attachment.
  • VM Instance/Volume: Select one or more VM instances or volumes for the scheduled job.
    Note: If you set the job type as Create VM Snapshot or Create Volume Snapshot, note:
    • You cannot select a VM/Volume with a CDP task attached.
    • You cannot select a VM/Volume that has had a scheduled snapshot job attached.
    • If you set Snapshot Type as Snapshot Group, you cannot select a VM instance whose data volume has had a scheduled snapshot job attached.
  • Reserved Snapshots: Enter the maximum number of snapshots that you want reserve.
    Note:
    • This setting is available only when the root volume of the specified VM instance resides on a Ceph primary storage. The reserved snapshot number does not include manually created snapshots of the VM root volume.
    • You can reserve 1-32 snapshots.
  • Scheduler: Optional. Associate a scheduler to the scheduled job.
Figure 1. Create Scheduled Job