Maintenance schedules do not honor local timezone in vRealize Operations Manager 6.7 or later
search cancel

Maintenance schedules do not honor local timezone in vRealize Operations Manager 6.7 or later

book

Article ID: 312264

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • When configuring a maintenance schedule in vRealize Operations Manager 6.7, you may observe the following error:
'Stop on' date is in the past for selected Time Zone, despite the local timezone being correctly set within the product.


Environment

VMware vRealize Operations Manager 7.0.x
VMware vRealize Operations Manager 6.7.x

Resolution

This is a known issue affecting vRealize Operations Manager 6.7 and later.
Currently there is no resolution.

This issue will be addressed in a future release or vRealize Operations Manager.

Workaround:
To work around the issue, use the REST API to edit Maintenance Schedules.
Use one of the following options for cURL or Postman.

cURL

  1. Log into the vRealize Operations Manager Primary node as root via SSH or console.
  2. Run the following command to export a list of all existing Maintenance Schedules:
curl -k -H "Accept: application/json" -H "Content-type: application/json" -H "X-vRealizeOps-API-use-unsupported: true" -u 'admin:password' -X GET https://ip/suite-api/api/maintenanceschedules  > /tmp/schedules.txt

Note: Replace password with the local admin user password and ip with the IP address of the vRealize Operations Manager Primary node.

Example: curl -k -H "Accept: application/json" -H "Content-type: application/json" -H "X-vRealizeOps-API-use-unsupported: true" -u 'admin:Secret123!' -X GET https://192.168.3.10/suite-api/api/maintenanceschedules  > /tmp/schedules.txt
  1. Run the following command to convert the exported list to JSON format:
python -mjson.tool /tmp/schedules.txt > /tmp/schedules-f.txt
  1. Open /tmp/schedules-f.txt in a text editor.
  2. Find the Maintenance Schedule you want to edit, make the desired edits, and remove all other lines around the Maintenance Schedule.
Note: Only one Maintenance Schedule can be updated at a time, so only one Maintenance Schedule should be left in the file.  Once complete, the file should similar to the below:
        {
            "id": "<UUID_1>",
            "key": "My Maintenance Schedule",
            "schedule": {
                "duration": 1,
                "expireRuns": 2,
                "hour": 0,
                "minuteOfTheHour": 0,
                "recurrence": 1,
                "scheduleType": "DAILY",
                "startDate": "10/28/2018"
                "timeZone": "America/New_York"
            }
        }
  1. Save and close the file.
  2. Run the following command to update the Maintenance Schedule with the edits made to /tmp/schedules-f.txt:
curl -k -H "Content-type: application/json"  -H "Accept: application/json" -H "X-vRealizeOps-API-use-unsupported: true" -u 'admin:password' -X PUT https://ip/suite-api/api/maintenanceschedules -d @/tmp/schedules-f.txt

Note: Replace password with the local admin user password and ip with the IP address of the vRealize Operations Manager Primary node.

Example: curl -k -H "Content-type: application/json"  -H "Accept: application/json" -H "X-vRealizeOps-API-use-unsupported: true" -u 'admin:Secret123!' -X PUT https://192.168.3.10/suite-api/api/maintenanceschedules -d @/tmp/schedules-f.txt
 

Postman

Postman, which can be downloaded from https://www.getpostman.com/apps):
Note: This is a link to an external, 3rd party solution.  If you find this link to not work any longer, please provide feedback at the bottom of the article to request it to be updated.
  1. Open Postman and navigate to File > Settings > General.
  2. Disable SSL certificate verification, then close the Settings window.
  1. Under the Authorization tab, set the Type dropdown to Basic Auth and supply the credentials for the local vRealize Operations Manager admin user.
  2. From the Headers tab, add an Accept key with application/json as the value.
  3. At the top, set the request type to GET and enter https://ip/suite-api/api/maintenanceschedules for the request URL.
Note: Replace ip with the IP address of the vRealize Operations Manager Primary node.

Examplehttps://192.168.3.10/suite-api/api/maintenanceschedules
  1. Click Send.
  2. The output will display all saved Maintenance Schedules.
  3. Find the Maintenance Schedule you want to edit and copy it's block
Note: The full block will look similar to this:
        {
            "id": "<UUID_1>",
            "key": "My Maintenance Schedule",
            "schedule": {
                "duration": 1,
                "expireRuns": 2,
                "hour": 0,
                "minuteOfTheHour": 0,
                "recurrence": 1,
                "scheduleType": "DAILY",
                "startDate": "10/28/2018"
                "timeZone": "America/New_York"
            }
        }
  1. Under the Body tab, select raw and change the type to JSON (application/json).
  2. Paste the Maintenance Schedule block into the body window and make any desired edits.
Note: Only one Maintenance Schedule can be updated at a time, so only one Maintenance Schedule should be line the raw body.  Once complete, the raw body should look similar to this:
        {
            "id": "<UUID_1>",
            "key": "My Maintenance Schedule",
            "schedule": {
                "duration": 1,
                "expireRuns": 2,
                "hour": 4,
                "minuteOfTheHour": 30,
                "recurrence": 1,
                "scheduleType": "DAILY",
                "startDate": "10/28/2018"
                "timeZone": "America/New_York"
            }
        }
  1. Set the request type to PUT and click Send.


Additional Information

To be notified when this article is updated, click Subscribe under the Actions box.