Scheduled remote execution jobs by hammer command are always getting executed as per UTC timezone in Red Hat Satellite 6

Solution Verified - Updated

Environment

Red Hat Satellite

  • 6.11
  • 6.12
  • 6.13

Issue

  • When using hammer command to schedule a remote execution job for future\recurring execution, It always ends up getting executed as per UTC timezone but does not honor the server's own timezone.

Resolution

This issue has been reported to the Red Hat Engineering team via This content is not included.Bugzilla 2135722 and is expected to be fixed in Red Hat Satellite 6.14.0.

Meanwhile, There are two known workarounds available to address this concern:

Workaround 1:

  • Specify a timezone parameter in the remote execution job as per the required timezone:

    # hammer job-invocation create --job-template "Run Command - SSH Default" --organization-id "1" --location-id "2" --inputs command=df --search-query "client.example.com" --start-at "YYYY-MM-DD 22:45:00 IST"
    

Workaround 2:

  • Identify the user being used by the hammer command to authenticate with Satellite API. It's usually admin but could be a different user as well.

cat ~/.hammer/cli.modules.d/foreman.yml

  • Now,

    • Navigate to Satellite UI --> Administer --> Users
    • Click open the affected user.
    • Ensure that the expected timezone is set in the Timezone field.
    • Submit the changes.
  • Once the timezone for the affected user has been fixed, cancel the job scheduled previously and re-schedule the job.

Please reach out to This content is not included.Red Hat Technical Support to receive further updates about the Bugzilla progress.

For more KB articles/solutions related to Red Hat Satellite 6.x Remote Execution Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Remote Execution Issues

Root Cause

  • Whichever user is being used by hammer_cli, by default its Timezone will be set as Browser Default which usually is UTC or GMT, and hence whenever hammer schedules a job, that gets scheduled in UTC.

  • Due to this same issue, It may happen that the sync plans getting enabled after a satellite backup, will be executed at per UTC hours for the first time.

SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.