Important

   

This space contains documentation for TrueSight Server Automation 8.9.03 and the later service packs for 8.9. For earlier releases, see BMC Server Automation 8.9.

Walkthrough: Defining a fixed time period for running deploy jobs or patching a server

In a production environment, it is best practice to patch a server or update its software when it is relatively idle, to ensure that its resources are not over-utilized.

TrueSight Server Automation enables you to define a time interval called a maintenance window for servers. All commit operations for deploy jobs on the server will be executed only within this user-defined time interval. If the commit phase of a deploy job is run outside of this time interval, the deploy job fails with an error. The reason for the focus on the commit phase is that all software packages and patches are applied to target servers only during the commit phase of a deploy job.

A maintenance window can be created for an individual server or for server groups or server smart groups.

Before you begin

To define maintenance windows (step 3 below), your role must have authorizations from the MaintenanceWindow family of authorizations. To assign target servers or server groups with maintenance windows, your role must also have the Server.read and ServerGroup.read authorizations. For a full list of authorizations, see System authorizations. For information about granting authorizations to roles, see Creating roles.

Step 1: (optional) Grouping servers in server groups or server smart groups

To simplify the task of assigning maintenance windows to a large number of servers, you can prepare server groups or server smart groups based on criteria that are relevant to your business needs.

Refer to the following pages for information about creating server groups or server smart groups:

Step 2: Enabling the Maintenance Window feature on the server, server group, or server smart group

StepsExample screen (click to enlarge)
  1. Log on to the Console.
  2. In the Servers folder, right-click the server on which you want to enable the maintenance window feature, and select Set Property.
    Note: If you have a large number of servers and have grouped them in server groups or a server smart groups (as suggested in Step 1), right-click on the server group or server smart group and select Set Property.

The Set Server Property dialog box opens.

Perform the following actions:

  1. In the Name field, select the USE_MAINTENANCE_WINDOW property.

  2. In Value, select True.

  3. Click OK.

The Maintenance Windows feature is now enabled for the individual server, or for all the servers that are part of the server group or server smart group.

Warning

A server smart group is a dynamic collection of servers that might change with time. However, while enabling maintenance windows on a smart server group, only the servers that are part of the server smart group at that particular time are enabled for the maintenance window feature.

Step 3: Defining the maintenance window and assigning it to servers

StepExample screen (click to enlarge)

In the Configuration menu, click Maintenance Window Management.

The Maintenance Window Management dialog box opens.

Click to add a new maintenance window.

This first panel in the wizard allows you to schedule the maintenance window so that it can run once or recur on a daily, weekly, or monthly basis.

Example: In the figure on the right, we have scheduled the maintenance window to run on weekends, when the servers are relatively idle. The maintenance window will run for 20 hours every Saturday and Sunday from 4:00 AM, India Standard Time (IST).

 Click here to expand detail steps for scheduling a maintenance window
  1. Enter a name for the maintenance window.
  2. Specify whether you want to schedule the maintenance window to occur once, daily, weekly, or monthly, as follows:
    • Once: One-time scheduling of the maintenance window. The On date field contains the date for the one-time schedule, in yyyy/mm/dd format. The At field contains the schedule time, in 24-hour clock format (00:00 to 23:59). 
    • Daily: Recurring daily schedule, for the maintenance window to run at a set time once a day. Enter the time in the At field, in 24-hour clock format (00:00 to 23:59).
    • Weekly: Recurring schedule based on days of the week. Enter a weekly interval in the Every field (for example, enter 3 if the maintenance window should occur every three weeks), and the execution time in the At field. For On the following days, select the days of the week when the maintenance window should execute. You can select multiple days. 
    • Monthly: Recurring schedule based on a day of the month. Enter the day of the month and the time of day for the maintenance window.
  3. Enter the time zone in which the maintenance window should run. For a recurring schedule, TrueSight Server Automation automatically accounts for differences in time zones and changes in daylight savings time. For example, if you schedule a maintenance window that should run weekly at 06:00 Eastern Standard Time, the maintenance window always runs at 06:00 Eastern Time, no matter whether standard or daylight savings time is in effect.
  4. Enter the time (in minutes) for which you want the maintenance window to run after it begins.

Tip

To avoid scheduling the maintenance window at a time that conflicts with other maintenance windows or exclusion windows, you can generate a CSV file with details of all defined time windows. You can consult this CSV file whenever you schedule a new window. See Exporting details of time windows.

Click Next.

On the Targets panel, select the servers to which you want to assign the maintenance window.

Use the button to move a server, server group, or server smart group from the Available Servers box on the left to the Selected Servers box on the right. Note that when you move a server group or a smart server group by clicking , all the server that are part of the server group or server smart group at that particular time are added to the Selected Servers box.

Warning

A server smart group is a dynamic collection of servers that might automatically change with time. However, while enabling maintenance windows on a smart server group, only the servers that are part of the server smart group at that particular time are enabled for the maintenance window feature.

 Click here to expand detail steps on how to use the UI elements on this screen
  1. From Available Servers, specify the operating system of the servers you want to select. To display servers running any operating system, select All.
  2. Select servers from a tree or sortable list by doing one of the following:
    • Click By Group at the bottom of the window. The left panel displays servers in a hierarchical list arranged by server group. Choose servers by doing one of the following:
      • Click a server group to select all servers within the group.
      • Click one or more servers, if necessary expanding server groups.
    • Click By Name at the bottom of the window. The left panel lists servers by name in a Group Explorer view. Sort servers in ascending or descending order by clicking on any column header. Click one or more servers. If you select a server group, the maintenance window runs against the servers assigned to that group at the time of execution. The servers assigned to smart groups can change dynamically based on their server properties. You can modify static server groups manually by adding or removing servers.
  3. Click the right arrow to move your selections to the right panel. To remove a server from the list on the right, select it and click the left arrow. To remove all servers from the list on the right, click the double left arrow.

