Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
When you create a sync-plan with "hammer sync-plan create" command, it is set in a time zone different from the time zone specified by the server or user.
The same applies also to job invocation:
# timedatectl | grep zone
Time zone: Europe/Vienna (CEST, +0200)
#
# hammer job-invocation create --job-template 'Run Command - SSH Default' --inputs command=date --search-query="*" --start-at "2022-09-25T14:00:00"
Job invocation 3 created
#
it logs to production.log:
2022-09-25T13:47:34 [I|app|6100bdfd] Processing by Api::V2::JobInvocationsController#create as JSON
2022-09-25T13:47:34 [I|app|6100bdfd] Parameters: {"job_invocation"=>{"job_template_id"=>166, "inputs"=>{"command"=>"date"}, "ssh"=>{}, "recurrence"=>{}, "scheduling"=>{"start_at"=>"2022-09-25T14:00:00+00:00"}, "concurrency_control"=>{}, "search_query"=>"*", "ansible"=>{}, "targeting_type"=>"static_query"}, "apiv"=>"v2"}
2022-09-25T13:47:34 [I|app|6100bdfd] Authorized user admin(Admin User)
..
to create job invocation at 14:00 UTC (not CEST=UTC+2)
While doing the same in WebUI:
2022-09-25T13:49:47 [I|app|4f40c367] Processing by JobInvocationsController#create as HTML
2022-09-25T13:49:47 [I|app|4f40c367] Parameters: {.., "triggering"=>{"mode"=>"future", "start_at_raw"=>"2022-09-25 14:00", ..}, "commit"=>"Submit"}
(no "authorized user", as authenticity_token bearers admin
to create job invocation at 14:00 CEST.
So, foreman gets (almost) the same input (wrt timestamp) for the same user, and once it interprets it in UTC and once in local timezone? Strange..
But adding timezone to the hammer command, like:
hammer sync-plan create --name hammer_syncplan2 --organization-id 1 --sync-date "2022-09-25T14:30:00 CEST" --enabled=true --interval daily
then the sync plan is scheduled for 14:30 CEST, not UTC. So this is kind of workaround.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Important: Satellite 6.15.0 release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2024:2010
The same applies also to job invocation: # timedatectl | grep zone Time zone: Europe/Vienna (CEST, +0200) # # hammer job-invocation create --job-template 'Run Command - SSH Default' --inputs command=date --search-query="*" --start-at "2022-09-25T14:00:00" Job invocation 3 created # it logs to production.log: 2022-09-25T13:47:34 [I|app|6100bdfd] Processing by Api::V2::JobInvocationsController#create as JSON 2022-09-25T13:47:34 [I|app|6100bdfd] Parameters: {"job_invocation"=>{"job_template_id"=>166, "inputs"=>{"command"=>"date"}, "ssh"=>{}, "recurrence"=>{}, "scheduling"=>{"start_at"=>"2022-09-25T14:00:00+00:00"}, "concurrency_control"=>{}, "search_query"=>"*", "ansible"=>{}, "targeting_type"=>"static_query"}, "apiv"=>"v2"} 2022-09-25T13:47:34 [I|app|6100bdfd] Authorized user admin(Admin User) .. to create job invocation at 14:00 UTC (not CEST=UTC+2) While doing the same in WebUI: 2022-09-25T13:49:47 [I|app|4f40c367] Processing by JobInvocationsController#create as HTML 2022-09-25T13:49:47 [I|app|4f40c367] Parameters: {.., "triggering"=>{"mode"=>"future", "start_at_raw"=>"2022-09-25 14:00", ..}, "commit"=>"Submit"} (no "authorized user", as authenticity_token bearers admin to create job invocation at 14:00 CEST. So, foreman gets (almost) the same input (wrt timestamp) for the same user, and once it interprets it in UTC and once in local timezone? Strange.. But adding timezone to the hammer command, like: hammer sync-plan create --name hammer_syncplan2 --organization-id 1 --sync-date "2022-09-25T14:30:00 CEST" --enabled=true --interval daily then the sync plan is scheduled for 14:30 CEST, not UTC. So this is kind of workaround.