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.
Bug 2015344 - 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.
Summary: When you create a sync-plan with "hammer sync-plan create" command, it is set...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.15.0
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-19 01:40 UTC by shimura
Modified: 2024-05-21 12:25 UTC (History)
10 users (show)

Fixed In Version: hammer-cli-3.7.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-23 17:10:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2135722 0 unspecified CLOSED While scheduling Remote execution job using hammer cli, the job scheduled actually runs at UTC time instead of server's... 2024-05-21 08:50:04 UTC
Red Hat Issue Tracker SAT-22488 0 None None None 2024-01-15 14:59:27 UTC
Red Hat Knowledge Base (Solution) 6438341 0 None None None 2022-09-25 12:37:02 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:10:56 UTC

Comment 2 Pavel Moravec 2022-09-25 12:16:54 UTC
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.

Comment 5 Adam Ruzicka 2023-05-22 07:53:33 UTC
This looks like it has the same root cause as https://bugzilla.redhat.com/show_bug.cgi?id=2135722 , keeping this one around as well for verification.

Comment 7 Peter Ondrejka 2024-01-16 11:12:39 UTC
Verified on Satellite 6.15 sn 6, syncplan is now created using the timezone of the user

Comment 11 errata-xmlrpc 2024-04-23 17:10:54 UTC
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


Note You need to log in before you can comment on or make changes to this bug.