Click Finish.

Note

If you want to control access to the maintenance window using ACLs, click Next to move on to the Permissions panel.

For more information about the UI elements on the Permissions screens, see Import Servers - Permissions.

For more information about ACL policies, see Controlling server access with agent ACLs.

 

Click to add more maintenance windows or click Close to exit.

Note

You can assign more than one maintenance window to the same server.

Management of maintenance windows includes the following additional options:

  • To edit a maintenance window, use the Edit Maintenance Window  icon.
    The same settings (that are displayed when you create a new maintenance window) are displayed on 3 tabs.
  • To delete a maintenance window, use the Remove Maintenance Window  icon.

If you edit or delete a maintenance window while it is in effect and jobs are running, your changes to the definitions of the maintenance window are not applied to the running jobs. Similarly, if you add a new maintenance window that extends the time that the running jobs are allowed to run, the new maintenance window is not applied to the running jobs. Jobs continue running according to the maintenance window definitions that existed when job execution started.

See also Deactivating and activating a maintenance window.

You can now run deploy jobs on the targets that have been enabled and assigned to the maintenance windows. All commit operations for deploy jobs on the server will be executed only within this user-defined time interval. If the commit phase of a deploy job is run outside of this time interval, the deploy job fails with an error.

If a job started running during the maintenance window and its commit phase is still running when the window ends, job behavior depends on the type of Deploy Job:

Job typeBehavior at end of maintenance window
All types of Deploy Jobs
except for Advanced Deploy Job on a Windows server
The job is allowed to complete, because it started during the maintenance window.
Advanced Deploy Job on a Windows server

By default, the job is paused. When the next maintenance window begins, you can rerun the job, and it will resume from where it left off (for example, a Deploy Job will continue with the next item in a BLPackage).

You can choose to allow the job to complete, instead of pausing. To control this behavior in a specific Advanced Deploy Job, adjust the Maintenance and Exclusion Window options in the Phases and Schedules settings of the job.

Note

  • For jobs created before upgrading to TrueSight Server Automation 8.9, the option to pause the job is not selected by default.
  • This option is only available on targets that are running an RSCD Agent of version 8.9 or later.
  • For this option to work properly, ensure that the Advanced Deploy Job was set with the following job options:
    • Flow Control is set to By server.
    • The Reset job on failure option is not selected.

If less than a minute remains before the end of the maintenance window, the job is not allowed to start.

Note

If an exclusion window overlaps the scheduling definitions of a maintenance window on any specific server, the exclusion window takes precedence, and the maintenance window does not take effect.

To extend a maintenance period without changing the definitions of a maintenance window, you can define a second maintenance window that overlaps the first maintenance window. However, ensure that the second maintenance window begins more than a minute before the end of the first maintenance window.

Deactivating and activating a maintenance window

You can temporarily deactivate and subsequently re-activate any defined maintenance window.

StepExample screen (click to enlarge)

In the Maintenance Window Management dialog box, select the maintenance window that you want to temporarily deactivate, and click Deactivate Window .
Then click Yes in the confirmation message.

The status icon in the Name column changes from green  to red .

When you are ready to reactivate the maintenance window, select it in the list, and click Activate Window .
Then click Yes in the confirmation message. 

The status icon in the Name column changes from red  to green .

Grouping all servers associated with a specific maintenance window

You can use a server property to create a smart group that groups together all servers associated with a specific maintenance window. Such a smart group will later be useful when you need to select servers, especially when selecting targets for a job.

StepExample screen (click to enlarge)

In the Servers folder, select the location where you want to create the smart group, right-click, and select New > Server Smart Group.

The New Server Smart Group dialog box opens to the General panel.

For Name, enter a name for the smart group. In this example, we call the smart group Weekend updates. Optionally, enter a description.

In the bottom half of the dialog, there is a row that represents a rule for smart group membership. Using that row, take the following actions:

  1. Leave the first drop-down list alone. It should say Server.
  2. In the next drop-down list, click Select Property . A list appears. Scroll down and select MAINTENANCE_WINDOW*.
  3. Leave the next drop-down list alone. It should say equals.
  4. In the next drop-down list, select the name of the maintenance window (in this example, Weekend updates).
    Note: Maintenance windows created prior to TrueSight Server Automation 8.9 will not appear in this list.
  5. Click Apply changes. The criteria appears in text form rather than a series of drop-down lists.

Note

You can alternatively choose the does not equal operator instead of the equals operator, to group together servers from multiple maintenance windows (all maintenance windows except for the specified one). In such a smart group, a server that is associated with multiple windows might appear multiple times (due to a known issue); you can ignore the redundant appearances of the same server.

Click Finish. The new smart group appears under the Servers folder. If you expand it, the smart group shows all servers associated with the specified maintenance window.
 

Exporting details of time windows

To help you keep track of all the defined time windows (both exclusion windows and maintenance windows) and to figure out which servers are associated with which window, you can export the basic definitions and properties of defined maintenance windows and exclusion windows to a CSV file.

StepExample screen (click to enlarge)

For details of time windows associated with all servers, right-click the Servers folder and select Export Exclusion/Maintenance Windows.

For details of time windows associated with a specific group of servers, right-click the server group or server smart group and select Export Exclusion/Maintenance Windows.

In the Export dialog box, provide the following input:

  • Specify a location to store the exported time window details.
  • For Object Name, provide a file name.
  • For Object Type, ensure that .csv is specified.
  • For File encoding, select the type of character encoding to use for the exported file.

Then click Save.

Was this page helpful? Yes No Submitting... Thank you

Comments