Maintenance Windows

The maintenance windows feature in Uyuni allows you to schedule actions to occur during a scheduled maintenance window period. When you have created your maintenance window schedule, and applied it to a client, you are prevented from executing some actions outside of the specified period.

Maintenance windows operate in a different way to system locking. System locks are switched on or off as required, while maintenance windows define periods of time when actions are allowed. Additionally, the allowed and restricted actions differ. For more information about system locks, see client-configuration:system-locking.adoc.

Maintenance windows require both a calendar, and a schedule. The calendar defines the date and time of your maintenance window events, including recurring events, and must be in ical format. The schedule uses the events defined in the calendar to create the maintenance windows. You must create an ical file for upload, or link to an ical file to create the calendar, before you can create the schedule.

When you have created the schedule, you can assign it to clients that are registered to the Uyuni Server. Clients that have a maintenance schedule assigned cannot run restricted actions outside of maintenance windows.

Restricted actions significantly modify the client, and could potentially cause the client to stop running. Some examples of restricted actions are:

  • Package installation

  • Client upgrade

  • Service pack migration

  • Highstate application (for Salt clients)

Unrestricted actions are minor actions that are considered safe and are unlikely to cause problems on the client. Some examples of unrestricted actions are:

  • Package profile update

  • Hardware refresh

  • Subscribing to software channels

Before you begin, you must create an ical file for upload, or link to an ical file to create the calendar. You can create ical files in your preferred calendaring tool, such as Microsoft Outlook, Google Calendar, or KOrganizer.

Procedure: Uploading a New Maintenance Calendar
  1. In the Uyuni Web UI, navigate to Schedule  Maintenance Windows  Calendars, and click Create.

  2. In the Calendar Name section, type a name for your calendar.

  3. Either provide a URL to your ical file, or upload the file directly.

  4. Click Create Calendar to save your calendar.

Procedure: Creating a New Schedule
  1. In the Uyuni Web UI, navigate to Schedule  Maintenance Windows  Schedules, and click Create.

  2. In the Schedule Name section, type a name for your schedule.

  3. OPTIONAL: If your ical file contains events that apply to more than one schedule, check Multi.

  4. Select the calendar to assign to this schedule.

  5. Click Create Schedule to save your schedule.

Procedure: Assigning a Schedule to a Client
  1. In the Uyuni Web UI, navigate to Systems  Systems List, select the client to be assigned to a schedule, locate the System Properties panel, and click Edit These Properties. Alternatively, you can assign clients through the system set manager by navigating to Systems  System Set Manager and using the Misc  Maintenance Windows tab.

  2. In the Edit System Details page, locate the Maintenance Schedule field, and select the name of the schedule to be assigned.

  3. Click Update Properties to assign the maintenance schedule.

When you assign a new maintenance schedule to a client, it is possible that the client might already have some restricted actions scheduled, and that these might now conflict with the new maintenance schedule. If this occurs, the Web UI will display an error and you will not be able to assign the schedule to the client. To resolve this, check the Cancel affected actions option when you assign the schedule. This will cancel any previously scheduled actions that conflict with the new maintenance schedule.

When you have created your maintenance windows, you can schedule restricted actions, such as package upgrades, to be performed during the maintenance window.

Procedure: Scheduling a Package Upgrade
  1. In the Uyuni Web UI, navigate to Systems  System List, select the client you want to upgrade, and go to the Software  Packages  Upgrade tab.

  2. Select the package to upgrade from the list, and click Upgrade Packages.

  3. In the Maintenance Window field, select which maintenance window the client should use to perform the upgrade.

  4. Click Confirm to schedule the package upgrade.

Maintenance Schedule Types

When you create a calendar, it contains a number of events, which can be either one-time events, or recurring events. Each event contains a summary field. If you want to create multiple maintenance schedules for one calendar, you can specify events for each using the summary field.

For example, you might like to create a schedule for production servers, and a different schedule for testing servers. In this case, you would specify SUMMARY: Production Servers on events for the production servers, and SUMMARY: Testing Servers on events for the testing servers.

maint windows multi

There are two types of schedule: single, or multi. If your calendar contains events that apply to more than one schedule, then you must select multi, and ensure you name the schedule according to the summary field you used in the calendar file.

Procedure: Creating a Multi Schedule
  1. In the Uyuni Web UI, navigate to Schedule  Maintenance Windows  Schedules, and click Create.

  2. In the Schedule Name section, type the name for your schedule. Ensure it matches the summary field of the calendar.

  3. Check the Multi option.

  4. Select the calendar to assign to this schedule.

  5. Click Create Schedule to save your schedule.

  6. To create the next schedule, click Create.

  7. In the Schedule Name section, type the name for your second schedule. Ensure it matches the summary field of the second calendar.

  8. Check the Multi option.

  9. Click Create Schedule to save your schedule.

  10. Repeat for each schedule you need to create.

Restricted and Unrestricted Actions

This sections contains a complete list of restricted and unrestricted actions.

Restricted actions significantly modify the client, and could potentially cause the client to stop running. Restricted actions can only be run during a maintenance window. The restricted actions are:

  • Package operations (for example, installing, updating, or removing packages)

  • Patch updates

  • Rebooting a client

  • Rolling back transactions

  • Configuration management changing tasks

  • Applying a highstate (for Salt clients)

  • Autoinstallation and reinstallation

  • Remote commands

  • Service pack migrations

  • Cluster operations

For Salt clients, it is possible to run remote commands directly at any time by navigating to Salt  Remote Commands. This applies whether or not the Salt client is in a maintenance window. For more information about remote commands, see administration:actions.adoc.

Unrestricted actions are minor actions that are considered safe and are unlikely to cause problems on the client. If an action is not restricted it is, by definition, unrestricted, and can be be run at any time.